Commit 2f83a67e authored by Natanael Copa's avatar Natanael Copa

main/nfs-utils: upgrade to 1.2.2 and use rpcbind

fixes #249
parent 5c86f553
# 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
......
#!/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() {
......
#!/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 $?
}
#!/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 $?
}
#!/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 $?
}
#!/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 $?
}
#!/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 $?
}
#!/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 $?
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment