%define name autofs %define version 5.0.2 %define release %mkrel 7 Name: %{name} Version: %{version} Release: %{release} License: GPL Summary: A tool for automatically mounting and unmounting filesystems Group: System/Kernel and hardware URL: ftp://ftp.kernel.org/pub/linux/daemons/autofs Source0: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2 Source1: %{name}.init Source2: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2.sign Patch0: autofs-5.0.2-add-krb5-include.patch Patch1: autofs-5.0.2-bad-proto-init.patch Patch2: autofs-5.0.2-add-missing-multi-support.patch Patch3: autofs-5.0.2-add-multi-nsswitch-lookup.patch Patch4: autofs-5.0.2-consistent-random-selection-option-name.patch Patch5: autofs-5.0.2-fix-offset-dir-create.patch Patch6: autofs-5.0.2-quote-exports.patch Patch7: autofs-5.0.2-hi-res-time.patch Patch8: autofs-5.0.2-quoted-slash-alone.patch Patch9: autofs-5.0.2-fix-dnattr-parse.patch Patch10: autofs-5.0.2-fix-nfs-version-in-get-supported-ver-and-cost.patch Patch11: autofs-5.0.2-instance-stale-mark.patch Patch12: autofs-5.0.2-fix-largefile-dumbness.patch Patch13: autofs-5.0.2-dont-fail-on-empty-master.patch Patch14: autofs-5.0.2-ldap-percent-hack.patch Patch15: autofs-5.0.2-fix-mount-nfs-nosymlink.patch Patch16: autofs-5.0.2-dont-fail-on-empty-master-fix.patch Patch17: autofs-5.0.2-default-nsswitch.patch Patch18: autofs-5.0.2-add-ldap-schema-discovery.patch Patch19: autofs-5.0.2-random-selection-fix.patch Patch20: autofs-5.0.2-timeout-option-parse-fix.patch Patch21: autofs-5.0.2-ldap-check-star.patch Patch22: autofs-5.0.2-add-ldap-schema-discovery-fix.patch Patch23: autofs-5.0.2-ldap-schema-discovery-config-update.aptch Patch24: autofs-5.0.2-ldap-search-basedn-list.patch Patch101: autofs-5.0.2-set-default-browse-mode.patch Patch102: autofs-5.0.2-separate-config-files.patch Patch103: autofs-5.0.2-rename-configuration-file.patch Patch105: autofs-5.0.1-rc3-comment-default-master-map.patch Requires: nfs-utils-clients Requires: kernel >= 2.6.17 Requires(post): rpm-helper Requires(preun):rpm-helper BuildRequires: openldap-devel BuildRequires: flex BuildRequires: bison BuildRequires: libsasl-devel BuildRequires: krb-devel Conflicts: autosmb Buildroot: %{_tmppath}/%{name}-%{version} %description autofs is a daemon which automatically mounts filesystems when you use them, and unmounts them later when you are not using them. This can include network filesystems, CD-ROMs, floppies, and so forth. %prep %setup -q -n %{name}-%{version} %patch0 -p 1 %patch1 -p 1 %patch2 -p 1 %patch3 -p 1 %patch4 -p 1 %patch5 -p 1 %patch6 -p 1 %patch7 -p 1 %patch8 -p 1 %patch9 -p 1 %patch10 -p 1 %patch11 -p 1 %patch12 -p 1 %patch13 -p 1 %patch14 -p 1 %patch15 -p 1 %patch16 -p 1 %patch17 -p 1 %patch18 -p 1 %patch19 -p 1 %patch20 -p 1 %patch21 -p 1 %patch22 -p 1 %patch23 -p 1 %patch24 -p 1 %patch101 -p 1 %patch102 -p 1 %patch103 -p 1 %patch105 -p 1 %build autoconf %serverbuild %configure2_5x --with-mapdir=%{_sysconfdir}/%{name} \ --with-confdir=%{_sysconfdir}/%{name} \ --with-sasl=yes %make DONTSTRIP=1 mkdir examples cp samples/ldap* examples cp samples/autofs.schema examples rm -f README.gentoo %install rm -rf %{buildroot} mkdir -p %{buildroot}%{_sbindir} mkdir -p %{buildroot}%{_libdir}/autofs mkdir -p %{buildroot}%{_mandir}/{man5,man8} mkdir -p %{buildroot}%{_sysconfdir} %make install INSTALLROOT=%{buildroot} install -d -m 755 %{buildroot}%{_initrddir} install -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} rm -f %{buildroot}%{_sysconfdir}/init.d/%{name} rm -f %{buildroot}%{_mandir}/man8/autofs* cat > README.urpmi <<EOF Mandriva RPM specific notes setup ----- Configuration handling in Mandriva package differs from upstream one on several points: - the automounts daemon configuration file is %{_sysconfdir}/autofs/autofs.conf - the autofs service configuration file is %{_sysconfdir}/sysconfig/autofs - the configuration directives in %{_sysconfdir}/autofs/autofs.conf don't have the 'DEFAULT_' prefix (for instance, DEFAULT_TIMEOUT is just TIMEOUT). This has recently been changed upstream in version 5.0.2 too, but given than documentation still refers to old names Upgrade ------- Map files have been moved from %{_sysconfdir} to %{_sysconfdir}/autofs. Upgrade procedure should handle the change automatically. LDAP usage has changed between autofs 4 and 5. The LDAP schema used has now to be configured explicitely in autofs configuration, so as to avoid useless queries. As this can't be handled by package upgrade procedure, you'll have to edit your configuration manually. See auto.master(5) for details. EOF %pre if [ $1 != "0" ]; then # upgrade if [ ! -d %{_sysconfdir}/autofs ]; then # 4 -> 5 upgrade mkdir %{_sysconfdir}/autofs for file in %{_sysconfdir}/auto.{master,misc,net,smb}; do if [ -f "$file" ]; then mv $file* %{_sysconfdir}/autofs fi done fi fi %post %_post_service autofs %preun %_preun_service autofs %clean rm -rf %{buildroot} %files %defattr(-,root,root) %doc INSTALL CHANGELOG CREDITS README* examples %config(noreplace) %{_sysconfdir}/autofs %config(noreplace) %{_sysconfdir}/sysconfig/autofs %{_initrddir}/%{name} %{_libdir}/%{name} %{_sbindir}/automount %{_mandir}/*/* %changelog * Mon Oct 01 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.2-7mdv2008.0 + Revision: 94155 - don't deal with /etc/modules.conf, this file isn't used anymore * Sat Sep 15 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.2-6mdv2008.0 + Revision: 86323 - add a reference to README.urpmi in configuration files comments - don't ship upstream init script man page - more explicit description of differences with upstream configuration - patch 103: ensure configuration file remains /etc/autofs/autofs.conf * Tue Sep 11 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.2-5mdv2008.0 + Revision: 84307 - re-enable sasl build * Mon Sep 10 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.2-4mdv2008.0 + Revision: 84274 - update to latest upstream patch set - fix configuration file name to autofs.conf - disable sasl support, as it doesn't build * Mon Jul 30 2007 Andreas Hasenack <andreas@mandriva.com> 5.0.2-3mdv2008.0 + Revision: 56585 - added digital signature for tarball - really enable sasl build (we already buildrequire it) * Thu Jul 19 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.2-2mdv2008.0 + Revision: 53710 - build requires sasl-devel - set default browse mode to reduce cpu usage (fix #31901) * Thu Jul 05 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.2-1mdv2008.0 + Revision: 48725 - new version drop patches 100, 101, 102 and 104 (merged upstream) rediff patch 102 * Wed Jul 04 2007 Andreas Hasenack <andreas@mandriva.com> 5.0.1-6mdv2008.0 + Revision: 48210 - rebuild with new serverbuild macro (-fstack-protector-all) - autoconf-2.5x is gone, use plain autoconf * Thu Jun 07 2007 Anssi Hannula <anssi@mandriva.org> 5.0.1-5mdv2008.0 + Revision: 36155 - rebuild with correct optflags * Wed Feb 28 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-2mdv2007.0 + Revision: 130155 - init script harmonization - init script harmonization * Tue Feb 20 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-1mdv2007.1 + Revision: 122961 - fix release tag - final 5.0.1 version * Mon Feb 19 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc3.2mdv2007.1 + Revision: 122733 - update to latest patch level - fix init script indentation add condrestart and condreload actions * Fri Jan 12 2007 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc3.1mdv2007.1 + Revision: 107864 - new version (should fix #28113) rediff configuration patches drop ldap fix patch (merged upstream) - Import autofs * Wed Sep 13 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc2.2mdv2007.0 - more dependencies in init script * Tue Sep 05 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc2.1mdv2007.0 - new version - fix reload function in initscript (#25128) - changed README.mdv to README.urpmi - add some notes about LDAP handling change * Sat Sep 02 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc1.6mdv2007.0 - comment default master map entries - soft dependencies against ldap in init script * Tue Aug 29 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc1.5mdv2007.0 - buildrequires * Tue Aug 29 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc1.4mdv2007.0 - more cautious file testing during upgrade (fix #24768) * Sat Aug 26 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc1.3mdv2007.0 - fix ldap lookup when only a map name is given * Sat Aug 26 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc1.2mdv2007.0 - fix prevention of stripping * Fri Aug 25 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.1-0.rc1.1mdv2007.0 - new version - handle 4.x -> 5.x configuration file location change - add status option to init script * Fri Jun 30 2006 Guillaume Rousse <guillomovitch@mandriva.org> 5.0.0-0.beta6.1mdv2007.0 - new version - move configuration files in /etc/autofs - drop patches 1 and 9 (merged upstream) - drop patch 2, 3, 7 and 12 (useless or undesirable according to developpers) - use -DDONTSTRIP instead of -DDEBUG to prevent stripping before installation * Sat Apr 29 2006 Stefan van der Eijk <stefan@eijk.nu> 4.1.4-9mdk - Rebuild for sparc * Thu Jan 26 2006 Guillaume Rousse <guillomovitch@mandriva.org> 4.1.4-8mdk - multimount patch (Andrey Borzenkov <arvidjaar@mail.ru>) - various fixes in init script (Quel Qun <kelk1@comcast.net>) - more init script cleanup * Thu Jan 19 2006 Guillaume Rousse <guillomovitch@mandriva.org> 4.1.4-6mdk - new custom initscript, with parallel init and timeout support - move executable scripts from /etc to /usr/lib/autofs - drop redundant portmap requires - drop useless README files * Mon Nov 14 2005 Guillaume Rousse <guillomovitch@mandriva.org> 4.1.4-5mdk - define -DLDAP_DEPRECATED (fix #19605) - make sure -g and standard optimisation flags are used - cleanup samples file in documentation - don't mark scripts as executable (TODO: install them under /usr/lib/autofs) - drop non-applied patches * Fri Nov 04 2005 Guillaume Rousse <guillomovitch@mandriva.org> 4.1.4-4mdk - spec cleanup - more macros * Wed Aug 31 2005 Oden Eriksson <oeriksson@mandriva.com> 4.1.4-3mdk - rebuilt against new openldap-2.3.6 libs - misc rpmlint fixes * Thu Jul 14 2005 Nicolas Lécureuil <neoclust@mandriva.org> 4.1.4-2mdk - Fix conflicts - preReq => Requires(pre) * Mon May 23 2005 Stefan van der Eijk <stefan@eijk.nu> 4.1.4-1mdk - 4.1.4 - start autofs after named (45 --> 60) - rediffed patch 3 (auto-master) - rediffed patch 4 (init-redhat-only) now only changes the runlevel config - rediffed patch 8 (stripdash) - remove patch 20 (bad_chdir) merged upstream - remove patch 21 (mtab_lock) merged upstream - remove patch 22 (non_block_ping) merged upstream - disable patch 23 (replicated_server_select) more or less merged upstream - rediffed patch 24 (signal-race-fix) - disable patch 25 (sock-leak-fix) more or less merged upstream - remove patch 26 (strict) merged upstream - spec file cosmetics (%%mkrel, remove %%ver, no TODO file in doc, add auto.smb) * Fri Feb 04 2005 Buchan Milne <bgmilne@linux-mandrake.com> 4.1.3-3mdk - rebuild for ldap2.2_7 * Tue Nov 23 2004 Stefan van der Eijk <stefan@mandrake.org> 4.1.3-2mdk - let autofs start after the ldap server * Tue Nov 23 2004 Stefan van der Eijk <stefan@mandrake.org> 4.1.3-1mdk - 4.1.3 - rediff patch 4 - add 4.1.3 patches * Wed May 05 2004 Juan Quintela <quintela@mandrakesoft.com> 4.1.2-1mdk - merge with redhat 4.1.2-2. - actualize spec file. - lots of patches included upstream or irrelevant. - 4.1.2. * Wed Apr 07 2004 Stefan van der Eijk <stefan@eijk.nu> 4.0.0-0.22mdk - Patch18: ldapv3 patch from mc@suse.de - Source1: replace with suse's ldapv3 enabled one - from Michael Scherer : clean some requires