Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=1a45e42a1c243b217bd6ec34c8ca1c669425d10f

commit 1a45e42a1c243b217bd6ec34c8ca1c669425d10f
Author: James Buren <[email protected]>
Date:   Tue Jul 31 12:31:37 2012 -0500

nfs-utils-1.2.6-1-x86_64
* version bump
* convert to systemd schema

diff --git a/source/network-extra/nfs-utils/FrugalBuild 
b/source/network-extra/nfs-utils/FrugalBuild
index f12a4d6..f732c36 100644
--- a/source/network-extra/nfs-utils/FrugalBuild
+++ b/source/network-extra/nfs-utils/FrugalBuild
@@ -2,8 +2,8 @@
# Maintainer: Miklos Vajna <[email protected]>

pkgname=nfs-utils
-pkgver=1.2.5
-pkgrel=2
+pkgver=1.2.6
+pkgrel=1
pkgdesc="Support programs for Network File Systems"
groups=('network-extra')
archs=('i686' 'x86_64')
@@ -11,17 +11,42 @@ backup=(etc/exports etc/conf.d/nfsd etc/sysconfig/nfs)
_F_sourceforge_dirname="nfs"
_F_sourceforge_ext=".tar.bz2"
Finclude sourceforge
-depends=('rpcbind' 'libnfsidmap>=0.21' 'libevent>=2.0.10' 'quota-tools'  
'lvm2')
-source=($source exports rc.nfsd rc.nfsd-hu.po nfs)
-sha1sums=('fc522fad2e0fb4a4541ba829417d8c757cb384ce' \
+depends=('rpcbind' 'libnfsidmap>=0.25' 'libevent>=2.0.10' 'quota-tools' 
'procps' 'lvm2')
+source=($source exports rc.nfsd rc.nfsd-hu.po \
+       nfs-blkmap.service nfs-idmap.service \
+       nfs-lock.service nfs-mountd.service \
+       nfs-rquotad.service nfs-server.service \
+       nfs.target proc-fs-nfsd.mount \
+       var-lib-nfs-rpc_pipefs.mount \
+       nfs.sysconfig nfs-lock.preconfig \
+       nfs-server.preconfig nfs-server.postconfig \
+       id_resolver.conf)
+sha1sums=('144634a4b5b3ad12c836f5dbcb49c62017035b96' \
'02f887f84059e19d50d08295d6d0bc9d56312f65' \
'7584e36fd775b8986673ebf63ea355f770dc930c' \
'b28e6e7575dc08c3ee4a1b738e25c2f92daa4a62' \
-          'c2753a21b4ddc5afadd958a0f36aee6320ff8b5a')
+          '30dc4adb9e5756c83e56760b57f08b2a88cbdd72' \
+          '3e89e8305ca7b5e2f2553d58712bb80942d2f360' \
+          '75fecf7ad5000c3865e9a25f8a1cbba1cd8c69eb' \
+          'd6f65f8609962a7b34dbe7aaa96c5b4bd76740a4' \
+          '1919f9036f8f54cf8a53eda74c2868d99bd701d4' \
+          '054b975d3040e8a331701cd608ecd1454078fa06' \
+          '25425543a82e09fd612093153991dff30aa04119' \
+          '7308d819614d5e851842164bf3f0998d9966794d' \
+          'f0498ffa7d0e9247a4757dbbaff1e44c0f1e3a2b' \
+          '56b6b838545cf78a9517f3b04a7c1d602df8cacf' \
+          '6526014fefc1afcfc0a1f07e024b97d8a047a7ad' \
+          '3580239ec1c83b9cb73e7ad7696ff7f2bfd714b0' \
+          '774639f7cb55de4ff442759b1717ff4cd2243c65' \
+          'e35ddb4c6910eeb19c847ee241049c038c22c4ae')
+_F_sysvinit_units=(nfsd)
+_F_systemd_units=(nfs-blkmap= nfs-idmap= nfs-lock= nfs-mountd= nfs-rquotad= 
nfs-server=)
+Finclude systemd

