[arch-commits] Commit in nfs-utils/trunk (7 files)

Andreas Radke andyrtr at archlinux.org
Thu Aug 25 20:48:50 UTC 2016


    Date: Thursday, August 25, 2016 @ 20:48:50
  Author: andyrtr
Revision: 274649

upgpkg: nfs-utils 1.3.4-1

upstream update 1.3.4; use a single config file

Added:
  nfs-utils/trunk/nfs.sysconfig
Modified:
  nfs-utils/trunk/PKGBUILD
  nfs-utils/trunk/nfs-utils.install
  nfs-utils/trunk/nfs-utils_env.sh
Deleted:
  nfs-utils/trunk/ignore_unsupported_address_types_in_nfssvc_setfds.diff
  nfs-utils/trunk/nfs-common.conf
  nfs-utils/trunk/nfs-server.conf

--------------------------------------------------------+
 PKGBUILD                                               |   56 ++++++------
 ignore_unsupported_address_types_in_nfssvc_setfds.diff |   37 --------
 nfs-common.conf                                        |   22 ----
 nfs-server.conf                                        |   17 ---
 nfs-utils.install                                      |   21 +---
 nfs-utils_env.sh                                       |   68 +++++++++++----
 nfs.sysconfig                                          |   42 +++++++++
 7 files changed, 131 insertions(+), 132 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-08-25 20:14:39 UTC (rev 274648)
+++ PKGBUILD	2016-08-25 20:48:50 UTC (rev 274649)
@@ -7,40 +7,36 @@
 # Contributor: Marco Lima <cipparello gmail com>
 
 pkgname=nfs-utils
-pkgver=1.3.3
-pkgrel=3
+pkgver=1.3.4
+pkgrel=1
 pkgdesc="Support programs for Network File Systems"
 arch=('i686' 'x86_64')
 url='http://nfs.sourceforge.net'
 license=('GPL2')
