File courier-authlib.spec of Package courier-authlib
#
# spec file for package courier-authlib (Version 0.61.0)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: courier-authlib
BuildRequires: expect gcc-c++ gdbm-devel mysql-devel openldap2-devel pam-devel postgresql-devel procps
Summary: Courier Authentication Library
Version: 0.61.0
Release: 1.<RELEASE21>
License: GPL v2 or later
Group: Productivity/Networking/Email/Servers
Url: http://www.courier-mta.org/imap/
Source: %{name}-%{version}.tar.bz2
Source1: courier-authdaemon.init
Source2: rpmlintrc
Patch0: courier-authlib-0.59plus.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: /bin/rm
%define authdaemondir %{_localstatedir}/run/authdaemon.courier-imap
%description
The Courier authentication library provides authentication services for
other Courier applications.
%package devel
License: GPL v2 or later
Summary: Development libraries for the Courier authentication library
Group: Development/Libraries/Other
Requires: courier-authlib = %{version}
%description devel
This package contains the development libraries and files needed to
compile Courier packages that use this authentication library. Install
this package in order to build the rest of the Courier packages. After
they are built and installed this package can be removed. Files in
this package are not needed at runtime.
%package userdb
License: GPL v2 or later
Summary: Userdb support for the Courier authentication library
Group: Productivity/Networking/Email/Servers
Requires: courier-authlib = %{version}
%description userdb
This package installs the userdb support for the Courier authentication
library. Userdb is a simple way to manage virtual mail accounts using
a GDBM-based database file.
%package ldap
License: GPL v2 or later
Summary: LDAP support for the Courier authentication library
Group: Productivity/Networking/Email/Servers
Requires: courier-authlib = %{version}
%description ldap
This package installs LDAP support for the Courier authentication
library. Install this package in order to be able to authenticate using
LDAP.
%package mysql
License: GPL v2 or later
Summary: MySQL support for the Courier authentication library
Group: Productivity/Networking/Email/Servers
Requires: courier-authlib = %{version}
%description mysql
This package installs MySQL support for the Courier authentication
library. Install this package in order to be able to authenticate using
MySQL.
%package pgsql
License: GPL v2 or later
Summary: PostgreSQL support for the Courier authentication library
Group: Productivity/Networking/Email/Servers
Requires: courier-authlib = %{version}
%description pgsql
This package installs PostgreSQL support for the Courier authentication
library. Install this package in order to be able to authenticate using
PostgreSQL.
%package pipe
License: GPL v2 or later
Summary: Pipe support for the Courier authentication library
Group: Productivity/Networking/Email/Servers
Requires: courier-authlib = %{version}
%description pipe
This package installs Pipe support for the Courier authentication
library. Install this package in order to be able to authenticate using
Pipe.
%prep
%setup -q
%patch0
%build
export CFLAGS="$RPM_OPT_FLAGS -DLDAP_DEPRECATED=1"
./configure --prefix=%{_prefix} --sysconfdir=%{_sysconfdir} \
--datadir=%{_datadir}/courier-imap \
--libdir=%{_libdir} --libexecdir=%{_prefix}/lib \
--localstatedir=%{_localstatedir} \
--sharedstatedir=%{_sharedstatedir}/courier-authlib \
--mandir=%{_mandir} --infodir=%{_infodir} --with-piddir=/var/run \
--disable-root-check \
--enable-unicode \
--with-authdaemonvar=%{authdaemondir} \
--host=%{_host} --build=%{_build} --target=%{_target_platform}
# --with-mysql-libs=/usr/lib/mysql/ --with-mysql-includes=/usr/lib/mysql/
%{__make}
%install
make install DESTDIR=$RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT%{_libdir}/courier-authlib/lib*.so* $RPM_BUILD_ROOT%{_libdir}
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/courier-authlib/*.{a,la}
%{__install} -m 755 sysconftool $RPM_BUILD_ROOT%{_prefix}/lib/courier-authlib
%{__install} -m 755 authmigrate $RPM_BUILD_ROOT%{_prefix}/lib/courier-authlib
%{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/init.d
%{__mkdir_p} $RPM_BUILD_ROOT%{_sbindir}
%{__install} -m 755 %{S:1} $RPM_BUILD_ROOT%{_sysconfdir}/init.d/courier-authdaemon
ln -sf /etc/init.d/courier-authdaemon $RPM_BUILD_ROOT%{_sbindir}/rccourier-authdaemon
%post
/sbin/ldconfig
%{_prefix}/lib/courier-authlib/authmigrate >/dev/null
%{_prefix}/lib/courier-authlib/sysconftool %{_sysconfdir}/authlib/*.dist >/dev/null
%preun
%stop_on_removal courier-authdaemon
if [ "$1" = "0" ]; then
rm -f /var/run/authdaemon.courier-imap/{socket,pid,pid.lock}
fi
exit 0
%postun
/sbin/ldconfig
%restart_on_update courier-authdaemon
%insserv_cleanup
exit 0
%post ldap -p /sbin/ldconfig
%postun ldap -p /sbin/ldconfig
%post userdb -p /sbin/ldconfig
%postun userdb -p /sbin/ldconfig
%post mysql -p /sbin/ldconfig
%postun mysql -p /sbin/ldconfig
%post pgsql -p /sbin/ldconfig
%postun pgsql -p /sbin/ldconfig
%post pipe -p /sbin/ldconfig
%postun pipe -p /sbin/ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc README README*html
%doc NEWS COPYING* AUTHORS ChangeLog
%{_sysconfdir}/init.d/courier-authdaemon
%dir %{_sysconfdir}/authlib
%config %{_sysconfdir}/authlib/*
%dir %attr(700,root,root) /var/run/authdaemon.courier-imap
%{_sbindir}/authdaemond
%{_sbindir}/authenumerate
%{_sbindir}/authpasswd
%{_sbindir}/authtest
%{_sbindir}/courierlogger
%{_sbindir}/rccourier-authdaemon
%dir /usr/lib/courier-authlib
/usr/lib/courier-authlib/authmigrate
/usr/lib/courier-authlib/sysconftool
/usr/lib/courier-authlib/authdaemond
/usr/lib/courier-authlib/authsystem.passwd
/usr/lib/courier-authlib/makedatprog
%{_libdir}/libauthcustom.so
%{_libdir}/libauthcustom.so.0*
%{_libdir}/libauthpam.so
%{_libdir}/libauthpam.so.0*
%{_libdir}/libcourierauth.so
%{_libdir}/libcourierauth.so.0*
%{_libdir}/libcourierauthcommon.so
%{_libdir}/libcourierauthcommon.so.0*
%{_libdir}/libcourierauthsasl.so
%{_libdir}/libcourierauthsasl.so.0*
%{_libdir}/libcourierauthsaslclient.so
%{_libdir}/libcourierauthsaslclient.so.0*
%{_mandir}/man1/*
%files userdb
%defattr(-,root,root,-)
%{_sbindir}/makeuserdb
%{_sbindir}/pw2userdb
%{_sbindir}/userdb
%{_sbindir}/userdb-test-cram-md5
%{_sbindir}/userdbpw
%{_libdir}/libauthuserdb.so
%{_libdir}/libauthuserdb.so.0*
%{_mandir}/man8/*userdb*
%files devel
%defattr(-,root,root,-)
%{_bindir}/courierauthconfig
%{_includedir}/*
%{_mandir}/man3/*
%doc authlib.html auth_*.html
%files ldap
%defattr(-,root,root,-)
%doc authldap.schema
%doc README.ldap
%{_libdir}/libauthldap.so*
%doc authldap.schema
%files mysql
%defattr(-,root,root,-)
%{_libdir}/libauthmysql.so*
%files pgsql
%defattr(-,root,root,-)
%{_libdir}/libauthpgsql.so*
%files pipe
%defattr(-,root,root,-)
%{_libdir}/libauthpipe.so*
%changelog
* Tue Dec 09 2008 hvogel@suse.de
- Fix CVE-2008-2380: Use PQsetClientEncoding() for proper
input sanitizing. This fixes a SQL injection possibility with
PGSQL databases that use non-Latin character sets.
Patch: courier-authlib-0.59plus.patch
* Fri Sep 05 2008 hvogel@suse.de
- update to version 0.61.0
* Cleanup: always compile md5, sha* and hmac stuff, and remove all
conditionally-compiled cruft. Move SASL list to an internal header.
Add client-side support for AUTH EXTERNAL.
* authsasl.c (auth_sasl_ex): auth_sasl_ex() supercedes auth_sasl(),
invokes auth_sasl() for non-EXTERNAL SASL methods, implements EXTERNAL
by going through the motions, then setting up a dummy authentication
request.
* authdaemon.c (auth_generic): Check for the dummy EXTERNAL
authentication request, and handle it by invoking auth_getuserinfo(),
rather than sending it down the pipe. This avoid having to implement
a stub in every authentication module.
* authmysqllib.c: Use mysql_set_character_set() instead of SET NAMES
* authmysqllib.c: Fix domain-less queries.
* Drop the unmaintained authvchkpw module.
* authmysqllib.c: Cleanup. Use mysql_real_escape_string instead of
crude filtering.
* More portability fixes.
- add rpmlintrc (shlib-policy-name-error) for the moment
to fix build
* Mon Apr 14 2008 aj@suse.de
- Small changes to make rpmlint happier:
* Rename keywords in init scripts
* Prerequire /bin/rm
* Thu Jan 17 2008 mskibbe@suse.de
- update to version 0.60.2 which
o Portability fix for checking the highest available file
descriptor
o Fix typos
o Use OPEN_MAX, instead of hardcoded
* Fri Jun 08 2007 ro@suse.de
- remove explicit requires for mysql-shared (library is required
anyway)
* Wed Apr 25 2007 mskibbe@suse.de
- update to version 0.59.3 which includes:
o CRAM authentication in vchpw module
o bug fixes
o updated man pages
* Thu Mar 29 2007 rguenther@suse.de
- Add procps BuildRequires due to interesting configure checks
* Mon Mar 26 2007 rguenther@suse.de
- Add gdbm-devel BuildRequires
* Thu Feb 22 2007 mskibbe@suse.de
- update to version 0.59.1 which
o fix some bugs
o Make the spec a little prettier
o Change distro-detection to use "rh" and "fc" for version
detection, and add support for mandriva
o Added the -f option to makeuserdb
o Try to recover when the LDAP server closes the
persistent socket, for inactivity
* Mon Sep 18 2006 mskibbe@suse.de
- fix Bug 204834 - missing rccourier-authdaemon symlink
* Tue Aug 01 2006 mskibbe@suse.de
- Add mysql, pipe, pgsql sub-packages
* Mon Mar 27 2006 kukuk@suse.de
- Add missing ldconfig calls
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Dec 14 2005 kukuk@suse.de
- Update to 0.58 (enable shadow aging support)
* Sun Sep 25 2005 kukuk@suse.de
- Compile with -DLDAP_DEPRECATED
* Fri Jul 29 2005 kukuk@suse.de
- Initial version