]> git.pld-linux.org Git - packages/cyrus-sasl.git/blobdiff - cyrus-sasl.spec
- allow building without Nagios support
[packages/cyrus-sasl.git] / cyrus-sasl.spec
index 4b759e6dea106806058083199c0b4356190d9b0a..a87bdd9e6a634712a044fdf71ca8d088deb6406c 100644 (file)
@@ -1,17 +1,17 @@
-# TODO:
-# - add ldap plugin from openldap sources
 #
 # Conditional build:
 %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)
-%bcond_with    opie            # enable opie plugin
-%bcond_with    srp             # build srp pluggin
+%bcond_with    opie            # OTP plugin using opie library instead of internal code
+%bcond_with    srp             # build srp plugin
 %bcond_with    pwcheck         # build pwcheck helper (deprecated)
 #
 %if %{without mysql} && %{without pgsql}
@@ -24,12 +24,13 @@ Summary(pt_BR.UTF-8):       Implementação da API SASL
 Summary(ru.UTF-8):     Библиотека Cyrus SASL
 Summary(uk.UTF-8):     Бібліотека Cyrus SASL
 Name:          cyrus-sasl
-Version:       2.1.25
-Release:       1
+Version:       2.1.28
+Release:       2
 License:       distributable
 Group:         Libraries
-Source0:       ftp://ftp.cyrusimap.org/cyrus-sasl/%{name}-%{version}.tar.gz
-# Source0-md5: 341cffe829a4d71f2a6503d669d5a946
+#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
@@ -38,23 +39,19 @@ Patch0:             %{name}-nolibs.patch
 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
-URL:           http://asg.web.cmu.edu/sasl/
-BuildRequires: autoconf >= 2.54
-BuildRequires: automake >= 1:1.7
+Patch20:       %{name}-auxprop.patch
+Patch21:       0030-dont_use_la_files_for_opening_plugins.patch
+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
@@ -68,11 +65,12 @@ BuildRequires:      openssl-devel >= 0.9.7d
 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
 Requires:      %{name}-libs = %{version}-%{release}
-Obsoletes:     cyrus-sasl-x509
+Obsoletes:     cyrus-sasl-x509 < %{version}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _sysconfdir     /etc/sasl
@@ -292,19 +290,17 @@ Cyrus SASL MySQL plugin.
 %description mysql -l pl.UTF-8
 Wtyczka MySQL do Cyrus SASL.
 
-%package opie
-Summary:       OPIE Cyrus SASL plugin
-Summary(pl.UTF-8):     Wtyczka OPIE do Cyrus SASL
-Summary(pt_BR.UTF-8):  Mecanismo SASL OPIE
+%package ntlm
+Summary:       Cyrus SASL NTLM plugin
+Summary(pl.UTF-8):     Wtyczka NTLM do Cyrus SASL
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
 
-%description opie
-This plugin implements the SASL OPIE (One Time Password) mechanism.
+%description ntlm
+Cyrus SASL NTLM plugin.
 
-%description opie -l pl.UTF-8
-Wtyczka dodająca obsługę mechanizmu OPIE (hasła jednorazowe) do Cyrus
-SASL.
+%description ntlm -l pl.UTF-8
+Wtyczka NTLM do Cyrus SASL.
 
 %package otp
 Summary:       OTP Cyrus SASL plugin
@@ -312,6 +308,7 @@ Summary(pl.UTF-8):  Wtyczka OTP do Cyrus SASL
 Summary(pt_BR.UTF-8):  Mecanismo SASL OTP
 Group:         Libraries
 Requires:      %{name} = %{version}-%{release}
+Obsoletes:     cyrus-sasl-opie < %{version}
 
 %description otp
 This plugin implements the SASL OTP (One Time Password) mechanism.
@@ -369,6 +366,34 @@ Cyrus SASL sasldb plugin.
 %description sasldb -l pl.UTF-8
 Wtyczka sasldb do Cyrus SASL.
 
+%package ldapdb
+Summary:       Cyrus SASL LDAPDB plugin
+Summary(pl.UTF-8):     Wtyczka LDAPDB do Cyrus SASL
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description ldapdb
+Cyrus SASL ldapdb plugin.
+
+%description ldapdb -l pl.UTF-8
+Wtyczka ldapdb do Cyrus SASL.
+
+%package passdss
+Summary:       PASSDSS Cyrus SASL plugin
+Summary(pl.UTF-8):     Wtyczka PASSDSS do Cyrus SASL
+Summary(pt_BR.UTF-8):  Mecanismo SASL PASSDSS
+Group:         Libraries
+Requires:      %{name} = %{version}-%{release}
+
+%description passdss
+This plugin implements the PASSDSS 3DES mechanism.
+
+%description passdss -l pl.UTF-8
+Wtyczka dodająca obsługę mechanizmu PASSDSS 3DES do Cyrus SASL.
+
+%description passdss -l pt_BR.UTF-8
+Este plugin implementa o mecanismo SASL PASSDSS 3DES.
+
 %package scram
 Summary:       SCRAM Cyrus SASL plugin
 Summary(pl.UTF-8):     Wtyczka SCRAM do Cyrus SASL
@@ -480,30 +505,17 @@ Wtyczka Nagiosa do sprawdzania działania saslauthd.
 %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
-
-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
+%patch20 -p1
+%patch21 -p1
 
 # update to our paths
 sed -i -e '
@@ -511,45 +523,43 @@ 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 \
-       %{?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_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}
 
@@ -557,12 +567,7 @@ cd ..
 %{__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
@@ -597,8 +602,10 @@ libtool --mode=install cp sample/sample-server $RPM_BUILD_ROOT%{_bindir}/sasl-sa
 # 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
@@ -625,8 +632,7 @@ fi
 
 %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?
@@ -644,7 +650,7 @@ fi
 %files libs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libsasl2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libsasl2.so.2
+%attr(755,root,root) %ghost %{_libdir}/libsasl2.so.3
 
 %files devel
 %defattr(644,root,root,755)
@@ -652,6 +658,7 @@ fi
 %attr(755,root,root) %{_libdir}/libsasl.so
 %{_libdir}/libsasl2.la
 %{_includedir}/sasl
+%{_pkgconfigdir}/libsasl2.pc
 %{_mandir}/man3/sasl*.3*
 
 %files static
@@ -687,15 +694,15 @@ fi
 %attr(755,root,root) %{_libdir}/sasl2/libmysql.so*
 %endif
 
-%files otp
+%if %{with ntlm}
+%files ntlm
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/sasl2/libotp.so*
+%attr(755,root,root) %{_libdir}/sasl2/libntlm.so*
+%endif
 
-%if %{with opie}
-%files opie
+%files otp
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/sasl2/libopie.so*
-%endif
+%attr(755,root,root) %{_libdir}/sasl2/libotp.so*
 
 %if %{with pgsql}
 %files pgsql
@@ -711,6 +718,16 @@ fi
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/sasl2/libsasldb.so*
 
+%if %{with ldap}
+%files ldapdb
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/sasl2/libldapdb.so*
+%endif
+
+%files passdss
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/sasl2/libpassdss.so*
+
 %files scram
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/sasl2/libscram.so*
@@ -741,8 +758,7 @@ fi
 
 %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
@@ -755,8 +771,11 @@ fi
 %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
This page took 0.144088 seconds and 4 git commands to generate.