X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=cyrus-sasl.spec;h=a485be35db03b90f4ab5d1ea6a00b2f45cb8eae6;hb=b4e496d2d008667bd3be29ef2887db3e5485e978;hp=9f6662bf25fe28c778d2c5372a93dd57ce3c7f52;hpb=9255a2e8bf5b4051c1b9ce6051609e5dfd89c9f8;p=packages%2Fcyrus-sasl.git diff --git a/cyrus-sasl.spec b/cyrus-sasl.spec index 9f6662b..a485be3 100644 --- a/cyrus-sasl.spec +++ b/cyrus-sasl.spec @@ -1,59 +1,79 @@ -# # TODO: # - add ldap plugin from openldap sources -# - pgsql? (but sql plugin would require both libs...) # # Conditional build: -%bcond_without ldap # disable LDAP support for saslauthd -%bcond_with gssapi # enable GSSAPI support for saslauthd and build gssapi plugin -%bcond_without mysql # don't build mysql pluggin -%bcond_with pgsql # don't build pgsql pluggin -%bcond_with srp # build srp pluggin -%bcond_with pwcheck # build pwcheck helper (deprecated) -%bcond_with x509 # build x509 plugin (no sources in package???) +%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 sqlite # do not enable sqlite 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 pwcheck # build pwcheck helper (deprecated) +%bcond_with x509 # build x509 plugin (no sources in package???) # +%if %{without mysql} && %{without pgsql} +%undefine with_cryptedpw +%endif + Summary: The SASL library API for the Cyrus mail system Summary(pl): Biblioteka Cyrus SASL Summary(pt_BR): Implementação da API SASL Summary(ru): âÉÂÌÉÏÔÅËÁ Cyrus SASL Summary(uk): â¦Â̦ÏÔÅËÁ Cyrus SASL Name: cyrus-sasl -Version: 2.1.17 -Release: 0.1 +Version: 2.1.22 +Release: 3 License: distributable Group: Libraries Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus/%{name}-%{version}.tar.gz -# Source0-md5: 4add6be2f194dc51aafc64193a1dd77b +# Source0-md5: 45dde9d19193ae9dd388eb68b2027bc9 Source1: saslauthd.init Source2: saslauthd.sysconfig Source3: %{name}.pam -Patch0: %{name}-configdir.patch -Patch1: %{name}-nolibs.patch -Patch2: %{name}-do_dlopen.patch -Patch3: %{name}-ldb4.patch +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 URL: http://asg.web.cmu.edu/sasl/ BuildRequires: autoconf >= 2.54 BuildRequires: automake +%{?with_authlib:BuildRequires: courier-authlib-devel} BuildRequires: db-devel BuildRequires: ed -%{?with_gssapi:BuildRequires: heimdal-devel} -BuildRequires: libtool >= 1.4 +BuildRequires: groff +%{?with_gssapi:BuildRequires: heimdal-devel >= 0.7} +BuildRequires: libtool >= 1.4 %{?with_mysql:BuildRequires: mysql-devel} -%{?with_pgsql:BuildRequires: postgresql-devel} -%{?with_ldap:BuildRequires: openldap-devel} -BuildRequires: openssl-devel >= 0.9.7c +%{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} +BuildRequires: openssl-devel >= 0.9.7d +%{?with_opie:BuildRequires: opie-devel} BuildRequires: pam-devel -Requires(post): /sbin/ldconfig +%{?with_pgsql:BuildRequires: postgresql-devel} +BuildRequires: rpmbuild(macros) >= 1.268 +%{?with_sqlite:BuildRequires: sqlite-devel} +Requires: pam >= 0.79.0 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %define _sysconfdir /etc/sasl +%define specflags -fno-strict-aliasing + %description This is an implementation of the SASL API, useful for adding authentication, authorization, and security to network protocols. The SASL protocol itself is documented in rfc2222; the API standard is a work in progress. +Note: remember to install appropriate plugins, or you won't have any +authentication mechanisms available. + %description -l pl Pakiet cyrus-sasl zawiera implementacjê biblioteki API SASL dla systemu poczty elektronicznej Cyrusa. Biblioteka ta jest przydatna @@ -61,6 +81,9 @@ tak bezpieczeñstwa protoko³ów sieciowych. Sam protokó³ SASL jest opisany w RFC 2222; standaryzacja API jest w toku. +Uwaga: aby by³y dostêpne jakiekolwiek mechanizmy autoryzacji, nale¿y +doinstalowaæ odpowiednie wtyczki. + %description -l pt_BR Esta é uma implementação da API SASL, útil para acrescentar autenticação, autorização e seguança (criptografia) para protocolos de @@ -82,9 +105,9 @@ Summary: Header files and documentation for cyrus-sasl Summary(pl): Pliki nag³ówkowe i dokumentacja dla cyrus-sasl Summary(pt_BR): Exemplos e arquivos para desenvolvimento com SASL Summary(ru): æÁÊÌÙ ÄÌÑ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ Ó ÂÉÂÌÉÏÔÅËÏÊ Cyrus SASL -Summary(ru): æÁÊÌÉ ÄÌÑ ÐÒÏÇÒÁÍÕ×ÁÎÎÑ Ú Â¦Â̦ÏÔÅËÏÀ Cyrus SASL +Summary(uk): æÁÊÌÉ ÄÌÑ ÐÒÏÇÒÁÍÕ×ÁÎÎÑ Ú Â¦Â̦ÏÔÅËÏÀ Cyrus SASL Group: Development/Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description devel This includes the header files and documentation needed to develop @@ -111,7 +134,7 @@ Summary(pl): Statyczne biblioteki cyrus-sasl Summary(ru): óÔÁÔÉÞÅÓËÉÅ ÂÉÂÌÉÏÔÅËÉ Cyrus SASL Summary(uk): óÔÁÔÉÞΦ ¦Â̦ÏÔÅËÉ Cyrus SASL Group: Development/Libraries -Requires: %{name}-devel = %{version} +Requires: %{name}-devel = %{version}-%{release} %description static Static cyrus-sasl libraries. @@ -132,7 +155,7 @@ Summary: Cram-MD5 Cyrus SASL plugin Summary(pl): Wtyczka Cram-MD5 do Cyrus SASL Summary(pt_BR): Mecanismo SASL CRAM-MD5 Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description cram-md5 This plugin implements the SASL CRAM-MD5 mechanism. CRAM-MD5 is the @@ -157,7 +180,7 @@ Summary: Digest-MD5 Cyrus SASL plugin Summary(pl): Wtyczka Digest-MD5 do Cyrus SASL Summary(pt_BR): Mecanismo SASL DIGEST-MD5 Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description digest-md5 This plugin implements the latest draft of the SASL DIGEST-MD5 @@ -184,7 +207,7 @@ Summary: Plain Cyrus SASL plugin Summary(pl): Wtyczka plain do Cyrus SASL Summary(pt_BR): Mecanismo SASL PLAIN Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description plain This plugin implements the SASL PLAIN mechanism. Although insecure, @@ -209,7 +232,7 @@ Summary: Anonymous Cyrus SASL plugin Summary(pl): Wtyczka anonymous do Cyrus SASL Summary(pt_BR): Mecanismo SASL ANONYMOUS Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description anonymous This plugin implements the SASL ANONYMOUS mechanism, used for @@ -228,7 +251,7 @@ Summary: GSSAPI Cyrus SASL plugin Summary(pl): Wtyczka GSSAPI do Cyrus SASL Summary(pt_BR): Mecanismo SASL GSSAPI Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description gssapi This plugin implements the SASL GSSAPI mechanism, used for @@ -246,7 +269,7 @@ autentica Summary: Unsupported Login Cyrus SASL plugin Summary(pl): Nie wspierana wtyczka Login do Cyrus SASL Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description login Unsupported LOGIN Cyrus SASL plugin. @@ -260,7 +283,7 @@ Summary: SRP Cyrus SASL plugin Summary(pl): Wtyczka SRP do Cyrus SASL Summary(pt_BR): Mecanismo SASL SRP Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description srp This plugin implements the SASL SRP mechanism, based on the Secure @@ -286,7 +309,7 @@ Summary: OTP Cyrus SASL plugin Summary(pl): Wtyczka OTP do Cyrus SASL Summary(pt_BR): Mecanismo SASL OTP Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description otp This plugin implements the SASL OTP (One Time Password) mechanism. @@ -295,11 +318,25 @@ This plugin implements the SASL OTP (One Time Password) mechanism. Wtyczka dodaj±ca obs³ugê mechanizmu OTP (has³a jednorazowe) do Cyrus SASL. +%package opie +Summary: OPIE Cyrus SASL plugin +Summary(pl): Wtyczka OPIE do Cyrus SASL +Summary(pt_BR): Mecanismo SASL OPIE +Group: Libraries +Requires: %{name} = %{version}-%{release} + +%description opie +This plugin implements the SASL OPIE (One Time Password) mechanism. + +%description opie -l pl +Wtyczka dodaj±ca obs³ugê mechanizmu OPIE (has³a jednorazowe) do Cyrus +SASL. + %package x509 Summary: x509 Cyrus SASL plugin Summary(pl): Wtyczka x509 do Cyrus SASL Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description x509 x509 Cyrus SASL plugin. @@ -310,9 +347,11 @@ Wtyczka x509 do Cyrus SASL. %package saslauthd Summary: Cyrus SASL authd Summary(pl): Demon authd do Cyrus SASL -Group: Libraries -Requires(post,postun): /sbin/chkconfig -Requires: %{name} = %{version} +Group: Daemons +Requires(post,preun): /sbin/chkconfig +Requires: %{name} = %{version}-%{release} +Requires: /sbin/chkconfig +Requires: rc-scripts %description saslauthd Cyrus SASL authd. @@ -324,7 +363,7 @@ Demon authd do Cyrus SASL. Summary: Cyrus SASL pwcheck helper Summary(pl): Program pomocniczy pwcheck do Cyrus SASL Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description pwcheck Cyrus SASL pwcheck helper. @@ -336,7 +375,7 @@ Program pomocniczy pwcheck do Cyrus SASL. Summary: Cyrus SASL sasldb plugin Summary(pl): Wtyczka sasldb do Cyrus SASL Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description sasldb Cyrus SASL sasldb plugin. @@ -345,22 +384,22 @@ Cyrus SASL sasldb plugin. Wtyczka sasldb do Cyrus SASL. %package mysql -Summary: Cyrus SASL mysql plugin -Summary(pl): Wtyczka mysql do Cyrus SASL +Summary: Cyrus SASL MySQL plugin +Summary(pl): Wtyczka MySQL do Cyrus SASL Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description mysql -Cyrus SASL mysql plugin. +Cyrus SASL MySQL plugin. %description mysql -l pl -Wtyczka mysql do Cyrus SASL. +Wtyczka MySQL do Cyrus SASL. %package pgsql Summary: Cyrus SASL PostgreSQL plugin Summary(pl): Wtyczka PostgreSQL do Cyrus SASL Group: Libraries -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} %description pgsql Cyrus SASL PostgreSQL plugin. @@ -368,21 +407,41 @@ Cyrus SASL PostgreSQL plugin. %description pgsql -l pl Wtyczka PostgreSQL do Cyrus SASL. +%package sqlite +Summary: Cyrus SQLite PostgreSQL plugin +Summary(pl): Wtyczka SQLite do Cyrus SASL +Group: Libraries +Requires: %{name} = %{version}-%{release} + +%description sqlite +Cyrus SASL SQLite plugin. + +%description sqlite -l pl +Wtyczka SQLite do Cyrus SASL. + %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 +%if %{with cryptedpw} +%patch5 -p1 +%patch6 -p1 +%endif cd doc echo "cyrus-sasl complies with the following RFCs:" > rfc-compliance ls rfc*.txt >> rfc-compliance rm -f rfc*.txt +cd .. -%build +rm -rf autom4te.cache saslauthd/autom4te.cache # acinclude.m4 contains only old libtool.m4 -rm -f acinclude.m4 +rm -f acinclude.m4 libtool config/libtool.m4 saslauthd/acinclude.m4 + +%build %{__libtoolize} %{__aclocal} -I cmulocal -I config %{__autoheader} @@ -390,17 +449,20 @@ rm -f acinclude.m4 %{__autoconf} cd saslauthd - %{__aclocal} -I ../cmulocal -I ../config -I config - %{__autoheader} - %{__automake} - %{__autoconf} +%{__libtoolize} +%{__aclocal} -I ../cmulocal -I ../config -I config +%{__autoheader} +%{__automake} +%{__autoconf} cd .. %configure \ + %{?with_cryptedpw: LDFLAGS=-lcrypt} \ --disable-krb4 \ %{!?with_gssapi: --disable-gssapi} \ %{?with_gssapi: --enable-gssapi --with-gss_impl=heimdal} \ --enable-login \ + --enable-sample \ --enable-sql \ %{?with_srp: --enable-srp} \ --enable-static \ @@ -408,14 +470,20 @@ cd .. --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_opie: --with-opie=%{_prefix}} \ --with-pam \ %{?with_pwcheck: --with-pwcheck=/var/lib/sasl2} \ --with-saslauthd=/var/lib/sasl2 %{__make} +%{__make} -C saslauthd testsaslauthd +%{__make} -C saslauthd saslcache + cd doc RFCLIST=`grep 'rfc.\+\.txt' rfc-compliance` for i in $RFCLIST; do @@ -425,7 +493,7 @@ done %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{/var/lib/sasl2,%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ +install -d $RPM_BUILD_ROOT{%{_bindir},/var/lib/sasl2,%{_sysconfdir},/etc/{rc.d/init.d,sysconfig}} \ $RPM_BUILD_ROOT%{_mandir}/man8 %{__make} install \ @@ -435,38 +503,38 @@ install -d $RPM_BUILD_ROOT{/var/lib/sasl2,%{_sysconfdir},/etc/{rc.d/init.d,sysco rm -rf $RPM_BUILD_ROOT%{_mandir}/cat* rm -f $RPM_BUILD_ROOT%{_libdir}/sasl2/*.{la,a} -install {utils,saslauthd}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install utils/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 +install saslauthd/saslauthd.mdoc $RPM_BUILD_ROOT%{_mandir}/man8/saslauthd.8 ln -sf libsasl2.so $RPM_BUILD_ROOT%{_libdir}/libsasl.so touch $RPM_BUILD_ROOT/var/lib/sasl2/sasl.db +# create empty config +touch $RPM_BUILD_ROOT%{_sysconfdir}/saslauthd.conf install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/saslauthd install %{SOURCE3} ./cyrus.pam +install saslauthd/{testsaslauthd,saslcache} $RPM_BUILD_ROOT%{_sbindir} + +# sample programs for testing sasl +libtool --mode=install cp sample/client $RPM_BUILD_ROOT%{_bindir}/sasl-sample-client +libtool --mode=install cp sample/server $RPM_BUILD_ROOT%{_bindir}/sasl-sample-server + %clean rm -rf $RPM_BUILD_ROOT -%post -/sbin/ldconfig -echo "Remember to install appropriate plugins, or you won't have any mechs available." - +%post -p /sbin/ldconfig %postun -p /sbin/ldconfig %post saslauthd /sbin/chkconfig --add saslauthd -if [ -f /var/lock/subsys/saslauthd ]; then - /etc/rc.d/init.d/saslauthd restart 1>&2 -else - echo "Run \"/etc/rc.d/init.d/saslauthd start\" to start saslauthd." -fi +%service saslauthd restart %preun saslauthd if [ "$1" = "0" ]; then - if [ -f /var/lock/subsys/saslauthd ]; then - /etc/rc.d/init.d/saslauthd stop 1>&2 - fi + %service saslauthd stop /sbin/chkconfig --del saslauthd fi @@ -478,12 +546,17 @@ fi %dir %{_libdir}/sasl2 %dir /var/lib/sasl2 %attr(755,root,root) %{_libdir}/lib*.so.*.* +# sample programs to subpackage instead? +%attr(755,root,root) %{_bindir}/sasl-sample-client +%attr(755,root,root) %{_bindir}/sasl-sample-server +%attr(755,root,root) %{_sbindir}/pluginviewer %attr(755,root,root) %{_sbindir}/sasldblistusers2 %attr(755,root,root) %{_sbindir}/saslpasswd2 -%attr(640,root,mail) %ghost %config(noreplace) %verify(not mtime md5 size) /var/lib/sasl2/sasl.db -%{_mandir}/man8/sasldblistusers2.* -%{_mandir}/man8/saslpasswd2.* +%attr(640,root,mail) %ghost %config(noreplace) %verify(not md5 mtime size) /var/lib/sasl2/sasl.db +%{_mandir}/man8/pluginviewer.8* +%{_mandir}/man8/sasldblistusers2.8* +%{_mandir}/man8/saslpasswd2.8* %files devel %defattr(644,root,root,755) @@ -522,6 +595,12 @@ fi %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/sasl2/libotp.so* +%if %{with opie} +%files opie +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/sasl2/libopie.so* +%endif + %files plain %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/sasl2/libplain.so* @@ -533,13 +612,19 @@ fi %if %{with mysql} %files mysql %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/sasl2/libsql*.so* +%attr(755,root,root) %{_libdir}/sasl2/libmysql.so* %endif %if %{with pgsql} %files pgsql %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/sasl2/libsql*.so* +%attr(755,root,root) %{_libdir}/sasl2/libpgsql.so* +%endif + +%if %{with sqlite} +%files sqlite +%defattr(644,root,root,755) +%attr(755,root,root) %{_libdir}/sasl2/libsqlite.so* %endif %if %{with srp} @@ -563,7 +648,11 @@ fi %files saslauthd %defattr(644,root,root,755) %doc cyrus.pam +%doc saslauthd/{AUTHORS,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 +%attr(755,root,root) %{_sbindir}/testsaslauthd +%attr(755,root,root) %{_sbindir}/saslcache %attr(754,root,root) /etc/rc.d/init.d/saslauthd -%config(noreplace) %verify(not mtime md5 size) /etc/sysconfig/saslauthd -%{_mandir}/man8/saslauthd.* +%{_mandir}/man8/saslauthd.8*