diff --git a/mkdir-sbin b/mkdir-sbin deleted file mode 100644 index 702d9ca..0000000 --- a/mkdir-sbin +++ /dev/null @@ -1,34 +0,0 @@ -commit 03bb227402ab023f4badb515022d49f82e01ff8d -Author: Neil Brown -Date: Thu May 17 16:40:40 2012 +1000 - - osd_login - ensure /sbin is created before installation. - - If we use a more standard approach to describing the osd_login - script, the automake infrastructure will create /sbin before - attempting installation. - This is important for: make DESTDIR=/empty-dir install - - Signed-off-by: NeilBrown - -diff --git a/utils/osd_login/Makefile.am b/utils/osd_login/Makefile.am -index adc493a..d17ffa7 100644 ---- a/utils/osd_login/Makefile.am -+++ b/utils/osd_login/Makefile.am -@@ -1,12 +1,9 @@ - ## Process this file with automake to produce Makefile.in - --OSD_LOGIN_FILES= osd_login -+# These binaries go in /sbin (not /usr/sbin), and that cannot be -+# overriden at config time. -+sbindir = /sbin - --EXTRA_DIST= $(OSD_LOGIN_FILES) -- --all-local: $(OSD_LOGIN_FILES) -- --install-data-hook: -- $(INSTALL) --mode 755 osd_login $(DESTDIR)/sbin/osd_login -+sbin_SCRIPTS = osd_login - - MAINTAINERCLEANFILES = Makefile.in diff --git a/mount-exit-code.fix b/mount-exit-code.fix deleted file mode 100644 index 12dd289..0000000 --- a/mount-exit-code.fix +++ /dev/null @@ -1,58 +0,0 @@ -From 76908c3f14a12e865054ea5d6e4cad201c28839a Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Mon, 16 Jul 2012 08:43:28 -0400 -Subject: [PATCH] mount.nfs: restore correct error status when umount fails - -If nfs-utils is built without --enable-libmount-mount, then -an unmount that failed due to the filesystem being busy will -exit with '16' - EX_FILEIO. -Autofs apparently relies on this. - -When built with --enable-libmount-mount, the same case will -exit with '32' - EX_FAIL. Normally this is reserved for -internal errors. - -This patch restores the use of EX_FILEIO for errors from umount. - -Reviewed-by: Karel Zak -Signed-off-by: NeilBrown -Signed-off-by: Steve Dickson - ---- - utils/mount/mount_libmount.c | 9 ++++----- - 1 file changed, 4 insertions(+), 5 deletions(-) - ---- nfs-utils-1.2.6.orig/utils/mount/mount_libmount.c -+++ nfs-utils-1.2.6/utils/mount/mount_libmount.c -@@ -173,6 +173,7 @@ static int umount_main(struct libmnt_con - { - int rc, c; - char *spec = NULL, *opts = NULL; -+ int ret = EX_FAIL; - - static const struct option longopts[] = { - { "force", 0, 0, 'f' }, -@@ -243,7 +244,7 @@ static int umount_main(struct libmnt_con - /* strange, no entry in mtab or /proc not mounted */ - nfs_umount23(spec, "tcp,v3"); - } -- -+ ret = EX_FILEIO; - rc = mnt_context_do_umount(cxt); /* call umount(2) syscall */ - mnt_context_finalize_mount(cxt); /* mtab update */ - -@@ -252,12 +253,10 @@ static int umount_main(struct libmnt_con - umount_error(rc, spec); - goto err; - } -- -- free(opts); -- return EX_SUCCESS; -+ ret = EX_SUCCESS; - err: - free(opts); -- return EX_FAIL; -+ return ret; - } - - static int mount_main(struct libmnt_context *cxt, int argc, char **argv) diff --git a/nfs-utils-1.0.7-bind-syntax.patch b/nfs-utils-1.0.7-bind-syntax.patch index 426e343..ff5ac68 100644 --- a/nfs-utils-1.0.7-bind-syntax.patch +++ b/nfs-utils-1.0.7-bind-syntax.patch @@ -6,9 +6,9 @@ support/nfs/exports.c | 2 ++ 1 file changed, 2 insertions(+) ---- nfs-utils-1.2.3.orig/support/nfs/exports.c -+++ nfs-utils-1.2.3/support/nfs/exports.c -@@ -626,6 +626,8 @@ bad_option: +--- nfs-utils-1.2.7.orig/support/nfs/exports.c ++++ nfs-utils-1.2.7/support/nfs/exports.c +@@ -628,6 +628,8 @@ bad_option: } else if (strncmp(opt, "replicas=", 9) == 0) { ep->e_fslocmethod = FSLOC_REPLICA; ep->e_fslocdata = strdup(opt+9); diff --git a/nfs-utils-1.2.6.tar.bz2 b/nfs-utils-1.2.6.tar.bz2 deleted file mode 100644 index 5018b50..0000000 --- a/nfs-utils-1.2.6.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70267288500408495085b7c54a667c4e8cfde5882f3193da095fc7dad2da0b83 -size 755305 diff --git a/nfs-utils-1.2.7.tar.bz2 b/nfs-utils-1.2.7.tar.bz2 new file mode 100644 index 0000000..071c8fa --- /dev/null +++ b/nfs-utils-1.2.7.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7ef8e0a8b22cd7ff33f3afd28e770d45643fae303468a180640c2967833fe75e +size 2902130 diff --git a/nfs-utils.changes b/nfs-utils.changes index 70e1184..b8c857c 100644 --- a/nfs-utils.changes +++ b/nfs-utils.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Wed Nov 28 00:08:55 UTC 2012 - nfbrown@suse.com + +- New upstream release 1.2.7. Adds FedFD support + to mounted and replaces nfsdcld with + nfsdcltrack. This is used to manage client state + on NFSv4 servers. + Incorporates more local patches. + +- Replace "/var/run" with "/run" in various scripts. + +- nfsserver.init: Generate message that "bind=" is deprecated + if it is used. + ------------------------------------------------------------------- Wed Oct 17 23:55:27 UTC 2012 - nfbrown@suse.com diff --git a/nfs-utils.spec b/nfs-utils.spec index 9f0a7da..a750834 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -31,16 +31,16 @@ BuildRequires: nfsidmap-devel >= 0.24 BuildRequires: pkgconfig BuildRequires: sqlite3-devel BuildRequires: tcpd-devel -Url: http://nfs.sourceforge.net +Url: http://kernel.org/pub/linux/utils/nfs-utils/ Summary: Support Utilities for Kernel nfsd License: GPL-2.0+ Group: Productivity/Networking/NFS -Version: 1.2.6 +Version: 1.2.7 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq %insserv_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: http://downloads.sourceforge.net/project/nfs/nfs-utils/%{version}/nfs-utils-%{version}.tar.bz2 +Source0: http://kernel.org/pub/linux/utils/nfs-utils/%{version}/nfs-utils-%{version}.tar.bz2 # Download does not work: # Source1: ftp://nfs.sourceforge.net/pub/nfs/nfs.doc.tar.bz2 Source1: nfs.doc.tar.bz2 @@ -57,10 +57,6 @@ Source11: idmapd.conf Source12: start-statd Source13: nfs-utils.rpmlintrc Patch0: nfs-utils-1.0.7-bind-syntax.patch -Patch1: remove_pretty_sig.patch -Patch2: mkdir-sbin -Patch3: mount-exit-code.fix -Patch4: nfs4-no-umount Suggests: python-base %description @@ -139,10 +135,6 @@ Authors: %prep %setup -q -n nfs-utils-%{version} -a 1 %patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 cp %{S:6} . %build @@ -153,7 +145,7 @@ CFLAGS="$RPM_OPT_FLAGS -fPIE -fno-strict-aliasing" LDFLAGS="-pie" ./configure \ --enable-nfsv4 \ --enable-gss \ --enable-ipv6 \ - --enable-nfsdcld \ + --enable-nfsdcltrack \ --enable-mount \ --enable-libmount-mount \ --enable-mountconfig \ @@ -213,12 +205,12 @@ useradd -r -c 'NFS statd daemon' \ chown statd:nogroup /var/lib/nfs chown -R statd /var/lib/nfs/{state,sm,sm.bak} >& /dev/null || : ### migrate from /var/lock/subsys -[ -d /var/run/nfs ] || mkdir /var/run/nfs +[ -d /run/nfs ] || mkdir /run/nfs if [ -f /var/lock/subsys/nfs-rpc.idmapd ]; then - mv /var/lock/subsys/nfs-rpc.idmapd /var/run/nfs + mv /var/lock/subsys/nfs-rpc.idmapd /run/nfs fi if [ -f /var/lock/subsys/nfsserver-rpc.idmapd ]; then - mv /var/lock/subsys/nfsserver-rpc.idmapd /var/run/nfs + mv /var/lock/subsys/nfsserver-rpc.idmapd /run/nfs fi ### [ -x /sbin/mkinitrd_setup ] && mkinitrd_setup @@ -242,12 +234,12 @@ fi %post -n nfs-kernel-server ### migrate from /var/lock/subsys -[ -d /var/run/nfs ] || mkdir /var/run/nfs +[ -d /run/nfs ] || mkdir /run/nfs if [ -f /var/lock/subsys/nfs-rpc.idmapd ]; then - mv /var/lock/subsys/nfs-rpc.idmapd /var/run/nfs + mv /var/lock/subsys/nfs-rpc.idmapd /run/nfs fi if [ -f /var/lock/subsys/nfsserver-rpc.idmapd ]; then - mv /var/lock/subsys/nfsserver-rpc.idmapd /var/run/nfs + mv /var/lock/subsys/nfsserver-rpc.idmapd /run/nfs fi ### %{fillup_and_insserv nfsserver} @@ -322,7 +314,7 @@ fi /usr/sbin/rpc.mountd /usr/sbin/rpc.nfsd /usr/sbin/rpc.svcgssd -/usr/sbin/nfsdcld +/usr/sbin/nfsdcltrack %{_mandir}/man5/exports.5.gz %{_mandir}/man7/nfsd.7.gz %{_mandir}/man8/exportfs.8.gz @@ -331,7 +323,7 @@ fi %{_mandir}/man8/rpc.mountd.8.gz %{_mandir}/man8/rpc.nfsd.8.gz %{_mandir}/man8/rpc.svcgssd.8.gz -%{_mandir}/man8/nfsdcld.8.gz +%{_mandir}/man8/nfsdcltrack.8.gz /usr/share/omc/svcinfo.d/nfs-kernel-server.xml %config(noreplace) /var/lib/nfs/xtab %config(noreplace) /var/lib/nfs/etab diff --git a/nfs.init b/nfs.init index 3d4c9a1..fa7a5fa 100644 --- a/nfs.init +++ b/nfs.init @@ -29,8 +29,8 @@ IDMAPD_BIN=/usr/sbin/rpc.idmapd GSSD_BIN=/usr/sbin/rpc.gssd STATD_BIN=/usr/sbin/rpc.statd -IDMAPD_CLIENT_STATE=/var/run/nfs/nfs-rpc.idmapd -IDMAPD_SERVER_STATE=/var/run/nfs/nfsserver-rpc.idmapd +IDMAPD_CLIENT_STATE=/run/nfs/nfs-rpc.idmapd +IDMAPD_SERVER_STATE=/run/nfs/nfsserver-rpc.idmapd if [ -z "$RPC_PIPEFS_DIR" ]; then RPC_PIPEFS_DIR=/var/lib/nfs/rpc_pipefs @@ -219,7 +219,7 @@ case "$1-$nfs" in rc_status -v rc_exit } - [ -d /var/run/nfs ] || mkdir /var/run/nfs + [ -d /run/nfs ] || mkdir /run/nfs echo $IDMAPD_BIN > $IDMAPD_CLIENT_STATE fi diff --git a/nfs4-no-umount b/nfs4-no-umount deleted file mode 100644 index 3084136..0000000 --- a/nfs4-no-umount +++ /dev/null @@ -1,49 +0,0 @@ -From b0b342201140530c5b9e00408f12d22258df7c4e Mon Sep 17 00:00:00 2001 -From: NeilBrown -Date: Mon, 6 Aug 2012 08:41:13 -0400 -Subject: [PATCH] umount: use correct return value for is_vers4. - -is_vers4 in mount_libmount.c is based on nfs_umount_is_vers4 -in nfsumount.c, except the return values are reversed. -The result of this is: - - a MOUNT_UMNT call is not sent when an NFSv3 or NFSv2 - filesystem is unmounted - - a MOUNT_UMNT call *is* sent when and 'nfs4' filesystem - is unmounted (but not when an 'nfs -o vers=4 filesystem - is unmounted, as that is checked elsewhere). - -Signed-off-by: NeilBrown -Signed-off-by: Steve Dickson - ---- - utils/mount/mount_libmount.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - ---- nfs-utils-1.2.6.orig/utils/mount/mount_libmount.c -+++ nfs-utils-1.2.6/utils/mount/mount_libmount.c -@@ -140,14 +140,14 @@ static int try_mount(struct libmnt_conte - return ret; - } - --/* returns: error = -1, success = 0 , unknown = 1 */ -+/* returns: error = -1, success = 1 , not vers4 == 0 */ - static int is_vers4(struct libmnt_context *cxt) - { - struct libmnt_fs *fs = mnt_context_get_fs(cxt); - struct libmnt_table *tb = NULL; - const char *src = mnt_context_get_source(cxt), - *tgt = mnt_context_get_target(cxt); -- int rc = 1; -+ int rc = 0; - - if (!src || !tgt) - return -1; -@@ -163,7 +163,7 @@ static int is_vers4(struct libmnt_contex - if (fs) { - const char *type = mnt_fs_get_fstype(fs); - if (type && strcmp(type, "nfs4") == 0) -- rc = 0; -+ rc = 1; - } - mnt_free_table(tb); - return rc; diff --git a/nfsserver.init b/nfsserver.init index f107dd6..7c60964 100644 --- a/nfsserver.init +++ b/nfsserver.init @@ -55,9 +55,9 @@ SVCGSSD_BIN=/usr/sbin/rpc.svcgssd IDMAPD_BIN=/usr/sbin/rpc.idmapd 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 +IDMAPD_CLIENT_STATE=/run/nfs/nfs-rpc.idmapd +IDMAPD_SERVER_STATE=/run/nfs/nfsserver-rpc.idmapd +NFSD_BIND_MOUNTS=/run/nfs/bind.mounts NEED_SVCGSSD=no NEED_IDMPAPD=no @@ -94,14 +94,21 @@ check_for_nfsdfs() { } nfs4_bind_mounts() { - [ -d /var/run/nfs ] || mkdir /var/run/nfs - + [ -d /run/nfs ] || mkdir /run/nfs + warned=no # In case of doubt, try "man sed" :-) cat /etc/exports | sed -n 'H;g;s/\\$//;h;t;s/^\n//;s/\n[[:space:]]*//g;s/#.*//;p;s/.*//;h' | sed 's/^\([^[:space:]]*\).*bind=\([^,)]*\).*/\1 \2/;t;d' | sort | while read export dir; do + if [ $warned = no ] ; then + echo + echo "NFS: The usage of 'bind=' in /etc/exports is deprecated." + echo "NFS: Is it no longer needed and may cease to work." + echo "NFS: Please remove these settings." + warned=yes + fi test -d "$export" || mkdir -p "$export" mount -o bind "$dir" "$export" echo "$dir" "$export" @@ -200,7 +207,7 @@ case "$1" in rc_status -v rc_exit } - [ -d /var/run/nfs ] || mkdir /var/run/nfs + [ -d /run/nfs ] || mkdir /run/nfs echo $IDMAPD_BIN > $IDMAPD_SERVER_STATE fi # exportfs @@ -252,7 +259,7 @@ case "$1" in killproc -n -KILL lockd fi # make sure sm-notify is run on restart, as we have dropped some locks - rm -f /var/run/sm-notify.pid + rm -f /run/sm-notify.pid # # rpc.mountd echo -n " mountd" @@ -318,7 +325,7 @@ case "$1" in # Status has a slightly different for the status command: # 0 - service running - # 1 - service dead, but /var/run/ pid file exists + # 1 - service dead, but /run/ pid file exists # 2 - service dead, but /var/lock/ lock file exists # 3 - service not running diff --git a/remove_pretty_sig.patch b/remove_pretty_sig.patch deleted file mode 100644 index 2096ffc..0000000 --- a/remove_pretty_sig.patch +++ /dev/null @@ -1,79 +0,0 @@ -From: Jim Rees -Date: Tue, 27 Mar 2012 10:18:39 -0400 -Subject: [PATCH 1/2] remove pretty_sig() - -This really only works against EMC servers. There is at least one server -that returns unprintable signatures, which fill the log with garbage (the -spec does not mandate printable signatures). It could be made more generic, -for example by checking each byte for isprint(). But the signatures are -really only of interest to developers, not admins, so it seems better to -just remove it. - -Signed-off-by: Jim Rees -Acked-by: NeilBrown ---- - utils/blkmapd/device-process.c | 29 ----------------------------- - 1 file changed, 29 deletions(-) - -diff --git a/utils/blkmapd/device-process.c b/utils/blkmapd/device-process.c -index 652a7a8..5fe3dff 100644 ---- a/utils/blkmapd/device-process.c -+++ b/utils/blkmapd/device-process.c -@@ -49,28 +49,6 @@ - - #include "device-discovery.h" - --static char *pretty_sig(char *sig, uint32_t siglen) --{ -- static char rs[100]; -- uint64_t sigval; -- unsigned int i; -- -- if (siglen <= sizeof(sigval)) { -- sigval = 0; -- for (i = 0; i < siglen; i++) -- sigval |= ((unsigned char *)sig)[i] << (i * 8); -- sprintf(rs, "0x%0llx", (unsigned long long) sigval); -- } else { -- if (siglen > sizeof rs - 4) { -- siglen = sizeof rs - 4; -- sprintf(&rs[siglen], "..."); -- } else -- rs[siglen] = '\0'; -- memcpy(rs, sig, siglen); -- } -- return rs; --} -- - uint32_t *blk_overflow(uint32_t * p, uint32_t * end, size_t nbytes) - { - uint32_t *q = p + ((nbytes + 3) >> 2); -@@ -109,9 +87,6 @@ static int decode_blk_signature(uint32_t **pp, uint32_t * end, - * for mapping, then thrown away. - */ - comp->bs_string = (char *)p; -- BL_LOG_INFO("%s: si_comps[%d]: bs_length %d, bs_string %s\n", -- __func__, i, siglen, -- pretty_sig(comp->bs_string, siglen)); - p += ((siglen + 3) >> 2); - } - *pp = p; -@@ -152,10 +127,6 @@ read_cmp_blk_sig(struct bl_disk *disk, int fd, struct bl_sig_comp *comp) - } - - ret = memcmp(sig, comp->bs_string, siglen); -- if (!ret) -- BL_LOG_INFO("%s: %s sig %s at %lld\n", __func__, dev_name, -- pretty_sig(sig, siglen), -- (long long)comp->bs_offset); - - out: - if (sig) --- -1.7.9.5 - --- -To unsubscribe from this list: send the line "unsubscribe linux-nfs" in -the body of a message to majordomo@vger.kernel.org -More majordomo info at http://vger.kernel.org/majordomo-info.html - diff --git a/start-statd b/start-statd index 6a3fde6..da42719 100644 --- a/start-statd +++ b/start-statd @@ -1,7 +1,7 @@ #!/bin/sh -p # nfsmount calls this script when mounting a filesystem with locking # enabled, but when statd does not seem to be running (based on -# /var/run/rpc.statd.pid). +# /run/rpc.statd.pid). # It should run run statd with whatever flags are apropriate for this # site. PATH=/sbin:/usr/sbin:/bin:/usr/bin