diff -Nru exabgp-4.0.0/debian/changelog exabgp-4.0.0/debian/changelog --- exabgp-4.0.0/debian/changelog 2017-06-05 14:18:11.000000000 +0000 +++ exabgp-4.0.0/debian/changelog 2017-06-06 15:58:04.000000000 +0000 @@ -1,9 +1,18 @@ -exabgp (4.0.0-0ubuntu1~ubuntu17.10.1~ppa201706051518) artful; urgency=medium +exabgp (4.0.0-0ubuntu1~ubuntu17.10.1~ppa201706061658) artful; urgency=medium * New upstream release. + * Add Python 3 support: + - d/control: Add python{3}-exabgp, exabgp-common packages. + - d/exabgp-common.install: Install /usr/share/exabgp/*. + - d/control,rules: Switch buildsystem to pybuild. + - d/rules: Limit unit testing to Python 2 for now. + - d/control: Add required BD's for Python 3 support. + - d/python{3}-exabgp.{postinst,prerm}: Install exabgp binary + using alternatives for Python 2 or Python 3 versions. + * d/rules: Tidy etc/exabgp/exabgp.env on clean. * No-change backport to artful - -- James Page Mon, 05 Jun 2017 15:18:11 +0100 + -- James Page Tue, 06 Jun 2017 16:58:04 +0100 exabgp (3.4.17-3) unstable; urgency=medium diff -Nru exabgp-4.0.0/debian/control exabgp-4.0.0/debian/control --- exabgp-4.0.0/debian/control 2017-05-24 15:54:34.000000000 +0000 +++ exabgp-4.0.0/debian/control 2017-05-24 15:54:34.000000000 +0000 @@ -4,27 +4,93 @@ Section: net Priority: optional Build-Depends: debhelper (>= 9), - python (>= 2.7), + dh-python, + python-all (>= 2.7), python-setuptools, - python-ipaddr, - python-psutil, - python-nose, - python-six, + python3-all, + python3-setuptools, +Build-Depends-Indep: python-ipaddr, + python-nose, + python-psutil, + python-six, + python3-nose, + python3-psutil, + python3-six, Standards-Version: 3.9.8 Homepage: https://github.com/Exa-Networks/exabgp Vcs-Browser: https://github.com/Exa-Networks/exabgp/tree/debian/sid Vcs-Git: https://github.com/Exa-Networks/exabgp.git -b debian/sid -Package: exabgp +Package: exabgp-common Architecture: all -Pre-Depends: debconf (>= 1.5.34), - dpkg (>= 1.15.7.2) Depends: ${misc:Depends}, +Description: BGP swiss army knife of networking - common files + ExaBGP allows engineers to control their network from commodity + servers. Think of it as Software Defined Networking using BGP by + transforming BGP messages into friendly plain text or JSON. + . + Current documented use cases include DDOS mitigation, network + visualisation, service high availability, anycast. + . + It features ASN4 (RFC 4893), IPv6 (RFC 4760), MPLS (RFC 4659), VPLS + (RFC 4762), Flow (RFC 5575), Graceful Restart (RFC 4724), Enhanced + Route Refresh (RFC 7313), AIGP (RFC 7311) and more. + . + This package provides files common to all Python modules. + +Package: python-exabgp +Architecture: all +Section: python +Depends: exabgp-common (= ${binary:Version}), + ${misc:Depends}, ${python:Depends}, +Breaks: exabgp (<< 4.0.0-0ubuntu1~), +Replaces: exabgp (<< 4.0.0-0ubuntu1~), +Description: BGP swiss army knife of networking - Python 2 module + ExaBGP allows engineers to control their network from commodity + servers. Think of it as Software Defined Networking using BGP by + transforming BGP messages into friendly plain text or JSON. + . + Current documented use cases include DDOS mitigation, network + visualisation, service high availability, anycast. + . + It features ASN4 (RFC 4893), IPv6 (RFC 4760), MPLS (RFC 4659), VPLS + (RFC 4762), Flow (RFC 5575), Graceful Restart (RFC 4724), Enhanced + Route Refresh (RFC 7313), AIGP (RFC 7311) and more. + . + This package provides the Python 2 module of exabgp. + +Package: python3-exabgp +Architecture: all +Section: python +Depends: exabgp-common (= ${binary:Version}), + ${misc:Depends}, + ${python3:Depends}, +Description: BGP swiss army knife of networking - Python 3 module + ExaBGP allows engineers to control their network from commodity + servers. Think of it as Software Defined Networking using BGP by + transforming BGP messages into friendly plain text or JSON. + . + Current documented use cases include DDOS mitigation, network + visualisation, service high availability, anycast. + . + It features ASN4 (RFC 4893), IPv6 (RFC 4760), MPLS (RFC 4659), VPLS + (RFC 4762), Flow (RFC 5575), Graceful Restart (RFC 4724), Enhanced + Route Refresh (RFC 7313), AIGP (RFC 7311) and more. + . + This package provides the Python 3 module of exabgp. + +Package: exabgp +Architecture: all +Pre-Depends: debconf (>= 1.5.34), + dpkg (>= 1.15.7.2), +Depends: adduser, + lsb-base (>= 3.2-14), + python-exabgp (= ${binary:Version}) | python3-exabgp (= ${binary:Version}), python-pkg-resources, - adduser, ucf, - lsb-base (>= 3.2-14) + ${misc:Depends}, + ${python:Depends}, Description: BGP swiss army knife of networking ExaBGP allows engineers to control their network from commodity servers. Think of it as Software Defined Networking using BGP by diff -Nru exabgp-4.0.0/debian/exabgp-common.install exabgp-4.0.0/debian/exabgp-common.install --- exabgp-4.0.0/debian/exabgp-common.install 1970-01-01 00:00:00.000000000 +0000 +++ exabgp-4.0.0/debian/exabgp-common.install 2017-05-24 15:54:34.000000000 +0000 @@ -0,0 +1,2 @@ +etc/exabgp/* usr/share/exabgp +qa/conf/* usr/share/exabgp/etc diff -Nru exabgp-4.0.0/debian/python3-exabgp.postinst exabgp-4.0.0/debian/python3-exabgp.postinst --- exabgp-4.0.0/debian/python3-exabgp.postinst 1970-01-01 00:00:00.000000000 +0000 +++ exabgp-4.0.0/debian/python3-exabgp.postinst 2017-05-24 15:54:34.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] ; then + update-alternatives --install /usr/sbin/exabgp exabgp /usr/sbin/python3-exabgp 200 +fi + +#DEBHELPER# + +exit 0 diff -Nru exabgp-4.0.0/debian/python3-exabgp.prerm exabgp-4.0.0/debian/python3-exabgp.prerm --- exabgp-4.0.0/debian/python3-exabgp.prerm 1970-01-01 00:00:00.000000000 +0000 +++ exabgp-4.0.0/debian/python3-exabgp.prerm 2017-05-24 15:54:34.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] ; then + update-alternatives --remove exabgp /usr/sbin/python3-exabgp +fi + +#DEBHELPER# + +exit 0 diff -Nru exabgp-4.0.0/debian/python-exabgp.postinst exabgp-4.0.0/debian/python-exabgp.postinst --- exabgp-4.0.0/debian/python-exabgp.postinst 1970-01-01 00:00:00.000000000 +0000 +++ exabgp-4.0.0/debian/python-exabgp.postinst 2017-05-24 15:54:34.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "configure" ] ; then + update-alternatives --install /usr/sbin/exabgp exabgp /usr/sbin/python2-exabgp 300 +fi + +#DEBHELPER# + +exit 0 diff -Nru exabgp-4.0.0/debian/python-exabgp.prerm exabgp-4.0.0/debian/python-exabgp.prerm --- exabgp-4.0.0/debian/python-exabgp.prerm 1970-01-01 00:00:00.000000000 +0000 +++ exabgp-4.0.0/debian/python-exabgp.prerm 2017-05-24 15:54:34.000000000 +0000 @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ "$1" = "remove" ] ; then + update-alternatives --remove exabgp /usr/sbin/python2-exabgp +fi + +#DEBHELPER# + +exit 0 diff -Nru exabgp-4.0.0/debian/rules exabgp-4.0.0/debian/rules --- exabgp-4.0.0/debian/rules 2016-12-02 19:47:18.000000000 +0000 +++ exabgp-4.0.0/debian/rules 2017-05-24 15:54:34.000000000 +0000 @@ -1,13 +1,30 @@ #!/usr/bin/make -f +export PYBUILD_NAME=exabgp + +PYTHONS:=$(shell pyversions -vr) +PYTHON3S:=$(shell py3versions -vr) + %: - dh $@ --with python2 + dh $@ --with python2,python3 --buildsystem=pybuild override_dh_auto_install: - dh_auto_install -- --install-scripts=/usr/sbin - rm -rf $(CURDIR)/debian/exabgp/usr/etc + dh_auto_install --buildsystem=pybuild + rm -rf $(CURDIR)/debian/exabgp/usr/etc $(CURDIR)/debian/python*-exabgp/usr/share/exabgp + mkdir -p $(CURDIR)/debian/python-exabgp/usr/sbin $(CURDIR)/debian/python3-exabgp/usr/sbin + mv $(CURDIR)/debian/python-exabgp/usr/bin/exabgp $(CURDIR)/debian/python-exabgp/usr/sbin/python2-exabgp + mv $(CURDIR)/debian/python3-exabgp/usr/bin/exabgp $(CURDIR)/debian/python3-exabgp/usr/sbin/python3-exabgp override_dh_auto_test: - env INTERPRETER=python sbin/exabgp --fi > etc/exabgp/exabgp.env - env INTERPRETER=python ./qa/bin/parsing - env INTERPRETER=python ETC=$(CURDIR)/etc/exabgp exabgp_log_enable=false nosetests ./qa/tests/*_test.py +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) + set -e; set -x; for pyvers in $(PYTHONS); do \ + PYMAJOR=`echo $$pyvers | cut -d '.' -f 1`; \ + env INTERPRETER=python$$pyvers sbin/exabgp --fi > etc/exabgp/exabgp.env ; \ + env INTERPRETER=python$$pyvers ./qa/bin/parsing ; \ + env INTERPRETER=python$$pyvers ETC=$(CURDIR)/etc/exabgp exabgp_log_enable=false python$$pyvers -m nose ./qa/tests/*_test.py ; \ + done +endif + +override_dh_auto_clean: + dh_auto_clean --buildsystem=pybuild + rm -f etc/exabgp/exabgp.env