From d39c583080303ee6923bc4457dea4505d3a068ec85bb255176cadb59cf86ca93 Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Tue, 6 Dec 2011 17:32:08 +0000 Subject: [PATCH 1/3] Updating link to change in openSUSE:Factory/nfs-utils revision 92.0 OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=b89c33d514b7085e149e656465f98332 --- nfs-utils.spec | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nfs-utils.spec b/nfs-utils.spec index bbdc2ec..cac090f 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -31,7 +31,7 @@ Summary: Support Utilities for Kernel nfsd Version: 1.2.5 Release: 1 Group: Productivity/Networking/NFS -License: GPLv2+ +License: GPL-2.0+ BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq %insserv_prereq AutoReqProv: on @@ -70,7 +70,7 @@ Authors: H.J. Lu %package -n nfs-client -License: GPLv2+ +License: GPL-2.0+ Group: Productivity/Networking/NFS Summary: Support Utilities for NFS Obsoletes: nfs-utils < 1.1.0 @@ -91,7 +91,7 @@ Authors: H.J. Lu %package -n nfs-kernel-server -License: GPLv2+ +License: GPL-2.0+ Group: Productivity/Networking/NFS Summary: Support Utilities for Kernel nfsd Provides: nfs-utils = %{version} @@ -114,7 +114,7 @@ Authors: H.J. Lu %package -n nfs-doc -License: GPLv2+ +License: GPL-2.0+ Group: Productivity/Networking/NFS Summary: Support Utilities for NFS Obsoletes: nfs-utils < 1.1.0 From 4195795a219d493c49908971b4254b6ba66b63dc222e8a9a0fa6591044e0126d Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 2 May 2012 01:36:09 +0000 Subject: [PATCH 2/3] - nfsserver.init: Don't depend on "mount" preserving unknown options - it doesn't any more. This can confuse nfsd_unbind_mounts (bnc#754805) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=70 --- nfs-utils.changes | 7 +++++++ nfs-utils.spec | 33 +++++++++++++++++++-------------- nfsserver.init | 16 +++++++--------- 3 files changed, 33 insertions(+), 23 deletions(-) diff --git a/nfs-utils.changes b/nfs-utils.changes index 6cbf591..1a5ae79 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed May 2 01:34:51 UTC 2012 - nfbrown@suse.com + +- nfsserver.init: Don't depend on "mount" preserving + unknown options - it doesn't any more. This can + confuse nfsd_unbind_mounts (bnc#754805) + ------------------------------------------------------------------- Sun Nov 20 06:47:14 UTC 2011 - coolo@suse.com diff --git a/nfs-utils.spec b/nfs-utils.spec index cac090f..e638731 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,7 +1,7 @@ # # spec file for package nfs-utils # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,11 +16,19 @@ # - Name: nfs-utils -BuildRequires: e2fsprogs-devel gcc-c++ krb5-devel libgssglue-devel >= 0.3 librpcsecgss libtirpc-devel libtool nfsidmap-devel >= 0.24 pkgconfig tcpd-devel BuildRequires: device-mapper-devel +BuildRequires: e2fsprogs-devel +BuildRequires: gcc-c++ +BuildRequires: krb5-devel +BuildRequires: libgssglue-devel >= 0.3 BuildRequires: libmount-devel +BuildRequires: librpcsecgss +BuildRequires: libtirpc-devel +BuildRequires: libtool +BuildRequires: nfsidmap-devel >= 0.24 +BuildRequires: pkgconfig +BuildRequires: tcpd-devel %if 0%{?suse_version} > 1100 BuildRequires: libevent-devel %else @@ -28,13 +36,12 @@ BuildRequires: libevent %endif Url: http://nfs.sourceforge.net Summary: Support Utilities for Kernel nfsd -Version: 1.2.5 -Release: 1 -Group: Productivity/Networking/NFS License: GPL-2.0+ +Group: Productivity/Networking/NFS +Version: 1.2.5 +Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq %insserv_prereq -AutoReqProv: on BuildRoot: %{_tmppath}/%{name}-%{version}-build Source0: http://downloads.sourceforge.net/project/nfs/nfs-utils/%{version}/nfs-utils-%{version}.tar.bz2 # Download does not work: @@ -70,9 +77,8 @@ Authors: H.J. Lu %package -n nfs-client -License: GPL-2.0+ -Group: Productivity/Networking/NFS Summary: Support Utilities for NFS +Group: Productivity/Networking/NFS Obsoletes: nfs-utils < 1.1.0 Requires: rpcbind PreReq: %fillup_prereq %insserv_prereq @@ -91,13 +97,13 @@ Authors: H.J. Lu %package -n nfs-kernel-server -License: GPL-2.0+ -Group: Productivity/Networking/NFS Summary: Support Utilities for Kernel nfsd +Group: Productivity/Networking/NFS Provides: nfs-utils = %{version} Obsoletes: nfs-utils < 1.1.0 Conflicts: nfs-server -Requires: nfs-client = %{version} rpcbind +Requires: nfs-client = %{version} +Requires: rpcbind PreReq: %fillup_prereq %insserv_prereq %description -n nfs-kernel-server @@ -114,9 +120,8 @@ Authors: H.J. Lu %package -n nfs-doc -License: GPL-2.0+ -Group: Productivity/Networking/NFS Summary: Support Utilities for NFS +Group: Productivity/Networking/NFS Obsoletes: nfs-utils < 1.1.0 Requires: latex2html-pngicons diff --git a/nfsserver.init b/nfsserver.init index 8e62f9d..d0d4914 100644 --- a/nfsserver.init +++ b/nfsserver.init @@ -57,6 +57,7 @@ NFSD_BIN=/usr/sbin/rpc.nfsd IDMAPD_CLIENT_STATE=/var/run/nfs/nfs-rpc.idmapd IDMAPD_SERVER_STATE=/var/run/nfs/nfsserver-rpc.idmapd +NFSD_BIND_MOUNTS=/var/run/nfs/bind.mounts NEED_SVCGSSD=no NEED_IDMPAPD=no @@ -93,6 +94,7 @@ check_for_nfsdfs() { } nfs4_bind_mounts() { + [ -d /var/run/nfs ] || mkdir /var/run/nfs # In case of doubt, try "man sed" :-) cat /etc/exports | @@ -101,21 +103,17 @@ nfs4_bind_mounts() { sort | while read export dir; do test -d "$export" || mkdir -p "$export" - # Fortunately, mount ignores unknown - # options, so we have an easy way to - # tag our "magic" bind mounts - mount -o bind,nfsexp "$dir" "$export" - done + mount -o bind "$dir" "$export" + echo "$dir" "$export" + done > $NFSD_BIND_MOUNTS } nfs4_unbind_mounts() { - - cat /etc/mtab | - grep '\' | - sort -r -k2 | + sort -r -k2 $NFSD_BIND_MOUNTS | while read src mountpoint crap; do umount -l "$mountpoint" done + > $NFSD_BIND_MOUNTS } mount_rpc_pipefs() { From bf6b9f6466d658da3a06557153201353a592258410cd1af58e17ac9a487f6028 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Wed, 2 May 2012 01:43:09 +0000 Subject: [PATCH 3/3] - nfsserver.init: remove VERSION_LIST. This is unnecessary duplication of VERSION_PARAMS OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=71 --- nfs-utils.changes | 6 ++++++ nfsserver.init | 13 ++----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/nfs-utils.changes b/nfs-utils.changes index 1a5ae79..b0de27d 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed May 2 01:42:23 UTC 2012 - nfbrown@suse.com + +- nfsserver.init: remove VERSION_LIST. This is + unnecessary duplication of VERSION_PARAMS + ------------------------------------------------------------------- Wed May 2 01:34:51 UTC 2012 - nfbrown@suse.com diff --git a/nfsserver.init b/nfsserver.init index d0d4914..f107dd6 100644 --- a/nfsserver.init +++ b/nfsserver.init @@ -175,21 +175,12 @@ case "$1" in rc_status fi VERSION_PARAMS= - if [ "$NFS3_SERVER_SUPPORT" != "no" ]; then - VERSION_LIST="+2 +3 " - else - VERSION_LIST="-2 -3" + if [ "$NFS3_SERVER_SUPPORT" == "no" ]; then VERSION_PARAMS="--no-nfs-version 2 --no-nfs-version 3" fi - if [ "$NFS4_SUPPORT" = "yes" ]; then - VERSION_LIST="$VERSION_LIST +4" - else - VERSION_LIST="$VERSION_LIST -4" + if [ "$NFS4_SUPPORT" != "yes" ]; then VERSION_PARAMS="--no-nfs-version 4" fi - if [ " `cat /proc/fs/nfsd/threads`" = " 0" ]; then - echo $VERSION_LIST > /proc/fs/nfsd/versions - fi if [ -n "$NFSV4LEASETIME" -a -f /proc/fs/nfsd/nfsv4leasetime ]; then echo "$NFSV4LEASETIME" > /proc/fs/nfsd/nfsv4leasetime fi