From 63f6ccff430684d49f9883eca3b9dbded1e07948 Mon Sep 17 00:00:00 2001 From: xhaa123 Date: Thu, 31 Oct 2024 22:00:28 +0800 Subject: [PATCH] cyrus-sasl 2.1.28-3 --- PKGBUILD | 125 +++++++++++++++++++++++++++++++-------------- cyrus-sasl.install | 24 --------- saslauthd | 36 ------------- saslauthd.conf | 1 - saslauthd.conf.d | 2 + saslauthd.service | 1 + 6 files changed, 91 insertions(+), 98 deletions(-) delete mode 100644 cyrus-sasl.install delete mode 100644 saslauthd delete mode 100644 saslauthd.conf create mode 100644 saslauthd.conf.d diff --git a/PKGBUILD b/PKGBUILD index dc42e13..078997b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,55 +4,106 @@ # then please put 'unknown'. # Maintainer: Future Linux Team -pkgname=cyrus-sasl +pkgname=(cyrus-sasl cyrus-sasl-gssapi cyrus-sasl-ldap) +pkgbase=cyrus-sasl pkgver=2.1.28 -pkgrel=2 +pkgrel=3 pkgdesc="Cyrus Simple Authentication Service Layer (SASL) library" arch=('x86_64') url="https://www.cyrusimap.org/sasl/" -license=('custom') -depends=('gdbm' 'glibc' 'openssl' 'krb5' 'openldap' 'libxcrypt' 'linux-pam' 'systemd' 'util-linux') -install=${pkgname}.install -source=(https://github.com/cyrusimap/cyrus-sasl/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.gz - saslauthd - saslauthd.conf - saslauthd.service) +license=('BSD-3-Clause-Attribution') +makedepends=( + 'gdbm' + 'glibc' + 'krb5' + 'libldap' + "libsasl=${pkgver}" + 'openssl' + 'libxcrypt' + 'linux-pam' +) +source=(https://github.com/cyrusimap/cyrus-sasl/releases/download/${pkgbase}-${pkgver}/${pkgbase}-${pkgver}.tar.gz + saslauthd.conf.d + saslauthd.service) sha256sums=(7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c - 76d3dc6548dc29a80538ae660ce1c0f3e79016fe54bca8f19adcdfbde8a950ab - 3349d9588ac1553948404c38e2f740b0ad85a6c64850466b5569d7f295c14e0b - a2f621dbbbe2e67bc1a11cd0363772e48ebb9e0c6a1d720fe793f173c5c90805) + 6a5b11f42ae75b7a9a8ec0f05706a2aef682a0853857c80c3a1b59f1aedcde25 + 7b21ce969c1c10641fa7511db18a27d06ef0fa26d7f08bf0f796f266cf791ea7) + +prepare() { + cd ${pkgbase}-${pkgver} + + sed '/saslint/a #include ' -i lib/saslutil.c + sed '/plugin_common/a #include ' -i plugins/cram.c + +} build() { - cd ${pkgname}-${pkgver} + cd ${pkgbase}-${pkgver} - ${CONFIGURE} \ - --sysconfdir=/etc \ - --enable-auth-sasldb \ - --with-dblib=gdbm \ - --with-dbpath=/var/lib/sasl/sasldb2 \ - --with-sphinx-build=no \ - --with-saslauthd=/var/run/saslauthd \ - --enable-gssapi \ - --enable-ldapdb \ - --enable-login \ - --enable-ntlm \ - --with-ldap \ - --with-pam + ${CONFIGURE} \ + --disable-krb4 \ + --disable-macos-framework \ + --disable-otp \ + --disable-passdss \ + --disable-srp \ + --disable-srp-setpass \ + --disable-static \ + --enable-alwaystrue \ + --enable-anon \ + --enable-auth-sasldb \ + --enable-checkapop \ + --enable-cram \ + --enable-digest \ + --enable-gssapi \ + --enable-ldapdb \ + --enable-login \ + --enable-ntlm \ + --enable-plain \ + --enable-shared \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man \ + --sysconfdir=/etc \ + --with-dblib=gdbm \ + --with-devrandom=/dev/urandom \ + --with-configdir=/etc/sasl2:/etc/sasl:/usr/lib64/sasl2 \ + --with-ldap \ + --with-pam \ + --with-saslauthd=/run/saslauthd \ + --with-sqlite3=/usr/lib64 + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } -package() { - cd ${pkgname}-${pkgver} +package_cyrus-sasl() { + pkgdesc="Cyrus saslauthd SASL authentication daemon" + depends=('gdbm' 'glibc' 'krb5' 'libldap' "libsasl=${pkgver}" 'libxcrypt' 'openssl' 'linux-pam') + backup=(etc/conf.d/saslauthd) + + cd ${pkgbase}-${pkgver} - make DESTDIR=${pkgdir} install + make -C saslauthd DESTDIR=${pkgdir} install + make -C saslauthd DESTDIR=${pkgdir} install-data-local - install -v -dm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html - install -v -m644 saslauthd/LDAP_SASLAUTHD ${pkgdir}/usr/share/doc/${pkgname}-${pkgver} - install -v -m644 doc/legacy/*.html ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html - install -v -dm700 ${pkgdir}/var/lib/sasl - - install -vDm644 ${srcdir}/saslauthd ${pkgdir}/etc/default/saslauthd - install -vDm644 ${srcdir}/saslauthd.conf ${pkgdir}/usr/lib/tmpfiles.d/saslauthd.conf - install -vDm644 ${srcdir}/saslauthd.service ${pkgdir}/usr/lib/systemd/system/saslauthd.service + install -vDm 644 ${srcdir}/saslauthd.conf.d ${pkgdir}/etc/conf.d/saslauthd + install -vDm 644 ${srcdir}/saslauthd.service -t ${pkgdir}/usr/lib/systemd/system/ +} + +package_cyrus-sasl-gssapi() { + pkgdesc="GSSAPI authentication mechanism for Cyrus SASL" + depends=('glibc' 'krb5' "libsasl=${pkgver}") + + cd ${pkgbase}-${pkgver} + + install -vdm 755 ${pkgdir}/usr/lib64/sasl2 + cp -av plugins/.libs/libgs{,sapiv}2.so* ${pkgdir}/usr/lib64/sasl2/ +} +package_cyrus-sasl-ldap() { + pkgdesc="ldapdb auxprop module for Cyrus SASL" + depends=('glibc' 'libldap' "libsasl=${pkgver}") + + cd ${pkgbase}-${pkgver} + + install -vdm 755 ${pkgdir}/usr/lib64/sasl2 + cp -av plugins/.libs/libldapdb.so* ${pkgdir}/usr/lib64/sasl2/ } diff --git a/cyrus-sasl.install b/cyrus-sasl.install deleted file mode 100644 index 7ceaf1c..0000000 --- a/cyrus-sasl.install +++ /dev/null @@ -1,24 +0,0 @@ -# This is a default template for a post-install scriptlet. -# Uncomment only required functions and remove any functions -# you don't need (and this header). - -post_install() { - systemd-tmpfiles --create saslauthd.conf - systemctl enable saslauthd.service -} - -pre_upgrade() { - systemctl stop saslauthd.service - systemctl disable saslauthd.service -} - -post_upgrade() { - systemd-tmpfiles --create saslauthd.conf - systemctl enable saslauthd.service -} - -pre_remove() { - systemctl stop saslauthd.service - systemctl disable saslauthd.service -} - diff --git a/saslauthd b/saslauthd deleted file mode 100644 index cb0fe67..0000000 --- a/saslauthd +++ /dev/null @@ -1,36 +0,0 @@ -# Begin /etc/default/saslauthd - -# Which authentication mechanisms should saslauthd use? (default: shadow) -# -# Available options in this package: -# getpwent -- use the getpwent() library function -# kerberos5 -- use Kerberos 5 -# pam -- use PAM -# rimap -- use a remote IMAP server -# shadow -- use the local shadow password file -# sasldb -- use the local sasldb database file -# ldap -- use LDAP (configuration is in /etc/saslauthd.conf) -# -# Only one option may be used at a time. See the saslauthd man page -# for more information. -# -# Example: MECHANISMS="shadow" -MECHANISMS="shadow" - -# Additional options for this mechanism. (default: none) -# See the saslauthd man page for information about mech-specific options. -# Note: Specify "-O options" in the following variable or saslauthd will fail. -MECH_OPTIONS="" - -# How many saslauthd processes should we run? (default: 5) -# A value of 0 will fork a new process for each connection. -THREADS=5 - -# Other options (default: -c -m /run/saslauthd) -# Note: You MUST specify the -m option or saslauthd won't run! -# -# See the saslauthd man page and the output of 'saslauthd -h' for general -# information about these options. -SASLAUTHD_OPTS="-c -m /run/saslauthd" - -# End /etc/default/saslauthd diff --git a/saslauthd.conf b/saslauthd.conf deleted file mode 100644 index 96c5a7f..0000000 --- a/saslauthd.conf +++ /dev/null @@ -1 +0,0 @@ -d /run/saslauthd 755 root root - diff --git a/saslauthd.conf.d b/saslauthd.conf.d new file mode 100644 index 0000000..41d4784 --- /dev/null +++ b/saslauthd.conf.d @@ -0,0 +1,2 @@ +SASLAUTHD_OPTS="-a pam" + diff --git a/saslauthd.service b/saslauthd.service index cabda78..c55c6c9 100644 --- a/saslauthd.service +++ b/saslauthd.service @@ -6,6 +6,7 @@ Type=forking EnvironmentFile=/etc/default/saslauthd ExecStart=/usr/sbin/saslauthd -a $MECHANISMS -n $THREADS $MECH_OPTIONS $SASLAUTHD_OPTS PIDFile=/run/saslauthd/saslauthd.pid +RuntimeDirectory=saslauthd [Install] WantedBy=multi-user.target