From e72251b70ee82ded94af6a233a805a2a1918faba Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 5 Oct 2011 09:06:17 +0200 Subject: [PATCH] nfs-utils: Fixed PAGE_SIZE problem. It's not exported in arm. --- nfs-utils/.footprint | 66 +++++++++++++++++++++++ nfs-utils/.md5sum | 6 +++ nfs-utils/Pkgfile | 33 ++++++++++++ nfs-utils/exports | 5 ++ nfs-utils/idmapd.conf | 13 +++++ nfs-utils/nfs | 32 +++++++++++ nfs-utils/nfs-utils-1.2.5_PAGE_SIZE.patch | 11 ++++ nfs-utils/nfsserver | 39 ++++++++++++++ 8 files changed, 205 insertions(+) create mode 100644 nfs-utils/.footprint create mode 100644 nfs-utils/.md5sum create mode 100644 nfs-utils/Pkgfile create mode 100644 nfs-utils/exports create mode 100644 nfs-utils/idmapd.conf create mode 100644 nfs-utils/nfs create mode 100644 nfs-utils/nfs-utils-1.2.5_PAGE_SIZE.patch create mode 100644 nfs-utils/nfsserver diff --git a/nfs-utils/.footprint b/nfs-utils/.footprint new file mode 100644 index 0000000..31a55f9 --- /dev/null +++ b/nfs-utils/.footprint @@ -0,0 +1,66 @@ +drwxr-xr-x root/root etc/ +-rw-r--r-- root/root etc/exports +drwxr-xr-x root/root etc/exports.d/ +-rw-r--r-- root/root etc/idmapd.conf +drwxr-xr-x root/root etc/rc.d/ +-rwxr-xr-x root/root etc/rc.d/nfs +-rwxr-xr-x root/root etc/rc.d/nfsserver +drwxr-xr-x root/root sbin/ +-r-s--x--x root/root sbin/mount.nfs +lrwxrwxrwx root/root sbin/mount.nfs4 -> mount.nfs +lrwxrwxrwx root/root sbin/umount.nfs -> mount.nfs +lrwxrwxrwx root/root sbin/umount.nfs4 -> mount.nfs +drwxr-xr-x root/root usr/ +drwxr-xr-x root/root usr/man/ +drwxr-xr-x root/root usr/man/man5/ +-rw-r--r-- root/root usr/man/man5/exports.5.gz +-rw-r--r-- root/root usr/man/man5/nfs.5.gz +drwxr-xr-x root/root usr/man/man7/ +-rw-r--r-- root/root usr/man/man7/nfsd.7.gz +drwxr-xr-x root/root usr/man/man8/ +-rw-r--r-- root/root usr/man/man8/blkmapd.8.gz +-rw-r--r-- root/root usr/man/man8/exportfs.8.gz +-rw-r--r-- root/root usr/man/man8/idmapd.8.gz +-rw-r--r-- root/root usr/man/man8/mount.nfs.8.gz +-rw-r--r-- root/root usr/man/man8/mountd.8.gz +-rw-r--r-- root/root usr/man/man8/mountstats.8.gz +-rw-r--r-- root/root usr/man/man8/nfsd.8.gz +-rw-r--r-- root/root usr/man/man8/nfsidmap.8.gz +-rw-r--r-- root/root usr/man/man8/nfsiostat.8.gz +-rw-r--r-- root/root usr/man/man8/nfsstat.8.gz +lrwxrwxrwx root/root usr/man/man8/rpc.idmapd.8.gz -> idmapd.8.gz +lrwxrwxrwx root/root usr/man/man8/rpc.mountd.8.gz -> mountd.8.gz +lrwxrwxrwx root/root usr/man/man8/rpc.nfsd.8.gz -> nfsd.8.gz +lrwxrwxrwx root/root usr/man/man8/rpc.sm-notify.8.gz -> sm-notify.8.gz +lrwxrwxrwx root/root usr/man/man8/rpc.statd.8.gz -> statd.8.gz +-rw-r--r-- root/root usr/man/man8/rpcdebug.8.gz +-rw-r--r-- root/root usr/man/man8/showmount.8.gz +-rw-r--r-- root/root usr/man/man8/sm-notify.8.gz +-rw-r--r-- root/root usr/man/man8/statd.8.gz +-rw-r--r-- root/root usr/man/man8/umount.nfs.8.gz +drwxr-xr-x root/root usr/sbin/ +-rwxr-xr-x root/root usr/sbin/blkmapd +-rwxr-xr-x root/root usr/sbin/exportfs +-rwxr-xr-x root/root usr/sbin/mountstats +-rwxr-xr-x root/root usr/sbin/nfsidmap +-rwxr-xr-x root/root usr/sbin/nfsiostat +-rwxr-xr-x root/root usr/sbin/nfsstat +-rwxr-xr-x root/root usr/sbin/rpc.idmapd +-rwxr-xr-x root/root usr/sbin/rpc.mountd +-rwxr-xr-x root/root usr/sbin/rpc.nfsd +-rwxr-xr-x root/root usr/sbin/rpc.statd +-rwxr-xr-x root/root usr/sbin/rpcdebug +-rwxr-xr-x root/root usr/sbin/showmount +-rwxr-xr-x root/root usr/sbin/sm-notify +-rwxr-xr-x root/root usr/sbin/start-statd +drwxr-xr-x root/root var/ +drwxr-xr-x root/root var/lib/ +drwxr-xr-x root/root var/lib/nfs/ +-rw-r--r-- root/root var/lib/nfs/etab (EMPTY) +-rw-r--r-- root/root var/lib/nfs/rmtab (EMPTY) +drwxr-xr-x root/root var/lib/nfs/rpc_pipefs/ +drwx------ nobody/root var/lib/nfs/sm.bak/ +drwx------ nobody/root var/lib/nfs/sm/ +-rw------- nobody/root var/lib/nfs/state (EMPTY) +drwxr-xr-x root/root var/lib/nfs/v4recovery/ +-rw-r--r-- root/root var/lib/nfs/xtab (EMPTY) diff --git a/nfs-utils/.md5sum b/nfs-utils/.md5sum new file mode 100644 index 0000000..cfe0701 --- /dev/null +++ b/nfs-utils/.md5sum @@ -0,0 +1,6 @@ +c5ccf58f5f9f57aba75c8b72219eb6e6 exports +167ea3a16eb6f33b3642e920147bb265 idmapd.conf +b5ce905faebc7f12e50f04d8a9574fe3 nfs +8395ac770720b83c5c469f88306d7765 nfs-utils-1.2.5.tar.bz2 +30cc37aa961d40ef9f697388d8fa65ea nfs-utils-1.2.5_PAGE_SIZE.patch +071bb2c4e2104599f0bba55a8ce35f37 nfsserver diff --git a/nfs-utils/Pkgfile b/nfs-utils/Pkgfile new file mode 100644 index 0000000..57c7c6b --- /dev/null +++ b/nfs-utils/Pkgfile @@ -0,0 +1,33 @@ +# Description: NFS utilities +# URL: http://nfs.sourceforge.net/ +# Maintainer: Juergen Daubert, jue at crux dot nu +# Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu +# Depends on: util-linux-ng tcp_wrappers libcap rpcbind libnfsidmap libevent keyutils + +name=nfs-utils +version=1.2.5 +release=1 +source=(http://downloads.sourceforge.net/project/nfs/$name/$version/$name-$version.tar.bz2 \ + exports idmapd.conf nfs nfsserver $name-${version}_PAGE_SIZE.patch) + +build () { + cd $name-$version + + patch -p1 -i $SRC/$name-${version}_PAGE_SIZE.patch + ./configure --prefix=/usr \ + --mandir=/usr/man \ + --sysconfdir=/etc \ + --with-statedir=/var/lib/nfs \ + --disable-gss \ + --with-tcp-wrappers + make + make DESTDIR=$PKG install + + install -D -m 755 $SRC/nfs $PKG/etc/rc.d/nfs + install -D -m 755 $SRC/nfsserver $PKG/etc/rc.d/nfsserver + install -D -m 644 $SRC/exports $PKG/etc/exports + install -D -m 644 $SRC/idmapd.conf $PKG/etc/idmapd.conf + + install -d $PKG/var/lib/nfs/{rpc_pipefs,v4recovery} + install -d $PKG/etc/exports.d +} diff --git a/nfs-utils/exports b/nfs-utils/exports new file mode 100644 index 0000000..1f16101 --- /dev/null +++ b/nfs-utils/exports @@ -0,0 +1,5 @@ +# +# /etc/exports: access control list for exported filesystems. See exports(5). +# + +# End of file diff --git a/nfs-utils/idmapd.conf b/nfs-utils/idmapd.conf new file mode 100644 index 0000000..0d39bab --- /dev/null +++ b/nfs-utils/idmapd.conf @@ -0,0 +1,13 @@ +# +# /etc/idmapd.conf: configuration file for idmapd, see idmapd.conf(5) +# + +[General] +Verbosity = 0 +Pipefs-Directory = /var/lib/nfs/rpc_pipefs + +[Mapping] +Nobody-User = nobody +Nobody-Group = nobody + +# End of file diff --git a/nfs-utils/nfs b/nfs-utils/nfs new file mode 100644 index 0000000..9392eea --- /dev/null +++ b/nfs-utils/nfs @@ -0,0 +1,32 @@ +#!/bin/sh +# +# /etc/rc.d/nfs: start/stop nfs client +# + +PIPEFS=/var/lib/nfs/rpc_pipefs + +case $1 in +start) + /bin/mount -t rpc_pipefs rpc_pipefs $PIPEFS + /usr/sbin/sm-notify + /usr/sbin/rpc.idmapd + /usr/sbin/rpc.statd + /bin/mount -a -t nfs + ;; +stop) + /bin/umount -a -t nfs + killall -q /usr/sbin/rpc.statd + killall -q /usr/sbin/rpc.idmapd + /bin/umount $PIPEFS + ;; +restart) + $0 stop + sleep 2 + $0 start + ;; +*) + echo "usage: $0 [start|stop|restart]" + ;; +esac + +# End of file diff --git a/nfs-utils/nfs-utils-1.2.5_PAGE_SIZE.patch b/nfs-utils/nfs-utils-1.2.5_PAGE_SIZE.patch new file mode 100644 index 0000000..b63acc6 --- /dev/null +++ b/nfs-utils/nfs-utils-1.2.5_PAGE_SIZE.patch @@ -0,0 +1,11 @@ +--- nfs-utils-1.2.5/utils/blkmapd/device-process.c_orig 2011-10-05 08:45:08.315683126 +0200 ++++ nfs-utils-1.2.5/utils/blkmapd/device-process.c 2011-10-05 08:45:32.955689997 +0200 +@@ -296,7 +296,7 @@ + off_t stripe_unit = vol->param.bv_stripe_unit; + /* Check limitations imposed by device-mapper */ + if ((stripe_unit & (stripe_unit - 1)) != 0 +- || stripe_unit < (off_t) (PAGE_SIZE >> 9)) ++ || stripe_unit < (off_t) (sysconf(_SC_PAGE_SIZE) >> 9)) + return -EIO; + BLK_READBUF(p, end, 4); + READ32(vol->bv_vol_n); diff --git a/nfs-utils/nfsserver b/nfs-utils/nfsserver new file mode 100644 index 0000000..18d65e6 --- /dev/null +++ b/nfs-utils/nfsserver @@ -0,0 +1,39 @@ +#!/bin/sh +# +# /etc/rc.d/nfsserver: start/stop nfs server +# + +NFSD=/proc/fs/nfsd +PIPEFS=/var/lib/nfs/rpc_pipefs + +case $1 in +start) + /bin/mount -t nfsd nfsd $NFSD + /bin/mount -t rpc_pipefs rpc_pipefs $PIPEFS + /usr/sbin/rpc.idmapd + /usr/sbin/exportfs -a + /usr/sbin/rpc.mountd + /usr/sbin/rpc.statd --no-notify + /usr/sbin/rpc.nfsd --syslog 8 + /usr/sbin/sm-notify + ;; +stop) + killall -q -2 nfsd + killall -q /usr/sbin/rpc.statd + killall -q /usr/sbin/rpc.mountd + /usr/sbin/exportfs -au + killall -q /usr/sbin/rpc.idmapd + /bin/umount $PIPEFS + /bin/umount $NFSD + ;; +restart) + $0 stop + sleep 2 + $0 start + ;; +*) + echo "usage: $0 [start|stop|restart]" + ;; +esac + +# End of file -- 2.26.2