Source: systemd Version: 214-1 Severity: wishlist Tags: patch Please add back the python2 bindings, they are used for the journal backend of fail2ban.
The attached patch adds the package python-systemd and makes a second build to build both python versions. -- Package-specific info: -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (103, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16-trunk-amd64 (SMP w/4 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- no debconf information
>From 1ad313d3269f0bef285616ea3e93fd615fc71e9c Mon Sep 17 00:00:00 2001 From: Daniel Schaal <farb...@web.de> Date: Sat, 6 Sep 2014 07:03:03 +0200 Subject: [PATCH] Re-add python-systemd for python2 --- debian/control | 12 ++++++++++++ debian/python-systemd.install | 1 + debian/python3-systemd.install | 2 +- debian/rules | 13 +++++++++---- 4 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 debian/python-systemd.install diff --git a/debian/control b/debian/control index 29bf88c..57886a6 100644 --- a/debian/control +++ b/debian/control @@ -37,6 +37,8 @@ Build-Depends: debhelper (>= 9), gobject-introspection (>= 1.31.1), python3-all-dev, python3-lxml, + python-all-dev, + python-lxml, libglib2.0-doc Package: systemd @@ -393,6 +395,16 @@ Depends: ${shlibs:Depends}, Description: Python 3 bindings for systemd This package contains Python 3 bindings for the systemd libraries. +Package: python-systemd +Section: python +Priority: optional +Architecture: linux-any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + ${python:Depends} +Description: Python 2 bindings for systemd + This package contains Python 2 bindings for the systemd libraries. + Package: systemd-dbg Architecture: linux-any Section: debug diff --git a/debian/python-systemd.install b/debian/python-systemd.install new file mode 100644 index 0000000..3a3c83e --- /dev/null +++ b/debian/python-systemd.install @@ -0,0 +1 @@ +usr/lib/python2*/*-packages/systemd diff --git a/debian/python3-systemd.install b/debian/python3-systemd.install index ac58d1f..c808fd7 100644 --- a/debian/python3-systemd.install +++ b/debian/python3-systemd.install @@ -1 +1 @@ -usr/lib/python*/*-packages/systemd +usr/lib/python3*/*-packages/systemd diff --git a/debian/rules b/debian/rules index 8edc078..da1fec7 100755 --- a/debian/rules +++ b/debian/rules @@ -37,7 +37,6 @@ CONFFLAGS_deb = \ --enable-introspection \ --enable-gtk-doc \ --enable-compat-libs \ - PYTHON=python3 \ $(NULL) CONFFLAGS_udeb = \ @@ -70,15 +69,20 @@ CONFFLAGS_udeb = \ override_dh_auto_configure: dh_auto_configure --builddirectory=build-deb \ - -- $(CONFFLAGS) $(CONFFLAGS_deb) + -- $(CONFFLAGS) PYTHON=python3 $(CONFFLAGS_deb) + dh_auto_configure --builddirectory=build-deb-python2 \ + -- $(CONFFLAGS) PYTHON=python2 $(CONFFLAGS_deb) dh_auto_configure --builddirectory=build-udeb \ -- $(CONFFLAGS) $(CONFFLAGS_udeb) override_dh_auto_build: dh_auto_build --builddirectory=build-deb + dh_auto_build --builddirectory=build-deb-python2 dh_auto_build --builddirectory=build-udeb override_dh_auto_install: + dh_auto_install --builddirectory=build-deb-python2 \ + --destdir=debian/install/deb dh_auto_install --builddirectory=build-deb \ --destdir=debian/install/deb dh_auto_install --builddirectory=build-udeb \ @@ -86,6 +90,7 @@ override_dh_auto_install: override_dh_auto_clean: dh_auto_clean --builddirectory=build-deb + dh_auto_clean --builddirectory=build-deb-python2 dh_auto_clean --builddirectory=build-udeb rm -rf debian/install/ # remove pre-generated man pages so they are rebuilt @@ -253,7 +258,7 @@ override_dh_strip: %: ifeq (,$(findstring stage1,$(DEB_BUILD_PROFILES))) - dh $@ --with autoreconf,gir,python3 --parallel + dh $@ --with autoreconf,gir,python2,python3 --parallel else - dh $@ --with autoreconf,python3 $(BOOTSTRAP_DH_FLAGS) + dh $@ --with autoreconf,python2,python3 $(BOOTSTRAP_DH_FLAGS) endif -- 2.1.0