Blob Blame History Raw
Summary: A tool for automatically mounting and unmounting filesystems.
Name: autofs
Version: 3.1.7
Release: 42
Epoch: 1
License: GPL
Group: System Environment/Daemons
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/autofs-%{version}.tar.bz2
Source1: autofs-ldap-auto-master.c
Source2: auto_fs.h
Patch0: autofs-3.1.7-doc.patch
Patch1: autofs-3.1.4-loop.patch
Patch2: autofs-3.1.4-modules.patch
Patch3: autofs-3.1.7-init.patch
Patch4: autofs-3.1.4-linux-2.3.patch
Patch5: autofs-4.0.0-open_max.patch
Patch6: autofs-3.1.5-openldap2.patch
Patch7: autofs-3.1.5-hesiod-bind.patch
Patch8: autofs-3.1.7-multiargs.patch
Patch9: autofs-3.1.7-fpic.patch
Patch10: autofs-3.1.7-schema.patch
Patch11: autofs-3.1.7-usr.patch
Patch12: autofs-3.1.7-libdir.patch
Buildroot: %{_tmppath}/%{name}-tmp
BuildPrereq: autoconf, hesiod-devel, openldap-devel, perl
Prereq: /sbin/chkconfig
Requires: /bin/bash, mktemp, sed, gawk, textutils, sh-utils, grep, /bin/ps
Obsoletes: autofs-ldap

%description
Autofs controls the operation of the automount daemons. The automount
daemons automatically mount filesystems when you use them and
unmount them after a period of inactivity. Filesystems can include
network filesystems, CD-ROMs, floppies, and others.

Install this package if you want a program for automatically mounting
and unmounting filesystems. If your Red Hat Linux machine is on a
network, you should install autofs.

%prep
%setup -q
%patch0 -p1 -b .doc
%patch1 -p1 -b .loop
%patch2 -p1 -b .modules
%patch3 -p1 -b .init
%patch4 -p1 -b .linux-2.3
%patch5 -p1 -b .open_max
%patch6 -p1 -b .openldap2
#Aaargh! BIND 9 doesn't include a hesiod implementation!  Aaargh!
#%patch7 -p1 -b .hesiod-bind
%patch8 -p1 -b .multiargs
%patch9 -p1 -b .fpic
%patch10 -p1 -b .schema
%patch11 -p1 -b .usr
%patch12 -p1 -b .libdir
#Aaargh! The kernel went and changed on us!
cp ./include/linux/auto_fs.h ./include/linux/auto_fs.h.old
cp $RPM_SOURCE_DIR/auto_fs.h ./include/linux/
chmod u+w configure
autoconf
env LANG=C perl -pi -e 's|^CFLAGS    =.*|CFLAGS    = \$\(RPM_OPT_FLAGS\)|g' Makefile.rules

%build
%configure --with-hesiod --with-openldap=
make STRIP=:
%{__cc} -o autofs-ldap-auto-master $RPM_OPT_FLAGS %{SOURCE1} -lldap -llber -lresolv

%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
mkdir -p -m755 $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p -m755 $RPM_BUILD_ROOT%{_libdir}/autofs
mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/{man5,man8}
mkdir -p -m755 $RPM_BUILD_ROOT%{_sbindir}

%makeinstall autofslibdir=$RPM_BUILD_ROOT%{_libdir}/autofs STRIP=:
install -m 755 samples/rc.autofs $RPM_BUILD_ROOT/etc/rc.d/init.d/autofs
install -m 644 samples/auto.master $RPM_BUILD_ROOT/etc
install -m 644 samples/auto.misc $RPM_BUILD_ROOT/etc
#install -m 755 samples/auto.net $RPM_BUILD_ROOT/etc/auto.net
install -m 755 -d $RPM_BUILD_ROOT/misc
#install -m 755 -d $RPM_BUILD_ROOT/net
install -m 755 autofs-ldap-auto-master $RPM_BUILD_ROOT%{_libdir}/autofs/

%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

%post
/sbin/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
	chkconfig --del autofs
fi

