update to 2.1.26

systemd support [release 2.1.26-1mamba;Thu Feb 05 2015]
This commit is contained in:
Silvan Calarco 2024-01-05 21:37:54 +01:00
parent 3d9fc708c7
commit 6d193385ea
5 changed files with 89 additions and 106 deletions

View File

@ -1,14 +1,16 @@
Name: cyrus-sasl Name: cyrus-sasl
Version: 2.1.25 Version: 2.1.26
Release: 3mamba Release: 1mamba
Summary: SASL Authentication Daemon for simple authentication and security Summary: SASL Authentication Daemon for simple authentication and security
Group: System/Libraries Group: System/Libraries
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://asg.web.cmu.edu/sasl/ URL: http://asg.web.cmu.edu/sasl/
Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/%{name}-%{version}.tar.gz Source0: ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-%{version}.tar.gz
Source1: saslauthd-initscript Source1: saslauthd.service
Source2: saslauthd.tmpfiles
Source3: saslauthd.sysconfig
Patch0: %{name}-2.1.21-gcc4.patch Patch0: %{name}-2.1.21-gcc4.patch
Patch1: %{name}-2.1.23-gcc44.patch Patch1: %{name}-2.1.23-gcc44.patch
Patch2: cyrus-sasl-2.1.25-db-5.1.patch Patch2: cyrus-sasl-2.1.25-db-5.1.patch
@ -26,31 +28,37 @@ BuildRequires: libopenssl-devel
BuildRequires: pam-devel BuildRequires: pam-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
Requires: pam >= 0.77 Requires: pam >= 0.77
BuildRoot: %{_tmppath}/%{name}-%{version}-root %systemd_requires
Provides: sasl Provides: sasl
Obsoletes: sasl Obsoletes: sasl
Requires: libsasl2 = %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description %description
SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols. SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating protection of subsequent protocol interactions. To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating protection of subsequent protocol interactions.
If its use is negotiated, a security layer is inserted between the protocol and the connection. If its use is negotiated, a security layer is inserted between the protocol and the connection.
%package -n libsasl %package -n libsasl2
Group: System/Libraries Group: System/Libraries
Summary: Libraries for SASL, the Simple Authentication and Security Layer Summary: Libraries for SASL, the Simple Authentication and Security Layer
Provides: libsasl
Obsoletes: libsasl
%description -n libsasl %description -n libsasl2
SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols. SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating protection of subsequent protocol interactions. To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating protection of subsequent protocol interactions.
If its use is negotiated, a security layer is inserted between the protocol and the connection. If its use is negotiated, a security layer is inserted between the protocol and the connection.
This package contains the libsasl shared library. This package contains the libsasl shared library.
%package -n libsasl-devel %package -n libsasl2-devel
Group: Development/Libraries Group: Development/Libraries
Summary: Static libraries and headers for %{name} Summary: Static libraries and headers for %{name}
Requires: libsasl = %{version}-%{release} Requires: libsasl2 = %{version}-%{release}
Provides: libsasl-devel
Obsoletes: libsasl-devel
%description -n libsasl-devel %description -n libsasl2-devel
SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols. SASL is the Simple Authentication and Security Layer, a method for adding authentication support to connection-based protocols.
To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating protection of subsequent protocol interactions. To use SASL, a protocol includes a command for identifying and authenticating a user to a server and for optionally negotiating protection of subsequent protocol interactions.
If its use is negotiated, a security layer is inserted between the protocol and the connection. If its use is negotiated, a security layer is inserted between the protocol and the connection.
@ -59,10 +67,10 @@ This package contains static libraries and header files need for development.
%prep %prep
%setup -q -n cyrus-sasl-%{version} %setup -q -n cyrus-sasl-%{version}
%patch0 -p1 #%patch0 -p1
#%patch1 -p1 #%patch1 -p1
%patch2 -p0 #%patch2 -p0
%patch3 -p0 #%patch3 -p0
sed -i "s|db-4.7|db-5.1|" configure sed -i "s|db-4.7|db-5.1|" configure
%build %build
@ -81,7 +89,7 @@ sed -i 's,/usr/local/,/usr/,g' configure
--enable-krb4 \ --enable-krb4 \
--with-pam \ --with-pam \
--with-ldap \ --with-ldap \
--with-saslauthd=/var/run/saslauthd \ --with-saslauthd=/run/saslauthd \
--with-plugindir=%{_libdir}/sasl2 \ --with-plugindir=%{_libdir}/sasl2 \
--cache-file= \ --cache-file= \
--with-bdb-incdir=%{_includedir}/db51 --with-bdb-incdir=%{_includedir}/db51
@ -90,77 +98,89 @@ make
%install %install
[ %{buildroot} != / ] && rm -rf "%{buildroot}" [ %{buildroot} != / ] && rm -rf "%{buildroot}"
%makeinstall %makeinstall \
# sasldir=%{_libdir}/sasl2 sasldir=%{_libdir}/sasl2
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/saslauthd.service
install -D -m 0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/saslauthd.conf
install -D -m 0644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/saslauthd
install -D %{SOURCE1} %{buildroot}%{_initrddir}/saslauthd
# install man pages in the expected location, even if they are # install man pages in the expected location, even if they are
# pre-formatted. # pre-formatted.
#mv %{buildroot}%{_mandir}/cat8/* %{buildroot}%{_mandir}/man8/ #mv %{buildroot}%{_mandir}/cat8/* %{buildroot}%{_mandir}/man8/
#rm -fr %{buildroot}%{_mandir}/cat8/ #rm -fr %{buildroot}%{_mandir}/cat8/
install -d %{buildroot}/var/run/saslauthd install -d %{buildroot}%{_sysconfdir}/sysconfig
cat > %{buildroot}%{_sysconfdir}/sysconfig/saslauthd << _EOF
#SASLAUTHD_OPTS="-a pam"
_EOF
%clean %clean
[ %{buildroot} != / ] && rm -rf "%{buildroot}" [ %{buildroot} != / ] && rm -rf "%{buildroot}"
%post %post
# new install if [ $1 -ge 1 ]; then
if [ $1 -eq 1 ]; then %tmpfiles_create %{name}
/sbin/chkconfig --add saslauthd
%{_initrddir}/saslauthd start
fi fi
exit 0 %systemd_post %{name}
:
%preun %preun
# erase %systemd_preun %{name}
if [ $1 -eq 0 ]; then :
%{_initrddir}/saslauthd stop
/sbin/chkconfig --del saslauthd
fi
exit 0
%postun %postun
# upgrade %systemd_postun_with_restart %{name}
if [ $1 -eq 1 ]; then :
%{_initrddir}/saslauthd restart
fi
exit 0
%post -n libsasl -p /sbin/ldconfig %posttrans
%postun -n libsasl -p /sbin/ldconfig # clean old sysv broken links
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
:
%post -n libsasl2 -p /sbin/ldconfig
%postun -n libsasl2 -p /sbin/ldconfig
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%attr(0755,root,root) %{_initrddir}/saslauthd %config(noreplace) %{_sysconfdir}/sysconfig/saslauthd
%{_sbindir}/pluginviewer %{_sbindir}/pluginviewer
%{_sbindir}/saslauthd %{_sbindir}/saslauthd
%{_sbindir}/testsaslauthd
%dir %{_localstatedir}/run/saslauthd
%{_mandir}/man8/saslauthd.*
%files -n libsasl
%defattr(-,root,root)
%{_sbindir}/sasldblistusers2 %{_sbindir}/sasldblistusers2
%{_sbindir}/saslpasswd2 %{_sbindir}/saslpasswd2
%{_sbindir}/testsaslauthd
%{_unitdir}/saslauthd.service
%{_tmpfilesdir}/saslauthd.conf
%{_mandir}/man8/saslauthd.*
%{_mandir}/man8/pluginviewer.8*
%{_mandir}/man8/sasldblistusers2.8*
%{_mandir}/man8/saslpasswd2.8*
%files -n libsasl2
%defattr(-,root,root)
%{_libdir}/libsasl2.so.* %{_libdir}/libsasl2.so.*
%{_mandir}/man8/*
%dir %{_libdir}/sasl2 %dir %{_libdir}/sasl2
%{_libdir}/sasl2/*.so.* %{_libdir}/sasl2/*.so.*
%{_libdir}/sasl2/*.so %{_libdir}/sasl2/*.so
%{_libdir}/sasl2/*.la %{_libdir}/sasl2/*.la
%doc AUTHORS ChangeLog COPYING NEWS README %doc AUTHORS COPYING
%files -n libsasl-devel %files -n libsasl2-devel
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_includedir}/sasl %dir %{_includedir}/sasl
%{_includedir}/sasl/* %{_includedir}/sasl/*
%{_libdir}/*.la %{_libdir}/*.la
%{_libdir}/*.so %{_libdir}/*.so
%{_libdir}/pkgconfig/libsasl2.pc
%{_mandir}/man3/* %{_mandir}/man3/*
%doc doc/*.txt doc/*.html %doc doc/*.txt doc/*.html
%doc ChangeLog NEWS README
%changelog %changelog
* Thu Feb 05 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.26-1mamba
- update to 2.1.26
- systemd support
* Mon Apr 28 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.25-3mamba * Mon Apr 28 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 2.1.25-3mamba
- rebuilt with --with-plugindir=%{_libdir}/sasl2 for x86_64 - rebuilt with --with-plugindir=%{_libdir}/sasl2 for x86_64

View File

@ -1,60 +0,0 @@
#!/bin/sh
#
# saslauthd This shell script takes care of starting and stopping
# saslauthd.
#
# chkconfig: 2345 50 10
# description: saslauthd is the Sasl authentication daemon.
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -x /usr/sbin/saslauthd ] || exit 0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo -n "Starting Sasl authentication daemon: "
saslauthd -a pam &
evaluate_retval
echo
touch /var/lock/subsys/saslauthd
;;
stop)
# Stop daemons.
echo -n "Stopping Sasl authentication daemon: "
killproc saslauthd
evaluate_retval
echo
rm -f /var/lock/subsys/saslauthd
;;
status)
status saslauthd
;;
restart)
$0 stop
$0 start
;;
reload)
$0 stop
$0 start
;;
condrestart)
if [ -f /var/lock/subsys/saslauthd ]; then
$0 stop
$0 start
fi
;;
*)
echo "Usage: saslauthd {start|stop|restart|status}"
exit 1
esac
exit 0

11
saslauthd.service Normal file
View File

@ -0,0 +1,11 @@
[Unit]
Description=SASL authentication daemon
[Service]
Type=forking
PIDFile=/run/saslauthd/saslauthd.pid
EnvironmentFile=/etc/sysconfig/saslauthd
ExecStart=/usr/sbin/saslauthd -m $SOCKETDIR -a $MECH $FLAGS
[Install]
WantedBy=multi-user.target

11
saslauthd.sysconfig Normal file
View File

@ -0,0 +1,11 @@
# Directory in which to place saslauthd's listening socket, pid file, and so
# on. This directory must already exist.
SOCKETDIR=/run/saslauthd
# Mechanism to use when checking passwords. Run "saslauthd -v" to get a list
# of which mechanism your installation was compiled with the ablity to use.
MECH=pam
# Additional flags to pass to saslauthd on the command line. See saslauthd(8)
# for the list of accepted flags.
FLAGS=

1
saslauthd.tmpfiles Normal file
View File

@ -0,0 +1 @@
d /run/saslauthd 0755 saslauth saslauth -