[Pkg-netmeasure-discuss] Bug#871940: python-scapy: wrong version information

Hilko Bengen bengen at debian.org
Sat Aug 12 18:40:46 UTC 2017


Source: scapy
Version: 2.3.3-1
Severity: important
Tags: patch

Dear Maintainer,

while working on packaging software that depends on the scapy python
module, I noticed that the version information in the Debian package is
broken:

$ python
Python 2.7.13+ (default, Jul 19 2017, 18:15:03) 
[GCC 6.4.0 20170704] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import scapy
>>> scapy.VERSION
'unknown.version'
>>> 

The python-scapy pacakge contains a file
/usr/lib/python2.7/dist-packages/scapy-unknown.version in which the
"Version:" line also contains that string "unknown.version". Something
is clearly wrong here.


VERSION is initialized in scapy/__init__.py, from "git describe output"
or from a VERSION file if that exists. If neither a git tag nor the
VERSION file can be found, the version is set to "unknown.version".

Upstream had a cute idea there, but this is not robust:

- If I build the package from a git clone of the
  https://anonscm.debian.org/git/pkg-netmeasure/scapy.git, I get
  "debian/2.3.3-1" as the version string...

- If I build in sbuild where no git metadata is available, I get
  "unknown.version"

Please consider adding my patch which removes git-related code from
scapy/__init__.py and creates the VERSION file from
DEB_VERSION_UPSTREAM.

Cheers,
-Hilko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-fix-unreliable-generation-of-scapy.VERSION-at-build-.patch
Type: text/x-diff
Size: 3884 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-netmeasure-discuss/attachments/20170812/b5b0f9ef/attachment.patch>


More information about the Pkg-netmeasure-discuss mailing list