diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-05-28 19:12:29 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:39:35 +0200 |
commit | 646a5c1cbfd95873950a87b5f75d52073a967023 (patch) | |
tree | b8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/n/nfs-utils | |
parent | d31c50870d0bee042ce660e445c9294a59a3a65b (diff) | |
download | current-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz current-646a5c1cbfd95873950a87b5f75d52073a967023.tar.xz |
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt.
installpkg: default line length for --terselength is the number of columns.
removepkg: added --terse mode.
upgradepkg: default line length for --terselength is the number of columns.
upgradepkg: accept -option in addition to --option.
ap/vim-8.1.0026-x86_64-1.txz: Upgraded.
d/bison-3.0.5-x86_64-1.txz: Upgraded.
e/emacs-26.1-x86_64-1.txz: Upgraded.
kde/kopete-4.14.3-x86_64-8.txz: Rebuilt.
Recompiled against libidn-1.35.
n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded.
n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded.
n/libnftnl-1.1.0-x86_64-1.txz: Upgraded.
n/links-2.16-x86_64-2.txz: Rebuilt.
Rebuilt to enable X driver for -g mode.
n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded.
n/nftables-0.8.5-x86_64-1.txz: Upgraded.
n/p11-kit-0.23.11-x86_64-1.txz: Upgraded.
n/ulogd-2.0.7-x86_64-1.txz: Upgraded.
n/whois-5.3.1-x86_64-1.txz: Upgraded.
xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded.
xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/n/nfs-utils')
-rw-r--r-- | source/n/nfs-utils/doinst.sh | 2 | ||||
-rw-r--r-- | source/n/nfs-utils/exports | 4 | ||||
-rw-r--r-- | source/n/nfs-utils/ignore_unsupported_address_types_in_nfssvc_setfds.diff | 37 | ||||
-rw-r--r-- | source/n/nfs-utils/nfs-utils-1.3.3.tar.sign | bin | 543 -> 0 bytes | |||
-rw-r--r-- | source/n/nfs-utils/nfs-utils-2.3.1.tar.sign | bin | 0 -> 543 bytes | |||
-rwxr-xr-x | source/n/nfs-utils/nfs-utils.SlackBuild | 41 | ||||
-rw-r--r-- | source/n/nfs-utils/nfs.default | 10 | ||||
-rw-r--r-- | source/n/nfs-utils/rc.nfsd | 31 | ||||
-rw-r--r-- | source/n/nfs-utils/slack-desc | 6 |
9 files changed, 71 insertions, 60 deletions
diff --git a/source/n/nfs-utils/doinst.sh b/source/n/nfs-utils/doinst.sh index 0523f4e7e..911a88cc2 100644 --- a/source/n/nfs-utils/doinst.sh +++ b/source/n/nfs-utils/doinst.sh @@ -13,7 +13,6 @@ config() { config var/lib/nfs/etab.new config var/lib/nfs/rmtab.new config var/lib/nfs/state.new -config var/lib/nfs/xtab.new rm -f var/lib/nfs/*.new chown -R rpc:rpc var/lib/nfs if [ -x etc/rc.d/rc.nfsd ]; then @@ -21,6 +20,7 @@ if [ -x etc/rc.d/rc.nfsd ]; then else chmod 644 etc/rc.d/rc.nfsd.new fi +config etc/default/nfs.new config etc/rc.d/rc.nfsd.new config etc/nfsmount.conf.new config etc/exports.new diff --git a/source/n/nfs-utils/exports b/source/n/nfs-utils/exports new file mode 100644 index 000000000..418ac6b66 --- /dev/null +++ b/source/n/nfs-utils/exports @@ -0,0 +1,4 @@ +# See exports(5) for a description. +# This file contains a list of all directories exported to other computers. +# It is used by rpc.nfsd and rpc.mountd. + diff --git a/source/n/nfs-utils/ignore_unsupported_address_types_in_nfssvc_setfds.diff b/source/n/nfs-utils/ignore_unsupported_address_types_in_nfssvc_setfds.diff deleted file mode 100644 index 6384888e9..000000000 --- a/source/n/nfs-utils/ignore_unsupported_address_types_in_nfssvc_setfds.diff +++ /dev/null @@ -1,37 +0,0 @@ -From: Christoph Hellwig <hch at lst.de> -Subject: nfsd: ignore unsupported address types in nfssvc_setfds - -Just continue and try a different record returned from getaddrinfo -if the kernel does not support an address family. This fixes nfsd -startup on kernels without IPv6 support. - -Suggested-by: Chuck Lever <chuck.lever at oracle.com> -Signed-off-by: Christoph Hellwig <hch at lst.de> - -diff --git a/utils/nfsd/nfssvc.c b/utils/nfsd/nfssvc.c -index a2b11d8..fc11d23 100644 ---- a/utils/nfsd/nfssvc.c -+++ b/utils/nfsd/nfssvc.c -@@ -174,15 +174,14 @@ nfssvc_setfds(const struct addrinfo *hints, const char *node, const char *port) - sockfd = socket(addr->ai_family, addr->ai_socktype, - addr->ai_protocol); - if (sockfd < 0) { -- if (errno == EAFNOSUPPORT) -- xlog(L_NOTICE, "address family %s not " -- "supported by protocol %s", -- family, proto); -- else -+ if (errno != EAFNOSUPPORT) { - xlog(L_ERROR, "unable to create %s %s socket: " - "errno %d (%m)", family, proto, errno); -- rc = errno; -- goto error; -+ rc = errno; -+ goto error; -+ } -+ addr = addr->ai_next; -+ continue; - } - #ifdef IPV6_SUPPORTED - if (addr->ai_family == AF_INET6 && --- diff --git a/source/n/nfs-utils/nfs-utils-1.3.3.tar.sign b/source/n/nfs-utils/nfs-utils-1.3.3.tar.sign Binary files differdeleted file mode 100644 index 0fcb786fc..000000000 --- a/source/n/nfs-utils/nfs-utils-1.3.3.tar.sign +++ /dev/null diff --git a/source/n/nfs-utils/nfs-utils-2.3.1.tar.sign b/source/n/nfs-utils/nfs-utils-2.3.1.tar.sign Binary files differnew file mode 100644 index 000000000..7d476e093 --- /dev/null +++ b/source/n/nfs-utils/nfs-utils-2.3.1.tar.sign diff --git a/source/n/nfs-utils/nfs-utils.SlackBuild b/source/n/nfs-utils/nfs-utils.SlackBuild index e88004795..147a69b82 100755 --- a/source/n/nfs-utils/nfs-utils.SlackBuild +++ b/source/n/nfs-utils/nfs-utils.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2008, 2009, 2010, 2011, 2013, 2016 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2008, 2009, 2010, 2011, 2013, 2016, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,8 +20,10 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) -VERSION=1.3.3 +PKGNAM=nfs-utils +VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: @@ -34,6 +36,14 @@ if [ -z "$ARCH" ]; then esac fi +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} if [ "$ARCH" = "i586" ]; then @@ -46,30 +56,33 @@ else SLKCFLAGS="-O2" 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 defaults file: +mkdir -p $PKG/etc/default +cat $CWD/nfs.default > $PKG/etc/default/nfs.new # Add startup script: +mkdir -p $PKG/etc/rc.d 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 +# Add /etc/exports: +cp -a $CWD/exports $PKG/etc/exports.new +chown root:root $PKG/etc/exports.new +chmod 644 $PKG/etc/exports.new + cd $TMP rm -rf nfs-utils-$VERSION -tar xvf $CWD/nfs-utils-$VERSION.tar.xz || exit 1 +tar xvf $CWD/nfs-utils-$VERSION.tar.?z || exit 1 cd nfs-utils-$VERSION || exit 1 zcat $CWD/nfs-utils.lwrap.needs.lnsl.diff.gz | patch -p1 --verbose || exit 1 -# Fix problems on machines without IPv6: -zcat $CWD/ignore_unsupported_address_types_in_nfssvc_setfds.diff.gz | patch -p1 -l --verbose || exit 1 chown -R root:root . find . \ @@ -91,7 +104,7 @@ CFLAGS="$SLKCFLAGS" \ --enable-tirpc=yes \ --program-prefix= \ --program-suffix= \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 @@ -100,12 +113,13 @@ make install DESTDIR=$PKG || exit 1 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 + for config_file in etab rmtab state ; do mv ${config_file} ${config_file}.new done ) @@ -121,6 +135,9 @@ mv $PKG/usr/sbin/rpc.statd $PKG/sbin # Chown /var/lib/nfs so that rpc.statd runs as rpc:rpc: chown -R rpc:rpc $PKG/var/lib/nfs +# Create log directory: +mkdir -p $PKG/var/log/nfsd + find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null diff --git a/source/n/nfs-utils/nfs.default b/source/n/nfs-utils/nfs.default new file mode 100644 index 000000000..94e574038 --- /dev/null +++ b/source/n/nfs-utils/nfs.default @@ -0,0 +1,10 @@ +# See also /etc/default/rpc + +# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8) +# Turn off v2 and v3 protocol support: +#RPC_NFSD_OPTS="-N 2 -N 3" +# Turn off v4 protocol support: +#RPC_NFSD_OPTS="-N 4" +# Number of nfs server processes to be started. +# The default is 8. +#RPC_NFSD_COUNT=8 diff --git a/source/n/nfs-utils/rc.nfsd b/source/n/nfs-utils/rc.nfsd index b43bd3b8c..965db6b4c 100644 --- a/source/n/nfs-utils/rc.nfsd +++ b/source/n/nfs-utils/rc.nfsd @@ -7,6 +7,14 @@ # # Written for Slackware Linux by Patrick J. Volkerding <volkerdi@slackware.com>. +# Source default settings: +if [ -r /etc/default/rpc ]; then + . /etc/default/rpc +fi +if [ -r /etc/default/nfs ]; then + . /etc/default/nfs +fi + nfsd_start() { # Sanity checks. Exit if there's no /etc/exports, or if there aren't any # shares defined in it. @@ -51,19 +59,28 @@ nfsd_start() { fi if [ -x /usr/sbin/rpc.rquotad ]; then - echo " /usr/sbin/rpc.rquotad" - /usr/sbin/rpc.rquotad + if [ -n "$RPC_RQUOTAD_PORT" ]; then + RPC_RQUOTAD_OPTS="$RPC_RQUOTAD_OPTS -p $RPC_RQUOTAD_PORT" + fi + echo " /usr/sbin/rpc.rquotad $RPC_RQUOTAD_OPTS" + /usr/sbin/rpc.rquotad $RPC_RQUOTAD_OPTS fi - # Start 8 nfsd servers by default (an old Sun standard): + # Start nfsd servers - 8 if not set otherwise (an old Sun standard): if [ -x /usr/sbin/rpc.nfsd ]; then - echo " /usr/sbin/rpc.nfsd 8" - /usr/sbin/rpc.nfsd 8 + if [ -z "$RPC_NFSD_COUNT" ]; then + RPC_NFSD_COUNT=8 + fi + echo " /usr/sbin/rpc.nfsd $RPC_NFSD_OPTS $RPC_NFSD_COUNT" + /usr/sbin/rpc.nfsd $RPC_NFSD_OPTS $RPC_NFSD_COUNT fi if [ -x /usr/sbin/rpc.mountd ]; then - echo " /usr/sbin/rpc.mountd" - /usr/sbin/rpc.mountd + if [ -n "$RPC_MOUNTD_PORT" ]; then + RPC_MOUNTD_OPTS="$RPC_MOUNTD_OPTS -p $RPC_MOUNTD_PORT" + fi + echo " /usr/sbin/rpc.mountd $RPC_MOUNTD_OPTS" + /usr/sbin/rpc.mountd $RPC_MOUNTD_OPTS fi } diff --git a/source/n/nfs-utils/slack-desc b/source/n/nfs-utils/slack-desc index 09eefaa44..1a5454d46 100644 --- a/source/n/nfs-utils/slack-desc +++ b/source/n/nfs-utils/slack-desc @@ -1,8 +1,8 @@ # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# 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 +# 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------------------------------------------------------| |