Source: cracklib2
Version: 2.9.2-5.2
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

cracklib2 fails to cross build from source. It crosses fine with the
nopython build profile already. The python related Build-Depends are
unsatisfiable though. Generally, one changes "python.*-dev" to
"lib&, &:any". Then the respective ./setup.py invocations still compile
for the build architecture. That's fixed by exporting the "magic
variables". Finally, tests fail. Honouring DBE_BUILD_OPTIONS=nocheck
helps here. Please consider applying the attached patch.

Helmut
diff --minimal -Nru cracklib2-2.9.2/debian/changelog 
cracklib2-2.9.2/debian/changelog
--- cracklib2-2.9.2/debian/changelog    2018-04-01 15:31:33.000000000 +0200
+++ cracklib2-2.9.2/debian/changelog    2018-11-10 15:06:23.000000000 +0100
@@ -1,3 +1,13 @@
+cracklib2 (2.9.2-5.3) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Multiarchify python Build-Depends.
+    + Tell setup.py what to cross for.
+    + Honour DEB_BUILD_OPTIONS=nocheck.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sat, 10 Nov 2018 15:06:23 +0100
+
 cracklib2 (2.9.2-5.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru cracklib2-2.9.2/debian/control 
cracklib2-2.9.2/debian/control
--- cracklib2-2.9.2/debian/control      2018-04-01 15:31:09.000000000 +0200
+++ cracklib2-2.9.2/debian/control      2018-11-10 15:06:12.000000000 +0100
@@ -14,9 +14,11 @@
                docbook-xml,
                dpkg-dev (>= 1.16.1~),
                libtool,
-               python-all-dev (>= 2.6.6-3~) <!nopython>,
+               libpython-all-dev (>= 2.6.6-3~) <!nopython>,
+               libpython3-all-dev (>= 3.1.3-2~) <!nopython>,
+               python-all-dev:any (>= 2.6.6-3~) <!nopython>,
                python-setuptools <!nopython>,
-               python3-all-dev (>= 3.1.3-2~) <!nopython>,
+               python3-all-dev:any (>= 3.1.3-2~) <!nopython>,
                python3-setuptools <!nopython>
 Homepage: http://sourceforge.net/projects/cracklib
 Vcs-Git: https://anonscm.debian.org/git/pkg-cracklib/pkg-cracklib.git
diff --minimal -Nru cracklib2-2.9.2/debian/rules cracklib2-2.9.2/debian/rules
--- cracklib2-2.9.2/debian/rules        2018-04-01 15:31:09.000000000 +0200
+++ cracklib2-2.9.2/debian/rules        2018-11-10 15:06:23.000000000 +0100
@@ -6,14 +6,17 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
-DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+include /usr/share/dpkg/architecture.mk
 
 ifeq ($(filter stage1,$(DEB_STAGE))$(filter nopython,$(DEB_BUILD_PROFILES)),)
 PYVERS := $(shell pyversions -vs)
 PY3VERS := $(shell py3versions -vs)
 DH_WITH_PARAMETERS := python2,python3,autotools_dev
+# 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)
 else
 NOPYTHON_OPTIONS = -Npython-cracklib -Npython3-cracklib
 DH_WITH_PARAMETERS := autotools_dev
@@ -64,7 +67,7 @@
 
 override_dh_auto_test:
        mkdir $(CURDIR)/debian/tmp
-ifeq ($(filter stage1,$(DEB_STAGE))$(filter nopython,$(DEB_BUILD_PROFILES)),)
+ifeq ($(filter stage1,$(DEB_STAGE))$(filter 
nopython,$(DEB_BUILD_PROFILES))$(filter nocheck,$(DEB_BUILD_OPTIONS)),)
        $(CRACKLIB_PACKER) $(CURDIR)/debian/tmp/cracklib_dict < \
         $(CURDIR)/dicts/cracklib-small
        for i in $(PYVERS) $(PY3VERS); do \

Reply via email to