Source: cyrus-sasl2 Version: 2.1.27+dfsg-1 Severity: important Tags: patch cyrus-sasl2 fails to cross build from source for multiple reasons. The immediate reason is that its Build-Depends are unsatisfiable. In particular, python3-sphinx and libpod-pom-view-restructured-perl are problematic due to the multiarch interpreter problem. Since a while, we're entitled to annotate such dependencies with :native.
After doing so, the full build (with no profiles set) fails detecting whether GSSAPI supports SPNEGO. Others ran into this problem already: * http://lists.openembedded.org/pipermail/openembedded-devel/2013-June/091202.html * https://lists.andrew.cmu.edu/pipermail/cyrus-sasl/2016-October/002906.html While the OE folks produced a patch, they didn't make it upstreamable. I think we can do better. The attached proposes using AC_CACHE_CHECK (which is good practise for any AC_TRY_RUN) and should be upstreamable. The debian/rules is updated to pass the cache variable for cross building and validate it during native builds. Please consider applying the attached patch. Helmut
diff --minimal -Nru cyrus-sasl2-2.1.27+dfsg/debian/changelog cyrus-sasl2-2.1.27+dfsg/debian/changelog --- cyrus-sasl2-2.1.27+dfsg/debian/changelog 2019-01-22 09:53:59.000000000 +0100 +++ cyrus-sasl2-2.1.27+dfsg/debian/changelog 2019-05-06 15:14:31.000000000 +0200 @@ -1,3 +1,13 @@ +cyrus-sasl2 (2.1.27+dfsg-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Annotate documentation Build-Depends with :native. + + cross.patch: Support caching SPNEGO support test. + + Provide and validate SPNEGO support test result. + + -- Helmut Grohne <[email protected]> Mon, 06 May 2019 15:14:31 +0200 + cyrus-sasl2 (2.1.27+dfsg-1) unstable; urgency=medium [ Ryan Tandy ] diff --minimal -Nru cyrus-sasl2-2.1.27+dfsg/debian/control cyrus-sasl2-2.1.27+dfsg/debian/control --- cyrus-sasl2-2.1.27+dfsg/debian/control 2019-01-22 09:53:59.000000000 +0100 +++ cyrus-sasl2-2.1.27+dfsg/debian/control 2019-05-06 15:14:30.000000000 +0200 @@ -18,12 +18,12 @@ libkrb5-dev <!pkg.cyrus-sasl2.nogssapi>, libldap2-dev <!pkg.cyrus-sasl2.noldap>, libpam0g-dev, - libpod-pom-view-restructured-perl, + libpod-pom-view-restructured-perl:native, libpq-dev <!pkg.cyrus-sasl2.nosql>, libsqlite3-dev, libssl-dev, po-debconf, - python3-sphinx, + python3-sphinx:native, quilt Build-Conflicts: heimdal-dev Vcs-Browser: https://salsa.debian.org/debian/cyrus-sasl2 diff --minimal -Nru cyrus-sasl2-2.1.27+dfsg/debian/patches/cross.patch cyrus-sasl2-2.1.27+dfsg/debian/patches/cross.patch --- cyrus-sasl2-2.1.27+dfsg/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100 +++ cyrus-sasl2-2.1.27+dfsg/debian/patches/cross.patch 2019-05-06 15:14:31.000000000 +0200 @@ -0,0 +1,35 @@ +--- cyrus-sasl2-2.1.27+dfsg.orig/m4/sasl2.m4 ++++ cyrus-sasl2-2.1.27+dfsg/m4/sasl2.m4 +@@ -314,10 +314,10 @@ + fi + LIBS="$cmu_save_LIBS" + +- cmu_save_LIBS="$LIBS" +- LIBS="$LIBS $GSSAPIBASE_LIBS" +- AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries]) +- AC_TRY_RUN([ ++ AC_CACHE_CHECK([for SPNEGO support in GSSAPI libraries],[ac_cv_gssapi_supports_spnego],[ ++ cmu_save_LIBS="$LIBS" ++ LIBS="$LIBS $GSSAPIBASE_LIBS" ++ AC_TRY_RUN([ + #ifdef HAVE_GSSAPI_H + #include <gssapi.h> + #else +@@ -338,11 +338,12 @@ + + return (!have_spnego); // 0 = success, 1 = failure + } +-], +- [ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) +- AC_MSG_RESULT(yes) ], +- AC_MSG_RESULT(no)) +- LIBS="$cmu_save_LIBS" ++],[ac_cv_gssapi_supports_spnego=yes],[ac_cv_gssapi_supports_spnego=no]) ++ LIBS="$cmu_save_LIBS" ++ ]) ++ AS_IF([test "$ac_cv_gssapi_supports_spnego" = yes],[ ++ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) ++ ]) + + else + AC_MSG_RESULT([disabled]) diff --minimal -Nru cyrus-sasl2-2.1.27+dfsg/debian/patches/series cyrus-sasl2-2.1.27+dfsg/debian/patches/series --- cyrus-sasl2-2.1.27+dfsg/debian/patches/series 2019-01-22 09:53:59.000000000 +0100 +++ cyrus-sasl2-2.1.27+dfsg/debian/patches/series 2019-05-06 15:14:31.000000000 +0200 @@ -18,3 +18,4 @@ 0033-cross.patch 0019-Stop-importing-docutils_version-in-sphinx-build-manp.patch 0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch +cross.patch diff --minimal -Nru cyrus-sasl2-2.1.27+dfsg/debian/rules cyrus-sasl2-2.1.27+dfsg/debian/rules --- cyrus-sasl2-2.1.27+dfsg/debian/rules 2019-01-22 09:53:59.000000000 +0100 +++ cyrus-sasl2-2.1.27+dfsg/debian/rules 2019-05-06 15:14:31.000000000 +0200 @@ -26,6 +26,11 @@ -include /usr/share/dpkg/buildtools.mk export CC +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) +# Debian's GSSAPI is known to support SPNEGO. +export ac_cv_gssapi_supports_spnego=yes +endif + # see FEATURE AREAS in dpkg-buildflags(1) #export DEB_BUILD_MAINT_OPTIONS = hardening=+all @@ -147,10 +152,12 @@ LDFLAGS="$(LDFLAGS) $(HEIMDAL_LDFLAGS)" \ CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) $(HEIMDAL_CPPFLAGS)" \ dh_auto_configure -B$(TMPBUILD_HEIMDAL) -- $(CONFIGURE_COMMON_OPTIONS) --with-gss_impl=heimdal + grep -q ac_cv_gssapi_supports_spnego=yes $(TMPBUILD_HEIMDAL)/config.cache LDFLAGS="$(LDFLAGS) $(MIT_LDFLAGS)" \ CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS) $(MIT_CPPFLAGS)" \ dh_auto_configure -B$(TMPBUILD_MIT) -- $(CONFIGURE_COMMON_OPTIONS) --with-gss_impl=mit + grep -q ac_cv_gssapi_supports_spnego=yes $(TMPBUILD_MIT)/config.cache # Record the build-time settings for later reference echo 'To build this package, configure was called as follows:' \

