scapy: update to 2.7.0; add test.sh
authorAlexandru Ardelean <redacted>
Fri, 17 Apr 2026 00:13:56 +0000 (03:13 +0300)
committerAlexandru Ardelean <redacted>
Tue, 21 Apr 2026 08:54:03 +0000 (11:54 +0300)
Update scapy to version 2.7.0.

Add python-setuptools/host to PKG_BUILD_DEPENDS as the package
uses setuptools as its build backend.

Changelog: https://github.com/secdev/scapy/blob/master/doc/scapy/installation.rst
Signed-off-by: Alexandru Ardelean <redacted>
net/scapy/Makefile
net/scapy/test.sh [new file with mode: 0755]

index 6fc1859ed2168f7a05566468020896089d03cd67..e73795c38656dcbfb5f8b1d8eb39f0c4ddf7763b 100644 (file)
@@ -8,11 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=scapy
-PKG_VERSION:=2.6.1
+PKG_VERSION:=2.7.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=$(PKG_NAME)
-PKG_HASH:=7600d7e2383c853e5c3a6e05d37e17643beebf2b3e10d7914dffcc3bc3c6e6c5
+PKG_HASH:=bfc1ef1b93280aea1ddee53be7f74232aa28ac3d891244d41ee85200d24aa446
+
+PKG_BUILD_DEPENDS:=python-setuptools/host
 
 PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
 PKG_LICENSE:=GPL-2.0-only
diff --git a/net/scapy/test.sh b/net/scapy/test.sh
new file mode 100755 (executable)
index 0000000..d8f5665
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+[ "$1" = scapy ] || exit 0
+
+python3 - <<'EOF'
+import scapy
+from scapy.packet import Packet, Raw
+from scapy.fields import ByteField, ShortField
+
+# Test basic packet creation
+pkt = Raw(load=b"hello")
+assert pkt.load == b"hello", f"unexpected: {pkt.load!r}"
+
+# Test that layers are importable
+from scapy.layers.inet import IP, TCP, UDP
+ip = IP(src="192.168.1.1", dst="192.168.1.2")
+assert ip.src == "192.168.1.1"
+assert ip.dst == "192.168.1.2"
+
+# Test packet building
+tcp = TCP(sport=1234, dport=80)
+assert tcp.sport == 1234
+assert tcp.dport == 80
+
+print("scapy OK")
+EOF
git clone https://git.99rst.org/PROJECT