Cyrus SASL

This commit is contained in:
YellowJacketLinux 2024-10-16 17:49:13 -07:00
parent 3d927c3b88
commit 26527a6728
2 changed files with 79 additions and 1 deletions

68
24-cyrus-sasl.sh Normal file
View File

@ -0,0 +1,68 @@
#!/bin/bash
if [ "`whoami`" == "root" ]; then
echo "Danger, Will Robinson!"
echo "Do not execute me as r00t"
exit 1
fi
TARBALL="cyrus-sasl-2.1.28.tar.gz"
DNL="https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.28/cyrus-sasl-2.1.28.tar.gz"
SHA256="7ccfc6abd01ed67c1a0924b353e526f1b766b21f42d4562ee635a8ebfc5bb38c"
[ -d cyrus-sasl-2.1.28 ] && rm -rf cyrus-sasl-2.1.28
if [ ! -f ${TARBALL} ]; then
wget ${DNL}
if [ $? -ne 0 ]; then
echo "Could not retrieve ${DNL}"
echo "Sorry."
exit 1
fi
fi
CHECK="`sha256sum ${TARBALL} |awk ' { print $1 } ' `"
if [ "${CHECK}" != "${SHA256}" ]; then
echo "${TARBALL} does not match expected SHA256. Sorry."
exit 1
fi
tar -zxf ${TARBALL} && cd cyrus-sasl-2.1.28
sed '/saslint/a #include <time.h>' -i lib/saslutil.c
sed '/plugin_common/a #include <time.h>' -i plugins/cram.c
./configure --prefix=/usr \
--sysconfdir=/etc \
--enable-auth-sasldb \
--with-dblib=lmdb \
--with-dbpath=/var/lib/sasl/sasldb2 \
--with-sphinx-build=no \
--with-saslauthd=/var/run/saslauthd
if [ $? -ne 0 ]; then
echo "Configure script failed for Cyrus SASL. Sorry."
exit 1
fi
make -j1
if [ $? -ne 0 ]; then
echo "Failed building Cyrus SASL. Sorry."
exit 1
fi
cat > makeinstall.sh << "EOF"
#!/bin/bash
make install
install -d -m700 /var/lib/sasl
install -d -m755 /usr/share/doc/cyrus-sasl-2.1.28/html
install -m644 saslauthd/LDAP_SASLAUTHD /usr/share/doc/cyrus-sasl-2.1.28
install -m644 doc/legacy/*.html /usr/share/doc/cyrus-sasl-2.1.28/html
EOF
echo
echo "As the root user:"
echo
echo " cd cyrus-sasl-2.1.28"
echo " bash makeinstall.sh"
echo

View File

@ -39,7 +39,8 @@ dependencies outside of LFS.
Dependency Two: SQLite3
-----------------------
Justification: Needed to build RPM itself. Depends upon UnZip for documentation.
Justification: Needed to build RPM itself and for Cyrus SASL. Depends upon UnZip
for documentation.
* Script: [`02-sqlite3.sh`](02-sqlite3.sh)
* Status: Script Works
@ -223,4 +224,13 @@ Justification: Needed for Cyrus SASL. No build dependencies outside of LFS.
* Script: [`23-lmdb.sh`](23-lmdb.sh)
* Status: Script Untested
Dependency Twenty-Four: Cyrus SASL
----------------------------------
Justification: Needed for OpenLDAP. Requires LMDB and SQLite3
* Script: [`24-cyrus-sasl.sh`](24-cyrus-sasl.sh)
* Status: Script Untested
* Note: Does not install files needed to start the auth daemon