[Pkg-openldap-devel] Bug#846081: openldap: FTBFS when built with dpkg-buildpackage -A (chmod: No such file or directory)

Santiago Vila sanvila at debian.org
Mon Nov 28 11:09:57 UTC 2016


Package: src:openldap
Version: 2.4.44+dfsg-1
Severity: serious
Tags: patch

Dear maintainer:

I tried to build this package in stretch with "dpkg-buildpackage -A"
(which is what the "Arch: all" autobuilder would do to build it)
but it failed:

--------------------------------------------------------------------------------
[...]
 debian/rules build-indep
dh build-indep --with autoreconf --builddirectory=/<<BUILDDIR>>/openldap-2.4.44+dfsg/debian/build --parallel
   dh_testdir -i -O--builddirectory=/<<BUILDDIR>>/openldap-2.4.44\+dfsg/debian/build -O--parallel
   dh_update_autotools_config -i -O--builddirectory=/<<BUILDDIR>>/openldap-2.4.44\+dfsg/debian/build -O--parallel
   debian/rules override_dh_autoreconf
make[1]: Entering directory '/<<BUILDDIR>>/openldap-2.4.44+dfsg'
dh_autoreconf debian/rules -- autoreconf
make[2]: Entering directory '/<<BUILDDIR>>/openldap-2.4.44+dfsg'
autoreconf -f -i . contrib/ldapc++
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
configure.in:29: warning: AC_INIT: not a literal: $OL_VERSION
configure.in:1210: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...

[... snipped ...]

make[1]: Leaving directory '/<<BUILDDIR>>/openldap-2.4.44+dfsg'
   debian/rules override_dh_install
make[1]: Entering directory '/<<BUILDDIR>>/openldap-2.4.44+dfsg'
dh_install
rm -rf /<<BUILDDIR>>/openldap-2.4.44+dfsg/debian/slapd/usr/lib/ldap/smbk5pwd*
chmod 0755 /<<BUILDDIR>>/openldap-2.4.44+dfsg/debian/slapd/usr/share/slapd/ldiftopasswd
chmod: cannot access '/<<BUILDDIR>>/openldap-2.4.44+dfsg/debian/slapd/usr/share/slapd/ldiftopasswd': No such file or directory
debian/rules:148: recipe for target 'override_dh_install' failed
make[1]: *** [override_dh_install] Error 1
make[1]: Leaving directory '/<<BUILDDIR>>/openldap-2.4.44+dfsg'
debian/rules:68: recipe for target 'binary-indep' failed
make: *** [binary-indep] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary-indep gave error exit status 2
--------------------------------------------------------------------------------

This happens because debian/slapd/[...] does not exist, because we are creating
arch-independent packages only and slapd is Arch:any.

Since everything in override_dh_install is related to slapd, the trivial fix
is to override dh_install only for arch-dependent packages, as in the patch below.

Warning: the patch is untested. To be sure, please try both "dpkg-buildpackage -A"
and "dpkg-buildpackage -B" before upload.

A slightly more elegant way would be to drop the chmod from dh_install
and put it in dh_fixperms (where it probably belongs) with a target
like this:

override_dh_fixperms-arch:
	dh_fixperms
	chmod blah blah

but this is up to you.

Please also note that we could prevent this kind of bugs from
propagating to testing by always uploading the package in source-only
form. Just do "dpkg-buildpackage -S" and upload as usual.

As a bonus, we would get official build logs here for the Arch:all
architecture, which as of now you can see it's missing:

https://buildd.debian.org/status/package.php?p=openldap

Thanks.

--- a/debian/rules
+++ b/debian/rules
@@ -141,7 +141,7 @@ endif
 		| xargs perl -pi -e 's#(\.TH \w+ 8)C#$$1#'
 
 ifeq ($(filter stage1,$(DEB_BUILD_PROFILES)),)
-override_dh_install:
+override_dh_install-arch:
 	dh_install
 	rm -rf $(CURDIR)/debian/slapd/usr/lib/ldap/smbk5pwd*
 	chmod 0755 $(CURDIR)/debian/slapd/usr/share/slapd/ldiftopasswd



More information about the Pkg-openldap-devel mailing list