From 646a5c1cbfd95873950a87b5f75d52073a967023 Mon Sep 17 00:00:00 2001 From: Patrick J Volkerding Date: Mon, 28 May 2018 19:12:29 +0000 Subject: Mon May 28 19:12:29 UTC 2018 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. --- source/n/nfs-utils/nfs-utils.SlackBuild | 41 +++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 12 deletions(-) (limited to 'source/n/nfs-utils/nfs-utils.SlackBuild') 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 -- cgit v1.2.3-65-gdbad