GNU bug report logs - #60732
[PATCH] gnu: Add package python-scapy

Previous Next

Package: guix-patches;

Reported by: Gabriel Wicki <gabriel <at> erlikon.ch>

Date: Wed, 11 Jan 2023 16:38:02 UTC

Severity: normal

Tags: patch

Done: Andreas Enge <andreas <at> enge.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 60732 in the body.
You can then email your comments to 60732 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#60732; Package guix-patches. (Wed, 11 Jan 2023 16:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Gabriel Wicki <gabriel <at> erlikon.ch>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 11 Jan 2023 16:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Gabriel Wicki <gabriel <at> erlikon.ch>
To: guix-patches <at> gnu.org
Subject: New package: python-scapy
Date: Wed, 11 Jan 2023 17:36:59 +0100
Hi!

I had time to pack some more software for our favorite distro: Python
Scapy.  It's a powerful tool which allows the creation and inspection
of ethernet frames and other network traffic packets from within Python.


From f2ca7968afdc5013d78f38e47bf9bfc34af2baa0 Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel <at> erlikon.ch>
Date: Mon, 9 Jan 2023 16:06:20 +0100
Subject: [PATCH] gnu: Add package python-scapy

* gnu/packages/python-xyz.scm (python-scapy):  New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 32d826d3c5..7e6704f4aa 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -132,6 +132,7 @@
 ;;; Copyright © 2022 Garek Dyszel <garekdyszel <at> disroot.org>
 ;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull <at> hotmail.fr>
 ;;; Copyright © 2022 Nicolas Graves <ngraves <at> ngraves.fr>
+;;; Copyright © 2023 Gabriel Wicki <gabriel <at> erlikon.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1462,6 +1463,27 @@ (define-public python-psutil
 iotop, uptime, pidof, tty, taskset, pmap.")
     (license license:bsd-3)))
 
