[arch-commits] Commit in cyrus-sasl/repos (14 files)
Evangelos Foutras
foutrelis at gemini.archlinux.org
Sat Nov 13 20:10:27 UTC 2021
Date: Saturday, November 13, 2021 @ 20:10:26
Author: foutrelis
Revision: 428335
archrelease: copy trunk to staging-x86_64
Added:
cyrus-sasl/repos/staging-x86_64/
cyrus-sasl/repos/staging-x86_64/0003-Update-saslauthd.conf-location-in-documentation.patch
(from rev 428334, cyrus-sasl/trunk/0003-Update-saslauthd.conf-location-in-documentation.patch)
cyrus-sasl/repos/staging-x86_64/0006-Enable-autoconf-maintainer-mode.patch
(from rev 428334, cyrus-sasl/trunk/0006-Enable-autoconf-maintainer-mode.patch)
cyrus-sasl/repos/staging-x86_64/0010-Update-required-libraries-when-ld-as-needed-is-used.patch
(from rev 428334, cyrus-sasl/trunk/0010-Update-required-libraries-when-ld-as-needed-is-used.patch)
cyrus-sasl/repos/staging-x86_64/0013-Don-t-use-la-files-for-opening-plugins.patch
(from rev 428334, cyrus-sasl/trunk/0013-Don-t-use-la-files-for-opening-plugins.patch)
cyrus-sasl/repos/staging-x86_64/0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch
(from rev 428334, cyrus-sasl/trunk/0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch)
cyrus-sasl/repos/staging-x86_64/0022-Fix-keytab-option-for-MIT-Kerberos.patch
(from rev 428334, cyrus-sasl/trunk/0022-Fix-keytab-option-for-MIT-Kerberos.patch)
cyrus-sasl/repos/staging-x86_64/0032-Add-with_pgsql-include-postgresql-to-include-path.patch
(from rev 428334, cyrus-sasl/trunk/0032-Add-with_pgsql-include-postgresql-to-include-path.patch)
cyrus-sasl/repos/staging-x86_64/PKGBUILD
(from rev 428334, cyrus-sasl/trunk/PKGBUILD)
cyrus-sasl/repos/staging-x86_64/autoconf-2.70.patch
(from rev 428334, cyrus-sasl/trunk/autoconf-2.70.patch)
cyrus-sasl/repos/staging-x86_64/gdbm-errno.patch
(from rev 428334, cyrus-sasl/trunk/gdbm-errno.patch)
cyrus-sasl/repos/staging-x86_64/saslauthd.conf.d
(from rev 428334, cyrus-sasl/trunk/saslauthd.conf.d)
cyrus-sasl/repos/staging-x86_64/saslauthd.service
(from rev 428334, cyrus-sasl/trunk/saslauthd.service)
cyrus-sasl/repos/staging-x86_64/tmpfiles.conf
(from rev 428334, cyrus-sasl/trunk/tmpfiles.conf)
-----------------------------------------------------------------+
0003-Update-saslauthd.conf-location-in-documentation.patch | 41 ++
0006-Enable-autoconf-maintainer-mode.patch | 22 +
0010-Update-required-libraries-when-ld-as-needed-is-used.patch | 37 ++
0013-Don-t-use-la-files-for-opening-plugins.patch | 153 ++++++++
0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch | 26 +
0022-Fix-keytab-option-for-MIT-Kerberos.patch | 66 +++
0032-Add-with_pgsql-include-postgresql-to-include-path.patch | 23 +
PKGBUILD | 184 ++++++++++
autoconf-2.70.patch | 79 ++++
gdbm-errno.patch | 29 +
saslauthd.conf.d | 1
saslauthd.service | 11
tmpfiles.conf | 1
13 files changed, 673 insertions(+)
Copied: cyrus-sasl/repos/staging-x86_64/0003-Update-saslauthd.conf-location-in-documentation.patch (from rev 428334, cyrus-sasl/trunk/0003-Update-saslauthd.conf-location-in-documentation.patch)
===================================================================
--- staging-x86_64/0003-Update-saslauthd.conf-location-in-documentation.patch (rev 0)
+++ staging-x86_64/0003-Update-saslauthd.conf-location-in-documentation.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,41 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Update saslauthd.conf location in documentation
+
+date format (cosmetic).
+---
+ saslauthd/saslauthd.mdoc | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/saslauthd/saslauthd.mdoc b/saslauthd/saslauthd.mdoc
+index 0c2209e..17c9284 100644
+--- a/saslauthd/saslauthd.mdoc
++++ b/saslauthd/saslauthd.mdoc
+@@ -10,7 +10,7 @@
+ .\" manpage in saslauthd.8 whenever you change this source
+ .\" version. Only the pre-formatted manpage is installed.
+ .\"
+-.Dd 12 12 2005
++.Dd December 12 2005
+ .Dt SASLAUTHD 8
+ .Os "CMU-SASL"
+ .Sh NAME
+@@ -245,7 +245,7 @@ instead.
+ .Em (All platforms that support OpenLDAP 2.0 or higher)
+ .Pp
+ Authenticate against an ldap server. The ldap configuration parameters are
+-read from /usr/local/etc/saslauthd.conf. The location of this file can be
++read from /etc/saslauthd.conf. The location of this file can be
+ changed with the -O parameter. See the LDAP_SASLAUTHD file included with the
+ distribution for the list of available parameters.
+ .It Li sia
+@@ -278,7 +278,7 @@ was never intended to be used in this manner, anyway.)
+ .Bl -tag -width "/var/run/saslauthd/mux"
+ .It Pa /var/run/saslauthd/mux
+ The default communications socket.
+-.It Pa /usr/local/etc/saslauthd.conf
++.It Pa /etc/saslauthd.conf
+ The default configuration file for ldap support.
+ .El
+ .Sh SEE ALSO
Copied: cyrus-sasl/repos/staging-x86_64/0006-Enable-autoconf-maintainer-mode.patch (from rev 428334, cyrus-sasl/trunk/0006-Enable-autoconf-maintainer-mode.patch)
===================================================================
--- staging-x86_64/0006-Enable-autoconf-maintainer-mode.patch (rev 0)
+++ staging-x86_64/0006-Enable-autoconf-maintainer-mode.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,22 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:03 +0100
+Subject: Enable autoconf maintainer mode
+
+---
+ configure.ac | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 388f5d0..b3db52c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -69,6 +69,8 @@ AC_CANONICAL_TARGET
+
+ AM_INIT_AUTOMAKE([1.11 tar-ustar dist-bzip2 foreign -Wno-portability subdir-objects])
+
++AM_MAINTAINER_MODE
++
+ DIRS=""
+
+ AC_ARG_ENABLE(cmulocal,
Copied: cyrus-sasl/repos/staging-x86_64/0010-Update-required-libraries-when-ld-as-needed-is-used.patch (from rev 428334, cyrus-sasl/trunk/0010-Update-required-libraries-when-ld-as-needed-is-used.patch)
===================================================================
--- staging-x86_64/0010-Update-required-libraries-when-ld-as-needed-is-used.patch (rev 0)
+++ staging-x86_64/0010-Update-required-libraries-when-ld-as-needed-is-used.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,37 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Update required libraries when ld --as-needed is used
+
+it.
+---
+ saslauthd/Makefile.am | 2 +-
+ sasldb/Makefile.am | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/saslauthd/Makefile.am b/saslauthd/Makefile.am
+index 864b29b..4cf3a3d 100644
+--- a/saslauthd/Makefile.am
++++ b/saslauthd/Makefile.am
+@@ -25,7 +25,7 @@ EXTRA_saslauthd_sources = getaddrinfo.c getnameinfo.c
+ saslauthd_DEPENDENCIES = saslauthd-main.o $(LTLIBOBJS_FULL)
+ saslauthd_LDADD = @SASL_KRB_LIB@ \
+ @GSSAPIBASE_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
+- @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL) $(CRYPTO_COMPAT_OBJS) $(LIBSASLDB_OBJS)
++ @LIB_SOCKET@ ../sasldb/libsasldb.la @LIB_PAM@ @LDAP_LIBS@ $(LTLIBOBJS_FULL) $(CRYPTO_COMPAT_OBJS) $(LIBSASLDB_OBJS)
+
+ testsaslauthd_SOURCES = testsaslauthd.c utils.c
+ testsaslauthd_LDADD = @LIB_SOCKET@
+diff --git a/sasldb/Makefile.am b/sasldb/Makefile.am
+index 497ee25..a27645f 100644
+--- a/sasldb/Makefile.am
++++ b/sasldb/Makefile.am
+@@ -54,6 +54,6 @@ noinst_LTLIBRARIES = libsasldb.la
+
+ libsasldb_la_SOURCES = allockey.c sasldb.h
+ EXTRA_libsasldb_la_SOURCES = $(extra_common_sources)
+-libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND)
+-libsasldb_la_LIBADD = $(SASL_DB_BACKEND)
++libsasldb_la_DEPENDENCIES = $(SASL_DB_BACKEND) $(SASL_DB_LIB)
++libsasldb_la_LIBADD = $(SASL_DB_BACKEND) $(SASL_DB_LIB)
+ libsasldb_la_LDFLAGS = -no-undefined
Copied: cyrus-sasl/repos/staging-x86_64/0013-Don-t-use-la-files-for-opening-plugins.patch (from rev 428334, cyrus-sasl/trunk/0013-Don-t-use-la-files-for-opening-plugins.patch)
===================================================================
--- staging-x86_64/0013-Don-t-use-la-files-for-opening-plugins.patch (rev 0)
+++ staging-x86_64/0013-Don-t-use-la-files-for-opening-plugins.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,153 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:04 +0100
+Subject: Don't use la files for opening plugins
+
+---
+ lib/dlopen.c | 121 ++++-------------------------------------------------------
+ 1 file changed, 7 insertions(+), 114 deletions(-)
+
+diff --git a/lib/dlopen.c b/lib/dlopen.c
+index 8284cd8..ef90b11 100644
+--- a/lib/dlopen.c
++++ b/lib/dlopen.c
+@@ -246,113 +246,6 @@ static int _sasl_plugin_load(char *plugin, void *library,
+ return result;
+ }
+
+-/* this returns the file to actually open.
+- * out should be a buffer of size PATH_MAX
+- * and may be the same as in. */
+-
+-/* We'll use a static buffer for speed unless someone complains */
+-#define MAX_LINE 2048
+-
+-static int _parse_la(const char *prefix, const char *in, char *out)
+-{
+- FILE *file;
+- size_t length;
+- char line[MAX_LINE];
+- char *ntmp = NULL;
+-
+- if(!in || !out || !prefix || out == in) return SASL_BADPARAM;
+-
+- /* Set this so we can detect failure */
+- *out = '\0';
+-
+- length = strlen(in);
+-
+- if (strcmp(in + (length - strlen(LA_SUFFIX)), LA_SUFFIX)) {
+- if(!strcmp(in + (length - strlen(SO_SUFFIX)),SO_SUFFIX)) {
+- /* check for a .la file */
+- if (strlen(prefix) + strlen(in) + strlen(LA_SUFFIX) + 1 >= MAX_LINE)
+- return SASL_BADPARAM;
+- strcpy(line, prefix);
+- strcat(line, in);
+- length = strlen(line);
+- *(line + (length - strlen(SO_SUFFIX))) = '\0';
+- strcat(line, LA_SUFFIX);
+- file = fopen(line, "r");
+- if(file) {
+- /* We'll get it on the .la open */
+- fclose(file);
+- return SASL_FAIL;
+- }
+- }
+- if (strlen(prefix) + strlen(in) + 1 >= PATH_MAX)
+- return SASL_BADPARAM;
+- strcpy(out, prefix);
+- strcat(out, in);
+- return SASL_OK;
+- }
+-
+- if (strlen(prefix) + strlen(in) + 1 >= MAX_LINE)
+- return SASL_BADPARAM;
+- strcpy(line, prefix);
+- strcat(line, in);
+-
+- file = fopen(line, "r");
+- if(!file) {
+- _sasl_log(NULL, SASL_LOG_WARN,
+- "unable to open LA file: %s", line);
+- return SASL_FAIL;
+- }
+-
+- while(!feof(file)) {
+- if(!fgets(line, MAX_LINE, file)) break;
+- if(line[strlen(line) - 1] != '\n') {
+- _sasl_log(NULL, SASL_LOG_WARN,
+- "LA file has too long of a line: %s", in);
+- fclose(file);
+- return SASL_BUFOVER;
+- }
+- if(line[0] == '\n' || line[0] == '#') continue;
+- if(!strncmp(line, "dlname=", sizeof("dlname=") - 1)) {
+- /* We found the line with the name in it */
+- char *end;
+- char *start;
+- size_t len;
+- end = strrchr(line, '\'');
+- if(!end) continue;
+- start = &line[sizeof("dlname=")-1];
+- len = strlen(start);
+- if(len > 3 && start[0] == '\'') {
+- ntmp=&start[1];
+- *end='\0';
+- /* Do we have dlname="" ? */
+- if(ntmp == end) {
+- _sasl_log(NULL, SASL_LOG_DEBUG,
+- "dlname is empty in .la file: %s", in);
+- fclose(file);
+- return SASL_FAIL;
+- }
+- strcpy(out, prefix);
+- strcat(out, ntmp);
+- }
+- break;
+- }
+- }
+- if(ferror(file) || feof(file)) {
+- _sasl_log(NULL, SASL_LOG_WARN,
+- "Error reading .la: %s\n", in);
+- fclose(file);
+- return SASL_FAIL;
+- }
+- fclose(file);
+-
+- if(!(*out)) {
+- _sasl_log(NULL, SASL_LOG_WARN,
+- "Could not find a dlname line in .la file: %s", in);
+- return SASL_FAIL;
+- }
+-
+- return SASL_OK;
+-}
+ #endif /* DO_DLOPEN */
+
+ /* loads a plugin library */
+@@ -506,18 +399,18 @@ int _sasl_load_plugins(const add_plugin_list_t *entrypoints,
+ if (length + pos>=PATH_MAX) continue; /* too big */
+
+ if (strcmp(dir->d_name + (length - strlen(SO_SUFFIX)),
+- SO_SUFFIX)
+- && strcmp(dir->d_name + (length - strlen(LA_SUFFIX)),
+- LA_SUFFIX))
++ SO_SUFFIX))
+ continue;
+
++ /* We only use .so files for loading plugins */
++
+ memcpy(name,dir->d_name,length);
+ name[length]='\0';
+
+- result = _parse_la(prefix, name, tmp);
+- if(result != SASL_OK)
+- continue;
+-
++ /* Create full name with path */
++ strncpy(tmp, prefix, PATH_MAX);
++ strncat(tmp, name, PATH_MAX);
++
+ /* skip "lib" and cut off suffix --
+ this only need be approximate */
+ strcpy(plugname, name + 3);
Copied: cyrus-sasl/repos/staging-x86_64/0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch (from rev 428334, cyrus-sasl/trunk/0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch)
===================================================================
--- staging-x86_64/0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch (rev 0)
+++ staging-x86_64/0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,26 @@
+From 31b68a9438c24fc9e3e52f626462bf514de31757 Mon Sep 17 00:00:00 2001
+From: Ryan Tandy <ryan at nardis.ca>
+Date: Mon, 24 Dec 2018 15:07:02 -0800
+Subject: [PATCH] Restore LIBS after checking gss_inquire_sec_context_by_oid
+
+Fixes: 4b0306dcd76031460246b2dabcb7db766d6b04d8
+---
+ m4/sasl2.m4 | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
+index 56e0504a..17f5d081 100644
+--- a/m4/sasl2.m4
++++ b/m4/sasl2.m4
+@@ -311,9 +311,10 @@ if test "$gssapi" != no; then
+ [AC_DEFINE(HAVE_GSS_C_SEC_CONTEXT_SASL_SSF,,
+ [Define if your GSSAPI implementation defines GSS_C_SEC_CONTEXT_SASL_SSF])])
+ 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([
+ #ifdef HAVE_GSSAPI_H
Copied: cyrus-sasl/repos/staging-x86_64/0022-Fix-keytab-option-for-MIT-Kerberos.patch (from rev 428334, cyrus-sasl/trunk/0022-Fix-keytab-option-for-MIT-Kerberos.patch)
===================================================================
--- staging-x86_64/0022-Fix-keytab-option-for-MIT-Kerberos.patch (rev 0)
+++ staging-x86_64/0022-Fix-keytab-option-for-MIT-Kerberos.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,66 @@
+From: Debian Cyrus SASL Team
+ <pkg-cyrus-sasl2-debian-devel at lists.alioth.debian.org>
+Date: Thu, 24 Mar 2016 11:35:05 +0100
+Subject: Fix keytab option for MIT Kerberos
+
+---
+ m4/sasl2.m4 | 1 +
+ plugins/gssapi.c | 11 ++++++++---
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/m4/sasl2.m4 b/m4/sasl2.m4
+index 56e0504..a90f7b4 100644
+--- a/m4/sasl2.m4
++++ b/m4/sasl2.m4
+@@ -282,6 +282,7 @@ if test "$gssapi" != no; then
+ ])
+ fi
+ fi
++ AC_CHECK_FUNCS(krb5_gss_register_acceptor_identity)
+ AC_CHECK_FUNCS(gss_decapsulate_token)
+ AC_CHECK_FUNCS(gss_encapsulate_token)
+ AC_CHECK_FUNCS(gss_oid_equal)
+diff --git a/plugins/gssapi.c b/plugins/gssapi.c
+index ff663da..7c69ac2 100644
+--- a/plugins/gssapi.c
++++ b/plugins/gssapi.c
+@@ -1545,7 +1545,7 @@ static sasl_server_plug_t gssapi_server_plugins[] =
+ };
+
+ int gssapiv2_server_plug_init(
+-#ifndef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
++#if !defined(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY) && !defined(HAVE_KRB5_GSS_REGISTER_ACCEPTOR_IDENTITY)
+ const sasl_utils_t *utils __attribute__((unused)),
+ #else
+ const sasl_utils_t *utils,
+@@ -1555,7 +1555,7 @@ int gssapiv2_server_plug_init(
+ sasl_server_plug_t **pluglist,
+ int *plugcount)
+ {
+-#ifdef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
++#if defined(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY) || defined(HAVE_KRB5_GSS_REGISTER_ACCEPTOR_IDENTITY)
+ const char *keytab = NULL;
+ char keytab_path[1024];
+ unsigned int rl;
+@@ -1565,7 +1565,7 @@ int gssapiv2_server_plug_init(
+ return SASL_BADVERS;
+ }
+
+-#ifdef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
++#if defined(HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY) || defined(HAVE_KRB5_GSS_REGISTER_ACCEPTOR_IDENTITY)
+ /* unfortunately, we don't check for readability of keytab if it's
+ the standard one, since we don't know where it is */
+
+@@ -1587,7 +1587,12 @@ int gssapiv2_server_plug_init(
+
+ strncpy(keytab_path, keytab, 1024);
+
++#ifdef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY
+ gsskrb5_register_acceptor_identity(keytab_path);
++#endif
++#ifdef HAVE_KRB5_GSS_REGISTER_ACCEPTOR_IDENTITY
++ krb5_gss_register_acceptor_identity(keytab_path);
++#endif
+ }
+ #endif
+
Copied: cyrus-sasl/repos/staging-x86_64/0032-Add-with_pgsql-include-postgresql-to-include-path.patch (from rev 428334, cyrus-sasl/trunk/0032-Add-with_pgsql-include-postgresql-to-include-path.patch)
===================================================================
--- staging-x86_64/0032-Add-with_pgsql-include-postgresql-to-include-path.patch (rev 0)
+++ staging-x86_64/0032-Add-with_pgsql-include-postgresql-to-include-path.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,23 @@
+From: =?utf-8?b?T25kxZllaiBTdXLDvQ==?= <ondrej at sury.org>
+Date: Tue, 25 Oct 2016 12:33:27 +0200
+Subject: Add ${with_pgsql}include/postgresql/ to include path
+
+---
+ configure.ac | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index fe7f0eb..1882f31 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -894,7 +894,9 @@ case "$with_pgsql" in
+ LIB_PGSQL_DIR=$LIB_PGSQL
+ LIB_PGSQL="$LIB_PGSQL -lpq"
+
+- if test -d ${with_pgsql}/include/pgsql; then
++ if test -d ${with_pgsql}/include/postgresql/; then
++ CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/postgresql"
++ elif test -d ${with_pgsql}/include/pgsql; then
+ CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/include/pgsql"
+ elif test -d ${with_pgsql}/pgsql/include; then
+ CPPFLAGS="${CPPFLAGS} -I${with_pgsql}/pgsql/include"
Copied: cyrus-sasl/repos/staging-x86_64/PKGBUILD (from rev 428334, cyrus-sasl/trunk/PKGBUILD)
===================================================================
--- staging-x86_64/PKGBUILD (rev 0)
+++ staging-x86_64/PKGBUILD 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,184 @@
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+# This package spans multiple repositories.
+# Always build from cyrus-sasl/trunk and merge changes to libsasl/trunk.
+
+pkgbase='cyrus-sasl'
+pkgname=('cyrus-sasl' 'cyrus-sasl-gssapi' 'cyrus-sasl-ldap' 'cyrus-sasl-sql')
+#pkgname=libsasl
+pkgver=2.1.27
+pkgrel=6
+pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library"
+arch=('x86_64')
+url="https://www.cyrusimap.org/sasl/"
+license=('custom')
+options=('!makeflags')
+makedepends=('postgresql-libs' 'mariadb-libs' 'libldap' 'krb5' 'openssl' 'sqlite')
+source=(https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-${pkgver}/cyrus-sasl-${pkgver}.tar.gz{,.sig}
+ 0003-Update-saslauthd.conf-location-in-documentation.patch
+ 0006-Enable-autoconf-maintainer-mode.patch
+ 0010-Update-required-libraries-when-ld-as-needed-is-used.patch
+ 0013-Don-t-use-la-files-for-opening-plugins.patch
+ 0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch
+ 0022-Fix-keytab-option-for-MIT-Kerberos.patch
+ 0032-Add-with_pgsql-include-postgresql-to-include-path.patch
+ gdbm-errno.patch
+ autoconf-2.70.patch
+ saslauthd.service
+ saslauthd.conf.d
+ tmpfiles.conf)
+sha256sums=('26866b1549b00ffd020f188a43c258017fa1c382b3ddadd8201536f72efb05d5'
+ 'SKIP'
+ '9919c81196701d11a3a77e2573a541489ad9ab42a4c50eb7d19edfb37713c604'
+ '7bd2b2af36c061e92f69944a18e2c122aea0d2b21773f5ea47bb6209f13d0812'
+ '8e22cb6ac58208f191b1eb19aac602c1bf49708f2a3b2e3de5f5b2c1e2467906'
+ 'bbee401c01dc6942710e0c1285091fcd98588bf636b52f24ed0e3b04039b748b'
+ 'a953c79c585d579f25135de0fe807d6da1fddccbd5b66a9606fb6390c12c7e31'
+ '1a0ae7bd722d57feb6fab12c05eb1922982c68bd9be1c165d405954012e6634f'
+ '3c375f8755fdbd98a21c4ee195bebbd2a146901fee327e4dd6cfde7a4dcba7c3'
+ '03a57cbcec85602fb8e39b7c8a3ff1a22d2c20a28e771b8b326a570d733bf432'
+ '91cb2026e7f41374ec181809c862bbfaf4e4b3346dc8294285718d2dd17101a5'
+ '5c6453050a5f594ca1d53baf3a6188d8f3cdc7a28467ad7c844ad51f663dae9a'
+ 'fa57b4f374ae633633091b1c8b44e1e0be814e4fddbfa75f16eb3dd1f16b8640'
+ '16ca1a4185847b0c6c70ef6c7c314cb466f698d3ed02185a5f50e8179822f024')
+validpgpkeys=('829F339F8C296FE80F409D93E3D7C118C7B9F46A')
+
+prepare() {
+ cd cyrus-sasl-$pkgver
+ patch -Np1 -i ../0003-Update-saslauthd.conf-location-in-documentation.patch
+ patch -Np1 -i ../0006-Enable-autoconf-maintainer-mode.patch
+ patch -Np1 -i ../0010-Update-required-libraries-when-ld-as-needed-is-used.patch
+ patch -Np1 -i ../0013-Don-t-use-la-files-for-opening-plugins.patch
+ patch -Np1 -i ../0020-Restore-LIBS-after-checking-gss_inquire_sec_context_.patch
+ patch -Np1 -i ../0022-Fix-keytab-option-for-MIT-Kerberos.patch
+ patch -Np1 -i ../0032-Add-with_pgsql-include-postgresql-to-include-path.patch
+ patch -Np1 -i ../gdbm-errno.patch
+ patch -p1 -i ../autoconf-2.70.patch # Fix GCC-SPNEGO build with recent autoconf
+ cp -a saslauthd/saslauthd.mdoc saslauthd/saslauthd.8
+}
+
+build() {
+ export CFLAGS="$CFLAGS -fPIC"
+ cd cyrus-sasl-$pkgver
+
+ rm -f config/config.guess config/config.sub
+ rm -f config/ltconfig config/ltmain.sh config/libtool.m4
+ rm -fr autom4te.cache
+ libtoolize -c
+ aclocal -I config
+ automake -a -c
+ autoheader
+ autoconf
+
+ ./configure --prefix=/usr \
+ --sbin=/usr/bin \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --disable-static \
+ --enable-shared \
+ --enable-alwaystrue \
+ --enable-checkapop \
+ --enable-cram \
+ --enable-digest \
+ --disable-otp \
+ --disable-srp \
+ --disable-srp-setpass \
+ --disable-krb4 \
+ --enable-gssapi \
+ --enable-auth-sasldb \
+ --enable-plain \
+ --enable-anon \
+ --enable-login \
+ --enable-ntlm \
+ --disable-passdss \
+ --enable-sql \
+ --with-mysql=/usr \
+ --with-pgsql=/usr/lib \
+ --with-sqlite3=/usr/lib \
+ --enable-ldapdb \
+ --disable-macos-framework \
+ --with-pam \
+ --with-saslauthd=/var/run/saslauthd \
+ --with-ldap \
+ --with-dblib=gdbm \
+ --with-configdir=/etc/sasl2:/etc/sasl:/usr/lib/sasl2 \
+ --sysconfdir=/etc \
+ --with-devrandom=/dev/urandom
+ sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
+ make
+}
+
+package_libsasl() {
+ pkgdesc="Cyrus Simple Authentication Service Layer (SASL) Library"
+ depends=('openssl')
+ conflicts=('cyrus-sasl-plugins')
+
+ cd cyrus-sasl-$pkgver
+ make DESTDIR="$pkgdir" install-pkgconfigDATA
+ for dir in include lib sasldb plugins utils; do
+ pushd ${dir}
+ make DESTDIR="${pkgdir}" install
+ popd
+ done
+ rm -f "${pkgdir}"/usr/lib/sasl2/libsql.so*
+ rm -f "${pkgdir}"/usr/lib/sasl2/libgssapiv2.so*
+ rm -f "${pkgdir}"/usr/lib/sasl2/libldapdb.so*
+ rm -f "${pkgdir}"/usr/lib/sasl2/libgs2.so*
+ install -m755 -d "${pkgdir}/usr/share/licenses/libsasl"
+ install -m644 COPYING "${pkgdir}/usr/share/licenses/libsasl/"
+}
+
+package_cyrus-sasl() {
+ depends=("libsasl=${pkgver}" 'krb5' 'pam' 'gdbm')
+ pkgdesc="Cyrus saslauthd SASL authentication daemon"
+ backup=('etc/conf.d/saslauthd')
+
+ cd cyrus-sasl-$pkgver/saslauthd
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 "${srcdir}/saslauthd.conf.d" "${pkgdir}/etc/conf.d/saslauthd"
+ install -Dm644 "${srcdir}/saslauthd.service" "${pkgdir}/usr/lib/systemd/system/saslauthd.service"
+ install -Dm644 "${srcdir}/tmpfiles.conf" "${pkgdir}/usr/lib/tmpfiles.d/saslauthd.conf"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl"
+ ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl/"
+}
+
+package_cyrus-sasl-gssapi() {
+ pkgdesc="GSSAPI authentication mechanism for Cyrus SASL"
+ depends=("libsasl=${pkgver}" 'krb5')
+ replaces=('cyrus-sasl-plugins')
+
+ cd cyrus-sasl-$pkgver/plugins
+ install -m755 -d "${pkgdir}/usr/lib/sasl2"
+ cp -a .libs/libgssapiv2.so* "${pkgdir}/usr/lib/sasl2/"
+ cp -a .libs/libgs2.so* "${pkgdir}/usr/lib/sasl2/"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi"
+ ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-gssapi/"
+}
+
+package_cyrus-sasl-ldap() {
+ pkgdesc="ldapdb auxprop module for Cyrus SASL"
+ depends=("libsasl=${pkgver}" 'libldap')
+ replaces=('cyrus-sasl-plugins')
+
+ cd cyrus-sasl-$pkgver/plugins
+ install -m755 -d "${pkgdir}/usr/lib/sasl2"
+ cp -a .libs/libldapdb.so* "${pkgdir}/usr/lib/sasl2/"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap"
+ ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-ldap/"
+}
+
+package_cyrus-sasl-sql() {
+ pkgdesc="SQL auxprop module for Cyrus SASL"
+ depends=("libsasl=${pkgver}" 'postgresql-libs' 'mariadb-libs' 'sqlite')
+ replaces=('cyrus-sasl-plugins')
+
+ cd cyrus-sasl-$pkgver/plugins
+ install -m755 -d "${pkgdir}/usr/lib/sasl2"
+ cp -a .libs/libsql.so* "${pkgdir}/usr/lib/sasl2/"
+
+ install -m755 -d "${pkgdir}/usr/share/licenses/cyrus-sasl-sql"
+ ln -sf ../libsasl/COPYING "${pkgdir}/usr/share/licenses/cyrus-sasl-sql/"
+}
Copied: cyrus-sasl/repos/staging-x86_64/autoconf-2.70.patch (from rev 428334, cyrus-sasl/trunk/autoconf-2.70.patch)
===================================================================
--- staging-x86_64/autoconf-2.70.patch (rev 0)
+++ staging-x86_64/autoconf-2.70.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,79 @@
+From 56d3138b309b19cb9460ed4d05bb63302a97b703 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup at redhat.com>
+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
+
+Signed-off-by: Pavel Raiskup <praiskup at redhat.com>
+---
+ 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 004869fdf66a2d951fdf0e1c7809652394188368 Mon Sep 17 00:00:00 2001
+From: Pavel Raiskup <praiskup at redhat.com>
+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
+
+Signed-off-by: Pavel Raiskup <praiskup at redhat.com>
+---
+ 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 <dlfcn.h>
+ #include <stdio.h>
+ 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)
+
Copied: cyrus-sasl/repos/staging-x86_64/gdbm-errno.patch (from rev 428334, cyrus-sasl/trunk/gdbm-errno.patch)
===================================================================
--- staging-x86_64/gdbm-errno.patch (rev 0)
+++ staging-x86_64/gdbm-errno.patch 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,29 @@
+From af48f6fec9a7b6374d4153c5db894d4a1f349645 Mon Sep 17 00:00:00 2001
+From: Jonas Jelten <jj at sft.mx>
+Date: Sat, 2 Feb 2019 20:53:37 +0100
+Subject: [PATCH] db_gdbm: fix gdbm_errno overlay from gdbm_close
+
+`gdbm_close` also sets gdbm_errno since version 1.17.
+This leads to a problem in `libsasl` as the `gdbm_close` incovation overlays
+the `gdbm_errno` value which is then later used for the error handling.
+---
+ sasldb/db_gdbm.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/sasldb/db_gdbm.c b/sasldb/db_gdbm.c
+index ee56a6bf..c908808e 100644
+--- a/sasldb/db_gdbm.c
++++ b/sasldb/db_gdbm.c
+@@ -107,9 +107,11 @@ int _sasldb_getdata(const sasl_utils_t *utils,
+ gkey.dptr = key;
+ gkey.dsize = key_len;
+ gvalue = gdbm_fetch(db, gkey);
++ int fetch_errno = gdbm_errno;
++
+ gdbm_close(db);
+ if (! gvalue.dptr) {
+- if (gdbm_errno == GDBM_ITEM_NOT_FOUND) {
++ if (fetch_errno == GDBM_ITEM_NOT_FOUND) {
+ utils->seterror(conn, SASL_NOLOG,
+ "user: %s@%s property: %s not found in %s",
+ authid, realm, propName, path);
Copied: cyrus-sasl/repos/staging-x86_64/saslauthd.conf.d (from rev 428334, cyrus-sasl/trunk/saslauthd.conf.d)
===================================================================
--- staging-x86_64/saslauthd.conf.d (rev 0)
+++ staging-x86_64/saslauthd.conf.d 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1 @@
+SASLAUTHD_OPTS="-a pam"
Copied: cyrus-sasl/repos/staging-x86_64/saslauthd.service (from rev 428334, cyrus-sasl/trunk/saslauthd.service)
===================================================================
--- staging-x86_64/saslauthd.service (rev 0)
+++ staging-x86_64/saslauthd.service 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Cyrus SASL authentication daemon
+
+[Service]
+Type=forking
+EnvironmentFile=/etc/conf.d/saslauthd
+ExecStart=/usr/sbin/saslauthd $SASLAUTHD_OPTS
+PIDFile=/var/run/saslauthd/saslauthd.pid
+
+[Install]
+WantedBy=multi-user.target
Copied: cyrus-sasl/repos/staging-x86_64/tmpfiles.conf (from rev 428334, cyrus-sasl/trunk/tmpfiles.conf)
===================================================================
--- staging-x86_64/tmpfiles.conf (rev 0)
+++ staging-x86_64/tmpfiles.conf 2021-11-13 20:10:26 UTC (rev 428335)
@@ -0,0 +1 @@
+d /run/saslauthd 0755 root root - -
More information about the arch-commits
mailing list