build()
{
Fsed 'getkversion' '' tools/Makefile.in
+       Fmkdir /sbin
Fbuild \
--with-statedir=/var/lib/nfs \
--without-tcp-wrappers \
@@ -29,8 +54,23 @@ build()
--enable-nfsv4
Frm usr/share/man/man5/idmapd.conf.5 # conflicts with libnfsidmap
Ffile /etc/exports
-       Ffile /etc/sysconfig/nfs
+       Fmkdir /etc/exports.d
+       Ffile nfs.sysconfig /etc/sysconfig/nfs
+       Ffile /etc/request-key.d/id_resolver.conf
Frcd2 nfsd
+       Ffile /lib/systemd/system/nfs-blkmap.service
+       Ffile /lib/systemd/system/nfs-idmap.service
+       Ffile /lib/systemd/system/nfs-lock.service
+       Ffile /lib/systemd/system/nfs-mountd.service
+       Ffile /lib/systemd/system/nfs-rquotad.service
+       Ffile /lib/systemd/system/nfs-server.service
+       Ffile /lib/systemd/system/nfs.target
+       Ffile /lib/systemd/system/proc-fs-nfsd.mount
+       Ffile /lib/systemd/system/var-lib-nfs-rpc_pipefs.mount
+       Fexe /usr/libexec/nfs-lock.preconfig
+       Fexe /usr/libexec/nfs-server.preconfig
+       Fexe /usr/libexec/nfs-server.postconfig
+       Fgenscriptlet
}

