Source: sudo Version: 1.8.17p1-2 Tags: patch User: helm...@debian.org Usertags: rebootstrapp
sudo fails to cross build from source, because it configures for the build architecture. The --host flag required for cross compilation is missing. I propose indirecting the explicit configure invocation through dh_auto_configure, which (among other things) knows when and how to pass --host. Further down the road, it runs the test suite unconditionally even when building with DEB_BUILD_OPTIONS=nocheck. Since test suite usually cannot be run during cross compilation and sudo ignores DEB_BUILD_OPTIONS=nocheck, this makes the build fail. The attached patch addresses both problems and makes cross building sudo succeed. Please consider applying it. Helmut
diff --minimal -Nru sudo-1.8.17p1/debian/changelog sudo-1.8.17p1/debian/changelog --- sudo-1.8.17p1/debian/changelog 2016-07-05 16:45:50.000000000 +0200 +++ sudo-1.8.17p1/debian/changelog 2016-12-05 21:26:35.000000000 +0100 @@ -1,3 +1,12 @@ +sudo (1.8.17p1-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_configure pass --host to configure + + Honour DEB_BUILD_OPTIONS=nocheck + + -- Helmut Grohne <hel...@subdivi.de> Mon, 05 Dec 2016 21:26:35 +0100 + sudo (1.8.17p1-2) unstable; urgency=medium * merge 1.8.15-1.1 NMU changes diff --minimal -Nru sudo-1.8.17p1/debian/rules sudo-1.8.17p1/debian/rules --- sudo-1.8.17p1/debian/rules 2016-07-05 16:45:50.000000000 +0200 +++ sudo-1.8.17p1/debian/rules 2016-12-05 21:26:31.000000000 +0100 @@ -27,10 +27,10 @@ cp -f /usr/share/misc/config.guess config.guess # simple version - mkdir -p build-simple - cd build-simple && NROFFPROG=/usr/bin/nroff CFLAGS="$(CFLAGS)" \ - CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(CURDIR)/configure \ - --prefix=/usr -v \ + NROFFPROG=/usr/bin/nroff CFLAGS="$(CFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + dh_auto_configure --builddirectory=build-simple -- \ + -v \ --with-all-insults \ --with-pam \ --with-fqdn \ @@ -45,16 +45,15 @@ --disable-root-mailer \ --with-sendmail=/usr/sbin/sendmail \ --with-rundir=/var/lib/sudo \ - --mandir=/usr/share/man \ --libexecdir=/usr/lib/sudo \ --with-sssd --with-sssd-lib=/usr/lib/$(DEB_HOST_MULTIARCH) \ $(configure_args) # LDAP version - mkdir -p build-ldap - cd build-ldap && NROFFPROG=/usr/bin/nroff CFLAGS="$(CFLAGS)" \ - CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(CURDIR)/configure \ - --prefix=/usr -v \ + NROFFPROG=/usr/bin/nroff CFLAGS="$(CFLAGS)" \ + CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \ + dh_auto_configure --builddirectory=build-ldap -- \ + -v \ --with-all-insults \ --with-pam \ --with-ldap \ @@ -72,7 +71,6 @@ --with-sendmail=/usr/sbin/sendmail \ --with-rundir=/var/lib/sudo \ --with-ldap-conf-file=/etc/sudo-ldap.conf \ - --mandir=/usr/share/man \ --libexecdir=/usr/lib/sudo \ $(configure_args) @@ -87,7 +85,9 @@ $(MAKE) -C build-simple $(MAKE) -C build-ldap +ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) $(MAKE) -C build-simple check +endif touch build-stamp