-backup=(etc/{exports,nfsmount.conf} etc/conf.d/{nfs-common.conf,nfs-server.conf})
-depends=('rpcbind' 'librpcsecgss>=0.19-2' 'nfsidmap' 'gssproxy' 
-         'libevent>=2.0.10' 'device-mapper')
+backup=(etc/{exports,nfsmount.conf} etc/sysconfig/nfs)
+depends=('rpcbind' 'nfsidmap' 'gssproxy' 'libevent' 'device-mapper')
 makedepends=('sqlite')
 # http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=summary
 source=(http://downloads.sourceforge.net/project/nfs/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.{bz2,sign}
-        nfs-common.conf nfs-server.conf exports nfs-utils.conf id_resolver.conf
+        id_resolver.conf
         nfs-utils_env.sh
-        ignore_unsupported_address_types_in_nfssvc_setfds.diff)
+        nfs.sysconfig
+        exports
+        #nfs-utils.conf 
+)
 install=nfs-utils.install
 optdepends=('sqlite: for nfsdcltrack usage'
-            'python2: for nfsiostat and mountstats usage')
-sha1sums=('7c561e6a22a626aed93766bdb0c34e9a4e77b9e7'
+            'python: for nfsiostat and mountstats usage')
+sha1sums=('f66ce79f6d2de8907e0e2f6b00f96d7486281cc5'
           'SKIP'
-          '44deb1c199d89ef866d90aad47eadd3b44070b59'
-          '2658a0e9d9ff8e4be7b3f190f6743f5b83852f3f'
-          '170a929d9c0f22edb13b656648cadf372efea841'
-          'c109f2300f2d841104adb09fe76a5f2583015c72'
           '24b3c10b47dc120b2d252cf1e5001effa8f76a62'
-          '96734598a0b851da10cb9e02afb52ec55fed6273'
-          '0fa72f3e3485abf71b1199caa1e6089f9f129a77')
+          '519eaaebecf423dcea156ed6e2c4f722236df0b2'
+          'e9648adc732f47f24da6d71e1729da5a7697e203'
+          '170a929d9c0f22edb13b656648cadf372efea841')
 validpgpkeys=('E1B71E339E20A10A676F7CB69AFB1D681A125177') # Steve Dickson
 
 prepare() {
   cd ${pkgname}-${pkgver}
-  
-  # fix IPv6-less kernels; FS#46739
-  patch -Np1 -i $srcdir/ignore_unsupported_address_types_in_nfssvc_setfds.diff
 
   # fix hardcoded sbin path to our needs
   sed -i "s|sbindir = /sbin|sbindir = /usr/bin|g" utils/*/Makefile.am
@@ -70,9 +66,7 @@
 package() {
   cd ${pkgname}-${pkgver}
   make DESTDIR="$pkgdir" install
-  
-  sed -i '1s/python$/python2/' "$pkgdir"/usr/bin/{nfsiostat,mountstats}
-  
+ 
   install -D -m 644 utils/mount/nfsmount.conf "$pkgdir"/etc/nfsmount.conf
   
   for i in systemd/{*.service,*.mount,*.target}; do
@@ -80,13 +74,25 @@
   done
 
   cd ..
-  install -D -m 644 nfs-common.conf  "$pkgdir"/etc/conf.d/nfs-common.conf
-  install -D -m 644 nfs-server.conf  "$pkgdir"/etc/conf.d/nfs-server.conf
-  install -D -m 755 nfs-utils_env.sh "$pkgdir"/usr/lib/systemd/scripts/nfs-utils_env.sh
+
+  # distro specific daemon flags - files taken from Fedora ( = upstream developer)
+  install -D -m 755 nfs-utils_env.sh "$pkgdir"/usr/lib/nfs-utils/nfs-utils_env.sh
+  install -D -m 644 nfs.sysconfig    "$pkgdir"/etc/sysconfig/nfs
+  
+  # fix path - this will be fixed in 1.3.5rc2 and later
+  sed -i "s:libexec:lib:" "$pkgdir"/usr/lib/systemd/system/nfs-config.service
+
+  # empty exports file  
   install -D -m 644 exports          "$pkgdir"/etc/exports
+
+  # config file for idmappers in newer kernels
   install -D -m 644 id_resolver.conf "$pkgdir"/etc/request-key.d/id_resolver.conf
-  install -D -m 644 nfs-utils.conf   "$pkgdir"/usr/lib/modules-load.d/nfs-utils.conf
+
+  # load kernel module - should be obsolete
+#  install -D -m 644 nfs-utils.conf   "$pkgdir"/usr/lib/modules-load.d/nfs-utils.conf
+
   mkdir "$pkgdir"/etc/exports.d
   mkdir -m 555 "$pkgdir"/var/lib/nfs/rpc_pipefs
   mkdir "$pkgdir"/var/lib/nfs/v4recovery
+
 }

Deleted: ignore_unsupported_address_types_in_nfssvc_setfds.diff
===================================================================
--- ignore_unsupported_address_types_in_nfssvc_setfds.diff	2016-08-25 20:14:39 UTC (rev 274648)
+++ ignore_unsupported_address_types_in_nfssvc_setfds.diff	2016-08-25 20:48:50 UTC (rev 274649)
@@ -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 &&
---

Deleted: nfs-common.conf
===================================================================
--- nfs-common.conf	2016-08-25 20:14:39 UTC (rev 274648)
+++ nfs-common.conf	2016-08-25 20:48:50 UTC (rev 274649)
@@ -1,22 +0,0 @@
-# Parameters to be passed to nfs systemd services (nfs clients & server).
-#
-
-# Options to pass to rpc.statd.
-# See rpc.statd(8) for more details.
-# N.B. statd normally runs on both client and server, and run-time
-# options should be specified accordingly.
-# STATD_OPTS="-p 32765 -o 32766 -T 32803"
-STATD_OPTS=""
-
-# Options to pass to sm-notify
-# e.g. SMNOTIFY_OPTS="-p 32764"
-SMNOTIFY_OPTS=""
-
-# Options to pass to rpc.idmapd.
-# See rpc.idmapd(8) for more details.
-IDMAPD_OPTS=""
-
-# Options to pass to rpc.gssd.
-# See rpc.gssd(8) for more details.
-GSSD_OPTS=""
-

Deleted: nfs-server.conf
===================================================================
--- nfs-server.conf	2016-08-25 20:14:39 UTC (rev 274648)
+++ nfs-server.conf	2016-08-25 20:48:50 UTC (rev 274649)
@@ -1,17 +0,0 @@
-# Parameters to be passed to nfs systemd server services
-#
-
-# Options to pass to rpc.nfsd.
-# See rpc.nfsd(8) for more details.
-NFSD_OPTS=""
-
-# Options for rpc.mountd.
-# If you have a port-based firewall, you might want to set up
-# a fixed port here using the --port option.
-# See rpc.mountd(8) for more details.
-# MOUNTD_OPTS="-p 20048"
-MOUNTD_OPTS=""
-
-# Options to pass to rpc.svcgssd.
-# See rpc.svcgssd(8) for more details.
-SVCGSSD_OPTS=""

Modified: nfs-utils.install
===================================================================
--- nfs-utils.install	2016-08-25 20:14:39 UTC (rev 274648)
+++ nfs-utils.install	2016-08-25 20:48:50 UTC (rev 274649)
@@ -1,8 +1,8 @@
 post_install() {
 cat << 'EOM'
   ==> PLEASE NOTE:
-  ==> Extended configuration options for NFS (clients & server) are available in
-  ==> /etc/conf.d/nfs-common.conf and in /etc/conf.d/nfs-server.conf
+  ==> Extended configuration options for NFS are available in
+  ==> /etc/sysconfig/nfs
   ==>
   ==> Please refer to http://wiki.archlinux.org/index.php/NFS
   ==> for further information.
@@ -10,19 +10,12 @@
 }
 
 post_upgrade() {
-  if [ "$(vercmp $2 1.3.0-3)" -lt 0 ]; then
+  if [ "$(vercmp $2 1.3.4-0)" -lt 0 ]; then
 cat << 'EOM'
-  ==> IMPORTANT 1.3.0 NFS UTILS CHANGES:
-  ==> This is a rather important upgrade, you are going to have to change systemd services files.
-  ==> NFS-SERVER:
-  ==> systemctl enable nfs-server.service
-  ==> NFS-CLIENT:
-  ==> systemctl enable nfs-client.target
-  ==>
-  ==> Extended configuration options for NFS (clients & server) are available in:
-  ==> /etc/conf.d/nfs-common
-  ==> /etc/conf.d/nfs-server
-  ==> Please change them to your needs.
+  ==> Configuration file has been changed - there's now
+  ==> one unified place to apply system specific changes:
+  ==> Please merge your config from 
+  ==> /etc/conf.d/nfs-{common,server} into /etc/sysconfig/nfs
 EOM
   fi
 }

Modified: nfs-utils_env.sh
===================================================================
--- nfs-utils_env.sh	2016-08-25 20:14:39 UTC (rev 274648)
+++ nfs-utils_env.sh	2016-08-25 20:48:50 UTC (rev 274649)
@@ -1,20 +1,54 @@
-#!/bin/bash
-# archlinux config files
-. /etc/conf.d/nfs-common.conf
-. /etc/conf.d/nfs-server.conf
-# config file read by systemd files
-NFS_UTILS_CONFIG=/run/sysconfig/nfs-utils
+#!/bin/sh
 
-[[ -d /run/sysconfig ]] || mkdir /run/sysconfig
-[[ -e  $NFS_UTILS_CONFIG ]] && rm -f $NFS_UTILS_CONFIG
+#
+# Extract configuration from /etc/sysconfig/nfs and write
+# environment variables to /run/sysconfig/nfs-utils to be 
+# used by systemd nfs-config service
+#
 
-# /etc/conf.d/nfs-common
-echo "STATDARGS=\"$STATD_OPTS\"" >> $NFS_UTILS_CONFIG
-echo "SMNOTIFYARGS=\"$SMNOTIFY_OPTS\"" >> $NFS_UTILS_CONFIG
-echo "RPCIDMAPDARGS=\"$IDMAPD_OPTS\"" >> $NFS_UTILS_CONFIG
-echo "GSSDARGS=\"$GSSD_OPTS\"" >> $NFS_UTILS_CONFIG
+nfs_config=/etc/sysconfig/nfs
+if test -r $nfs_config; then
+    . $nfs_config
+fi
 
-# /etc/conf.d/nfs-server
-echo "RPCMOUNTDARGS=\"$MOUNTD_OPTS\"" >> $NFS_UTILS_CONFIG
-echo "RPCNFSDARGS=\"$NFSD_OPTS\"" >> $NFS_UTILS_CONFIG
-echo "SVCGSSDARGS=\"$SVCGSSD_OPTS\"" >> $NFS_UTILS_CONFIG
\ No newline at end of file
+[ -n "$LOCKDARG" ] && /usr/bin/modprobe lockd $LOCKDARG
+if [ -n "$LOCKD_TCPPORT" -o -n "$LOCKD_UDPPORT" ]; then
+    [ -z "$LOCKDARG" ] && /usr/bin/modprobe lockd $LOCKDARG
+    [ -n "$LOCKD_TCPPORT" ] && \
+        /usr/bin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 2>&1
+    [ -n "$LOCKD_UDPPORT" ] && \
+        /usr/bin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 2>&1
+fi
+
+if [ -n "$NFSD_V4_GRACE" ]; then
+    grace="-G $NFSD_V4_GRACE"
+fi
+
+if [ -n "$NFSD_V4_LEASE" ]; then
+    lease="-L $NFSD_V4_LEASE"
+fi
+
+if [ -n "$RPCNFSDCOUNT" ]; then
+    nfsds=$RPCNFSDCOUNT
+else
+    nfsds=8
+fi
+
+if [ -n "$RPCNFSDARGS" ]; then
+    nfsdargs="$RPCNFSDARGS $grace $lease $nfsds"
+else
+    nfsdargs="$grace $lease $nfsds"
+fi
+
+mkdir -p /run/sysconfig
+{
+echo RPCNFSDARGS=\"$nfsdargs\"
+echo RPCMOUNTDARGS=\"$RPCMOUNTDOPTS\"
+echo STATDARGS=\"$STATDARG\"
+echo SMNOTIFYARGS=\"$SMNOTIFYARGS\"
+echo RPCIDMAPDARGS=\"$RPCIDMAPDARGS\"
+echo RPCGSSDARGS=\"$RPCGSSDARGS\"
+echo RPCSVCGSSDARGS=\"$RPCSVCGSSDARGS\"
+echo BLKMAPDARGS=\"$BLKMAPDARGS\"
+echo GSS_USE_PROXY=\"$GSS_USE_PROXY\"
+} > /run/sysconfig/nfs-utils

Added: nfs.sysconfig
===================================================================
--- nfs.sysconfig	                        (rev 0)
+++ nfs.sysconfig	2016-08-25 20:48:50 UTC (rev 274649)
@@ -0,0 +1,42 @@
+#
+# Optional arguments passed to in-kernel lockd 
+#LOCKDARG=
+# TCP port rpc.lockd should listen on.
+#LOCKD_TCPPORT=32803
+# UDP port rpc.lockd should listen on.
+#LOCKD_UDPPORT=32769
+#
+# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
+RPCNFSDARGS=""
+# Number of nfs server processes to be started.
+# The default is 8. 
+# RPCNFSDCOUNT=16
+#   
+# Set V4 grace period in seconds
+#NFSD_V4_GRACE=90
+#
+# Set V4 lease period in seconds
+#NFSD_V4_LEASE=90
+#
+# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
+RPCMOUNTDOPTS=""
+#
+# Optional arguments passed to rpc.statd. See rpc.statd(8)
+STATDARG=""
+# Optional arguments passed to sm-notify. See sm-notify(8)
+SMNOTIFYARGS=""
+#
+#
+# Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
+RPCIDMAPDARGS=""
+#
+# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
+RPCGSSDARGS=""
+# Enable usage of gssproxy. See gssproxy-mech(8).
+GSS_USE_PROXY="yes"
+#
+# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
+RPCSVCGSSDARGS=""
+#
+# Optional arguments passed to blkmapd. See blkmapd(8)
+BLKMAPDARGS=""



More information about the arch-commits mailing list