Control: tags -1 + patch On Fri, Aug 30, 2019 at 07:28:03AM +0000, Matthias Klose wrote: > Package: src:neard [...] > Usertags: py2removal > > Python2 becomes end-of-live upstream, and Debian aims to remove > Python2 from the distribution, as discussed in > https://lists.debian.org/debian-python/2019/07/msg00080.html > > Your package either build-depends, depends on Python2, or uses Python2 > in the autopkg tests. Please stop using Python2, and fix this issue > by one of the following actions. > > - Convert your Package to Python3. [...]
The src:neard package seems to ship a few test scripts in a private location in the neard-tools package. It seems like these could simply be dropped without anyone noticing. Other alternative would ofcourse be to convert them to python3, but given that upstream has had no activity for a couple of years I doubt that's going to happen. I'm attaching a trivial patch that auto-converts the scripts (hoping that produces a good enough result, and even if it doesn't the files are installed in a private location and seems completely unused anyway) during installation and swaps all helpers and packaging meta-data over to python3. A debdiff is attached. The result has only been build-tested. Anyone is welcome to review and upload. Regards, Andreas Henriksson
diff -Nru neard-0.16/debian/changelog neard-0.16/debian/changelog --- neard-0.16/debian/changelog 2017-01-19 03:24:08.000000000 +0100 +++ neard-0.16/debian/changelog 2019-09-04 22:25:59.000000000 +0200 @@ -1,3 +1,11 @@ +neard (0.16-0.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Convert neard-tools private test utils to python3 during install and + switch dependencies to python3 equivalent (Closes: #937125) + + -- Andreas Henriksson <andr...@fatal.se> Wed, 04 Sep 2019 22:25:59 +0200 + neard (0.16-0.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru neard-0.16/debian/control neard-0.16/debian/control --- neard-0.16/debian/control 2017-01-19 03:21:14.000000000 +0100 +++ neard-0.16/debian/control 2019-09-04 22:25:22.000000000 +0200 @@ -15,7 +15,7 @@ libnl-3-dev (>= 3.2), libnl-genl-3-dev (>= 3.2), pkg-config, - python, + 2to3, systemd, Package: neard @@ -40,10 +40,10 @@ Architecture: linux-any Depends: ${misc:Depends}, - ${python:Depends}, + ${python3:Depends}, ${shlibs:Depends}, neard (= ${binary:Version}), - python-dbus, + python3-dbus, Description: neard command-line tools This package contains various scripts for testing neard. diff -Nru neard-0.16/debian/neard-tools.install neard-0.16/debian/neard-tools.install --- neard-0.16/debian/neard-tools.install 2013-04-15 16:14:02.000000000 +0200 +++ neard-0.16/debian/neard-tools.install 2019-09-04 22:23:36.000000000 +0200 @@ -1,2 +1,2 @@ -test/* usr/lib/neard/tools +usr/lib/neard/tools usr/bin/nfctool diff -Nru neard-0.16/debian/rules neard-0.16/debian/rules --- neard-0.16/debian/rules 2017-01-16 00:46:38.000000000 +0100 +++ neard-0.16/debian/rules 2019-09-04 22:25:59.000000000 +0200 @@ -11,7 +11,7 @@ %: - dh $@ --with autotools_dev,python2 + dh $@ --with autotools_dev,python3 override_dh_auto_configure: ./configure $(confflags) \ @@ -27,6 +27,11 @@ # Temporary workaround for broken .pc file, fixed in git master. sed -i -e 's/@pkglibdir@/$${pkglibdir}/' \ $(CURDIR)/debian/tmp/usr/lib/pkgconfig/neard.pc + # Convert private test utilities to python3 during installation + 2to3 -f all --output-dir=$(CURDIR)/debian/tmp/usr/lib/neard/tools/ -W -n test/* + # ... also fix up their shebangs + sed -ie '1 s,#!.*python.*,#!/usr/bin/python3,' $(CURDIR)/debian/tmp/usr/lib/neard/tools/* -override_dh_python2: - dh_python2 /usr/lib/neard/tools/ + +override_dh_python3: + dh_python3 /usr/lib/neard/tools/