pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/net/scapy
Module Name: pkgsrc
Committed By: gutteridge
Date: Tue Oct 1 23:49:29 UTC 2024
Modified Files:
pkgsrc/net/scapy: Makefile distinfo
pkgsrc/net/scapy/patches: patch-scapy_____init____.py
Log Message:
scapy: fix the versioning issue more cleanly
While here, also note the issue filed for scapy.1 not getting installed.
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 pkgsrc/net/scapy/Makefile
cvs rdiff -u -r1.21 -r1.22 pkgsrc/net/scapy/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/net/scapy/patches/patch-scapy_____init____.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/net/scapy/Makefile
diff -u pkgsrc/net/scapy/Makefile:1.47 pkgsrc/net/scapy/Makefile:1.48
--- pkgsrc/net/scapy/Makefile:1.47 Tue Oct 1 01:08:28 2024
+++ pkgsrc/net/scapy/Makefile Tue Oct 1 23:49:29 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.47 2024/10/01 01:08:28 gutteridge Exp $
+# $NetBSD: Makefile,v 1.48 2024/10/01 23:49:29 gutteridge Exp $
DISTNAME= scapy-2.6.0
CATEGORIES= net
@@ -20,18 +20,10 @@ PYTHON_VERSIONS_INCOMPATIBLE= 27 38 39 #
.include "options.mk"
-# Upstream has an unorthodox means of defining the software version for Python
-# packaging, where they advise packagers to force the correct value, as their
-# tooling won't do it correctly for tagged releases.
-SUBST_CLASSES+= version
-SUBST_STAGE.version= pre-configure
-SUBST_FILES.version= scapy/__init__.py
-SUBST_VARS.version+= PKGVERSION_NOREV
-SUBST_MESSAGE.version= Fixing version.
-
INSTALLATION_DIRS+= ${PKGMANDIR}/man1
# Upstream mistakenly removed their scripting to install the man page.
+# https://github.com/secdev/scapy/issues/4549
post-install:
${MV} ${WRKSRC}/doc/scapy.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/scapy.1
Index: pkgsrc/net/scapy/distinfo
diff -u pkgsrc/net/scapy/distinfo:1.21 pkgsrc/net/scapy/distinfo:1.22
--- pkgsrc/net/scapy/distinfo:1.21 Tue Oct 1 01:08:28 2024
+++ pkgsrc/net/scapy/distinfo Tue Oct 1 23:49:29 2024
@@ -1,9 +1,9 @@
-$NetBSD: distinfo,v 1.21 2024/10/01 01:08:28 gutteridge Exp $
+$NetBSD: distinfo,v 1.22 2024/10/01 23:49:29 gutteridge Exp $
BLAKE2s (scapy-2.6.0.tar.gz) = cebfa06ccf9c6ab4b06e58b1df71fef7cda63db37b0f330c06ca62db25502f0b
SHA512 (scapy-2.6.0.tar.gz) = a5543b44411fcc22eb909e806e729605616ce98ab15ff208ee90ad606265c6604ef295bc0b9b130f22711ffed0ad9fd4c52783c8df7ef79849f7db38b97d9e1d
Size (scapy-2.6.0.tar.gz) = 7039399 bytes
SHA1 (patch-ab) = c544db1e6d4cf8c42f7c2b0010d898bf61413e22
-SHA1 (patch-scapy_____init____.py) = d204cb7eef75637bd0de50cadef53ebe40cc100c
+SHA1 (patch-scapy_____init____.py) = 9808c8fbe63283862c9e7e65c436b28de19ebe16
SHA1 (patch-scapy_arch_bpf_supersocket.py) = 7f2ad841643c2e347871b54e476998de403d2a01
SHA1 (patch-scapy_consts.py) = c897229e444d363e2aeea12cdd7264d3d275f4ab
Index: pkgsrc/net/scapy/patches/patch-scapy_____init____.py
diff -u pkgsrc/net/scapy/patches/patch-scapy_____init____.py:1.1 pkgsrc/net/scapy/patches/patch-scapy_____init____.py:1.2
--- pkgsrc/net/scapy/patches/patch-scapy_____init____.py:1.1 Tue Oct 1 01:08:29 2024
+++ pkgsrc/net/scapy/patches/patch-scapy_____init____.py Tue Oct 1 23:49:29 2024
@@ -1,15 +1,21 @@
-$NetBSD: patch-scapy_____init____.py,v 1.1 2024/10/01 01:08:29 gutteridge Exp $
+$NetBSD: patch-scapy_____init____.py,v 1.2 2024/10/01 23:49:29 gutteridge Exp $
Supply expected version, not inconsistent date value set by upstream.
+https://github.com/secdev/scapy/pull/4548
--- scapy/__init__.py.orig 2024-09-28 13:11:32.000000000 +0000
+++ scapy/__init__.py
-@@ -133,7 +133,7 @@ def _version():
- # Method 0: from external packaging
- try:
- # possibly forced by external packaging
-- return os.environ['SCAPY_VERSION']
-+ return "@PKGVERSION_NOREV@"
- except KeyError:
- pass
+@@ -37,7 +37,12 @@ def _parse_tag(tag):
+ # remove the 'v' prefix and add a '.devN' suffix
+ return '%s.dev%s' % (match.group(1), match.group(2))
+ else:
+- raise ValueError('tag has invalid format')
++ match = re.match('^v?([\\d\\.]+)$', tag)
++ if match:
++ # tagged release version
++ return '%s' % (match.group(1))
++ else:
++ raise ValueError('tag has invalid format')
+
+ def _version_from_git_archive():
Home |
Main Index |
Thread Index |
Old Index