[pkg-gnupg-maint] Bug#912898: gpgme1.0 FTCBFS: python issues

Helmut Grohne helmut at subdivi.de
Sun Nov 4 18:52:43 GMT 2018


Source: gpgme1.0
Version: 1.12.0-4
Tags: patch
User: helmutg at debian.org
Usertags: rebootstrap

gpgme1.0 fails to cross build from source. All of the reasons relate to
Python. The rest of gpgme1.0 cross builds just fine with no changes
needed.

The first problem are the Build-Depends. Rather than "pythonX.Y-dev",
one needs to depend on "libpythonX.Y-dev, pythonX.Y-dev:any". Then, the
relevant setup.py is invoked by the respective subdirectory Makefile
rather than say pybuild. The ways to tell setup.py (as implemented by
pybuild) can be described as arcane at best. The respective environment
variables and their values are anything but obvious.

In any case, the attached patch makes gpgme1.0 cross buildable. Please
consider applying it. If you have any idea on how to improve the
interface to Python here, please tell.

Helmut
-------------- next part --------------
diff --minimal -Nru gpgme1.0-1.12.0/debian/changelog gpgme1.0-1.12.0/debian/changelog
--- gpgme1.0-1.12.0/debian/changelog	2018-10-18 17:54:17.000000000 +0200
+++ gpgme1.0-1.12.0/debian/changelog	2018-11-04 17:34:40.000000000 +0100
@@ -1,3 +1,12 @@
+gpgme1.0 (1.12.0-4.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Update Python Build-Depends for cross compilation.
+    + Export Python's fancy cross compilation variables.
+
+ -- Helmut Grohne <helmut at subdivi.de>  Sun, 04 Nov 2018 17:34:40 +0100
+
 gpgme1.0 (1.12.0-4) unstable; urgency=medium
 
   * no need to clean up build-py3.7 any longer
diff --minimal -Nru gpgme1.0-1.12.0/debian/control gpgme1.0-1.12.0/debian/control
--- gpgme1.0-1.12.0/debian/control	2018-10-18 06:39:56.000000000 +0200
+++ gpgme1.0-1.12.0/debian/control	2018-11-04 17:34:38.000000000 +0100
@@ -14,9 +14,11 @@
  gpgsm,
  libassuan-dev (>= 2.4.2),
  libgpg-error-dev (>= 1.24),
+ libpython-all-dev,
+ libpython3-all-dev,
  pkg-config,
- python-all-dev,
- python3-all-dev,
+ python-all-dev:any,
+ python3-all-dev:any,
  qtbase5-dev,
  scdaemon,
  swig,
diff --minimal -Nru gpgme1.0-1.12.0/debian/rules gpgme1.0-1.12.0/debian/rules
--- gpgme1.0-1.12.0/debian/rules	2018-10-18 06:44:02.000000000 +0200
+++ gpgme1.0-1.12.0/debian/rules	2018-11-04 17:34:40.000000000 +0100
@@ -3,6 +3,14 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export QT_SELECT := qt5
 
+include /usr/share/dpkg/architecture.mk
+
+# python2.7
+export PYTHONPATH:=/usr/lib/python2.7/plat-$(DEB_HOST_MULTIARCH)$(if $(PYTHONPATH),:$(PYTHONPATH))
+# python3.X, see pybuild for their meaning.
+export _PYTHON_HOST_PLATFORM:=${DEB_HOST_ARCH_OS}-${DEB_HOST_ARCH}
+export _PYTHON_SYSCONFIGDATA_NAME:=_sysconfigdata_m_${DEB_HOST_ARCH_OS}_${DEB_HOST_MULTIARCH}
+
 %:
 	dh $@ --builddirectory=build --with python2,python3
 


More information about the pkg-gnupg-maint mailing list