pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/scapy scapy: add a fix for Python 2.7 builds



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5d399627c3b3
branches:  trunk
changeset: 404023:5d399627c3b3
user:      gutteridge <gutteridge%pkgsrc.org@localhost>
date:      Tue Nov 05 01:02:49 2019 +0000

description:
scapy: add a fix for Python 2.7 builds

diffstat:

 net/scapy/Makefile                                          |   3 +-
 net/scapy/distinfo                                          |   3 +-
 net/scapy/patches/patch-scapy_tools_generate__ethertypes.py |  15 +++++++++++++
 3 files changed, 19 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r 682b56f96a91 -r 5d399627c3b3 net/scapy/Makefile
--- a/net/scapy/Makefile        Mon Nov 04 23:21:57 2019 +0000
+++ b/net/scapy/Makefile        Tue Nov 05 01:02:49 2019 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.30 2019/11/04 05:48:26 gutteridge Exp $
+# $NetBSD: Makefile,v 1.31 2019/11/05 01:02:49 gutteridge Exp $
 
 DISTNAME=      scapy-2.4.3
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=secdev/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
diff -r 682b56f96a91 -r 5d399627c3b3 net/scapy/distinfo
--- a/net/scapy/distinfo        Mon Nov 04 23:21:57 2019 +0000
+++ b/net/scapy/distinfo        Tue Nov 05 01:02:49 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.10 2019/11/04 05:48:26 gutteridge Exp $
+$NetBSD: distinfo,v 1.11 2019/11/05 01:02:49 gutteridge Exp $
 
 SHA1 (scapy-2.4.3.tar.gz) = 62dfd58a8e3799f083a157209b8b0902f53e76f0
 RMD160 (scapy-2.4.3.tar.gz) = fee72af411c6b42961feb6f46ad5ba7e8c0c426b
@@ -8,3 +8,4 @@
 SHA1 (patch-ad) = bac7c72eff08608d4d73911a94bfc3125b8b53b6
 SHA1 (patch-scapy_arch_bpf_supersocket.py) = d1850020a54799155e8046de0994d7df821c6046
 SHA1 (patch-scapy_consts.py) = 3495fc2716b78bf0689f2eb8d1095c746d9700e3
+SHA1 (patch-scapy_tools_generate__ethertypes.py) = 1222be8736cadf5c6148cd7a24584177bb522446
diff -r 682b56f96a91 -r 5d399627c3b3 net/scapy/patches/patch-scapy_tools_generate__ethertypes.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/scapy/patches/patch-scapy_tools_generate__ethertypes.py       Tue Nov 05 01:02:49 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-scapy_tools_generate__ethertypes.py,v 1.1 2019/11/05 01:02:49 gutteridge Exp $
+
+Fix order of Python string prefix flags, so this works with 2.7.
+
+--- scapy/tools/generate_ethertypes.py.orig    2019-08-04 16:12:30.000000000 +0000
++++ scapy/tools/generate_ethertypes.py
+@@ -20,7 +20,7 @@ URL = "https://raw.githubusercontent.com
+ with urllib.request.urlopen(URL) as stream:
+     DATA = stream.read()
+ 
+-reg = rb".*ETHERTYPE_([^\s]+)\s.0x([0-9A-Fa-f]+).*\/\*(.*)\*\/"
++reg = br".*ETHERTYPE_([^\s]+)\s.0x([0-9A-Fa-f]+).*\/\*(.*)\*\/"
+ COMPILED = b"""#
+ # Ethernet frame types
+ #       This file describes some of the various Ethernet



Home | Main Index | Thread Index | Old Index