diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-07-01 14:50:52 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-07-01 14:54:34 +0000 |
commit | 2f83a67e9d5929f0a678cf9d8cc3a33b470a86f3 (patch) | |
tree | 416072b0f818d3d4e1a7007d714d973149c61e16 /main | |
parent | 5c86f55307beee498cfe5c79678fe492a90e7a1a (diff) | |
download | aports-2f83a67e9d5929f0a678cf9d8cc3a33b470a86f3.tar.bz2 aports-2f83a67e9d5929f0a678cf9d8cc3a33b470a86f3.tar.xz |
main/nfs-utils: upgrade to 1.2.2 and use rpcbind
fixes #249
Diffstat (limited to 'main')
-rw-r--r-- | main/nfs-utils/APKBUILD | 41 | ||||
-rw-r--r-- | main/nfs-utils/nfs.initd | 6 | ||||
-rw-r--r-- | main/nfs-utils/nfsmount.initd | 42 | ||||
-rw-r--r-- | main/nfs-utils/rpc.gssd.initd | 24 | ||||
-rw-r--r-- | main/nfs-utils/rpc.idmapd.initd | 26 | ||||
-rw-r--r-- | main/nfs-utils/rpc.pipefs.initd | 24 | ||||
-rw-r--r-- | main/nfs-utils/rpc.statd.initd | 33 | ||||
-rw-r--r-- | main/nfs-utils/rpc.svcgssd.initd | 24 |
8 files changed, 208 insertions, 12 deletions
diff --git a/main/nfs-utils/APKBUILD b/main/nfs-utils/APKBUILD index 4807e752ca..45e1c89e8d 100644 --- a/main/nfs-utils/APKBUILD +++ b/main/nfs-utils/APKBUILD @@ -1,28 +1,39 @@ # Contributor: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=nfs-utils -pkgver=1.2.0 -pkgrel=3 +pkgver=1.2.2 +pkgrel=0 pkgdesc="kernel-mode NFS" url="http://nfs.sourceforge.net/" license="GPL" -depends="portmap" -makedepends="e2fsprogs-dev" +depends="rpcbind" +makedepends="util-linux-ng-dev libtirpc-dev libcap-dev" subpackages="$pkgname-doc rpcgen" source="http://downloads.sourceforge.net/nfs/$pkgname-$pkgver.tar.bz2 nfs.initd + nfsmount.initd + rpc.gssd.initd + rpc.idmapd.initd + rpc.pipefs.initd + rpc.statd.initd + rpc.svcgssd.initd + nfs.confd nfs.exports nfs-utils-no-exec.patch nfs-utils-mtab-sym.patch" -build() { +prepare() { cd "$srcdir/$pkgname-$pkgver" - for i in "$srcdir"/*.patch; do msg "Applying $i" patch -p0 -i "${i}" || return 1 done + sed -i -e '/^#include <libio.h>/d' support/include/sockaddr.h +} + +build() { + cd "$srcdir/$pkgname-$pkgver" ./configure --prefix=/usr \ --sysconfdir=/etc \ @@ -43,7 +54,13 @@ package() { cd "$srcdir/$pkgname-$pkgver" make -j1 DESTDIR="$pkgdir" install - install -m755 -D "$srcdir"/nfs.initd "$pkgdir"/etc/init.d/nfs + for i in nfs rpc.gssd rpc.pipefs rpc.svcgssd nfsmount rpc.idmapd \ + rpc.statd; do + install -m755 -D "$srcdir"/$i.initd "$pkgdir"/etc/init.d/$i \ + || return 1 + done + + install -m644 -D "$srcdir"/nfs.confd "$pkgdir"/etc/conf.d/nfs install -m644 -D "$srcdir"/nfs.exports "$pkgdir"/etc/exports } @@ -54,8 +71,14 @@ rpcgen() { install -m755 -D tools/rpcgen/rpcgen "$subpkgdir"/usr/bin/rpcgen } -md5sums="779cf81044e92cb51ad590960e7b3671 nfs-utils-1.2.0.tar.bz2 -23240b9ab44ef7d6b6c437c0ae34915d nfs.initd +md5sums="dad92f64db3266c7757f71bb53ee8f35 nfs-utils-1.2.2.tar.bz2 +f1873e0441b8c3b4b90023c038d755ec nfs.initd +d514fb87ce5de9909f43d99012352f09 nfsmount.initd +144b0e1f7d32265abe4c499a47af6154 rpc.gssd.initd +650f68e51a02ba84c272960fc302c445 rpc.idmapd.initd +80772890099fafdb8af3d6dd3db242c2 rpc.pipefs.initd +37fdb069a5fcabea507012497bb95c53 rpc.statd.initd +20e71ab412555b2dc9b50f346f68e5c8 rpc.svcgssd.initd 09135438d6df50b868bbe5a2260f973c nfs.confd 4f1bb7b2412ce5952ecb5ec22d8ed99d nfs.exports 5e0963b0889e779ff36af0299d17d6cb nfs-utils-no-exec.patch diff --git a/main/nfs-utils/nfs.initd b/main/nfs-utils/nfs.initd index ba3920e422..6f6ba98ceb 100644 --- a/main/nfs-utils/nfs.initd +++ b/main/nfs-utils/nfs.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.18 2009/02/27 01:41:55 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfs.initd,v 1.19 2009/05/30 22:01:43 vapier Exp $ opts="reload" @@ -23,9 +23,9 @@ depend() { fi fi config /etc/exports - need portmap rpc.statd ${myneed} + need portmap rpc.statd ${myneed} ${NFS_NEEDED_SERVICES} use ypbind net dns rpc.rquotad rpc.idmapd rpc.svcgssd - after firewall quota + after quota } mkdir_nfsdirs() { diff --git a/main/nfs-utils/nfsmount.initd b/main/nfs-utils/nfsmount.initd new file mode 100644 index 0000000000..9ae2c520d2 --- /dev/null +++ b/main/nfs-utils/nfsmount.initd @@ -0,0 +1,42 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/nfsmount.initd,v 1.13 2009/01/31 22:15:02 vapier Exp $ + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +depend() { + local myneed="" + if [ -e /etc/fstab ] ; then + awk '!/^[[:space:]]*#/ && $3 == "nfs4" { exit ($4 ~ /sec=krb/ ? 10 : 20) }' /etc/fstab + local ret=$? + [ ${ret} -eq 10 ] && myneed="${myneed} rpc.gssd" + [ ${ret} -eq 20 ] && myneed="${myneed} rpc.idmapd" + fi + config /etc/fstab + need net portmap rpc.statd ${myneed} + use ypbind dns rpc.idmapd rpc.gssd +} + +start() { + if [ -x /usr/sbin/sm-notify ] ; then + ebegin "Starting NFS sm-notify" + /usr/sbin/sm-notify ${OPTS_SMNOTIFY} + eend $? + fi + + # Make sure nfs support is loaded in the kernel #64709 + if [ -e /proc/modules ] && ! grep -qs 'nfs$' /proc/filesystems ; then + modprobe -q nfs + fi + + ebegin "Mounting NFS filesystems" + mount -a -t nfs,nfs4 + eend $? +} + +stop() { + ebegin "Unmounting NFS filesystems" + umount -a -t nfs,nfs4 + eend $? +} diff --git a/main/nfs-utils/rpc.gssd.initd b/main/nfs-utils/rpc.gssd.initd new file mode 100644 index 0000000000..f1b8f87745 --- /dev/null +++ b/main/nfs-utils/rpc.gssd.initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.gssd.initd,v 1.11 2008/10/26 09:02:47 vapier Exp $ + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +depend() { + use ypbind net + need portmap rpc.pipefs + after quota +} + +start() { + ebegin "Starting gssd" + start-stop-daemon --start --exec /usr/sbin/rpc.gssd -- ${OPTS_RPC_GSSD} + eend $? +} + +stop() { + ebegin "Stopping gssd" + start-stop-daemon --stop --exec /usr/sbin/rpc.gssd + eend $? +} diff --git a/main/nfs-utils/rpc.idmapd.initd b/main/nfs-utils/rpc.idmapd.initd new file mode 100644 index 0000000000..52838b5da7 --- /dev/null +++ b/main/nfs-utils/rpc.idmapd.initd @@ -0,0 +1,26 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.idmapd.initd,v 1.8 2009/03/14 18:43:18 vapier Exp $ + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +rpc_bin=/usr/sbin/rpc.idmapd + +depend() { + use ypbind net + need portmap rpc.pipefs + after quota +} + +start() { + ebegin "Starting idmapd" + ${rpc_bin} ${OPTS_RPC_IDMAPD} + eend $? "make sure DNOTIFY support is enabled ..." +} + +stop() { + ebegin "Stopping idmapd" + start-stop-daemon --stop --exec ${rpc_bin} + eend $? +} diff --git a/main/nfs-utils/rpc.pipefs.initd b/main/nfs-utils/rpc.pipefs.initd new file mode 100644 index 0000000000..701ac77892 --- /dev/null +++ b/main/nfs-utils/rpc.pipefs.initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.pipefs.initd,v 1.1 2008/10/26 09:02:47 vapier Exp $ + +mount_pipefs() { + # if rpc_pipefs is not available, try to load sunrpc for it #219566 + grep -qs rpc_pipefs /proc/filesystems || modprobe -q sunrpc + # if still not available, let's bail + grep -qs rpc_pipefs /proc/filesystems || return 1 + + # now just do it for kicks + mkdir -p /var/lib/nfs/rpc_pipefs + mount -t rpc_pipefs rpc_pipefs /var/lib/nfs/rpc_pipefs +} + +start() { + # if things are already mounted, let's just return + grep -qs "rpc_pipefs /var/lib/nfs/rpc_pipefs" /proc/mounts && return 0 + + ebegin "Mounting RPC pipefs" + mount_pipefs + eend $? +} diff --git a/main/nfs-utils/rpc.statd.initd b/main/nfs-utils/rpc.statd.initd new file mode 100644 index 0000000000..b19e5a3881 --- /dev/null +++ b/main/nfs-utils/rpc.statd.initd @@ -0,0 +1,33 @@ +#!/sbin/runscript +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.statd.initd,v 1.7 2009/01/31 22:16:11 vapier Exp $ + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +rpc_bin=/usr/sbin/rpc.statd +rpc_pid=/var/run/rpc.statd.pid + +depend() { + use ypbind net + need portmap + after quota +} + +start() { + # Don't start rpc.statd if already started by someone else ... + # Don't try and kill it if it's already dead ... + if killall -q -0 ${rpc_bin} ; then + return 0 + fi + + ebegin "Starting NFS statd" + start-stop-daemon --start --exec ${rpc_bin} -- --no-notify ${OPTS_RPC_STATD} + eend $? +} + +stop() { + ebegin "Stopping NFS statd" + start-stop-daemon --stop --exec ${rpc_bin} --pidfile /var/run/rpc.statd.pid + eend $? +} diff --git a/main/nfs-utils/rpc.svcgssd.initd b/main/nfs-utils/rpc.svcgssd.initd new file mode 100644 index 0000000000..74383e24db --- /dev/null +++ b/main/nfs-utils/rpc.svcgssd.initd @@ -0,0 +1,24 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/nfs-utils/files/rpc.svcgssd.initd,v 1.5 2008/10/26 09:02:47 vapier Exp $ + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +depend() { + use ypbind net + need portmap rpc.pipefs + after quota +} + +start() { + ebegin "Starting svcgssd" + start-stop-daemon --start --exec /usr/sbin/rpc.svcgssd -- ${OPTS_RPC_SVCGSSD} + eend $? +} + +stop() { + ebegin "Stopping svcgssd" + start-stop-daemon --stop --exec /usr/sbin/rpc.svcgssd + eend $? +} |