+(define-public python-scapy
+  (package
+    (name "python-scapy")
+    (version "2.5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "scapy" version))
+              (sha256
+               (base32
+                "1hpbbmpcn4dwj3z7i7sz4cnbpkaf57p7mvl3p84x9n2gflmhq9jv"))))
+    (arguments
+     '(#:tests? #f)) ;no test
+    (build-system python-build-system)
+    (home-page "https://scapy.net")
+    (synopsis "Python network packet crafting library")
+    (description
+     "Scapy is a powerful interactive packet manipulation program.
+It is able to forge or decode packets of a wide number of protocols, send them
+on the wire, capture them, match requests and replies, and much more.")
+    (license license:gpl2)))
+
 (define-public python-shapely
   (package
     (name "python-shapely")
-- 
2.38.1





Changed bug title to '[PATCH] gnu: Add package python-scapy' from 'New package: python-scapy' Request was from Bruno Victal <mirai <at> makinata.eu> to control <at> debbugs.gnu.org. (Wed, 11 Jan 2023 17:38:01 GMT) Full text and rfc822 format available.

Added tag(s) patch. Request was from Bruno Victal <mirai <at> makinata.eu> to control <at> debbugs.gnu.org. (Wed, 11 Jan 2023 17:38:01 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#60732; Package guix-patches. (Mon, 20 Feb 2023 21:23:02 GMT) Full text and rfc822 format available.

Message #12 received at 60732 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: 60732 <at> debbugs.gnu.org
Subject: Review
Date: Mon, 20 Feb 2023 22:21:56 +0100
[Message part 1 (text/plain, inline)]
Hello,

attached is a patch with a slightly reworked description and commit message.
I verified the license and built the package on x86_64.

However, I am not sure about the tests; there is a subdirectory "test",
but it is apparently not run by the standard procedure. Maybe it is not
meant to be an automatic test?

Then scapy.egg-info/requires.txt contains this:
[basic]
ipython

[complete]
ipython
pyx
cryptography>=2.0
matplotlib

[docs]
sphinx>=3.0.0
sphinx_rtd_theme>=0.4.3
tox>=3.0.0

So it looks like there are a number of propagated- and native-inputs that
are missing. It would be good if someone could build and try the package.
Someone who knows Python is needed, I give the task back :)

Andreas

[0001-gnu-Add-python-scapy.patch (text/plain, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#60732; Package guix-patches. (Tue, 21 Feb 2023 17:45:01 GMT) Full text and rfc822 format available.

Message #15 received at 60732 <at> debbugs.gnu.org (full text, mbox):

From: "Wicki Gabriel (wicg)" <wicg <at> zhaw.ch>
To: "60732 <at> debbugs.gnu.org" <60732 <at> debbugs.gnu.org>
Cc: "andreas <at> enge.fr" <andreas <at> enge.fr>
Subject: Patch update
Date: Tue, 21 Feb 2023 17:44:15 +0000
[Message part 1 (text/plain, inline)]
Hi

Thank you, Andreas, for your review.

When #:tests? #t​ the following output is generated (and the build fails)
> running test
> WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.

I am not sure how to achieve this using our package management system and am not sure if it would be of great gain to do so.

According to the documentation [1] ipython, matplotlib, etc are optional dependencies. I wouldn't include them per se since one can easily invoke a Guix shell providing these.

To test one can invoke a guix shell --pure python-scapy python-ipython​ and run scapy​ manually.


I have adjusted the patch, thank you for your time and effort in advance!
Please let me know if i can improve it some more!

g


1: https://scapy.readthedocs.io/en/latest/installation.html#optional-dependencies
2: https://scapy.net/



[Message part 2 (text/html, inline)]
[0001-gnu-Add-python-scapy.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#60732; Package guix-patches. (Tue, 28 Feb 2023 13:51:02 GMT) Full text and rfc822 format available.

Message #18 received at 60732 <at> debbugs.gnu.org (full text, mbox):

From: "Wicki Gabriel (wicg)" <wicg <at> zhaw.ch>
To: "60732 <at> debbugs.gnu.org" <60732 <at> debbugs.gnu.org>
Cc: "jgart <at> dismail.de" <jgart <at> dismail.de>, "lars <at> 6xq.net" <lars <at> 6xq.net>
Subject: Re: Patch update
Date: Tue, 28 Feb 2023 13:50:10 +0000
[Message part 1 (text/plain, inline)]
Hello Python Team

I'm sorry if you are well-aware of issue 60732 [0], but since i (think i) forgot to CC you on my previous emails i would like to raise awareness of this (probably) easy merge now 🙂

Let me know if I can change anything, i'm happy to do so.

Thank you for your time and effort,
g

[0] https://issues.guix.gnu.org/60732
[Message part 2 (text/html, inline)]

Reply sent to Andreas Enge <andreas <at> enge.fr>:
You have taken responsibility. (Sat, 11 Mar 2023 22:25:02 GMT) Full text and rfc822 format available.

Notification sent to Gabriel Wicki <gabriel <at> erlikon.ch>:
bug acknowledged by developer. (Sat, 11 Mar 2023 22:25:02 GMT) Full text and rfc822 format available.

Message #23 received at 60732-done <at> debbugs.gnu.org (full text, mbox):

From: Andreas Enge <andreas <at> enge.fr>
To: 60732-done <at> debbugs.gnu.org
Cc: Gabriel Wicki <gabriel <at> erlikon.ch>
Subject: Close patch
Date: Sat, 11 Mar 2023 23:24:13 +0100
Hello Gabriel,

apologies for not coming back to you. I was a bit torn about the
dependencies, since we tend to package software as "completely" as
possible. Here however the optional dependencies are quite heavy,
and python-pycrypto is outdated and unmaintained and should not be
used anymore. So in the end I opted to leave them out, if someone feels
the need, we can add them to the package, or indeed as you said they
can install them into their profile themselves.

As for the tests, my impression is that they are actually not activated.
So I added a comment.

The patch is pushed now, thanks again for your patience!

Andreas





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 09 Apr 2023 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 17 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.