diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/Manifest b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/Manifest index c36c94e4db..a754d26a5c 100644 --- a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/Manifest +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/Manifest @@ -1 +1,2 @@ -DIST nfs-utils-2.5.4.tar.bz2 943373 BLAKE2B 72ed871613701f5b035941a7aed957771fe3b6a19fefee203130442c292bbbefde35721f2287fef19046d2d837faeda43b06a93a5acdb8ac6240eef90e6dd12c SHA512 b1395c5b06a06246666c48174594b1e08b71cf40b8f94b533497bd92625401a669e2c40e48dbd665891ad2247bc94d7d604d0c5d0f0b66bfe957b03d42e5d305 +DIST nfs-utils-2.6.4.tar.bz2 979652 BLAKE2B 45f6e9c98e8148e82684526c2ab0f8976b2a46fd869d91f03cf9afffbaad64b77dc1729a50b74d30c5d65bfe213a1da2f54e3d3e19539b61994f7b65671a26ab SHA512 e5fde25c54f594d00e69c9aeff8abc22663b994ecd37d8516751be98b51b12c61ffec47ee128794e170ec773f0649cb594df1ca104ec4dba561823db423f8533 +DIST nfs-utils-2.7.1.tar.bz2 1001424 BLAKE2B 176c5559c23c2761c1f2beed068fda8bdd39ac9fa09b4b223552c1455152c410d8925adf8d0023300d4355338e9dc8f6b2774ba71488e795945e5f1fee2b305c SHA512 9e55d4a0d672dbb0e20f8ea0213355a0bec054124c2a9437b3e4b81214c24ef5adb43914bd8606d4af14801ec8e6a4f849c9a97d76ae0879566792bbc960845a diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/exports b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/exports new file mode 100644 index 0000000000..5102ef27c1 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/exports @@ -0,0 +1 @@ +# /etc/exports: NFS file systems being exported. See exports(5). diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.5.4-kernel-5.3-nfsv4.patch b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.5.4-kernel-5.3-nfsv4.patch deleted file mode 100644 index c9a543191b..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.5.4-kernel-5.3-nfsv4.patch +++ /dev/null @@ -1,32 +0,0 @@ -https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commitdiff;h=feb3dfc7127cf1337530ccb06ed90e818b026a07#patch1 -https://bugzilla.redhat.com/show_bug.cgi?id=1979816 -https://bugs.gentoo.org/808183 - -Slightly rebased by sam@ to account for version.h moving around. - -From feb3dfc7127cf1337530ccb06ed90e818b026a07 Mon Sep 17 00:00:00 2001 -From: Steve Dickson -Date: Wed, 22 Sep 2021 11:31:56 -0400 -Subject: [PATCH] mountd: only do NFSv4 logging on supported kernels. - -Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1979816 -Signed-off-by: Steve Dickson ---- a/support/export/v4clients.c -+++ b/support/export/v4clients.c -@@ -10,6 +10,7 @@ - #include - #include - #include "export.h" -+#include "../../utils/mount/version.h" - - /* search.h declares 'struct entry' and nfs_prot.h - * does too. Easiest fix is to trick search.h into -@@ -23,6 +24,8 @@ static int clients_fd = -1; - - void v4clients_init(void) - { -+ if (linux_version_code() < MAKE_VERSION(5, 3, 0)) -+ return; - if (clients_fd >= 0) - return; - clients_fd = inotify_init1(IN_NONBLOCK); diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.6.4-C99-inline.patch b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.6.4-C99-inline.patch new file mode 100644 index 0000000000..2797249523 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.6.4-C99-inline.patch @@ -0,0 +1,26 @@ +C99 `inline` is not guaranteed to emit an external definition +https://www.greenend.org.uk/rjk/tech/inline.html +Bug: https://bugs.gentoo.org/922958 + +--- a/utils/exportd/exportd.c ++++ b/utils/exportd/exportd.c +@@ -53,7 +53,7 @@ + */ + inline static void set_signals(void); + +-inline void ++inline static void + cleanup_lockfiles (void) + { + unlink(etab.lockfn); +--- a/utils/mountd/mountd.c ++++ b/utils/mountd/mountd.c +@@ -111,7 +111,7 @@ + nfs_svc_unregister(MOUNTPROG, MOUNTVERS_NFSV3); + } + +-static void ++inline static void + cleanup_lockfiles (void) + { + unlink(etab.lockfn); diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.6.4-includes.patch b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.6.4-includes.patch new file mode 100644 index 0000000000..0312ac1a8b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-2.6.4-includes.patch @@ -0,0 +1,41 @@ +https://bugs.gentoo.org/922373 +https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=bb25f3f594ddf85e5826e931eaaa35874f6a4204 + +From bb25f3f594ddf85e5826e931eaaa35874f6a4204 Mon Sep 17 00:00:00 2001 +From: Petr Vorel +Date: Wed, 3 Jan 2024 19:07:43 -0500 +Subject: [PATCH] reexport/{fsidd,reexport}.c: Re-add missing includes + +Older uClibc-ng requires for close(2), unlink(2) and write(2), + for struct sockaddr_un. + +Fixes: 1a4edb2a ("reexport/fsidd.c: Remove unused headers") +Fixes: bdc79f02 ("support/reexport.c: Remove unused headers") + +Reviewed-by: Giulio Benetti +Tested-by: Giulio Benetti +Signed-off-by: Petr Vorel +Signed-off-by: Steve Dickson +--- a/support/reexport/fsidd.c ++++ b/support/reexport/fsidd.c +@@ -7,6 +7,8 @@ + #include + #endif + #include ++#include ++#include + + #include "conffile.h" + #include "reexport_backend.h" +--- a/support/reexport/reexport.c ++++ b/support/reexport/reexport.c +@@ -7,6 +7,7 @@ + #endif + #include + #include ++#include + #include + + #include "nfsd_path.h" +-- +1.8.3.1 diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-udev-sysctl.patch b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-udev-sysctl.patch new file mode 100644 index 0000000000..156a3067bb --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils-udev-sysctl.patch @@ -0,0 +1,32 @@ +Gentoo installs sysctl in /usr/sbin + +https://bugs.gentoo.org/907688 + +--- a/systemd/60-nfs.rules ++++ b/systemd/60-nfs.rules +@@ -2,20 +2,20 @@ + + # sunrpc module supports "sunrpc.*" sysctls + ACTION=="add", SUBSYSTEM=="module", KERNEL=="sunrpc", \ +- RUN+="/sbin/sysctl -q --pattern ^sunrpc --system" ++ RUN+="/usr/sbin/sysctl -q --pattern ^sunrpc --system" + + # rpcrdma module supports sunrpc.svc_rdma.* + ACTION=="add", SUBSYSTEM=="module", KERNEL=="rpcrdma", \ +- RUN+="/sbin/sysctl -q --pattern ^sunrpc.svc_rdma --system" ++ RUN+="/usr/sbin/sysctl -q --pattern ^sunrpc.svc_rdma --system" + + # lockd module supports "fs.nfs.nlm*" and "fs.nfs.nsm*" sysctls + ACTION=="add", SUBSYSTEM=="module", KERNEL=="lockd", \ +- RUN+="/sbin/sysctl -q --pattern ^fs.nfs.n[sl]m --system" ++ RUN+="/usr/sbin/sysctl -q --pattern ^fs.nfs.n[sl]m --system" + + # nfsv4 module supports "fs.nfs.*" sysctls (nfs_callback_tcpport and idmap_cache_timeout) + ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfsv4", \ +- RUN+="/sbin/sysctl -q --pattern ^fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout) --system" ++ RUN+="/usr/sbin/sysctl -q --pattern ^fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout) --system" + + # nfs module supports "fs.nfs.*" sysctls + ACTION=="add", SUBSYSTEM=="module", KERNEL=="nfs", \ +- RUN+="/sbin/sysctl -q --pattern ^fs.nfs --system" ++ RUN+="/usr/sbin/sysctl -q --pattern ^fs.nfs --system" diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils.conf b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils.conf deleted file mode 100644 index 02737e2f51..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs-utils.conf +++ /dev/null @@ -1,9 +0,0 @@ -d /var/lib/nfs/rpc_pipefs -d /var/lib/nfs/v4recovery -d /var/lib/nfs/v4root -C /var/lib/nfs/etab - - - - /usr/lib64/nfs/etab -C /var/lib/nfs/rmtab - - - - /usr/lib64/nfs/rmtab -C /var/lib/nfs/sm - - - - /usr/lib64/nfs/sm -C /var/lib/nfs/sm.bak - - - - /usr/lib64/nfs/sm.bak -C /var/lib/nfs/state - - - - /usr/lib64/nfs/state -C /var/lib/nfs/xtab - - - - /usr/lib64/nfs/xtab diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs.initd b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs.initd new file mode 100644 index 0000000000..88a13a85db --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfs.initd @@ -0,0 +1,155 @@ +#!/sbin/openrc-run +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="reload" + +# The binary locations +exportfs=/usr/sbin/exportfs +mountd=/usr/sbin/rpc.mountd +nfsd=/usr/sbin/rpc.nfsd +smnotify=/usr/sbin/sm-notify + +depend() { + local myneed="" + # XXX: no way to detect NFSv4 is desired and so need rpc.idmapd + myneed="${myneed} $( + awk '!/^[[:space:]]*#/ { + # clear the path to avoid spurious matches + $1 = ""; + if ($0 ~ /[(][^)]*sec=(krb|spkm)[^)]*[)]/) { + print "rpc.svcgssd" + exit 0 + } + }' /etc/exports /etc/exports.d/*.exports 2>/dev/null + )" + config /etc/exports /etc/exports.d/*.exports + need portmap + need rpc.statd ${myneed} ${NFS_NEEDED_SERVICES} + use ypbind net dns rpc.rquotad rpc.idmapd rpc.svcgssd + after quota +} + +mkdir_nfsdirs() { + local d + for d in v4recovery v4root ; do + d="/var/lib/nfs/${d}" + [ ! -d "${d}" ] && mkdir -p "${d}" + done +} + +waitfor_exportfs() { + local pid=$1 + ( sleep ${EXPORTFS_TIMEOUT:-30}; kill -9 ${pid} 2>/dev/null ) & + wait $1 +} + +mount_nfsd() { + if [ -e /proc/modules ] ; then + # Make sure nfs support is loaded in the kernel #64709 + if ! grep -qs nfsd /proc/filesystems ; then + modprobe -q nfsd + fi + # Restart idmapd if needed #220747 + if grep -qs nfsd /proc/modules ; then + killall -q --signal=HUP rpc.idmapd + fi + fi + + # This is the new "kernel 2.6 way" to handle the exports file + if grep -qs nfsd /proc/filesystems ; then + if ! mountinfo -q /proc/fs/nfsd ; then + ebegin "Mounting nfsd filesystem in /proc" + mount -t nfsd -o nodev,noexec,nosuid nfsd /proc/fs/nfsd + eend $? + fi + + local o + for o in ${OPTS_NFSD} ; do + echo "${o#*=}" > "/proc/fs/nfsd/${o%%=*}" + done + fi +} + +start_it() { + ebegin "Starting NFS $1" + shift + "$@" + eend $? + ret=$((ret + $?)) +} +start() { + mount_nfsd + mkdir_nfsdirs + + # Exportfs likes to hang if networking isn't working. + # If that's the case, then try to kill it so the + # bootup process can continue. + if grep -qs '^[[:space:]]*"\?/' /etc/exports /etc/exports.d/*.exports ; then + ebegin "Exporting NFS directories" + ${exportfs} -r & + waitfor_exportfs $! + eend $? + fi + + local ret=0 + start_it mountd ${mountd} ${OPTS_RPC_MOUNTD} + start_it daemon ${nfsd} ${OPTS_RPC_NFSD} + [ -x "${smnotify}" ] && start_it smnotify ${smnotify} ${OPTS_SMNOTIFY} + return ${ret} +} + +stop() { + local ret=0 + + ebegin "Stopping NFS mountd" + start-stop-daemon --stop --exec ${mountd} + eend $? + ret=$((ret + $?)) + + ebegin "Stopping NFS daemon" + # Do not attempt to signal kernel nfsd threads directly, #924309 + ${nfsd} 0 + eend $? + ret=$((ret + $?)) + + # When restarting the NFS server, running "exportfs -ua" probably + # isn't what the user wants. Running it causes all entries listed + # in xtab to be removed from the kernel export tables, and the + # xtab file is cleared. This effectively shuts down all NFS + # activity, leaving all clients holding stale NFS filehandles, + # *even* when the NFS server has restarted. + # + # That's what you would want if you were shutting down the NFS + # server for good, or for a long period of time, but not when the + # NFS server will be running again in short order. In this case, + # then "exportfs -r" will reread the xtab, and all the current + # clients will be able to resume NFS activity, *without* needing + # to umount/(re)mount the filesystem. + if [ "${RC_CMD}" != "restart" ] ; then + ebegin "Unexporting NFS directories" + # Exportfs likes to hang if networking isn't working. + # If that's the case, then try to kill it so the + # shutdown process can continue. + ${exportfs} -ua & + waitfor_exportfs $! + eend $? + fi + + return ${ret} +} + +reload() { + # Exportfs likes to hang if networking isn't working. + # If that's the case, then try to kill it so the + # bootup process can continue. + ebegin "Reloading /etc/exports" + ${exportfs} -r 1>&2 & + waitfor_exportfs $! + eend $? +} + +restart() { + svc_stop + svc_start +} diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfsclient.initd b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfsclient.initd new file mode 100644 index 0000000000..e278cbde05 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/nfsclient.initd @@ -0,0 +1,34 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +depend() { + local opts myneed="" + if [ -e /etc/fstab ] ; then + for opts in $(fstabinfo -o -t nfs,nfs4) ; do + case $opts in + *sec=krb*|*sec=spkm*) myneed="$myneed rpc.gssd" ;; + esac + done + fi + config /etc/fstab + need portmap + need rpc.statd rpc.idmapd ${myneed} + use ypbind dns +} + +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 + return 0 +} diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.gssd.initd b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.gssd.initd new file mode 100644 index 0000000000..7bfe920b3d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.gssd.initd @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +depend() { + use ypbind net + need portmap + need 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/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.idmapd.initd b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.idmapd.initd new file mode 100644 index 0000000000..9cb36000b5 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.idmapd.initd @@ -0,0 +1,26 @@ +#!/sbin/openrc-run +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +rpc_bin=/usr/sbin/rpc.idmapd + +depend() { + use ypbind net + need portmap + need 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/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.pipefs.initd b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.pipefs.initd new file mode 100644 index 0000000000..f971a49b39 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.pipefs.initd @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +MNT="/var/lib/nfs/rpc_pipefs" + +mount_pipefs() { + local fstype=rpc_pipefs + + # if things are already mounted, nothing to do + mountinfo -q ${MNT} && return 0 + + # if rpc_pipefs is not available, try to load sunrpc for it #219566 + grep -qs ${fstype} /proc/filesystems || modprobe -q sunrpc + # if still not available, the `mount` will issue an error for the user + + # now just do it for kicks + mkdir -p ${MNT} + mount -t ${fstype} ${fstype} ${MNT} +} + +start() { + ebegin "Setting up RPC pipefs" + mount_pipefs + eend $? "make sure you have NFS/SUNRPC enabled in your kernel" +} + +stop() { + ebegin "Unmounting RPC pipefs" + umount ${MNT} + eend $? +} diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.statd.initd b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.statd.initd new file mode 100644 index 0000000000..ea78b9aef6 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.statd.initd @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +rpc_bin=/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/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.svcgssd.initd b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.svcgssd.initd new file mode 100644 index 0000000000..11bc4265ed --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/files/rpc.svcgssd.initd @@ -0,0 +1,24 @@ +#!/sbin/openrc-run +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +[ -e /etc/conf.d/nfs ] && . /etc/conf.d/nfs + +depend() { + use ypbind net + need portmap + need 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 $? +} diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/metadata.xml b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/metadata.xml index f60293313f..d2ea9df1b5 100644 --- a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/metadata.xml +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/metadata.xml @@ -1,21 +1,20 @@ - - base-system@gentoo.org - Gentoo Base System - - - Enable NFS junction support in nfsref - Add ldap support - Link mount.nfs with libmount - Enable nfsdcld NFSv4 clientid tracking daemon - Enable support for newer nfsidmap helper - Enable support for NFSv4 - Enable support for NFSv4.1 - Support UUID lookups in rpc.mountd - - - nfs - + + base-system@gentoo.org + Gentoo Base System + + + Enable NFS junction support in nfsref + Add ldap support + Link mount.nfs with libmount + Enable support for NFSv2 and NFSv3 + Enable support for NFSv4 (includes NFSv4.1 and NFSv4.2) + Support UUID lookups in rpc.mountd + + + cpe:/a:linux-nfs:nfs-utils + nfs + diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.5.4-r3.ebuild b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.5.4-r3.ebuild deleted file mode 100644 index 45339e3660..0000000000 --- a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.5.4-r3.ebuild +++ /dev/null @@ -1,170 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -TMPFILES_OPTIONAL=1 -inherit autotools linux-info systemd tmpfiles - -DESCRIPTION="NFS client and server daemons" -HOMEPAGE="http://linux-nfs.org/" - -if [[ "${PV}" = *_rc* ]] ; then - MY_PV="$(ver_rs 1- -)" - SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz" - S="${WORKDIR}/${PN}-${PN}-${MY_PV}" -else - SRC_URI="mirror://sourceforge/nfs/${P}.tar.bz2" - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86" -fi - -LICENSE="GPL-2" -SLOT="0" -IUSE="caps ipv6 junction kerberos ldap +libmount nfsdcld +nfsidmap +nfsv4 nfsv41 sasl selinux tcpd +uuid" -REQUIRED_USE="kerberos? ( nfsv4 )" -RESTRICT="test" #315573 - -# kth-krb doesn't provide the right include -# files, and nfs-utils doesn't build against heimdal either, -# so don't depend on virtual/krb. -# (04 Feb 2005 agriffis) -COMMON_DEPEND=" - dev-db/sqlite:3 - dev-libs/libxml2 - net-libs/libtirpc:= - >=net-nds/rpcbind-0.2.4 - sys-fs/e2fsprogs - caps? ( sys-libs/libcap ) - ldap? ( - net-nds/openldap - sasl? ( - app-crypt/mit-krb5 - dev-libs/cyrus-sasl:2 - ) - ) - libmount? ( sys-apps/util-linux ) - nfsv4? ( - dev-libs/libevent:= - >=sys-apps/keyutils-1.5.9:= - kerberos? ( - >=net-libs/libtirpc-0.2.4-r1[kerberos] - app-crypt/mit-krb5 - ) - ) - nfsv41? ( - sys-fs/lvm2 - ) - tcpd? ( sys-apps/tcp-wrappers ) - uuid? ( sys-apps/util-linux )" -DEPEND="${COMMON_DEPEND} - elibc_musl? ( sys-libs/queue-standalone ) -" -RDEPEND="${COMMON_DEPEND} - !net-libs/libnfsidmap - !net-nds/portmap - ! id_resolver.conf - doins id_resolver.conf - fi - - dotmpfiles "${FILESDIR}"/nfs-utils.conf - - # Provide an empty xtab for compatibility with the old tmpfiles config. - touch "${ED}"/usr/$(get_libdir)/nfs/xtab - - # Maintain compatibility with the old gentoo systemd unit names, since nfs-utils has units upstream now. - dosym nfs-server.service "$(systemd_get_systemunitdir)"/nfsd.service - dosym nfs-idmapd.service "$(systemd_get_systemunitdir)"/rpc-idmapd.service - dosym nfs-mountd.service "$(systemd_get_systemunitdir)"/rpc-mountd.service -} diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.6.4-r11.ebuild b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.6.4-r11.ebuild new file mode 100644 index 0000000000..99425764d7 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.6.4-r11.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools linux-info systemd + +DESCRIPTION="NFS client and server daemons" +HOMEPAGE="http://linux-nfs.org/ https://git.linux-nfs.org/?p=steved/nfs-utils.git" + +if [[ ${PV} == *_rc* ]] ; then + MY_PV="$(ver_rs 1- -)" + SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${PN}-${MY_PV}" +else + SRC_URI="https://downloads.sourceforge.net/nfs/${P}.tar.bz2" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="caps junction kerberos ldap +libmount +nfsv3 +nfsv4 sasl selinux tcpd +uuid" +REQUIRED_USE="|| ( nfsv3 nfsv4 ) kerberos? ( nfsv4 )" +# bug #315573 +RESTRICT="test" + +# kth-krb doesn't provide the right include +# files, and nfs-utils doesn't build against heimdal either, +# so don't depend on virtual/krb. +# (04 Feb 2005 agriffis) +COMMON_DEPEND=" + dev-libs/libxml2 + net-libs/libtirpc:= + sys-fs/e2fsprogs + dev-db/sqlite:3 + dev-libs/libevent:= + caps? ( sys-libs/libcap ) + ldap? ( + net-nds/openldap:= + sasl? ( + app-crypt/mit-krb5 + dev-libs/cyrus-sasl:2 + ) + ) + libmount? ( sys-apps/util-linux ) + nfsv3? ( >=net-nds/rpcbind-0.2.4 ) + nfsv4? ( + >=sys-apps/keyutils-1.5.9:= + sys-fs/lvm2 + kerberos? ( + >=net-libs/libtirpc-0.2.4-r1[kerberos] + app-crypt/mit-krb5 + ) + ) + tcpd? ( sys-apps/tcp-wrappers ) + uuid? ( sys-apps/util-linux )" +DEPEND="${COMMON_DEPEND} + elibc_musl? ( sys-libs/queue-standalone ) +" +RDEPEND="${COMMON_DEPEND} + !net-libs/libnfsidmap + selinux? ( + sec-policy/selinux-rpc + nfsv3? ( sec-policy/selinux-rpcbind ) + ) +" +BDEPEND=" + net-libs/rpcsvc-proto + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.5.2-no-werror.patch + "${FILESDIR}"/${PN}-udev-sysctl.patch + "${FILESDIR}"/${P}-includes.patch + "${FILESDIR}"/${P}-C99-inline.patch +) + +pkg_setup() { + linux-info_pkg_setup + + if use nfsv4 && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then + ewarn "Your NFS server will be unable to track clients across server restarts!" + ewarn "Please enable ${HILITE}CONFIG_CRYPTO_MD5${NORMAL} in your kernel to" + ewarn "support the legacy, in-kernel client tracker." + fi +} + +src_prepare() { + default + + sed \ + -e "/^sbindir/s:= := \"${EPREFIX}\":g" \ + -i utils/*/Makefile.am || die + + eautoreconf +} + +src_configure() { + # Our DEPEND forces this. + export libsqlite3_cv_is_recent=yes + export ac_cv_header_keyutils_h=$(usex nfsv4) + + # SASL is consumed in a purely automagic way + export ac_cv_header_sasl_h=no + export ac_cv_header_sasl_sasl_h=$(usex sasl) + + local myeconfargs=( + --disable-static + --with-statedir="${EPREFIX}"/var/lib/nfs + --enable-tirpc + --with-tirpcinclude="${ESYSROOT}"/usr/include/tirpc/ + --with-pluginpath="${EPREFIX}"/usr/$(get_libdir)/libnfsidmap + --with-rpcgen + --with-systemd="$(systemd_get_systemunitdir)" + --without-gssglue + $(use_enable caps) + --enable-ipv6 + $(use_enable junction) + $(use_enable kerberos gss) + $(use_enable kerberos svcgss) + $(use_enable ldap) + $(use_enable libmount libmount-mount) + $(use_enable nfsv4) + $(use_enable nfsv4 nfsdcld) + $(use_enable nfsv4 nfsdcltrack) + $(use_enable nfsv4 nfsv41) + $(use_enable nfsv4 nfsv4server) + $(use_enable uuid) + $(use_with tcpd tcp-wrappers) + ) + econf "${myeconfargs[@]}" +} + +src_compile() { + # Remove compiled files bundled in the tarball + emake clean + + default +} + +src_install() { + default + rm linux-nfs/Makefile* || die + dodoc -r linux-nfs README + + # Don't overwrite existing xtab/etab, install the original + # versions somewhere safe... more info in pkg_postinst + keepdir /var/lib/nfs/{,sm,sm.bak} + mv "${ED}"/var/lib/nfs "${ED}"/usr/$(get_libdir)/ || die + + # Install some client-side binaries in /sbin + dodir /sbin + mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die + + if use nfsv4 ; then + insinto /etc + doins support/nfsidmap/idmapd.conf + + # Install a config file for idmappers in newer kernels. bug #415625 + insinto /etc/request-key.d + echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf + doins id_resolver.conf + fi + + insinto /etc + doins "${FILESDIR}"/exports + keepdir /etc/exports.d + + local f list=() + if use nfsv4 ; then + list+=( rpc.idmapd rpc.pipefs ) + use kerberos && list+=( rpc.gssd rpc.svcgssd ) + fi + + local sedexp=( -e '#placehoder' ) + use nfsv3 || sedexp+=( -e '/need portmap/d' ) + + mkdir -p "${T}/init.d" || die + for f in nfs nfsclient rpc.statd "${list[@]}" ; do + sed "${sedexp[@]}" "${FILESDIR}/${f}.initd" > "${T}/init.d/${f}" || die + doinitd "${T}/init.d/${f}" + done + + local systemd_systemunitdir="$(systemd_get_systemunitdir)" + sed -i \ + -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \ + "${ED}${systemd_systemunitdir}"/* || die + + # Remove legacy service if not requested (as it will be broken without rpcbind) + if ! use nfsv3; then + rm "${ED}${systemd_systemunitdir}/nfs-server.service" || die + fi + + # bug #368505 + keepdir /var/lib/nfs + # bug #603628 + keepdir /var/lib/nfs/v4recovery + + # No static archives + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + # Install default xtab and friends if there's none existing. In + # src_install we put them in /usr/lib/nfs for safe-keeping, but + # the daemons actually use the files in /var/lib/nfs. #30486 + local f + for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do + [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue + einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs" + cp -pPR "${f}" "${EROOT}"/var/lib/nfs/ + done +} diff --git a/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.7.1.ebuild b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.7.1.ebuild new file mode 100644 index 0000000000..955f9fbb2b --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/net-fs/nfs-utils/nfs-utils-2.7.1.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools linux-info systemd + +DESCRIPTION="NFS client and server daemons" +HOMEPAGE="http://linux-nfs.org/ https://git.linux-nfs.org/?p=steved/nfs-utils.git" + +if [[ ${PV} == *_rc* ]] ; then + MY_PV="$(ver_rs 1- -)" + SRC_URI="http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=snapshot;h=refs/tags/${PN}-${MY_PV};sf=tgz -> ${P}.tar.gz" + S="${WORKDIR}/${PN}-${PN}-${MY_PV}" +else + SRC_URI="https://downloads.sourceforge.net/nfs/${P}.tar.bz2" + KEYWORDS="~alpha amd64 arm arm64 hppa ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 ~sparc x86" +fi + +LICENSE="GPL-2" +SLOT="0" +IUSE="caps junction kerberos ldap +libmount +nfsv3 +nfsv4 sasl selinux tcpd +uuid" +REQUIRED_USE="|| ( nfsv3 nfsv4 ) kerberos? ( nfsv4 )" +# bug #315573 +RESTRICT="test" + +# kth-krb doesn't provide the right include +# files, and nfs-utils doesn't build against heimdal either, +# so don't depend on virtual/krb. +# (04 Feb 2005 agriffis) +COMMON_DEPEND=" + dev-libs/libxml2 + net-libs/libtirpc:= + sys-fs/e2fsprogs + dev-db/sqlite:3 + dev-libs/libevent:= + caps? ( sys-libs/libcap ) + ldap? ( + net-nds/openldap:= + sasl? ( + app-crypt/mit-krb5 + dev-libs/cyrus-sasl:2 + ) + ) + libmount? ( sys-apps/util-linux ) + nfsv3? ( >=net-nds/rpcbind-0.2.4 ) + nfsv4? ( + >=sys-apps/keyutils-1.5.9:= + sys-fs/lvm2 + kerberos? ( + >=net-libs/libtirpc-0.2.4-r1[kerberos] + app-crypt/mit-krb5 + ) + ) + tcpd? ( sys-apps/tcp-wrappers ) + uuid? ( sys-apps/util-linux )" +DEPEND="${COMMON_DEPEND} + elibc_musl? ( sys-libs/queue-standalone ) +" +RDEPEND="${COMMON_DEPEND} + !net-libs/libnfsidmap + selinux? ( + sec-policy/selinux-rpc + nfsv3? ( sec-policy/selinux-rpcbind ) + ) +" +BDEPEND=" + net-libs/rpcsvc-proto + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}"/${PN}-2.5.2-no-werror.patch + "${FILESDIR}"/${PN}-udev-sysctl.patch + "${FILESDIR}"/${PN}-2.6.4-C99-inline.patch +) + +pkg_setup() { + linux-info_pkg_setup + + if use nfsv4 && linux_config_exists && ! linux_chkconfig_present CRYPTO_MD5 ; then + ewarn "Your NFS server will be unable to track clients across server restarts!" + ewarn "Please enable CONFIG_CRYPTO_MD5 in your kernel to" + ewarn "support the legacy, in-kernel client tracker." + fi +} + +src_prepare() { + default + + sed \ + -e "/^sbindir/s:= := \"${EPREFIX}\":g" \ + -i utils/*/Makefile.am || die + + eautoreconf +} + +src_configure() { + # Our DEPEND forces this. + export libsqlite3_cv_is_recent=yes + export ac_cv_header_keyutils_h=$(usex nfsv4) + + # SASL is consumed in a purely automagic way + export ac_cv_header_sasl_h=no + export ac_cv_header_sasl_sasl_h=$(usex sasl) + + local myeconfargs=( + --disable-static + --with-statedir="${EPREFIX}"/var/lib/nfs + --enable-tirpc + --with-tirpcinclude="${ESYSROOT}"/usr/include/tirpc/ + --with-pluginpath="${EPREFIX}"/usr/$(get_libdir)/libnfsidmap + --with-rpcgen + --with-systemd="$(systemd_get_systemunitdir)" + --without-gssglue + $(use_enable caps) + --enable-ipv6 + $(use_enable junction) + $(use_enable kerberos gss) + $(use_enable kerberos svcgss) + $(use_enable ldap) + $(use_enable libmount libmount-mount) + $(use_enable nfsv4) + $(use_enable nfsv4 nfsdcld) + $(use_enable nfsv4 nfsdcltrack) + $(use_enable nfsv4 nfsv41) + $(use_enable nfsv4 nfsv4server) + $(use_enable uuid) + $(use_with kerberos krb5 "${ESYSROOT}"/usr) + $(use_with tcpd tcp-wrappers) + ) + econf "${myeconfargs[@]}" +} + +src_compile() { + # Remove compiled files bundled in the tarball + emake clean + + default +} + +src_install() { + default + rm linux-nfs/Makefile* || die + dodoc -r linux-nfs README + + # Don't overwrite existing xtab/etab, install the original + # versions somewhere safe... more info in pkg_postinst + keepdir /var/lib/nfs/{,sm,sm.bak} + mv "${ED}"/var/lib/nfs "${ED}"/usr/$(get_libdir)/ || die + + # Install some client-side binaries in /sbin + dodir /sbin + mv "${ED}"/usr/sbin/rpc.statd "${ED}"/sbin/ || die + + if use nfsv4 ; then + insinto /etc + doins support/nfsidmap/idmapd.conf + + # Install a config file for idmappers in newer kernels. bug #415625 + insinto /etc/request-key.d + echo 'create id_resolver * * /usr/sbin/nfsidmap -t 600 %k %d' > id_resolver.conf + doins id_resolver.conf + fi + + insinto /etc + doins "${FILESDIR}"/exports + keepdir /etc/exports.d + + local f list=() + if use nfsv4 ; then + list+=( rpc.idmapd rpc.pipefs ) + use kerberos && list+=( rpc.gssd rpc.svcgssd ) + fi + + local sedexp=( -e '#placehoder' ) + use nfsv3 || sedexp+=( -e '/need portmap/d' ) + + mkdir -p "${T}/init.d" || die + for f in nfs nfsclient rpc.statd "${list[@]}" ; do + sed "${sedexp[@]}" "${FILESDIR}/${f}.initd" > "${T}/init.d/${f}" || die + doinitd "${T}/init.d/${f}" + done + + local systemd_systemunitdir="$(systemd_get_systemunitdir)" + sed -i \ + -e 's:/usr/sbin/rpc.statd:/sbin/rpc.statd:' \ + "${ED}${systemd_systemunitdir}"/* || die + + # Remove legacy service if not requested (as it will be broken without rpcbind) + if ! use nfsv3; then + rm "${ED}${systemd_systemunitdir}/nfs-server.service" || die + fi + + # bug #368505 + keepdir /var/lib/nfs + # bug #603628 + keepdir /var/lib/nfs/v4recovery + + # No static archives + find "${ED}" -name '*.la' -delete || die +} + +pkg_postinst() { + # Install default xtab and friends if there's none existing. In + # src_install we put them in /usr/lib/nfs for safe-keeping, but + # the daemons actually use the files in /var/lib/nfs. #30486 + local f + for f in "${EROOT}"/usr/$(get_libdir)/nfs/*; do + [[ -e ${EROOT}/var/lib/nfs/${f##*/} ]] && continue + einfo "Copying default ${f##*/} from ${EPREFIX}/usr/$(get_libdir)/nfs to ${EPREFIX}/var/lib/nfs" + cp -pPR "${f}" "${EROOT}"/var/lib/nfs/ + done +}