Source: nss-pam-ldapd
Version: 0.9.13-2
Tags: patch
User: [email protected]
Usertags: cross-satisfiability

nss-pam-ldapd cannot be cross built from source, because a number of
Build-Depends relating to Python cannot be satisfied in a cross build
setting. Instead of figuring out how to satisfy them, I recognize that
they are needed for building Architecture: all packages. In disabling
Python-related build steps in an arch-only build all those dependencies
can be avoided. Please find a patch implementing this attached. I used
reproducible builds to verify that a full build with all those steps
enabled reproduces the artifacts from a modified arch-only build.
Therefore, I do not anticipate any regressions from this transformation. 
Besides speeding up arch-only builds, it is sufficient to make cross
Build-Depends satisfiable. It turns out that this is sufficient to fully
cross build nss-pam-ldapd without further modifications. Please consider
applying the attached patch.

This patch submission is compensated by Freexian SARL.

Helmut
diff -Nru nss-pam-ldapd-0.9.13/debian/changelog 
nss-pam-ldapd-0.9.13/debian/changelog
--- nss-pam-ldapd-0.9.13/debian/changelog       2025-11-09 13:33:04.000000000 
+0100
+++ nss-pam-ldapd-0.9.13/debian/changelog       2026-05-05 09:34:31.000000000 
+0200
@@ -1,3 +1,11 @@
+nss-pam-ldapd (0.9.13-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Fully separate the indep build and thus move Python
+    build-depends to Build-Depends-Indep. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Tue, 05 May 2026 09:34:31 +0200
+
 nss-pam-ldapd (0.9.13-2) unstable; urgency=medium
 
   [ Carles Pina i Estany ]
diff -Nru nss-pam-ldapd-0.9.13/debian/control 
nss-pam-ldapd-0.9.13/debian/control
--- nss-pam-ldapd-0.9.13/debian/control 2025-11-09 13:33:04.000000000 +0100
+++ nss-pam-ldapd-0.9.13/debian/control 2026-05-05 09:34:31.000000000 +0200
@@ -5,7 +5,8 @@
 Standards-Version: 4.7.2
 Build-Depends: debhelper-compat (=13), libkrb5-dev, libldap2-dev,
                libsasl2-dev, po-debconf (>= 0.5.0), docbook2x, docbook-xml,
-               libpam0g-dev, dh-python, python3, python3-daemon, python3-ldap,
+               libpam0g-dev,
+Build-Depends-Indep: dh-sequence-python3, python3, python3-daemon, 
python3-ldap,
                python3-pyasn1, python3-pyasn1-modules
 Homepage: https://arthurdejong.org/nss-pam-ldapd/
 Vcs-Git: https://salsa.debian.org/debian/nss-pam-ldapd.git
diff -Nru nss-pam-ldapd-0.9.13/debian/rules nss-pam-ldapd-0.9.13/debian/rules
--- nss-pam-ldapd-0.9.13/debian/rules   2025-11-09 13:33:04.000000000 +0100
+++ nss-pam-ldapd-0.9.13/debian/rules   2026-05-05 09:34:31.000000000 +0200
@@ -9,7 +9,7 @@
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
 
 %:
-       dh $@ --with python3
+       dh $@
 
 # pass extra flags to configure
 override_dh_auto_configure:
@@ -17,8 +17,10 @@
                    --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
                    
--with-pam-seclib-dir=/usr/lib/$(DEB_HOST_MULTIARCH)/security \
                    --enable-warnings \
-                   --enable-pynslcd \
-                   PYTHON=python3
+                   $(if $(filter pynslcd nslcd-utils,$(shell 
dh_listpackages)), \
+                           --enable-pynslcd \
+                           PYTHON=python3 \
+                   )
 
 # run the tests but ignore the results
 override_dh_auto_test:
@@ -29,11 +31,9 @@
 endif
 
 # generate a pynslcd init script on the fly
-override_dh_installinit:
+execute_before_dh_installinit-indep:
        sed 's/^\(# Provides: *\|NSLCD_NAME=\)nslcd/\1pynslcd/' 
debian/nslcd.init > debian/pynslcd.init
-       dh_installinit
 
 # generate a pynslcd unit file on the fly
-override_dh_installsystemd:
+execute_before_dh_installsystemd-indep:
        sed 's%nslcd%pynslcd%g;s%/run/pynslcd/pynslcd%/run/nslcd/nslcd%' 
debian/nslcd.service > debian/pynslcd.service
-       dh_installsystemd

Reply via email to