From 15eddd925db762657fae2131d3d9d33888760757 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Thu, 10 Jan 2019 16:34:45 +0000 Subject: user/nfs-utils: new package --- user/nfs-utils/APKBUILD | 80 +++++++++++++ user/nfs-utils/exports | 1 + user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch | 39 +++++++ user/nfs-utils/nfs-utils.conf | 3 + user/nfs-utils/nfs.confd | 38 ++++++ user/nfs-utils/nfs.initd | 162 ++++++++++++++++++++++++++ user/nfs-utils/nfsclient.confd | 18 +++ user/nfs-utils/nfsclient.initd | 33 ++++++ user/nfs-utils/nfsmount.confd | 7 ++ user/nfs-utils/nfsmount.initd | 47 ++++++++ user/nfs-utils/posixish.patch | 71 +++++++++++ user/nfs-utils/rpc.gssd.initd | 23 ++++ user/nfs-utils/rpc.idmapd.initd | 25 ++++ user/nfs-utils/rpc.pipefs.initd | 32 +++++ user/nfs-utils/rpc.statd.initd | 32 +++++ user/nfs-utils/rpc.svcgssd.initd | 23 ++++ user/nfs-utils/undef-def.patch | 42 +++++++ 17 files changed, 676 insertions(+) create mode 100644 user/nfs-utils/APKBUILD create mode 100644 user/nfs-utils/exports create mode 100644 user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch create mode 100644 user/nfs-utils/nfs-utils.conf create mode 100644 user/nfs-utils/nfs.confd create mode 100644 user/nfs-utils/nfs.initd create mode 100644 user/nfs-utils/nfsclient.confd create mode 100644 user/nfs-utils/nfsclient.initd create mode 100644 user/nfs-utils/nfsmount.confd create mode 100644 user/nfs-utils/nfsmount.initd create mode 100644 user/nfs-utils/posixish.patch create mode 100644 user/nfs-utils/rpc.gssd.initd create mode 100644 user/nfs-utils/rpc.idmapd.initd create mode 100644 user/nfs-utils/rpc.pipefs.initd create mode 100644 user/nfs-utils/rpc.statd.initd create mode 100644 user/nfs-utils/rpc.svcgssd.initd create mode 100644 user/nfs-utils/undef-def.patch (limited to 'user/nfs-utils') diff --git a/user/nfs-utils/APKBUILD b/user/nfs-utils/APKBUILD new file mode 100644 index 000000000..5c2c06c70 --- /dev/null +++ b/user/nfs-utils/APKBUILD @@ -0,0 +1,80 @@ +# Contributor: A. Wilcox +# Maintainer: A. Wilcox +pkgname=nfs-utils +pkgver=2.3.3 +pkgrel=0 +pkgdesc="NFS file sharing client and server" +url="http://nfs.sourceforge.net/" +arch="all" +options="!check suid" # No functional test suite. +license="GPL-2.0-only" +depends="rpcbind" +makedepends="keyutils-dev krb5-dev libevent-dev libtirpc-dev lvm2-dev + rpcsvc-proto sqlite-dev util-linux-dev" +subpackages="$pkgname-doc $pkgname-openrc" +source="https://downloads.sourceforge.net/nfs/nfs-utils-$pkgver.tar.xz + nfs-utils-1.1.4-mtab-sym.patch + posixish.patch + undef-def.patch + + exports + nfs.confd nfs.initd nfsclient.confd nfsclient.initd nfsmount.confd + nfsmount.initd rpc.gssd.initd rpc.idmapd.initd rpc.pipefs.initd + rpc.statd.initd rpc.svcgssd.initd + " + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --enable-ipv6 \ + --enable-nfsv4 \ + --enable-nfsv41 \ + --enable-gss \ + --enable-svcgss \ + --with-statedir=/var/lib/nfs + make +} + +check() { + cd "$builddir" + make check +} + +package() { + local _initd _confd + cd "$builddir" + make DESTDIR="$pkgdir" install + + install -D -m644 "$srcdir"/exports "$pkgdir"/etc/exports + + for _initd in nfs nfsclient nfsmount rpc.gssd rpc.idmapd rpc.pipefs \ + rpc.statd rpc.svcgssd; do + install -D -m755 "$srcdir"/$_initd.initd "$pkgdir"/etc/init.d/$_initd + done + for _confd in nfs nfsclient nfsmount; do + install -D -m644 "$srcdir"/$_confd.confd "$pkgdir"/etc/conf.d/$_confd + done +} + +sha512sums="5025ccd7699ac1a0fdbd8b18ed8b33ea89230158320d809ec51e73f831100db75dceaddde481d911eeca9059caa521d155c2d14d014d75f091f432aad92a9716 nfs-utils-2.3.3.tar.xz +1cd916028a8515772f05ef63832d73a09e9720055aedc9e2e4ce3a08ce1820948700a4f00ca9c4ee684880f18e67aca888dd857fc7931d923021ba50964be998 nfs-utils-1.1.4-mtab-sym.patch +f0b87ff4229d96a46e3f0c17f87dcd3ce5c51651ee036d935c1481b421cd7e5b6a048a082b4f8115a969fe6e85cc871df7658bf5d80c480095b69f29fd6b085d posixish.patch +2e54efa2cac0522f549e8bed45147676d10b299b5060eda305da8767feb55d37627259196d89c295e8d5f4fbbb7c9e791a53dddd579187600f1717968049aa6a undef-def.patch +fd8052dc8e17eccb0bb1443f341c97ec7c9dac5824294cadf486d91475bc728d4bb69300034b528a690707520590f6675ee371f92e9838afc8ed88092ee0f220 exports +bc11b073735ee86c96b9c249ee187f4d16329c279a4e26760875059d2b5fa1d510ef3e4df5ee9dfb2a3133d755e1eb5c323d2fadc432a0cf630191ec353ac535 nfs.confd +f7feb79cfcab0478affb640d1e5ad059757c88d51cc790fd54cde2fd7ed2e3cfd8f7f4c2de993d99da03e8ce3bdfb2750a4cb997b850fe33d0ef76d9b91c9018 nfs.initd +f12e67728ac4e76357685e2fe38bd7f6fcd90064165758ffeca145e6962ac44d4ff9d8d57e18cc6925a6ada8e95ad8321e9fc355931a804dd455aae1e4850e92 nfsclient.confd +85078e2cd38b37a1e6fbaf0e40cf7690f403e71d9c8188d542d12fe56bfc02a49763c7bcc7742691754acc37928468c215db2795bebc29a5dfb052ba08f407bb nfsclient.initd +6e23897885cc33c49d9c7353b456585a1e0c7300822edba81bc48ba4ccc18297adce137260cc0aa9487aa5ef0aab3eecf931532cfa5bd40fd03bc9e0ddacfb28 nfsmount.confd +89259b9f0878658d48792b5b2f42b43c966ed098dba1fecf9e07fb0de4aab37ad67655ea8dbcc2361ddab2b5013b2de35a03048a513aaeedf790e4b416a35a54 nfsmount.initd +d9d7eeebbe153d3c4784112ed6d50734b5619b3315bb1454f8163de2b78ed8f958029a0e1088de58e9b1b8069184aeab2c8f19af4b957b6be25e4f138960aeac rpc.gssd.initd +f3e88038cb040ffcbca76166f4322d37e39da00d144bc0a17aed4467ab10c6e626fcde6c407d0911d135bfab55622ad2e38ed93788b11459c5882ce60577fb45 rpc.idmapd.initd +3d3fa6e7ae01e27d27d88aba1e307c5293dd1cbc9d555737e03c4f1e17988518f4f1e7f7a38a7337f8e8961e8378cc4611769b04db7368460589a3b218ac6d6b rpc.pipefs.initd +7f6baea852fff91b88e15e432ba19f9da0a3e3510b6f550b553912cf3887ce176280367b62bcce2a044730a075e4c1f6d7df1a669556d42725dea6e6e8e967ac rpc.statd.initd +819cce4ae0a0f26bc74ce546e149b98420584240a594c9bb4a0a49413750320bde050866f3753c499425ea8d8df094211fb1f7e020ce281791e1933e1bc6a47f rpc.svcgssd.initd" diff --git a/user/nfs-utils/exports b/user/nfs-utils/exports new file mode 100644 index 000000000..5102ef27c --- /dev/null +++ b/user/nfs-utils/exports @@ -0,0 +1 @@ +# /etc/exports: NFS file systems being exported. See exports(5). diff --git a/user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch b/user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch new file mode 100644 index 000000000..c9e60afc7 --- /dev/null +++ b/user/nfs-utils/nfs-utils-1.1.4-mtab-sym.patch @@ -0,0 +1,39 @@ +ripped from Debian + +--- nfs-utils-1.1.4/utils/mount/fstab.c ++++ nfs-utils-1.1.4/utils/mount/fstab.c +@@ -57,7 +57,7 @@ mtab_does_not_exist(void) { + return var_mtab_does_not_exist; + } + +-static int ++int + mtab_is_a_symlink(void) { + get_mtab_info(); + return var_mtab_is_a_symlink; +--- nfs-utils-1.1.4/utils/mount/fstab.h ++++ nfs-utils-1.1.4/utils/mount/fstab.h +@@ -7,6 +7,7 @@ + #define _PATH_FSTAB "/etc/fstab" + #endif + ++int mtab_is_a_symlink(void); + int mtab_is_writable(void); + int mtab_does_not_exist(void); + void reset_mtab_info(void); +--- nfs-utils-1.1.4/utils/mount/mount.c ++++ nfs-utils-1.1.4/utils/mount/mount.c +@@ -230,6 +230,13 @@ create_mtab (void) { + int flags; + mntFILE *mfp; + ++ /* Avoid writing if the mtab is a symlink to /proc/mounts, since ++ that would create a file /proc/mounts in case the proc filesystem ++ is not mounted, and the fchmod below would also fail. */ ++ if (mtab_is_a_symlink()) { ++ return EX_SUCCESS; ++ } ++ + lock_mtab(); + + mfp = nfs_setmntent (MOUNTED, "a+"); diff --git a/user/nfs-utils/nfs-utils.conf b/user/nfs-utils/nfs-utils.conf new file mode 100644 index 000000000..b9b586c2a --- /dev/null +++ b/user/nfs-utils/nfs-utils.conf @@ -0,0 +1,3 @@ +d /var/lib/nfs/rpc_pipefs +d /var/lib/nfs/v4recovery +d /var/lib/nfs/v4root diff --git a/user/nfs-utils/nfs.confd b/user/nfs-utils/nfs.confd new file mode 100644 index 000000000..9dc14058c --- /dev/null +++ b/user/nfs-utils/nfs.confd @@ -0,0 +1,38 @@ +# /etc/conf.d/nfs + +# If you wish to set the port numbers for lockd, +# please see /etc/sysctl.conf + +# Optional services to include in default `/etc/init.d/nfs start` +# For NFSv4 users, you'll want to add "rpc.idmapd" here. +NFS_NEEDED_SERVICES="" + +# Options to pass to rpc.nfsd +OPTS_RPC_NFSD="8" + +# Options to pass to rpc.mountd +# ex. OPTS_RPC_MOUNTD="-p 32767" +OPTS_RPC_MOUNTD="" + +# Options to pass to rpc.statd +# ex. OPTS_RPC_STATD="-p 32765 -o 32766" +OPTS_RPC_STATD="" + +# Options to pass to rpc.idmapd +OPTS_RPC_IDMAPD="" + +# Options to pass to rpc.gssd +OPTS_RPC_GSSD="" + +# Options to pass to rpc.svcgssd +OPTS_RPC_SVCGSSD="" + +# Options to pass to rpc.rquotad (requires sys-fs/quota) +OPTS_RPC_RQUOTAD="" + +# Timeout (in seconds) for exportfs +EXPORTFS_TIMEOUT=30 + +# Options to set in the nfsd filesystem (/proc/fs/nfsd/). +# Format is