hopefully a few fixes :)
authorBrad Teaford Cowan <bcowan@gentoo.org>
Sun, 27 Oct 2002 05:21:15 +0000 (05:21 +0000)
committerBrad Teaford Cowan <bcowan@gentoo.org>
Sun, 27 Oct 2002 05:21:15 +0000 (05:21 +0000)
net-fs/autofs/ChangeLog
net-fs/autofs/autofs-3.1.7-r4.ebuild [new file with mode: 0644]
net-fs/autofs/files/auto.misc
net-fs/autofs/files/autofs.rc7 [new file with mode: 0644]
net-fs/autofs/files/autofs1.confd [new file with mode: 0644]
net-fs/autofs/files/digest-autofs-3.1.7-r4 [new file with mode: 0644]
net-fs/autofs/files/nisyp.patch [new file with mode: 0644]

index 950f434afa9423307be0d89f7ea629ce6c31d20e..8d23868e3c7159e0b3b10a3a472919cc266c712f 100644 (file)
@@ -1,26 +1,30 @@
 # ChangeLog for net-fsautofsChangeLog/
 # Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/ChangeLog,v 1.9 2002/07/18 02:46:08 raker Exp $
-
-*autofs-3.1.7-r4 (17 Jul 2002)
-
-  17 Jul 2002; Nick Hadaway <raker@gentoo.org>
-  autofs-3.1.7-r4, files/digest-autofs-3.1.7-r4 :
-
-  Patched autofs to correctly pull OPEN_MAX from linux/limits.h instead
-  of a manual setting of OPEN_MAX.  Also patched for ldap 2.x support
-  setting ldap related variables that configure fails to do.
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/ChangeLog,v 1.10 2002/10/27 05:21:15 bcowan Exp $
 
+*autofs-3.1.7-r4 (27 Oct 2002)
+  
+  20 Sep 2002; Brad Cowan <bradlyatc@cowancomputers.com> autofs-3.1.7-r4.ebuild :
+  files/digest-autofs-3.1.7-r4, files/nisyp.patch, files/autofs1.confd, 
+  files/autofs.rc7, files/automount.diff.
+  
+  Added net-nds/portmap and net-nds/ypbind as RDEPEND, updated init scripts 
+  remove old files, and Updated ChangeLog. Init script now has a working
+  stats option to display current autofs state (as status seems to be a 
+  predefined function that only displays the whether the daemon is running or 
+  stopped). Added einfo to ebuild noting to start portmap for NFS support without 
+  NFS started on current setup. Hopefully fixed some library compile problems.
+  
+*autofs-3.1.7-r3 (16 Apr 2002)  
+  
   16 Jul 2002; Ben Lutgens <lamer@gentoo.org> files/autofs.rc6  :
 
   made the initscript depend on ypbind
-# ChangeLog for net-fs/autofs
 
   30 Apr 2002; William McArthur <sandymac@gentoo.org> autofs-3.1.7-r3.ebuild :
 
   Added HOMEPAGE, LICENSE and made the DESCRIPTION a little more so.
 
-*autfofs-3.1.7-r3 (16 Apr 2002)
 
   21 Jun 2002; Ryan Phillips <rphillips@gentoo.org> files/autofs.rc6 :
 
