summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2004-12-09 07:25:12 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2004-12-09 07:25:12 +0000
commit178c10a4f340cfb2f4abad506d6a3b723a30c2ea (patch)
tree80646df7743a6272e37a3d13f73e66f8161f1eec /net-fs
parent.41-r1 stable for x86 (Manifest recommit) (diff)
downloadgentoo-2-178c10a4f340cfb2f4abad506d6a3b723a30c2ea.tar.gz
gentoo-2-178c10a4f340cfb2f4abad506d6a3b723a30c2ea.tar.bz2
gentoo-2-178c10a4f340cfb2f4abad506d6a3b723a30c2ea.zip
Fixed bugs 16320,49477,58292,62819,65626,69309,70827. Apply upstream patches.
Diffstat (limited to 'net-fs')
-rw-r--r--net-fs/autofs/ChangeLog9
-rw-r--r--net-fs/autofs/Manifest42
-rw-r--r--net-fs/autofs/autofs-4.1.3-r1.ebuild84
-rw-r--r--net-fs/autofs/files/auto.master3
-rw-r--r--net-fs/autofs/files/auto.net30
-rw-r--r--net-fs/autofs/files/autofs.confd929
-rw-r--r--net-fs/autofs/files/autofs.rc9213
-rw-r--r--net-fs/autofs/files/digest-autofs-4.1.3-r18
8 files changed, 391 insertions, 27 deletions
diff --git a/net-fs/autofs/ChangeLog b/net-fs/autofs/ChangeLog
index e9ea0f4bded5..7057fe3d508d 100644
--- a/net-fs/autofs/ChangeLog
+++ b/net-fs/autofs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-fs/autofs
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/ChangeLog,v 1.32 2004/09/02 17:56:05 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/ChangeLog,v 1.33 2004/12/09 07:25:12 robbat2 Exp $
+
+*autofs-4.1.3-r1 (08 Dec 2004)
+
+ 08 Dec 2004; Robin H. Johnson <robbat2@gentoo.org> files/auto.master,
+ +files/auto.net, +files/autofs.confd9, +files/autofs.rc9,
+ +autofs-4.1.3-r1.ebuild:
+ Fixed bugs 16320,49477,58292,62819,65626,69309,70827. Apply upstream patches.
02 Sep 2004; Sven Wegener <swegener@gentoo.org> -files/autofs,
files/autofs.rc6, files/autofs.rc7, files/autofs.rc8:
diff --git a/net-fs/autofs/Manifest b/net-fs/autofs/Manifest
index e86c8e4912e9..0f76c3776fb3 100644
--- a/net-fs/autofs/Manifest
+++ b/net-fs/autofs/Manifest
@@ -1,37 +1,29 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 71de42396d30a8a6bff6cd83f80e8c39 ChangeLog 4781
-MD5 9e0182d703eeb21b039d7d299cea75af autofs-3.1.7-r3.ebuild 1286
-MD5 5e5b4c1e32387a90b3f21ccf55d13386 autofs-3.1.7-r4.ebuild 1736
-MD5 3f9ef36aecb11a51f251a752482d7863 autofs-3.1.7-r5.ebuild 1750
-MD5 1c01a893e20ffda0d2e05c5de202c6cf autofs-3.1.7-r6.ebuild 1784
MD5 f67d1e63c8588166e494744c81b250d5 autofs-4.0.0.ebuild 1929
MD5 8ada6ad17d139fa85e4089066d3cbdfb autofs-4.1.3.ebuild 1930
+MD5 1c01a893e20ffda0d2e05c5de202c6cf autofs-3.1.7-r6.ebuild 1784
+MD5 9e0182d703eeb21b039d7d299cea75af autofs-3.1.7-r3.ebuild 1286
+MD5 b83078102b49e01c5abf7eac2479ccd4 autofs-4.1.3-r1.ebuild 2561
+MD5 3f9ef36aecb11a51f251a752482d7863 autofs-3.1.7-r5.ebuild 1750
+MD5 71de42396d30a8a6bff6cd83f80e8c39 ChangeLog 4781
MD5 1d3c436cc14252035bf2d97228cd3f58 metadata.xml 224
-MD5 256e713e8b47896dd2049326ec26fc78 files/auto.home 239
-MD5 7dfc74b098600c091681c950b67b1022 files/auto.master 237
-MD5 aa40e8bef91418943312910e73d05eed files/auto.misc 319
+MD5 5e5b4c1e32387a90b3f21ccf55d13386 autofs-3.1.7-r4.ebuild 1736
MD5 a132f5883b92e2b509fa66e429f913ab files/autofs.confd 186
+MD5 3e9a4415d9928180bd9d1a7a09d4d2e7 files/ldap_config.patch 785
+MD5 7dfc74b098600c091681c950b67b1022 files/auto.master 237
+MD5 39ac8cc927dab754a7694abdb1a2cdc5 files/open_max.diff 408
+MD5 7fa23f910baa8aa00609bd74a60c8e34 files/autofs1.confd 137
+MD5 2f74c237baee9004a019d3365ab04c0d files/digest-autofs-4.1.3-r1 586
MD5 1b6efbe0072911c5c960a27e09a9d024 files/autofs.rc6 3717
MD5 4cc7219397b1bdb60da3f150bd7d9230 files/autofs.rc7 3624
MD5 a6a4e5d34c61cce698c4fc381ca75b9b files/autofs.rc8 5178
-MD5 7fa23f910baa8aa00609bd74a60c8e34 files/autofs1.confd 137
-MD5 41de856a77a074078968ff244b863f88 files/automount.diff 322
+MD5 7b562ed7d75738124cadc9de83d4a335 files/digest-autofs-4.0.0 66
+MD5 ba9378bfaf4e17d13789ac9a056ddb3b files/digest-autofs-4.1.3 65
+MD5 256e713e8b47896dd2049326ec26fc78 files/auto.home 239
+MD5 aa40e8bef91418943312910e73d05eed files/auto.misc 319
MD5 ee656860c0682821d144556f674ca481 files/digest-autofs-3.1.7-r3 64
MD5 ee656860c0682821d144556f674ca481 files/digest-autofs-3.1.7-r4 64
MD5 ee656860c0682821d144556f674ca481 files/digest-autofs-3.1.7-r5 64
MD5 ee656860c0682821d144556f674ca481 files/digest-autofs-3.1.7-r6 64
-MD5 7b562ed7d75738124cadc9de83d4a335 files/digest-autofs-4.0.0 66
-MD5 ba9378bfaf4e17d13789ac9a056ddb3b files/digest-autofs-4.1.3 65
-MD5 a872a3743192bbca4f78ecec7f74df03 files/ldap.diff 367
-MD5 3e9a4415d9928180bd9d1a7a09d4d2e7 files/ldap_config.patch 785
+MD5 41de856a77a074078968ff244b863f88 files/automount.diff 322
MD5 77884391a3fbf365a88f5d2230b548d9 files/nisyp.patch 419
-MD5 39ac8cc927dab754a7694abdb1a2cdc5 files/open_max.diff 408
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.6 (GNU/Linux)
-
-iD8DBQFBN161I1lqEGTUzyQRAl1pAJ0a/dQUSktIX0+RQzcJXlMvwYUGgwCdGLNK
-9OHB2iZ6+QH7aC8OC1d1TgQ=
-=SJUf
------END PGP SIGNATURE-----
+MD5 a872a3743192bbca4f78ecec7f74df03 files/ldap.diff 367
diff --git a/net-fs/autofs/autofs-4.1.3-r1.ebuild b/net-fs/autofs/autofs-4.1.3-r1.ebuild
new file mode 100644
index 000000000000..d0b047ac5199
--- /dev/null
+++ b/net-fs/autofs/autofs-4.1.3-r1.ebuild
@@ -0,0 +1,84 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/autofs-4.1.3-r1.ebuild,v 1.1 2004/12/09 07:25:12 robbat2 Exp $
+
+inherit eutils
+
+IUSE="ldap"
+
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI_BASE="mirror://kernel/linux/daemons/${PN}/v4"
+SRC_URI="${SRC_URI_BASE}/${P}.tar.bz2
+ ${SRC_URI_BASE}/${P}-strict.patch
+ ${SRC_URI_BASE}/${P}-mtab_lock.patch
+ ${SRC_URI_BASE}/${P}-bad_chdir.patch
+ ${SRC_URI_BASE}/${P}-non_block_ping.patch
+ ${SRC_URI_BASE}/${P}-signal-race-fix.patch
+ ${SRC_URI_BASE}/${P}-sock-leak-fix.patch
+ ${SRC_URI_BASE}/${P}-replicated_server_select.patch"
+DEPEND="virtual/libc
+ ldap? ( >=net-nds/openldap-2.0 )"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~alpha ~ppc ~sparc ~amd64 ~ia64 ~ppc64"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+ PATCH_LIST="${P}-strict.patch ${P}-mtab_lock.patch ${P}-bad_chdir.patch ${P}-non_block_ping.patch ${P}-signal-race-fix.patch ${P}-sock-leak-fix.patch ${P}-replicated_server_select.patch"
+ for i in ${PATCH_LIST}; do
+ EPATCH_OPTS="-p1 -d ${S}" epatch ${DISTDIR}/${i}
+ done
+
+ cd ${S}
+ autoconf || die "Autoconf failed"
+
+ cd ${S}/daemon
+ sed -i 's/LIBS \= \-ldl/LIBS \= \-ldl \-lnsl \$\{LIBLDAP\}/' Makefile || die "LIBLDAP change failed"
+}
+
+src_compile() {
+ local myconf
+ use ldap || myconf="--without-openldap"
+
+ econf ${myconf} || die
+ sed -i -e '/^\(CFLAGS\|CXXFLAGS\|LDFLAGS\)[[:space:]]*=/d' Makefile.rules || die "Failed to remove (C|CXX|LD)FLAGS"
+ emake || die "make failed"
+}
+
+src_install() {
+ into /usr
+ dosbin daemon/automount
+ exeinto /usr/lib/autofs
+ doexe modules/*.so
+
+ dodoc COPYING COPYRIGHT NEWS README* TODO CHANGELOG CREDITS
+ cd ${S}/samples
+ docinto samples ; dodoc auto.misc auto.master
+ cd ${S}/man
+ sed -i 's:\/etc\/:\/etc\/autofs\/:g' *.8 *.5 *.in || die "Failed to update path in manpages"
+ doman auto.master.5 autofs.5 autofs.8 automount.8
+
+ dodir /etc/autofs /etc/init.d /etc/conf.d
+ insinto /etc/autofs ; doins ${FILESDIR}/auto.master
+ insinto /etc/autofs ; doins ${FILESDIR}/auto.misc
+ exeinto /etc/autofs ; doexe ${FILESDIR}/auto.net # chmod 755 is important!
+
+ exeinto /etc/init.d ; newexe ${FILESDIR}/autofs.rc9 autofs
+ insinto /etc/conf.d ; newins ${FILESDIR}/autofs.confd9 autofs
+ if use ldap; then
+ cd ${S}/samples
+ docinto samples ; dodoc ldap* auto.master.ldap
+ insinto /etc/openldap/schema ; doins autofs.schema
+ exeinto /usr/lib/autofs ; doexe autofs-ldap-auto-master
+ fi
+}
+
+pkg_postinst() {
+ einfo "Note: If you plan on using autofs for automounting"
+ einfo "remote NFS mounts without having the NFS daemon running"
+ einfo "please add portmap to your default run-level."
+ echo ""
+ einfo "Also the normal autofs status has been renamed stats"
+ einfo "as there is already a predefined Gentoo status"
+}
diff --git a/net-fs/autofs/files/auto.master b/net-fs/autofs/files/auto.master
index 9f32a7cad4b8..346bef542d8a 100644
--- a/net-fs/autofs/files/auto.master
+++ b/net-fs/autofs/files/auto.master
@@ -1,8 +1,9 @@
-# $Id: auto.master,v 1.1 2000/08/08 17:53:33 achim Exp $
+# $Id: auto.master,v 1.2 2004/12/09 07:25:12 robbat2 Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
+#/net /etc/autofs/auto.net
/misc /etc/autofs/auto.misc
#/home /etc/autofs/auto.home
diff --git a/net-fs/autofs/files/auto.net b/net-fs/autofs/files/auto.net
new file mode 100644
index 000000000000..11bcc30e6bb8
--- /dev/null
+++ b/net-fs/autofs/files/auto.net
@@ -0,0 +1,30 @@
+#!/bin/sh
+# $Id: auto.net,v 1.1 2004/12/09 07:25:12 robbat2 Exp $
+
+# This file must be executable to work! chmod 755!
+
+# Look at what a host is exporting to determine what we can mount.
+# This is very simple, but it appears to work surprisingly well
+
+key="$1"
+
+# 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,nonstrict"
+
+# Showmount comes in a number of names and varieties. "showmount" is
+# typically an older version which accepts the '--no-headers' flag
+# but ignores it. "kshowmount" is the newer version installed with knfsd,
+# which both accepts and acts on the '--no-headers' flag.
+#SHOWMOUNT="kshowmount --no-headers -e $key"
+#SHOWMOUNT="showmount -e $key | tail -n +2"
+
+# Newer distributions get this right
+SHOWMOUNT="/usr/sbin/showmount --no-headers -e $key"
+
+$SHOWMOUNT | sort +0 | \
+ awk -v key="$key" -v opts="$opts" -- '
+ BEGIN { ORS=""; first=1 }
+ { if (first) { print opts; first=0 }; print " \\\n\t" $1, key ":" $1 }
+ END { if (!first) print "\n"; else exit 1 }
+ '
diff --git a/net-fs/autofs/files/autofs.confd9 b/net-fs/autofs/files/autofs.confd9
new file mode 100644
index 000000000000..51dcde44387e
--- /dev/null
+++ b/net-fs/autofs/files/autofs.confd9
@@ -0,0 +1,29 @@
+# Config file for /etc/init.d/autofs
+
+# e.g. localoptions='rsize=8192,wsize=8192'
+localoptions=''
+
+# additional options for automount, ie. timeout
+daemonoptions='--timeout 60'
+
+# NIS
+nis_mapname='auto.master'
+
+# LDAP
+# By default autofs-ldap-auto-master will check the old style structure defined
+# here, and if that fails, it will check the new style structure before
+# failing. If this generates too much traffic for you, just change to use the
+# new style here.
+ldap_mapname='auto.master'
+# This is the classic style:
+ldap_map_oc='nisMap'
+ldap_entry_oc='nisObject'
+ldap_map_key='nisMapName'
+ldap_entry_key='cn'
+ldap_value='nisMapEntry'
+# This is the new style:
+##ldap_map_oc='automountMap'
+##ldap_entry_oc='automount'
+##ldap_map_key='ou'
+##ldap_entry_key='cn'
+##ldap_value='automountInformation'
diff --git a/net-fs/autofs/files/autofs.rc9 b/net-fs/autofs/files/autofs.rc9
new file mode 100644
index 000000000000..ea0235fc1c51
--- /dev/null
+++ b/net-fs/autofs/files/autofs.rc9
@@ -0,0 +1,213 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs.rc9,v 1.1 2004/12/09 07:25:12 robbat2 Exp $
+
+# rc file for automount using a Sun-style "master map".
+# We first look for a local /etc/autofs/auto.master, then a YP
+# map with that name
+
+DAEMON=/usr/sbin/automount
+
+depend() {
+ need localmount
+ use ypbind nfs slapd
+}
+
+opts="start stop status stats reload restart"
+
+#
+# Check for all maps that are to be loaded
+#
+function getschemes()
+{
+ awk '/^automount:/{ $1="" ; gsub("\\[.*\\]","") ; print $0 }' /etc/nsswitch.conf
+}
+
+function getfilemounts()
+{
+ if [ -f /etc/autofs/auto.master ] ; then
+ sed -e '/^#/d' -e '/^$/d' < /etc/autofs/auto.master
+ fi
+}
+
+function getnismounts()
+{
+ /usr/bin/ypcat -k ${nis_mapname} 2> /dev/null | sed -e '/^#/d' -e '/^$/d'
+}
+
+function getldapmounts()
+{
+ if [ -x /usr/lib/autofs/autofs-ldap-auto-master ]; then
+ /usr/lib/autofs/autofs-ldap-auto-master \
+ -m ${ldap_map_oc} -e ${ldap_entry_oc} \
+ -n ${ldap_map_key} -k ${ldap_entry_key} \
+ -v ${ldap_value} 2> /dev/null
+ fi
+}
+
+function getrawmounts()
+{
+ for scheme in `getschemes` ; do
+ case "$scheme" in
+ files)
+ getfilemounts
+ ;;
+ nis*)
+ getnismounts
+ ;;
+ ldap*)
+ getldapmounts
+ ;;
+ esac
+ done
+}
+
+
+#
+# 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
+# the difference of automount points in case of a reload
+#
+function getmounts()
+{
+ knownmaps=" "
+ getrawmounts | (
+ while read dir map options
+ do
+ # These checks screen out duplicates and skip over directories
+ # where the map is '-'.
+ if [ ! -z "$dir" -a ! -z "$map" \
+ -a x`echo "$map" | cut -c1` != 'x-' \
+ -a "`echo "$knownmaps" | grep -w $dir/`" = "" ]
+ then
+ # If the options include a -t or --timeout parameter, then
+ # pull those particular options out.
+ # echo DAEMONOPTIONS OPTIONS $daemonoptions $options
+ startupoptions=
+ if echo $options $daemonoptions | grep -q -- '-t' ; then
+ startupoptions="--timeout $(echo $daemonoptions $options | \
+ sed 's/.*--*t\(imeout\)*[ \t=]*\([0-9][0-9]*\).*$/\2/g')"
+ fi
+ # Other option flags are intended for maps.
+ mapoptions="$(echo "$daemonoptions $options" |\
+ sed 's/--*t\(imeout\)*[ \t=]*\([0-9][0-9]*\)//g')"
+ # Break up the maptype and map, if the map type is specified
+ maptype="${map/:*}"
+ # Handle degenerate map specifiers
+ if [ "$maptype" = "$map" ] ; then
+ if [ -x "$map" ]; then
+ maptype="program"
+ elif [ -x "/etc/$map" ]; then
+ maptype="program"
+ map=`echo /etc/$map | sed 's^//^/^g'`
+ elif [ -f "$map" ]; then
+ maptype="file"
+ elif [ -f "/etc/$map" ]; then
+ maptype="file"
+ map=`echo /etc/$map | sed 's^//^/^g'`
+ elif [ "$map" = "hesiod" -o "$map" = "userhome" ] ; then
+ maptype="$map"
+ map=
+ elif [ "$map" = "multi" ] ; then
+ maptype="$map"
+ map=
+ else
+ maptype=yp
+ map=`basename $map | sed -e s/^auto_home/auto.home/ -e s/^auto_mnt/auto.mnt/`
+ fi
+ fi
+ map="${map#*:}"
+
+ #echo STARTUPOPTIONS $startupoptions > /tmp/debug
+ #echo DIR $dir >> /tmp/debug
+ #echo MAPTYPE $maptype >> /tmp/debug
+ #echo MAP $map >> /tmp/debug
+ #echo MAPOPTIONS $mapoptions >> /tmp/debug
+ #echo LOCALOPTIONS $localoptions >> /tmp/debug
+
+ echo "$DAEMON $startupoptions $dir $maptype $map $mapoptions $localoptions" | sed -e 's/ / /g' -e 's/ / /g'
+
+ # echo ------------------------
+ fi
+ knownmaps=" $dir/ $knownmaps"
+ done
+ )
+}
+
+
+start() {
+ ebegin "Starting automounter"
+ # ensure autofs support is loaded
+ grep -q autofs /proc/filesystems || modprobe -q autofs
+ [ $? -ne 0 ] && eend 1 "No autofs support available"
+ # now start working
+ getmounts | while read cmd timeout time mnt rest
+ do
+ #FIXME: this works but it really sucks
+ if echo $timeout|grep -v -- '--timeout' >/dev/null ; then
+ rest="$time $mnt $rest"
+ mnt="$timeout"
+ time=""
+ timeout=""
+ fi
+
+ echo -n " $mnt"
+ pidfile=/var/run/autofs`echo $mnt | sed 's/\//./g'`.pid
+ start-stop-daemon --start --pidfile $pidfile --quiet \
+ --exec /usr/sbin/automount -- $timeout $time $mnt $rest
+ #
+ # Automount needs a '--pidfile' or '-p' option.
+ # For now we look for the pid ourself.
+ #
+ ps ax | grep "[0-9]:[0-9][0-9] /usr/sbin/automount $timeout $time \?$mnt" | (
+ read pid rest
+ echo $pid > $pidfile
+ echo "$mnt $rest" >> $pidfile
+ )
+ done
+ echo
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping automounter"
+ start-stop-daemon --stop --quiet --signal 12 --exec /usr/sbin/automount
+ eend $?
+}
+
+stats() {
+ echo "Configured Mount Points:"
+ echo "------------------------"
+ getmounts
+ echo ""
+ echo "Active Mount Points:"
+ echo "--------------------"
+ ps ax|grep "[0-9]:[0-9][0-9] /usr/sbin/automount " | (
+ while read pid tt stat time command; do echo $command; done
+ )
+}
+
+reload() {
+ echo "Reloading automounter: checking for changes ... "
+ TMP=/var/run/autofs.tmp
+ getmounts >$TMP
+ for i in /var/run/autofs.*.pid
+ do
+ pid=`head -n 1 $i 2>/dev/null`
+ [ "$pid" = "" ] && continue
+ command=`tail -n +2 $i`
+ if ! grep -q "^$command" $TMP
+ then
+ echo "Stopping automounter: $command"
+ kill -USR2 $pid
+ fi
+ done
+ rm -f $TMP
+ svc_start
+}
+
+restart() {
+ svc_stop
+ svc_start
+}
diff --git a/net-fs/autofs/files/digest-autofs-4.1.3-r1 b/net-fs/autofs/files/digest-autofs-4.1.3-r1
new file mode 100644
index 000000000000..b34ba4b64535
--- /dev/null
+++ b/net-fs/autofs/files/digest-autofs-4.1.3-r1
@@ -0,0 +1,8 @@
+MD5 f43a09e94c4bd512ec58ac06e9d42c60 autofs-4.1.3.tar.bz2 125234
+MD5 d408ddcd5dafca8d2907b788f93b225c autofs-4.1.3-strict.patch 1626
+MD5 f2e7950dab204719162be84b63857abc autofs-4.1.3-mtab_lock.patch 551
+MD5 9efa8126decb509011646d4a4ed0779f autofs-4.1.3-bad_chdir.patch 6343
+MD5 e404ec690f3ef118ade6f0e605228258 autofs-4.1.3-non_block_ping.patch 7934
+MD5 3cd31c9522651686f4b5ace5cf63c430 autofs-4.1.3-signal-race-fix.patch 635
+MD5 14681387a1fc5229c2c73f593334071b autofs-4.1.3-sock-leak-fix.patch 1236
+MD5 bc536e7fe6e3c79f9b66a4254bf0ad43 autofs-4.1.3-replicated_server_select.patch 962