FYI, the patch I had attached last time is wrong. I'd just copied and
pasted from the old one, but that used cdbs, whereas this doesn't. I
think this one should be better, though I'm no packaging expert.
Let me know if you have any comments or questions.
Thanks,
Brian
diff -u -ruN pam-ldap.bak/libpam-ldap-186/debian/changelog pam-ldap/libpam-ldap-186.cae/debian/changelog
--- pam-ldap.bak/libpam-ldap-186/debian/changelog 2016-04-09 16:14:51.000000000 -0500
+++ pam-ldap/libpam-ldap-186.cae/debian/changelog 2016-11-23 14:42:06.996563643 -0600
@@ -1,3 +1,15 @@
+libpam-ldap (186-1+caejessie3) cae-jessie-backports; urgency=medium
+
+ * Non-maintainer upload.
+ * Backporting for jessie (RT #430785).
+ * Also update debian/rules to use the old /etc/pam_ldap.conf file by default
+ instead of /etc/ldap.conf
+ * Fixup build rules for pure dh instead of cdbs.
+ * Don't let it copy the /etc/ldap.conf file in - let debconf handle that as
+ before.
+
+ -- Brian Kroth <bpkr...@gmail.com> Fri, 28 Oct 2016 17:13:57 -0500
+
libpam-ldap (186-1) unstable; urgency=medium
* New upstream release
diff -u -ruN pam-ldap.bak/libpam-ldap-186/debian/rules pam-ldap/libpam-ldap-186.cae/debian/rules
--- pam-ldap.bak/libpam-ldap-186/debian/rules 2016-04-04 00:47:35.000000000 -0500
+++ pam-ldap/libpam-ldap-186.cae/debian/rules 2016-11-23 14:42:29.804817626 -0600
@@ -1,5 +1,7 @@
#!/usr/bin/make -f
+#export DH_VERBOSE=1
+
export DEB_BUILD_MAINT_OPTIONS= hardening=+bindnow
%:
@@ -7,4 +9,30 @@
override_dh_auto_configure:
dh_auto_configure -- --libdir=/lib/$(DEB_HOST_MULTIARCH) \
- --with-ldap-lib=openldap
+ --with-ldap-lib=openldap \
+ --with-ldap-conf-file=/etc/pam_ldap.conf \
+ --with-ldap-secret-file=/etc/pam_ldap.secret
+
+override_dh_install:
+ dh_install
+
+ # remove the provided ldap.conf file from /etc
+ # (the old debian package didn't provide one directly either)
+ rm -f debian/libpam-ldap/etc/ldap.conf
+ rm -f debian/libpam-ldap/etc/pam_ldap.conf
+ # same goes for the ldap.secret file
+ rm -f debian/libpam-ldap/etc/ldap.secret
+ rm -f debian/libpam-ldap/etc/pam_ldap.secret
+ # rename man page
+ mv debian/libpam-ldap/usr/share/man/man5/pam_ldap.5 \
+ debian/libpam-ldap/usr/share/man/man5/pam_ldap.conf.5
+ # change all references from /etc/ldap.{conf,secret} to /etc/pam_ldap.{conf,secret}
+ for file in debian/libpam-ldap/usr/share/man/man5/pam_ldap.conf.5 \
+ debian/libpam-ldap/usr/share/libpam-ldap/ldap.conf \
+ debian/libpam-ldap/usr/share/doc/libpam-ldap/examples/chfn \
+ debian/libpam-ldap/usr/share/doc/libpam-ldap/examples/chsh ; do \
+ sed -e 's,ldap.conf,pam_ldap.conf,' \
+ -e 's,ldap.secret,pam_ldap.secret,' \
+ < $$file > $$file-sed; \
+ mv $$file-sed $$file; \
+ done