%files
%defattr(-,root,root)
%doc COPYING COPYRIGHT NEWS README* TODO
%config /etc/rc.d/init.d/autofs
%config(noreplace) /etc/auto.master
%config(noreplace,missingok) /etc/auto.misc
%{_sbindir}/automount
%dir %{_libdir}/autofs
%{_libdir}/autofs/autofs-ldap-auto-master
%{_libdir}/autofs/lookup_file.so
%{_libdir}/autofs/lookup_hesiod.so
%{_libdir}/autofs/lookup_ldap.so
%{_libdir}/autofs/lookup_multi.so
%{_libdir}/autofs/lookup_nisplus.so
%{_libdir}/autofs/lookup_program.so
%{_libdir}/autofs/lookup_userhome.so
%{_libdir}/autofs/lookup_yp.so
%{_libdir}/autofs/mount_afs.so
%{_libdir}/autofs/mount_autofs.so
%{_libdir}/autofs/mount_bind.so
%{_libdir}/autofs/mount_changer.so
%{_libdir}/autofs/mount_ext2.so
%{_libdir}/autofs/mount_generic.so
%{_libdir}/autofs/mount_nfs.so
%{_libdir}/autofs/parse_hesiod.so
%{_libdir}/autofs/parse_sun.so
%{_mandir}/*/*
%dir /misc

#%config /etc/auto.net
#%dir /net

%changelog
* Mon Sep  8 2003 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-42
- rebuild

* Mon Sep  8 2003 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-41
- add dependency on autoconf
- modify init script to look in %%{_libdir}/autofs for the ldap auto.master
  helper instead of /usr/lib/autofs, which isn't always right (#103220)

* Wed Jul 09 2003 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-40
- rebuild

* Wed Jul 09 2003 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-39
- stop requiring /etc/redhat-release for the sake of the init script by
  hard-wiring that we're on RHL

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Apr 25 2003 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-37
- sync with current linux/auto_fs.h from the current kernel tree (#88562)

* Wed Jan 22 2003 Tim Powers <timp@redhat.com> 3.1.7-36
- rebuilt

* Tue Jan  7 2003 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-35
- don't add the ldap library and include paths to the compiler flags

* Wed Oct 30 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-34
- link the ldap helper directly with libresolv

* Tue Aug 27 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-33
- rebuild

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Tue Jun 11 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-31
- try LDAPv3 when connecting to LDAP servers

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 16 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-29
- rebuild in new environment

* Tue Apr  2 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-28
- try to properly handle nisplus maps (patch from Steve Foster via the
  autofs mailing list)
- override the STRIP makefile variable to not strip binaries (that's the
  build root policy's job)

* Mon Apr  1 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-27
- tweak the init script shutdown yet again, this time to prevent needless
  spewage at shutdown-time (#62147)
- only look at the nis auto.master when nsswitch lists "nis", not also when
  it lists "nisplus"

* Fri Feb 22 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-26
- rebuild in new environment

* Wed Jan 23 2002 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-25
- rebuild in new environment

* Wed Jan 09 2002 Tim Powers <timp@redhat.com> 3.1.7-24
- automated rebuild

* Fri Oct 26 2001 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-23
- bump release and rebuild to get libhesiod dependency right

* Tue Oct 12 2001 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-22
- enable hesiod lookup module

* Wed Aug 29 2001 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-21
- don't inhibit starting if we have a subsys lock around -- that's the
  wrong thing to do anyway
- don't create a subsys lock if we're unconfigured (#52755)

* Tue Aug 28 2001 Nalin Dahyabhai <nalin@redhat.com> 3.1.7-20
- always remove subsys lock file on stop (#32523)
- skip over empty and host direct maps (actually fix #33511, whoops)
- attempt to support inclusion of NIS maps in /etc/auto.master (#17385)

* Wed Aug 15 2001 Nalin Dahyabhai <nalin@redhat.com>
- remove /misc from the default auto.master (#51059)

* Wed Jun 20 2001 Nalin Dahyabhai <nalin@redhat.com>
- modify LDAP lookup helper and module to use nisMap/nisObject schema by default

* Fri May 18 2001 Nalin Dahyabhai <nalin@redhat.com>
- add code to the LDAP lookup helper to allow it to look up and display any
  LDAP autofs map (more useful for debugging)

* Fri Apr 27 2001 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment

* Thu Apr  5 2001 Nalin Dahyabhai <nalin@redhat.com>
- skip over entries that read only "-hosts" (in SunOS maps, #33511)
- comment nfs mount to kernel.org out of the default auto.misc file (#33516)
- tweak the init script to not reuse timeout values when a map doesn't
  specify them (#34388)

* Fri Mar  2 2001 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment

* Tue Feb 27 2001 Preston Brown <pbrown@redhat.com>
- noreplace the auto.misc file

* Mon Feb 26 2001 Nalin Dahyabhai <nalin@redhat.com>
- require /etc/redhat-release, which the init script uses to figure out
  that we're running under Red Hat Linux

* Tue Feb 20 2001 Nalin Dahyabhai <nalin@redhat.com>
- fix init script after i18n changes

* Fri Feb 16 2001 Nalin Dahyabhai <nalin@redhat.com>
- more init script i18n changes (#26520)

* Tue Feb  6 2001 Nalin Dahyabhai <nalin@redhat.com>
- use a helper binary to look up LDAP auto.master information (the script
  can't parse base64)

* Fri Feb  2 2001 Nalin Dahyabhai <nalin@redhat.com>
- remove the gprintf calls in the init script

* Mon Jan 23 2001 Nalin Dahyabhai <nalin@redhat.com>
- gettextize the init script

* Sat Jan 20 2001 Nalin Dahyabhai <nalin@redhat.com>
- tweak the files list (input from katzj@linuxpower.org)

* Thu Jan 18 2001 Nalin Dahyabhai <nalin@redhat.com>
- handle multiple return values correctly in the LDAP lookup module
- start by default again

* Wed Jan 17 2001 Nalin Dahyabhai <nalin@redhat.com>
- change start priority to match amd to work on NFS-mounted /usr (#23522)
- don't start by default unless the admin switches us on
- use -fPIC instead of -fpic for modules and honor other RPM_OPT_FLAGS
- gettextize the init script

* Tue Jan  9 2001 Nalin Dahyabhai <nalin@redhat.com>
- fix option parsing in lookup_multi (I think)
- fix multi option handling in our hacked-up init script (reported by Thiago
  Bartolomei on the autofs mailing list)

* Wed Dec  6 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 3.1.7
- add the man pages back in (fell out in 3.1.6)

* Tue Nov 28 2000 Nalin Dahyabhai <nalin@redhat.com>
- don't require /etc/auto.master to be there to start

* Mon Nov 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 3.1.6
- disable hesiod support because the new bind-devel doesn't include it
- try to use nsswitch.conf for getting the contents of auto.master
- only convert YP map names auto_home and auto_mnt

* Fri Sep  8 2000 Nalin Dahyabhai <nalin@redhat.com>
- add -lresolv to build properly with OpenLDAP 2

* Wed Aug 23 2000 Nalin Dahyabhai <nalin@redhat.com>
- convert YP map names that start with "auto_" to "auto." (#16753)

* Wed Aug 16 2000 Nalin Dahyabhai <nalin@redhat.com>
- add an extra pause after the initial shutdown attempt

* Fri Aug 11 2000 Nalin Dahyabhai <nalin@redhat.com>
- patch init script to not shut down --submount mounts on reload
- remove temporary files again during reload

* Thu Aug 10 2000 Nalin Dahyabhai <nalin@redhat.com>
- revert to 3.1.5
- add 3.1.6pre1 patch to handle LDAP maps
- add Epoch: to upgrade from Raw Hide or Pinstripe
- update to 3.1.6pre2

* Fri Aug  4 2000 Nalin Dahyabhai <nalin@redhat.com>
- work around kernel insmod concurrency problem (#14972) by loading the module
  at start-time

* Wed Aug  2 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix duplicate detection for false matches (e.g. "/user" == "/users") (#15183)

* Mon Aug  1 2000 Nalin Dahyabhai <nalin@redhat.com>
- merge ldap subpackage back into the main one and Obsolete: it
- clean up build warnings
- fix errors automounting ext2 filesystems due to uninitialized option string

* Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
- move initscript back

* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild

* Mon Jul 10 2000 Nalin Dahyabhai <nalin@redhat.com>
- move the init script to the right place

* Fri Jul  7 2000 Nalin Dahyabhai <nalin@redhat.com>
- add /net directory to the package

* Thu Jul  6 2000 Nalin Dahyabhai <nalin@redhat.com>
- do manual unmounting in shutdown script
- change initscripts prereq to /etc/init.d
- move autoconf invocation to setup section

* Wed Jul  5 2000 Nalin Dahyabhai <nalin@redhat.com>
- move condrestart to postun
- make condrestart check the right file to determine if already running

* Wed Jul  5 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- ignore errors in post script

* Tue Jul  4 2000 Matt Wilson <msw@redhat.com>
- use full path to chkconfig
- full *correct* path to chkconfig

* Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- smoother starting/stopping on upgrades/removal

* Thu Jun 15 2000 Nalin Dahyabhai <nalin@redhat.com>
- be more aggressive when shutting down autofs
- add condrestart support

* Mon Jun  5 2000 Nalin Dahyabhai <nalin@redhat.com>
- move man pages to %{_mandir}

* Wed May 31 2000 Nalin Dahyabhai <nalin@redhat.com>
- tweak argument parsing (bug #11801)

* Mon May 22 2000 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new build environment

* Mon May  8 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix duplicate detection logic (duh!)

* Tue May  2 2000 Nalin Dahyabhai <nalin@redhat.com>
- add config: and processname: tags to init script

* Sun Apr 30 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix shutdown logic (test -z $pid fails with multiple autofs daemons)

* Wed Apr 26 2000 Nalin Dahyabhai <nalin@redhat.com>
- split off autofs4 for testing & development
- update patches for autofs4 for feeding back to autofs list
- make auto.master a noreplace file

* Mon Apr 17 2000 Nalin Dahyabhai <nalin@redhat.com>
- split lookup_ldap into a subpackage (bug #10874)

* Tue Apr 11 2000 Nalin Dahyabhai <nalin@redhat.com>
- add LDAP map support, requires openldap
- tweak init script patch to use fields 2+ for the map name instead of just 2

* Wed Apr 05 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix bug #10402 by fixing the init script, hopefully for everybody
- merge patches for the init script into a single patch to send to hpa
- patch to build on 2.2 and late-series 2.3 kernels

* Tue Feb 29 2000 Nalin Dahyabhai <nalin@redhat.com>
- enable hesiod support over libbind

* Mon Feb 28 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix init script bug when startup failed
- fix option passing in init script

* Sun Feb 13 2000 Nalin Dahyabhai <nalin@redhat.com>
- make autofs start after ypbind by moving start priority 18, stop to 82
- make sure that calls to "ps aux" include "www" to avoid snippage

* Wed Feb  2 2000 Nalin Dahyabhai <nalin@redhat.com>
- make sure all the docs get packaged
- make init script do status messages like others
- add "nosuid,nodev" to options for /misc/cd
- switch to using INSTALLROOT during make install

* Fri Jan 21 2000 Nalin Dahyabhai <nalin@redhat.com>
- update to 3.1.4

* Mon Sep 20 1999 Cristian Gafton <gafton@redhat.com>
- use ps axw instead of ps ax in the init script

* Fri Sep 10 1999 Bill Nottingham <notting@redhat.com>
- chkconfig --del in %preun, not %postun

* Tue Sep 07 1999 Cristian Gafton <gafton@redhat.com>
- add patch from HJLu to handle NIS auto.master better

* Wed Aug 25 1999 Cristian Gafton <gafton@redhat.com>
- fix bug #4708

* Sat Aug 21 1999 Bill Nottingham <notting@redhat.com>
- fix perms on /usr/lib/autofs/* 
- add support for specifying maptype in auto.master

* Fri Aug 13 1999 Cristian Gafton <gafton@redhat.com>
- add patch from rth to avoid an infinite loop

* Wed Apr 28 1999 Cristian Gafton <gafton@redhat.com>
- use "autofs" instead of "automount" for /var/lock/subsys lock file

* Fri Apr 09 1999 Cristian Gafton <gafton@redhat.com>
- enahanced initscript to try to load maps over NIS
- changed the mount point back to misc (there is a reason we leave /mnt
  alone)
- patched back autofs.misc to the version shipped on 5.2 to avoid replacing
  yet one more config file for those who upgrade

* Wed Mar 24 1999 Preston Brown <pbrown@redhat.com>
- upgrade to 3.1.3, fixing smbfs stuff and other things
- changed mountpoint from /misc to /mnt

* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com> 
- auto rebuild in the new build environment (release 10)

* Mon Feb  8 1999 Bill Nottingham <notting@redhat.com>
- build for kernel-2.2/glibc2.1

* Tue Oct  6 1998 Bill Nottingham <notting@redhat.com>
- fix bash2 breakage in init script

* Sun Aug 23 1998 Jeff Johnson <jbj@redhat.com>
- typo in man page.

* Mon Jul 20 1998 Jeff Johnson <jbj@redhat.com>
- added sparc to ExclusiveArch.

* Thu May 07 1998 Prospector System <bugs@redhat.com>
- translations modified for de, fr, tr

* Thu Apr 30 1998 Cristian Gafton <gafton@redhat.com>
- updated to 3.1.1

* Wed Apr 22 1998 Michael K. Johnson <johnsonm@redhat.com>
- enhanced initscripts

* Fri Dec 05 1997 Michael K. Johnson <johnsonm@redhat.com>
- Link with -lnsl for glibc compliance.

* Thu Oct 23 1997 Michael K. Johnson <johnsonm@redhat.com>
- exclusivearch for i386 for now, since our kernel packages on
  other platforms don't include autofs yet.
- improvements to initscripts.

* Thu Oct 16 1997 Michael K. Johnson <johnsonm@redhat.com>
- Built package from 0.3.14 for 5.0