# # $Id: autofs.spec,v 1.11 2003/12/04 15:41:32 raven Exp $ # Summary: A tool for automatically mounting and unmounting filesystems. Name: autofs %define version 4.1.3 %define release 119 Version: %{version} Release: %{release} Epoch: 1 License: GPL Group: System Environment/Daemons Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v4/autofs-%{version}.tar.bz2 Source1: autofs.sysconfig Patch1: autofs-4.1.0-hesiod-bind.patch Patch2: autofs-4.1.0-loop.patch Patch3: autofs-4.1.0-auto-master.patch Patch4: autofs-4.1.2-init-redhat-only.patch Patch5: autofs-4.1.3-non-strict-loop-fix.patch Patch12: autofs-4.1.2-option-parsing.patch Patch14: autofs-4.1.3-underlinei18n.patch Patch15: autofs-4.1.3-rpc-ping.patch Patch16: autofs-4.1.3-bad_chdir.patch Patch17: autofs-4.1.3-mtab_lock.patch Patch18: autofs-4.1.3-ian-map-expiry-1.patch Patch19: autofs-4.1.3-disable-direct.patch Patch21: autofs-4.1.3-signal-race-fix.patch Patch22: autofs-4.1.3-sock-leak-fix.patch Patch24: autofs-4.1.3-umount-loopback.patch Patch25: autofs-4.1.3-close-fix.patch Patch26: autofs-4.1.3-intl-status.patch Patch27: autofs-4.1.3-localopts-multi.patch Patch28: autofs-4.1.2-init-duplicate-map.patch Patch29: autofs-4.1.3-filemap-etc-append.patch Patch30: autofs-4.1.3-init-duplicate-map2.patch Patch31: autofs-4.1.3-plus-map-ordering.patch Patch32: autofs-4.1.3-ldap-search-limit.patch Patch33: autofs-4.1.3-browse.patch Patch35: autofs-4.1.3-large-program-map.patch Patch36: autofs-4.1.3-user-message-typo.patch Patch37: autofs-4.1.3-no-reserved-ports.patch Patch38: autofs-4.1.3-init-cwd-map.patch Patch39: autofs-4.1.3-init-lc-all.patch Patch40: autofs-4.1.3-ldap-multiple-map.patch Patch41: autofs-4.1.3-replicated-server-select.patch Patch42: autofs-4.1.3-ian-map-expiry-multimount-fix.patch Patch43: autofs-4.1.3-yp-direct-lookup.patch Patch44: autofs-4.1.3-filestream-leak.patch Patch45: autofs-4.1.3-no-rmdir.patch Patch46: autofs-4.1.3-replicated-server-doc.patch Patch47: autofs-4.1.3-cache-release.patch Patch48: autofs-4.1.3-non-replicated-ping.patch Patch49: autofs-4.1.3-program-map-extra-char-fix.patch Patch50: autofs-4.1.3-duplicate-map-entry-order.patch Patch51: autofs-4.1.3-submount-variable-propagation.patch Patch52: autofs-4.1.3-one-auto-master.patch Patch53: autofs-4.1.3-nsswitch-comment.patch Patch54: autofs-4.1.3-alt-master-ldap.patch Patch55: autofs-4.1.3-auto-smb-mount-fix.patch Patch56: autofs-4.1.3-check-nsswitch-submount.patch Patch57: autofs-4.1.3-init-script-browse.patch Patch58: autofs-4.1.3-local-mount.patch Patch59: autofs-4.1.3-indirect-wildcard.patch Patch60: autofs-4.1.3-multi-over-redhat.patch Buildroot: /var/tmp/autofs-tmp BuildPrereq: autoconf, hesiod-devel, openldap-devel, perl Prereq: chkconfig Requires: /bin/bash mktemp sed gawk textutils sh-utils grep /bin/ps Obsoletes: autofs-ldap Summary(de): autofs daemon Summary(fr): démon autofs Summary(tr): autofs sunucu süreci Summary(sv): autofs-daemon %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. %description -l de autofs ist ein Dämon, der Dateisysteme automatisch montiert, wenn sie benutzt werden, und sie später bei Nichtbenutzung wieder demontiert. Dies kann Netz-Dateisysteme, CD-ROMs, Disketten und ähnliches einschließen. %description -l fr autofs est un démon qui monte automatiquement les systèmes de fichiers lorsqu'on les utilise et les démonte lorsqu'on ne les utilise plus. Cela inclus les systèmes de fichiers réseau, les CD-ROMs, les disquettes, etc. %description -l tr autofs, kullanýlan dosya sistemlerini gerek olunca kendiliðinden baðlar ve kullanýmlarý sona erince yine kendiliðinden çözer. Bu iþlem, að dosya sistemleri, CD-ROM'lar ve disketler üzerinde yapýlabilir. %description -l sv autofs är en daemon som mountar filsystem när de använda, och senare unmountar dem när de har varit oanvända en bestämd tid. Detta kan inkludera nätfilsystem, CD-ROM, floppydiskar, och så vidare. %prep %setup -q echo %{version}-%{release} > .version %patch1 -p1 -b .hesiod-bind %patch2 -p1 -b .loop %patch3 -p1 -b .auto-master %patch4 -p1 -b .init-redhat-only %patch5 -p1 -b .non-strict-loop-fix %patch12 -p1 -b .option-parsing %patch14 -p1 -b .i18n %patch15 -p1 -b .rpc-ping %patch16 -p1 -b .bad-chdir %patch17 -p1 -b .mtab-lock %patch18 -p1 -b .map-expiry %patch19 -p1 -b .disable-direct %patch21 -p1 -b .signal-race-fix %patch22 -p1 -b .sock-leak-fix-2 %patch24 -p1 -b .umount-loopback %patch25 -p1 -b .close-fix %patch26 -p1 -b .intl-status %patch27 -p1 -b .localopts-multi %patch28 -p1 -b .init-duplicate-map %patch29 -p1 -b .filemap-etc-append %patch30 -p1 -b .init-duplicate-map2 %patch31 -p1 -b .plus-map-ordering.patch %patch32 -p1 -b .ldap-search-limit.patch %patch33 -p1 -b .browse %patch35 -p1 -b .large-program-map %patch36 -p1 -b .user-message-typo %patch37 -p1 -b .no-reserved-ports %patch38 -p1 -b .init-cwd %patch39 -p1 -b .init-lc-all %patch40 -p1 -b .ldap-multiple-map %patch41 -p1 -b .replicated-server-select %patch42 -p1 -b .expire-multi %patch43 -p1 -b .yp-direct-lookup %patch44 -p1 -b .filestream-leak %patch45 -p1 -b .no-rmdir %patch46 -p1 %patch47 -p1 -b .cache-release %patch48 -p1 -b .non-replicated-ping %patch49 -p1 -b .program-map-extra-char %patch50 -p1 -b .duplicate-entry-order %patch51 -p1 -b .submount-variable-prop %patch52 -p1 -b .one-auto-master %patch53 -p1 -b .nsswitch-comment %patch54 -p1 -b .alt-master-ldap %patch55 -p1 -b .auto-smb-mount %patch56 -p1 -b .check-nsswitch-submount %patch57 -p1 -b .init-script-browse %patch58 -p1 -b .local-mount %patch59 -p1 -b .indirect-wildcard %patch60 -p1 -b .multi-over cp $RPM_SOURCE_DIR/autofs.sysconfig . %build #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir} %configure make initdir=/etc/rc.d/init.d %install rm -rf $RPM_BUILD_ROOT mkdir -p -m755 $RPM_BUILD_ROOT/etc/rc.d/init.d mkdir -p -m755 $RPM_BUILD_ROOT%{_sbindir} mkdir -p -m755 $RPM_BUILD_ROOT%{_libdir}/autofs mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/{man5,man8} mkdir -p -m755 $RPM_BUILD_ROOT/etc/sysconfig make install mandir=%{_mandir} initdir=/etc/rc.d/init.d INSTALLROOT=$RPM_BUILD_ROOT install -m 755 -d $RPM_BUILD_ROOT/misc install -m 644 autofs.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/autofs %clean [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %post chkconfig --add autofs %postun if [ $1 -ge 1 ] ; then /sbin/service autofs condrestart > /dev/null 2>&1 || : fi %preun if [ "$1" = 0 ] ; then /sbin/service autofs stop > /dev/null 2>&1 || : /sbin/chkconfig --del autofs fi exit 0 %files %defattr(-,root,root) %doc CREDITS COPY* README* TODO multiserver_mount.patch patches/* samples/ldap* samples/autofs.schema %doc %config /etc/rc.d/init.d/autofs %config(noreplace,missingok) /etc/auto.master %config(noreplace,missingok) /etc/auto.misc %config(noreplace,missingok) /etc/auto.net %config(noreplace) /etc/sysconfig/autofs %dir /misc %dir %{_libdir}/autofs %{_sbindir}/automount %{_mandir}/*/* %{_libdir}/autofs/* %changelog * Thu Mar 31 2005 Jeff Moyer - 1:4.1.3-119 - Merge in the multi-over patch. This resolves an issue whereby multimounts (such as those used for /net) could be processed in the wrong order, resulting in directories not showing up in a multimount tree. The fix is to process these directories in order, shortest to longer path. * Wed Mar 23 2005 Chris Feist - 1:4.1.3-115 - Fixed regression causing any entries after a wildcard in an indirect map to be ignored. (bz #151668). - Fixed regression which caused local hosts to be mount instead of --bind local directories. (bz #146887) * Thu Mar 17 2005 Chris Feist - 1:4.1.3-111 - Fixed one off bug in the submount-variable-propagation patch. (bz #143074) - Fixed a bug in the init script which wouldn't find the -browse option if it was preceded by another option. (fz #113494) * Mon Feb 28 2005 Chris Feist - 1:4.1.3-100 - When using ldap if auto.master doesn't exist we now check for auto_master. Addresses bz #130079 - When using an auto.smb map we now remove the leading ':' from the path which caused mount to fail in the past. Addresses bz #147492 - Autofs now checks /etc/nsswitch.conf to determine in what order files & nis are checked when looking up autofs submount maps which don't specify a maptype. Addresses IT #57612. * Mon Feb 14 2005 Jeff Moyer - 1:4.1.3-99 - Change Copyright to License in the spec file so it will build. * Fri Feb 11 2005 Jeff Moyer - 1:4.1.3-98 - Program maps can repeat the last character of output. Fix this. Addresses bz #138606 - Return first entry when there are duplicate keys in a map. Addresses bz #140108. - Propagate custom map variables to submounts. Fixes bz #143074. - Create a sysconfig variable to control whether we source only one master map (the way sun does), or source all maps found (which is the default for backwards compatibility). Addresses bz #143126. - Revised version of the get_best_mount patch. (#146887) cfeist@redhat.com The previous patch introduced a regression. Non-replicated mounts would not have the white space stripped from the entry and the mount would fail. - Handle comment characters in the middle of the automount line in /etc/nsswitch.conf. Addresses bz #127457. * Wed Feb 2 2005 Chris Feist - 1:4.1.3-94 - Stop automount from pinging hosts if there is only one host (#146887) * Wed Feb 2 2005 Jeff Moyer - 1:4.1.3-90 - Fix potential double free in cache_release. This bug showed up in a multi-map setup. Two calls to cache_release would result in a SIGSEGV, and the automount process would never exit. * Mon Jan 24 2005 Chris Feist - 1:4.3-82 - Fixed documentation so users know that any local mounts override any other weighted mount. * Mon Jan 24 2005 Chris Feist - 1:4.3-80 - Added a variable to determine if we created the directory or not so we don't accidently remove a directory that we didn't create when we stop autofs. (bz #134399) * Tue Jan 11 2005 Jeff Moyer - 1:4.1.3-76 - Fix the large program map patch. * Tue Jan 11 2005 Jeff Moyer - 1:4.1.3-75 - Fix some merging breakages that caused the package not to build. * Thu Jan 6 2005 - 1:4.1.3-74 - Add in the map expiry patch - Bring in other patches that have been committed to other branches. This version should now contain all fixes we have to date - Merge conflicts due to map expiry changes * Fri Nov 19 2004 Jeff Moyer - 1:4.1.3-57 - Pass a socket into clntudp_bufcreate so that we don't use up additional reserved ports. This patch, along with the socket leak fix, addresses bz #128966. * Wed Nov 17 2004 - 1:4.1.3-56 - Somehow the -browse patch either didn't get committed or got reverted. Fixed. * Tue Nov 16 2004 Jeff Moyer - 1:4.1.3-55 - Fix program maps so that they can have gt 4k characters. (Neil Horman) Addresses bz #138994. - Add a space after the colon here "Starting automounter:" in init script. Fixes bz #138513. * Mon Nov 15 2004 Jeff Moyer - 1:4.1.3-53 - Make autofs understand -[no]browse. Addresses fz #113494. * Thu Nov 11 2004 Jeff Moyer - 1:4.1.3-48 - Fix the umount loop device function in the init script. * Wed Oct 27 2004 Chris Feist - 1:4.1.3-34 - Added a patch to fix the automounter failing on ldap maps when it couldn't get the whole map. (ie. when the search limit was lower than the number of results) * Thu Oct 21 2004 Chris Feist - 1:4.1.3-32 - Fixed the use of +ypmapname so the maps included with +ypmapname are used in the correct order. (In the past the '+' entries were always processed after local entries.) * Thu Oct 21 2004 Chris Feist - 1:4.1.3-31 - Fixed the duplicate map detection code to detect if maps try to mount on top of existing maps. * Wed Oct 20 2004 Chris Feist - 1:4.1.3-29 - Fixed a problem with backwards compatability. Specifying local maps without '/etc/' prepended to them now works. (bz #136038) * Fri Oct 15 2004 Chris Feist - 1:4.1.3-28 - Fixed a bug which caused directories to never be unmounted. (bz #134403) * Thu Oct 14 2004 Chris Feist - 1:4.1.3-27 - Fixed an error in the init script which caused duplicate entries to be displayed when asking for autofs status. * Fri Oct 1 2004 Jeff Moyer - 1:4.1.3-22 - Comment out map expiry (and related) patch for an FC3 build. * Thu Sep 23 2004 Jeff Moyer - 1:4.1.3-21 - Make local options apply to all maps in a multi-map entry. * Tue Sep 21 2004 Jeff Moyer - 1:4.1.3-20 - Merged my and Ian's socket leak fixes into one, smaller patch. Only partially addresses bz #128966. - Fix some more echo lines for internationalization. bz #77820 - Revert the only one auto.master patch until we implement the +auto_master syntax. Temporarily addresses bz #133055. * Thu Sep 2 2004 Jeff Moyer - 1:4.1.3-18 - Umount loopback filesystems under automount points when stopping the automounter. - Uncomment the map expiry patch. - change a close to an fclose in lookup_file.c * Tue Aug 31 2004 Jeff Moyer - 1:4.1.3-17 - Add patch to support parsing nsswitch.conf to determine map sources. - Disable this patch, and Ian's map expiry patch for a FC build. * Tue Aug 24 2004 Jeff Moyer - 1:4.1.3-16 - Version 3 of Ian's map expiry changes. * Wed Aug 18 2004 Jeff Moyer - 1:4.1.3-15 - Fix a socket leak in the rpc_subs, causing mounts to fail since we are running out of port space fairly quickly. * Wed Aug 18 2004 Jeff Moyer - 1:4.1.3-14 - New map expiry patch from Ian. - Fix a couple signal races. No known problem reports of these, but they are holes, none-the-less. * Tue Aug 10 2004 Jeff Moyer - 1:4.1.3-13 - Only read one auto.master map (instead of concatenating all found sources). - Uncomment Ian's experimental mount expiry patch. * Fri Aug 6 2004 Jeff Moyer - 1:4.1.3-12 - Add a sysconfig entry to disable direct map support, and set this to 1 by default. - Disable the beta map expiry logic so I can build into a stable distro. - Add defaults for all of the sysconfig variables to the init script so we don't trip over user errors (i.e. deleting /etc/sysconfig/autofs). * Wed Aug 4 2004 Jeff Moyer - 1:4.1.3-11 - Add beta map expiry code for wider testing. (Ian Kent) - Fix check for ghosting option. I forgot to check for it in DAEMONOPTIONS. - Remove STRIPDASH from /etc/sysconfig/autofs * Mon Jul 12 2004 Jeff Moyer - 1:4.1.3-10 - Add bad chdir patch from Ian Kent. - Add a typo fix for the mtab lock file. - Nuke the stripdash patch. It didn't solve a problem. * Tue Jun 22 2004 Jeff Moyer - 1:4.1.3-9 - Bump revison for inclusion in RHEL 3. * Mon Jun 21 2004 Jeff Moyer - 1:4.1.3-8 - Change icmp ping to an rpc ping. (Ian Kent) - Fix i18n patch o Remove the extra \" from one echo line. o Use echo -e if we are going to do a \n in the echo string. * Mon Jun 21 2004 Alan Cox - Fixed i18n bug #107463 * Mon Jun 21 2004 Alan Cox - Fixed i18n bug #107461 * Tue Jun 15 2004 Elliot Lee - rebuilt * Sat Jun 5 2004 Jeff Moyer - 1:4.1.3-4 - Perform an icmp ping request before rpc_pings, since the rpc clnt_create function has a builtin default timeout of 60 seconds. This could result in a long delay when a server in a replicated mount setup is down. - For non-replicated server entries, ping a host before attempting to mount. (Ian Kent) - Change to %%configure. - Put version-release into .version to allow for automount --version to print exact info. - Nuke my get-best-mount patch which always uses the long timeout. This should no longer be needed. - Put name into changelog entries to make them consistent. Add e:n-v-r into Florian's entry. - Stop autofs before uninstalling * Sat Jun 05 2004 Florian La Roche - 1:4.1.3-3 - add a preun script to remove autofs * Tue Jun 1 2004 Jeff Moyer - 1:4.1.3-2 - Incorporate patch from Ian which fixes an infinite loop seen by those running older versions of the kernel patches (triggered by non-strict mounts being the default). * Tue Jun 1 2004 Jeff Moyer - 1:4.1.3-1 - Update to upstream 4.1.3. * Thu May 6 2004 Jeff Moyer - 1:4.1.2-6 - The lookup_yp module only dealt with YPERR_KEY, all other errors were treated as success. As a result, if the ypdomain was not bound, the subprocess that starts mounts would SIGSEGV. This is now fixed. - Option parsing in the init script was not precise enough, sometimes matching filesystem options to one of --ghost, --timeout, --verbose, or --debug. The option-parsing patch addresses this issue by making the regexp's much more precise. - Ian has rolled a third version of the replicated mount fixes. * Tue May 4 2004 Jeff Moyer - 1:4.1.2-5 - Ian has a new fix for replicated server and multi-mounts. Updated the patch for testing. Still beta. (Ian Kent) * Mon May 3 2004 Jeff Moyer - 1:4.1.2-4 - Fix broken multi-mounts. test patch. (Ian Kent) * Tue Apr 20 2004 Jeff Moyer - 1:4.1.2-3 - Fix a call to spawnl which forgot to specify a lock file. (nphilipp) * Wed Apr 14 2004 - 1:4.1.2-2 - Pass --libdir= to ./configure so we get this right on 64 bit platforms that support backwards compat. * Wed Apr 14 2004 Jeff Moyer - 1:4.1.2-1 - Change hard-coded paths in the spec file to the %{_xxx} variety. - Update to upstream 4.1.2. - Add a STRIPDASH option to /etc/sysconfig/autofs which allows for compatibility with the Sun automounter options specification syntax in auto.master. See /etc/sysconfig/autofs for more information. Addresses bug 113950. * Tue Apr 6 2004 Jeff Moyer - 1:4.1.1-6 - Add the /etc/sysconfig/autofs file, and supporting infrastructure in the init script. - Add support for UNDERSCORE_TO_DOT for those who want it. - We no longer own /net. Move it to the filesystem package. * Tue Mar 30 2004 Jeff Moyer - 1:4.1.1-5 - Clarify documentation on direct maps. - Send automount daemons a HUP signal during reload. This tells them to re-read maps (otherwise they use a cached version. Patch from the autofs maintainer. * Mon Mar 22 2004 Jeff Moyer - 1:4.1.1-4 - Fix init script to print out failures where appropriate. - Build the automount daemon as a PIE. * Thu Mar 18 2004 Jeff Moyer - 1:4.1.1-3 - Fix bug in get_best_mount, whereby if there is only one option, we choose nothing. This is primarily due to the fact that we pass 0 in to the get_best_mount function for the long timeout parameter. So, we timeout trying to contact our first and only server, and never retry. * Thu Mar 18 2004 Jeff Moyer - 1:4.1.1-2 - Prevent startup if a mountpoint is already mounted. * Thu Mar 18 2004 Jeff Moyer - 1:4.1.1-1 - Update to 4.1.1, as it fixes problems with wildcards that people are seeing quite a bit. * Wed Mar 17 2004 Jeff Moyer - 1:4.1.0-8 - Fix ldap init code to parse server name and options correctly. * Tue Mar 16 2004 Jeff Moyer - 1:4.1.0-7 - Moved the freeing of ap.path to cleanup_exit, as we would otherwise reference an already-freed variable. * Mon Mar 15 2004 Jeff Moyer - 1:4.1.0-6 - add %config(noreplace) for auto.* config files. * Wed Mar 10 2004 Jeff Moyer 1:4.1.0-5 - make the init script only recognize redhat systems. Nalin seems to remember some arcane build system error that can be caused if we don't do this. * Wed Mar 10 2004 Jeff Moyer 1:4.1.0-4 - comment out /net and /misc from the default auto.master. /net is important since in a default shipping install, we can neatly co-exist with amd. * Wed Mar 10 2004 Jeff Moyer 1:4.1.0-3 - Ported forward Red Hat's patches from 3.1.7 that were not already present in 4.1.0. - Moving autofs from version 3.1.7 to 4.1.0 * Mon Sep 29 2003 Ian Kent - Added work around for O(1) patch oddity. * Sat Aug 17 2003 Ian Kent - Fixed tree mounts. - Corrected transciption error in autofs4-2.4.18 kernel module * Sun Aug 10 2003 Ian Kent - Checked and merged most of the RedHat v3 patches - Fixed kernel module handling wu-ftpd login problem (again) * Thu Aug 7 2003 Ian Kent - Removed ineffective lock stuff - Added -n to bind mount to prevent mtab update error - Added retry to autofs umount to clean matb after fail - Redirected messages from above to debug log and added info message - Fixed autofs4 module reentrancy, pwd and chroot handling * Wed Jul 30 2003 Ian Kent - Fixed autofs4 ghosting patch for 2.4.19 and above (again) - Fixed autofs directory removal on failure of autofs mount - Fixed lock file wait function overlapping calls to (u)mount * Sun Jul 27 2003 Ian Kent - Implemented LDAP direct map handling for nisMap and automountMap schema - Fixed autofs4 ghosting patch for 2.4.19 and above (again) - Added locking to fix overlapping internal calls to (u)mount - Added wait for mtab~ to improve tolerance of overlapping external calls to (u)mount - Fixed ghosted directory removal after failed mount attempt * Wed May 28 2003 Ian Kent - Cleaned up an restructured my added code - Corrected ghosting problem with 2.4.19 and above - Added autofs4 ghosting patch for 2.4.19 and above - Implemented HUP signal to force update of ghosted maps * Mon Mar 23 2002 Ian Kent - Add patch to implement directory ghosting and direct mounts - Add patch to for autofs4 module to support ghosting * Wed Jan 17 2001 Nalin Dahyabhai - use -fPIC instead of -fpic for modules and honor other RPM_OPT_FLAGS * Tue Feb 29 2000 Nalin Dahyabhai - enable hesiod support over libbind * Fri Aug 13 1999 Cristian Gafton - add patch from rth to avoid an infinite loop