diff --git a/0005-modprobe-avoid-error-messages-if-sbin-sysctl-fail.patch b/0005-modprobe-avoid-error-messages-if-sbin-sysctl-fail.patch deleted file mode 100644 index 9eb5722..0000000 --- a/0005-modprobe-avoid-error-messages-if-sbin-sysctl-fail.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 040fc30d6d7684526c1556f20bc6bfec6b1c82ed Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Mon, 11 Jul 2022 13:25:38 +1000 -Subject: [PATCH] modprobe: avoid error messages if /sbin/sysctl fail - -If /sbin/sysctl fails, for example if it is not installed, then the -install line does not fail but we can still get an error message in the -logs, which could be annoying. - -So hide any such error message - send it to /dev/null - -Signed-off-by: NeilBrown ---- - systemd/50-nfs.conf | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - ---- a/systemd/50-nfs.conf -+++ b/systemd/50-nfs.conf -@@ -1,16 +1,16 @@ - # Ensure all NFS systctl settings get applied when modules load - - # sunrpc module supports "sunrpc.*" sysctls --install sunrpc /sbin/modprobe --ignore-install sunrpc $CMDLINE_OPTS && { /sbin/sysctl -q --pattern sunrpc --system; exit 0; } -+install sunrpc /sbin/modprobe --ignore-install sunrpc $CMDLINE_OPTS && { /sbin/sysctl 2> /dev/null -q --pattern sunrpc --system; exit 0; } - - # rpcrdma module supports sunrpc.svc_rdma.* --install rpcrdma /sbin/modprobe --ignore-install rpcrdma $CMDLINE_OPTS && { /sbin/sysctl -q --pattern sunrpc.svc_rdma --system; exit 0; } -+install rpcrdma /sbin/modprobe --ignore-install rpcrdma $CMDLINE_OPTS && { /sbin/sysctl 2> /dev/null -q --pattern sunrpc.svc_rdma --system; exit 0; } - - # lockd module supports "fs.nfs.nlm*" and "fs.nfs.nsm*" sysctls --install lockd /sbin/modprobe --ignore-install lockd $CMDLINE_OPTS && { /sbin/sysctl -q --pattern fs.nfs.n[sl]m --system; exit 0; } -+install lockd /sbin/modprobe --ignore-install lockd $CMDLINE_OPTS && { /sbin/sysctl 2> /dev/null -q --pattern fs.nfs.n[sl]m --system; exit 0; } - - # nfsv4 module supports "fs.nfs.*" sysctls (nfs_callback_tcpport and idmap_cache_timeout) --install nfsv4 /sbin/modprobe --ignore-install nfsv4 $CMDLINE_OPTS && { /sbin/sysctl -q --pattern 'fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout)' --system; exit 0; } -+install nfsv4 /sbin/modprobe --ignore-install nfsv4 $CMDLINE_OPTS && { /sbin/sysctl 2> /dev/null -q --pattern 'fs.nfs.(nfs_callback_tcpport|idmap_cache_timeout)' --system; exit 0; } - - # nfs module supports "fs.nfs.*" sysctls --install nfs /sbin/modprobe --ignore-install nfs $CMDLINE_OPTS && { /sbin/sysctl -q --pattern fs.nfs --system; exit 0; } -+install nfs /sbin/modprobe --ignore-install nfs $CMDLINE_OPTS && { /sbin/sysctl 2> /dev/null -q --pattern fs.nfs --system; exit 0; } diff --git a/0006-nfsd-allow-server-scope-to-be-set-with-config-or-com.patch b/0006-nfsd-allow-server-scope-to-be-set-with-config-or-com.patch deleted file mode 100644 index ea5a6ac..0000000 --- a/0006-nfsd-allow-server-scope-to-be-set-with-config-or-com.patch +++ /dev/null @@ -1,141 +0,0 @@ -From 580ac005d11ddb9a9622e380ba8e947ad743a38f Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Mon, 21 Nov 2022 14:24:00 -0500 -Subject: [PATCH] nfsd: allow server scope to be set with config or command - line. - -NFSv4.1 and later require the server to report a "scope". Servers with -the same scope are expected to understand each other's state ids etc, -though may not accept them - this ensure there can be no -misunderstanding. This is helpful for migration. - -Servers with different scope are known to be different and if a server -appears to change scope on a restart, lock recovery must not be -attempted. - -It is important for fail-over configurations to have the same scope for -all server instances. Linux NFSD sets scope to host name. It is common -for fail-over configurations to use different host names on different -server nodes. So the default is not good for these configurations and -must be over-ridden. - -As discussed in - https://github.com/ClusterLabs/resource-agents/issues/1644 -some HA management tools attempt to address this with calls to "unshare" -and "hostname" before running "rpc.nfsd". This is unnecessarily -cumbersome. - -This patch adds a "-S" command-line option and nfsd.scope config value -so that the scope can be set easily for nfsd. - -Signed-off-by: NeilBrown -Signed-off-by: Steve Dickson ---- - systemd/nfs.conf.man | 1 + - utils/nfsd/nfsd.c | 17 ++++++++++++++++- - utils/nfsd/nfsd.man | 13 ++++++++++++- - 3 files changed, 29 insertions(+), 2 deletions(-) - ---- a/systemd/nfs.conf.man -+++ b/systemd/nfs.conf.man -@@ -166,6 +166,7 @@ for details. - Recognized values: - .BR threads , - .BR host , -+.BR scope , - .BR port , - .BR grace-time , - .BR lease-time , ---- a/utils/nfsd/nfsd.c -+++ b/utils/nfsd/nfsd.c -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - - #include "conffile.h" - #include "nfslib.h" -@@ -39,6 +40,7 @@ static void usage(const char *); - static struct option longopts[] = - { - { "host", 1, 0, 'H' }, -+ { "scope", 1, 0, 'S'}, - { "help", 0, 0, 'h' }, - { "no-nfs-version", 1, 0, 'N' }, - { "nfs-version", 1, 0, 'V' }, -@@ -69,6 +71,7 @@ main(int argc, char **argv) - int count = NFSD_NPROC, c, i, error = 0, portnum, fd, found_one; - char *p, *progname, *port, *rdma_port = NULL; - char **haddr = NULL; -+ char *scope = NULL; - int hcounter = 0; - struct conf_list *hosts; - int socket_up = 0; -@@ -168,8 +171,9 @@ main(int argc, char **argv) - hcounter++; - } - } -+ scope = conf_get_str("nfsd", "scope"); - -- while ((c = getopt_long(argc, argv, "dH:hN:V:p:P:stTuUrG:L:", longopts, NULL)) != EOF) { -+ while ((c = getopt_long(argc, argv, "dH:S:hN:V:p:P:stTuUrG:L:", longopts, NULL)) != EOF) { - switch(c) { - case 'd': - xlog_config(D_ALL, 1); -@@ -190,6 +194,9 @@ main(int argc, char **argv) - haddr[hcounter] = optarg; - hcounter++; - break; -+ case 'S': -+ scope = optarg; -+ break; - case 'P': /* XXX for nfs-server compatibility */ - case 'p': - /* only the last -p option has any effect */ -@@ -367,6 +374,14 @@ main(int argc, char **argv) - if (lease > 0) - nfssvc_set_time("lease", lease); - -+ if (scope) { -+ if (unshare(CLONE_NEWUTS) < 0 || -+ sethostname(scope, strlen(scope)) < 0) { -+ xlog(L_ERROR, "Unable to set server scope: %m"); -+ error = -1; -+ goto out; -+ } -+ } - i = 0; - do { - error = nfssvc_set_sockets(protobits, haddr[i], port); ---- a/utils/nfsd/nfsd.man -+++ b/utils/nfsd/nfsd.man -@@ -35,9 +35,17 @@ Note that - .B lockd - (which performs file locking services for NFS) may still accept - request on all known network addresses. This may change in future --releases of the Linux Kernel. This option can be used multiple time -+releases of the Linux Kernel. This option can be used multiple times - to listen to more than one interface. - .TP -+.B \S " or " \-\-scope scope -+NFSv4.1 and later require the server to report a "scope" which is used -+by the clients to detect if two connections are to the same server. -+By default Linux NFSD uses the host name as the scope. -+.sp -+It is particularly important for high-availablity configurations to ensure -+that all potential server nodes report the same server scope. -+.TP - .B \-p " or " \-\-port port - specify a different port to listen on for NFS requests. By default, - .B rpc.nfsd -@@ -134,6 +142,9 @@ will listen on. Use of the - .B --host - option replaces all host names listed here. - .TP -+.B scope -+Set the server scope. -+.TP - .B grace-time - The grace time, for both NFSv4 and NLM, in seconds. - .TP diff --git a/0007-mount.nfs-always-include-mountpoint-or-spec-if-error.patch b/0007-mount.nfs-always-include-mountpoint-or-spec-if-error.patch deleted file mode 100644 index eb9cc7a..0000000 --- a/0007-mount.nfs-always-include-mountpoint-or-spec-if-error.patch +++ /dev/null @@ -1,88 +0,0 @@ -From e6dc15cbe1e0171055765f329d2f2b6a65ea9635 Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Tue, 28 Mar 2023 13:49:57 +1100 -Subject: [PATCH] mount.nfs: always include mountpoint or spec if error - messages. - -If you try to mount from a server that is inaccessible you might get an -error like: - mount.nfs: No route to host - -This is OK when running "mount" interactively, but hardly useful when -found in system logs. - -This patch changes mount_error() to always included at least one of -mount_point and spec in any error message. - -Signed-off-by: NeilBrown ---- - utils/mount/error.c | 31 ++++++++++++++++--------------- - 1 file changed, 16 insertions(+), 15 deletions(-) - ---- a/utils/mount/error.c -+++ b/utils/mount/error.c -@@ -207,16 +207,17 @@ void mount_error(const char *spec, const - progname, spec); - break; - case EINVAL: -- nfs_error(_("%s: an incorrect mount option was specified"), progname); -+ nfs_error(_("%s: an incorrect mount option was specified for %s"), -+ progname, mount_point); - break; - case EOPNOTSUPP: -- nfs_error(_("%s: requested NFS version or transport protocol is not supported"), -- progname); -+ nfs_error(_("%s: requested NFS version or transport protocol is not supported for %s"), -+ progname, mount_point); - break; - case ENOTDIR: - if (spec) -- nfs_error(_("%s: mount spec %s or point %s is not a " -- "directory"), progname, spec, mount_point); -+ nfs_error(_("%s: mount spec %s or point %s is not a directory"), -+ progname, spec, mount_point); - else - nfs_error(_("%s: mount point %s is not a directory"), - progname, mount_point); -@@ -227,31 +228,31 @@ void mount_error(const char *spec, const - break; - case ENOENT: - if (spec) -- nfs_error(_("%s: mounting %s failed, " -- "reason given by server: %s"), -- progname, spec, strerror(error)); -+ nfs_error(_("%s: mounting %s failed, reason given by server: %s"), -+ progname, spec, strerror(error)); - else - nfs_error(_("%s: mount point %s does not exist"), -- progname, mount_point); -+ progname, mount_point); - break; - case ESPIPE: - rpc_mount_errors((char *)spec, 0, 0); - break; - case EIO: -- nfs_error(_("%s: mount system call failed"), progname); -+ nfs_error(_("%s: mount system call failed for %s"), -+ progname, mount_point); - break; - case EFAULT: -- nfs_error(_("%s: encountered unexpected error condition."), -- progname); -+ nfs_error(_("%s: encountered unexpected error condition for %s."), -+ progname, mount_point); - nfs_error(_("%s: please report the error to" PACKAGE_BUGREPORT), -- progname); -+ progname); - break; - case EALREADY: - /* Error message has already been provided */ - break; - default: -- nfs_error(_("%s: %s"), -- progname, strerror(error)); -+ nfs_error(_("%s: %s for %s on %s"), -+ progname, strerror(error), spec, mount_point); - } - } - diff --git a/0008-nfsd.man-fix-typo-in-section-on-scope.patch b/0008-nfsd.man-fix-typo-in-section-on-scope.patch deleted file mode 100644 index 4c62312..0000000 --- a/0008-nfsd.man-fix-typo-in-section-on-scope.patch +++ /dev/null @@ -1,23 +0,0 @@ -From e986a7c109cb25fe9de2de3e376ac6ed09d9dd12 Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Wed, 29 Mar 2023 09:08:32 +1100 -Subject: [PATCH] nfsd.man: fix typo in section on "scope". - -The missing "-" meant that "-S" isn't mentioned at all. - -Signed-off-by: NeilBrown ---- - utils/nfsd/nfsd.man | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/utils/nfsd/nfsd.man -+++ b/utils/nfsd/nfsd.man -@@ -38,7 +38,7 @@ request on all known network addresses. - releases of the Linux Kernel. This option can be used multiple times - to listen to more than one interface. - .TP --.B \S " or " \-\-scope scope -+.B \-S " or " \-\-scope scope - NFSv4.1 and later require the server to report a "scope" which is used - by the clients to detect if two connections are to the same server. - By default Linux NFSD uses the host name as the scope. diff --git a/nfs-utils-2.6.2.tar.xz b/nfs-utils-2.6.2.tar.xz deleted file mode 100644 index 0076e54..0000000 --- a/nfs-utils-2.6.2.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5200873e81c4d610e2462fc262fe18135f2dbe78b7979f95accd159ae64d5011 -size 716680 diff --git a/nfs-utils-2.6.3.tar.xz b/nfs-utils-2.6.3.tar.xz new file mode 100644 index 0000000..3aa444c --- /dev/null +++ b/nfs-utils-2.6.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38d89e853a71d3c560ff026af3d969d75e24f782ff68324e76261fe0344459e1 +size 726284 diff --git a/nfs-utils.changes b/nfs-utils.changes index 4441423..7936551 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Thu Apr 20 10:10:14 UTC 2023 - Petr Vorel + +- Update to version 2.6.3 + - https://kernel.org/pub/linux/utils/nfs-utils/2.6.3/2.6.3-Changelog +- Remove patches from this release: + - 0006-nfsd-allow-server-scope-to-be-set-with-config-or-com.patch + - 0007-mount.nfs-always-include-mountpoint-or-spec-if-error.patch + - 0008-nfsd.man-fix-typo-in-section-on-scope.patch +- Remove systemd/50-nfs.conf (was removed in upstream in d8d29f85) + and the realted patch (bsc#1200710). + 0005-modprobe-avoid-error-messages-if-sbin-sysctl-fail.patch. +- New file /usr/lib/udev/rules.d/60-nfs.rules (which replaced in upstream + systemd/50-nfs.conf in 9466df03). +- Add fsidd: + - /usr/lib/systemd/system/fsidd.service + - /usr/lib/udev/rules.d/60-nfs.rules + - /usr/sbin/fsidd + ------------------------------------------------------------------- Tue Mar 28 22:37:58 UTC 2023 - Neil Brown diff --git a/nfs-utils.spec b/nfs-utils.spec index 66dcd27..53f7fac 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -22,7 +22,7 @@ %endif Name: nfs-utils -Version: 2.6.2 +Version: 2.6.3 Release: 0 Summary: Support Utilities for Kernel nfsd License: GPL-2.0-or-later @@ -42,10 +42,6 @@ Source25: rpc-svcgssd.options.conf Source26: nfs.conf Source27: nfs-kernel-server.tmpfiles.conf Patch0: nfs-utils-1.0.7-bind-syntax.patch -Patch5: 0005-modprobe-avoid-error-messages-if-sbin-sysctl-fail.patch -Patch6: 0006-nfsd-allow-server-scope-to-be-set-with-config-or-com.patch -Patch7: 0007-mount.nfs-always-include-mountpoint-or-spec-if-error.patch -Patch8: 0008-nfsd.man-fix-typo-in-section-on-scope.patch BuildRequires: e2fsprogs-devel BuildRequires: gcc-c++ BuildRequires: libtool @@ -278,8 +274,10 @@ fi %{_sbindir}/blkmapd %{_sbindir}/rpc.svcgssd %{_sbindir}/nfsconf +%{_udevrulesdir}/60-nfs.rules %{_udevrulesdir}/99-nfs.rules %{_unitdir}/auth-rpcgss-module.service +%{_unitdir}/fsidd.service %{_unitdir}/nfs-blkmap.service %{_unitdir}/nfs-client.target %{_unitdir}/nfs-idmapd.service @@ -298,7 +296,6 @@ fi %dir %{_systemdgeneratordir} %{_systemdgeneratordir}/nfs-server-generator %{_systemdgeneratordir}/rpc-pipefs-generator -%{_modprobedir}/50-nfs.conf %{_mandir}/man5/idmapd.conf.5%{ext_man} %{_mandir}/man5/nfs.5%{ext_man} %{_mandir}/man5/nfs.conf.5%{ext_man} @@ -347,6 +344,7 @@ fi %{_unitdir}/proc-fs-nfsd.mount %{_prefix}/lib/tmpfiles.d/nfs-kernel-server.conf %{_sbindir}/exportfs +%{_sbindir}/fsidd %{_sbindir}/rcnfs-server %{_sbindir}/rpc.mountd %{_sbindir}/rpc.nfsd