%define name nss_updatedb %define version 7 %define rel 2 %{!?mdkversion: %define notmdk 1} Summary: A caching nss module for disconnected operation Name: %{name} Version: %{version} Release: %mkrel %rel Source: http://www.padl.com/download/%{name}-%{version}.tar.bz2 Source1: nss_updatedb.cron Source2: nss_updatedb.sysconfig # Uses getgrouplist(3) to find out the groups a user belongs to # without enumerating all possible groups first Source3: getgrouplist.c Patch0: nss_updatedb-libdir.patch Patch1: nss_updatedb-3-no-autologremove-on-db4.1.patch Patch2: nss_updatedb-4-key.patch Group: System/Libraries License: GPL Buildroot: %{_tmppath}/%{name}-%{version}-buildroot %if %{?notmdk:1}%{?!notmdk:0} BuildRequires: db4-devel >= 4.0 %else BuildRequires: db_nss-devel >= 4.2.52-5mdk %endif BuildRequires: automake1.4 Url: http://www.padl.com/ Requires: nss_db %description The nss_updatedb utility maintains a local cache of network directory user and group information. Used in conjunction with the pam_ccreds module, it provides a mechanism for disconnected use of network directories. These tools are designed to work with pam_ldap and nss_ldap, also available from PADL. %prep %setup -q %patch0 -p1 -b .libdir %patch1 -p1 -b .db41 %patch2 -p1 -b .key install -m 0644 %{SOURCE3} . %build autoreconf %configure2_5x %if %{?!notmdk:1}%{?notmdk:0} echo "#define DB_DIR \"/var/lib/misc\"" >> config.h %endif echo "#define LIBNSS_DIR \"/%{_lib}\"" >> config.h %make %{?!notmdk:DEFS="-DHAVE_CONFIG_H -I/usr/include/db_nss"} gcc %{optflags} -Werror getgrouplist.c -o getgrouplist %install rm -rf %{buildroot} %makeinstall install -m 755 %{SOURCE1} %{buildroot}/%{_sbindir} install -d %{buildroot}/%{_sysconfdir}/sysconfig install -m 644 %{SOURCE2} %{buildroot}/%{_sysconfdir}/sysconfig/%{name} install -d %{buildroot}/%{_sysconfdir}/cron.{monthly,weekly,daily,hourly} for i in monthly weekly daily hourly do ln -s %{_sbindir}/%{name}.cron %{buildroot}/%{_sysconfdir}/cron.${i}/%{name} done mkdir %{buildroot}%{_bindir} install -m 0755 getgrouplist %{buildroot}%{_bindir} %files %defattr(-,root,root,755) %doc AUTHORS README ChangeLog %{_sbindir}/nss_updatedb* %{_bindir}/getgrouplist %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %{_sysconfdir}/cron*/* %clean rm -rf %{buildroot} %changelog * Fri Nov 17 2006 Andreas Hasenack <andreas@mandriva.com> 7-2mdv2007.0 + Revision: 85283 - tabs - use getgrouplist(3) to get groups instead of "id", which enumerates all groups and is expensive if group info is stored in, for example, LDAP * Fri Nov 17 2006 Andreas Hasenack <andreas@mandriva.com> 7-1mdv2007.1 + Revision: 85127 - updated to version 7, fixing a segfault - bunzipped patches - added Frederic Lepied <flepied@mandriva.com> modifications to only fetch information from logged in users - changed above modifications to cope better with group with spaces in their names (like "Domain Users") - return correct errorlevel on end to avoid cron spamming - Import nss_updatedb * Mon Jun 12 2006 Buchan Milne <bgmilne@mandriva.org> 6-1mdv2007.0 - new version 6 - integrate changes from bug #19461 - drop pre-%%mkrel macros - integrate changes to build on non-mandriva systems (with compat macros) * Wed Oct 26 2005 Pierre Palatin <pierre@palats.com> 4-2mdk - Patch for x86_64 * Mon Jul 11 2005 Buchan Milne <bgmilne@linux-mandrake.com> 4-1mdk - New release 4 * Fri Dec 10 2004 Buchan Milne <bgmilne@linux-mandrake.com> 3-1mdk - version 3 - drop all patches (merged upstream except for dbpath which can now be set via config.h) - add cron script (S1) and a config file for it (S2) * Wed Dec 08 2004 Buchan Milne <bgmilne@linux-mandrake.com> 1-1mdk - use correct version number - use transactions (p0) - distribution-specific release tag * Mon Aug 16 2004 Luca Berra <bluca@vodka.it> 0.1-2mdk - rebuilt with db-4.2 * Tue Mar 02 2004 Luca Berra <bluca@vodka.it> 0.1-1mdk - initial mandrake contrib