%bcond_without cryptedpw # if you keep crypted passwords in your *sql
%bcond_without ldap # disable LDAP support for saslauthd
%bcond_without gssapi # do not enable GSSAPI support for saslauthd and build gssapi plugin
-%bcond_without mysql # don't build MySQL pluggin
-%bcond_without pgsql # do not build PostgreSQL pluggin
+%bcond_without mysql # don't build MySQL plugin
+%bcond_without nagios # do not enable Nagios plugin
+%bcond_without ntlm # do not build NTLM plugin
+%bcond_without pgsql # do not build PostgreSQL plugin
%bcond_without sqlite # do not enable sqlite 2 plugin
%bcond_without sqlite3 # do not enable sqlite 3 plugin
%bcond_with authlib # enable courier-authlib (i wasn't able to test it)
Summary(ru.UTF-8): Библиотека Cyrus SASL
Summary(uk.UTF-8): Бібліотека Cyrus SASL
Name: cyrus-sasl
-Version: 2.1.26
+Version: 2.1.28
Release: 2
License: distributable
Group: Libraries
-Source0: ftp://ftp.cyrusimap.org/cyrus-sasl/%{name}-%{version}.tar.gz
-# Source0-md5: a7f4e5e559a0e37b3ffc438c9456e425
+#Source0Download: https://github.com/cyrusimap/cyrus-sasl/releases
+Source0: https://github.com/cyrusimap/cyrus-sasl/releases/download/%{name}-%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 6f228a692516f5318a64505b46966cfa
Source1: saslauthd.init
Source2: saslauthd.sysconfig
Source3: %{name}.pam
Patch1: %{name}-lt.patch
Patch2: %{name}-split-sql.patch
Patch3: %{name}-opie.patch
-Patch4: %{name}-gcc4.patch
# Adapted from http://frost.ath.cx/software/cyrus-sasl-patches/dist/2.1.19/cyrus-sasl-2.1.19-checkpw.c+sql.c.patch
Patch5: %{name}-cryptedpw.patch
Patch6: %{name}-md5sum-passwords.patch
Patch7: %{name}-db.patch
-Patch8: %{name}-keytab.patch
Patch9: %{name}-sizes.patch
Patch10: %{name}-nagios-plugin.patch
-Patch11: %{name}-parallel-make.patch
Patch12: %{name}-gssapi-detect.patch
-Patch13: %{name}-saslauthd-httpform-urlescape.patch
Patch14: %{name}-ac-libs.patch
-Patch15: %{name}-pam.patch
-Patch16: %{name}-gssapi_ext.patch
-Patch17: 0032-revert_1.103_revision_to_unbreak_GSSAPI.patch
-Patch18: 0033-fix_segfault_in_GSSAPI.patch
-Patch19: 0034-fix_dovecot_authentication.patch
Patch20: %{name}-auxprop.patch
Patch21: 0030-dont_use_la_files_for_opening_plugins.patch
-Patch22: %{name}-stddef.patch
-Patch23: http://sourceforge.net/projects/miscellaneouspa/files/glibc217/cyrus-sasl-2.1.26-glibc217-crypt.diff
-URL: http://asg.web.cmu.edu/sasl/
-BuildRequires: autoconf >= 2.54
-BuildRequires: automake >= 1:1.7
+URL: https://www.cyrusimap.org/sasl/
+BuildRequires: autoconf >= 2.63
+BuildRequires: automake >= 1:1.11
%{?with_authlib:BuildRequires: courier-authlib-devel}
BuildRequires: db-devel
BuildRequires: ed
BuildRequires: pam-devel
%{?with_pgsql:BuildRequires: postgresql-devel}
BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: sphinx-pdg-3
%{?with_sqlite:BuildRequires: sqlite-devel}
%{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
Requires: pam >= 0.79.0
%description mysql -l pl.UTF-8
Wtyczka MySQL do Cyrus SASL.
+%package ntlm
+Summary: Cyrus SASL NTLM plugin
+Summary(pl.UTF-8): Wtyczka NTLM do Cyrus SASL
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description ntlm
+Cyrus SASL NTLM plugin.
+
+%description ntlm -l pl.UTF-8
+Wtyczka NTLM do Cyrus SASL.
+
%package otp
Summary: OTP Cyrus SASL plugin
Summary(pl.UTF-8): Wtyczka OTP do Cyrus SASL
%patch1 -p1
%patch2 -p1
%patch3 -p1
-%patch4 -p1
%if %{with cryptedpw}
%patch5 -p1
%patch6 -p1
%endif
%patch7 -p1
-%patch8 -p1
%patch9 -p1
-%patch10 -p1
-%patch11 -p1
+%{?with_nagios:%patch10 -p1}
%patch12 -p1
-%patch13 -p0
%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch17 -p1
-%patch18 -p1
-%patch19 -p1
%patch20 -p1
%patch21 -p1
-%patch22 -p1
-
-cd doc
-echo "cyrus-sasl complies with the following RFCs:" > rfc-compliance
-ls rfc*.txt >> rfc-compliance
-rm -f rfc*.txt
-cd ..
-
-# old version
-%{__rm} config/libtool.m4
# update to our paths
sed -i -e '
s,/etc/saslauthd.conf,%{_sysconfdir}/saslauthd.conf,g
s,/var/run/saslauthd/mux,/var/lib/sasl2/mux,g
s,/var/state/saslauthd,/var/lib/sasl2,g
-' saslauthd/saslauthd.8 saslauthd/saslauthd.mdoc saslauthd/LDAP_SASLAUTHD doc/sysadmin.html
+' saslauthd/saslauthd.mdoc saslauthd/LDAP_SASLAUTHD doc/legacy/sysadmin.html
%build
%{__libtoolize}
-%{__aclocal} -I cmulocal -I config
-%{__autoheader}
+%{__aclocal} -I m4
%{__autoconf}
-%{__automake}
-cd saslauthd
-%{__aclocal} -I ../cmulocal -I ../config
%{__autoheader}
-%{__autoconf}
%{__automake}
-cd ..
%configure \
+ SPHINX_BUILD=/usr/bin/sphinx-build-3 \
%{?with_cryptedpw: LDFLAGS=-lcrypt} \
+ %{!?with_gssapi:--disable-gssapi} \
+ %{?with_gssapi:--enable-gssapi --with-gss_impl=heimdal} \
+ --enable-httpform \
--disable-krb4 \
- %{!?with_gssapi: --disable-gssapi} \
- %{?with_gssapi: --enable-gssapi --with-gss_impl=heimdal} \
+ %{?with_ldap:--enable-ldapdb} \
--enable-login \
+ --enable-passdss \
--enable-sample \
- --enable-httpform \
--enable-sql \
- --enable-passdss \
- %{?with_srp: --enable-srp} \
+ %{?with_srp:--enable-srp} \
--enable-static \
- --with-plugindir=%{_libdir}/sasl2 \
+ %{?with_authlib:--with-authdaemond=/var/spool/authdaemon/socket} \
--with-configdir=%{_sysconfdir} \
--with-dblib=berkeley \
--with-dbpath=/var/lib/sasl2/sasl.db \
- %{?with_authlib:--with-authdaemond=/var/spool/authdaemon/socket} \
- %{?with_ldap: --with-ldap=%{_prefix}} \
- %{?with_ldap: --enable-ldapdb} \
- %{?with_mysql: --with-mysql=%{_prefix}} \
- %{?with_pgsql: --with-pgsql=%{_prefix}} \
- %{?with_sqlite: --with-sqlite=%{_prefix}} \
- %{?with_sqlite3: --with-sqlite3=%{_prefix}} \
- %{?with_opie: --with-opie=%{_prefix}} \
+ %{?with_ldap:--with-ldap} \
+ %{?with_mysql:--with-mysql=%{_prefix}} \
+ %{?with_ntlm:--enable-ntlm} \
+ %{?with_opie:--with-opie=%{_prefix}} \
--with-pam \
- %{?with_pwcheck: --with-pwcheck=/var/lib/sasl2} \
- --with-saslauthd=/var/lib/sasl2
+ %{?with_pgsql:--with-pgsql=%{_prefix}} \
+ --with-plugindir=%{_libdir}/sasl2 \
+ %{?with_pwcheck:--with-pwcheck=/var/lib/sasl2} \
+ --with-saslauthd=/var/lib/sasl2 \
+ %{?with_sqlite:--with-sqlite=%{_prefix}} \
+ %{?with_sqlite3:--with-sqlite3=%{_prefix}}
%{__make}
%{__make} -C saslauthd saslcache
%{__make} -C sample sample-client sample-server
-cd doc
-RFCLIST=$(grep 'rfc.\+\.txt' rfc-compliance)
-for i in $RFCLIST; do
- RFCDIR=../RFC/text/`echo $i | sed -e 's:^rfc::' -e 's:..\.txt$::' `00
- echo -e ',s:'$i':'$RFCDIR/$i'\n,w\nq' | ed index.html
-done
+%{__rm} -rf doc/html/{_sources,objects.inv,.buildinfo}
%install
rm -rf $RPM_BUILD_ROOT
# package for ghost
touch $RPM_BUILD_ROOT/var/lib/sasl2/{cache.flock,cache.mmap,mux,mux.accept,saslauthd.pid}
+%if %{with nagios}
install -d $RPM_BUILD_ROOT/etc/nagios/plugins
%{__sed} -e 's,@plugindir@,%{_libdir}/nagios/plugins,' %{SOURCE4} > $RPM_BUILD_ROOT/etc/nagios/plugins/check_saslauthd.cfg
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog NEWS README
-%doc doc/{ONEWS,TODO,*.txt,*.html,*.fig,rfc-compliance}
+%doc AUTHORS COPYING ChangeLog README doc/legacy/{TODO,*.html,*.fig} doc/html
%dir %{_sysconfdir}
%dir %{_libdir}/sasl2
# sample programs to subpackage instead?
%attr(755,root,root) %{_libdir}/sasl2/libmysql.so*
%endif
+%if %{with ntlm}
+%files ntlm
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/sasl2/libntlm.so*
+%endif
+
%files otp
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/sasl2/libotp.so*
%files saslauthd
%defattr(644,root,root,755)
-%doc cyrus.pam
-%doc saslauthd/{AUTHORS,LDAP_SASLAUTHD}
+%doc cyrus.pam saslauthd/{COPYING,LDAP_SASLAUTHD}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/saslauthd.conf
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/saslauthd
%attr(755,root,root) %{_sbindir}/saslauthd
%ghost /var/lib/sasl2/mux.accept
%ghost /var/lib/sasl2/saslauthd.pid
%{_mandir}/man8/saslauthd.8*
+%{_mandir}/man8/testsaslauthd.8*
+%if %{with nagios}
%files -n nagios-plugin-check_saslauthd
%defattr(644,root,root,755)
%config(noreplace) %verify(not md5 mtime size) /etc/nagios/plugins/check_saslauthd.cfg
%attr(755,root,root) %{_libdir}/nagios/plugins/check_saslauthd
+%endif