From b343c51ea927e4be5b3dcc11ca36742cd615ce5eada5c1151d854189f9da8042 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Mon, 31 Jan 2022 08:07:26 +0000 Subject: [PATCH 1/4] Accepting request 950107 from home:pevik:branches:Base:System - Update to version 2.6.1 - https://kernel.org/pub/linux/utils/nfs-utils/2.6.1/2.6.1-Changelog - remove patches from this release: - 0001-gssd-fix-crash-in-debug-message.patch, - Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch OBS-URL: https://build.opensuse.org/request/show/950107 OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=249 --- 0001-gssd-fix-crash-in-debug-message.patch | 31 ------- ...-override-for-when-sbin-is-a-symlink.patch | 88 ------------------- nfs-utils-2.5.4.tar.xz | 3 - nfs-utils-2.6.1.tar.xz | 3 + nfs-utils.changes | 9 ++ nfs-utils.spec | 6 +- 6 files changed, 14 insertions(+), 126 deletions(-) delete mode 100644 0001-gssd-fix-crash-in-debug-message.patch delete mode 100644 Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch delete mode 100644 nfs-utils-2.5.4.tar.xz create mode 100644 nfs-utils-2.6.1.tar.xz diff --git a/0001-gssd-fix-crash-in-debug-message.patch b/0001-gssd-fix-crash-in-debug-message.patch deleted file mode 100644 index 8b2d86b..0000000 --- a/0001-gssd-fix-crash-in-debug-message.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 68c9ba2473d44d19795c5f81906852aef5a1500a Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Thu, 9 Sep 2021 15:37:03 +1000 -Subject: [PATCH] gssd: fix crash in debug message. - -A recent cleanup of debug messages added func and tid format specifiers -to a debug message (when full hostname was different), but the func name -and tid were NOT added as arguments. - -Consequently there weren't enough args, random bytes of the stack were -interpreted as a pointer, and rpc.gssd crashed (when -v was specified). - -Fixes: b538862a5135 ("gssd: Cleaned up debug messages") -Signed-off-by: NeilBrown ---- - utils/gssd/krb5_util.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - ---- a/utils/gssd/krb5_util.c -+++ b/utils/gssd/krb5_util.c -@@ -673,8 +673,8 @@ get_full_hostname(const char *inhost, ch - *c = tolower(*c); - - if (get_verbosity() && strcmp(inhost, outhost)) -- printerr(1, "%s(0x%0lx): inhost '%s' different than outhost'%s'\n", -- inhost, outhost); -+ printerr(1, "%s(0x%0lx): inhost '%s' different than outhost '%s'\n", -+ __func__, tid, inhost, outhost); - - retval = 0; - out: diff --git a/Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch b/Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch deleted file mode 100644 index df4686c..0000000 --- a/Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 49822c2130a2a6e1d5a9e414f5a0726a461d9b00 Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Mon, 25 Oct 2021 12:08:46 -0400 -Subject: [PATCH] Add --disable-sbin-override for when /sbin is a symlink - -mount.nfs* umount.nfs* and nfsdcltrack are currently always installed in -/sbin. - -Many distros are moving to a "merged /usr" where /sbin and others are -symlinks into /usr/sbin or similar. In these cases it is inelegant to -install in /sbin (i.e. install through a symlink). - -So we add "--disable-sbin-override" as a configure option. This causes -the same sbindir to be used for *mount.nfs* and nfsdcltrack as for other -system binaries. - -Note that autotools notices if we simply define "sbindir=/sbin" -inside an "if CONFIG_foo" clause, gives a warning, and defeats our -intent. - -So instead, we use the @CONFIG_SBIN_OVERRIDE_TRUE@ prefix to find -the new declaration when we don't want it. - -Signed-off-by: NeilBrown -Signed-off-by: Steve Dickson ---- - configure.ac | 6 ++++++ - utils/mount/Makefile.am | 8 +++++--- - utils/nfsdcltrack/Makefile.am | 9 ++++++--- - 3 files changed, 17 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index bc2d0f02979c..93626d62be40 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -187,6 +187,12 @@ else - enable_libmount=no - fi - -+AC_ARG_ENABLE(sbin-override, -+ [AC_HELP_STRING([--disable-sbin-override], -+ [Don't force nfsdcltrack and mount helpers into /sbin: always honour --sbindir])], -+ enable_sbin_override=$enableval, -+ enable_sbin_override=yes) -+ AM_CONDITIONAL(CONFIG_SBIN_OVERRIDE, [test "$enable_sbin_override" = "yes"]) - AC_ARG_ENABLE(junction, - [AC_HELP_STRING([--enable-junction], - [enable support for NFS junctions @<:@default=no@:>@])], -diff --git a/utils/mount/Makefile.am b/utils/mount/Makefile.am -index ad0be93b1def..3101f7abd7f4 100644 ---- a/utils/mount/Makefile.am -+++ b/utils/mount/Makefile.am -@@ -1,8 +1,10 @@ - ## Process this file with automake to produce Makefile.in - --# These binaries go in /sbin (not /usr/sbin), and that cannot be --# overridden at config time. --sbindir = /sbin -+# These binaries go in /sbin (not /usr/sbin), unless CONFIG_SBIN_OVERRIDE -+# is disabled as may be appropriate when /sbin is a symlink. -+# Note that we don't use "if CONFIG_SBIN_OVERRIDE" as that -+# causes autotools to notice the override and disable it. -+@CONFIG_SBIN_OVERRIDE_TRUE@sbindir = /sbin - - man8_MANS = mount.nfs.man umount.nfs.man - man5_MANS = nfs.man -diff --git a/utils/nfsdcltrack/Makefile.am b/utils/nfsdcltrack/Makefile.am -index 2f7fe3de6922..769e4a455fcf 100644 ---- a/utils/nfsdcltrack/Makefile.am -+++ b/utils/nfsdcltrack/Makefile.am -@@ -1,8 +1,11 @@ - ## Process this file with automake to produce Makefile.in - --# These binaries go in /sbin (not /usr/sbin), and that cannot be --# overridden at config time. The kernel "knows" the /sbin name. --sbindir = /sbin -+# These binaries go in /sbin (not /usr/sbin) as the kernel "knows" the -+# /sbin name. If /sbin is a symlink, CONFIG_SBIN_OVERRIDE can be -+# disabled to install in /usr/sbin anyway. -+# Note that we don't use "if CONFIG_SBIN_OVERRIDE" as that -+# causes autotools to notice the override and disable it. -+@CONFIG_SBIN_OVERRIDE_TRUE@sbindir = /sbin - - man8_MANS = nfsdcltrack.man - EXTRA_DIST = $(man8_MANS) --- -2.33.1 - diff --git a/nfs-utils-2.5.4.tar.xz b/nfs-utils-2.5.4.tar.xz deleted file mode 100644 index a61a1cd..0000000 --- a/nfs-utils-2.5.4.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:51997d94e4c8bcef5456dd36a9ccc38e231207c4e9b6a9a2c108841e6aebe3dd -size 703896 diff --git a/nfs-utils-2.6.1.tar.xz b/nfs-utils-2.6.1.tar.xz new file mode 100644 index 0000000..421df1e --- /dev/null +++ b/nfs-utils-2.6.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60dfcd94a9f3d72a12bc7058d811787ec87a6d593d70da2123faf9aad3d7a1df +size 701232 diff --git a/nfs-utils.changes b/nfs-utils.changes index f9cca78..91bb732 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Jan 31 07:24:41 UTC 2022 - Petr Vorel + +- Update to version 2.6.1 + - https://kernel.org/pub/linux/utils/nfs-utils/2.6.1/2.6.1-Changelog +- remove patches from this release: + - 0001-gssd-fix-crash-in-debug-message.patch, + - Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch + ------------------------------------------------------------------- Thu Oct 28 12:51:31 UTC 2021 - Callum Farmer diff --git a/nfs-utils.spec b/nfs-utils.spec index d5628a7..d4436b7 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,7 +1,7 @@ # # spec file for package nfs-utils # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -22,7 +22,7 @@ %endif Name: nfs-utils -Version: 2.5.4 +Version: 2.6.1 Release: 0 Summary: Support Utilities for Kernel nfsd License: GPL-2.0-or-later @@ -42,8 +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 -Patch1: 0001-gssd-fix-crash-in-debug-message.patch -Patch2: Add-disable-sbin-override-for-when-sbin-is-a-symlink.patch BuildRequires: e2fsprogs-devel BuildRequires: gcc-c++ From 188d5563b5c28cd93a51bcdc610bdcf309e0eb6604b856f9847eae5a86bde1ed Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 3 Mar 2022 10:16:37 +0000 Subject: [PATCH 2/4] Accepting request 958719 from home:marxin:branches:Base:System - Add gcc12-fix.patch upstream fix for GCC 12 compiler. OBS-URL: https://build.opensuse.org/request/show/958719 OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=250 --- gcc12-fix.patch | 36 ++++++++++++++++++++++++++++++++++++ nfs-utils.changes | 5 +++++ nfs-utils.spec | 1 + 3 files changed, 42 insertions(+) create mode 100644 gcc12-fix.patch diff --git a/gcc12-fix.patch b/gcc12-fix.patch new file mode 100644 index 0000000..f1698eb --- /dev/null +++ b/gcc12-fix.patch @@ -0,0 +1,36 @@ +From 7f8463fe702174bd613df9d308cc899af25ae02e Mon Sep 17 00:00:00 2001 +From: Steve Dickson +Date: Wed, 23 Feb 2022 15:19:51 -0500 +Subject: [PATCH] systemd: Fix format-overflow warning + +rpc-pipefs-generator.c:35:23: error: '%s' directive output between 0 and 2147483653 bytes may exceed minimum required size of 4095 [-Werror=format-overflow=] + 35 | sprintf(path, "%s/%s", dirname, pipefs_unit); + | ^ + +Signed-off-by: Steve Dickson +--- + systemd/rpc-pipefs-generator.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/systemd/rpc-pipefs-generator.c b/systemd/rpc-pipefs-generator.c +index c24db56..7b2bb4f 100644 +--- a/systemd/rpc-pipefs-generator.c ++++ b/systemd/rpc-pipefs-generator.c +@@ -28,11 +28,12 @@ static int generate_mount_unit(const char *pipefs_path, const char *pipefs_unit, + { + char *path; + FILE *f; ++ size_t size = (strlen(dirname) + 1 + strlen(pipefs_unit)); + +- path = malloc(strlen(dirname) + 1 + strlen(pipefs_unit)); ++ path = malloc(size); + if (!path) + return 1; +- sprintf(path, "%s/%s", dirname, pipefs_unit); ++ snprintf(path, size, "%s/%s", dirname, pipefs_unit); + f = fopen(path, "w"); + if (!f) + { +-- +1.8.3.1 + diff --git a/nfs-utils.changes b/nfs-utils.changes index 91bb732..0099ae6 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 3 10:08:47 UTC 2022 - Martin Liška + +- Add gcc12-fix.patch upstream fix for GCC 12 compiler. + ------------------------------------------------------------------- Mon Jan 31 07:24:41 UTC 2022 - Petr Vorel diff --git a/nfs-utils.spec b/nfs-utils.spec index d4436b7..c58dfbc 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -42,6 +42,7 @@ Source25: rpc-svcgssd.options.conf Source26: nfs.conf Source27: nfs-kernel-server.tmpfiles.conf Patch0: nfs-utils-1.0.7-bind-syntax.patch +Patch1: gcc12-fix.patch BuildRequires: e2fsprogs-devel BuildRequires: gcc-c++ From 3de30510a922b9ae8a8e16b9da34062e9541a17de07c9eea49d7f5fb93de86d1 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 8 Mar 2022 21:04:39 +0000 Subject: [PATCH 3/4] - add reenable-nfsv2.patch for reverting nfsv2 deprecation until test coverage is fixed OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=251 --- nfs-utils.changes | 6 +++++ nfs-utils.spec | 2 +- reenable-nfsv2.patch | 60 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 reenable-nfsv2.patch diff --git a/nfs-utils.changes b/nfs-utils.changes index 0099ae6..433c2a3 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 8 20:58:54 UTC 2022 - Dirk Müller + +- add reenable-nfsv2.patch for reverting nfsv2 deprecation until + test coverage is fixed + ------------------------------------------------------------------- Thu Mar 3 10:08:47 UTC 2022 - Martin Liška diff --git a/nfs-utils.spec b/nfs-utils.spec index c58dfbc..23b348f 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -43,7 +43,7 @@ Source26: nfs.conf Source27: nfs-kernel-server.tmpfiles.conf Patch0: nfs-utils-1.0.7-bind-syntax.patch Patch1: gcc12-fix.patch - +Patch2: reenable-nfsv2.patch BuildRequires: e2fsprogs-devel BuildRequires: gcc-c++ BuildRequires: libtool diff --git a/reenable-nfsv2.patch b/reenable-nfsv2.patch new file mode 100644 index 0000000..de57efd --- /dev/null +++ b/reenable-nfsv2.patch @@ -0,0 +1,60 @@ +This reverts https://git.kernel.org/pub/scm/linux/kernel/git/rw/nfs-utils.git/commit/?id=2c2c36c59fa1de2ff7fd28917e54700ecb39b730 +and https://git.kernel.org/pub/scm/linux/kernel/git/rw/nfs-utils.git/commit/?id=2c2c36c59fa1de2ff7fd28917e54700ecb39b730 + +as openqa is still testing NFSv2 +see https://progress.opensuse.org/issues/106679 + +--- nfs-utils-2.6.1.orig/utils/mount/configfile.c ++++ nfs-utils-2.6.1/utils/mount/configfile.c +@@ -71,7 +71,7 @@ struct mnt_alias { + int mnt_alias_sz = (sizeof(mnt_alias_tab)/sizeof(mnt_alias_tab[0])); + + static const char *version_keys[] = { +- "v3", "v4", "vers", "nfsvers", "minorversion", NULL ++ "v2", "v3", "v4", "vers", "nfsvers", "minorversion", NULL + }; + + static int strict; +--- nfs-utils-2.6.1.orig/utils/mount/stropts.c ++++ nfs-utils-2.6.1/utils/mount/stropts.c +@@ -1017,6 +1017,7 @@ static int nfs_try_mount(struct nfsmount + } + + switch (mi->version.major) { ++ case 2: + case 3: + result = nfs_try_mount_v3v2(mi, FALSE); + break; +@@ -1247,14 +1248,6 @@ static int nfsmount_start(struct nfsmoun + if (!nfs_validate_options(mi)) + return EX_FAIL; + +- /* +- * NFS v2 has been deprecated +- */ +- if (mi->version.major == 2) { +- mount_error(mi->spec, mi->node, EOPNOTSUPP); +- return EX_FAIL; +- } +- + /* + * Avoid retry and negotiation logic when remounting + */ +--- nfs-utils-2.6.1.orig/utils/nfsd/nfsd.c ++++ nfs-utils-2.6.1/utils/nfsd/nfsd.c +@@ -226,6 +226,7 @@ main(int argc, char **argv) + } + /* FALLTHRU */ + case 3: ++ case 2: + NFSCTL_VERUNSET(versbits, c); + break; + default: +@@ -250,6 +251,7 @@ main(int argc, char **argv) + minorvers = minorversset = minormask; + /* FALLTHRU */ + case 3: ++ case 2: + NFSCTL_VERSET(versbits, c); + break; + default: From 92eea6ba0e00ef378f230a22c4fc0a4133263f41b805908012cae7b409cf997e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 8 Mar 2022 21:05:07 +0000 Subject: [PATCH 4/4] test coverage is fixed (poo#106679) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=252 --- nfs-utils.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nfs-utils.changes b/nfs-utils.changes index 433c2a3..4ac8617 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -2,7 +2,7 @@ Tue Mar 8 20:58:54 UTC 2022 - Dirk Müller - add reenable-nfsv2.patch for reverting nfsv2 deprecation until - test coverage is fixed + test coverage is fixed (poo#106679) ------------------------------------------------------------------- Thu Mar 3 10:08:47 UTC 2022 - Martin Liška