- move the ldapdb auxprop support into a subpackage (#167300) (note: the

ldap password check support in saslauthd doesn't use auxprop)
This commit is contained in:
Nalin Dahyabhai 2005-09-01 22:07:33 +00:00
parent 393c65daca
commit de5ecce3b1

View File

@ -3,24 +3,14 @@
%define _plugindir2 %{_libdir}/sasl2 %define _plugindir2 %{_libdir}/sasl2
%define db_version 4.3.27 %define db_version 4.3.27
# Version 1 support. We provide the library and plugins for the vanishingly
# small number of applications which still need them. As of this writing,
# nothing in Fedora 3 or 4 (Core or Extras) needs them.
%define includev1 0
Summary: The Cyrus SASL library. Summary: The Cyrus SASL library.
Name: cyrus-sasl Name: cyrus-sasl
Version: 2.1.21 Version: 2.1.21
Release: 3 Release: 3.1
License: Freely Distributable License: Freely Distributable
Group: System Environment/Libraries Group: System Environment/Libraries
Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-%{version}.tar.gz Source0: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-%{version}.tar.gz
Source1: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-%{version}.tar.gz.sig Source1: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-%{version}.tar.gz.sig
%if %{includev1}
Source2: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-%{cs1_version}.tar.gz
Source3: ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-%{cs1_version}.tar.gz.sig
Source5: README.RPM
%endif
Source4: saslauthd.init Source4: saslauthd.init
Source6: http://www.sleepycat.com/update/%{db_version}/db-%{db_version}.tar.gz Source6: http://www.sleepycat.com/update/%{db_version}/db-%{db_version}.tar.gz
Source7: sasl-mechlist.c Source7: sasl-mechlist.c
@ -28,15 +18,6 @@ Source8: sasl-checkpass.c
Source9: saslauthd.sysconfig Source9: saslauthd.sysconfig
URL: http://asg.web.cmu.edu/sasl/sasl-library.html URL: http://asg.web.cmu.edu/sasl/sasl-library.html
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
%if %{includev1}
Patch0: cyrus-sasl-1.5.24-rpath.patch
Patch1: cyrus-sasl-1.5.28-autoconf25.patch
Patch2: cyrus-sasl-1.5.28-automake17.patch
Patch3: cyrus-sasl-1.5.28-automake18.patch
Patch4: cyrus-sasl-1.5.28-saslauthd2.patch
Patch8: cyrus-sasl-1.5.28-notgnu.patch
Patch16: cyrus-sasl-1.5.28-urandom.patch
%endif
Patch5: cyrus-sasl-2.1.7-gdbm.patch Patch5: cyrus-sasl-2.1.7-gdbm.patch
Patch6: cyrus-sasl-2.1.10-des.patch Patch6: cyrus-sasl-2.1.10-des.patch
Patch7: cyrus-sasl-2.1.20-gssapi-dynamic.patch Patch7: cyrus-sasl-2.1.20-gssapi-dynamic.patch
@ -51,9 +32,6 @@ Patch17: cyrus-sasl-2.1.21-builddir.patch
Patch18: cyrus-sasl-2.1.21-linksrcs.patch Patch18: cyrus-sasl-2.1.21-linksrcs.patch
Patch50: db-4.3.27-initmem.patch Patch50: db-4.3.27-initmem.patch
Buildroot: %{_tmppath}/%{name}-root Buildroot: %{_tmppath}/%{name}-root
%if %{includev1}
BuildPrereq: gdbm-devel
%endif
BuildPrereq: autoconf, automake, libtool BuildPrereq: autoconf, automake, libtool
BuildPrereq: krb5-devel >= 1.2.2, openssl-devel, pam-devel, pkgconfig BuildPrereq: krb5-devel >= 1.2.2, openssl-devel, pam-devel, pkgconfig
BuildPrereq: mysql-devel, postgresql-devel BuildPrereq: mysql-devel, postgresql-devel
@ -118,6 +96,7 @@ Summary: NTLM support for Cyrus SASL.
The %{name}-ntlm package contains the Cyrus SASL plugin which supports The %{name}-ntlm package contains the Cyrus SASL plugin which supports
the NTLM authentication schemes. the NTLM authentication schemes.
# This would more appropriately be named cyrus-sasl-auxprop-sql.
%package sql %package sql
Requires: %{name}-lib = %{version}-%{release} Requires: %{name}-lib = %{version}-%{release}
Group: System Environment/Libraries Group: System Environment/Libraries
@ -127,37 +106,23 @@ Summary: SQL auxprop support for Cyrus SASL.
The %{name}-sql package contains the Cyrus SASL plugin which supports The %{name}-sql package contains the Cyrus SASL plugin which supports
using a RDBMS for storing shared secrets. using a RDBMS for storing shared secrets.
# This was *almost* named cyrus-sasl-auxprop-ldapdb, but that's a lot of typing.
%package ldap
Requires: %{name}-lib = %{version}-%{release}
Group: System Environment/Libraries
Summary: LDAP auxprop support for Cyrus SASL.
%description ldap
The %{name}-ldap package contains the Cyrus SASL plugin which supports using
a directory server, accessed using LDAP, for storing shared secrets.
%prep %prep
%if %{includev1} %setup -q -a 6
%setup -q -c -a 2 -a 6
%else
%setup -q -c -a 6
%endif
pushd db-%{db_version} pushd db-%{db_version}
%patch50 -p2 -b .initmem %patch50 -p2 -b .initmem
popd popd
%if %{includev1}
pushd cyrus-sasl-%{cs1_version}
%patch0 -p1 -b .rpath
%patch1 -p1 -b .autoconf25
%patch2 -p1 -b .automake17
%patch3 -p1 -b .automake18
%patch4 -p1 -b .saslauthd2
%patch8 -p1 -b .notgnu
%patch12 -p1 -b .env
%patch16 -p1 -b .urandom
rm config/ltconfig
libtoolize -f -c
aclocal -I config -I cmulocal
automake -a -c -f
autoheader
autoconf -f
popd
%endif
pushd cyrus-sasl-%{version}
%patch5 -p1 -b .gdbm %patch5 -p1 -b .gdbm
%patch6 -p1 -b .des %patch6 -p1 -b .des
%patch7 -p1 -b .gssapi-dynamic %patch7 -p1 -b .gssapi-dynamic
@ -192,24 +157,6 @@ popd
mkdir build-static build-shared mkdir build-static build-shared
ln -s ../configure build-static ln -s ../configure build-static
ln -s ../configure build-shared ln -s ../configure build-shared
popd
%if %{includev1}
# Sort of merge the docs.
mkdir cyrus-sasl-%{version}/%{cs1_version}
mkdir cyrus-sasl-%{version}/%{cs1_version}-devel
cp %{name}-%{cs1_version}/{AUTHORS,COPYING,NEWS,README,doc/*.html} cyrus-sasl-%{version}/%{cs1_version}
cp %{name}-%{cs1_version}/doc/*.txt cyrus-sasl-%{version}/%{cs1_version}-devel
# Remove duplicate RFCs.
pushd cyrus-sasl-%{version}/%{cs1_version}-devel
for file in * ; do
if [ -f ../doc/${file} ] ; then
rm -f ${file}
fi
done
popd
%endif
%build %build
CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS CFLAGS="$RPM_OPT_FLAGS -fPIC"; export CFLAGS
@ -243,26 +190,6 @@ if pkg-config openssl ; then
LDFLAGS="`pkg-config --libs-only-L openssl` $LDFLAGS"; export LDFLAGS LDFLAGS="`pkg-config --libs-only-L openssl` $LDFLAGS"; export LDFLAGS
fi fi
%if %{includev1}
pushd cyrus-sasl-%{cs1_version}
%configure \
--enable-static --enable-staticdlopen --with-pic --enable-shared \
--with-plugindir=%{_plugindir} \
--disable-krb4 \
--enable-gssapi${krb5_prefix:+=${krb5_prefix}} --enable-gss_mutexes \
--with-rc4 \
--with-dblib=gdbm \
--with-saslauthd=/var/run/saslauthd --without-pwcheck \
--enable-anon \
--enable-cram \
--enable-digest \
--enable-plain \
--enable-login
make sasldir=%{_plugindir}
tagname=CC libtool --mode=link %{__cc} -o saslauthd1-checkpass -I./include $CFLAGS $RPM_SOURCE_DIR/sasl-checkpass.c $LDFLAGS ./lib/libsasl.la
popd
%endif
# Find the SQL libraries used needed by the SQL auxprop plugin. # Find the SQL libraries used needed by the SQL auxprop plugin.
mysql_config=mysql_config mysql_config=mysql_config
pg_config=pg_config pg_config=pg_config
@ -285,7 +212,6 @@ CFLAGS=`echo $CFLAGS $SQL_CFLAGS | cleanup_flags`; export CFLAGS
CPPFLAGS=`echo $CPPFLAGS $SQL_CFLAGS | cleanup_flags`; export CPPFLAGS CPPFLAGS=`echo $CPPFLAGS $SQL_CFLAGS | cleanup_flags`; export CPPFLAGS
LDFLAGS=`echo $LDFLAGS $SQL_LDFLAGS | cleanup_flags`; export LDFLAGS LDFLAGS=`echo $LDFLAGS $SQL_LDFLAGS | cleanup_flags`; export LDFLAGS
pushd cyrus-sasl-%{version}
build() { build() {
pushd build-$1 pushd build-$1
shift shift
@ -320,9 +246,11 @@ make -C saslauthd testsaslauthd
popd popd
} }
# Build the static library without sql auxprop support. # Build the static library without sql or ldapdb auxprop support. Hopefully
build static --enable-static --disable-shared --disable-sql # the only users of the static library will be clients, which don't use auxprop
# Build the shared library with all that stuff. # functionality anyway.
build static --enable-static --disable-ldapdb --disable-shared --disable-sql
# Build the shared library with all that good stuff.
build shared --enable-static --enable-shared build shared --enable-static --enable-shared
# Merge our static libdb in with libsasl, because we won't be installing it. # Merge our static libdb in with libsasl, because we won't be installing it.
@ -337,23 +265,10 @@ pushd build-shared/lib
tagname=CC ../libtool --mode=link %{__cc} -o sasl2-shared-mechlist -I../../include $CFLAGS $RPM_SOURCE_DIR/sasl-mechlist.c $LDFLAGS ./libsasl2.la tagname=CC ../libtool --mode=link %{__cc} -o sasl2-shared-mechlist -I../../include $CFLAGS $RPM_SOURCE_DIR/sasl-mechlist.c $LDFLAGS ./libsasl2.la
popd popd
popd
%install %install
test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT test "$RPM_BUILD_ROOT" != "/" && rm -rf $RPM_BUILD_ROOT
%if %{includev1} pushd build-shared
pushd cyrus-sasl-%{cs1_version}
make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir}
install -m755 -d $RPM_BUILD_ROOT%{_bindir}
libtool --mode=install \
install -m755 sample/client $RPM_BUILD_ROOT%{_bindir}/sasl-sample-client
libtool --mode=install \
install -m755 sample/server $RPM_BUILD_ROOT%{_bindir}/sasl-sample-server
popd
%endif
pushd cyrus-sasl-%{version}/build-shared
make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2} make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2}
cd ../build-static cd ../build-static
make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2} make install DESTDIR=$RPM_BUILD_ROOT sasldir=%{_plugindir2}
@ -374,6 +289,7 @@ install -m755 utils/dbconverter-2 $RPM_BUILD_ROOT%{_sbindir}/dbconverter-2
# really a man page, but groff seems to be able to cope with it. # really a man page, but groff seems to be able to cope with it.
install -m755 -d $RPM_BUILD_ROOT%{_mandir}/man8/ install -m755 -d $RPM_BUILD_ROOT%{_mandir}/man8/
install -m644 ../saslauthd/saslauthd.mdoc $RPM_BUILD_ROOT%{_mandir}/man8/saslauthd.8 install -m644 ../saslauthd/saslauthd.mdoc $RPM_BUILD_ROOT%{_mandir}/man8/saslauthd.8
popd
# Create the saslauthd listening directory. # Create the saslauthd listening directory.
install -m755 -d $RPM_BUILD_ROOT/var/run/saslauthd install -m755 -d $RPM_BUILD_ROOT/var/run/saslauthd
@ -383,24 +299,12 @@ install -m755 -d $RPM_BUILD_ROOT/etc/rc.d/init.d $RPM_BUILD_ROOT/etc/sysconfig
install -m755 $RPM_SOURCE_DIR/saslauthd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd install -m755 $RPM_SOURCE_DIR/saslauthd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/saslauthd
install -m644 $RPM_SOURCE_DIR/saslauthd.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/saslauthd install -m644 $RPM_SOURCE_DIR/saslauthd.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/saslauthd
popd # Provide an easy way to query the list of available mechanisms.
# Figure out an easy way to test various saslauthd clients.
%if %{includev1}
libtool --mode=install \ libtool --mode=install \
install -m755 cyrus-sasl-%{cs1_version}/saslauthd1-checkpass \ install -m755 build-static/lib/sasl2-static-mechlist \
$RPM_BUILD_ROOT%{_sbindir}/
%endif
#libtool --mode=install \
#install -m755 cyrus-sasl-%{version}/build-shared/saslauthd2-checkpass \
#$RPM_BUILD_ROOT%{_sbindir}/
# Provide out an easy way to query the list of available mechanisms.
libtool --mode=install \
install -m755 cyrus-sasl-%{version}/build-static/lib/sasl2-static-mechlist \
$RPM_BUILD_ROOT%{_sbindir}/ $RPM_BUILD_ROOT%{_sbindir}/
libtool --mode=install \ libtool --mode=install \
install -m755 cyrus-sasl-%{version}/build-shared/lib/sasl2-shared-mechlist \ install -m755 build-shared/lib/sasl2-shared-mechlist \
$RPM_BUILD_ROOT%{_sbindir}/ $RPM_BUILD_ROOT%{_sbindir}/
# Remove unpackaged files from the buildroot. # Remove unpackaged files from the buildroot.
@ -430,25 +334,12 @@ fi
%files %files
%defattr(-,root,root) %defattr(-,root,root)
%if %{includev1} %doc saslauthd/LDAP_SASLAUTHD
%doc %{name}-%{version}/%{cs1_version}
%doc $RPM_SOURCE_DIR/README.RPM
%endif
%doc %{name}-%{version}/saslauthd/LDAP_SASLAUTHD
%if %{includev1}
%dir %{_plugindir}/
%endif
%dir %{_plugindir2}/ %dir %{_plugindir2}/
%{_plugindir2}/*sasldb*.so* %{_plugindir2}/*sasldb*.so*
%{_plugindir2}/*sasldb*.la %{_plugindir2}/*sasldb*.la
%{_plugindir2}/*ldapdb*.so*
%{_plugindir2}/*ldapdb*.la
%{_mandir}/man8/* %{_mandir}/man8/*
%{_sbindir}/dbconverter-2 %{_sbindir}/dbconverter-2
%if %{includev1}
%{_sbindir}/saslpasswd
%{_sbindir}/sasldblistusers
%endif
%{_sbindir}/saslpasswd2 %{_sbindir}/saslpasswd2
%{_sbindir}/sasldblistusers2 %{_sbindir}/sasldblistusers2
%{_sbindir}/saslauthd %{_sbindir}/saslauthd
@ -459,37 +350,26 @@ fi
%files lib %files lib
%defattr(-,root,root) %defattr(-,root,root)
%doc %{name}-%{version}/{AUTHORS,COPYING,NEWS,README,doc/*.html} %doc AUTHORS COPYING NEWS README doc/*.html
%{_libdir}/libsasl*.so.* %{_libdir}/libsasl*.so.*
%dir %{_plugindir2}/ %dir %{_plugindir2}/
%if %{includev1}
%{_plugindir}/*anonymous*.so*
%{_plugindir}/*anonymous*.la
%endif
%{_plugindir2}/*anonymous*.so* %{_plugindir2}/*anonymous*.so*
%{_plugindir2}/*anonymous*.la %{_plugindir2}/*anonymous*.la
%files plain %files plain
%defattr(-,root,root) %defattr(-,root,root)
%if %{includev1}
%{_plugindir}/*plain*.so*
%{_plugindir}/*plain*.la
%{_plugindir}/*login*.so*
%{_plugindir}/*login*.la
%endif
%{_plugindir2}/*plain*.so* %{_plugindir2}/*plain*.so*
%{_plugindir2}/*plain*.la %{_plugindir2}/*plain*.la
%{_plugindir2}/*login*.so* %{_plugindir2}/*login*.so*
%{_plugindir2}/*login*.la %{_plugindir2}/*login*.la
%files ldap
%defattr(-,root,root)
%{_plugindir2}/*ldapdb*.so*
%{_plugindir2}/*ldapdb*.la
%files md5 %files md5
%defattr(-,root,root) %defattr(-,root,root)
%if %{includev1}
%{_plugindir}/*crammd5*.so*
%{_plugindir}/*crammd5*.la
%{_plugindir}/*digestmd5*.so*
%{_plugindir}/*digestmd5*.la
%endif
%{_plugindir2}/*crammd5*.so* %{_plugindir2}/*crammd5*.so*
%{_plugindir2}/*crammd5*.la %{_plugindir2}/*crammd5*.la
%{_plugindir2}/*digestmd5*.so* %{_plugindir2}/*digestmd5*.so*
@ -507,54 +387,26 @@ fi
%files gssapi %files gssapi
%defattr(-,root,root) %defattr(-,root,root)
%if %{includev1}
%{_plugindir}/*gssapi*.so*
%{_plugindir}/*gssapi*.la
%endif
%{_plugindir2}/*gssapi*.so* %{_plugindir2}/*gssapi*.so*
%{_plugindir2}/*gssapi*.la %{_plugindir2}/*gssapi*.la
%files devel %files devel
%defattr(-,root,root) %defattr(-,root,root)
%if %{includev1} %doc doc/*.txt
%doc %{name}-%{version}/%{cs1_version}-devel
%endif
%doc %{name}-%{version}/doc/*.txt
%if %{includev1}
%{_bindir}/sasl-sample-client
%{_bindir}/sasl-sample-server
%endif
%{_bindir}/sasl2-sample-client %{_bindir}/sasl2-sample-client
%{_bindir}/sasl2-sample-server %{_bindir}/sasl2-sample-server
%{_includedir}/* %{_includedir}/*
%{_libdir}/libsasl*.a %{_libdir}/libsasl*.a
%{_libdir}/libsasl*.*so %{_libdir}/libsasl*.*so
%if %{includev1}
%{_plugindir}/*anonymous*.a
%{_plugindir}/*crammd5*.a
%{_plugindir}/*digestmd5*.a
%{_plugindir}/*gssapi*.a
%{_plugindir}/*login*.a
%{_plugindir}/*plain*.a
%endif
%if 0
%{_plugindir2}/*anonymous*.a
%{_plugindir2}/*crammd5*.a
%{_plugindir2}/*digestmd5*.a
%{_plugindir2}/*gssapi*.a
%{_plugindir2}/*login*.a
%{_plugindir2}/*plain*.a
%{_plugindir2}/*sasldb*.a
%endif
%{_mandir}/man3/* %{_mandir}/man3/*
%{_sbindir}/sasl2-static-mechlist %{_sbindir}/sasl2-static-mechlist
%{_sbindir}/sasl2-shared-mechlist %{_sbindir}/sasl2-shared-mechlist
%if %{includev1}
%{_sbindir}/saslauthd1-checkpass
%endif
#%{_sbindir}/saslauthd2-checkpass
%changelog %changelog
* Thu Sep 1 2005 Nalin Dahyabhai <nalin@redhat.com> 2.1.21-4
- move the ldapdb auxprop support into a subpackage (#167300)
(note: the ldap password check support in saslauthd doesn't use auxprop)
* Tue Aug 30 2005 Nalin Dahyabhai <nalin@redhat.com> 2.1.21-3 * Tue Aug 30 2005 Nalin Dahyabhai <nalin@redhat.com> 2.1.21-3
- correct a use of uninitialized memory in the bundled libdb (Arjan van de Ven) - correct a use of uninitialized memory in the bundled libdb (Arjan van de Ven)