diff --git a/net-fs/autofs/autofs-3.1.7-r4.ebuild b/net-fs/autofs/autofs-3.1.7-r4.ebuild
new file mode 100644 (file)
index 0000000..92d357f
--- /dev/null
@@ -0,0 +1,66 @@
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/autofs-3.1.7-r4.ebuild,v 1.1 2002/10/27 05:21:15 bcowan Exp $
+
+S=${WORKDIR}/${P}
+DESCRIPTION="Kernel based automounter"
+HOMEPAGE="http://www.linux-consulting.com/Amd_AutoFS/autofs.html"
+SRC_URI="ftp://ftp.kernel.org/pub/linux/daemons/autofs/${P}.tar.bz2
+       ftp://ftp.de.kernel.org/pub/linux/daemons/autofs/${P}.tar.bz2
+       ftp://ftp.uk.kernel.org/pub/linux/daemons/autofs/${P}.tar.bz2"
+
+DEPEND="ldap? ( >=net-nds/openldap-1.2 )"
+RDEPEND=">=net-nds/portmap-5b-r6
+       >=net-nds/ypbind-1.11-r1"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86"
+
+src_unpack() {
+       unpack ${A}  
+       patch -p0 < ${FILESDIR}/nisyp.patch || die
+       
+       cd ${S}/include
+       patch -p0 < ${FILESDIR}/automount.diff || die
+}
+
+src_compile() {
+       local myconf
+       use ldap || myconf="--without-openldap"
+       export HAVE_LDAP=1 
+       export LIBLDAP="$LIBLDAP -lldap -llber -lresolv"
+       export LIBS="-lldap -llber -lresolv $LIBS"
+       ./configure --host=${HOST} --prefix=/usr ${myconf} || die
+       emake || die
+}
+
+src_install() {
+       into /usr
+       dosbin daemon/automount
+       insinto /usr/lib/autofs
+       insopts -m 755
+       doins modules/*.so
+
+       dodoc COPYING COPYRIGHT NEWS README* TODO
+       cd man
+       doman auto.master.5 autofs.5 autofs.8 automount.8
+
+       cd ../samples
+       dodir /etc/autofs
+       cp ${FILESDIR}/auto.master ${D}/etc/autofs
+       cp ${FILESDIR}/auto.misc ${D}/etc/autofs
+
+       exeinto /etc/init.d ; newexe ${FILESDIR}/autofs.rc7 autofs
+       insinto /etc/conf.d ; newins ${FILESDIR}/autofs1.confd autofs
+}
+
+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"
+}      
\ No newline at end of file
index cc20091c5621d65860930ad3ab3c47a2d14d7a86..254fa6bbe47b426a3c4d666506f0437a92808cd3 100644 (file)
@@ -1,7 +1,7 @@
-# $Id: auto.misc,v 1.1 2000/08/08 17:53:33 achim Exp $
+# $Id: auto.misc,v 1.2 2002/10/27 05:21:15 bcowan Exp $
 # This is an automounter map and it has the following format
 # key [ -mount-options-separated-by-comma ] location
 # Details may be found in the autofs(5) manpage
-boot           -fstype=ext2            :/dev/hda1
-cd             -fstype=iso9660,ro      :/dev/cdrom
-floppy         -fstype=auto            :/dev/fd0
+#boot          -fstype=ext2            :/dev/hda1
+#cd            -fstype=iso9660,ro      :/dev/cdrom
+#floppy                -fstype=auto            :/dev/fd0
diff --git a/net-fs/autofs/files/autofs.rc7 b/net-fs/autofs/files/autofs.rc7
new file mode 100644 (file)
index 0000000..b85a2b0
--- /dev/null
@@ -0,0 +1,136 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs.rc7,v 1.1 2002/10/27 05:21:15 bcowan Exp $
+
+# rc file for automount using a Sun-style "master map".
+# We first look for a local /etc/auto.master, then a YP
+# map with that name
+
+depend() {
+       need net
+       use portmap ypbind
+}
+
+opts="start stop status stats reload restart"
+
+#
+# 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
+#
+getmounts() {
+#
+# Check for local maps to be loaded
+#
+if [ -f /etc/autofs/auto.master ]
+then
+    cat /etc/autofs/auto.master | sed -e '/^ *[^# ]/!d'| (
+       while read dir map options
+       do
+           if [ ! -z "$dir" -a ! -z "$map" \
+                       -a x`echo "$map" | cut -c1` != 'x-' ]
+           then
+               map=`echo "/etc/$map" | sed -e 's:^/etc//:/:'`
+               timeout=`echo $options | sed --silent -e 's/\(.*\)\(--timeout=[0-9]\+\)\(.*\)/\2/g ; /--timeout=[0-9]\+/ p'`
+               options=`echo $options | sed -e 's/\(.*\)\(--timeout=[0-9]\+\)\(.*\)/\1\3/g ; s/\(^\|[ \t]\)-/\1/g'`
+               if [ -x $map ]; then
+                   echo "/usr/sbin/automount $timeout $dir program $map $options $localoptions"
+               elif [ -f $map ]; then
+                   echo "/usr/sbin/automount $timeout $dir file $map $options $localoptions"
+               else
+                   echo "/usr/sbin/automount $timeout $dir `basename $map` $options $localoptions"
+               fi
+           fi
+       done
+    )
+fi
+
+#
+# Check for YellowPage maps to be loaded
+#
+if [ -e /usr/bin/ypcat ] && [ `ypcat -k auto.master 2>/dev/null | wc -l` -gt 0 ]
+then
+    ypcat -k auto.master | (
+       while read dir map options
+       do
+           if [ ! -z "$dir" -a ! -z "$map" \
+                       -a x`echo "$map" | cut -c1` != 'x-' ]
+           then
+               map=`echo "$map" | sed -e 's/^auto_/auto./'`
+               if echo $options | grep -- '-t' >/dev/null 2>&1 ; then
+                   mountoptions="--timeout $(echo $options | \
+                     sed 's/^.*-t\(imeout\)*[ \t]*\([0-9][0-9]*\).*$/\2/g')"
+               fi
+                options=`echo "$options" | sed -e '
+                  s/--*t\(imeout\)*[ \t]*[0-9][0-9]*//g
+                  s/\(^\|[ \t]\)-/\1/g'`
+               echo "/usr/sbin/automount $mountoptions $dir yp $map $options $localoptions"
+           fi
+       done
+    )
+fi
+}
+
+start() {
+       ebegin "Starting automounter"
+       getmounts | while read cmd timeout mnt rest
+       do
+           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 $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 \?$mnt" | (
+               read pid rest
+               echo $pid > $pidfile
+               echo "$mnt $rest" >> $pidfile
+       )
+       done
+       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 awx | grep 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 +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
+}      
\ No newline at end of file
diff --git a/net-fs/autofs/files/autofs1.confd b/net-fs/autofs/files/autofs1.confd
new file mode 100644 (file)
index 0000000..0d1c855
--- /dev/null
@@ -0,0 +1,9 @@
+# Config file for /etc/init.d/autofs
+
+FLAGS="defaults 21"
+
+#
+# e.g. localoptions='rsize=8192,wsize=8192'
+# 
+localoptions='--timeout=60'
+
diff --git a/net-fs/autofs/files/digest-autofs-3.1.7-r4 b/net-fs/autofs/files/digest-autofs-3.1.7-r4
new file mode 100644 (file)
index 0000000..c8410dc
--- /dev/null
@@ -0,0 +1 @@
+MD5 4f602f82442b48ce9c2e0005d59c3408 autofs-3.1.7.tar.bz2 57000
diff --git a/net-fs/autofs/files/nisyp.patch b/net-fs/autofs/files/nisyp.patch
new file mode 100644 (file)
index 0000000..6e53909
--- /dev/null
@@ -0,0 +1,12 @@
+diff -ruN autofs-3.1.7/daemon/Makefile autofs-3.1.7-patched/daemon/Makefile
+--- autofs-3.1.7/daemon/Makefile       2000-11-03 23:05:17.000000000 -0800
++++ autofs-3.1.7-patched/daemon/Makefile       2002-07-19 13:00:10.000000000 -0700
+@@ -13,7 +13,7 @@
+ 
+ CFLAGS += -rdynamic -DAUTOFS_LIB_DIR=\"$(autofslibdir)\" -DVERSION_STRING=\"$(version)\" -I../include
+ LDFLAGS += -rdynamic
+-LIBS = -ldl
++LIBS = -ldl -lnsl
+ 
+ all: automount
+