Package: src:talloc
Version: 2.1.5-1
Tags: patch
This is a first shot of building python3 bindings for talloc (to be followed up
by ldb and tdb bindings). The packaging certainly can be improved, making it
more robust for version changes. however there is one change which should be
applied upstream: The library *name* for the helper library includes the whole
SOABI name for a python extension, including the multiarch name in Python 3.5.
This leads to different sonames on different architectures. Maybe this should be
fixed so that distros rely on a common name for python3 builds.
diff -Nru talloc-2.1.5/debian/changelog talloc-2.1.5/debian/changelog
--- talloc-2.1.5/debian/changelog 2015-11-08 21:08:11.000000000 +0000
+++ talloc-2.1.5/debian/changelog 2016-02-16 17:04:58.000000000 +0000
@@ -1,3 +1,13 @@
+talloc (2.1.5-1ubuntu1) xenial; urgency=medium
+
+ * Build python3 packages.
+ * Bump debhelper and standards version.
+ * Do not generate symbols for the extension module
+ * Do not encode the multiarch string into the pytalloc-util library.
+ * Make the build log a bit more verbose.
+
+ -- Matthias Klose <[email protected]> Tue, 16 Feb 2016 12:22:29 +0100
+
talloc (2.1.5-1) unstable; urgency=medium
* New upstream release.
diff -Nru talloc-2.1.5/debian/compat talloc-2.1.5/debian/compat
--- talloc-2.1.5/debian/compat 2015-11-07 15:36:10.000000000 +0000
+++ talloc-2.1.5/debian/compat 2016-02-16 14:10:26.000000000 +0000
@@ -1 +1 @@
-8
+9
diff -Nru talloc-2.1.5/debian/control talloc-2.1.5/debian/control
--- talloc-2.1.5/debian/control 2015-11-08 21:08:04.000000000 +0000
+++ talloc-2.1.5/debian/control 2016-02-16 14:47:11.000000000 +0000
@@ -4,7 +4,12 @@
Maintainer: Debian Samba Maintainers <[email protected]>
Uploaders: Jelmer Vernooij <[email protected]>, Christian Perrier <[email protected]>
Homepage: http://talloc.samba.org/
-Build-Depends: debhelper (>= 8.1.3), docbook-xml, docbook-xsl, xsltproc, libpopt-dev, python-all (>= 2.6.6-3), python-all-dev (>= 2.6.6-3)
+Build-Depends: debhelper (>= 9),
+ docbook-xml, docbook-xsl, xsltproc,
+ dh-python,
+ libpopt-dev,
+ python-dev (>= 2.6.6-3),
+ python3-dev,
Standards-Version: 3.9.6
Vcs-Git: git://anonscm.debian.org/pkg-samba/talloc.git -b unstable
XS-Testsuite: autopkgtest
@@ -77,3 +82,38 @@
reference counting to determine when memory should be freed.
.
This package contains the development files for the Python bindings.
+
+Package: python3-talloc
+Pre-Depends: ${misc:Pre-Depends}
+Architecture: any
+Section: python
+Provides: ${python3:Provides}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}
+Description: hierarchical pool based memory allocator - Python3 bindings
+ A hierarchical pool based memory allocator with destructors. It uses
+ reference counting to determine when memory should be freed.
+ .
+ This package contains the Python3 bindings.
+
+Package: python3-talloc-dbg
+Architecture: any
+Pre-Depends: ${misc:Pre-Depends}
+Section: debug
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, python3-talloc (= ${binary:Version})
+Recommends: python3-dbg, libtalloc2-dbg
+Priority: extra
+Description: hierarchical pool based memory allocator - Python3 debug extension
+ A hierarchical pool based memory allocator with destructors. It uses
+ reference counting to determine when memory should be freed.
+ .
+ This package contains the Python3 debug extension.
+
+Package: python3-talloc-dev
+Architecture: any
+Section: libdevel
+Depends: python3-talloc (= ${binary:Version}), ${misc:Depends}, pkg-config
+Description: talloc Python3 bindings - development files
+ A hierarchical pool based memory allocator with destructors. It uses
+ reference counting to determine when memory should be freed.
+ .
+ This package contains the development files for the Python3 bindings.
diff -Nru talloc-2.1.5/debian/patches/pass-waf-flags.diff talloc-2.1.5/debian/patches/pass-waf-flags.diff
--- talloc-2.1.5/debian/patches/pass-waf-flags.diff 1970-01-01 00:00:00.000000000 +0000
+++ talloc-2.1.5/debian/patches/pass-waf-flags.diff 2016-02-16 16:17:56.000000000 +0000
@@ -0,0 +1,17 @@
+# Allow to pass flags to waf
+
+--- talloc-2.1.5.orig/Makefile
++++ talloc-2.1.5/Makefile
+@@ -3,10 +3,10 @@
+ WAF=WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$$PATH waf
+
+ all:
+- $(WAF) build
++ $(WAF) build $(WAFFLAGS)
+
+ install:
+- $(WAF) install
++ $(WAF) install $(WAFFLAGS)
+
+ uninstall:
+ $(WAF) uninstall
diff -Nru talloc-2.1.5/debian/patches/pytalloc-util-name.diff talloc-2.1.5/debian/patches/pytalloc-util-name.diff
--- talloc-2.1.5/debian/patches/pytalloc-util-name.diff 1970-01-01 00:00:00.000000000 +0000
+++ talloc-2.1.5/debian/patches/pytalloc-util-name.diff 2016-02-16 16:19:02.000000000 +0000
@@ -0,0 +1,16 @@
+# Don't encode the multiarch name into the pytalloc-util library name
+
+--- talloc-2.1.5.orig/buildtools/wafsamba/samba_python.py
++++ talloc-2.1.5/buildtools/wafsamba/samba_python.py
+@@ -122,7 +122,10 @@ Build.BuildContext.SAMBA_PYTHON = SAMBA_
+
+
+ def pyembed_libname(bld, name, extrapython=False):
+- return name + bld.env['PYTHON_SO_ABI_FLAG']
++ abi_flag = bld.env['PYTHON_SO_ABI_FLAG']
++ if bld.env['IS_EXTRA_PYTHON'] and 'DEB_HOST_MULTIARCH' in os.environ:
++ abi_flag = abi_flag.replace('-%s' % os.environ['DEB_HOST_MULTIARCH'], '')
++ return name + abi_flag
+
+ Build.BuildContext.pyembed_libname = pyembed_libname
+
diff -Nru talloc-2.1.5/debian/patches/series talloc-2.1.5/debian/patches/series
--- talloc-2.1.5/debian/patches/series 2015-11-07 15:36:10.000000000 +0000
+++ talloc-2.1.5/debian/patches/series 2016-02-16 16:19:36.000000000 +0000
@@ -0,0 +1,2 @@
+pass-waf-flags.diff
+pytalloc-util-name.diff
diff -Nru talloc-2.1.5/debian/python-talloc-dev.install talloc-2.1.5/debian/python-talloc-dev.install
--- talloc-2.1.5/debian/python-talloc-dev.install 2015-11-07 15:36:10.000000000 +0000
+++ talloc-2.1.5/debian/python-talloc-dev.install 2016-02-16 13:40:29.000000000 +0000
@@ -1,3 +1,3 @@
-usr/include/pytalloc.h
+usr/include/pytalloc.h usr/include/python2.7/
usr/lib/*/pkgconfig/pytalloc-util.pc
usr/lib/*/libpytalloc-util.so
diff -Nru talloc-2.1.5/debian/python-talloc.install talloc-2.1.5/debian/python-talloc.install
--- talloc-2.1.5/debian/python-talloc.install 2015-11-08 21:08:04.000000000 +0000
+++ talloc-2.1.5/debian/python-talloc.install 2016-02-16 13:40:49.000000000 +0000
@@ -1,2 +1,2 @@
-usr/lib/python*/*-packages/talloc.so
+usr/lib/python2*/*-packages/talloc.so
usr/lib/*/libpytalloc-util.so.*
diff -Nru talloc-2.1.5/debian/python-talloc.symbols talloc-2.1.5/debian/python-talloc.symbols
--- talloc-2.1.5/debian/python-talloc.symbols 2015-11-08 21:18:54.000000000 +0000
+++ talloc-2.1.5/debian/python-talloc.symbols 2016-02-16 16:11:46.000000000 +0000
@@ -14,5 +14,3 @@
pytalloc_reference_ex@PYTALLOC_UTIL_2.0.6 2.0.6
pytalloc_steal@PYTALLOC_UTIL_2.0.6 2.0.6
pytalloc_steal_ex@PYTALLOC_UTIL_2.0.6 2.0.6
-talloc.so #PACKAGE# #MINVER#
- inittalloc@Base 2.0.6
diff -Nru talloc-2.1.5/debian/python3-talloc-dev.install talloc-2.1.5/debian/python3-talloc-dev.install
--- talloc-2.1.5/debian/python3-talloc-dev.install 1970-01-01 00:00:00.000000000 +0000
+++ talloc-2.1.5/debian/python3-talloc-dev.install 2016-02-16 13:38:39.000000000 +0000
@@ -0,0 +1,2 @@
+usr/include/pytalloc.h /usr/include/python3.5m/
+usr/lib/*/libpytalloc-util.cpython*.so
diff -Nru talloc-2.1.5/debian/python3-talloc-dev.lintian-overrides talloc-2.1.5/debian/python3-talloc-dev.lintian-overrides
--- talloc-2.1.5/debian/python3-talloc-dev.lintian-overrides 1970-01-01 00:00:00.000000000 +0000
+++ talloc-2.1.5/debian/python3-talloc-dev.lintian-overrides 2016-02-16 11:27:32.000000000 +0000
@@ -0,0 +1 @@
+python-talloc-dev binary: wrong-section-according-to-package-name python-talloc-dev => python
diff -Nru talloc-2.1.5/debian/python3-talloc.install talloc-2.1.5/debian/python3-talloc.install
--- talloc-2.1.5/debian/python3-talloc.install 1970-01-01 00:00:00.000000000 +0000
+++ talloc-2.1.5/debian/python3-talloc.install 2016-02-16 13:39:30.000000000 +0000
@@ -0,0 +1,2 @@
+usr/lib/python3/dist-packages/talloc*.so
+usr/lib/*/libpytalloc-util.cpython*.so.*
diff -Nru talloc-2.1.5/debian/python3-talloc.lintian-overrides talloc-2.1.5/debian/python3-talloc.lintian-overrides
--- talloc-2.1.5/debian/python3-talloc.lintian-overrides 1970-01-01 00:00:00.000000000 +0000
+++ talloc-2.1.5/debian/python3-talloc.lintian-overrides 2016-02-16 16:20:37.000000000 +0000
@@ -0,0 +1 @@
+python3-talloc binary: package-name-doesnt-match-sonames
diff -Nru talloc-2.1.5/debian/python3-talloc.symbols talloc-2.1.5/debian/python3-talloc.symbols
--- talloc-2.1.5/debian/python3-talloc.symbols 1970-01-01 00:00:00.000000000 +0000
+++ talloc-2.1.5/debian/python3-talloc.symbols 2016-02-16 16:11:34.000000000 +0000
@@ -0,0 +1,7 @@
+libpytalloc-util.cpython-35m.so.2 #PACKAGE# #MINVER#
+ PYTALLOC_UTIL.CPYTHON_35M_2.1.5@PYTALLOC_UTIL.CPYTHON_35M_2.1.5 2.1.5
+ pytalloc_Check@PYTALLOC_UTIL.CPYTHON_35M_2.1.5 2.1.5
+ pytalloc_GetObjectType@PYTALLOC_UTIL.CPYTHON_35M_2.1.5 2.1.5
+ pytalloc_reference_ex@PYTALLOC_UTIL.CPYTHON_35M_2.1.5 2.1.5
+ pytalloc_steal@PYTALLOC_UTIL.CPYTHON_35M_2.1.5 2.1.5
+ pytalloc_steal_ex@PYTALLOC_UTIL.CPYTHON_35M_2.1.5 2.1.5
diff -Nru talloc-2.1.5/debian/rules talloc-2.1.5/debian/rules
--- talloc-2.1.5/debian/rules 2015-11-08 21:08:04.000000000 +0000
+++ talloc-2.1.5/debian/rules 2016-02-16 17:04:43.000000000 +0000
@@ -11,32 +11,36 @@
DESTDIR=$(CURDIR)/debian/tmp
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+export DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
conf_args = --prefix=/usr --disable-rpath-install --disable-rpath --bundled-libraries=NONE
conf_args += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
conf_args += --libdir=/usr/lib/$(DEB_HOST_MULTIARCH)
+conf_args += --extra-python=python3
+conf_args += -v
export PYTHON="$(shell which `pyversions -d`)"
-export PYTHON_CONFIG=$(PYTHON)-config
%:
- dh $* --with python2
+ dh $* --parallel --with python2,python3
override_dh_python2:
dh_python2 --no-guessing-versions
override_dh_auto_configure:
- LDFLAGS="$(LDFLAGS)" PYTHON="$(PYTHON)" PYTHON_CONFIG="$(PYTHON_CONFIG)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" ./configure $(conf_args)
+ LDFLAGS="$(LDFLAGS)" PYTHON="$(PYTHON)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" ./configure $(conf_args)
override_dh_auto_build:
- $(MAKE) all
+ $(MAKE) all WAFFLAGS="-vv"
override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
LD_LIBRARY_PATH=bin/shared ./bin/talloc_testsuite
endif
+override_dh_install:
+ dh_install --list-missing
+
get-packaged-orig-source:
./debian/build-orig.sh
@@ -60,6 +64,7 @@
override_dh_strip:
dh_strip -plibtalloc2 --dbg-package=libtalloc2-dbg
dh_strip -ppython-talloc --dbg-package=python-talloc-dbg
+ dh_strip -ppython3-talloc --dbg-package=python3-talloc-dbg
override_dh_makeshlibs:
- dh_makeshlibs -- -c4
+ dh_makeshlibs -- -c3