# optimization OK
diff --git a/source/network-extra/nfs-utils/id_resolver.conf 
b/source/network-extra/nfs-utils/id_resolver.conf
new file mode 100644
index 0000000..67ccb18
--- /dev/null
+++ b/source/network-extra/nfs-utils/id_resolver.conf
@@ -0,0 +1,9 @@
+#
+# nfsidmap(5) - The NFS idmapper upcall program
+# Summary: Used by NFSv4 to map user/group ids into
+#          user/group names and names into in ids
+# Options:
+# -v         Increases the verbosity of the output to syslog
+# -t timeout Set the expiration timer, in seconds, on the key
+#
+create    id_resolver    *         *    /usr/sbin/nfsidmap %k %d
diff --git a/source/network-extra/nfs-utils/nfs 
b/source/network-extra/nfs-utils/nfs
deleted file mode 100644
index ba1ba12..0000000
--- a/source/network-extra/nfs-utils/nfs
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# /etc/sysconfig/nfs
-#
-# confiugation file for nfs-utils
-#
-
-# port to pin rpc.mountd to (leave it commented to let portmapper decide the 
port in run-time)
-#MOUNTDPORT=32777
-
-# vim: ft=sh
diff --git a/source/network-extra/nfs-utils/nfs-blkmap.service 
b/source/network-extra/nfs-utils/nfs-blkmap.service
new file mode 100644
index 0000000..7897bb2
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-blkmap.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=pNFS block layout mapping daemon
+Wants=var-lib-nfs-rpc_pipefs.mount
+Requires=var-lib-nfs-rpc_pipefs.mount
+
+[Service]
+Type=forking
+StandardError=syslog+console
+EnvironmentFile=-/etc/sysconfig/nfs
+ExecStart=/usr/sbin/blkmapd $BLKMAPDARGS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/source/network-extra/nfs-utils/nfs-idmap.service 
b/source/network-extra/nfs-utils/nfs-idmap.service
new file mode 100644
index 0000000..872ae09
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-idmap.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=NFSv4 ID-name mapping daemon
+BindTo=nfs-server.service
+After=nfs-server.service
+
+[Service]
+Type=forking
+StandardError=syslog+console
+EnvironmentFile=-/etc/sysconfig/nfs
+ExecStart=/usr/sbin/rpc.idmapd $RPCIDMAPDARGS
+
+[Install]
+WantedBy=nfs.target
diff --git a/source/network-extra/nfs-utils/nfs-lock.preconfig 
b/source/network-extra/nfs-utils/nfs-lock.preconfig
new file mode 100644
index 0000000..dbd6965
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-lock.preconfig
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+. /etc/sysconfig/nfs
+
+# Make sure lockd is loaded
+/sbin/modprobe -q lockd $LOCKDARG
+
+# See if the kernel lockd should start up
+# listening on a particular port
+#
+if [ -n "$LOCKD_TCPPORT" ]; then
+               /sbin/sysctl -w fs.nfs.nlm_tcpport=$LOCKD_TCPPORT >/dev/null 
2>&1
+fi
+if [ -n "$LOCKD_UDPPORT" ]; then
+               /sbin/sysctl -w fs.nfs.nlm_udpport=$LOCKD_UDPPORT >/dev/null 
2>&1
+fi
+
diff --git a/source/network-extra/nfs-utils/nfs-lock.service 
b/source/network-extra/nfs-utils/nfs-lock.service
new file mode 100644
index 0000000..33630f0
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-lock.service
@@ -0,0 +1,17 @@
+[Unit]
+Description=NFS file locking service.
+Requires=rpcbind.service network.target
+After=network.target named.service rpcbind.service
+Before=remote-fs-pre.target
+
+[Service]
+Type=forking
+StandardError=syslog+console
+EnvironmentFile=-/etc/sysconfig/nfs
+ExecStartPre=/usr/libexec/nfs-lock.preconfig
+ExecStart=/usr/sbin/rpc.statd $STATDARG
+# Make sure lockd's ports are reset
+ExecStopPost=-/sbin/sysctl -w fs.nfs.nlm_tcpport=0 fs.nfs.nlm_udpport=0
+
+[Install]
+WantedBy=multi-user.target
diff --git a/source/network-extra/nfs-utils/nfs-mountd.service 
b/source/network-extra/nfs-utils/nfs-mountd.service
new file mode 100644
index 0000000..430060a
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-mountd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=NFS Mount Daemon
+BindTo=nfs-server.service
+After=nfs-server.service
+
+[Service]
+Type=forking
+EnvironmentFile=-/etc/sysconfig/nfs
+ExecStart=/usr/sbin/rpc.mountd $RPCMOUNTDOPTS
+StandardError=syslog+console
+
+[Install]
+WantedBy=nfs.target
diff --git a/source/network-extra/nfs-utils/nfs-rquotad.service 
b/source/network-extra/nfs-utils/nfs-rquotad.service
new file mode 100644
index 0000000..ad1564d
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-rquotad.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=NFS Remote Quota Server
+BindTo=nfs-server.service
+After=nfs-server.service
+
+[Service]
+Type=forking
+StandardError=syslog+console
+EnvironmentFile=-/etc/sysconfig/nfs
+ExecStart=-/sbin/rpc.rquotad $RPCRQUOTADOPTS
+
+[Install]
+WantedBy=nfs.target
diff --git a/source/network-extra/nfs-utils/nfs-server.postconfig 
b/source/network-extra/nfs-utils/nfs-server.postconfig
new file mode 100644
index 0000000..6ff8a59
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-server.postconfig
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+. /etc/sysconfig/nfs
+
+#
+# Enabled the RDMA server support if configured to do so.
+#
+# Load the module and  then enable the server to listen
+# on the given port
+if [ -n "$RDMA_PORT" ]; then
+       /sbin/modprobe svcrdma
+       echo "rdma $RDMA_PORT" > /proc/fs/nfsd/portlist
+fi
+
+exit 0
diff --git a/source/network-extra/nfs-utils/nfs-server.preconfig 
b/source/network-extra/nfs-utils/nfs-server.preconfig
new file mode 100644
index 0000000..d965dbe
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-server.preconfig
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+. /etc/sysconfig/nfs
+
+# Set v4 grace period if requested
+if [ -n "$NFSD_V4_GRACE" ]; then
+       echo "$NFSD_V4_GRACE" > /proc/fs/nfsd/nfsv4gracetime
+fi
+
+exit 0
diff --git a/source/network-extra/nfs-utils/nfs-server.service 
b/source/network-extra/nfs-utils/nfs-server.service
new file mode 100644
index 0000000..2b79a31
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs-server.service
@@ -0,0 +1,21 @@
+[Unit]
+Description=NFS Server
+Requires=proc-fs-nfsd.mount var-lib-nfs-rpc_pipefs.mount rpcbind.service
+Requires=nfs-idmap.service nfs-mountd.service nfs-rquotad.service
+After=network.target named.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+StandardError=syslog+console
+EnvironmentFile=-/etc/sysconfig/nfs
+ExecStartPre=/usr/libexec/nfs-server.preconfig
+ExecStartPre=/usr/sbin/exportfs -r
+ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS ${RPCNFSDCOUNT}
+ExecStartPost=-/usr/libexec/nfs-server.postconfig
+ExecStop=/usr/sbin/rpc.nfsd 0
+ExecStopPost=/usr/sbin/exportfs -f
+
+[Install]
+WantedBy=multi-user.target
+
diff --git a/source/network-extra/nfs-utils/nfs.sysconfig 
b/source/network-extra/nfs-utils/nfs.sysconfig
new file mode 100644
index 0000000..4e74975
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs.sysconfig
@@ -0,0 +1,34 @@
+#
+# Optinal options passed to rquotad
+RPCRQUOTADOPTS=""
+#
+# 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=8
+# Set V4 grace period in seconds
+#NFSD_V4_GRACE=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 rpc.idmapd. See rpc.idmapd(8)
+RPCIDMAPDARGS=""
+#
+# To enable RDMA support on the server by setting this to
+# the port the server should listen on
+#RDMA_PORT=20049
+#
+# Optional arguments passed to blkmapd. See blkmapd(8)
+BLKMAPDARGS=""
diff --git a/source/network-extra/nfs-utils/nfs.target 
b/source/network-extra/nfs-utils/nfs.target
new file mode 100644
index 0000000..6c3262a
--- /dev/null
+++ b/source/network-extra/nfs-utils/nfs.target
@@ -0,0 +1,7 @@
+[Unit]
+Description=Network File System Server
+Requires=var-lib-nfs-rpc_pipefs.mount proc-fs-nfsd.mount rpcbind.service
+After=network.target named.service
+
+[Install]
+WantedBy=multi-user.target
diff --git a/source/network-extra/nfs-utils/proc-fs-nfsd.mount 
b/source/network-extra/nfs-utils/proc-fs-nfsd.mount
new file mode 100644
index 0000000..e5ee6fb
--- /dev/null
+++ b/source/network-extra/nfs-utils/proc-fs-nfsd.mount
@@ -0,0 +1,8 @@
+[Unit]
+Description=RPC Pipe File System
+DefaultDependencies=no
+
+[Mount]
+What=sunrpc
+Where=/proc/fs/nfsd
+Type=nfsd
diff --git a/source/network-extra/nfs-utils/var-lib-nfs-rpc_pipefs.mount 
b/source/network-extra/nfs-utils/var-lib-nfs-rpc_pipefs.mount
new file mode 100644
index 0000000..d27e1a2
--- /dev/null
+++ b/source/network-extra/nfs-utils/var-lib-nfs-rpc_pipefs.mount
@@ -0,0 +1,8 @@
+[Unit]
+Description=RPC Pipe File System
+DefaultDependencies=no
+
+[Mount]
+What=sunrpc
+Where=/var/lib/nfs/rpc_pipefs
+Type=rpc_pipefs
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to