Package: txtorcon
Version:  18.0.2-2
Severity: important

The removal of the python2 package in #905253 due to a packaging bug
made its reverse dependencies RC buggy.
As upstream still supports python2 [0], it is tested in the package
build and its rdepends and buster will still ship with python2 please
reintroduce the python2 package.

Attached a debdiff that fixes the installation of the python3 only file
in the python2 package.


[0] https://github.com/meejah/txtorcon
diff --git a/debian/changelog b/debian/changelog
index f266461..b644918 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+txtorcon (18.0.2-3) unstable; urgency=medium
+
+  * reintroduce fixed Python 2 package needed by reverse dependencies
+    Closes: #911271
+
+ -- Julian Taylor <jtaylor.deb...@googlemail.com>  Fri, 26 Oct 2018 22:30:43 
+0200
+
 txtorcon (18.0.2-2) unstable; urgency=medium
 
   * No longer builds a Python 2 package (Closes: #905253)
diff --git a/debian/control b/debian/control
index 0eac5fa..a20741c 100644
--- a/debian/control
+++ b/debian/control
@@ -8,6 +8,14 @@ Build-Depends: debhelper (>= 9),
                dh-python,
                graphviz,
                lsof,
+               python-all,
+               python-geoip,
+               python-ipaddress,
+               python-mock,
+               python-repoze.sphinx.autointerface,
+               python-setuptools,
+               python-sphinx,
+               python-twisted,
                python3-all,
                python3-geoip,
                python3-mock,
@@ -21,6 +29,29 @@ Vcs-Browser: 
https://salsa.debian.org/pkg-privacy-team/txtorcon
 Vcs-Git: https://salsa.debian.org/pkg-privacy-team/txtorcon.git
 Homepage: https://github.com/meejah/txtorcon
 
+Package: python-txtorcon
+Architecture: all
+Depends: python-geoip,
+         python-ipaddress,
+         python-twisted,
+         python-zope.interface,
+         ${misc:Depends},
+         ${python:Depends}
+Suggests: tor
+Provides: ${python:Provides}
+Description: Twisted-based asynchronous Tor control protocol implementation 
(Python 2)
+ txtorcon main feature is to present an asynchronous API to speak the Tor
+ client protocol in Python. It also provides abstractions to track and get
+ updates about Tor's state and current configuration (including writing it to
+ Tor or disk), along with helpers to asynchronously launch slave instances of
+ Tor including Twisted endpoint support.
+ .
+ Twisted is an event-driven networking engine written in Python and Tor is an
+ onion-routing network designed to improve people's privacy and anonymity on 
the
+ Internet.
+ .
+ This package contains the Python 2 module.
+
 Package: python3-txtorcon
 Architecture: all
 Depends: python3-geoip,
diff --git a/debian/rules b/debian/rules
index a334f92..aa0b193 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,7 @@
 export PYBUILD_NAME=txtorcon
 
 %:
-       dh $@ --with=python3,sphinxdoc --buildsystem=pybuild
+       dh $@ --with=python2,python3,sphinxdoc --buildsystem=pybuild
 
 override_dh_auto_build:
        PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml docs/ 
docs/_build/html # HTML generator
@@ -11,17 +11,28 @@ override_dh_auto_build:
 
 override_dh_auto_install:
        dh_auto_install -O--buildsystem=pybuild
+       # don't install py3 files in py2 as they don't compile during 
installation
+       find debian/python-txtorcon/ -name controller_py3.py -delete
+       mkdir -p debian/python-txtorcon/usr/share/doc/python-txtorcon
        mkdir -p debian/python3-txtorcon/usr/share/doc/python3-txtorcon
        set -e && \
+       for data_src in README.rst TODO examples; do \
+               mv debian/python-txtorcon/usr/share/txtorcon/$$data_src \
+                       debian/python-txtorcon/usr/share/doc/python-txtorcon; \
+       done
+       set -e && \
        for data_src in README.rst TODO examples; do \
                mv debian/python3-txtorcon/usr/share/txtorcon/$$data_src \
                        debian/python3-txtorcon/usr/share/doc/python3-txtorcon; 
\
        done
+       chmod 644 
debian/python-txtorcon/usr/share/doc/python-txtorcon/examples/*.py
        chmod 644 
debian/python3-txtorcon/usr/share/doc/python3-txtorcon/examples/*.py
+       rm -r debian/python-txtorcon/usr/share/txtorcon
        rm -r debian/python3-txtorcon/usr/share/txtorcon
 
 override_dh_compress:
        dh_compress -Xlaunch_tor_with_simplehttpd.py -O--buildsystem=pybuild
 
 override_dh_auto_test:
+       PYTHONPATH=. trial --reporter=text test
        PYTHONPATH=. trial3 --reporter=text test

Reply via email to