cyrus-sasl: Update to 2.1.27-rc7

This update also fixes build failures with openSSL 1.1.x
Drop patches which are not required anymore
Backport a proposed patch to fix build on musl
Readjust configure options since some of the options are not available
anymore

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2018-09-04 10:57:21 -07:00
parent 45d78539ae
commit 277bd39c43
7 changed files with 90 additions and 106 deletions
@@ -0,0 +1,28 @@
From 98082f81da1b49876081ff1ab340e952755f985a Mon Sep 17 00:00:00 2001
From: OBATA Akio <obache@users.noreply.github.com>
Date: Fri, 11 May 2018 18:36:26 +0900
Subject: [PATCH] configure.ac: fix condition for suppliment snprintf
implementation
$sasl_cv_snprintf means requremnt of suppliment snprintf
implementation, not existence of system snprintf implementation,
Upstream-Status: Submitted [https://github.com/cyrusimap/cyrus-sasl/pull/512]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index ac59f14..9804e98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1264,7 +1264,7 @@ SNPRINTFOBJS=""
LTSNPRINTFOBJS=""
AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF,[],[Does the system have snprintf()?])], [sasl_cv_snprintf=yes])
AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF,[],[Does the system have vsnprintf()?])], [sasl_cv_snprintf=yes])
-if test $sasl_cv_snprintf = no; then
+if test $sasl_cv_snprintf = yes; then
AC_LIBOBJ(snprintf)
SNPRINTFOBJS="snprintf.o"
LTSNPRINTFOBJS="snprintf.lo"
@@ -1,25 +1,26 @@
Fix hardcoded libdir. From 188ad4497947259811ad32faeee95c20f9a44046 Mon Sep 17 00:00:00 2001
From: "Roy.Li" <rongqing.li@windriver.com>
Date: Fri, 19 Jul 2013 14:29:31 +0800
Subject: [PATCH] Fix hardcoded libdir.
Upstream-Status: Pending Upstream-Status: Pending
Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
--- ---
plugins/Makefile.am | 2 +- plugins/Makefile.am | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/Makefile.am b/plugins/Makefile.am diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index b00915f..25262a1 100644 index 2b02a52..929f6a4 100644
--- a/plugins/Makefile.am --- a/plugins/Makefile.am
+++ b/plugins/Makefile.am +++ b/plugins/Makefile.am
@@ -62,7 +62,7 @@ plugindir = @plugindir@ @@ -65,7 +65,7 @@ LIB_MYSQL = @LIB_MYSQL@
common_sources = plugin_common.c plugin_common.h plugindir = @plugindir@
-sasldir = $(prefix)/lib/sasl2 -sasldir = $(prefix)/lib/sasl2
+sasldir = $(libdir)/sasl2 +sasldir = $(libdir)/sasl2
sasl_LTLIBRARIES = @SASL_MECHS@ sasl_LTLIBRARIES = @SASL_MECHS@
EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \ EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \
libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \ libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \
--
1.7.4.1
@@ -1,4 +1,7 @@
Avoid to call AC_TRY_RUN From 288430d3c2d3f36a4c9d40c4fffa85288f44549a Mon Sep 17 00:00:00 2001
From: "Roy.Li" <rongqing.li@windriver.com>
Date: Tue, 25 Jun 2013 09:22:59 +0800
Subject: [PATCH] Avoid to call AC_TRY_RUN
Upstream-Status: Inappropriate [configuration] Upstream-Status: Inappropriate [configuration]
@@ -6,18 +9,20 @@ Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO
on cross-compile environment by definition AC_ARG_ENABLE enable-spnego on cross-compile environment by definition AC_ARG_ENABLE enable-spnego
Signed-off-by: Roy.Li <rongqing.li@windriver.com> Signed-off-by: Roy.Li <rongqing.li@windriver.com>
---
cmulocal/sasl2.m4 | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/cmulocal/sasl2.m4 b/cmulocal/sasl2.m4 ---
index 3c2841a..a5ecf81 100644 m4/sasl2.m4 | 15 +++++++++++++--
--- a/cmulocal/sasl2.m4 1 file changed, 13 insertions(+), 2 deletions(-)
+++ b/cmulocal/sasl2.m4
@@ -281,6 +281,17 @@ if test "$gssapi" != no; then diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
index 56e0504..cf62607 100644
--- a/m4/sasl2.m4
+++ b/m4/sasl2.m4
@@ -314,7 +314,18 @@ if test "$gssapi" != no; then
cmu_save_LIBS="$LIBS" cmu_save_LIBS="$LIBS"
LIBS="$LIBS $GSSAPIBASE_LIBS" LIBS="$LIBS $GSSAPIBASE_LIBS"
- AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
+ AC_ARG_ENABLE([spnego], + AC_ARG_ENABLE([spnego],
+ [AC_HELP_STRING([--enable-spnego=<DIR>], + [AC_HELP_STRING([--enable-spnego=<DIR>],
+ [enable SPNEGO support in GSSAPI libraries [no]])], + [enable SPNEGO support in GSSAPI libraries [no]])],
@@ -29,10 +34,11 @@ index 3c2841a..a5ecf81 100644
+ elif test "$spnego" = yes; then + elif test "$spnego" = yes; then
+ AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) + AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO])
+ else + else
AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries]) + AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries])
AC_TRY_RUN([ AC_TRY_RUN([
#ifdef HAVE_GSSAPI_H #ifdef HAVE_GSSAPI_H
@@ -308,7 +319,7 @@ int main(void) #include <gssapi.h>
@@ -341,7 +352,7 @@ int main(void)
AC_MSG_RESULT(yes) ], AC_MSG_RESULT(yes) ],
AC_MSG_RESULT(no)) AC_MSG_RESULT(no))
LIBS="$cmu_save_LIBS" LIBS="$cmu_save_LIBS"
@@ -41,6 +47,3 @@ index 3c2841a..a5ecf81 100644
else else
AC_MSG_RESULT([disabled]) AC_MSG_RESULT([disabled])
fi fi
--
1.7.10.4
@@ -1,14 +0,0 @@
Author: Fabian Fagerholm <fabbe@debian.org>
Description: Fix linking with libsasldb.a when saslauthd is built with sasldb
support.
--- a/saslauthd/configure.in
+++ b/saslauthd/configure.in
@@ -77,7 +77,7 @@ if test "$authsasldb" != no; then
AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support])
SASL_DB_PATH_CHECK()
SASL_DB_CHECK()
- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al"
+ SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a"
fi
AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ],
@@ -1,27 +1,28 @@
Author: Fabian Fagerholm <fabbe@debian.org> From 1a5f3004e9081eab6263a29cd5be792f06441e36 Mon Sep 17 00:00:00 2001
From: Fabian Fagerholm <fabbe@debian.org>
Date: Wed, 24 Jul 2013 11:38:25 -0400
Subject: [PATCH] cyrus-sasl: Add patches from Debian to fix linking
Description: This patch makes sure the non-PIC version of libsasldb.a, which Description: This patch makes sure the non-PIC version of libsasldb.a, which
is created out of non-PIC objects, is not going to overwrite the PIC version, is created out of non-PIC objects, is not going to overwrite the PIC version,
which is created out of PIC objects. The PIC version is placed in .libs, and which is created out of PIC objects. The PIC version is placed in .libs, and
the non-PIC version in the current directory. This ensures that both non-PIC the non-PIC version in the current directory. This ensures that both non-PIC
and PIC versions are available in the correct locations. and PIC versions are available in the correct locations.
---
lib/Makefile.am | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index a158ca3..3137e19 100644
--- a/lib/Makefile.am --- a/lib/Makefile.am
+++ b/lib/Makefile.am +++ b/lib/Makefile.am
@@ -78,7 +78,7 @@ endif @@ -99,7 +99,7 @@ endif
libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS) libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
@echo adding static plugins and dependencies @echo adding static plugins and dependencies
- $(AR) cru .libs/$@ $(SASL_STATIC_OBJS) - $(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
+ $(AR) cru $@ $(SASL_STATIC_OBJS) + $(AR) cru $@ $(SASL_STATIC_OBJS)
@for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ @for i in ./libsasl2.la ../common/libplugin_common.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
if test ! -f $$i; then continue; fi; . $$i; \ if test ! -f $$i; then continue; fi; . $$i; \
for j in $$dependency_libs foo; do \ for j in $$dependency_libs foo; do \
--- a/sasldb/Makefile.am
+++ b/sasldb/Makefile.am
@@ -63,6 +63,6 @@ libsasldb_a_SOURCES =
EXTRA_libsasldb_a_SOURCES =
libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC)
- $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC)
+ $(AR) cru $@ $(SASL_DB_BACKEND_STATIC)
@@ -1,31 +0,0 @@
From 92d72789c811b0d55f624a8bac5ccc4412f5996e Mon Sep 17 00:00:00 2001
From: Ken Murchison <murch@andrew.cmu.edu>
Date: Thu, 20 Dec 2012 18:14:50 -0500
Subject: [PATCH] sasl.h: #include <stddef.h> for size_t on NetBSD
This patch was imported from git://git.cyrusimap.org/cyrus-sasl
commit 67a188693796a14e3a76ac603104807fbbfddfc4
Upstream-Status: Backport
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
include/sasl.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/sasl.h b/include/sasl.h
index fef4d51..8b8a63f 100755
--- a/include/sasl.h
+++ b/include/sasl.h
@@ -121,6 +121,8 @@
#ifndef SASL_H
#define SASL_H 1
+#include <stddef.h> /* For size_t */
+
/* Keep in sync with win32/common.mak */
#define SASL_VERSION_MAJOR 2
#define SASL_VERSION_MINOR 1
--
1.8.3.2
@@ -1,59 +1,55 @@
SUMMARY = "Generic client/server library for SASL authentication" SUMMARY = "Generic client/server library for SASL authentication"
SECTION = "libs" SECTION = "libs"
HOMEPAGE = "http://asg.web.cmu.edu/sasl/" HOMEPAGE = "http://asg.web.cmu.edu/sasl/"
DEPENDS = "openssl db" DEPENDS = "openssl db groff-native"
LICENSE = "BSD" LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396" LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396"
SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \ SRCREV = "e41cfb986c1b1935770de554872247453fdbb079"
file://avoid-to-call-AC_TRY_RUN.patch \
file://Fix-hardcoded-libdir.patch \
file://debian_patches_0009_sasldb_al.diff \
file://debian_patches_0014_avoid_pic_overwrite.diff \
file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \
file://saslauthd.service \
file://saslauthd.conf \
"
UPSTREAM_CHECK_REGEX = "cyrus-sasl-(?P<pver>(\d+(\.\d+)+))\.tar" SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https \
file://avoid-to-call-AC_TRY_RUN.patch \
file://Fix-hardcoded-libdir.patch \
file://debian_patches_0014_avoid_pic_overwrite.diff \
file://saslauthd.service \
file://saslauthd.conf \
file://0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch \
"
inherit autotools-brokensep pkgconfig useradd systemd UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives"
S = "${WORKDIR}/git"
CLEANBROKEN = "1" CLEANBROKEN = "1"
inherit autotools pkgconfig useradd systemd
EXTRA_OECONF += "--with-dblib=berkeley \ EXTRA_OECONF += "--with-dblib=berkeley \
--with-bdb-libdir=${STAGING_LIBDIR} \ --with-plugindir='${libdir}/sasl2' \
--with-bdb-incdir=${STAGING_INCDIR} \
--with-bdb=db-5.3 \
--with-plugindir="${libdir}/sasl2" \
andrew_cv_runpath_switch=none" andrew_cv_runpath_switch=none"
PACKAGECONFIG ??= "ntlm \ PACKAGECONFIG ??= "ntlm \
${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 ldap pam', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)} \
" "
PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5," PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5,"
PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam,"
PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie," PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie,"
PACKAGECONFIG[des] = "--with-des,--without-des,," PACKAGECONFIG[des] = "--with-des,--without-des,,"
PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap," PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap,"
PACKAGECONFIG[ntlm] = "--with-ntlm,--without-ntlm,," PACKAGECONFIG[ntlm] = "--enable-ntlm=yes,--enable-ntlm=no,,"
PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
CFLAGS += "-fPIC" CFLAGS += "-fPIC"
do_configure_prepend () { do_configure_prepend () {
rm -f acinclude.m4 config/libtool.m4
# make it be able to work with db 5.0 version # make it be able to work with db 5.0 version
local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c" local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c"
for sed_file in $sed_files; do for sed_file in $sed_files; do
sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' $sed_file sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' ${S}/$sed_file
done done
} }
do_compile_prepend () { do_compile_prepend () {
cd include cd include
${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} makemd5.c -o makemd5 ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} ${S}/include/makemd5.c -o makemd5
touch makemd5.o makemd5.lo makemd5 touch makemd5.o makemd5.lo makemd5
cd .. cd ..
} }