--- autofs-4.1.4.orig/039_updated_manpages +++ autofs-4.1.4/039_updated_manpages @@ -0,0 +1,249 @@ +diff -ruN autofs-4.0.0pre10.orig/man/autofs.5 autofs-4.0.0pre10/man/autofs.5 +--- autofs-4.0.0pre10.orig/man/autofs.5 2003-02-10 00:13:15.000000000 +0100 ++++ autofs-4.0.0pre10/man/autofs.5 2003-02-10 00:13:01.000000000 +0100 +@@ -21,7 +21,7 @@ + map! + .SH "FORMAT" + This is a description of the text file format. Other methods of specifying +-these files may exist. All empty lines or lines beginning with # are ++these files may exist (e. g. LDAP). All empty lines or lines beginning with # are + ignored. The basic format of one line in such maps is: + .P + .BI "key [" -options "] location" +@@ -78,7 +78,9 @@ + .sp + In the first line we have a NFS remote mount of the kernel directory on + .IR ftp.kernel.org . +-This is mounted read-only. The second line mounts an ext2 volume on a ++This is mounted read-only. (Note: This example doesn't really work, because ++.IR ftp.kernel.org ++doesn't provide NFS services.) The second line mounts an ext2 volume on a + local ide drive. The third makes a share exported from a Windows + machine available for automounting. The rest should be fairly + self-explanatory. The last entry (the last three lines) is an example +@@ -106,6 +108,13 @@ + This will enable you to access all the home directory of local hosts using + the path + .RI / mountpoint / hostname / local-path . ++(But in certain cases it's not recommended to work in such a directory. ++If a program tries to find a file, let's say \fIconfig.sh\fP, in the ++parent directories, it will finally reach \fI/mountpoint/config.sh\fP. ++The automounter will try to mount \fIconfig.sh:/home/config.sh\fP, ++which will fail. Most probably it will result in a timeout during ++DNS resolution.) ++ + .SS Variable Substitution + The following special variables will be substituted in the key and location + fields of an automounter map if prefixed with $ as customary from shell +@@ -133,7 +142,10 @@ + .B program + map will be called as a script with the key as an argument. It may + return no lines of output if there's an error, or one or more lines +-containing a map (with \\ quoting line breaks). ++containing a map (with \\ quoting line breaks). The general format ++of such a line is: ++.P ++.BI "[" -options "] location" + .P + To use a + .B program +@@ -178,3 +190,4 @@ + This manual page was written by Christoph Lameter , + for the Debian GNU/Linux system. Edited by H. Peter Anvin + and Jeremy Fitzhardinge . ++Edited by Daniel Lutz . +diff -ruN autofs-4.0.0pre10.orig/man/autofs.8.in autofs-4.0.0pre10/man/autofs.8.in +--- autofs-4.0.0pre10.orig/man/autofs.8.in 2003-02-10 00:13:09.000000000 +0100 ++++ autofs-4.0.0pre10/man/autofs.8.in 2003-02-10 00:13:01.000000000 +0100 +@@ -4,7 +4,7 @@ + @@INIT.D@@/autofs \- Control Script for automounter + .SH SYNOPSIS + .B @@INIT.D@@/autofs +-.I start|stop|reload ++.I start|stop|restart|reload|status + .SH "DESCRIPTION" + .B autofs + control the operation of the +@@ -42,8 +42,19 @@ + map exists then that map will be processed in the same way as the + auto.master map, with any optional arguments. + .P ++.B @@INIT.D@@/autofs start ++will start daemons for all configured mount points. ++.P ++.B @@INIT.D@@/autofs stop ++will stop all currently running daemons. ++.P ++.B @@INIT.D@@/autofs restart ++will stop and then start agin all currently running daemons. ++.P + .B @@INIT.D@@/autofs reload +-will check the current auto.master map against running daemons. It will kill ++will check the current ++.I auto.master ++map against running daemons. It will kill + those daemons whose entries have changed and then start daemons for new or + changed entries. + .P +@@ -64,4 +75,4 @@ + .SH AUTHOR + This manual page was written by Christoph Lameter , + for the Debian GNU/Linux system. Edited by H. Peter Anvin +-. ++. Edited by Daniel Lutz . +diff -ruN autofs-4.0.0pre10.orig/man/auto.master.5 autofs-4.0.0pre10/man/auto.master.5 +--- autofs-4.0.0pre10.orig/man/auto.master.5 2001-03-28 07:08:23.000000000 +0200 ++++ autofs-4.0.0pre10/man/auto.master.5 2003-02-10 00:13:01.000000000 +0100 +@@ -13,6 +13,25 @@ + describing the file systems to be mounted under this mountpoint. The access + to those maps is governed by a key. + .P ++If the file ++.B /etc/auto.master ++exists, only this file is used as master map. ++If needed, an additional NIS map can be included in this file with: ++.P ++.I +map ++.B [options] ++.P ++If ++.B /etc/auto.master ++doesn't exist, ++.BR autofs (8) ++looks for a NIS map called ++.B auto.master ++and processes this map instead. So you can have a global NIS map and ++optionally add entries in ++.B /etc/auto.master ++on the local machine. ++.P + Access to an automounted file system is customarily done using the path scheme: + .P + .RI / mountpoint / key / path / file , +@@ -30,35 +49,70 @@ + .SH "FORMAT" + The file has three fields separated by an arbitrary number of blanks or + tabs. Lines beginning with # are comments. The first field is the mount +-point. Second field is the map file to be consulted for this mount-point. ++point. Second field is the map to be consulted for this mount-point. + The third field is optional and can contain options to be applied to all + entries in the map. Options are cumulative, which is a difference to the + behavior of the SunOS automounter. ++.P ++.BI "mountpoint [" maptype ":]map [" options "]" + +-The format of the map file and the options are described in ++.SS mountpoint ++is the path to a directory. This directory must already exist and should ++be empty. If it's not empty, the contents will be hidden. ++ ++.SS [maptype:]map ++is the map to be used. If \fImap\fP is an absolute path, the given file is used. ++If this file is executable, map type \fBprogram\fP is used, else \fPfile\fP. ++If \fImap\fP is a filename, /etc/\fImap\fP is used if it exists (map type ++\fBprogram\fP if it's executable, \fBfile\fP else), else the given ++map is assumed to be a NIS map. The map can also be \fBhesiod\fP, ++\fBuserhome\fP, or \fBldap\fP. If it's \fBldap\fP, the following ++format for the map should be used: \fBldap:[servername:]basedn\fP ++(this includes the \fImaptype\fP). ++.P ++You can explicitly provide a map type specifier. This is done by ++prepending \fImaptype\fP: to the map. If you do so, the map type ++specifier and the map are passed to ++.BR automount(8) ++as is. See ++.BR automount(8) ++for all supported map types. ++ ++.SS options ++If options are given, they are prepended to the options given ++in the map. ++The format of the map and the options are described in + .BR autofs (5). ++.P ++There's a special option \fB--timeout=\fP that is passed to ++.BR automount(8) ++instead of to the map and to ++.BR mount(8) . ++With this option, you can override the default timeout for the ++given map. See ++.BR automount(8) ++for more information about this option. ++ + .SH EXAMPLE + .sp + .RS +.2i + .ta 1.0i + .nf +-/home /etc/auto.home +-/misc /etc/auto.misc ++/home auto.home ++/misc /etc/auto.misc -Dfoo=bar,rsize=8192,wsize=8192,--timeout=10 ++/data ldap:ldapserver.example.com:ou=auto.data,dc=example,dc=com rsize=8192,wsize=8192 +++auto.master + .fi + .RE + .sp +-This will generate two mountpoints +-.I /home +-and +-.IR /misc . +-All accesses to +-.I /home +-will lead to the consultation of the map in +-.IR /etc/auto.home , +-and all accesses to +-.I /misc +-will consult the map in +-.IR /etc/auto.misc . ++This will generate the three mountpoints ++\fI/home\fP, \fI/misc\fP and \fI/data\fP. All accesses to ++\fI/home\fP will lead to the consultation of the map in ++\fI/etc/auto.home\fP (or the NIS map \fIauto.home\fP, if ++\fI/etc/auto.home\fP doesn't exist). All accesses to ++\fI/misc\fP will consult the map in \fI/etc/auto.misc\fP. ++And all accesses to \fI/data\fP will lead to the consultation ++of LDAP entries on the server \fIldapserver.example.com\fP. + .SH "SEE ALSO" + .BR automount (8), + .BR autofs (5), +@@ -66,3 +120,4 @@ + .SH AUTHOR + This manual page was written by Christoph Lameter , + for the Debian GNU/Linux system. Edited by . ++Edited by Daniel Lutz . +diff -ruN autofs-4.0.0pre10.orig/man/automount.8 autofs-4.0.0pre10/man/automount.8 +--- autofs-4.0.0pre10.orig/man/automount.8 2003-02-10 00:13:15.000000000 +0100 ++++ autofs-4.0.0pre10/man/automount.8 2003-02-10 00:13:01.000000000 +0100 +@@ -22,10 +22,13 @@ + The filesystems are then autounmounted after a period of inactivity. + .SH OPTIONS + .TP +-.I "\-p, \-\-pid-file" ++.I "\-h, \-\-help" ++Display usage information, then exit. ++.TP ++.I "\-p, \-\-pid-file " + Write the pid of the daemon to the specified file. + .TP +-.I "\-t, \-\-timeout" ++.I "\-t, \-\-timeout " + Set the minimum timeout, in seconds, until directories are unmounted. + The default is 5 minutes. Setting the timeout to zero disables + unmounts completely. +@@ -84,7 +87,8 @@ + \fBmap\fP + Location of mapfile to use. This is an absolute UNIX pathname in the case + for maps of types \fBfile\fP or \fBprogram\fP, and the name of a database +-in the case for maps of type \fByp\fP, \fBnisplus\fP, or \fBhesiod\fP. ++in the case for maps of type \fByp\fP, \fBnisplus\fP, or \fBhesiod\fP, ++and of the form \fB[servername:]basedn\fP in the case for \fBldap\fP. + .TP + \fBoptions\fP + Any remaining command line arguments without leading dashes (\-) are +@@ -120,4 +124,4 @@ + . To join this mailing list, send a message + with the line "subscribe autofs" to . + .SH AUTHOR +-H. Peter Anvin ++H. Peter Anvin . Edited by Daniel Lutz . --- autofs-4.1.4.orig/043_nsswitch_and_auto.master_in_ldap +++ autofs-4.1.4/043_nsswitch_and_auto.master_in_ldap @@ -0,0 +1,221 @@ +diff -ruN autofs-4.0.0pre10.orig/man/auto.master.5 autofs-4.0.0pre10/man/auto.master.5 +--- autofs-4.0.0pre10.orig/man/auto.master.5 2003-10-12 16:27:56.000000000 +0200 ++++ autofs-4.0.0pre10/man/auto.master.5 2003-10-12 15:52:23.000000000 +0200 +@@ -2,7 +2,7 @@ + .\" $Id: auto.master.5,v 1.3 1998/11/05 01:13:18 hpa Exp $ + .TH AUTO.MASTER 5 "9 Sep 1997" + .SH NAME +-/etc/auto.master \- Master Map for automounter ++auto.master \- Master Map for automounter + .SH "DESCRIPTION" + The + .B auto.master +@@ -13,25 +13,22 @@ + describing the file systems to be mounted under this mountpoint. The access + to those maps is governed by a key. + .P +-If the file +-.B /etc/auto.master +-exists, only this file is used as master map. +-If needed, an additional NIS map can be included in this file with: ++You can configure in /etc/nsswitch.conf which map should be used under the ++database `automount'. Currently, the schemes `files', `nis' and `ldap' are ++supported. The following example will use /etc/auto.master and the auto.master ++NIS map: ++.P ++automount: files nis ++.P ++If no schemes are defined in /etc/nsswitch.conf, the autofs script will ++try /etc/auto.master, the auto.master NIS map and an an LDAP map (in this ++order). ++.P ++If you use /etc/auto.master, an additional NIS map can be included in this file with: + .P + .I +map + .B [options] + .P +-If +-.B /etc/auto.master +-doesn't exist, +-.BR autofs (8) +-looks for a NIS map called +-.B auto.master +-and processes this map instead. So you can have a global NIS map and +-optionally add entries in +-.B /etc/auto.master +-on the local machine. +-.P + Access to an automounted file system is customarily done using the path scheme: + .P + .RI / mountpoint / key / path / file , +@@ -100,7 +97,7 @@ + .nf + /home auto.home + /misc /etc/auto.misc -Dfoo=bar,rsize=8192,wsize=8192,--timeout=10 +-/data ldap:ldapserver.example.com:ou=auto.data,dc=example,dc=com rsize=8192,wsize=8192 ++/data ldap:ldapserver.example.com:ou=auto.data,ou=Automount,dc=example,dc=com rsize=8192,wsize=8192 + +auto.master + .fi + .RE +diff -ruN autofs-4.0.0pre10.orig/man/autofs.8.in autofs-4.0.0pre10/man/autofs.8.in +--- autofs-4.0.0pre10.orig/man/autofs.8.in 2003-10-12 16:27:56.000000000 +0200 ++++ autofs-4.0.0pre10/man/autofs.8.in 2003-10-12 15:52:23.000000000 +0200 +@@ -23,7 +23,7 @@ + .SH "OPERATION" + .B autofs + will consult a configuration file +-.I /etc/auto.master ++.I auto.master + (see + .BR auto.master (5)) + to find mount points on the system. For each of those mount points a +@@ -31,16 +31,7 @@ + process is started with the appropriate parameters. You can check the + active mount points for the automounter with the + .B @@INIT.D@@/autofs status +-command. If the +-.I auto.master +-configuration file contains a line of the form +-.P +-.I +map +-.B [options] +-.P +-then the script will check for an NIS map with the same name. If such a +-map exists then that map will be processed in the same way as the +-auto.master map, with any optional arguments. ++command. + .P + .B @@INIT.D@@/autofs start + will start daemons for all configured mount points. +diff -ruN autofs-4.0.0pre10.orig/samples/rc.autofs.in autofs-4.0.0pre10/samples/rc.autofs.in +--- autofs-4.0.0pre10.orig/samples/rc.autofs.in 2003-10-12 16:27:55.000000000 +0200 ++++ autofs-4.0.0pre10/samples/rc.autofs.in 2003-10-12 16:27:40.000000000 +0200 +@@ -80,6 +80,71 @@ + daemonoptions="--timeout=$TIMEOUT $daemonoptions" + fi + ++# Extract the schemes from /etc/nsswitch.conf ++# (function derived from RedHat) ++function getschemes() ++{ ++ grep ^automount: /etc/nsswitch.conf | sed -e 's/^.*://' -e 's/\[.*\]/ /g' ++} ++ ++# Process the schemes found in /etc/nsswitch.conf ++# (function derived from RedHat, with some modifications) ++function getrawmounts() ++{ ++ for scheme in `getschemes` ; do ++ case "$scheme" in ++ files) ++ if [ -z "$filescheme" ] ; then ++ if getmounts_file /etc/auto.master; then ++ filescheme=1 # success ++ else ++ filescheme=0 # failure ++ fi ++ export filescheme ++ fi ++ ;; ++ nis) ++ if [ -z "$nisscheme" ] ; then ++ if getnismounts auto.master; then ++ nisscheme=1 # success ++ else ++ nisscheme=0 # failure ++ fi ++ export nisscheme ++ fi ++ ;; ++ ldap*) ++ if [ -z "$ldapscheme" ] ; then ++ if getldapmounts; then ++ ldapscheme=1 # success ++ else ++ ldapscheme=0 # failure ++ fi ++ export ldapscheme ++ fi ++ ;; ++ esac ++ done ++ ++ if [ -z "$filescheme" -a -z "$nisscheme" -a -z "$ldapscheme" ]; then ++ # nothing configured in /etc/nsswitch.conf, fall back to old behaviour ++ ++ if ! getmounts_file /etc/auto.master; then ++ if ! getnismounts auto.master; then ++ if ! getldapmounts; then ++ echo "no autofs mounts configured!" 1>&2 ++ fi ++ fi ++ fi ++ else ++ if [ ! \( "$filescheme" == "1" -o "$nisscheme" == "1" -o "$ldapscheme" == "1" \) ]; then ++ # all schemes found in /etc/nsswitch.conf have failed ++ ++ echo "no autofs mounts configured!" 1>&2 ++ fi ++ fi ++} ++ + # + # This function will build a list of automount commands to execute in + # order to activate all the mount points. It is used to figure out +@@ -87,13 +152,11 @@ + # + function getmounts() + { +- if ! getmounts_file /etc/auto.master; then +- if ! getnismounts auto.master; then +- echo "no autofs mounts configured!" 1>&2 +- fi +- fi ++ getrawmounts + } + ++ ++ + function getmounts_file() + { + # +@@ -231,6 +294,39 @@ + fi + } + ++function getldapmounts() { ++ if [ ! -x /usr/bin/ldapsearch -o -z "$LDAPURI" -o -z "$LDAPBASE" ]; then ++ return 1 ++ fi ++ ++ # TODO: Doesn't yet work for LDIF output where lines are continued on the ++ # next line (starting with space or tab). (See ldif(5)) ++ ++ ldapsearch -LLL -H $LDAPURI -b $LDAPBASE -x \ ++ '(objectClass=automount)' cn automountInformation 2>/dev/null \ ++ | while read attr val; do ++ case "$attr" in ++ dn:) ++ node="" ++ args="" ++ ;; ++ cn:) ++ node=$val ++ ;; ++ automountInformation:) ++ args=$val ++ ;; ++ *) ++ ;; ++ esac ++ if [ -n "$node" -a -n "$args" ]; then ++ echo "$node $args" | process_master_file "$@" ++ node="" ++ args="" ++ fi ++ done ++} ++ + # + # List active mounts + # --- autofs-4.1.4.orig/debian/NEWS +++ autofs-4.1.4/debian/NEWS @@ -0,0 +1,12 @@ +autofs (4.1.3+4.1.4beta2-7) unstable; urgency=low + + * autofs for Debian now ships with an empty /etc/auto.master by default. + This is different from what was used in woody, which means that people + who never changed this file will get different results from woody; in + particular, /var/autofs/misc is no longer mounted by default. This also + affects the default behaviour when using NIS maps. + + For more details, please see the README.Debian file. + + -- Steinar H. Gunderson Sat, 2 Apr 2005 14:29:06 +0200 + --- autofs-4.1.4.orig/debian/rules +++ autofs-4.1.4/debian/rules @@ -0,0 +1,107 @@ +#!/usr/bin/make -f +# Made with the aid of debmake, by Christoph Lameter, +# based on the sample debian/rules file for GNU hello by Ian Jackson. + +package=autofs +include debian/scripts/vars +BUILD_DIR = $(SOURCE_DIR)/$(TAR_DIR) + +# Debian policy 10.1 +export CFLAGS=-Wall -g # add -DDEBUG for debugging + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS+=-O0 +else + CFLAGS+=-O2 +endif +ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + STRIPARGS= --no-act +endif + +SHELL=/bin/bash + +build: $(STAMP_DIR)/build +$(STAMP_DIR)/build: $(STAMP_DIR)/configure + dh_testdir + $(MAKE) -C $(BUILD_DIR) + touch $@ + +configure: $(STAMP_DIR)/configure +$(STAMP_DIR)/configure: $(STAMP_DIR)/source.make + dh_testdir + (cd $(BUILD_DIR) && \ + ./configure --prefix=/usr --mandir=/usr/share/man \ + --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ + --disable-mount-locking) + touch $@ + +source.make: $(STAMP_DIR)/source.make +$(STAMP_DIR)/source.make: + $(MAKE) -f debian/sys-build.mk source.make + chmod -R +w $(BUILD_DIR) + +clean: + dh_testdir + $(MAKE) -f debian/sys-build.mk source.clean + rm -f $(STAMP_DIR)/build $(STAMP_DIR)/configure + dh_clean debian/init build_dir + +binary-indep: + @echo Nothing to do + +$(BUILD_DIR)/samples/rc.autofs: $(BUILD_DIR)/samples/rc.autofs.in + $(MAKE) -C $(BUILD_DIR)/samples rc.autofs + +debian/init: $(BUILD_DIR)/samples/rc.autofs + cp -a $< debian/init + +binary-arch: build debian/init + dh_testroot + dh_testdir + dh_clean + + dh_installdirs + + # for use in dh_install* file lists + ln -sf $(BUILD_DIR) build_dir + + $(MAKE) -C $(BUILD_DIR) install INSTALLROOT=$(CURDIR)/debian/autofs/ + + dh_installdirs etc/apm/event.d + cp -a debian/event.d debian/autofs/etc/apm/event.d/autofs + chmod +x debian/autofs/etc/apm/event.d/autofs + + # Do the final stuff + dh_movefiles --sourcedir=debian/autofs + dh_installdirs --package=autofs-ldap etc/ldap/schema + cp -a $(BUILD_DIR)/samples/autofs.schema \ + debian/autofs-ldap/etc/ldap/schema + dh_installdocs -X README.options -X README.patches + dh_installman + dh_installchangelogs $(BUILD_DIR)/CHANGELOG + dh_installexamples + dh_installmodules + dh_installinit --noscripts -- defaults 20 + + # Move all files that will be managed by ucf + dh_installdirs usr/share/autofs/conffiles + mv debian/autofs/etc/auto.{master,misc,net,smb} debian/autofs/usr/share/autofs/conffiles/ + mv debian/autofs/etc/default/autofs debian/autofs/usr/share/autofs/conffiles/autofs.default + cp -a debian/auto.{master,misc,net,smb}.md5sum debian/autofs/usr/share/autofs/conffiles/ + cp -a debian/autofs.default.md5sum debian/autofs/usr/share/autofs/conffiles/ + + dh_link + dh_strip $(STRIPARGS) + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: binary binary-arch binary-indep clean checkroot --- autofs-4.1.4.orig/debian/README.debian +++ autofs-4.1.4/debian/README.debian @@ -0,0 +1,25 @@ +autofs for Debian +----------------- + +You will need to have the AUTOFS4 filesystem compiled as a module or statically +for your kernel. Earlier autofs modules won't work properly. + +A major feature of autofs is that it is compatible with Solaris automount +syntax. If you are connecting your Debian machine to a Solaris server +using NIS/YP, automount and NFS, then there is a simple recipe: +/etc/init.d/autofs checks for the existance of /etc/auto.master. If it +does not exist then it tries to use NIS to get the master automount map, +if an "automount: nis" entry in /etc/nsswitch.conf is present. + +You can alternatively add '+auto.master' to the list of +entries in /etc/auto.master, if your NIS server distributes the NIS +master map with this name. This is the preferred technique to +import NIS maps, because you can mix local and NIS maps. + +The admin on the Solaris server should have a master automount map +available as auto.master over NIS (check with "ypcat auto.master"). This +will list all the directories available for automounting on your network. + +Direct maps are currently disabled by default, due to its incomplete support +which could create a few problems. You can enable them by setting +DISABLE_DIRECT=0 in /etc/default/autofs, at your own risk. --- autofs-4.1.4.orig/debian/compat +++ autofs-4.1.4/debian/compat @@ -0,0 +1 @@ +5 --- autofs-4.1.4.orig/debian/changelog +++ autofs-4.1.4/debian/changelog @@ -0,0 +1,1092 @@ +autofs (4.1.4-12) unstable; urgency=medium + + * 077_fix_nfs_submounts_with_2_6_18: New patch from Michael Gernoth; fixes + issues with mounting read-only NFS submounts with 2.6.18 and newer + kernels. (Closes: #393663) + * Set SHELL=/bin/bash in debian/rules, as we use bashisms. (Closes: #379578) + + -- Steinar H. Gunderson Wed, 25 Oct 2006 23:53:50 +0200 + +autofs (4.1.4-11) unstable; urgency=low + + * 072_fix_auto_net_sort: Update auto.net with regard to new sort syntax; + patch from Shawn Willden. (Closes: #339132) + * 073_configurable_locking (and giving --disable-automount-locking to + configure): Disable autofs' locking, since Debian's mount should already + do the appropriate locking itself; hopefully this fixes some of the + deadlock bugs. (Closes: #316378, #365208) + * 074_auto_smb_cifs: New patch adapted from upstream, uses cifs instead of + smbfs for auto.smb. (Closes: #374745) + * 075_auto_net_escape_hash: New patch from upstream, escapes the '#' + character to avoid it being treated as a comment. + * 076_ldap_deprecated: New patch from upstream, fixes a segfault when using + deprecated LDAP calls on amd64. + * Fix typo in README.Debian; patch from Kobayashi Noritada. + (Closes: #363457) + + -- Steinar H. Gunderson Sat, 1 Jul 2006 12:25:42 +0200 + +autofs (4.1.4-10) unstable; urgency=low + + * 070_fix_regex_typo: New patch from Olleg Samoylov; fixes a typo (+ that + should have been escaped in a regex). (Closes: #348519) + * 071_fix_ldap_mounts: New patch from the Ubuntu packages; fixes problems + with LDAP mounts being incorrectly detected as program mounts. + * Bump Standards-version to 3.7.2 (no changes needed). + * Use invoke-rc.d in postinst and prerm instead of running /etc/init.d + scripts directly. + + -- Steinar H. Gunderson Mon, 15 May 2006 03:33:27 +0200 + +autofs (4.1.4-9) unstable; urgency=low + + * 069_support_spaces_in_smb_share_names: New patch from Thomas Adamcik; + support spaces in SMB share names. (Closes: #353921) + * Update debhelper compatibility level to v5 (no changes needed, except + bumping the build-dependency on debhelper). + * Remove a bashism in the postrm (fixes a lintian warning). + * Updated FSF's postal address in the debian/copyright file. + + -- Steinar H. Gunderson Tue, 21 Feb 2006 23:48:43 +0100 + +autofs (4.1.4-8) unstable; urgency=low + + * Added a debian/compat file instead of setting DH_COMPAT. + * When purging, check if /usr/bin/ucf exists, and don't use it if it + doesn't. (Closes: #330556) + * Ship .md5sum files for ucf with the md5sums from the conffiles in sarge, + so the user won't be asked by ucf on the initial upgrade from sarge to + an ucf-enabled version. (Closes: #331688) + + -- Steinar H. Gunderson Thu, 6 Oct 2005 14:42:32 +0200 + +autofs (4.1.4-7) unstable; urgency=low + + * Remove lots of old cruft for upgrading from various versions between woody + and sarge, also removing our dependency on debconf. + + -- Steinar H. Gunderson Fri, 5 Aug 2005 01:01:51 +0200 + +autofs (4.1.4-6) unstable; urgency=low + + * 065_fix_master_map_in_ldap: Changed patch: Don't export LDAPURI/LDAPBASE + if they aren't set, patch from Rik Theys. + * Include Vietnamese translation of debconf templates, by Clytie Siddall. + (Closes: #313131) + * 068_fix_invalid_rpcgen_code: New patch, do odd sed tricks around + libc6-dev bug #315198, which causes FTBFS with gcc-4.0. (Closes: #317519) + (Temporary fix until glibc 2.3.5-1 hits unstable, of course.) + * Bump Standards-Version to 3.6.2.0 (no changes needed). + + -- Steinar H. Gunderson Sat, 9 Jul 2005 12:14:14 +0200 + +autofs (4.1.4-5) unstable; urgency=low + + * 067_ldap_no_first_message: New patch from upstream, turns a non-critical + error into a warning. (Closes: #315465) + + -- Steinar H. Gunderson Sat, 2 Jul 2005 20:51:01 +0200 + +autofs (4.1.4-4) unstable; urgency=low + + * 066_canonicalise_mount_points: New patch, from Stuart Caie and + Francesco Paolo Lovergine: Expand any symlinks in the mount point, to + make sure unmounting works correctly. (Closes: #263757, #278076) + * 067_allow_disabling_bind_mounts: New patch, adds an option "symlink" + to NFS mounts to signal that any bind mount is to be replaced with a + symlink instead. (Closes: #128171) + * Make autofs start at level 19 instead of level 20 during boot, to make + sure if comes before other dæmons that might rely on it. (Closes: #252114) + + -- Steinar H. Gunderson Sat, 11 Jun 2005 02:53:17 +0200 + +autofs (4.1.4-3) unstable; urgency=low + + * 065_fix_master_map_in_ldap: Fix problems where auto.master is in LDAP, + patch from Christopher Huhn. (Closes: #306829) + + -- Steinar H. Gunderson Fri, 10 Jun 2005 00:52:28 +0200 + +autofs (4.1.4-2) unstable; urgency=low + + * Support options on "+"-included NIS maps in auto.master. + (Closes: #278229, #280809) + + -- Steinar H. Gunderson Fri, 10 Jun 2005 00:30:42 +0200 + +autofs (4.1.4-1) unstable; urgency=low + + * New upstream version. Again obsoletes most of the local patches. + (Closes: #312526) + * Update debian/script/vars to reflect the new upstream version. + * 060_non_replicated_ping: Updated with new version from upstream, matches + new upstream version. + * 061_multi_parse_fix: New patch from upstream, fixes parsing of + multi-mounts. + * 063_misc_fixes: New patch from upstream, fixes various small leaks and + problems. + * 020_auto_net_path_sortlocale_mountoptions: Removed rsize and wsize + overrides, as they are obsolete now. (Closes: #304226) + * Use ucf for /etc/auto.{master,net,misc} and /etc/default/autofs. + (Closes: #280109) + * Include Czech translation of debconf templates, by Jakub Kasparec. + (Closes: #312147) + + -- Steinar H. Gunderson Thu, 9 Jun 2005 12:58:43 +0200 + +autofs (4.1.3+4.1.4beta2-10) unstable; urgency=medium + + * 062_fix_memory_leak: Fix a memory leak in 060_non_replicated_ping. + + -- Steinar H. Gunderson Fri, 13 May 2005 13:39:52 +0200 + +autofs (4.1.3+4.1.4beta2-9) unstable; urgency=medium + + * One more upload for sarge, the last one didn't do it. urgency=medium as + last time. + * 061_replicated_server: New patch, another backport from autofs 4.1.4 final + by Daniel Andre Vaquero (thanks!). Fixes more problems with replicated + hosts. (Really Closes: #297359) + + -- Steinar H. Gunderson Fri, 13 May 2005 00:01:36 +0200 + +autofs (4.1.3+4.1.4beta2-8) unstable; urgency=medium + + * Last upload for sarge, with one last patch. urgency=medium as requested + by the release team. + * 060_non_replicated_ping: New patch, backport from autofs 4.1.4 final by + Daniel Andre Vaquero. Fixes problems with NFS mounts failing, and + replicated hosts not working. (Closes: #297359, #304245) + + -- Steinar H. Gunderson Wed, 11 May 2005 13:38:41 +0200 + +autofs (4.1.3+4.1.4beta2-7) unstable; urgency=low + + * Remove join_lines script, it is no longer relevant. + * Remove spare patches 043_nsswitch_and_auto.master_in_ldap and + 044_handle_ldif_continued_lines_in_init_script from source distribution, + they are no longer relevant. + * Add NEWS.Debian file, documenting that the default master map is now + empty. (Closes: #277444, #280264, #279539) + * 059_fix_underscoretodot_handling: New patch, fix checking of + $UNDERSCORETODOT in the init script. Thanks to Ladislav Dobias for the bug + report and the patch. (Closes: #301358) + + -- Steinar H. Gunderson Sat, 2 Apr 2005 14:29:06 +0200 + +autofs (4.1.3+4.1.4beta2-6) unstable; urgency=high + + * Still more bugfixes to reach sarge. Still urgency=high as I'm afraid + britney will miss the urgency otherwise. + * New Debconf template translations: + * Japanese, thanks to OHURO Makato. (Closes: #296685) + * French, thanks to Jean-Luc Coulon. (Closes: #297013) + * Brazilian Portugese, thanks to Andre Luis Lopes. (Closes: #297046) + * 058_handle_noeol_in_auto_master: Insert a newline at the end of the read + auto.master, to handle auto.master files without a trailing newline. + (Closes: #298649) + + -- Steinar H. Gunderson Fri, 1 Apr 2005 17:57:00 +0200 + +autofs (4.1.3+4.1.4beta2-5) unstable; urgency=high + + * Rushed extra-release right after beta2-4 to get some last-minute + bugfixes into sarge. (Note to self: dcut rm 'autofs*', not dcut rm + 'autofs\*'.) + * 055_stop_on_name_not_inode: Stop on --name automount instead of + --exec $DAEMON, to (hopefully) get rid of the upgrade problems once + and for all. Thanks to Adam Conrad for suggesting the fix. + * 056_auto_net_use_bash_not_sh, 057_auto_smb_use_bash_not_sh: New patches, + use #!/bin/bash in auto.net and auto.smb, as they contain bashisms. + (Closes: #295723, #300092) + + -- Steinar H. Gunderson Fri, 1 Apr 2005 16:26:17 +0200 + +autofs (4.1.3+4.1.4beta2-4) unstable; urgency=high + + * Urgency=high, fixes RC-bugs. + * 054_no_set_e_in_init_script: New patch, back down on "set -e" in the + init.d script, which caused failures at lot of different unexpected + points. (Closes: #300703, #295480, #299298) + + -- Steinar H. Gunderson Fri, 1 Apr 2005 15:58:20 +0200 + +autofs (4.1.3+4.1.4beta2-3) unstable; urgency=low + + * Urgency=high, fixes RC-bugs. + * 053_handle_tabs_in_nsswitch_conf: New patch, revert grep in nsswitch.conf + to the version we had in 4.1.3, so tabs work again. + (Closes: #269238, #296243) + * Remove leading article from the autofs package description. + + -- Steinar H. Gunderson Mon, 21 Feb 2005 12:36:31 +0100 + +autofs (4.1.3+4.1.4beta2-2) unstable; urgency=high + + * Urgency=high, closes an RC bug. + * Call db_stop in postinst and config at the end, to avoid hangs on some + machines on installation. (Closes: #295477) + + -- Steinar H. Gunderson Wed, 16 Feb 2005 13:20:03 +0100 + +autofs (4.1.3+4.1.4beta2-1) unstable; urgency=high + + * Urgency=high as previous versions were broken with regard to upgrading + (ie. a non-reported RC bug; see below). + * New upstream release, includes and thus obsoletes almost all + Debian-specific patches. (Thanks! :-) ) For reference, patches that + were not deleted: + - 020_auto_net_path_sortlocale_mountoptions: changed (removed last + bugfixes as they are already there, kept option changes). + - 037_let_debian_rules_decide_on_CFLAGS: kept. + - 042_default_auto_master_all_commented_out: kept, adapted so it + applies against new version. + * Update debian/script/vars to reflect the new upstream version. + * New patch 052_292762_dont_lsmod_on_monolithic_kernels: + Init script now works properly on monolithic kernels. (Closes: #292762) + * build_dir/TODO doesn't exist anymore, remove from debian/docs. + * There is now a README.gentoo, so don't include README* in debian/docs, + include each element by itself. + * Stop autofs in prerm again, so upgrades actually work cleanly even + if the inode of /usr/sbin/automount was changed; there is now a new flag + AUTOFS_DONT_RESTART_ON_UPGRADES you can set in /etc/default/autofs to + suppress the restart on upgrade if you need manual treatment of this. + * If upgrading from 4.1.3-[56789], which had the broken behaviour of not + stopping in prerm, stop autofs in preinst. Unfortunately, if there has + been more than one of these versions installed without reboot (e.g. + installed -8, upgraded to -9), "/etc/init.d/autofs stop" might be broken, + so we'll display a debconf notice and let the administrator clean up. + (Add dh_installdebconf to debian/rules for this.) + * lintian (and Tollef) complained that the debconf note was not properly + internationalized, so add dependency on po-debconf and run + debconf-gettextize so it is internationalizable. + + -- Steinar H. Gunderson Tue, 15 Feb 2005 17:32:59 +0100 + +autofs (4.1.3-9) unstable; urgency=medium + + * event.d script now sends SIGUSR1 (which makes autofs expire any unused + file system) instead of simply stopping autofs on suspend, which can + fail and gets ugly on restarting. (Closes: #291721) + + -- Steinar H. Gunderson Sun, 23 Jan 2005 01:41:37 +0100 + +autofs (4.1.3-8) unstable; urgency=high + + * urgency=high as of current sarge release policy. (Previous upload was + urgency=low by mistake.) + * Rename 050_maps_without_trailing_newline.diff to + 051_maps_without_trailing_newline.diff (since there was already a 050 + patch I missed last time). + * 049_parse_sun.diff: Update to fix the "can't handle trailing whitespace" + problem for non-multimaps as well. (The previous fix solved the problem, + but for multimaps only.) (Closes: #280120, #280234) + + -- Steinar H. Gunderson Mon, 20 Dec 2004 17:08:23 +0100 + +autofs (4.1.3-7) unstable; urgency=low + + * New maintainer. Thanks to Arthur Korn for maintaining the package earlier, + and to the QA team for taking good care of the package. :-) (Closes: #279872) + * 050_maps_without_trailing_newline.diff: Handle file maps that + do not end in a newline. (Closes: #282981) + * Removed unused misc and perl substitutions from Depends. + * Fixed spelling error in autofs-ldap.README.Debian + (lintian warning). + * Ignore CVS/ paths when locating source and patches during build, + patch from Petter Reinholdtsen. (Closes: #211943) + + -- Steinar H. Gunderson Sat, 18 Dec 2004 02:23:46 +0100 + +autofs (4.1.3-6) unstable; urgency=high + + * Direct map disabling missed in previous upload :-/ + New patch is 050.disable_direct_maps.diff + (closes: #279627) + + -- Francesco Paolo Lovergine Tue, 7 Dec 2004 13:20:30 +0100 + +autofs (4.1.3-5) unstable; urgency=high + + * QA upload. Maintainer set to QA team. ITA #279872 pending. + Urgency due to number of relevant bugs present. + + * Changed 000_autofs_4.1.3_signal-race-fix to prevent locks when trying + to shutdown a mount. + (closes: #279898,#242791) + * Now direct maps are disabled by default and can be enabled via /etc/default/autofs + (closes: #279627) + * Failure in autofs4 module loading does not break installation, in case of static support. + Changed 045_module_loading_set_e patch for that. + (closes: #280276) + * Removed active action from patch 040_init_script_policy_conformance_and_backwards_compatibility + (closes: #282621) + * NEWS.Debian introduced to explain changes in NIS automaps. + (closes: #279490) + * Patch introduced to better parse maps with trailing spaces/tabs and smbfs multimaps. + (closes: #279892,#279561) + * Added a patch to manage sizelimit problems in LDAP searches. + See 048_ldap-search-limit.diff for details. + (closes: #280666) + * Now stopping autofs on removing only in prerm. Not sure it's the best hack. + (closes: #163729) + * Parsing problem was already solved in recent sources, so closing. Suggested patch does not apply. + (closes: #258464) + + -- Francesco Paolo Lovergine Mon, 6 Dec 2004 14:16:21 +0100 + +autofs (4.1.3-4) unstable; urgency=low + + * rc.autofs.in: fixed timeout option parsing regex, closes: #277342, #277277 + * rc.autofs.in: corrected regex that scanned for "automount:" lines in + nsswitch.conf, closes: #277320 + + -- Arthur Korn Thu, 21 Oct 2004 22:00:22 +0200 + +autofs (4.1.3-3) unstable; urgency=low + + * rc.autfs.in: use set -e for policy compliance and error catching + * rc.autfs.in: modprobe for autofs4 if autofs support not present yet + * modprobe/modules: remove modprobe config files vor 2.4 and 2.6 + closes: #274380 + * replace autofs-ldap.README.Debian, autofs master maps in LDAP probably + don't work at all currently. Nobody stepped up to help me on that, so it + will keep rotting now. LDAP-savy help welcome. + + -- Arthur Korn Mon, 18 Oct 2004 14:18:49 +0200 + +autofs (4.1.3-2) experimental; urgency=low + + * rc.autofs.in closes: #273224 + - load /etc/default/autofs, added default/autofs from 3.*, + closes: #217205, #219134 + - create pid files in /var/run/autofs/ + - check for existance of /etc/$map file for compatibility with 3.* autofs + - on stop check if daemon has really been killed for all pid files + - reload/restart|force-reload changed to work as in 3.* (ie policy + conform). + - made handling of short-form (ie not $maptype:$map) map specifiers in + master maps compatible with debian autofs 3.* init. + - getschemes falls back on "files" if no automount key is listed in + nsswitch.conf. + - catnismaps() checks for existence of ypcat and put both fallbacks for + nis master map in getnismounts() + - timeout options in master map supersede setting in daemonoptions and + TIMEOUT, closes: #94776, #155418 + - fixed logic for restarts again (#161401, #127779) + - make stop use start-stop-daemon's --retry feature, closes: #254810 + * auto.master: comment everything out => autofs defaults to not mount + itself anywhere. closes: #211970 + * event.d script uses init script stop action for umounting stuff + * lookup_ldap.c: applied patch by Jun Futagawa to show cause of ldap errors. + + -- Arthur Korn Mon, 27 Sep 2004 21:41:49 +0200 + +autofs (4.1.3-1) experimental; urgency=low + + * New Upstream source, closes: #240060, #221966, #256864 + - mount_autofs passes mount options down (eg timeout), closes: #137746 + - rewritten logging/debugging statements, quieter now, closes: #21501, #144233 + - RedHat LDAP patch merged, closes: #214495, #252294 + - Upstream ships a LDAP schema now, included. + * The following upstream patches are applied: + - autofs-4.1.3-bad_chdir.patch + - autofs-4.1.3-mtab_lock.patch + - autofs-4.1.3-non_block_ping.patch + - autofs-4.1.3-signal-race-fix.patch + - autofs-4.1.3-sock-leak-fix.patch + * Description updated. + + -- Arthur Korn Sat, 4 Sep 2004 02:06:57 +0200 + +autofs (3.9.99-4.0.0pre10-18) unstable; urgency=medium + + * modprobe & modules: replaced that install directive with a direct alias. + The prior solution caused an infinite loop if autofs was not compiled in + and autofs4 was not enabled at all in the kernel config. automount 4 + requires autofs4 anyway. closes: #269817, #181912 + + -- Arthur Korn Fri, 3 Sep 2004 20:47:32 +0200 + +autofs (3.9.99-4.0.0pre10-17) unstable; urgency=medium + + * Adopted package, closes: #269203 + * added debian/modprobe to get autofs4 (not autofs) loaded on 2.6 kernels, + closes: #255609 + * rules: configure target dependet on source.make stamp instead of configure + stamp + * don't call mount with a -o option if there are no options + (patch 045_handle_empty_options_in_changer_ext2_generic_modules) + closes: #211851 + * refuse to start automounter on / + (patch 046_dont_start_automount_on_root), closes: #70892 + * init.d: on restart stop automounters even if theyer command line contains + runs of spaces (patch + 048_reload_didnt_stop_automounters_with_runs_of_spaces_in_commandline), + thanks to Peter Gruber closes: #127779 + * init.d: start automounters for nisplus maps (patch + 047_start_automounter_for_nisplus_maps_too) by Peter Gruber + * mount_program.c: repeated the last letter of map output (patch + 049_program_mount_repeated_last_character_of_map_output) by + Eirik Fuller, closes: #134707 + * control: Recommends nfs-common. Probably needed for showmount. makes sense + anyway. closes: #161047 + * Bumped Standards-Version to 3.6.1 without changes + + -- Arthur Korn Wed, 1 Sep 2004 23:02:42 +0200 + +autofs (3.9.99-4.0.0pre10-16) unstable; urgency=low + + * Correctly handle LDIF output with continued lines + in the function `getldapmounts' in the init script + by using the script `/usr/share/autofs/join_lines'. + (patch 044_handle_ldif_continued_lines_in_init_script) + (closes: Bug#217837) + + -- Daniel Lutz Sat, 1 Nov 2003 20:42:53 +0100 + +autofs (3.9.99-4.0.0pre10-15) unstable; urgency=low + + * Extended the package descriptions of the main package + and the sub-packages. + (closes: Bug#209435) + * Added support for /etc/nsswitch.conf. + (patch 043_nsswitch_and_auto.master_in_ldap) + * Added support for auto.master as LDAP map. + (patch 043_nsswitch_and_auto.master_in_ldap) + (closes: Bug#193028) + + -- Daniel Lutz Sat, 11 Oct 2003 20:33:32 +0200 + +autofs (3.9.99-4.0.0pre10-14) unstable; urgency=low + + * lookup_ldap.c: Try LDAP version 3 before version 2, + correct call to `ldap_simple_bind_s', more verbose + LDAP errors. Patch by Chris Jantzen + (patch 042_ldap_version) + (closes: Bug#190815) + + -- Daniel Lutz Sat, 26 Apr 2003 23:08:12 +0200 + +autofs (3.9.99-4.0.0pre10-13) unstable; urgency=low + + * autofs(5): document use of mount option "gid=" + (patch 040_document_gid_option_in_autofs_5) + (closes: Bug#29852) + * /etc/auto.net: + - set "nonstrict" option by default + - sort with locale "LC_ALL=C" + (patch 041_nonstrict_and_sort_in_auto_net) + (closes: Bug#173876, Bug#160738) + + -- Daniel Lutz Tue, 18 Feb 2003 20:19:24 +0100 + +autofs (3.9.99-4.0.0pre10-12) unstable; urgency=low + + * Added reference to /usr/share/common-licenses/GPL + in copyright file. + * Removed full stop character from first line of the + "Description:" field of package `autofs'. + * Removed debian/conffiles (not needed with DH_COMPAT=3) + * Removed argument `--noscripts' from `dh_installmodules' + in debian/rules. (closes: Bug#175155) + * Updated manpages. + (patch 039_updated_manpages) + (closes: Bug#117226, Bug#117654) + * Updated debian/autofs-ldap.README.Debian + * Updated debian/README.debian + (closes: Bug#175156) + + -- Daniel Lutz Mon, 10 Feb 2003 00:17:01 +0100 + +autofs (3.9.99-4.0.0pre10-11) unstable; urgency=low + + * Remove file `debian/init' in target `clean' of debian/rules. + * /etc/init.d/autofs: rewrite of `process_master_file' (correct + handling of `line_options', correct handling of ldap entries, + correct handling of relative paths, support for map type + specifier, ignore direct maps), warning comment on `localoptions' + (patch 038_rewrite_process_master_file) + (closes: Bug#64147, Bug#129187, Bug#129382, Bug#134003, Bug#163084, Bug#177362) + + -- Daniel Lutz Sat, 8 Feb 2003 23:21:42 +0100 + +autofs (3.9.99-4.0.0pre10-10) unstable; urgency=low + + * Updated URL in manpage automount(8) + (patch 033_corrected_url_in_manpage_automount_8) + * Call to `mount' in `mount_changer.c' had too many arguments. + (patch 034_corrected_mount_call_in_mount_changer_c) + (closes: Bug#154890) + * Fixed parsing error in function `mount_mount' of `mount_nfs.c'. + (patch 035_fixed_parsing_error_in_mount_nfs_c) + (closes: Bug#154168) + * Removed bashism from `debian/scripts/vars.build': explicitly + read into variable `REPLY'. + (closes: Bug#147431) + * In `mount_afs.c': Remove trailing slash from path (if existing). + (patch 036_remove_trailing_slash_in_mount_afs_c) + (closes: Bug#141775) + * Applied patch by Aaron M. Ucko to `lookup_hesiod.c' for support + of hesiod priorities. + (patch 037_support_hesiod_priorities_in_lookup_hesiod_c) + (closes: Bug#137763) + + -- Daniel Lutz Mon, 9 Sep 2002 21:04:01 +0200 + +autofs (3.9.99-4.0.0pre10-9) unstable; urgency=low + + * Corrected handling of `-D' options in /etc/init.d/autofs. + (patch 029_handle_d_options_in_init_script_correctly) + Corrected corresponding text in the manpages automount(8) + and autofs(5). + (patch 030_corrections_in_manpages_autofs_5_and_automount_8) + (closes: Bug#159722, Bug#128274) + * Added `/etc/default/autofs' to debian/conffiles (i. e. marked + it as configuration file). + * Check in /etc/init.d/autofs if `/etc/default/autofs' exists. + (patch 031_check_if_etc_default_autofs_exists_in_init_script) + * Documented option `nonstrict' in autofs(5). + (patch 032_document_nonstrict_option_in_autofs_5) + (closes: Bug#139940) + + -- Daniel Lutz Thu, 5 Sep 2002 18:34:57 +0200 + +autofs (3.9.99-4.0.0pre10-8) unstable; urgency=low + + * Changed `Standards-Version' from 3.5.6 to 3.5.7. + * Added /etc/default/autofs and adapted init script. + (patch 027_timeout_default_in_init_script) + (closes: Bug#159527) + * Exclude references to other nis maps in nis maps (avoid + self-references -> inf. loop) in /etc/init.d/autofs + (patch 028_exclude_references_to_other_nis_maps) + (closes: Bug#130738) + + -- Daniel Lutz Tue, 4 Sep 2002 13:51:00 +0200 + +autofs (3.9.99-4.0.0pre10-7) unstable; urgency=low + + * Added `automount.schema' (installed in /etc/ldap/schema). + (closes: Bug#143564) + * Added README.Debian to autofs-ldap package explaining + how to use it. (Documentation not yet complete.) + (closes: Bug#155074) + + -- Daniel Lutz Tue, 3 Sep 2002 17:44:30 +0200 + +autofs (3.9.99-4.0.0pre10-6) unstable; urgency=low + + * Better handling of options in functin `munge_options' + in /etc/init.d/autofs. The `timeout' options are brought + into a suitable form for further processing by awk. Dashes + in front of options are removed (even if preceeded by spaces). + (patch 026_corrections_in_munge_options) + (closes: Bug#99788, Bug#76927) + + -- Daniel Lutz Tue, 3 Sep 2002 12:11:08 +0200 + +autofs (3.9.99-4.0.0pre10-5) unstable; urgency=low + + * Check for executability of map in /etc/init.d/autofs + (patch 021_check_for_executability_of_map) + (closes: Bug#150439) + * Clarified comment about daemon options in /etc/init.d/autofs + (patch 022_clarify_comment_about_daemon_options) + (closes: Bug#150340) + * Check for specific types (hesiod and ldap) before files and + programs in /etc/init.d/autofs + (patch 023_check_for_specific_types_before_files_and_programs) + Preserve order of mount options in awk section in + /etc/init.d/autofs. (Workaround so that ldap arguments work.) + (patch 024_preserve_order_of_mount_options) + (closes: Bug#147774) + * Allow dashes in options in the file /etc/auto.master. This is + achieved by removing dashes in front of options manually using + a sed script instead of having the dash in the record sepration + characters of the awk script. (/etc/init.d/autofs) + (patch 025_allow_dashes_in_options) + (closes: Bug#134874) + + -- Daniel Lutz Mon, 2 Sep 2002 20:18:24 +0200 + +autofs (3.9.99-4.0.0pre10-4) unstable; urgency=low + + * Applied the patch included in Bug#146829 and Bug#157428. + (closes: Bug#146829, Bug#157428) + + -- Daniel Lutz Mon, 2 Sep 2002 19:47:38 +0200 + +autofs (3.9.99-4.0.0pre10-3) unstable; urgency=low + + * Corrected handling of start/reload/stop in init.d script + so that only a single automount process per mount point + is started instead of multiple. The problem existed because + no .pid files were created. Now the `--pid-file' option + is passed to automount. (closes: Bug#145665, Bug#131078) + * Information about the command line is no more available + in the .pid file. Instead, the init.d script reads this + information from `ps ax'. So changes in /etc/auto.master + should now be handled correctly. (closes: Bug#97192) + * Better readable console messages from init.d script. + (closes: Bug#140925) + * Kill old, not yet stopped automount processes in postinst script + while upgrading, since older versions of the prerm script + didn't stop them while upgrading. + Actually we would need a loop for making sure all are stopped. + But this could lead us to an endless loop if a process couldn't + be stopped. + * Added tests for /etc/init.d/autofs if update-rc.d or + /etc/init.d/autofs {start|restart} is called. + * Adapted code for stopping autofs in prerm script to current + debhelper fashion: always stop /etc/init.d/autofs (that is, + also stop while upgrading). + * Target `make-diff' in debian/sys-build.mk: + Call $(CLEAN_TARGET) in $(BUILD_TREE).orig, too, so that + .orig files created by patch(1) are removed in all these + directories. + + -- Daniel Lutz Sat, 4 May 2002 16:43:50 +0200 + +autofs (3.9.99-4.0.0pre10-2) unstable; urgency=low + + * Really call dh_installmodules, so the file is actually installed. + (closes: Bug#89286) + + -- Daniel Lutz Wed, 1 May 2002 20:00:04 +0200 + +autofs (3.9.99-4.0.0pre10-1) unstable; urgency=low + + * New maintainer (closes: Bug#131639) + * Added missing `"' at line 5 in autofs.event.d (closes: Bug#128177) + + -- Daniel Lutz Fri, 5 Apr 2002 17:52:32 +0200 + +autofs (3.9.99-4.0.0pre10-0) unstable; urgency=low + + * New upstream. The upstream version is actually 4.0.0pre10, but having + the version munged like this allows for upgrade from 3.x to this, and + eventualy from this to the final 4.0. Closes: #63375. + * Document -D in automount(8). Closes: #112172. + * Add support for ext3 mounts(this is just a symlink to mount_ext2.so), + so that fsck can be run on them. Closes: #119937. + * Add apm script, so unused automount file systems get unmounted on + suspend. Closes: #48499 + * Make messages in the init script more policy compliant. Closes: + #121949. + * Oops. Call dh_installmodules, so the file is actually installed. + Closes: #89286(for real this time). + * Restarting the init script does a full stop/start, instead of a + reload. Closes: #84695. + * Fix error that would cause empty pid files to be created. Closes: + #122071. + * Apply patch from bug, to allow for ldap maps in init script. Closes: + #118845. + + -- Adam Heath Tue, 16 Oct 2001 10:33:36 -0500 + +autofs (3.1.7-3) unstable; urgency=low + + * Oops. forgot to include debian/autofs.modules. Closes: #89286. + + -- Adam Heath Sun, 4 Jun 2001 00:25:46 -0500 + +autofs (3.1.7-2) unstable; urgency=low + + * Add hesiod support, as a separate package. Closes: #87068, #98134. + * Add ldap support, as a separate package. Closes: #87068. + * Fix init script handling of -t and --timeout. Closes: #93061. + * Add /etc/modutils/autofs, so that autofs4 is tried, before autofs. + Closes: #89286. + * For maps that start with /, assume they are files, and don't + start an autofs daemon if they don't exist. Closes: #74075. + * Add autoconf to build-depends. Closes: #73674. + * Added depends on nis >= 3.7-1, which includes code to wait until + ypbind is done, before continuing. Closes: #44584, #62142. + * If a map starts with "!", assume it is a program, instead of the + previous default being to assume yp. + + -- Adam Heath Sun, 20 May 2001 14:03:48 -0500 + +autofs (3.1.7-1) unstable; urgency=low + + * New upstream release. Closes: #66200. + * Uses dbs now. + * Remove OPEN_MAX from the program. Closes: #74726(rc), #75909(rc), + #78183(rc). + + -- Adam Heath Fri, 5 Jan 2001 01:15:54 -0600 + +autofs (3.1.4-10) unstable; urgency=low + + * Fixed reference to autofs(5) in /etc/auto.master. Closes: #67791. + * Fixed overrun of memory when multipl nfs hosts are defined. Also, + order of arguments to memset was reversed. Closes: #67427. + * Fixed --timeout processing in -9. Closes: #67505. + * Added support to the init script for detecting hesiod maps. Closes: + #69348. + * Added Build-Depends on debhelper. Closes: #70155. + * Fixed typos in README.smbfs. Closes: #71900. + * Create /var/run/autofs in /etc/init.d/autofs, if it doesn't exist. + Closes: #71951. + * Use $localoptions, instead of $local_options. Closes: #72296. + + -- Adam Heath Sun, 1 Oct 2000 23:57:33 -0500 + +autofs (3.1.4-9) frozen unstable; urgency=low + + * Another code unification. Options are now 'munged' with an awk script, + instead of shell and sed. Closes: #67294. + + -- Adam Heath Sun, 16 Jul 2000 20:14:41 -0500 + +autofs (3.1.4-8) frozen unstable; urgency=low + + * Updated auto.misc so that removable, writable devices are mounted + with the sync option. Closes: #65077. + * Unified the parsing logic, so now both file and nis based auto.master + parsing goes thru the same function. As an added benefit, this allows + for nested nis auto masters. Closes: #66606, #66761, #66527. + * Allow for nis auto masters to reference files as the source for a map, + and for file auto masters to reference nis as the source. Closes: + #66288, #66436, #66532, #66800. + * Added -nodev,nosuid to removable devices in auto.misc. Closes: #66556. + * Updated documentation(man 8 autofs) saying that you need to add + '+map [options]' to auto.master. Closes: #65590. + * Added a 'active' option to the init script. + * Used the internal active function introduced above, to only remove + pid files of automounts that have terminated, when calling the init + script with stop. Closes: #64212. + * Removed odd $map munging that is no longer needed with the unified + parsing. Closes: #62679. + + -- Adam Heath Thu, 6 Jul 2000 19:47:45 -0500 + +autofs (3.1.4-7) frozen unstable; urgency=low + + * Remove the '-' from the options specified in auto.master. + * Don't pass the $map thru basename. + * Don't fail on purge if other files exist in /var/autofs. + + -- Adam Heath Thu, 22 Jun 2000 22:56:11 -0500 + +autofs (3.1.4-6) frozen unstable; urgency=low + + * I got a private mail, saying the patch in the previous upload for + options being allowed on the daemon was incorrect. Investigated, + corrected, so this is the real fix for those 4 bugs. Txs go to + * Applied the very helpful patch included in bug#65102 from + Martin Dickopp . Closes: #65102(rc). + * Major changes to the init script, to make it do what previous + versions did(mainly, options in the master file) + * Better purge handling in postrm. + + -- Adam Heath Sat, 3 Jun 2000 19:45:04 -0500 + +autofs (3.1.4-5) frozen unstable; urgency=low + + * Allow for options to be passed to the daemon. Closes: #62954, #63164, + #64608, #64825. + * Create /var/autofs/misc when upgrading from old versions. Closes: + #62956, #64538. + + -- Adam Heath Wed, 31 May 2000 02:11:08 -0500 + +autofs (3.1.4-4) frozen unstable; urgency=low + + * Changed /mnt/amnt to /var/autofs. + * Change default config to use /var/autofs/misc instead of /misc, + which doesn't exist. Why there was never a bug filed on this, I'll + never know. + * PID files are now in /var/run/autofs/. + * My fix for bugs 40032, 410078, and 57225(in 3.1.4-1) was wrong, as I + edited samples/rc.autofs, not rc.autofs.in. Closes: #62717, #62774, + #62785, #62842. + * Handle upgrades from different versions better in postinst. + * Patch modules/mount_nfs.c to handle multiple hosts, to work around + broken /sbin/mount. + + -- Adam Heath Thu, 20 Apr 2000 20:09:29 -0500 + +autofs (3.1.4-3) frozen unstable; urgency=low + + * Fix pid file handling when the amnt dir is more than 1 level deep. + _ -> __, / -> _: Closes: #62647. + + -- Adam Heath Wed, 19 Apr 2000 19:11:52 -0500 + +autofs (3.1.4-2) frozen unstable; urgency=low + + * Fix call of update-rc.d in postinst. Closes: #62649, #62652, #62653, + #62655, #62666. + * Only mkdir /mnt/amnt if this is a first time install. Closes: #62678. + + -- Adam Heath Wed, 19 Apr 2000 12:44:37 -0500 + +autofs (3.1.4-1) frozen unstable; urgency=low + + * New maintainer. + * Acknowledge nmu fixed bugs. Closes: #34576, #38200, #44366, #46638, + #52716, #55066, #56316, #57347. + * Add -r(--no-restart-on-upgrade). Closes: #54859. + * Depends on procps. Closes: #53237. + * Bugs fixed upstream in 3.1.4: + * Arguments not passed to forked process, because of strtok. Closes: + #44586, #44767. + * Uses upstream init script, as it supports debian. Closes: #42945, + #41876, #47471. + * Applied slightly modified version of patch from bug report, to pass ro + option to fsck.ext2. Closes: #43633. + * Fix race condition during unmount. Closes: #52132. + * Conflicts with samba <= 2.0.6, as that version is needed to be used by + mount_generic. Closes: #54788. + * If /etc/auto.master exists, don't use nis. You can add +auto.master to + to /etc/auto.master if you want to combine nis and a local mapping. + Also set the type to yp in getmounts(). Closes: #40032, 41008, #57225. + * The upstream init script does not do module probing, as the old init + script used to. I don't feel it is this pkg's domain to do a modprobe. + Closes: #60542. + * Check to see if the directory already exists, before attempting to make + it ourselves. Closes: #21567. + * Reassign bug #31251, which deals with mounting a directory from multiple + hosts to mount. + * Make /mnt/amnt during configure, and remove when purging. + * Modify upstream init script to support force-reload. + * Linitian clean. + + -- Adam Heath Sun, 16 Apr 2000 14:56:09 -0500 + +autofs (3.1.4-0.1) frozen unstable; urgency=low + + * Non-maintainer upload + * New upstream version: fixes smbfs problems, and a proper + init.d-script that supports Debian. Closes: Bug#56316 + * Remove debian init-script, it's obsolete now + * Don't stop autofs in prerm, since debhelper apparently does that + now as well. Sigh. Closes: Bug#57347 + + -- Wichert Akkerman Fri, 18 Feb 2000 19:00:03 +0100 + +autofs (3.1.3-2.1) frozen unstable; urgency=low + + * NMU + * Fixed typos/runaway linebreaks in init.d script. closes: #46638, #52716 + * includes pristine upstream source. closes: #44366 + * Previously fixed but unmarked bug -- closes: #38200 + + -- Randolph Chung Wed, 27 Oct 1999 19:31:44 -0700 + +autofs (3.1.3-2) frozen unstable; urgency=low + + * auto.misc is now installed properly + * YP auto.master is not used unless local auto.master has +auto.master in it + (closes bug #40032) + * fixed sed bug in initscript (closes bug #40100) + * should now include mount_smbfs.so (closes bug #31866) + + -- Justin Maurer Sun, 6 Jun 1999 22:24:22 -0500 + +autofs (3.1.3-1) frozen unstable; urgency=low + + * new version + * uploaded from Linx Expo 1999 + + -- Justin Maurer Fri, 21 May 1999 10:38:27 -0500 + +autofs (3.1.1-8) frozen unstable; urgency=low + + * fix lintian bug for FHS + * include new autofs script bug #33397 + + -- Justin Maurer Sat, 24 Apr 1999 23:24:06 -0500 + +autofs (3.1.1-7) frozen unstable; urgency=low + + * upload to fix bad -6 package(s) + + -- Justin Maurer Tue, 5 Jan 1999 22:16:32 -0500 + +autofs (3.1.1-6) frozen unstable; urgency=low + + * new maintainer + * fixed critical security bug #31422, /etc/auto.amnt + * commented out examples by default (#31422 again) + + -- Justin Maurer Tue, 5 Jan 1999 16:59:02 -0500 + +autofs (3.1.1-5) frozen unstable; urgency=low + + * Reset mountoptions properly so options don't `leak' to other mountpoints + * Don't abort prematurely when reloading autofs + + -- Wichert Akkerman Thu, 31 Dec 1998 14:35:37 +0100 + +autofs (3.1.1-4) frozen unstable; urgency=low + + * Hopefully finally fix timeout problems now, using patch from + Zdenek Kabelac + + -- Wichert Akkerman Wed, 23 Dec 1998 00:36:32 +0100 + +autofs (3.1.1-3) frozen unstable; urgency=low + + * Fix status when option are given, patch by Peter Kundrat + * Fix some problems with timeouts + + -- Wichert Akkerman Mon, 2 Nov 1998 16:08:31 +0100 + +autofs (3.1.1-2) unstable; urgency=low + + * Don't show grep in the status (Bug# 21279) + * Don't use the function() bashism (Bug# 25350) + * Hopefully fix timeouts + * Rename directory for sample automount-map from misc to amnt + * Add NFS-mirror for ftp.debian.org to the sample automount-map + + -- Wichert Akkerman Tue, 1 Sep 1998 21:58:14 +0200 + +autofs (3.1.1-1) unstable; urgency=low + + * Upstream bugfix for NFS mounts + * Clean more aggresively + * Don't show the grep in the list of active mount points (race) + * Show correct command when stopping automount + + -- Wichert Akkerman Sat, 11 Apr 1998 02:22:26 +0200 + +autofs (3.1.0-1) unstable; urgency=low + + * New upstream version + * Clean debhelper files in clean target (lintian) + * Link modules against libc (lintian) + + -- Wichert Akkerman Mon, 6 Apr 1998 14:02:03 +0200 + +autofs (0.3.14-6) unstable; urgency=low + + * Fixed error in determening pid-file for automount + * Added timeout option + * Fixed error in checking for autofs support (Bug# 17710, 14077, 13955) + * Fixed status report (Bug# 15589) + * Switched to debhelper (Bug# 15435) + * Policy version 2.4.0.0 + * Changed FSF address in copyright file + + -- Wichert Akkerman Mon, 2 Feb 1998 12:21:44 +0100 + +autofs (0.3.14-5) unstable; urgency=low + + * Minor cosmetic fix (Bug# 13882) + + -- Wichert Akkerman Wed, 15 Oct 1997 11:19:07 +0200 + +autofs (0.3.14-4) unstable; urgency=low + + * Really fix error in /etc/init.d/autofs now + * Better comment on the PRUNEPATH option + * Use pristine sources + + -- Wichert Akkerman Mon, 29 Sep 1997 19:39:12 +0200 + +autofs (0.3.14-3) unstable; urgency=low + + * Fixed error in /etc/init.d/autofs + + -- Wichert Akkerman Mon, 29 Sep 1997 18:54:23 +0200 + +autofs (0.3.14-2) unstable; urgency=low + + * New maintainer + * Added optional pruning of mount options with NIS maps + + -- Wichert Akkerman Mon, 29 Sep 1997 18:09:52 +0200 + +autofs (0.3.14-1) unstable; urgency=low + + * Revise control file + * Check if autofs is available at all before trying to start autofs + * New upstream release + + -- Christoph Lameter Sun, 21 Sep 1997 19:07:49 -0700 + +autofs (0.3.13-1) unstable; urgency=low + + * New upstream release + + -- Christoph Lameter Thu, 18 Sep 1997 11:37:21 -0700 + +autofs (0.3.11-2) unstable; urgency=low + + * #13047: Build with YPLIBS=-lnsl + + -- Christoph Lameter Mon, 15 Sep 1997 21:50:01 -0700 + +autofs (0.3.11-1) unstable; urgency=low + + * New upstream release + + -- Christoph Lameter Sat, 13 Sep 1997 16:18:24 -0700 + +autofs (0.3.10-1) unstable; urgency=low + + * Miquel S. provided new init.d script. Fixed up a bit by me. + * Upstream update. + + -- Christoph Lameter Thu, 11 Sep 1997 18:37:40 -0700 + +autofs (0.3.8-2) unstable; urgency=low + + * David Engel: Missing ! in init.d for NIS support, RC number changed to + 21 + + -- Christoph Lameter Wed, 10 Sep 1997 21:58:09 -0700 + +autofs (0.3.8-1) unstable; urgency=low + + * Upstream update which incorporates some changes I submitted (most + notably the documentation) and which might fix a problem with + hangs. /etc/auto.amd has been renamed to /etc/auto.misc + + -- Christoph Lameter Tue, 9 Sep 1997 18:24:09 -0700 + +autofs (0.3.7-5) unstable; urgency=low + + * Build with egcc + * Make the example floppy mount fstype=auto (Joey) in order to be able to + mount arbitrary floppy formats automatically + + -- Christoph Lameter Mon, 8 Sep 1997 11:45:45 -0700 + +autofs (0.3.7-4) unstable; urgency=low + + * Reload function of the /etc/init.d/autofs script will not disturb active + running automounters. Complete rework of init.d script + * Review by hpa + * Wrote manpages. + * More examples and corrected some incorrect inferences from Solaris code. + * Changes to startup output after consultation via irc with Joey Hess. + + -- Christoph Lameter Sun, 7 Sep 1997 17:14:41 -0700 + +autofs (0.3.7-3) unstable; urgency=low + + * Fix init.d script and provided a restart function following jh + suggestions. + * Fix dependency on NIS reported by Joeyh + + -- Christoph Lameter Sat, 6 Sep 1997 22:29:33 -0700 + +autofs (0.3.7-2) unstable; urgency=low + + * Tested and works. + * Provide example configuration to access the archives at ftp.kernel.org + as a file in /amd/kernel. + + -- Christoph Lameter Sat, 6 Sep 1997 21:33:53 -0700 + +autofs (0.3.7-1) unstable; urgency=low + + * Initial Release. Untested. Maintainer wanted. + + -- Christoph Lameter Sat, 6 Sep 1997 10:44:44 -0700 + --- autofs-4.1.4.orig/debian/control +++ autofs-4.1.4/debian/control @@ -0,0 +1,57 @@ +Source: autofs +Section: utils +Priority: extra +Maintainer: Steinar H. Gunderson +Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 5), libhesiod-dev, libldap-dev, autoconf + +Package: autofs +Architecture: any +Depends: ${shlibs:Depends}, ucf +Recommends: nfs-common +Conflicts: samba (<< 2.0.6-1) +Description: kernel-based automounter for Linux + Autofs controls the operation of the automount daemons. The + automount daemons automatically mount filesystems when they + are used and unmount them after a period of inactivity. This + is done based on a set of pre-configured maps. + . + The kernel automounter implements an almost complete SunOS + style automounter under Linux. Automounter version 4 + (autofs4) has to be enabled when compiling the kernel. + Debian packaged kernels have it enabled. + +Package: autofs-hesiod +Architecture: any +Depends: ${shlibs:Depends}, autofs +Description: Hesiod map support for autofs + Autofs controls the operation of the automount daemons. The + automount daemons automatically mount filesystems when they + are used and unmount them after a period of inactivity. This + is done based on a set of pre-configured maps. + . + The kernel automounter implements an almost complete SunOS style + automounter under Linux. Automounter version 4 (autofs4) has to be + enabled when compiling the kernel. Debian packaged kernels have it + enabled. + . + This package provides support for Hesiod filsys entries within autofs. + These entries are used extensively at MIT, and may also be used at other + sites. + +Package: autofs-ldap +Architecture: any +Depends: ${shlibs:Depends}, autofs, ldap-utils +Description: LDAP map support for autofs + Autofs controls the operation of the automount daemons. The + automount daemons automatically mount filesystems when they + are used and unmount them after a period of inactivity. This + is done based on a set of pre-configured maps. + . + The kernel automounter implements an almost complete SunOS style + automounter under Linux. Automounter version 4 (autofs4) has to be + enabled when compiling the kernel. Debian packaged kernels have it + enabled. + . + This package provides support for LDAP queries in autofs so that + you can use automount maps stored on an LDAP server. --- autofs-4.1.4.orig/debian/postinst +++ autofs-4.1.4/debian/postinst @@ -0,0 +1,45 @@ +#!/bin/sh + +[ -f /etc/default/autofs ] && . /etc/default/autofs + +if [ "$1" = "configure" ]; then + ucf /usr/share/autofs/conffiles/auto.master /etc/auto.master + ucf /usr/share/autofs/conffiles/auto.misc /etc/auto.misc + ucf /usr/share/autofs/conffiles/auto.net /etc/auto.net + ucf /usr/share/autofs/conffiles/auto.smb /etc/auto.smb + ucf /usr/share/autofs/conffiles/autofs.default /etc/default/autofs +fi + +if [ -x "/etc/init.d/autofs" ]; then + update-rc.d autofs defaults 19 > /dev/null +fi + +mkdirs() { + if [ ! -d /var/autofs ]; then + mkdir /var/autofs + fi + if [ ! -d /var/autofs/misc ]; then + mkdir /var/autofs/misc + fi +} +if [ "$1" = "configure" ]; then + if [ -z "$2" -o "$2" = "" ]; then + # + # First time this has been installed on this machine, + # or the pkg was previously purged. + # + mkdirs + if [ -x "/etc/init.d/autofs" ]; then + /etc/init.d/autofs start + fi + else + # upgrade + if [ -x "/etc/init.d/autofs" ]; then + if [ -z "$AUTOFS_DONT_RESTART_ON_UPGRADES" ]; then + invoke-rc.d autofs restart + fi + fi + fi +fi + +#DEBHELPER# --- autofs-4.1.4.orig/debian/prerm +++ autofs-4.1.4/debian/prerm @@ -0,0 +1,16 @@ +#!/bin/sh -e + +[ -f /etc/default/autofs ] && . /etc/default/autofs + +if [ "$1" = "failed-upgrade" ]; then + set +e +fi + +if [ -x "/etc/init.d/autofs" ]; then + if [ "$1" = "remove" -o -z "$AUTOFS_DONT_RESTART_ON_UPGRADES" ]; then + invoke-rc.d autofs stop + fi +fi + +#DEBHELPER# +exit 0 --- autofs-4.1.4.orig/debian/postrm +++ autofs-4.1.4/debian/postrm @@ -0,0 +1,23 @@ +#!/bin/sh + +#DEBHELPER# +if [ "$1" = "purge" ] ; then + update-rc.d autofs remove >/dev/null + if [ -d /var/autofs/misc ]; then + rmdir /var/autofs/misc + fi + if [ -d /var/autofs ]; then + rmdir --ignore-fail-on-non-empty /var/autofs + fi + + for FILE in /etc/auto.master /etc/auto.misc /etc/auto.net /etc/auto.smb /etc/default/autofs; do + # Taken from the ucf example postrm + for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist; do + rm -f $FILE$ext + done + rm -f $FILE + if [ -x /usr/bin/ucf ]; then + ucf --purge $FILE + fi + done +fi --- autofs-4.1.4.orig/debian/copyright +++ autofs-4.1.4/debian/copyright @@ -0,0 +1,23 @@ +This package was debianized by Christoph Lameter clameter@debian.org on +Sat, 6 Sep 1997 10:44:44 -0700. + +It was downloaded from ftp://ftp.kernel.org/pub/linux/daemons/autofs + +Upstream development is taking place over the autofs mailing list at +linux.kernel.org: http://linux.kernel.org/mailman/listinfo/autofs + +Copyright: + +For all software in this distribution: + + Copyright 1997 Transmeta Corporation -- All Rights Reserved + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, + MA 02110-1301, USA; either version 2 of the License, or (at your + option) any later version. + +On Debian GNU/Linux systems, the complete text of the GNU General Public +License can be found in the `/usr/share/common-licenses' directory. + --- autofs-4.1.4.orig/debian/auto.master.md5sum +++ autofs-4.1.4/debian/auto.master.md5sum @@ -0,0 +1 @@ +a0e3fc444b0824664ffc04826e2f3c97 build-tree/autofs-4.1.4_beta2/samples/auto.master --- autofs-4.1.4.orig/debian/auto.misc.md5sum +++ autofs-4.1.4/debian/auto.misc.md5sum @@ -0,0 +1 @@ +3ffaa132f47cf5075192cf6c21abf037 build-tree/autofs-4.1.4_beta2/samples/auto.misc --- autofs-4.1.4.orig/debian/auto.net.md5sum +++ autofs-4.1.4/debian/auto.net.md5sum @@ -0,0 +1 @@ +0acd3943236c9eae496eb815610c25db build-tree/autofs-4.1.4_beta2/samples/auto.net --- autofs-4.1.4.orig/debian/autofs-hesiod.files +++ autofs-4.1.4/debian/autofs-hesiod.files @@ -0,0 +1,2 @@ +usr/lib/autofs/lookup_hesiod.so +usr/lib/autofs/parse_hesiod.so --- autofs-4.1.4.orig/debian/auto.smb.md5sum +++ autofs-4.1.4/debian/auto.smb.md5sum @@ -0,0 +1 @@ +eec3f773e09846b7d4325f0ce20ab5bd build-tree/autofs-4.1.4_beta2/samples/auto.smb --- autofs-4.1.4.orig/debian/autofs-ldap.README.Debian +++ autofs-4.1.4/debian/autofs-ldap.README.Debian @@ -0,0 +1,15 @@ +automount master map in LDAP +============================ + +Currently I simply ship what upstream (ie essentially RedHat) is packaging. +It has been pointed out that autofs_ldap_master has issues, a solution entirely +in the init script as we had bevore (using ldapsearch or such) would be +preferred. Sadly, since I can't test it, I wasn't able to "port" our old patches +to the new autofs init script. + +Also, there seem to be at least two different schemes in use for this purpose. + +Since I have hardly any knowledge on LDAP and can't test LDAP stuff neither, +I'd appreciate help on this matter. + + -- Arthur Korn Mon, 18 Oct 2004 14:26:08 +0200 --- autofs-4.1.4.orig/debian/autofs.default.md5sum +++ autofs-4.1.4/debian/autofs.default.md5sum @@ -0,0 +1 @@ +424c4415a458ca32a56e88f847a80690 debian/autofs.default --- autofs-4.1.4.orig/debian/autofs-ldap.docs +++ autofs-4.1.4/debian/autofs-ldap.docs @@ -0,0 +1 @@ +build_dir/README.ldap --- autofs-4.1.4.orig/debian/autofs-ldap.examples +++ autofs-4.1.4/debian/autofs-ldap.examples @@ -0,0 +1,2 @@ +build_dir/samples/ldap* +build_dir/samples/auto.master.ldap --- autofs-4.1.4.orig/debian/autofs-ldap.files +++ autofs-4.1.4/debian/autofs-ldap.files @@ -0,0 +1,2 @@ +usr/lib/autofs/lookup_ldap.so +usr/lib/autofs/autofs-ldap-auto-master --- autofs-4.1.4.orig/debian/autofs.default +++ autofs-4.1.4/debian/autofs.default @@ -0,0 +1,21 @@ +# Timeout value in seconds (default: 300) +TIMEOUT=300 + +# Direct maps are only partially implemented +# and could silently break things. See /usr/share/doc/autofs/README.direct for information +# about current limitations and check your configurations before enabling them. +DISABLE_DIRECT=1 + +# The LDAP URI for auto.master +# (e. g. LDAPURI="ldap://ldapserver.example.com/") +#LDAPURI= + +# The LDAP base for auto.master +# (e. g. LDAPBASE="ou=auto.master,ou=Automount,dc=example,dc=com") +#LDAPBASE= + +# Restart autofs automatically on upgrades -- normally, you want this, but +# if you have critical files on autofs-mounted directories (the new autofs +# .deb file, for instance), you may want to set this to 1 +#AUTOFS_DONT_RESTART_ON_UPGRADES= + --- autofs-4.1.4.orig/debian/dirs +++ autofs-4.1.4/debian/dirs @@ -0,0 +1 @@ +var/run/autofs --- autofs-4.1.4.orig/debian/docs +++ autofs-4.1.4/debian/docs @@ -0,0 +1,12 @@ +build_dir/README +build_dir/README.changer +build_dir/README.direct +build_dir/README.ghosting +build_dir/README.init +build_dir/README.ldap +build_dir/README.ncpfs +build_dir/README.options +build_dir/README.patches +build_dir/README.replicated-server +build_dir/README.smbfs +build_dir/CREDITS --- autofs-4.1.4.orig/debian/event.d +++ autofs-4.1.4/debian/event.d @@ -0,0 +1,22 @@ +#!/bin/sh +set -e + +# only run this script if the system is going into suspend +if [ "$1" != "suspend" ]; then + exit 0 +fi + +# Expire any automounted file systems when suspending. We don't stop autofs, +# since there might still be lots of active files on these filesystems (so +# stopping might easily fail). + +# Each automount daemon leaves its pid in one of these files +for i in /var/run/autofs/*.pid; do + pid=`head -n 1 $i 2>/dev/null` + [ "$pid" = "" ] && continue + # SIGUSR1 makes the daemon unmount any unused filesystems without + # quitting + kill -USR1 $pid +done + + --- autofs-4.1.4.orig/debian/examples +++ autofs-4.1.4/debian/examples @@ -0,0 +1,3 @@ +build_dir/samples/auto.master +build_dir/samples/auto.misc +build_dir/samples/auto.net --- autofs-4.1.4.orig/debian/patches/072_fix_auto_net_sort +++ autofs-4.1.4/debian/patches/072_fix_auto_net_sort @@ -0,0 +1,11 @@ +--- autofs-4.1.4.orig/samples/auto.net 2005-11-15 09:23:12.000000000 -0700 ++++ autofs-4.1.4/samples/auto.net 2005-11-15 09:23:25.000000000 -0700 +@@ -37,7 +37,7 @@ + # Newer distributions get this right + SHOWMOUNT="$SMNT --no-headers -e $key" + +-$SHOWMOUNT | LC_ALL=C sort +0 | \ ++$SHOWMOUNT | LC_ALL=C sort -k 1 | \ + awk -v key="$key" -v opts="$opts" -- ' + BEGIN { ORS=""; first=1 } + { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } --- autofs-4.1.4.orig/debian/patches/070_fix_regex_typo +++ autofs-4.1.4/debian/patches/070_fix_regex_typo @@ -0,0 +1,12 @@ +diff -ur autofs-4.1.4.orig/samples/rc.autofs.in autofs-4.1.4/samples/rc.autofs.in +--- autofs-4.1.4.orig/samples/rc.autofs.in 2005-06-11 01:28:59.000000000 +0200 ++++ autofs-4.1.4/samples/rc.autofs.in 2005-06-11 01:35:06.000000000 +0200 +@@ -148,7 +148,7 @@ + cat /etc/auto.master | awk '{print $0}' | sed -e '/^#/d' -e '/^$/d' | ( + while read auto_master_in + do +- if [ "`echo $auto_master_in | grep '^+'`" = "" ]; then ++ if [ "`echo $auto_master_in | grep '^\+'`" = "" ]; then + echo $auto_master_in + else + cat /etc/auto.master | grep '^\+' | sed -e '/^#/d' -e '/^$/d' | ( --- autofs-4.1.4.orig/debian/patches/077_fix_nfs_submounts_with_2_6_18 +++ autofs-4.1.4/debian/patches/077_fix_nfs_submounts_with_2_6_18 @@ -0,0 +1,18 @@ +--- autofs-4.1.4/daemon/automount.c.old 2006-10-17 12:59:27.284566000 +0200 ++++ autofs-4.1.4/daemon/automount.c 2006-10-17 12:58:55.978259000 +0200 +@@ -93,12 +93,13 @@ + *bp = '\0'; + if (mkdir(buf, mode) == -1) { + /* If it already exists, make sure it's a directory */ +- if (errno == EEXIST) { ++ if (errno == EEXIST || errno == EROFS) { + struct stat st; + + if (stat(buf, &st) == 0 && !S_ISDIR(st.st_mode)) + errno = ENOTDIR; + else { ++ errno = EEXIST; + /* last component, return -1 */ + if (*cp != '\0') + continue; + --- autofs-4.1.4.orig/debian/patches/073_configurable_locking +++ autofs-4.1.4/debian/patches/073_configurable_locking @@ -0,0 +1,175 @@ + +This patch provides a configure option to disable the use of a lock +file when calling mount from autofs. It also adds a patch to the +"patches" directory that needs to be used for mount to (hopefuully) +prevent /etc/mtab corruption when rapidly mounting filesystems +when autofs does not use locking. + +To disable the locking add the configure option --disable-mount-locking. + +diff -Nurp autofs-4.1.4.orig/configure autofs-4.1.4/configure +--- autofs-4.1.4.orig/configure 2005-04-06 23:24:37.000000000 +0800 ++++ autofs-4.1.4/configure 2005-10-23 11:33:44.000000000 +0800 +@@ -842,6 +842,7 @@ Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --disable-ext-env disable search in environment for substitution variable ++--disable-mount-locking disable use of locking when spawning mount command + + Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] +@@ -4308,6 +4309,23 @@ _ACEOF + fi + + # ++# Disable use of locking when spawning mount command ++# ++# Check whether --enable-mount-locking or --disable-mount-locking was given. ++if test "${enable_mount_locking+set}" = set; then ++ enableval="$enable_mount_locking" ++ ++else ++ enableval=yes ++fi; ++if test x$enable_mount_locking = xyes -o x$enableval = xyes; then ++ cat >>confdefs.h <<\_ACEOF ++#define ENABLE_MOUNT_LOCKING 1 ++_ACEOF ++ ++fi ++ ++# + # Write Makefile.conf and include/config.h + # + ac_config_headers="$ac_config_headers include/config.h" +diff -Nurp autofs-4.1.4.orig/configure.in autofs-4.1.4/configure.in +--- autofs-4.1.4.orig/configure.in 2005-04-06 23:24:37.000000000 +0800 ++++ autofs-4.1.4/configure.in 2005-10-23 11:33:35.000000000 +0800 +@@ -167,6 +167,16 @@ if test x$enable_ext_env = xyes; then + fi + + # ++# Disable use of locking when spawning mount command ++# ++AC_ARG_ENABLE(mount-locking, ++--disable-mount-locking disable use of locking when spawning mount command,, ++ enableval=yes) ++if test x$enable_mount_locking = xyes -o x$enableval = xyes; then ++ AC_DEFINE(ENABLE_MOUNT_LOCKING, 1) ++fi ++ ++# + # Write Makefile.conf and include/config.h + # + AC_CONFIG_HEADER(include/config.h) +diff -Nurp autofs-4.1.4.orig/daemon/spawn.c autofs-4.1.4/daemon/spawn.c +--- autofs-4.1.4.orig/daemon/spawn.c 2005-02-10 20:56:53.000000000 +0800 ++++ autofs-4.1.4/daemon/spawn.c 2005-10-23 10:51:10.000000000 +0800 +@@ -322,6 +322,7 @@ int spawnl(int logpri, const char *prog, + return do_spawn(logpri, 0, prog, (const char **) argv); + } + ++#ifdef ENABLE_MOUNT_LOCKING + int spawnll(int logpri, const char *prog, ...) + { + va_list arg; +@@ -342,3 +343,4 @@ int spawnll(int logpri, const char *prog + + return do_spawn(logpri, 1, prog, (const char **) argv); + } ++#endif +diff -Nurp autofs-4.1.4.orig/include/automount.h autofs-4.1.4/include/automount.h +--- autofs-4.1.4.orig/include/automount.h 2005-01-26 21:03:02.000000000 +0800 ++++ autofs-4.1.4/include/automount.h 2005-10-23 10:51:10.000000000 +0800 +@@ -121,9 +121,13 @@ extern struct autofs_point ap; + + int aquire_lock(void); + void release_lock(void); +-int spawnll(int logpri, const char *prog, ...); + int spawnl(int logpri, const char *prog, ...); +-int spawnv(int logpri, const char *prog, const char *const *argv); ++#ifdef ENABLE_MOUNT_LOCKING ++int spawnll(int logpri, const char *prog, ...); ++#else ++#define spawnll spawnl ++#endif ++int spawnv(int ogpri, const char *prog, const char *const *argv); + void reset_signals(void); + void ignore_signals(void); + void discard_pending(int sig); +diff -Nurp autofs-4.1.4.orig/include/config.h.in autofs-4.1.4/include/config.h.in +--- autofs-4.1.4.orig/include/config.h.in 2004-02-03 23:23:21.000000000 +0800 ++++ autofs-4.1.4/include/config.h.in 2005-10-23 10:51:10.000000000 +0800 +@@ -25,3 +25,5 @@ + #undef HAVE_SLOPPY_MOUNT + + #undef ENABLE_EXT_ENV ++ ++#undef ENABLE_MOUNT_LOCKING +diff -Nurp autofs-4.1.4.orig/patches/util-linux-2.12a-flock.patch autofs-4.1.4/patches/util-linux-2.12a-flock.patch +--- autofs-4.1.4.orig/patches/util-linux-2.12a-flock.patch 1970-01-01 08:00:00.000000000 +0800 ++++ autofs-4.1.4/patches/util-linux-2.12a-flock.patch 2005-10-23 10:51:10.000000000 +0800 +@@ -0,0 +1,30 @@ ++--- util-linux-2.12a/mount/fstab.c.flock 2005-09-17 01:36:03.000000000 +0800 +++++ util-linux-2.12a/mount/fstab.c 2005-09-17 01:41:12.000000000 +0800 ++@@ -488,7 +488,7 @@ lock_mtab (void) { ++ } ++ /* proceed anyway */ ++ } ++- we_created_lockfile = 1; +++ we_created_lockfile = fd; ++ } else { ++ static int tries = 0; ++ ++@@ -510,9 +510,8 @@ lock_mtab (void) { ++ MOUNTED_LOCK); ++ sleep(1); ++ } +++ close(fd); ++ } ++- ++- close(fd); ++ } ++ } ++ ++@@ -520,6 +519,7 @@ lock_mtab (void) { ++ void ++ unlock_mtab (void) { ++ if (we_created_lockfile) { +++ close(we_created_lockfile); ++ unlink (MOUNTED_LOCK); ++ we_created_lockfile = 0; ++ } +diff -Nurp autofs-4.1.4.orig/patches/util-linux-2.12q-flock.patch autofs-4.1.4/patches/util-linux-2.12q-flock.patch +--- autofs-4.1.4.orig/patches/util-linux-2.12q-flock.patch 1970-01-01 08:00:00.000000000 +0800 ++++ autofs-4.1.4/patches/util-linux-2.12q-flock.patch 2005-10-23 10:51:10.000000000 +0800 +@@ -0,0 +1,29 @@ ++--- util-linux-2.12q/mount/fstab.c.flock 2005-09-17 01:10:37.000000000 +0800 +++++ util-linux-2.12q/mount/fstab.c 2005-09-17 01:16:51.000000000 +0800 ++@@ -417,6 +417,7 @@ ++ unlock_mtab (void) { ++ if (we_created_lockfile) { ++ unlink (MOUNTED_LOCK); +++ close(we_created_lock_file); ++ we_created_lockfile = 0; ++ } ++ } ++@@ -528,6 +529,7 @@ ++ } ++ /* proceed anyway */ ++ } +++ we_created_lock_file = fd; ++ } else { ++ static int tries = 0; ++ ++@@ -549,9 +551,8 @@ ++ MOUNTED_LOCK); ++ sleep(1); ++ } +++ close(fd); ++ } ++- ++- close(fd); ++ } ++ } ++ --- autofs-4.1.4.orig/debian/patches/063_misc_fixes +++ autofs-4.1.4/debian/patches/063_misc_fixes @@ -0,0 +1,75 @@ +diff -Nurp autofs-4.1.4.orig/lib/cache.c autofs-4.1.4/lib/cache.c +--- autofs-4.1.4.orig/lib/cache.c 2005-02-06 14:00:53.000000000 +0800 ++++ autofs-4.1.4/lib/cache.c 2005-05-07 17:29:21.000000000 +0800 +@@ -337,8 +337,10 @@ void cache_clean(const char *root, time_ + if (!path) + return; + +- if (is_mounted(_PATH_MOUNTED, path)) ++ if (is_mounted(_PATH_MOUNTED, path)) { ++ free(path); + continue; ++ } + + if (me->age < age) { + mapent_hash[i] = me->next; +diff -Nurp autofs-4.1.4.orig/modules/lookup_file.c autofs-4.1.4/modules/lookup_file.c +--- autofs-4.1.4.orig/modules/lookup_file.c 2005-04-06 23:14:23.000000000 +0800 ++++ autofs-4.1.4/modules/lookup_file.c 2005-05-07 17:27:30.000000000 +0800 +@@ -157,6 +157,10 @@ static int read_one(FILE *f, char *key, + break; + + case st_compare: ++ if (kptr - key > KEY_MAX_LEN) { ++ state = st_badent; ++ break; ++ } + if (ch == '\n') + state = st_begin; + else if (isspace(ch) && !escape) { +diff -Nurp autofs-4.1.4.orig/modules/parse_sun.c autofs-4.1.4/modules/parse_sun.c +--- autofs-4.1.4.orig/modules/parse_sun.c 2005-05-07 17:39:44.000000000 +0800 ++++ autofs-4.1.4/modules/parse_sun.c 2005-05-07 17:35:27.000000000 +0800 +@@ -680,6 +680,10 @@ static int sun_mount(const char *root, c + "mounting root %s, mountpoint %s, what %s, fstype %s, options %s\n", + root, mountpoint, what, fstype, options); + ++ /* A malformed entry of the form key /xyz will trigger this case */ ++ if (!what || *what == '\0') ++ return 1; ++ + if (!strcmp(fstype, "nfs")) { + rv = mount_nfs->mount_mount(root, mountpoint, strlen(mountpoint), + what, fstype, options, mount_nfs->context); +@@ -695,6 +699,18 @@ static int sun_mount(const char *root, c + return rv; + } + ++static int key_exists(struct multi_mnt *list, char *path, int pathlen) ++{ ++ struct multi_mnt *mmptr = list; ++ ++ while (mmptr && pathlen == strlen(mmptr->path)) { ++ if (!strncmp(mmptr->path, path, pathlen)) ++ return 1; ++ mmptr = mmptr->next; ++ } ++ return 0; ++} ++ + /* + * Build list of mounts in shortest -> longest order. + * Pass in list head and return list head. +@@ -725,6 +741,12 @@ struct multi_mnt *multi_add_list(struct + mmptr = mmptr->next; + } + ++ /* if a multimount entry has duplicate keys, it is invalid */ ++ if (key_exists(mmptr, path, plen)) { ++ free(new); ++ return NULL; ++ } ++ + if (old) + old->next = new; + new->next = mmptr; --- autofs-4.1.4.orig/debian/patches/074_auto_smb_cifs +++ autofs-4.1.4/debian/patches/074_auto_smb_cifs @@ -0,0 +1,13 @@ +diff --git a/samples/auto.smb b/samples/auto.smb +index ad44fc0..d0abcd7 100755 +--- a/samples/auto.smb ++++ b/samples/auto.smb +@@ -5,7 +5,7 @@ + # This file must be executable to work! chmod 755! + + key="$1" +-opts="-fstype=smbfs" ++opts="-fstype=cifs" + + for P in /bin /sbin /usr/bin /usr/sbin + do --- autofs-4.1.4.orig/debian/patches/076_ldap_deprecated +++ autofs-4.1.4/debian/patches/076_ldap_deprecated @@ -0,0 +1,266 @@ + +This patch defines the LDAP_DEPRICATED macro to the compile flags. + +This prevents a SIGSEGV when using the depricated LDAP calls on x86_64 +archictecture. A word of warning - as far as I know this should function +ok with recent versions of openldap but I don't know if it will behave +as expected on older versions, so use with caution. + +diff -Nurp autofs-4.1.4.orig/aclocal.m4 autofs-4.1.4/aclocal.m4 +--- autofs-4.1.4.orig/aclocal.m4 2003-09-29 16:22:35.000000000 +0800 ++++ autofs-4.1.4/aclocal.m4 2006-01-25 11:06:23.000000000 +0800 +@@ -9,8 +9,8 @@ dnl ------------------------------------ + AC_DEFUN(AF_PATH_INCLUDE, + [AC_PATH_PROGS($1,$2,$3,$4) + if test -n "$$1"; then +- AC_DEFINE(HAVE_$1) +- AC_DEFINE_UNQUOTED(PATH_$1, "$$1") ++ AC_DEFINE(HAVE_$1,1,[define if you have $1]) ++ AC_DEFINE_UNQUOTED(PATH_$1, "$$1", [define if you have $1]) + HAVE_$1=1 + else + HAVE_$1=0 +@@ -28,7 +28,7 @@ AC_DEFUN(AF_SLOPPY_MOUNT, + [if test -n "$MOUNT" ; then + AC_MSG_CHECKING([if mount accepts the -s option]) + if "$MOUNT" -s > /dev/null 2>&1 ; then +- AC_DEFINE(HAVE_SLOPPY_MOUNT) ++ AC_DEFINE(HAVE_SLOPPY_MOUNT, 1, [define if the mount command supports the -s option]) + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) +diff -Nurp autofs-4.1.4.orig/configure autofs-4.1.4/configure +--- autofs-4.1.4.orig/configure 2006-01-25 11:04:56.000000000 +0800 ++++ autofs-4.1.4/configure 2006-01-25 11:06:41.000000000 +0800 +@@ -1359,11 +1359,13 @@ done + test -n "$MOUNT" || MOUNT="/bin/mount" + + if test -n "$MOUNT"; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_MOUNT 1 + _ACEOF + +- cat >>confdefs.h <<_ACEOF ++ ++cat >>confdefs.h <<_ACEOF + #define PATH_MOUNT "$MOUNT" + _ACEOF + +@@ -1418,11 +1420,13 @@ done + test -n "$UMOUNT" || UMOUNT="/bin/umount" + + if test -n "$UMOUNT"; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_UMOUNT 1 + _ACEOF + +- cat >>confdefs.h <<_ACEOF ++ ++cat >>confdefs.h <<_ACEOF + #define PATH_UMOUNT "$UMOUNT" + _ACEOF + +@@ -1476,11 +1480,13 @@ fi + done + + if test -n "$E2FSCK"; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_E2FSCK 1 + _ACEOF + +- cat >>confdefs.h <<_ACEOF ++ ++cat >>confdefs.h <<_ACEOF + #define PATH_E2FSCK "$E2FSCK" + _ACEOF + +@@ -1534,11 +1540,13 @@ fi + done + + if test -n "$E3FSCK"; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_E3FSCK 1 + _ACEOF + +- cat >>confdefs.h <<_ACEOF ++ ++cat >>confdefs.h <<_ACEOF + #define PATH_E3FSCK "$E3FSCK" + _ACEOF + +@@ -1556,7 +1564,8 @@ if test -n "$MOUNT" ; then + echo "$as_me:$LINENO: checking if mount accepts the -s option" >&5 + echo $ECHO_N "checking if mount accepts the -s option... $ECHO_C" >&6 + if "$MOUNT" -s > /dev/null 2>&1 ; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define HAVE_SLOPPY_MOUNT 1 + _ACEOF + +@@ -3403,6 +3412,7 @@ if test "${with_openldap+set}" = set; th + fi; + if test -z "$HAVE_LDAP"; then + HAVE_LDAP=0 ++ LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1" + echo "$as_me:$LINENO: checking for ldap_init in -lldap" >&5 + echo $ECHO_N "checking for ldap_init in -lldap... $ECHO_C" >&6 + if test "${ac_cv_lib_ldap_ldap_init+set}" = set; then +@@ -4302,7 +4312,8 @@ else + enableval=yes + fi; + if test x$enable_ext_env = xyes; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define ENABLE_EXT_ENV 1 + _ACEOF + +@@ -4319,7 +4330,8 @@ else + enableval=yes + fi; + if test x$enable_mount_locking = xyes -o x$enableval = xyes; then +- cat >>confdefs.h <<\_ACEOF ++ ++cat >>confdefs.h <<\_ACEOF + #define ENABLE_MOUNT_LOCKING 1 + _ACEOF + +diff -Nurp autofs-4.1.4.orig/configure.in autofs-4.1.4/configure.in +--- autofs-4.1.4.orig/configure.in 2006-01-25 11:04:56.000000000 +0800 ++++ autofs-4.1.4/configure.in 2006-01-25 11:06:23.000000000 +0800 +@@ -118,6 +118,7 @@ AC_ARG_WITH(openldap, + ) + if test -z "$HAVE_LDAP"; then + HAVE_LDAP=0 ++ LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1" + AC_CHECK_LIB(ldap, ldap_init, HAVE_LDAP=1 LIBLDAP="$LIBLDAP -lldap -llber -lresolv", , + -llber -lresolv $LIBS) + fi +@@ -163,7 +164,7 @@ AC_ARG_ENABLE(ext-env, + --disable-ext-env disable search in environment for substitution variable,, + enableval=yes) + if test x$enable_ext_env = xyes; then +- AC_DEFINE(ENABLE_EXT_ENV, 1) ++ AC_DEFINE(ENABLE_EXT_ENV, 1, [leave this alone]) + fi + + # +@@ -173,7 +174,7 @@ AC_ARG_ENABLE(mount-locking, + --disable-mount-locking disable use of locking when spawning mount command,, + enableval=yes) + if test x$enable_mount_locking = xyes -o x$enableval = xyes; then +- AC_DEFINE(ENABLE_MOUNT_LOCKING, 1) ++ AC_DEFINE(ENABLE_MOUNT_LOCKING, 1, [disable mount table locking -- use this if your maps contain recursive mounts -- EXPERIMENTAL]) + fi + + # +diff -Nurp autofs-4.1.4.orig/include/config.h.in autofs-4.1.4/include/config.h.in +--- autofs-4.1.4.orig/include/config.h.in 2006-01-25 11:04:56.000000000 +0800 ++++ autofs-4.1.4/include/config.h.in 2006-01-25 11:06:43.000000000 +0800 +@@ -1,29 +1,80 @@ +-#ident "$Id: config.h.in,v 1.4 2004/02/03 15:23:21 raven Exp $" +-/* -*- c -*- +- * +- * config.h.in: Pattern file for autofs to be filled in by configure +- * +- */ ++/* include/config.h.in. Generated from configure.in by autoheader. */ + +-/* Program paths */ ++/* leave this alone */ ++#undef ENABLE_EXT_ENV ++ ++/* disable mount table locking -- use this if your maps contain recursive ++ mounts -- EXPERIMENTAL */ ++#undef ENABLE_MOUNT_LOCKING ++ ++/* define if you have E2FSCK */ ++#undef HAVE_E2FSCK ++ ++/* define if you have E3FSCK */ ++#undef HAVE_E3FSCK ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_INTTYPES_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_MEMORY_H ++ ++/* define if you have MOUNT */ + #undef HAVE_MOUNT +-#undef PATH_MOUNT + ++/* define if the mount command supports the -s option */ ++#undef HAVE_SLOPPY_MOUNT ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDINT_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDLIB_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRINGS_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRING_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_STAT_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TYPES_H ++ ++/* define if you have UMOUNT */ + #undef HAVE_UMOUNT +-#undef PATH_UMOUNT + +-#undef HAVE_SMBMOUNT +-#undef PATH_SMBMOUNT ++/* Define to 1 if you have the header file. */ ++#undef HAVE_UNISTD_H + +-#undef HAVE_E2FSCK ++/* Define to the address where bug reports for this package should be sent. */ ++#undef PACKAGE_BUGREPORT ++ ++/* Define to the full name of this package. */ ++#undef PACKAGE_NAME ++ ++/* Define to the full name and version of this package. */ ++#undef PACKAGE_STRING ++ ++/* Define to the one symbol short name of this package. */ ++#undef PACKAGE_TARNAME ++ ++/* Define to the version of this package. */ ++#undef PACKAGE_VERSION ++ ++/* define if you have E2FSCK */ + #undef PATH_E2FSCK + +-#undef HAVE_E3FSCK ++/* define if you have E3FSCK */ + #undef PATH_E3FSCK + +-/* Define this option if mount(8) supports the -s (sloppy) option */ +-#undef HAVE_SLOPPY_MOUNT ++/* define if you have MOUNT */ ++#undef PATH_MOUNT + +-#undef ENABLE_EXT_ENV ++/* define if you have UMOUNT */ ++#undef PATH_UMOUNT + +-#undef ENABLE_MOUNT_LOCKING ++/* Define to 1 if you have the ANSI C header files. */ ++#undef STDC_HEADERS --- autofs-4.1.4.orig/debian/patches/069_support_spaces_in_smb_share_names +++ autofs-4.1.4/debian/patches/069_support_spaces_in_smb_share_names @@ -0,0 +1,11 @@ +--- autofs-4.1.4.orig/samples/auto.smb 2005-05-13 13:41:13.000000000 +0200 ++++ autofs-4.1.4/samples/auto.smb 2006-02-21 22:45:17.000000000 +0100 +@@ -19,7 +19,7 @@ + + $SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- ' + BEGIN { ORS=""; first=1 } +- /Disk/ { if (first) { print opts; first=0 }; print " \\\n\t /" $2, "://" key "/" $2 } ++ /Disk/ { if (first) { print opts; first=0 }; sub(/ /, "\\ ", $2); print " \\\n\t /" $2, "://" key "/" $2 } + END { if (!first) print "\n"; else exit 1 } + ' + --- autofs-4.1.4.orig/debian/patches/075_auto_net_escape_hash +++ autofs-4.1.4/debian/patches/075_auto_net_escape_hash @@ -0,0 +1,9 @@ +diff -Nurp autofs-4.1.4.orig/samples/auto.net autofs-4.1.4/samples/auto.net +--- autofs-4.1.4.orig/samples/auto.net 2006-04-11 09:24:17.000000000 -0400 ++++ autofs-4.1.4/samples/auto.net 2006-04-11 09:27:24.000000000 -0400 +@@ -42,4 +42,4 @@ $SHOWMOUNT | LC_ALL=C sort -k 1 | \ + BEGIN { ORS=""; first=1 } + { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 } + END { if (!first) print "\n"; else exit 1 } +- ' ++ ' | sed 's/#/\\#/g' --- autofs-4.1.4.orig/debian/patches/071_fix_ldap_mounts +++ autofs-4.1.4/debian/patches/071_fix_ldap_mounts @@ -0,0 +1,12 @@ +diff -Naurd autofs-4.1.4.orig/samples/rc.autofs.in autofs-4.1.4/samples/rc.autofs.in +--- autofs-4.1.4.orig/samples/rc.autofs.in 2006-04-12 07:15:03.000000000 +0200 ++++ autofs-4.1.4/samples/rc.autofs.in 2006-04-12 07:16:14.000000000 +0200 +@@ -319,7 +319,7 @@ + maptype=`echo $map | cut -f1 -d:` + # Handle degenerate map specifiers + if [ "$maptype" = "$map" ] ; then +- if [ "$map" = "hesiod" -o "$map" = "userhome" ] ; then ++ if [ "$map" = "hesiod" -o "$map" = "userhome" -o "$map" = "ldap" ] ; then + maptype=$map + map= + elif [ "$map" = "multi" ] ; then --- autofs-4.1.4.orig/debian/patches/068_fix_invalid_rpcgen_code +++ autofs-4.1.4/debian/patches/068_fix_invalid_rpcgen_code @@ -0,0 +1,14 @@ +diff -ur autofs-4.1.4.orig/lib/Makefile autofs-4.1.4/lib/Makefile +--- autofs-4.1.4.orig/lib/Makefile 2005-07-10 19:45:06.000000000 +0200 ++++ autofs-4.1.4/lib/Makefile 2005-07-10 19:45:53.000000000 +0200 +@@ -39,6 +39,10 @@ + + mount_xdr.c: mount.h + $(RPCGEN) -c -o mount_xdr.c mount.x ++ sed -i -e 's/IXDR_GET_LONG(\([^)]*\))/((long)IXDR_GET_U_INT32(\1))/' mount_xdr.c ++ sed -i -e 's/IXDR_PUT_LONG(\([^)]*\),\([^)]*\))/((long)IXDR_PUT_INT32(\1,(long)(\2)))/' mount_xdr.c ++ sed -i -e 's/IXDR_GET_SHORT(\([^)]*\))/((short)IXDR_GET_U_INT32(\1))/' mount_xdr.c ++ sed -i -e 's/IXDR_PUT_SHORT(\([^)]*\),\([^)]*\))/((long)IXDR_PUT_INT32(\1,(long)(\2)))/' mount_xdr.c + + mount_xdr.o: mount_xdr.c + $(CC) $(CFLAGS) -Wno-unused-variable -o mount_xdr.o -c mount_xdr.c --- autofs-4.1.4.orig/debian/patches/062_fix_memory_leak +++ autofs-4.1.4/debian/patches/062_fix_memory_leak @@ -0,0 +1,25 @@ +diff -ur autofs-4.1.4_beta2.orig/modules/mount_nfs.c autofs-4.1.4_beta2/modules/mount_nfs.c +--- autofs-4.1.4_beta2.orig/modules/mount_nfs.c 2005-05-13 13:35:48.000000000 +0200 ++++ autofs-4.1.4_beta2/modules/mount_nfs.c 2005-05-13 13:37:15.000000000 +0200 +@@ -145,16 +145,20 @@ + he = gethostbyname(hostname); + if (!he) { + error(MODPREFIX "host %s: lookup failure", hostname); ++ free(hostname); + return -1; + } + + for (haddr = he->h_addr_list; *haddr; haddr++) { + local = is_local_addr(hostname, *haddr, he->h_length); +- if (local < 0) ++ if (local < 0) { ++ free(hostname); + return local; ++ } + if (local) { + debug(MODPREFIX "host %s: is localhost", + hostname); ++ free(hostname); + return local; + } + } --- autofs-4.1.4.orig/debian/patches/067_ldap_no_first_message +++ autofs-4.1.4/debian/patches/067_ldap_no_first_message @@ -0,0 +1,21 @@ +--- autofs-4.1.4_beta2/modules/lookup_ldap.c.no-first-message 2005-06-27 23:41:03.000000000 +0800 ++++ autofs-4.1.4_beta2/modules/lookup_ldap.c 2005-06-27 23:42:38.000000000 +0800 +@@ -429,7 +429,7 @@ static int lookup_one(const char *root, + + e = ldap_first_entry(ldap, result); + if (!e) { +- crit(MODPREFIX "got answer, but no first entry for %s", query); ++ debug(MODPREFIX "got answer, but no first entry for %s", query); + ldap_msgfree(result); + ldap_unbind(ldap); + return CHE_MISSING; +@@ -537,7 +537,7 @@ static int lookup_wild(const char *root, + + e = ldap_first_entry(ldap, result); + if (!e) { +- crit(MODPREFIX "got answer, but no first entry for %s", query); ++ debug(MODPREFIX "got answer, but no first entry for %s", query); + ldap_msgfree(result); + ldap_unbind(ldap); + return CHE_MISSING; + --- autofs-4.1.4.orig/debian/patches/065_fix_master_map_in_ldap +++ autofs-4.1.4/debian/patches/065_fix_master_map_in_ldap @@ -0,0 +1,14 @@ +--- autofs-4.1.4.orig/samples/rc.autofs.in 2005-04-28 19:56:39.719182481 +0200 ++++ autofs-4.1.4/samples/rc.autofs.in 2005-04-28 19:57:36.924029843 +0200 +@@ -156,7 +156,11 @@ + function getldapmounts() + { + if [ -x @@autofslibdir@@/autofs-ldap-auto-master ]; then ++ [ ! -z $LDAPURI ] && export LDAPURI="$LDAPURI" ++ [ ! -z $LDAPBASE ] && export LDAPBASE="$LDAPBASE" + @@autofslibdir@@/autofs-ldap-auto-master 2> /dev/null ++ @@autofslibdir@@/autofs-ldap-auto-master -m automountMap \ ++ -e automount -n ou -k cn -v automountInformation 2> /dev/null + fi + } + --- autofs-4.1.4.orig/debian/patches/061_multi_parse_fix +++ autofs-4.1.4/debian/patches/061_multi_parse_fix @@ -0,0 +1,53 @@ +diff -Nurp autofs-4.1.4.orig/modules/parse_sun.c autofs-4.1.4/modules/parse_sun.c +--- autofs-4.1.4.orig/modules/parse_sun.c 2005-04-05 20:42:42.000000000 +0800 ++++ autofs-4.1.4/modules/parse_sun.c 2005-04-25 10:00:13.000000000 +0800 +@@ -766,7 +766,16 @@ static int check_is_multi(const char *ma + { + const char *p = (char *) mapent; + int multi = 0; +- int first_chunk = 0; ++ int not_first_chunk = 0; ++ ++ if (!p) { ++ crit("check_is_multi: unexpected NULL map entry pointer"); ++ return 0; ++ } ++ ++ /* If first character is "/" it's a multi-mount */ ++ if (*p == '/') ++ return 1; + + while (*p) { + p = skipspace(p); +@@ -779,7 +788,7 @@ static int check_is_multi(const char *ma + * path that begins with '/' indicates a mutil-mount + * entry. + */ +- if (first_chunk) { ++ if (not_first_chunk) { + if (*p == '/' || *p == '-') { + multi = 1; + break; +@@ -796,7 +805,7 @@ static int check_is_multi(const char *ma + * after which it's a multi mount. + */ + p += chunklen(p, check_colon(p)); +- first_chunk++; ++ not_first_chunk++; + } + + return multi; +@@ -883,7 +892,12 @@ int parse_mount(const char *root, const + return 1; + } + +- path = dequote(p, l = chunklen(p, 0)); ++ if (*p != '/') { ++ l = 0; ++ path = dequote("/", 1); ++ } else ++ path = dequote(p, l = chunklen(p, 0)); ++ + if (!path) { + error(MODPREFIX "out of memory"); + free(myoptions); --- autofs-4.1.4.orig/debian/patches/064_support_options_on_nis_maps +++ autofs-4.1.4/debian/patches/064_support_options_on_nis_maps @@ -0,0 +1,37 @@ +--- autofs-4.1.4.orig/samples/rc.autofs.in 2005-06-10 00:19:26.000000000 +0200 ++++ autofs-4.1.4/samples/rc.autofs.in 2005-06-10 00:26:29.000000000 +0200 +@@ -129,7 +129,17 @@ + else + map="$1" + fi +- /usr/bin/ypcat -k "$map" 2> /dev/null | sed -e '/^#/d' -e '/^$/d' ++ ++ # Append the map's options at the _start_ if there are any options already ++ # (ie. myopt -> $2,myopt), otherwise just append them at the end. ++ if [ -z "$2" ]; then ++ /usr/bin/ypcat -k "$map" 2> /dev/null | sed -e '/^#/d' -e '/^$/d' ++ else ++ /usr/bin/ypcat -k "$map" 2> /dev/null | ++ sed -e '/^#/d' -e '/^$/d' \ ++ -e "s/^[ \t]*\([^ \t]\+\)[ \t]\+\([^ \t]\+\)[ \t]\+-\([^ \t]\+\)/\1 \2 $2,\3/" \ ++ -e "s/^[ \t]*\([^ \t]\+\)[ \t]\+\([^ \t]\+\)[ \t]*$/\1 \2 $2/" ++ fi + } + + function getfilemounts() +@@ -141,10 +151,11 @@ + if [ "`echo $auto_master_in | grep '^+'`" = "" ]; then + echo $auto_master_in + else +- for nismap in `cat /etc/auto.master | grep '^\+' | +- sed -e '/^#/d' -e '/^$/d'`; do +- catnismap `echo "$nismap" | sed -e 's/^\+//'` +- done ++ cat /etc/auto.master | grep '^\+' | sed -e '/^#/d' -e '/^$/d' | ( ++ while read map options; do ++ catnismap `echo "$map" | sed -e 's/^\+//'` $options ++ done ++ ) + fi + done + ) --- autofs-4.1.4.orig/debian/patches/020_auto_net_path_sortlocale_mountoptions +++ autofs-4.1.4/debian/patches/020_auto_net_path_sortlocale_mountoptions @@ -0,0 +1,11 @@ +--- bak/samples/auto.net~ 2004-09-03 22:11:51.000000000 +0200 ++++ bak/samples/auto.net 2004-09-03 22:19:02.000000000 +0200 +@@ -9,7 +9,7 @@ + + # add "nosymlink" here if you want to suppress symlinking local filesystems + # add "nonstrict" to make it OK for some filesystems to not mount +-opts="-fstype=nfs,hard,intr,nodev,nosuid" ++opts="-fstype=nfs,hard,intr,nodev,nosuid,nonstrict,async" + + # Showmount comes in a number of names and varieties. "showmount" is + # typically an older version which accepts the '--no-headers' flag --- autofs-4.1.4.orig/debian/patches/066_canonicalise_mount_points +++ autofs-4.1.4/debian/patches/066_canonicalise_mount_points @@ -0,0 +1,17 @@ +diff -ur autofs-4.1.4.orig/samples/rc.autofs.in autofs-4.1.4/samples/rc.autofs.in +--- autofs-4.1.4.orig/samples/rc.autofs.in 2005-06-11 01:28:59.000000000 +0200 ++++ autofs-4.1.4/samples/rc.autofs.in 2005-06-11 01:35:06.000000000 +0200 +@@ -244,6 +244,13 @@ + continue + fi + ++ # If possible, canonicalise the path so it will always unmount ++ # cleanly. ++ link=`readlink -f "$dir"` ++ if [ ! -z "$link" ]; then ++ dir="$link" ++ fi ++ + # Do not include a map if it is a duplicate, maps on top of + # another map or another map, maps on top of it. + for knownmap in $knownmaps --- autofs-4.1.4.orig/debian/patches/060_non_replicated_ping +++ autofs-4.1.4/debian/patches/060_non_replicated_ping @@ -0,0 +1,221 @@ +diff -Nurp autofs-4.1.4.orig/modules/mount_nfs.c autofs-4.1.4/modules/mount_nfs.c +--- autofs-4.1.4.orig/modules/mount_nfs.c 2005-04-25 10:55:27.000000000 +0800 ++++ autofs-4.1.4/modules/mount_nfs.c 2005-04-25 10:56:15.000000000 +0800 +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #define MODULE_MOUNT + #include "automount.h" +@@ -105,28 +106,117 @@ int is_local_addr(const char *host, cons + + return 1; + } ++ ++/* ++ * If the entry doesn't contain a ',' or doesn't contain more than ++ * one ':' then @what is not a replicated server entry. ++ */ ++static int inline is_replicated_entry(char *what) ++{ ++ return strchr(what, ',') || ++ (strchr(what, ':') != strrchr(what, ':')); ++} ++ ++/* ++ * Check to see if the 'host:path' or 'host' is on the local machine ++ * Returns < 0 if there is a host lookup problem, otherwise returns 0 ++ * if it's not a local mount, and returns > 0 if it is a local mount. ++ */ ++int is_local_mount(const char *hostpath) ++{ ++ struct hostent *he; ++ char **haddr; ++ char *delim; ++ char *hostname; ++ int hostnamelen; ++ int local = 0; ++ ++ debug(MODPREFIX "is_local_mount: %s", hostpath); ++ delim = strpbrk(hostpath,":"); ++ ++ if (delim) ++ hostnamelen = delim - hostpath; ++ else ++ hostnamelen = strlen(hostpath); ++ ++ hostname = malloc(hostnamelen+1); ++ strncpy(hostname, hostpath, hostnamelen); ++ hostname[hostnamelen] = '\0'; ++ he = gethostbyname(hostname); ++ if (!he) { ++ error(MODPREFIX "host %s: lookup failure", hostname); ++ return -1; ++ } ++ ++ for (haddr = he->h_addr_list; *haddr; haddr++) { ++ local = is_local_addr(hostname, *haddr, he->h_length); ++ if (local < 0) ++ return local; ++ if (local) { ++ debug(MODPREFIX "host %s: is localhost", ++ hostname); ++ return local; ++ } ++ } ++ return 0; ++} ++ + /* + * Given a mount string, return (in the same string) the +- * best mount to use based on weight/locality/rpctime ++ * best mount to use based on locality/weight/rpctime. ++ * ++ * If longtimeout is set to 0 then we only do 100 ms pings to hosts. In ++ * the event that this fails, we call ourself recursively with the ++ * longtimeout option set to 1. In this case we ping for up to 10s and ++ * skip logic for detecting if a localhost has been passed. (if a local ++ * host had been passed, we would have returned that mount as the best ++ * mount. The skipping of local maps in this case is an optimization). ++ * + * - return -1 and what = '\0' on error, + * 1 and what = local mount path if local bind, + * else 0 and what = remote mount path + */ +-int get_best_mount(char *what, const char *original, int longtimeout, int skiplocal) ++int get_best_mount(char *what, const char *original, int longtimeout) + { + char *p = what; + char *winner = NULL; + int winner_weight = INT_MAX, local = 0; + double winner_time = 0; +- char *delim; ++ char *delim, *pstrip; + int sec = (longtimeout) ? 10 : 0; + int micros = (longtimeout) ? 0 : 100000; ++ int skiplocal = longtimeout; /* clearly local is not available */ + + if (!p) { + *what = '\0'; + return -1; + } + ++ /* ++ * If only one mountpoint has been passed in, we don't need to ++ * do anything except strip whitespace from the end of the string. ++ */ ++ if (!is_replicated_entry(p)) { ++ for (pstrip = p+strlen(p) - 1; pstrip >= p; pstrip--) ++ if (isspace(*pstrip)) ++ *pstrip = '\0'; ++ ++ /* Check if the host is the localhost */ ++ if (is_local_mount(p) > 0) { ++ debug(MODPREFIX "host %s: is localhost", p); ++ ++ /* Strip off hostname and ':' */ ++ delim = strchr(p,':'); ++ while (delim && *delim != '\0') { ++ delim++; ++ *what = *delim; ++ what++; ++ } ++ return 1; ++ } ++ return 0; ++ } ++ + while (p && *p) { + char *next; + unsigned int ping_stat = 0; +@@ -171,37 +261,17 @@ int get_best_mount(char *what, const cha + /* p points to a server, "next is our next parse point */ + if (!skiplocal) { + /* Check if it's localhost */ +- struct hostent *he; +- char **haddr; +- +- he = gethostbyname(p); +- if (!he) { +- error(MODPREFIX "host %s: lookup failure", p); +- p = next; +- continue; +- } +- +- /* Check each host in round robin list */ +- for (haddr = he->h_addr_list; *haddr; haddr++) { +- local = is_local_addr(p, *haddr, he->h_length); +- +- if (local < 0) +- continue; +- +- if (local) { +- winner = p; +- break; +- } +- } +- ++ local = is_local_mount(p); + if (local < 0) { + local = 0; + p = next; + continue; + } + +- if (local) ++ if (local) { ++ winner = p; + break; ++ } + } + + /* ping each (or the) entry to see if it's alive. */ +@@ -214,6 +284,7 @@ int get_best_mount(char *what, const cha + /* First unweighted or only host is alive so set winner */ + if (!winner) { + winner = p; ++ winner_time = 1; + /* No more to check, return it */ + if (!next || !*next) + break; +@@ -256,7 +327,7 @@ int get_best_mount(char *what, const cha + */ + if (!local && winner_weight == INT_MAX) { + /* We had more than one contender and none responded in time */ +- if (winner_time != 0 && winner_time > 500) { ++ if (winner_time == 0 || winner_time > 500) { + /* We've already tried a longer timeout */ + if (!longtimeout) { + /* Reset string and try again */ +@@ -267,16 +338,14 @@ int get_best_mount(char *what, const cha + "retrying with longer timeout", + original); + +- return get_best_mount(what, original, 1, 1); ++ return get_best_mount(what, original, 1); + } + } + } + +- /* No winner found so bail */ +- if (!winner) { +- *what = '\0'; +- return 0; +- } ++ /* No winner found so return first */ ++ if (!winner) ++ winner = what; + + /* + * We now have our winner, copy it to the front of the string, +@@ -395,7 +464,7 @@ int mount_mount(const char *root, const + /* No colon, take this as a bind (local) entry */ + local = 1; + } else if (!nosymlink) { +- local = get_best_mount(whatstr, what, 0, 0); ++ local = get_best_mount(whatstr, what, 0); + if (!*whatstr) { + warn(MODPREFIX "no host elected"); + return 1; --- autofs-4.1.4.orig/debian/patches/067_allow_disabling_bind_mounts +++ autofs-4.1.4/debian/patches/067_allow_disabling_bind_mounts @@ -0,0 +1,70 @@ +diff -ur autofs-4.1.4.orig/modules/mount_bind.c autofs-4.1.4/modules/mount_bind.c +--- autofs-4.1.4.orig/modules/mount_bind.c 2005-01-10 14:28:29.000000000 +0100 ++++ autofs-4.1.4/modules/mount_bind.c 2005-06-11 02:38:27.000000000 +0200 +@@ -107,7 +107,7 @@ + if (options == NULL || *options == '\0') + options = "defaults"; + +- if (bind_works) { ++ if (bind_works && strcmp(options, "symlink") != 0) { + int status, existed = 1; + + debug(MODPREFIX "calling mkdir_path %s", fullpath); +diff -ur autofs-4.1.4.orig/modules/mount_nfs.c autofs-4.1.4/modules/mount_nfs.c +--- autofs-4.1.4.orig/modules/mount_nfs.c 2005-06-11 01:38:04.000000000 +0200 ++++ autofs-4.1.4/modules/mount_nfs.c 2005-06-11 02:38:02.000000000 +0200 +@@ -391,7 +391,8 @@ + char *whatstr; + char *nfsoptions = NULL; + int local, err; +- int nosymlink = 0; ++ int nosymlink = 0; /* Actually misnamed, should be "nobind" now */ ++ int symlink = 0; /* Prefer symlinks to bind mounts? */ + int ro = 0; /* Set if mount bind should be read-only */ + + debug(MODPREFIX "root=%s name=%s what=%s, fstype=%s, options=%s", +@@ -405,7 +406,10 @@ + strcpy(whatstr, what); + + /* Extract "nosymlink" pseudo-option which stops local filesystems +- from being symlinked */ ++ from being bind mounted, and "symlink" pseudo-option which does not ++ do the exact opposite, but rather makes any bind mount into a ++ symlink instead. (Both nosymlink and symlink at the same time ++ make no sense, of course.) */ + if (options) { + const char *comma; + char *nfsp; +@@ -446,6 +450,8 @@ + #endif + if (strncmp("nosymlink", cp, end - cp + 1) == 0) + nosymlink = 1; ++ else if (strncmp("symlink", cp, end - cp + 1) == 0) ++ symlink = 1; + else { + /* Check for options that also make sense + with bind mounts */ +@@ -457,8 +463,8 @@ + } + } + +- debug(MODPREFIX "nfs options=\"%s\", nosymlink=%d, ro=%d", +- nfsoptions, nosymlink, ro); ++ debug(MODPREFIX "nfs options=\"%s\", nosymlink=%d, symlink=%d, ro=%d", ++ nfsoptions, nosymlink, symlink, ro); + } + + local = 0; +@@ -490,7 +496,11 @@ + if (local) { + /* Local host -- do a "bind" */ + +- const char *bind_options = ro ? "ro" : ""; ++ const char *bind_options; ++ if (symlink) ++ bind_options = "symlink"; ++ else ++ bind_options = ro ? "ro" : ""; + + debug(MODPREFIX "%s is local, doing bind", name); + --- autofs-4.1.4.orig/debian/patches/037_let_debian_rules_decide_on_CFLAGS +++ autofs-4.1.4/debian/patches/037_let_debian_rules_decide_on_CFLAGS @@ -0,0 +1,28 @@ +diff -ruN autofs-4.1.3.orig/Makefile.rules autofs-4.1.3/Makefile.rules +--- autofs-4.1.3.orig/Makefile.rules 2004-01-29 17:01:22.000000000 +0100 ++++ autofs-4.1.3/Makefile.rules 2004-09-27 21:30:37.000000000 +0200 +@@ -17,15 +16,15 @@ + # Compilers, linkers and flags + # The STRIP defined here *must not* remove any dynamic-loading symbols + +-ifdef DEBUG +-CFLAGS = -O2 -g -DDEBUG +-LDFLAGS = -g +-STRIP = : +-else +-CFLAGS = -O3 -fomit-frame-pointer -Wall +-LDFLAGS = -s +-STRIP = strip --strip-debug +-endif ++#ifdef DEBUG ++#CFLAGS = -O2 -g -DDEBUG ++#LDFLAGS = -g ++STRIP = : ++#else ++#CFLAGS = -O3 -fomit-frame-pointer -Wall ++#LDFLAGS = -s ++#STRIP = strip --strip-debug ++#endif + + CC = gcc + CXX = g++ --- autofs-4.1.4.orig/debian/patches/042_default_auto_master_all_commented_out +++ autofs-4.1.4/debian/patches/042_default_auto_master_all_commented_out @@ -0,0 +1,10 @@ +--- autofs-4.1.4_beta2/samples/auto.master.orig 2005-01-04 15:36:54.000000000 +0100 ++++ autofs-4.1.4_beta2/samples/auto.master 2005-02-15 02:41:16.000000000 +0100 +@@ -7,5 +7,5 @@ + # For details of the format look at autofs(5). + #/misc /etc/auto.misc --timeout=60 + #/smb /etc/auto.smb +-/misc /etc/auto.misc +-/net /etc/auto.net ++#/misc /etc/auto.misc ++#/net /etc/auto.net --- autofs-4.1.4.orig/debian/scripts/Makefile +++ autofs-4.1.4/debian/scripts/Makefile @@ -0,0 +1,11 @@ +#!/usr/bin/make -f +all: sh.vars mk.vars + +clean: + rm -f sh.vars mk.vars + +mk.vars: vars.build vars + $(SHELL) vars.build vars make > $@ +sh.vars: vars.build vars + $(SHELL) vars.build vars shell > $@ + --- autofs-4.1.4.orig/debian/scripts/archmap +++ autofs-4.1.4/debian/scripts/archmap @@ -0,0 +1,22 @@ +#!/bin/sh +# i486 i386 i486 i586 pentium pentiumpro +if [ $(basename $0) = archmap ];then + if [ -z $1 ];then + arch=$(dpkg --print-gnu-build-architecture) + else + arch=$1 + fi +else + if [ -z $arch ];then + arch=$(dpkg --print-gnu-build-architecture) + fi +fi +set -- $(egrep ".* $arch( .*|$)" debian/scripts/archmap) +if [ -z $2 ];then + arch=$arch +else + arch=$2 +fi +if [ $(basename $0) = archmap ];then + echo $arch +fi --- autofs-4.1.4.orig/debian/scripts/getglibcversion +++ autofs-4.1.4/debian/scripts/getglibcversion @@ -0,0 +1,56 @@ +#!/bin/sh +# GNU C library version detection shell script. +# Copyright 1999 Branden Robinson. +# Licensed under the GNU General Public License, version 2. See the file +# /usr/share/common-licenses/GPL or . + +# This script probably makes about a billion too many assumptions, but it's +# better than hardcoding the glibc version on a per-architecture basis. + +set -e + +usage () { + echo "Usage: getglibcversion [option]" + echo " Where [option] may be one of:" + echo " --major return major version only" + echo " --minor return minor version only" + echo " --point return ittybitty version only" + echo "With no option, returns major.minor.ittybitty ."; +} + +case $# in + 0) ;; + 1) case $1 in + --help) usage + exit 0 ;; + --major) RETURN=1 ;; + --minor) RETURN=2 ;; + --point) RETURN=3 ;; + *) exec 1>&2 + usage + exit 1 ;; + esac ;; + *) exec 1>&2 + usage + exit 1 ;; +esac + +LIBCLIST=$(cd /lib && ls libc-*.so) + +case $(echo $LIBCLIST | wc -l | awk '{print $1}') in + 0) echo "No GNU C library found! Aborting." >&2 + exit 1 ;; + 1) ;; + *) echo "Multiple versions of GNU C library found! Aborting." >&2 + exit 1 ;; +esac + +LIBCVERSION=$(echo $LIBCLIST | sed 's/libc-//;s/\.so//') + +if [ -z $RETURN ]; then + echo $LIBCVERSION +else + echo $LIBCVERSION | cut -d. -f$RETURN +fi + +exit 0 --- autofs-4.1.4.orig/debian/scripts/lib +++ autofs-4.1.4/debian/scripts/lib @@ -0,0 +1,198 @@ +#!/bin/sh +if [ $(basename $0) = lib ];then + make -C debian/scripts sh.vars + . debian/scripts/sh.vars +fi +fetchmsg() { + local msg + msg=$1;shift + eval echo $(sed -ne "s/^$(BASENAME):$msg://p" debian/scripts/messages) +} +START() { + echo -n "$(fetchmsg START "$@") " +} +OK() { + fetchmsg OK "$@" +} +FAILED() { + fetchmsg FAILED "$@" +} +ALREADY_DONE() { + fetchmsg ALREADY_DONE "$@" +} + +BASENAME() { + local base + if [ "$cmd" ];then + base=$cmd + else + base=${0##*/} + fi + if [ x$base = x ];then + echo "Danger, Will Robinson, Danger!" 1>&2 + echo "Bash is very confused." 1>&2 + exit 1 + fi + if [ x$base = xlib ];then + echo "You can't call this directly." 1>&2 + echo "This is a library that should be sourced." 1>&2 + exit 1 + fi + echo $base +} +file2cat() { + $(decompress_prog $1) $1 +} +debug() { + echo "$@" + eval "$@" +} +decompress_prog() { + local which + which="cat" + [ $1 != ${1%.tgz} -o $1 != ${1%.gz} -o $1 != ${1%.Z} ] && which="gunzip -c" + [ $1 != ${1%.bz2} ] && which="bunzip2 -c" + [ $1 != ${1%.bz} ] && which="bunzip -c" + echo $which +} +compress_ext() { + local which + which="" + [ $1 != ${1%.gz} ] && which=gz + [ $1 != ${1%.Z} ] && which=Z + [ $1 != ${1%.bz2} ] && which=bz2 + [ $1 != ${1%.bz} ] && which=bz + echo $which +} +filetype_detect() { + local which f + which="" + f=$(echo "$1" | sed 's|:::.*||') + [ $f != ${f%.jar} ] && which=jarfile + [ $f != ${f%.zip} ] && which=zipfile + [ $f != ${f%.tgz} ] && which=tarball + [ $f != ${f%.tar.$(compress_ext $f)} ] && which=tarball + [ $f != ${f%.tar} ] && which=tarball + [ $f != ${f%.diff.$(compress_ext $f)} -o $1 != ${1%.patch.$(compress_ext $1)} ] && which=patch + [ $f != ${f%.diff} -o $1 != ${1%.patch} ] && which=patch + [ $f != ${f%.dsc} ] && which=dsc + echo $which +} +extract_tar() { + local which file dir curd + dir="$1" + shift + curd=$(pwd) + while [ $# -gt 0 ];do + file="$1" + [ "$file" = "${1#/}" ] && file="$curd/$file" + case "$(filetype_detect $file)" in + "jarfile") (cd $dir;fastjar -xf $file);; + "zipfile") (cd $dir;miniunzip -x $file);; + "tarball") $(decompress_prog $file) $file | (cd $dir;tar xv);; + *) echo "unsupported tarball";; + esac + shift + done +} + +do.patching() { + filetmpl=\$d/\$f + reversesort="" + reversepatch="" + + case "$cmd" in + source.patch) + mkdir -p $SOURCE_DIR/$TAR_DIR + patch_dirs="$SRC_PATCH_DIR $SRC_ADD_PATCH_DIR" + stampfiletmpl=\$STAMP_DIR/\$d/\$f + logtmpl=\$STAMP_DIR/log/\$d/\$f + dirprep="\$STAMP_DIR/log/\$d \$STAMP_DIR/\$d" + patchapplydirtmpl=\$SOURCE_DIR/\$TAR_DIR + ;; + patch.apply) + mkdir -p $SOURCE_DIR/$TAR_DIR $STAMP_DIR/patches + patch_dirs="$PATCH_DIR $ADD_PATCH_DIR" + stampfiletmpl=\$STAMP_DIR/patches/\$f + logtmpl=\$STAMP_DIR/log/\$d/\$f + dirprep=\$STAMP_DIR/log/\$d + patchapplydirtmpl=\$SOURCE_DIR/\$TAR_DIR + ;; + fix.source.patch) + if [ "$DBS_UNIFIED" -o ! -e debian/fixpatch ];then + exit + fi + mkdir -p $STAMP_DIR/fixpatch + patch_dirs=debian/fixpatch + stampfiletmpl="$STAMP_DIR/fixpatch/\$(basename \$f)" + logtmpl=\$STAMP_DIR/log/fixpatch/\$f + dirprep=\$STAMP_DIR/log/fixpatch + patchapplydirtmpl=upstream + ;; + unfix.source.patch) + if [ "$DBS_UNIFIED" -o ! -e debian/fixpatch ];then + exit + fi + mkdir -p $STAMP_DIR/fixpatch + patch_dirs=debian/fixpatch + stampfiletmpl="$STAMP_DIR/fixpatch/\$(basename \$f)" + logtmpl=\$STAMP_DIR/log/fixpatch/\$f + dirprep=\$STAMP_DIR/log/fixpatch + patchapplydirtmpl=upstream + reversesort=-r + reversepatch=-R + ;; + esac + for d in $patch_dirs;do + if [ ! -d $d ];then + continue + fi + eval mkdir -p $dirprep + for f in `(cd $d;find -type f ! -name 'chk-*' 2>/dev/null ) | grep -v CVS/ | sort $reversesort`;do + eval stampfile=$stampfiletmpl + eval log=$logtmpl + eval file=$filetmpl + eval patchapplydir=$patchapplydirtmpl + if [ ! -e $stampfile ];then + START $file + if file2cat $file | (cd $patchapplydir;patch -p1 $reversepatch) > $log;then + OK $file + touch $stampfile + else + FAILED $file + exit 1 + fi + else + ALREADY_DONE $file + fi + done + done + +} +# +# External api functions. +# + +source.clean() { + if [ "$DBS_UNIFIED" ];then + exit + fi + rm -rf $SOURCE_DIR $STAMP_DIR/upstream $STAMP_DIR/patches + rm -f $STAMP_DIR/{source.{clean,build,make}} + return +if [ x$SOURCE_DIR = x ];then + files=`find -type f -maxdepth 1 -mindepth 1` + dirs=`find -type d -maxdepth 1 -mindepth 1 ! -name 'debian' ! -name 'upstream'` + echo files=\"$files\" + echo dirs=\"$dirs\" +fi + +} +source.patch() { cmd=source.patch; do.patching; } +fix.source.patch() { cmd=fix.source.patch; do.patching; } +unfix.source.patch() { cmd=unfix.source.patch; do.patching; } +patch.apply() { cmd=patch.apply; do.patching; } + +if [ $(basename $0) = lib ];then + $1 +fi --- autofs-4.1.4.orig/debian/scripts/messages +++ autofs-4.1.4/debian/scripts/messages @@ -0,0 +1,29 @@ +fix.source.patch:START:"Fixing upstream patch $1" +fix.source.patch:OK:"successful." +fix.source.patch:FAILED:"failed!" +fix.source.patch:ALREADY_DONE:"upstream patch fixup $1 already applied!" + +unfix.source.patch:START:"Unfixing upstream patch $1 +unfix.source.patch:OK:"successful." +unfix.source.patch:FAILED:"failed! +unfix.source.patch:ALREADY_DONE:"upstream patch fixup $1 already reversed!" + +patch.unapply:START:"Reversing patch $1" +patch.unapply:OK:"successful." +patch.unapply:FAILED:"failed!" +patch.unapply:ALREADY_DONE:"Patch $1 not applied!" + +patch.apply:START:"Applying patch $1" +patch.apply:OK:"successful." +patch.apply:FAILED:"failed!" +patch.apply:ALREADY_DONE:"Patch $1 already applied!" + +source.patch:START:"Applying upstream patch $1" +source.patch:OK:"successful." +source.patch:FAILED:"failed!" +source.patch:ALREADY_DONE:"upstream patch $1 already applied!" + +source.unpack:START:"Extracting upstream tarball $1" +source.unpack:OK:"successful." +source.unpack:FAILED:"failed!" +source.unpack:ALREADY_DONE:"upstream tarball $1 already extracted!" --- autofs-4.1.4.orig/debian/scripts/source.unpack +++ autofs-4.1.4/debian/scripts/source.unpack @@ -0,0 +1,32 @@ +#!/bin/sh +make -C debian/scripts sh.vars +. debian/scripts/sh.vars +. debian/scripts/lib + +mkdir -p $STAMP_DIR/upstream/tarballs/ $SOURCE_DIR +if [ ! -z "$SRC_TAR_DIR" -a -d "$SRC_TAR_DIR" ];then + files=$(find $SRC_TAR_DIR -type f | grep -v CVS/ | sort) +else + VER=$(dpkg-parsechangelog 2>&1|egrep ^Version|cut -d " " -f 2|cut -d "-" -f 1) + SRC=$(dpkg-parsechangelog 2>&1|egrep ^Source|cut -d " " -f 2-) + files=../${SRC}_${VER}.orig.tar.gz +fi +for f in $files;do + stampfile=$STAMP_DIR/upstream/tarballs/`basename $f` + if [ ! -e $stampfile ];then + START $f + if extract_tar ${SOURCE_DIR:-.} $f > $stampfile.log;then + if [ x$SOURCE_DIR = x ];then + mkdir -p $STAMP_DIR/upstream/files/tarballs + cp $stampfile.log $STAMP_DIR/upstream/files/tarballs/`basename $f`.list + fi + OK $f + touch $stampfile + else + FAILED $f + exit 1 + fi + else + ALREADY_DONE $f + fi +done --- autofs-4.1.4.orig/debian/scripts/vars +++ autofs-4.1.4/debian/scripts/vars @@ -0,0 +1,31 @@ +# This file is NOT a shell script. +# +# This file gets included by both debian/rules (make) AND the scripts in +# debian/scripts (bash) +# + +# Where to cd to to unpack all the tarballs. +SOURCE_DIR=build-tree +# For a single pkg, this is the directory that is embedded in the tarball. +# For multiple pkgs, this is null. +TAR_DIR=autofs-4.1.4 +# Where to place all the stamp files. This directory can be removed, and +# all the targets will then be rerun. +STAMP_DIR=debian/stampdir +# When sys-build.mk is used to build the source, this is the target(s) to +# run. +BUILD_TARGET= +# When cleaning the source, during diff generation, if this is set, this +# target will be called in debian/rules. This allows for pkgs that have +# complicated cleaning rules. +CLEAN_TARGET_EXTERNAL= +# Whether to die if the source cleaning fails. +CLEAN_IGNORE=yes +# The clean target to run. Defaults to clean. +CLEAN_TARGET=distclean +# Files to exclude from the diff. +#DIFF_EXCLUDE="Makefile.in configure" +# Where the patches are located(duh!). +PATCH_DIR=debian/patches +SRC_PATCH_DIR=upstream/patches +SRC_TAR_DIR=upstream/tarballs --- autofs-4.1.4.orig/debian/scripts/vars.build +++ autofs-4.1.4/debian/scripts/vars.build @@ -0,0 +1,17 @@ +#!/usr/bin/make -f + +sed_cmd='' +cat $1 | while read REPLY; do + case "$REPLY" in + \#*|"") continue;; + *) + var=$(echo $REPLY|sed 's/\([^=]*\)=.*/\1/') + eval $REPLY + if [ $2 = "make" ]; then + eval echo "$var=\$$var" + else + eval echo "$var=\\\"\$$var\\\"" + fi + ;; + esac +done --- autofs-4.1.4.orig/debian/sys-build.mk +++ autofs-4.1.4/debian/sys-build.mk @@ -0,0 +1,169 @@ +#!/usr/bin/make -f +# Separate tarball/patch build system by Adam Heath + +# The magic targets that you need to concern yourself with are: +# +# source.build: Unpacks upstream tarballs, optionally applies patches +# to fix the upstream patches, then applies upstream +# patches. +# source.make: Applies debian patches. +# source.clean: Cleans the build directory, then unfixes the upstream +# patches. +# source.compile: Will compile the source for you. Please check +# debian/scripts/vars. +# source.cmd: When calling this target, if you define a variable +# SOURCE_CMD, it will run that command in the build +# tree. +# make-diff: Generates debian.diff in the current directory which +# contains all edits that are currently in the build +# tree. +# +# Nothing in this file should require any editting. Please look at +# debian/scripts/vars for things to change for the local environment. +# +# debian/rules target command +# ---------------------------------------------------------------- +# clean: $(MAKE) -f debian/sys-build.mk source.clean +# build: $(MAKE) -f debian/sys-build.mk source.compile +# for simple systems. +# build: $(MAKE) -f debian/sys-build.mk source.make +# and, in the rules file, you can +# build the targets you want. +SHELL=/bin/bash +ifndef NOISY +.SILENT: +endif + +include debian/scripts/vars +# remove quotes +DIFF_EXCLUDE:=$(patsubst %,-x %,$(shell echo $(DIFF_EXCLUDE))) + +ifdef TAR_DIR +BUILD_TREE=$(SOURCE_DIR)/$(TAR_DIR) +else +BUILD_TREE=$(SOURCE_DIR) +endif + +SOURCE_CMD=: + +ifdef CLEAN_IGNORE + CLEAN_CMD=- + CLEAN_SH= +else + CLEAN_CMD= + CLEAN_SH= +endif +ifndef CLEAN_TARGET + CLEAN_TARGET=clean +endif + +foo: + echo $(DIFF_EXCLUDE) + +make-diff: + mv $(BUILD_TREE) bak + $(MAKE) -f debian/sys-build.mk source.clean + $(MAKE) -f debian/sys-build.mk source.make + mv $(BUILD_TREE) $(BUILD_TREE).orig + mv bak $(BUILD_TREE) + +ifdef TAR_DIR +ifdef CLEAN_TARGET_EXTERNAL + $(CLEAN_CMD)$(MAKE) -f debian/rules $(CLEAN_TARGET_EXTERNAL) +else + $(CLEAN_CMD)$(MAKE) -C $(BUILD_TREE) $(CLEAN_TARGET) + $(CLEAN_CMD)$(MAKE) -C $(BUILD_TREE).orig $(CLEAN_TARGET) +endif + -(cd $(SOURCE_DIR);diff -ruN $(TAR_DIR).orig $(TAR_DIR) $(DIFF_EXCLUDE)) > debian.diff +else +ifdef CLEAN_TARGET_EXTERNAL + $(CLEAN_CMD)$(MAKE) -f debian/rules $(CLEAN_TARGET_EXTERNAL) +else + $(CLEAN_CMD)for a in $(BUILD_TREE)/*;do $(MAKE) -C $$a $(CLEAN_TARGET);done +endif + -(diff -ruN $(BUILD_TREE).orig $(BUILD_TREE) $(DIFF_EXCLUDE)) > debian.diff + if [ ! -s debian.diff ];then\ + rm debian.diff;\ + fi +endif + rm -rf $(BUILD_TREE).orig + +patchapply: $(STAMP_DIR)/patchapply +$(STAMP_DIR)/patchapply: $(STAMP_DIR)/source.build $(STAMP_DIR) + $(SHELL) debian/scripts/lib patch.apply + touch $@ + rm -f $(STAMP_DIR)/patchunapply + +patchunapply: $(STAMP_DIR)/patchunapply +$(STAMP_DIR)/patchunapply: $(STAMP_DIR)/source.build $(STAMP_DIR) + $(SHELL) debian/scripts/lib patch.unapply + touch $@ + rm -f $(STAMP_DIR)/patchapply + +.export: SOURCE_TREE + +# +# The rules that really do the work all start with $(STAMPDIR) +# This little trick allows us to use stamp files to keep us from +# having to rerun long targets over and over. It also puts +# all stamp files in one place, for easy cleaning. +# +# If a stampdir rule depends on something else, be sure it is +# another stampdir rule. Depending on base rule won't work. +# + +source.build: $(STAMP_DIR)/source.build +STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.build +$(STAMP_DIR)/source.build: $(STAMP_DIR)/source.unpack $(STAMP_DIR)/source.patch $(STAMP_DIR) + touch $@ + +source.make: $(STAMP_DIR)/source.make +STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.make +$(STAMP_DIR)/source.make: $(STAMP_DIR)/source.build $(STAMP_DIR)/patchapply $(STAMP_DIR) + touch $@ + +source.unpack: $(STAMP_DIR)/source.unpack +STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.unpack +$(STAMP_DIR)/source.unpack: $(STAMP_DIR) + $(SHELL) debian/scripts/source.unpack + chmod +w -R $(BUILD_TREE) + touch $@ + +source.patch: $(STAMP_DIR)/source.patch +STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.patch +$(STAMP_DIR)/source.patch: $(STAMP_DIR)/source.unpack $(STAMP_DIR)/fix.source.patch $(STAMP_DIR) + $(SHELL) debian/scripts/lib source.patch + touch $@ + +fix.source.patch: $(STAMP_DIR)/fix.source.patch +STAMP_DIR_TARGETS+= $(STAMP_DIR)/fix.source.patch +$(STAMP_DIR)/fix.source.patch: $(STAMP_DIR) + $(SHELL) debian/scripts/lib fix.source.patch + touch $@ + +unfix.source.patch: $(STAMP_DIR)/unfix.source.patch +STAMP_DIR_TARGETS+= $(STAMP_DIR)/unfix.source.patch +$(STAMP_DIR)/unfix.source.patch: $(STAMP_DIR) + $(SHELL) debian/scripts/lib unfix.source.patch + touch $@ + +source.compile: $(STAMP_DIR)/source.compile +STAMP_DIR_TARGETS+= $(STAMP_DIR)/source.compile +$(STAMP_DIR)/source.compile: $(STAMP_DIR)/source.make $(STAMP_DIR) + $(MAKE) -C $(BUILD_TREE) $(BUILD_TARGET) + touch $@ + +source.command: + (cd $(BUILD_TREE); $(SOURCE_CMD)) + +DIR_TARGETS+=$(STAMP_DIR) +$(STAMP_DIR_TARGETS): $(STAMP_DIR) + +$(DIR_TARGETS)/: + mkdir -p $@ + +source.clean: unfix.source.patch + $(SHELL) debian/scripts/lib source.clean + rm -f $(STAMP_DIR_TARGETS) + rm -rf $(STAMP_DIR) + $(MAKE) -C debian/scripts clean --- autofs-4.1.4.orig/ldap_master:README.Debian +++ autofs-4.1.4/ldap_master:README.Debian @@ -0,0 +1,78 @@ +autofs for Debian - support for LDAP +------------------------------------ + +This package installed a suitable LDAP schema for OpenLDAP +to /etc/ldap/schema/automount.ldap. For using it, you need +to add the following line into your /etc/ldap/slapd.conf: + + include /etc/ldap/schema/automount.schema + +Before this line, the schemas core.schema and cosine.schema +need to be included, since automount.schema depends on them. + +You can manage your auto.master map in your LDAP directory +as well as all other maps. + +For using an auto.master map, you need to define the +variables LDAPURI and LDAPBASE in /etc/default/autofs. +Additionally, you need to activate it in /etc/nsswitch.conf: + + automount: ldap + +(If you don't use /etc/nsswitch.conf, the autofs init script +looks for auto.master in your LDAP directory, as long as +neither /etc/auto.master nor an auto.master NIS map exist.) + +You could implement auto.master in the LDAP directory as +following: + + # The base node for autofs + dn: ou=Automount,dc=example,dc=com + ou: Automount + objectClass: top + objectClass: organizationalUnit + + # The auto.master map + dn: ou=auto.master,ou=Automount,dc=example,dc=com + ou: auto.master + objectClass: top + objectClass: automountMap + + # The entry /data in auto.master + dn: cn=/data,ou=auto.master,ou=Automount,dc=example,dc=com + cn: /data + objectClass: top + objectClass: automount + automountInformation: ldap:ldapserver.example.com:ou=auto.data,ou=Automount,dc=example,dc=com rsize=8192,wsize=8192 + +This would correspond to the following entry in /etc/auto.master: + + /data ldap:ldapserver.example.com:ou=auto.data,ou=Automount,dc=example,dc=com rsize=8192,wsize=8192 + +Appropriate LDAP entries could look like this: + + # The auto.data map + dn: ou=auto.data,ou=Automount,dc=example,dc=com + ou: auto.data + objectClass: top + objectClass: automountMap + + # The entry foo in auto.data + dn: cn=foo,ou=auto.data,ou=Automount,dc=example,dc=com + cn: foo + objectClass: top + objectClass: automount + automountInformation: -rw,intr,soft,quota nfsserver.example.com:/export/data/foo + + # The entry bar in auto.data + dn: cn=bar,ou=auto.data,ou=Automount,dc=example,dc=com + cn: bar + objectClass: top + objectClass: automount + automountInformation: -rw,intr,soft,quota nfsserver.example.com:/export/data/bar + +This would correspond to the following entries in /etc/auto.data: + + foo -rw,intr,soft,quota nfsserver.example.com:/export/data/foo + bar -rw,intr,soft,quota nfsserver.example.com:/export/data/bar +