Source: cracklib2 Version: 2.9.2-1 Tags: patch User: helm...@debian.org Usertags: rebootstrap
Dear cracklib2 maintainers, I noticed that cracklib2 fails to cross build from source. The culprit is that the cross built cracklib-packer gets executed as part of the build, but cross builds do not allow executing host arch executables. Unfortunately, cracklib-packer is both installed into cracklib-runtime and used as a build tool, so simply switching to the build arch compiler would be wrong. Instead, I am proposing to add a build dependency on "cracklib-runtime:native <cross>". The "cross" build profile ensures that during native builds there is no cyclic build dependency. The ":native" annotation ensures that the build arch version is selected. Furthermore, debian/rules need to be adapted to use /usr/sbin/cracklib-packer during cross builds. I am attaching a patch that implements the above plan. Please consider applying it. If in doubt, don't hesitate to ask for more details concerning the identified problem or the proposed solution. Helmut
diff -Nru cracklib2-2.9.2/debian/changelog cracklib2-2.9.2/debian/changelog --- cracklib2-2.9.2/debian/changelog +++ cracklib2-2.9.2/debian/changelog @@ -1,3 +1,10 @@ +cracklib2 (2.9.2-1.1) UNRELEASED; urgency=low + + * Non-maintainer upload. + * Use build arch cracklib-packer during cross compilation. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sun, 19 Jul 2015 09:06:24 +0200 + cracklib2 (2.9.2-1) unstable; urgency=medium * New upstream version (Closes: #724570) diff -Nru cracklib2-2.9.2/debian/control cracklib2-2.9.2/debian/control --- cracklib2-2.9.2/debian/control +++ cracklib2-2.9.2/debian/control @@ -8,6 +8,7 @@ automake (>= 1.10), autotools-dev, chrpath, + cracklib-runtime:native <cross>, debhelper (>= 9), docbook-utils, docbook-xml, diff -Nru cracklib2-2.9.2/debian/rules cracklib2-2.9.2/debian/rules --- cracklib2-2.9.2/debian/rules +++ cracklib2-2.9.2/debian/rules @@ -17,6 +17,12 @@ NOPYTHON_OPTIONS = -Npython-cracklib -Npython3-cracklib endif +ifeq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CRACKLIB_PACKER=$(CURDIR)/debian/buildtmp/base/util/cracklib-packer +else +CRACKLIB_PACKER=/usr/sbin/cracklib-packer +endif + override_dh_auto_configure: aclocal && libtoolize && automake --add-missing && autoreconf mkdir -p $(CURDIR)/debian/buildtmp/base @@ -57,7 +63,7 @@ override_dh_auto_test: mkdir $(CURDIR)/debian/tmp ifneq ($(DEB_STAGE),stage1) - $(CURDIR)/debian/buildtmp/base/util/cracklib-packer $(CURDIR)/debian/tmp/cracklib_dict < \ + $(CRACKLIB_PACKER) $(CURDIR)/debian/tmp/cracklib_dict < \ $(CURDIR)/dicts/cracklib-small for i in $(PYVERS) $(PY3VERS); do \ cd $(CURDIR)/debian/buildtmp/python$$i/python/$(call py_builddir_sh,$$i); \ @@ -91,7 +97,7 @@ $(CURDIR)/debian/libcrack2-udeb/usr/lib/$(DEB_HOST_MULTIARCH) cp -r $(CURDIR)/debian/libcrack2/usr/share/locale/* \ $(CURDIR)/debian/libcrack2-udeb/usr/share/locale - $(CURDIR)/debian/buildtmp/base/util/cracklib-packer $(CURDIR)/debian/libcrack2-udeb/var/cache/cracklib/cracklib_dict < \ + $(CRACKLIB_PACKER) $(CURDIR)/debian/libcrack2-udeb/var/cache/cracklib/cracklib_dict < \ $(CURDIR)/dicts/cracklib-small # move files to libcrack2-dev mkdir -p $(CURDIR)/debian/libcrack2-dev/usr/lib/$(DEB_HOST_MULTIARCH)