summaryrefslogtreecommitdiffstats
path: root/source.local/n/nfs-utils
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2013-03-22 16:47:17 -0700
committer Eric Hameleers <alien@slackware.com>2013-03-22 16:47:17 -0700
commit69dd99f961988fa15da8d7f0d63b62f3385419c3 (patch)
treed57eb3e85e1d08e7815787de26946ee42c398b66 /source.local/n/nfs-utils
downloadalienarm-69dd99f961988fa15da8d7f0d63b62f3385419c3.tar.gz
alienarm-69dd99f961988fa15da8d7f0d63b62f3385419c3.tar.xz
Initial commit of a Slackware cross-arch bootstrap framework.
Diffstat (limited to 'source.local/n/nfs-utils')
-rw-r--r--source.local/n/nfs-utils/doinst.sh.gzbin0 -> 515 bytes
-rw-r--r--source.local/n/nfs-utils/nfs-utils-1.2.3.tar.sign8
-rwxr-xr-xsource.local/n/nfs-utils/nfs-utils.SlackBuild173
-rw-r--r--source.local/n/nfs-utils/nfs-utils.lwrap.needs.lnsl.diff.gzbin0 -> 255 bytes
-rw-r--r--source.local/n/nfs-utils/rc.nfsd98
-rw-r--r--source.local/n/nfs-utils/slack-desc19
6 files changed, 298 insertions, 0 deletions
diff --git a/source.local/n/nfs-utils/doinst.sh.gz b/source.local/n/nfs-utils/doinst.sh.gz
new file mode 100644
index 0000000..353dd9d
--- /dev/null
+++ b/source.local/n/nfs-utils/doinst.sh.gz
Binary files differ
diff --git a/source.local/n/nfs-utils/nfs-utils-1.2.3.tar.sign b/source.local/n/nfs-utils/nfs-utils-1.2.3.tar.sign
new file mode 100644
index 0000000..f159e0b
--- /dev/null
+++ b/source.local/n/nfs-utils/nfs-utils-1.2.3.tar.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
+
+iD8DBQBMoeJcyGugalF9Dw4RApKyAJ91WfvKRivOd7XKaUXrNaIDlhwozACfacf5
+b0Maa5t3jk5Pnj+IQqvic+g=
+=cnNE
+-----END PGP SIGNATURE-----
diff --git a/source.local/n/nfs-utils/nfs-utils.SlackBuild b/source.local/n/nfs-utils/nfs-utils.SlackBuild
new file mode 100755
index 0000000..26b17dc
--- /dev/null
+++ b/source.local/n/nfs-utils/nfs-utils.SlackBuild
@@ -0,0 +1,173 @@
+#!/bin/sh
+
+# Copyright 2008, 2009, 2010, 2011 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.
+
+# Modified 2012 by Eric Hameleers <alien at slackware.com> for ARM port.
+
+
+VERSION=1.2.3
+BUILD=${BUILD:-3}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+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.xz || 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-mountconfig \
+ --enable-nfsv4=no \
+ --enable-gss=no \
+ --enable-tirpc=no \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$TARGET
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Add nfsmount.conf and man page:
+cat ./utils/mount/nfsmount.conf > $PKG/etc/nfsmount.conf.new
+mkdir -p $PKG/usr/man/man5
+cat ./utils/mount/nfsmount.conf.man > $PKG/usr/man/man5/nfsmount.conf.5
+# Set default protocol version 3:
+sed -i "s/# Defaultvers=4/Defaultvers=3/g" $PKG/etc/nfsmount.conf.new
+
+# 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
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+# 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
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/nfs-utils-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/source.local/n/nfs-utils/nfs-utils.lwrap.needs.lnsl.diff.gz b/source.local/n/nfs-utils/nfs-utils.lwrap.needs.lnsl.diff.gz
new file mode 100644
index 0000000..c2d259b
--- /dev/null
+++ b/source.local/n/nfs-utils/nfs-utils.lwrap.needs.lnsl.diff.gz
Binary files differ
diff --git a/source.local/n/nfs-utils/rc.nfsd b/source.local/n/nfs-utils/rc.nfsd
new file mode 100644
index 0000000..b43bd3b
--- /dev/null
+++ b/source.local/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
+
+ # If we do not detect nfsd support built into the kernel (or previously
+ # loaded as a module), we will try to load the nfsd.ko kernel module:
+ if [ ! -r /proc/1/net/rpc/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.local/n/nfs-utils/slack-desc b/source.local/n/nfs-utils/slack-desc
new file mode 100644
index 0000000..158b4a9
--- /dev/null
+++ b/source.local/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: