From 874e9fc816a140251b12f37b1bf63a697cec34c1 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 6 Apr 2021 08:54:18 -0400 Subject: [PATCH] Fix issues with autoconf 2.70+ --- cyrus-sasl-2.1.27-fix-for-autoconf270.patch | 74 +++++++++++++++++++++ cyrus-sasl.spec | 7 +- 2 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 cyrus-sasl-2.1.27-fix-for-autoconf270.patch diff --git a/cyrus-sasl-2.1.27-fix-for-autoconf270.patch b/cyrus-sasl-2.1.27-fix-for-autoconf270.patch new file mode 100644 index 0000000..3c6e7be --- /dev/null +++ b/cyrus-sasl-2.1.27-fix-for-autoconf270.patch @@ -0,0 +1,74 @@ +From 3b0149cf3d235247b051b7cb7663bc3dadbb999b Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup +Date: Thu, 1 Apr 2021 17:17:52 +0200 +Subject: [PATCH] configure.ac: avoid side-effects in AC_CACHE_VAL + +In the COMMANDS-TO-SET-IT argument, per Autoconf docs: +https://www.gnu.org/software/autoconf/manual/autoconf-2.63/html_node/Caching-Results.html +--- + configure.ac | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index a106d35e..d333496d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -220,11 +220,14 @@ void foo() { int i=0;} + int main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY); + if(self) { ptr1=dlsym(self,"foo"); ptr2=dlsym(self,"_foo"); + if(ptr1 && !ptr2) exit(0); } exit(1); } +-], [sasl_cv_dlsym_adds_uscore=yes], sasl_cv_dlsym_adds_uscore=no +- AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, [], [Do we need a leading _ for dlsym?]), ++], [sasl_cv_dlsym_adds_uscore=yes], sasl_cv_dlsym_adds_uscore=no, + AC_MSG_WARN(cross-compiler, we'll do our best))) + LIBS="$cmu_save_LIBS" + AC_MSG_RESULT($sasl_cv_dlsym_adds_uscore) ++ ++ if test "$sasl_cv_dlsym_adds_uscore" = no; then ++ AC_DEFINE(DLSYM_NEEDS_UNDERSCORE, [], [Do we need a leading _ for dlsym?]) ++ fi + fi + fi + +From d3bcaf62f6213e7635e9c4a574f39a831e333980 Mon Sep 17 00:00:00 2001 +From: Pavel Raiskup +Date: Thu, 1 Apr 2021 17:26:28 +0200 +Subject: [PATCH] configure.ac: properly quote macro arguments + +Autoconf 2.70+ is more picky about the quotation (even though with +previous versions the arguments should have been quoted, too). When we +don't quote macros inside the AC_CACHE_VAL macro - some of the Autoconf +initialization is wrongly ordered in ./configure script and we keep +seeing bugs like: + + ./configure: line 2165: ac_fn_c_try_run: command not found + +Original report: https://bugzilla.redhat.com/1943013 +--- + configure.ac | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index d333496d..7281cba0 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -213,15 +213,16 @@ if test $sasl_cv_uscore = yes; then + AC_MSG_CHECKING(whether dlsym adds the underscore for us) + cmu_save_LIBS="$LIBS" + LIBS="$LIBS $SASL_DL_LIB" +- AC_CACHE_VAL(sasl_cv_dlsym_adds_uscore,AC_TRY_RUN( [ ++ AC_CACHE_VAL([sasl_cv_dlsym_adds_uscore], ++ [AC_TRY_RUN([ + #include + #include + void foo() { int i=0;} + int main() { void *self, *ptr1, *ptr2; self=dlopen(NULL,RTLD_LAZY); + if(self) { ptr1=dlsym(self,"foo"); ptr2=dlsym(self,"_foo"); + if(ptr1 && !ptr2) exit(0); } exit(1); } +-], [sasl_cv_dlsym_adds_uscore=yes], sasl_cv_dlsym_adds_uscore=no, +- AC_MSG_WARN(cross-compiler, we'll do our best))) ++], [sasl_cv_dlsym_adds_uscore=yes], [sasl_cv_dlsym_adds_uscore=no], ++ [AC_MSG_WARN(cross-compiler, we'll do our best)])]) + LIBS="$cmu_save_LIBS" + AC_MSG_RESULT($sasl_cv_dlsym_adds_uscore) + diff --git a/cyrus-sasl.spec b/cyrus-sasl.spec index bcf151b..25630c2 100644 --- a/cyrus-sasl.spec +++ b/cyrus-sasl.spec @@ -8,7 +8,7 @@ Summary: The Cyrus SASL library Name: cyrus-sasl Version: 2.1.27 -Release: 9%{?dist} +Release: 10%{?dist} License: BSD with advertising URL: https://www.cyrusimap.org/sasl/ @@ -38,6 +38,7 @@ Patch101: cyrus-sasl-2.1.27-Add-basic-test-infrastructure.patch Patch102: cyrus-sasl-2.1.27-Add-Channel-Binding-support-for-GSSAPI-GSS-SPNEGO.patch Patch103: cyrus-sasl-2.1.27-Add-support-for-setting-max-ssf-0-to-GSS-SPNEGO.patch Patch104: cyrus-sasl-2.1.27-Emit-debug-log-only-in-case-of-errors.patch +Patch105: cyrus-sasl-2.1.27-fix-for-autoconf270.patch BuildRequires: autoconf, automake, libtool, gdbm-devel, groff BuildRequires: krb5-devel >= 1.2.2, openssl-devel, pam-devel, pkgconfig @@ -165,6 +166,7 @@ the GS2 authentication scheme. %patch102 -p1 -b .gssapi_cbs %patch103 -p1 -b .maxssf0 %patch104 -p1 -b .nolog +%patch105 -p1 -b .autoconf270 %build # reconfigure @@ -373,6 +375,9 @@ getent passwd %{username} >/dev/null || useradd -r -g %{username} -d %{homedir} %{_sbindir}/sasl2-shared-mechlist %changelog +* Tue Apr 06 2021 Simo Sorce - 2.1.27-10 +- Fix issues with autoconf 2.70+ + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 2.1.27-9 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583.