diff --git a/1001-nfs-utils-gcc10.patch b/1001-nfs-utils-gcc10.patch deleted file mode 100644 index 609b063e5629b105e52a0fda36d4099d787693c0..0000000000000000000000000000000000000000 --- a/1001-nfs-utils-gcc10.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 80a9ea81f54fb6bd2147fa247cb06515990deb19 Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Tue, 26 Apr 2022 16:53:23 +0800 -Subject: [PATCH] Allow compilation to succeed with -fno-common -When compiled with -fno-common, global variables that are declared -multple times cause an error. With -fcommon (the default), they are -merged. - -Declaring such variable multiple times is probably not a good idea, and -is definitely not necessary. - -This patch changes all the global variables defined in include files to -be explicitly "extern", and where necessary, adds the variable -declaration to a suitable .c file. - -To test, run - CFLAGS=-fno-common ./configure - make -Signed-off-by: NeilBrown -Signed-off-by: Steve Dickson ---- - support/export/v4root.c | 2 -- - utils/statd/statd.c | 2 ++ - utils/statd/statd.h | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/support/export/v4root.c b/support/export/v4root.c -index 4d33117..3654bd7 100644 ---- a/support/export/v4root.c -+++ b/support/export/v4root.c -@@ -28,8 +28,6 @@ - #include "v4root.h" - #include "pseudoflavors.h" - --int v4root_needed; -- - static nfs_export pseudo_root = { - .m_next = NULL, - .m_client = NULL, -diff --git a/utils/statd/statd.c b/utils/statd/statd.c -index 8eef2ff..665b0fe 100644 ---- a/utils/statd/statd.c -+++ b/utils/statd/statd.c -@@ -68,6 +68,8 @@ static struct option longopts[] = - - extern void sm_prog_1 (struct svc_req *, register SVCXPRT *); - -+stat_chge SM_stat_chge; -+ - #ifdef SIMULATIONS - extern void simulator (int, char **); - #endif -diff --git a/utils/statd/statd.h b/utils/statd/statd.h -index 231ac7e..bb1fecb 100644 ---- a/utils/statd/statd.h -+++ b/utils/statd/statd.h -@@ -41,7 +41,7 @@ extern void load_state(void); - /* - * Host status structure and macros. - */ --stat_chge SM_stat_chge; -+extern stat_chge SM_stat_chge; - #define MY_NAME SM_stat_chge.mon_name - #define MY_STATE SM_stat_chge.state - --- -2.18.4 - diff --git a/1002-Allow-compilation-to-succeed-with-fno-common.patch b/1002-Allow-compilation-to-succeed-with-fno-common.patch deleted file mode 100644 index a9c7dc99ffd94c7171750e9a9095142c7b80be9c..0000000000000000000000000000000000000000 --- a/1002-Allow-compilation-to-succeed-with-fno-common.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 050d33d0c81fe82d004fe75b25415232e110756e Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Tue, 26 Apr 2022 17:02:57 +0800 -Subject: [PATCH] Allow compilation to succeed with -fno-common -When compiled with -fno-common, global variables that are declared -multple times cause an error. With -fcommon (the default), they are -merged. - -Declaring such variable multiple times is probably not a good idea, and -is definitely not necessary. - -This patch changes all the global variables defined in include files to -be explicitly "extern", and where necessary, adds the variable -declaration to a suitable .c file. - -To test, run - CFLAGS=-fno-common ./configure - make - -Signed-off-by: NeilBrown -Signed-off-by: Steve Dickson ---- - utils/nfsdcld/cld-internal.h | 11 +++++------ - utils/nfsdcld/nfsdcld.c | 6 ++++++ - 2 files changed, 11 insertions(+), 6 deletions(-) - -diff --git a/utils/nfsdcld/cld-internal.h b/utils/nfsdcld/cld-internal.h -index 05f01be..e8216c9 100644 ---- a/utils/nfsdcld/cld-internal.h -+++ b/utils/nfsdcld/cld-internal.h -@@ -35,10 +35,9 @@ struct cld_client { - } cl_u; - }; - --uint64_t current_epoch; --uint64_t recovery_epoch; --int first_time; --int num_cltrack_records; --int num_legacy_records; -- -+extern uint64_t current_epoch; -+extern uint64_t recovery_epoch; -+extern int first_time; -+extern int num_cltrack_records; -+extern int num_legacy_records; - #endif /* _CLD_INTERNAL_H_ */ -diff --git a/utils/nfsdcld/nfsdcld.c b/utils/nfsdcld/nfsdcld.c -index 2ad1001..be65562 100644 ---- a/utils/nfsdcld/nfsdcld.c -+++ b/utils/nfsdcld/nfsdcld.c -@@ -69,6 +69,12 @@ static int inotify_fd = -1; - static struct event pipedir_event; - static bool old_kernel = false; - -+uint64_t current_epoch; -+uint64_t recovery_epoch; -+int first_time; -+int num_cltrack_records; -+int num_legacy_records; -+ - static struct option longopts[] = - { - { "help", 0, NULL, 'h' }, --- -2.18.4 - diff --git a/nfs-utils-2.3.3-nfsidmap-debug.patch b/nfs-utils-2.3.3-nfsidmap-debug.patch new file mode 100644 index 0000000000000000000000000000000000000000..d972843557dec942cac63df81b9e93de386e849f --- /dev/null +++ b/nfs-utils-2.3.3-nfsidmap-debug.patch @@ -0,0 +1,27 @@ +commit 0095435db8228d5a88ec35a63cb64271e2e648a8 +Author: Steve Dickson +Date: Thu Dec 19 12:48:31 2019 -0500 + + libnfsidmap: Turn off default verbosity + + Commit f080188e changed the library's verbosity + to be on by default. The patch turns it off by + default + + Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1774787 + + Signed-off-by: Steve Dickson + +diff --git a/support/nfsidmap/libnfsidmap.c b/support/nfsidmap/libnfsidmap.c +index 9299e652..d11710f1 100644 +--- a/support/nfsidmap/libnfsidmap.c ++++ b/support/nfsidmap/libnfsidmap.c +@@ -101,7 +101,7 @@ static void default_logger(const char *fmt, ...) + + #pragma GCC visibility pop + nfs4_idmap_log_function_t idmap_log_func = default_logger; +-int idmap_verbosity = 2; ++int idmap_verbosity = 0; + #pragma GCC visibility push(hidden) + + static int id_as_chars(char *name, uid_t *id) diff --git a/nfs-utils.spec b/nfs-utils.spec index 14ae3a445b8bd4182f682ec75f111fea488aba8c..0a9e740d9574394cb435d75f80c7ba522e0d4183 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,9 +1,8 @@ -%define anolis_release .0.1 Summary: NFS utilities and supporting clients and daemons for the kernel NFS server Name: nfs-utils URL: http://linux-nfs.org/ Version: 2.3.3 -Release: 50%{anolis_release}%{?dist} +Release: 51%{?dist} Epoch: 1 # group all 32bit related archs @@ -91,6 +90,7 @@ Patch045: nfs-utils-2.3.3-gssd-mutex-refcnt.patch Patch046: nfs-utils-2.3.3-mountd-v4-logging.patch Patch047: nfs-utils-2.3.3-gssd-printerr.patch Patch048: nfs-utils-2.3.3-mount-ebusy.patch +Patch049: nfs-utils-2.3.3-nfsidmap-debug.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -98,12 +98,6 @@ Patch102: nfs-utils-2.3.3-idmap-errmsg.patch Patch103: nfs-utils-2.3.1-systemd-gssproxy-restart.patch Patch104: nfs-utils-2.3.1-systemd-svcgssd-removed.patch -# Begin: Anolis customized patches -Patch1001: 1001-nfs-utils-gcc10.patch -# backport patch from upstream -Patch1002: 1002-Allow-compilation-to-succeed-with-fno-common.patch -# End: Anolis customized patches - Provides: exportfs = %{epoch}:%{version}-%{release} Provides: nfsstat = %{epoch}:%{version}-%{release} Provides: showmount = %{epoch}:%{version}-%{release} @@ -372,9 +366,8 @@ fi %{_libdir}/libnfsidmap.so %changelog -* Tue Apr 26 2022 Weitao Zhou 2.3.3-50.0.1 -- allow compilation to succeed with -fno-common -- use extern in header files when declaring global variables for compatible gcc10 build +* Mon Mar 7 2022 Steve Dickson 2.3.3-51 +- libnfsidmap: Turn off default verbosity (bz 2057612) * Sat Feb 19 2022 Steve Dickson 2.3.3-50 - mount.nfs: Fix Typo auto negotiating code. (bz 1946346)