From 6f41be50b06f988f90c56c09ace4caa363ea3abf4a6de27c0fb620aaaa65939a Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sun, 9 Mar 2014 23:06:13 +0000 Subject: [PATCH 1/2] - Remove "Start-Before: autofs" from nfs.init. This turns out not to be needed, and is out of place. If anything, autofs should declare a dependency on nfs. (bnc#861489) - fedfs-lib-name, nfs-utils.spec Build with fedfs support so that if fedfs-utils is also installed, federated-filesystems can be exported. (FATE#313522) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=113 --- fedfs-lib-name | 59 +++++++++++++++++++++++++++++++++++++++++++++++ nfs-utils.changes | 11 +++++++++ nfs-utils.spec | 7 ++++++ nfs.init | 1 - 4 files changed, 77 insertions(+), 1 deletion(-) create mode 100644 fedfs-lib-name diff --git a/fedfs-lib-name b/fedfs-lib-name new file mode 100644 index 0000000..8d5c235 --- /dev/null +++ b/fedfs-lib-name @@ -0,0 +1,59 @@ +From 878972d60cb55f2bc6e04a0937f81407fbc308fe Mon Sep 17 00:00:00 2001 +From: Neil Brown +Date: Wed, 5 Mar 2014 14:55:46 +1100 +Subject: [PATCH] mountd: use SONAME fir libnfsjunct when loading with dlopen. + +The standard for loading shared libraries is to identify them by their +"soname" (Which "objdump -x $BINARY | grep SONAME" will report). +However mountd currently loads using the "linker name" which should only +be used when building new code. + +Future releases of fedfs-utils will define the soname in the include +file, so if that is defined, use it. If not, use the soname of the +first version: "libnfsjunct.so.0". + +This is a slight behavioural change. However all distros known to +package fedfs-utils will install "libnfsjunct.so.0" whenever they +install the old name of "libnfsjunct.so", and "make install" will +install both. So it should not be a noticeable change. + +Also only test the JP_API_VERSION if it is defined. As the version is +embedded in the soname, a secondary test is not needed. + +Cc: Chuck Lever +Signed-off-by: NeilBrown + +--- + utils/mountd/cache.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +--- nfs-utils-1.2.8.orig/utils/mountd/cache.c ++++ nfs-utils-1.2.8/utils/mountd/cache.c +@@ -1055,12 +1055,13 @@ static struct exportent *invoke_junction + __func__, error); + return NULL; + } ++#ifdef JP_API_VERSION + if (ops->jp_api_version != JP_API_VERSION) { + xlog(D_GENERAL, "%s: unrecognized junction API version: %u", + __func__, ops->jp_api_version); + return NULL; + } +- ++#endif + status = ops->jp_init(false); + if (status != JP_OK) { + xlog(D_GENERAL, "%s: failed to resolve %s: %s", +@@ -1107,7 +1108,11 @@ static struct exportent *lookup_junction + struct link_map *map; + void *handle; + +- handle = dlopen("libnfsjunct.so", RTLD_NOW); ++#ifdef JP_NFSPLUGIN_SONAME ++ handle = dlopen(JP_NFSPLUGIN_SONAME, RTLD_NOW); ++#else ++ handle = dlopen("libnfsjunct.so.0", RTLD_NOW); ++#endif + if (handle == NULL) { + xlog(D_GENERAL, "%s: dlopen: %s", __func__, dlerror()); + return NULL; diff --git a/nfs-utils.changes b/nfs-utils.changes index bce169d..a880fd2 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Sun Mar 9 23:00:19 UTC 2014 - nfbrown@suse.com + +- Remove "Start-Before: autofs" from nfs.init. This turns + out not to be needed, and is out of place. If anything, + autofs should declare a dependency on nfs. (bnc#861489) +- fedfs-lib-name, nfs-utils.spec + Build with fedfs support so that if fedfs-utils is also + installed, federated-filesystems can be exported. + (FATE#313522) + ------------------------------------------------------------------- Mon Feb 17 04:40:41 UTC 2014 - nfbrown@suse.com diff --git a/nfs-utils.spec b/nfs-utils.spec index 840033c..838bfa1 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -34,6 +34,9 @@ BuildRequires: tcpd-devel %if 0%{?suse_version} >= 1210 BuildRequires: systemd %endif +%if 0%{?suse_version} >= 1310 +BuildRequires: fedfs-utils-devel +%endif Url: http://kernel.org/pub/linux/utils/nfs-utils/ Summary: Support Utilities for Kernel nfsd License: GPL-2.0+ @@ -85,6 +88,9 @@ Patch10: exportfs-report-failure-if-asked-to-unexport-somethi.patch Patch11: gssd-mount-hang-fix # PATCH-FIX-UPSTREAM udp-fallback.fix bnc#863749 nfbrown@suse.de Patch12: udp-fallback.fix +# PATCH-FIX-UPSTREAM fedfs-lib-name nfbrown@suse.de +Patch13: fedfs-lib-name + Suggests: python-base %description @@ -148,6 +154,7 @@ This package contains additional NFS documentation. %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 cp %{S:6} . %build diff --git a/nfs.init b/nfs.init index b667fdb..2eecc40 100644 --- a/nfs.init +++ b/nfs.init @@ -15,7 +15,6 @@ # Provides: nfs # Required-Start: $network $portmap # Required-Stop: $network $portmap -# X-Start-Before: +autofs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: NFS client services From 09250e59f34667cdeae7a187210103d57b701e1f527412f9cf57c1987381f237 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 18 Mar 2014 16:11:19 +0000 Subject: [PATCH 2/2] Accepting request 225529 from home:sleep_walker:branches:Base:System - properly rename patches: udp-fallback.fix -> udp-fallback-fix.patch fedfs-lib-name -> fedfs-lib-name.patch gssd-mount-hang-fix -> gssd-mount-hang-fix.patch OBS-URL: https://build.opensuse.org/request/show/225529 OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=114 --- fedfs-lib-name => fedfs-lib-name.patch | 0 gssd-mount-hang-fix => gssd-mount-hang-fix.patch | 0 nfs-utils.changes | 8 ++++++++ nfs-utils.spec | 12 ++++++------ udp-fallback.fix => udp-fallback-fix.patch | 0 5 files changed, 14 insertions(+), 6 deletions(-) rename fedfs-lib-name => fedfs-lib-name.patch (100%) rename gssd-mount-hang-fix => gssd-mount-hang-fix.patch (100%) rename udp-fallback.fix => udp-fallback-fix.patch (100%) diff --git a/fedfs-lib-name b/fedfs-lib-name.patch similarity index 100% rename from fedfs-lib-name rename to fedfs-lib-name.patch diff --git a/gssd-mount-hang-fix b/gssd-mount-hang-fix.patch similarity index 100% rename from gssd-mount-hang-fix rename to gssd-mount-hang-fix.patch diff --git a/nfs-utils.changes b/nfs-utils.changes index a880fd2..60a018d 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Mar 11 00:11:18 UTC 2014 - sleep_walker@suse.cz + +- properly rename patches: + udp-fallback.fix -> udp-fallback-fix.patch + fedfs-lib-name -> fedfs-lib-name.patch + gssd-mount-hang-fix -> gssd-mount-hang-fix.patch + ------------------------------------------------------------------- Sun Mar 9 23:00:19 UTC 2014 - nfbrown@suse.com diff --git a/nfs-utils.spec b/nfs-utils.spec index 838bfa1..818dde5 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -84,12 +84,12 @@ Patch8: mountd-fix-bug-affecting-exports-of-dirs-with-64bit-.patch Patch9: exportfs-exit-with-error-code-if-there-was-any-error.patch # PATCH-FIX_UPSTREAM exportfs-report-failure-if-asked-to-unexport-somethi.patch nfbrown@suse.de Patch10: exportfs-report-failure-if-asked-to-unexport-somethi.patch -# PATCH-FIX-UPSTREAM gssd-mount-hang-fix bnc#833543 nfbrown@suse.de -Patch11: gssd-mount-hang-fix -# PATCH-FIX-UPSTREAM udp-fallback.fix bnc#863749 nfbrown@suse.de -Patch12: udp-fallback.fix -# PATCH-FIX-UPSTREAM fedfs-lib-name nfbrown@suse.de -Patch13: fedfs-lib-name +# PATCH-FIX-UPSTREAM gssd-mount-hang-fix.patch bnc#833543 nfbrown@suse.de +Patch11: gssd-mount-hang-fix.patch +# PATCH-FIX-UPSTREAM udp-fallback-fix.patch bnc#863749 nfbrown@suse.de +Patch12: udp-fallback-fix.patch +# PATCH-FIX-UPSTREAM fedfs-lib-name.patch nfbrown@suse.de +Patch13: fedfs-lib-name.patch Suggests: python-base diff --git a/udp-fallback.fix b/udp-fallback-fix.patch similarity index 100% rename from udp-fallback.fix rename to udp-fallback-fix.patch