Source: olm Version: 2.2.2+git20170526.0fd768e+dfsg-1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
olm fails to cross build from source, because its Build-Depends request the host architecture python and that fails to install. Looking deeper, one sees that python is used in two capacities: Once for running rst2html and also for creating python-olm. The latter is only necessary for indep builds and the former wants the build architecture python. So we can shrink the problem by removing python-olm from the arch-only build. Doing so allows demoting python-all-dev to Build-Depends-Indep, which is irrelevant to cross building. The attached patch implements the moving of Build-Depends. Using diffoscope and reproducible builds I verified that the resulting .debs do not vary accross full builds arch-only builds or indep-only builds. Please close this bug when removing python-all-dev from Build-Depends even though that might not be sufficient for making olm cross buildable. In case of further issues, I shall file further bug reports. Helmut
diff --minimal -Nru olm-2.2.2+git20170526.0fd768e+dfsg/debian/changelog olm-2.2.2+git20170526.0fd768e+dfsg/debian/changelog --- olm-2.2.2+git20170526.0fd768e+dfsg/debian/changelog 2017-06-13 01:18:18.000000000 +0200 +++ olm-2.2.2+git20170526.0fd768e+dfsg/debian/changelog 2018-10-16 05:49:58.000000000 +0200 @@ -1,3 +1,10 @@ +olm (2.2.2+git20170526.0fd768e+dfsg-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Demote python dependencies to Build-Depends-Indep. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Tue, 16 Oct 2018 05:49:58 +0200 + olm (2.2.2+git20170526.0fd768e+dfsg-1) unstable; urgency=medium * Initial release (Closes: #847566) diff --minimal -Nru olm-2.2.2+git20170526.0fd768e+dfsg/debian/control olm-2.2.2+git20170526.0fd768e+dfsg/debian/control --- olm-2.2.2+git20170526.0fd768e+dfsg/debian/control 2017-06-13 01:17:56.000000000 +0200 +++ olm-2.2.2+git20170526.0fd768e+dfsg/debian/control 2018-10-16 05:49:56.000000000 +0200 @@ -1,7 +1,8 @@ Source: olm Priority: optional Maintainer: Hubert Chathi <uho...@debian.org> -Build-Depends: debhelper (>=9), dh-python, python-all-dev (>= 2.6.6-3~), python-docutils, python-pygments +Build-Depends: debhelper (>=9), python-docutils, python-pygments +Build-Depends-Indep: dh-python, python-all-dev (>= 2.6.6-3~), Standards-Version: 3.9.8 Section: libs Homepage: https://matrix.org/git/olm/ diff --minimal -Nru olm-2.2.2+git20170526.0fd768e+dfsg/debian/rules olm-2.2.2+git20170526.0fd768e+dfsg/debian/rules --- olm-2.2.2+git20170526.0fd768e+dfsg/debian/rules 2017-06-12 20:58:31.000000000 +0200 +++ olm-2.2.2+git20170526.0fd768e+dfsg/debian/rules 2018-10-16 05:47:37.000000000 +0200 @@ -14,16 +14,19 @@ #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed %: - dh $@ --with python2 + dh $@ $(DH_ADDONS) +build binary %-indep: DH_ADDONS=--with=python2 override_dh_auto_build: make make doc -override_dh_auto_install: +override_dh_auto_install-arch: dh_auto_install -- PREFIX=/usr mkdir debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) mv debian/tmp/usr/lib/libolm* debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/ + +override_dh_auto_install-indep: for v in `pyversions -vr`; do \ mkdir -p debian/python-olm/usr/lib/python$$v/dist-packages; \ cp -r python/olm debian/python-olm/usr/lib/python$$v/dist-packages; \