Bug#943500: my NMU made it FTBFS

2020-12-30 Thread Martin Pitt
Hello Helmut,

Helmut Grohne [2020-12-30  8:44 +0100]:
> unfortunately, my NMU made cracklib2 FTBFS on various architectures. It
> turns out that the py_builddir_sh also needs the _PYTHON_* variables or
> it will disagree with them. I've immediately uploaded another to fix it.
> It further simplifies my previous version and simply exports then on the
> top level. That was not possible on the initial posting as their value
> differed for python 3.8, which is no longer covered.
> 
> Sorry for the FTBFS. NMU diff attached.

No worries, thanks a lot for this fix! (And yay that it's simpler now!)

Greetings,

Martin



Bug#943500: my NMU made it FTBFS

2020-12-29 Thread Helmut Grohne
Hi Jan and Martin,

unfortunately, my NMU made cracklib2 FTBFS on various architectures. It
turns out that the py_builddir_sh also needs the _PYTHON_* variables or
it will disagree with them. I've immediately uploaded another to fix it.
It further simplifies my previous version and simply exports then on the
top level. That was not possible on the initial posting as their value
differed for python 3.8, which is no longer covered.

Sorry for the FTBFS. NMU diff attached.

Helmut
diff --minimal -Nru cracklib2-2.9.6/debian/changelog 
cracklib2-2.9.6/debian/changelog
--- cracklib2-2.9.6/debian/changelog2020-12-26 13:42:43.0 +0100
+++ cracklib2-2.9.6/debian/changelog2020-12-30 08:38:46.0 +0100
@@ -1,3 +1,11 @@
+cracklib2 (2.9.6-3.4) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTBFS on various archs: The environment of py_builddir_sh needs to
+carry the _PYTHON_* variables as well.
+
+ -- Helmut Grohne   Wed, 30 Dec 2020 08:38:46 +0100
+
 cracklib2 (2.9.6-3.3) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --minimal -Nru cracklib2-2.9.6/debian/rules cracklib2-2.9.6/debian/rules
--- cracklib2-2.9.6/debian/rules2020-12-26 13:21:03.0 +0100
+++ cracklib2-2.9.6/debian/rules2020-12-29 22:40:05.0 +0100
@@ -23,6 +23,11 @@
 CRACKLIB_PACKER=/usr/sbin/cracklib-packer
 endif
 
+# The _PYTHON_* asssignments are required for cross building. Don't
+# delete them unless you verify that cross building keeps working.
+export _PYTHON_HOST_PLATFORM=$(DEB_HOST_ARCH_OS)-$(DEB_HOST_GNU_CPU)
+export 
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH)
+
 override_dh_auto_configure:
aclocal && libtoolize && automake --add-missing && autoreconf
mkdir -p $(CURDIR)/debian/buildtmp/base
@@ -34,8 +39,6 @@
--with-default-dict=/var/cache/cracklib/cracklib_dict \
--without-zlib \
CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)"
-   # The _PYTHON_* asssignments are required for cross building. Don't
-   # delete them unless you verify that cross building keeps working.
set -e; \
for i in $(PY3VERS); do \
mkdir -p $(CURDIR)/debian/buildtmp/python$$i; \
@@ -46,8 +49,6 @@
--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
--with-default-dict=/var/cache/cracklib/cracklib_dict \
--without-zlib \
-   
_PYTHON_HOST_PLATFORM=$(DEB_HOST_ARCH_OS)-$(DEB_HOST_GNU_CPU) \
-   
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH)
 \
PYTHON_PREFIX=$(call py_builddir_sh,$$i) \
PYTHON=/usr/bin/python$$i \
CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" 
LDFLAGS="$(LDFLAGS)"; \
@@ -62,8 +63,6 @@
cd $(CURDIR)/debian/buildtmp/python$$i; \
rm -rf lib; ln -s $(CURDIR)/debian/buildtmp/base/lib lib; \
cd python; \
-   _PYTHON_HOST_PLATFORM=$(DEB_HOST_ARCH_OS)-$(DEB_HOST_GNU_CPU) \
-   
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH)
 \
CFLAGS="-I$(CURDIR)/lib $(CFLAGS)" LDFLAGS="$(LDFLAGS)" 
CPPFLAGS="$(CPPFLAGS)" python$$i setup.py build ; \
done
 endif
@@ -79,8 +78,6 @@
set -e; \
for i in $(PY3VERS); do \
cd $(CURDIR)/debian/buildtmp/python$$i/python/$(call 
py_builddir_sh,$$i); \
-   _PYTHON_HOST_PLATFORM=$(DEB_HOST_ARCH_OS)-$(DEB_HOST_GNU_CPU) \
-   
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH)
 \
LD_LIBRARY_PATH=$(CURDIR)/debian/buildtmp/base/lib/.libs 
python$$i \
-c 'import cracklib; 
cracklib.test(dictpath="$(CURDIR)/debian/tmp/cracklib_dict")'; \
done
@@ -139,8 +136,6 @@
set -e; \
for i in $(PY3VERS); do \
cd $(CURDIR)/debian/buildtmp/python$$i/python; \
-   _PYTHON_HOST_PLATFORM=$(DEB_HOST_ARCH_OS)-$(DEB_HOST_ARCH) \
-   
_PYTHON_SYSCONFIGDATA_NAME=_sysconfigdata__$(DEB_HOST_ARCH_OS)_$(DEB_HOST_MULTIARCH)
 \
python$$i setup.py install --install-layout=deb --root 
$(CURDIR)/debian/python3-cracklib; \
done
 endif