diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2009-08-26 10:00:38 -0500 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:41:17 +0200 |
commit | 5a12e7c134274dba706667107d10d231517d3e05 (patch) | |
tree | 55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/n/nfs-utils | |
download | current-5a12e7c134274dba706667107d10d231517d3e05.tar.gz current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz |
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86_64 is released as stable! Thanks to everyone who
helped make this release possible -- see the RELEASE_NOTES for the
credits. The ISOs are off to the replicator. This time it will be a
6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.
We're taking pre-orders now at store.slackware.com. Please consider
picking up a copy to help support the project. Once again, thanks to
the entire Slackware community for all the help testing and fixing
things and offering suggestions during this development cycle.
As always, have fun and enjoy! -P.
Diffstat (limited to 'source/n/nfs-utils')
-rw-r--r-- | source/n/nfs-utils/nfs-utils-1.1.4.tar.bz2.sign | 8 | ||||
-rwxr-xr-x | source/n/nfs-utils/nfs-utils.SlackBuild | 166 | ||||
-rw-r--r-- | source/n/nfs-utils/nfs-utils.lwrap.needs.lnsl.diff | 11 | ||||
-rw-r--r-- | source/n/nfs-utils/rc.nfsd | 98 | ||||
-rw-r--r-- | source/n/nfs-utils/slack-desc | 19 |
5 files changed, 302 insertions, 0 deletions
diff --git a/source/n/nfs-utils/nfs-utils-1.1.4.tar.bz2.sign b/source/n/nfs-utils/nfs-utils-1.1.4.tar.bz2.sign new file mode 100644 index 000000000..3457f1ef7 --- /dev/null +++ b/source/n/nfs-utils/nfs-utils-1.1.4.tar.bz2.sign @@ -0,0 +1,8 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) +Comment: See http://www.kernel.org/signature.html for info + +iD8DBQBI+KqOyGugalF9Dw4RAuC3AJ97L3+wXMajwG6cIy+8GJJUQYWi3ACgkyET +zLF2+bn5et1RX1dGiiijnhs= +=VrzL +-----END PGP SIGNATURE----- diff --git a/source/n/nfs-utils/nfs-utils.SlackBuild b/source/n/nfs-utils/nfs-utils.SlackBuild new file mode 100755 index 000000000..1e3f5cbf9 --- /dev/null +++ b/source/n/nfs-utils/nfs-utils.SlackBuild @@ -0,0 +1,166 @@ +#!/bin/sh + +# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +VERSION=1.1.4 +ARCH=${ARCH:-x86_64} +BUILD=${BUILD:-1} + +NUMJOBS=${NUMJOBS:-" -j7 "} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-nfs-utils + +rm -rf $PKG +mkdir -p $TMP $PKG + +# Explode the package framework: +cd $PKG +explodepkg $CWD/_nfs-utils.tar.gz + +# Add startup script: +cat $CWD/rc.nfsd > $PKG/etc/rc.d/rc.nfsd.new +# Off by default, unless there's a previous version that's turned on: +chmod 644 $PKG/etc/rc.d/rc.nfsd.new + +cd $TMP +rm -rf nfs-utils-$VERSION +tar xvf $CWD/nfs-utils-$VERSION.tar.bz2 || exit 1 +cd nfs-utils-$VERSION || exit 1 + +zcat $CWD/nfs-utils.lwrap.needs.lnsl.diff.gz | patch -p1 --verbose || exit 1 + +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +# No NFSv4 yet -- it requires additional libraries. + +CFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --mandir=/usr/man \ + --with-statedir=/var/lib/nfs \ + --enable-nfsv3 \ + --enable-nfsv4=no \ + --enable-gss=no \ + --enable-secure-statd \ + --program-prefix= \ + --program-suffix= \ + --build=$ARCH-slackware-linux + +make $NUMJOBS || make || exit 1 +make install DESTDIR=$PKG || exit 1 + +# These might be in use: +( cd $PKG/var/lib/nfs + for config_file in etab rmtab state xtab ; do + mv ${config_file} ${config_file}.new + done +) + +# No NFSv4 yet, so remove these: +rm -f $PKG/sbin/*nfs4 + +# Why were we doing this? +mkdir -p $PKG/sbin +mv $PKG/usr/sbin/rpc.statd $PKG/sbin +( cd $PKG/usr/sbin ; ln -sf ../../sbin/rpc.statd . ) + +find $PKG | xargs file | grep -e "executable" -e "shared object" \ + | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + +mkdir -p $PKG/usr/doc/nfs-utils-$VERSION +cp -a \ + AUTHORS COPYING INSTALL NEWS README \ + $PKG/usr/doc/nfs-utils-$VERSION +mkdir -p $PKG/usr/doc/nfs-utils-$VERSION/statd +cp -a \ + utils/statd/COPYING utils/statd/COPYRIGHT utils/statd/TODO \ + $PKG/usr/doc/nfs-utils-$VERSION/statd + +# Compress and if needed symlink the man pages: +if [ -d $PKG/usr/man ]; then + ( cd $PKG/usr/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat << EOF > $PKG/install/doinst.sh +#!/bin/sh +config() { + NEW="\$1" + OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +EOF +( cd $PKG/var/lib/nfs + for config_file in etab.new rmtab.new state.new xtab.new ; do + if [ -r ${config_file} ]; then + echo "config var/lib/nfs/${config_file}" >> $PKG/install/doinst.sh + fi + done +) +# If these aren't moved into place, they're junk: +echo "rm -f var/lib/nfs/*.new" >> $PKG/install/doinst.sh +cat << EOF >> $PKG/install/doinst.sh +if [ -x etc/rc.d/rc.nfsd ]; then + chmod 755 etc/rc.d/rc.nfsd.new +else + chmod 644 etc/rc.d/rc.nfsd.new +fi +config etc/rc.d/rc.nfsd.new +config etc/exports.new +EOF + +# Build the package: +cd $PKG +/sbin/makepkg -l y -c n $TMP/nfs-utils-$VERSION-$ARCH-$BUILD.txz + diff --git a/source/n/nfs-utils/nfs-utils.lwrap.needs.lnsl.diff b/source/n/nfs-utils/nfs-utils.lwrap.needs.lnsl.diff new file mode 100644 index 000000000..c49196fe3 --- /dev/null +++ b/source/n/nfs-utils/nfs-utils.lwrap.needs.lnsl.diff @@ -0,0 +1,11 @@ +--- ./configure.orig 2008-03-20 06:20:01.000000000 -0500 ++++ ./configure 2008-03-31 17:19:22.000000000 -0500 +@@ -3933,7 +3933,7 @@ + CPPFLAGS="-I${with_tcpw} ${CPPFLAGS}" + fi + fi +- LIBWRAP="-lwrap" ++ LIBWRAP="-lwrap -lnsl" + LIBS="$LIBWRAP $LIBS" + { echo "$as_me:$LINENO: checking for libwrap" >&5 + echo $ECHO_N "checking for libwrap... $ECHO_C" >&6; } diff --git a/source/n/nfs-utils/rc.nfsd b/source/n/nfs-utils/rc.nfsd new file mode 100644 index 000000000..f21133829 --- /dev/null +++ b/source/n/nfs-utils/rc.nfsd @@ -0,0 +1,98 @@ +#!/bin/sh +# Start/stop/restart the NFS server. +# +# This is an init script for the knfsd NFS daemons. +# To use NFS, you must first set up /etc/exports. +# See exports(5) for information on /etc/exports format. +# +# Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>. + +nfsd_start() { + # Sanity checks. Exit if there's no /etc/exports, or if there aren't any + # shares defined in it. + if [ ! -r /etc/exports ]; then # no config file, exit: + exit + elif ! grep -v '^#' /etc/exports | grep '/' 1> /dev/null 2> /dev/null ; then + exit # no uncommented shares in /etc/exports + fi + + # First, make sure the nfsd kernel module is loaded. You can comment this + # part out if you've built nfsd support directly into the kernel. + if [ -z "`/sbin/lsmod | grep "^nfsd "`" ]; then + /sbin/modprobe nfsd + fi + + # For kernels newer than 2.4.x, use the new way of handling nfs client requests. + if [ ! "$(/bin/uname -r | /bin/cut -f 1,2 -d .)" = "2.4" ]; then + if grep -wq nfsd /proc/filesystems 2> /dev/null ; then + if grep -vwq nfsd /proc/mounts 2> /dev/null ; then + /sbin/mount -t nfsd nfsd /proc/fs/nfs 2> /dev/null + fi + fi + fi + + # If basic RPC services are not running, start them: + if ! ps axc | grep -q rpc.statd ; then + if [ -r /etc/rc.d/rc.rpc ]; then + sh /etc/rc.d/rc.rpc start + else + # Sure, we tested for rpc.statd, but this is the probable cause: + echo "FATAL: Can't start NFS server without portmap package." + sleep 5 + exit 1 + fi + fi + + echo "Starting NFS server daemons:" + + if [ -x /usr/sbin/exportfs ]; then + echo " /usr/sbin/exportfs -r" + /usr/sbin/exportfs -r + fi + + if [ -x /usr/sbin/rpc.rquotad ]; then + echo " /usr/sbin/rpc.rquotad" + /usr/sbin/rpc.rquotad + fi + + # Start 8 nfsd servers by default (an old Sun standard): + if [ -x /usr/sbin/rpc.nfsd ]; then + echo " /usr/sbin/rpc.nfsd 8" + /usr/sbin/rpc.nfsd 8 + fi + + if [ -x /usr/sbin/rpc.mountd ]; then + echo " /usr/sbin/rpc.mountd" + /usr/sbin/rpc.mountd + fi + +} + +nfsd_stop() { + killall rpc.mountd 2> /dev/null + killall nfsd 2> /dev/null + sleep 1 + killall -9 nfsd 2> /dev/null # make sure :) + killall rpc.rquotad 2> /dev/null + /usr/sbin/exportfs -au 2> /dev/null +} + +nfsd_restart() { + nfsd_stop + sleep 1 + nfsd_start +} + +case "$1" in +'start') + nfsd_start + ;; +'stop') + nfsd_stop + ;; +'restart') + nfsd_restart + ;; +*) + echo "usage $0 start|stop|restart" +esac diff --git a/source/n/nfs-utils/slack-desc b/source/n/nfs-utils/slack-desc new file mode 100644 index 000000000..158b4a97c --- /dev/null +++ b/source/n/nfs-utils/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +nfs-utils: nfs-utils (Network File System daemons and utilities) +nfs-utils: +nfs-utils: The nfs-utils package contains the necessary daemons and utilities to +nfs-utils: run an NFS server on Linux. +nfs-utils: +nfs-utils: You'll also need the portmap package to use NFS. +nfs-utils: +nfs-utils: +nfs-utils: +nfs-utils: +nfs-utils: |