Bug#864328: libxml2: building for multiple supported python versions does not work
On Mon, 3 Jul 2017 06:06:25 +0800 Aron Xuwrote: > On Tue, Jun 20, 2017 at 7:16 AM, YunQiang Su wrote: > > On Thu, 15 Jun 2017 20:17:41 +0800 Aron Xu wrote: > >> Hi, > >> > >> Thanks for the report, we don't want to build for only one version of > >> Python 3 of course, will have a look later. > >> > > > > This patch should build modules for all python3 versions. > > can you reivew it? > > > > Seems the patch is malformed: > > $ patch -p1 < /tmp/python3-all.diff > patching file debian/control > patching file debian/rules > patch: malformed patch at line 80: Just remove the last hunk of the patch. It's spurious. After removing that part, the patch applies and produces a correct build. >From a local test: Package: python3-libxml2 Depends: ... python3 (<< 3.7), python3 (>= 3.5~), python3:any (>= 3.3.2-2~) Provides: python3.5-libxml2, python3.6-libxml2 ... ./ ./usr/ ./usr/lib/ ./usr/lib/python3/ ./usr/lib/python3/dist-packages/ ./usr/lib/python3/dist-packages/drv_libxml2.py ./usr/lib/python3/dist-packages/libxml2.py ./usr/lib/python3/dist-packages/libxml2mod.cpython-35m-x86_64-linux-gnu.so ./usr/lib/python3/dist-packages/libxml2mod.cpython-36m-x86_64-linux-gnu.so Also, please remove " Provides: python3.5-libxml2, python3.6-libxml2". That's never been valid for python3. It would be a help to the python3.6 transition if this could be uploaded soon. Thanks, Scott K
Bug#864328: libxml2: building for multiple supported python versions does not work
On Tue, Jun 20, 2017 at 7:16 AM, YunQiang Suwrote: > On Thu, 15 Jun 2017 20:17:41 +0800 Aron Xu wrote: >> Hi, >> >> Thanks for the report, we don't want to build for only one version of >> Python 3 of course, will have a look later. >> > > This patch should build modules for all python3 versions. > can you reivew it? > Seems the patch is malformed: $ patch -p1 < /tmp/python3-all.diff patching file debian/control patching file debian/rules patch: malformed patch at line 80: Aron
Bug#864328: libxml2: building for multiple supported python versions does not work
On Thu, 15 Jun 2017 20:17:41 +0800 Aron Xuwrote: > Hi, > > Thanks for the report, we don't want to build for only one version of > Python 3 of course, will have a look later. > This patch should build modules for all python3 versions. can you reivew it? > > Regards, > Aron Xu > > diff -ur libxml2-2.9.4+dfsg1/debian/control xxx/debian/control --- libxml2-2.9.4+dfsg1/debian/control 2017-01-14 14:07:44.0 + +++ xxx/debian/control 2017-06-19 22:56:42.447698818 + @@ -5,6 +5,7 @@ Uploaders: Aron Xu , YunQiang Su Standards-Version: 3.9.8 Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, pkg-config, + dh-python, libpython-all-dev, libpython-all-dbg, python-all-dev:any (>= 2.7.5-5~), python-all-dbg:any, libpython3-all-dev, libpython3-all-dbg, diff -ur libxml2-2.9.4+dfsg1/debian/rules xxx/debian/rules --- libxml2-2.9.4+dfsg1/debian/rules2017-01-14 14:07:44.0 + +++ xxx/debian/rules2017-06-19 23:10:31.299451679 + @@ -43,9 +43,10 @@ doconfigure-%: debian/autoreconf.after dh_auto_configure --parallel --builddirectory=builddir/$(*) -- $(CONFIGURE_FLAGS) + touch $@ doconfigure-main: CONFIGURE_FLAGS += --without-python --with-icu -doconfigure-python%: CONFIGURE_FLAGS += --with-python=/usr/bin/$(*) +doconfigure-python%: CONFIGURE_FLAGS += --with-python=/usr/bin/$(subst -dbg,,$(*)) --with-python-install-dir=/usr/lib/$(subst -dbg,,$(*))/dist-packages #doconfigure-udeb: CONFIGURE_FLAGS += --without-history --with-minimum --with-tree --with-output doconfigure-udeb: CONFIGURE_FLAGS += --without-history --with-tree --with-output --without-python --without-icu @@ -54,7 +55,7 @@ $(if $(filter $(BUILD_DIR),builddir/$(*)),,[ -d $(BUILD_DIR) ] || mv builddir/$(*)/python $(BUILD_DIR)) dh_auto_build --parallel --builddirectory=$(BUILD_DIR) -- $(BUILD_FLAGS) -dobuild-python%: BUILD_DIR=builddir/main/$(*) +dobuild-python%: BUILD_DIR=builddir/$(*) dobuild-python%: BUILD_FLAGS=libxml2mod_la_LIBADD='$$(mylibs)' \ PYTHON_INCLUDES='$(shell $(DEB_HOST_GNU_TYPE)-$(*)-config --includes)' \ PYTHON_LIBS='$(shell $(DEB_HOST_GNU_TYPE)-$(*)-config --ldflags)' @@ -70,6 +71,7 @@ override_dh_auto_clean: rm -rf builddir debian/tmp-dbg debian/tmp-udeb + rm -f doconfigure-* dh_auto_clean override_dh_auto_install-arch: $(TARGETS:%=doinstall-%) @@ -100,11 +102,11 @@ doc/tutorial debian/tmp/usr/share/doc/libxml2-doc doinstall-python%-dbg: - $(MAKE) -C builddir/main/python$(*)-dbg DESTDIR=$(CURDIR)/debian/tmp-dbg install-pythonLTLIBRARIES + $(MAKE) -C builddir/python$(*)-dbg/python DESTDIR=$(CURDIR)/debian/tmp-dbg install-pythonLTLIBRARIES prename -vf 's/(? /dev/null 2>&1; then \ - rm -f $(python)/libxml2mod.so; \ - ln -s ../$(PYVER)/libxml2mod.so $(python)/libxml2mod.so; \ - fi;) - $(foreach python3, $(filter-out $(PY3VER), $(PY3VERS)),\ - cd $(CURDIR)/debian/python3-libxml2/usr/lib/pyshared; \ - if diff $(python3)/libxml2mod.so $(PYVER)/libxml2mod.so > /dev/null 2>&1; then \ - rm -f $(python3)/libxml2mod.so; \ - ln -s ../$(PY3VER)/libxml2mod.so $(python3)/libxml2mod.so; \ - fi;) dh_strip -Npython-libxml2-dbg -Npython3-libxml2-dbg override_dh_makeshlibs: @@ -163,3 +153,4 @@ else dh $@ --parallel --with autoreconf,python2,python3 endif
Bug#864328: libxml2: building for multiple supported python versions does not work
Hi, Thanks for the report, we don't want to build for only one version of Python 3 of course, will have a look later. Regards, Aron Xu
Bug#864328: libxml2: building for multiple supported python versions does not work
Source: libxml2 Severity: normal Tags: patch User: debian-pyt...@lists.debian.org Dear Maintainer, Apologies for the slightly vague report. It turns out that when multiple python versions are supported, the resulting python3-libxml package only contains the extension module for the default version. Rather than try to figure out what is going on, I just uploaded a change to Ubuntu that does not try at all to support multiple supported versions of Python 3 (attached, but I guess that's not really acceptable for Debian). Cheers, mwh -- System Information: Debian Release: stretch/sid APT prefers xenial-updates APT policy: (500, 'xenial-updates'), (500, 'xenial-security'), (500, 'xenial'), (400, 'xenial-proposed'), (100, 'xenial-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.4.0-78-generic (SMP w/4 CPU cores) Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -- no debconf information diff -Nru libxml2-2.9.4+dfsg1/debian/changelog libxml2-2.9.4+dfsg1/debian/changelog --- libxml2-2.9.4+dfsg1/debian/changelog 2017-05-11 23:47:33.0 + +++ libxml2-2.9.4+dfsg1/debian/changelog 2017-05-16 03:02:59.0 + @@ -1,3 +1,9 @@ +libxml2 (2.9.4+dfsg1-2.2ubuntu1) artful; urgency=medium + + * Only build for the default version of Python. + + -- Michael Hudson-DoyleTue, 16 May 2017 14:45:03 +1200 + libxml2 (2.9.4+dfsg1-2.2build1) artful; urgency=medium * No change rebuild to add Python 3.6 support. diff -Nru libxml2-2.9.4+dfsg1/debian/control libxml2-2.9.4+dfsg1/debian/control --- libxml2-2.9.4+dfsg1/debian/control 2017-01-14 14:07:44.0 + +++ libxml2-2.9.4+dfsg1/debian/control 2017-05-16 03:02:36.0 + @@ -1,14 +1,15 @@ Source: libxml2 Priority: optional Section: libs -Maintainer: Debian XML/SGML Group +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian XML/SGML Group Uploaders: Aron Xu , YunQiang Su Standards-Version: 3.9.8 Build-Depends: debhelper (>= 9), dh-autoreconf, autotools-dev, pkg-config, libpython-all-dev, libpython-all-dbg, python-all-dev:any (>= 2.7.5-5~), python-all-dbg:any, - libpython3-all-dev, libpython3-all-dbg, - python3-all-dev:any (>= 3.5), python3-all-dbg:any, + libpython3-dev, libpython3-dbg, + python3-dev:any (>= 3.5), python3-dbg:any, zlib1g-dev | libz-dev, liblzma-dev, libicu-dev Homepage: http://xmlsoft.org/ Vcs-Git: git://anonscm.debian.org/debian-xml-sgml/libxml2.git diff -Nru libxml2-2.9.4+dfsg1/debian/rules libxml2-2.9.4+dfsg1/debian/rules --- libxml2-2.9.4+dfsg1/debian/rules 2017-01-14 14:07:44.0 + +++ libxml2-2.9.4+dfsg1/debian/rules 2017-05-16 02:45:46.0 + @@ -7,6 +7,8 @@ # The current default version of python PYVER=$(shell pyversions -d) PY3VER=$(shell py3versions -d) +# Pretend the default version of Python 3 is the only supported version for now. +PY3VERS=$(PY3VER) export DEB_BUILD_MAINT_OPTIONS=hardening=+all DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)