From c88dcff4b0d7d91da4770d5bf4eeb36b0cb79e75 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 02 2019 15:31:48 +0000 Subject: import nfs-utils-2.3.3-14.el8_0 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ff3115f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/nfs-utils-2.3.3.tar.xz diff --git a/.nfs-utils.metadata b/.nfs-utils.metadata new file mode 100644 index 0000000..6a026de --- /dev/null +++ b/.nfs-utils.metadata @@ -0,0 +1 @@ +a60aa17b057734c63bf7ce1598898e83f2132644 SOURCES/nfs-utils-2.3.3.tar.xz diff --git a/SOURCES/24-nfs-server.conf b/SOURCES/24-nfs-server.conf new file mode 100644 index 0000000..5011e92 --- /dev/null +++ b/SOURCES/24-nfs-server.conf @@ -0,0 +1,7 @@ +[service/nfs-server] + mechs = krb5 + socket = /run/gssproxy.sock + cred_store = keytab:/etc/krb5.keytab + trusted = yes + kernel_nfsd = yes + euid = 0 diff --git a/SOURCES/id_resolver.conf b/SOURCES/id_resolver.conf new file mode 100644 index 0000000..67ccb18 --- /dev/null +++ b/SOURCES/id_resolver.conf @@ -0,0 +1,9 @@ +# +# nfsidmap(5) - The NFS idmapper upcall program +# Summary: Used by NFSv4 to map user/group ids into +# user/group names and names into in ids +# Options: +# -v Increases the verbosity of the output to syslog +# -t timeout Set the expiration timer, in seconds, on the key +# +create id_resolver * * /usr/sbin/nfsidmap %k %d diff --git a/SOURCES/lockd.conf b/SOURCES/lockd.conf new file mode 100644 index 0000000..f672d12 --- /dev/null +++ b/SOURCES/lockd.conf @@ -0,0 +1,23 @@ +# +# Set the NFS lock manager grace period. n is measured in seconds. +#options lockd nlm_grace_period=90 +# +# Set the TCP port that the NFS lock manager should use. +# port must be a valid TCP port value (1-65535). +#options lockd nlm_tcpport +# +# Set the UDP port that the NFS lock manager should use. +# port must be a valid UDP port value (1-65535). +#options lockd nlm_udpport +# +# Set the maximum number of outstanding connections +#options lockd nlm_max_connections=1024 +# +# Set the default time value for the NFS lock manager +# in seconds. Default is 10 secs (min 3 max 20) +#options lockd nlm_timeout=10 +# +# Choose whether to record the caller_name or IP address +# this peer in the local rpc.statd's database. +#options lockd nsm_use_hostnames=0 + diff --git a/SOURCES/nfs-convert.service b/SOURCES/nfs-convert.service new file mode 100644 index 0000000..6720192 --- /dev/null +++ b/SOURCES/nfs-convert.service @@ -0,0 +1,24 @@ +[Unit] +Description=Preprocess NFS configuration convertion +DefaultDependencies=no + +Before=nfs-server.service nfs-mountd.service nfs-idmapd.service +Before=nfs-blkmap.service rpc-statd.service rpc-gssd.service +Before=rpc-statd-notify.service + +After=initrd-root-fs.target + +ConditionPathExists=/etc/sysconfig/nfs + +[Service] +Type=oneshot +ExecStart=/usr/libexec/nfs-utils/nfsconvert.sh + +[Install] +RequiredBy=nfs-server.service +RequiredBy=nfs-mountd.service +RequiredBy=nfs-idmapd.service +RequiredBy=nfs-blkmap.service +RequiredBy=rpc-statd.service +RequiredBy=rpc-gssd.service +RequiredBy=rpc-statd-notify.service diff --git a/SOURCES/nfs-utils-1.2.1-exp-subtree-warn-off.patch b/SOURCES/nfs-utils-1.2.1-exp-subtree-warn-off.patch new file mode 100644 index 0000000..7708750 --- /dev/null +++ b/SOURCES/nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -0,0 +1,12 @@ +diff -up nfs-utils-2.1.1/support/nfs/exports.c.orig nfs-utils-2.1.1/support/nfs/exports.c +--- nfs-utils-2.1.1/support/nfs/exports.c.orig 2017-01-12 10:21:39.000000000 -0500 ++++ nfs-utils-2.1.1/support/nfs/exports.c 2017-04-26 12:46:24.186480312 -0400 +@@ -507,7 +507,7 @@ void fix_pseudoflavor_flags(struct expor + static int + parseopts(char *cp, struct exportent *ep, int warn, int *had_subtree_opt_ptr) + { +- int had_subtree_opt = 0; ++ int had_subtree_opt = 1; + char *flname = efname?efname:"command line"; + int flline = efp?efp->x_line:0; + unsigned int active = 0; diff --git a/SOURCES/nfs-utils-1.2.1-statdpath-man.patch b/SOURCES/nfs-utils-1.2.1-statdpath-man.patch new file mode 100644 index 0000000..986a4b8 --- /dev/null +++ b/SOURCES/nfs-utils-1.2.1-statdpath-man.patch @@ -0,0 +1,58 @@ +diff -up nfs-utils-2.1.1/utils/statd/sm-notify.man.orig nfs-utils-2.1.1/utils/statd/sm-notify.man +--- nfs-utils-2.1.1/utils/statd/sm-notify.man.orig 2017-04-26 12:45:14.205742654 -0400 ++++ nfs-utils-2.1.1/utils/statd/sm-notify.man 2017-04-26 12:45:44.042630801 -0400 +@@ -184,7 +184,7 @@ where NSM state information resides. + If this option is not specified, + .B sm-notify + uses +-.I /var/lib/nfs ++.I /var/lib/nfs/statd + by default. + .IP + After starting, +@@ -330,13 +330,13 @@ Currently, the + command supports sending notification only via datagram transport protocols. + .SH FILES + .TP 2.5i +-.I /var/lib/nfs/sm ++.I /var/lib/nfs/statd/sm + directory containing monitor list + .TP 2.5i +-.I /var/lib/nfs/sm.bak ++.I /var/lib/nfs/statd/sm.bak + directory containing notify list + .TP 2.5i +-.I /var/lib/nfs/state ++.I /var/lib/nfs/statd/state + NSM state number for this host + .TP 2.5i + .I /proc/sys/fs/nfs/nsm_local_state +diff -up nfs-utils-2.1.1/utils/statd/statd.man.orig nfs-utils-2.1.1/utils/statd/statd.man +--- nfs-utils-2.1.1/utils/statd/statd.man.orig 2017-01-12 10:21:39.000000000 -0500 ++++ nfs-utils-2.1.1/utils/statd/statd.man 2017-04-26 12:45:44.043630798 -0400 +@@ -253,7 +253,7 @@ where NSM state information resides. + If this option is not specified, + .B rpc.statd + uses +-.I /var/lib/nfs ++.I /var/lib/nfs/statd + by default. + .IP + After starting, +@@ -425,13 +425,13 @@ If set to a positive integer, has the sa + .IR \-\-no\-notify . + .SH FILES + .TP 2.5i +-.I /var/lib/nfs/sm ++.I /var/lib/nfs/statd/sm + directory containing monitor list + .TP 2.5i +-.I /var/lib/nfs/sm.bak ++.I /var/lib/nfs/statd/sm.bak + directory containing notify list + .TP 2.5i +-.I /var/lib/nfs/state ++.I /var/lib/nfs/statd/state + NSM state number for this host + .TP 2.5i + .I /var/run/run.statd.pid diff --git a/SOURCES/nfs-utils-1.2.5-idmap-errmsg.patch b/SOURCES/nfs-utils-1.2.5-idmap-errmsg.patch new file mode 100644 index 0000000..edaacb7 --- /dev/null +++ b/SOURCES/nfs-utils-1.2.5-idmap-errmsg.patch @@ -0,0 +1,12 @@ +diff -up nfs-utils-2.1.1/utils/nfsidmap/nfsidmap.c.orig nfs-utils-2.1.1/utils/nfsidmap/nfsidmap.c +--- nfs-utils-2.1.1/utils/nfsidmap/nfsidmap.c.orig 2017-01-12 10:21:39.000000000 -0500 ++++ nfs-utils-2.1.1/utils/nfsidmap/nfsidmap.c 2017-04-26 12:47:56.715133443 -0400 +@@ -432,7 +432,7 @@ int main(int argc, char **argv) + + xlog_stderr(verbose); + if ((argc - optind) != 2) { +- xlog_warn("Bad arg count. Check /etc/request-key.conf"); ++ xlog_err("Bad arg count. Check /etc/request-key.d/request-key.conf"); + xlog_warn(usage, progname); + return EXIT_FAILURE; + } diff --git a/SOURCES/nfs-utils-2.3.1-systemd-gssproxy-restart.patch b/SOURCES/nfs-utils-2.3.1-systemd-gssproxy-restart.patch new file mode 100644 index 0000000..60762e8 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.1-systemd-gssproxy-restart.patch @@ -0,0 +1,11 @@ +diff -up nfs-utils-2.3.1/systemd/nfs-server.service.orig nfs-utils-2.3.1/systemd/nfs-server.service +--- nfs-utils-2.3.1/systemd/nfs-server.service.orig 2018-01-19 10:25:38.153513857 -0500 ++++ nfs-utils-2.3.1/systemd/nfs-server.service 2018-01-19 10:30:52.977245126 -0500 +@@ -26,6 +26,7 @@ Type=oneshot + RemainAfterExit=yes + ExecStartPre=/usr/sbin/exportfs -r + ExecStart=/usr/sbin/rpc.nfsd ++ExecStart=-/bin/sh -c 'if systemctl -q is-active gssproxy; then systemctl reload gssproxy ; fi' + ExecStop=/usr/sbin/rpc.nfsd 0 + ExecStopPost=/usr/sbin/exportfs -au + ExecStopPost=/usr/sbin/exportfs -f diff --git a/SOURCES/nfs-utils-2.3.1-systemd-svcgssd-removed.patch b/SOURCES/nfs-utils-2.3.1-systemd-svcgssd-removed.patch new file mode 100644 index 0000000..e3cc92f --- /dev/null +++ b/SOURCES/nfs-utils-2.3.1-systemd-svcgssd-removed.patch @@ -0,0 +1,65 @@ +diff -up nfs-utils-2.3.3/systemd/auth-rpcgss-module.service.orig nfs-utils-2.3.3/systemd/auth-rpcgss-module.service +--- nfs-utils-2.3.3/systemd/auth-rpcgss-module.service.orig 2018-09-06 14:09:08.000000000 -0400 ++++ nfs-utils-2.3.3/systemd/auth-rpcgss-module.service 2018-10-17 10:42:17.682830880 -0400 +@@ -1,5 +1,5 @@ +-# We want to start gss-proxy on kernels that support it and rpc.svcgssd +-# on those that don't. Those services check for support by checking ++# We want to start gss-proxy on kernels that support it ++# Those services check for support by checking + # for existence of the path /proc/net/rpc/use-gss-proxy. Before they + # can perform that check, they need this module loaded. (Unless + # rpcsec_gss support is built directly into the kernel, in which case this +@@ -7,8 +7,8 @@ + [Unit] + Description=Kernel Module supporting RPCSEC_GSS + DefaultDependencies=no +-Before=gssproxy.service rpc-svcgssd.service rpc-gssd.service +-Wants=gssproxy.service rpc-svcgssd.service rpc-gssd.service ++Before=gssproxy.service rpc-gssd.service ++Wants=gssproxy.service rpc-gssd.service + ConditionPathExists=/etc/krb5.keytab + + [Service] +diff -up nfs-utils-2.3.3/systemd/nfs-client.target.orig nfs-utils-2.3.3/systemd/nfs-client.target +--- nfs-utils-2.3.3/systemd/nfs-client.target.orig 2018-09-06 14:09:08.000000000 -0400 ++++ nfs-utils-2.3.3/systemd/nfs-client.target 2018-10-17 10:42:17.682830880 -0400 +@@ -9,7 +9,7 @@ Wants=rpc-statd-notify.service + + # GSS services dependencies and ordering + Wants=auth-rpcgss-module.service +-After=rpc-gssd.service rpc-svcgssd.service gssproxy.service ++After=rpc-gssd.service gssproxy.service + + [Install] + WantedBy=multi-user.target +diff -up nfs-utils-2.3.3/systemd/nfs.conf.man.orig nfs-utils-2.3.3/systemd/nfs.conf.man +--- nfs-utils-2.3.3/systemd/nfs.conf.man.orig 2018-09-06 14:09:08.000000000 -0400 ++++ nfs-utils-2.3.3/systemd/nfs.conf.man 2018-10-17 10:42:17.682830880 -0400 +@@ -226,15 +226,6 @@ See + for details. + + .TP +-.B svcgssd +-Recognized values: +-.BR principal . +- +-See +-.BR rpc.svcgssd (8) +-for details. +- +-.TP + .B exportfs + Only + .B debug= +diff -up nfs-utils-2.3.3/systemd/nfs-server.service.orig nfs-utils-2.3.3/systemd/nfs-server.service +--- nfs-utils-2.3.3/systemd/nfs-server.service.orig 2018-10-17 10:41:24.347121069 -0400 ++++ nfs-utils-2.3.3/systemd/nfs-server.service 2018-10-17 10:42:17.683830874 -0400 +@@ -14,7 +14,7 @@ Before= rpc-statd-notify.service + + # GSS services dependencies and ordering + Wants=auth-rpcgss-module.service +-After=rpc-gssd.service gssproxy.service rpc-svcgssd.service ++After=rpc-gssd.service gssproxy.service + + [Service] + Type=oneshot diff --git a/SOURCES/nfs-utils-2.3.3-gating-tests.patch b/SOURCES/nfs-utils-2.3.3-gating-tests.patch new file mode 100644 index 0000000..8f70d8f --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-gating-tests.patch @@ -0,0 +1,3813 @@ +From 26dfa0f7846f14aa86048d504913d3a3be7196d0 Mon Sep 17 00:00:00 2001 +From: Bruno Goncalves +Date: Jan 17 2019 10:02:50 +0000 +Subject: [PATCH 1/6] Add CI tests + + +Related: rhbz#1653927 + +--- + +diff --git a/tests/export-mount-local/PURPOSE b/tests/export-mount-local/PURPOSE +new file mode 100644 +index 0000000..556df42 +--- /dev/null ++++ b/tests/export-mount-local/PURPOSE +@@ -0,0 +1 @@ ++# nothing +diff --git a/tests/export-mount-local/_env b/tests/export-mount-local/_env +new file mode 100644 +index 0000000..90b8e90 +--- /dev/null ++++ b/tests/export-mount-local/_env +@@ -0,0 +1,7 @@ ++export TOPLEVEL_NAMESPACE=nfs-utils ++export PKG_NAMESPACE=nfs-utils ++export RELATIVE_PATH=export-mount-local ++export PACKAGE=nfs-utils ++export PACKAGE_NAME=nfs-utils ++export PKG_LIST=nfs-utils nfs-utils-lib libnfsidmap libsss_idmap libtirpc rpcbind ++export TEST=/nfs-utils/export-mount-local +diff --git a/tests/export-mount-local/runtest.sh b/tests/export-mount-local/runtest.sh +new file mode 100755 +index 0000000..e72e0f4 +--- /dev/null ++++ b/tests/export-mount-local/runtest.sh +@@ -0,0 +1,304 @@ ++#!/bin/bash ++# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: test for: export-mount ++# Author: Jianhong Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2014 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh ++. /usr/share/beakerlib/beakerlib.sh || exit 1 ++ ++#=============================================================================== ++ ++#signal trap ++trap "cleanup" SIGINT SIGTERM SIGHUP SIGQUIT ++cleanup() { ++ rlFileRestore ++ rm -rf $expdir $nfsmp ++} ++ ++#global var define ++BZ=exp-mount-local ++expdir=/exportDir-$BZ ++nfsmp=/mnt/nfsmp-$BZ ++subexpdir=/exportDir-$BZ/sub ++tmpnfsmp=/tmp/nfsmp-$BZ ++ ++host="$HOSTNAME" ++# in case "localhost.localdomain" ++echo "$host" | grep -q "localhost" && host="localhost" ++ ++rlJournalStart ++ rlPhaseStartSetup do-Setup- ++ # Load beakerlib you needed ++ rlImport kernel/base ++ read ipv4 _nil <<<$(getDefaultIp) ++ read ipv6s _nil <<<$(getDefaultIp 6 global) ++ ipv6="[$ipv6s]" ++ envinfo ++ rlFileBackup /etc/exports /etc/sysconfig/nfs /etc/nfs.conf /etc/hosts ++ if [ "$host" = "localhost" ]; then ++ run "echo '$ipv4 $host' >> /etc/hosts" ++ if [ -n "$ipv6s" ]; then ++ run "echo '$ipv6s $host' >> /etc/hosts" ++ fi ++ run "cat /etc/hosts" - ++ fi ++ run 'rm -rf $expdir $nfsmp && mkdir -p $expdir $nfsmp' ++ run 'rm -rf $subexpdir $tmpnfsmp && mkdir -p $subexpdir $tmpnfsmp' ++ run 'echo "/tmp *(ro,sync)" >/etc/exports' ++ run 'service_nfs restart' ++ #avoid issues restarting the server too quickly ++ sleep 10 ++ run 'ls_nfsvers' ++ rlPhaseEnd ++ ++for V in $(ls_nfsvers); do ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-ipv4 ++ run "exportfs -au && exportfs -iv $ipv4:$expdir -o ro,sync,no_root_squash" ++ run 'mount -o vers=$V $ipv4:$expdir $nfsmp' ++ run 'umount $nfsmp' ++ rlPhaseEnd ++ if [ -n "$ipv6s" ]; then ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-ipv6-x ++ run 'mount -o vers=$V $ipv6:$expdir $nfsmp' 1-255 ++ [ $? = 0 ] && run "umount $nfsmp" ++ rlPhaseEnd ++ fi ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-host ++ run 'mount -o vers=$V $host:$expdir $nfsmp' ++ run 'umount $nfsmp' ++ rlPhaseEnd ++ ++ if [ -n "$ipv6s" ]; then ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-ipv6 ++ run "exportfs -au && exportfs -iv $ipv6:$expdir -o ro,sync,no_root_squash" ++ run 'mount -o vers=$V $ipv6:$expdir $nfsmp' ++ run 'umount $nfsmp' ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-ipv4-x ++ run 'mount -o vers=$V $ipv4:$expdir $nfsmp' 1-255 ++ [ $? = 0 ] && run "umount $nfsmp" ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-host ++ if [ -n "$(dig -t aaaa $HOSTNAME +short)" ]; then ++ run 'mount -o vers=$V $host:$expdir $nfsmp' ++ run 'umount $nfsmp' ++ fi ++ rlPhaseEnd ++ fi ++ ++ rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-host ++ run "exportfs -au && exportfs -iv $host:$expdir -o ro,sync,no_root_squash" ++ run 'mount -o vers=$V $host:$expdir $nfsmp' ++ run 'umount $nfsmp' ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-ipv4 ++ run 'mount -o vers=$V $ipv4:$expdir $nfsmp' ++ run 'umount $nfsmp' ++ rlPhaseEnd ++ if [ -n "$ipv6s" ]; then ++ rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-ipv6 ++ if [ -n "$(dig -t aaaa $HOSTNAME +short)" ]; then ++ run 'mount -o vers=$V $ipv6:$expdir $nfsmp' ++ run 'umount $nfsmp' ++ fi ++ rlPhaseEnd ++ fi ++ ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-ipv4 ++ run 'echo "$expdir *(ro,sync,no_root_squash)" >/etc/exports' ++ run 'echo "$subexpdir $ipv4(ro,sync,no_root_squash)" >>/etc/exports' ++ run 'service_nfs restart' ++ #avoid issues restarting the server too quickly ++ sleep 10 ++ run 'showmount -e' - ++ run 'mount -o vers=$V $ipv4:$expdir $nfsmp' ++ run 'mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp' ++ run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseEnd ++ if [ -n "$ipv6s" ]; then ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-ipv6-x ++ run 'mount -o vers=$V $ipv6:$expdir $nfsmp' ++ run 'mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp' 1-255 "should not mount sub-directory with different ip" ++ [ $? = 0 ] && run "umount $tmpnfsmp" ++ run "umount $nfsmp" ++ rlPhaseEnd ++ fi ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-host ++ run 'mount -o vers=$V $host:$expdir $nfsmp' ++ run 'mount -o vers=$V $host:$subexpdir $tmpnfsmp' ++ run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseEnd ++ ++ if [ -n "$ipv6s" ]; then ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-ipv4-x ++ run 'echo "$expdir *(ro,sync,no_root_squash)" >/etc/exports' ++ run 'echo "$subexpdir $ipv6s(ro,sync,no_root_squash)" >>/etc/exports' ++ run 'service_nfs restart' ++ #avoid issues restarting the server too quickly ++ sleep 10 ++ run 'showmount -e' - ++ run 'mount -o vers=$V $ipv4:$expdir $nfsmp' ++ run 'mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp' 1-255 "should not mount sub-directory with different ip" ++ [ $? = 0 ] && run "umount $tmpnfsmp" ++ run "umount $nfsmp" ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-ipv6 ++ run 'mount -o vers=$V $ipv6:$expdir $nfsmp' ++ run 'mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp' ++ run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-host ++ run 'mount -o vers=$V $host:$expdir $nfsmp' ++ run 'mount -o vers=$V $host:$subexpdir $tmpnfsmp' ++ run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseEnd ++ fi ++ ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-ipv4 ++ run 'echo "$expdir *(ro,sync,no_root_squash)" >/etc/exports' ++ run 'echo "$subexpdir $host(ro,sync,no_root_squash)" >>/etc/exports' ++ run 'service_nfs restart' ++ #avoid issues restarting the server too quickly ++ sleep 10 ++ run 'showmount -e' - ++ run 'mount -o vers=$V $ipv4:$expdir $nfsmp' ++ run 'mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp' ++ run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseEnd ++ if [ -n "$ipv6s" ]; then ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-ipv6 ++ run 'mount -o vers=$V $ipv6:$expdir $nfsmp' ++ run 'mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp' ++ run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseEnd ++ fi ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-host ++ run 'mount -o vers=$V $host:$expdir $nfsmp' ++ run 'mount -o vers=$V $host:$subexpdir $tmpnfsmp' ++ run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-nfsV$V-default-option-overridden-by-client-specific-option ++ run "echo '$expdir -ro,sync *(rw,no_root_squash)' >/etc/exports" ++ run "service_nfs restart" ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "touch $nfsmp/testfile && mkdir $nfsmp/testdir" 0 "exports option should be overridden by client specific." ++ run "rm -rf $nfsmp/test*" ++ run "umount $nfsmp" ++ run "echo '$expdir -ro,sec=sys,sync *(rw,no_root_squash)' >/etc/exports" 0 "sec=sys may cause it to be failed." ++ run "exportfs -rv" ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "touch $nfsmp/testfile && mkdir $nfsmp/testdir" 0 "exports option should be overridden by client specific." ++ run "rm -rf $nfsmp/test*" ++ run "umount $nfsmp" ++ rlPhaseEnd ++done ++ ++ rlPhaseStartTest do-Test-exports-options-twice ++ run 'echo "/ *(sync,hide,no_wdelay)" > /etc/exports' ++ run "service_nfs restart" ++ #avoid issues restarting the server too quickly ++ sleep 10 ++ ++ # Count all options from list printed by exportfs -s(rhel-7) or exportfs -v(rhel-6) ++ allOptions=$( (exportfs -s 2>/dev/null || exportfs -v) | sed 's/^.*(//;s/)$//;s/,/\n/g' | wc -l) ++ # Count unique options from list printed by exportfs -s(rhel-7) or exportfs -v(rhel-6) ++ uniqOptions=$( (exportfs -s 2>/dev/null || exportfs -v) | sed 's/^.*(//;s/)$//;s/,/\n/g' | sort | uniq | wc -l) ++ ++ log "{Info} exportfs -s(rhel-7) or exportfs -v(rhel-6) will print option list for each export path" ++ log "{Info} All options printed by exportfs -s(rhel-7) or exportfs -v(rhel-6) (sorted):" ++ run "(exportfs -s 2>/dev/null || exportfs -v) | sed 's/^.*(//;s/)$//;s/,/\n/g' | sort" ++ log "{Info} For exported path '/', there are $allOptions options printed in all options list and $uniqOptions of them are unique" ++ run 'test $uniqOptions -eq $allOptions' 0 "Should not output any options twice, quantity of all options should be equal to quantity of unique options" ++ for opt in sync hide no_wdelay; do ++ run "(exportfs -s 2>/dev/null || exportfs -v) | grep -q $opt" 0 "Option list should contain option $opt specified in /etc/exports" ++ done ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-server-side-using-bind-mount ++ run "dd if=/dev/zero of=workspace.image bs=3M count=500" ++ run "mkfs -t ext3 -F workspace.image" ++ run "mkdir -p /workspace" ++ run "mount -o loop workspace.image /workspace" ++ run "mkdir -p /workspace/vmcore /srv/nfs/vmcore" ++ run "touch /workspace/work_dir /workspace/vmcore/vmcore_dir" ++ run "mount --bind /workspace/vmcore /srv/nfs/vmcore" ++ run "echo '/srv/nfs/vmcore *(rw,no_root_squash)' > /etc/exports" ++ run "echo '/workspace *(rw,no_root_squash)' >> /etc/exports" ++ run "service_nfs restart" ++ #avoid issues restarting the server too quickly ++ sleep 10 ++ run "mount $host:/workspace $nfsmp" ++ run "ls $nfsmp/work_dir" ++ run "umount $nfsmp" ++ run "exportfs -au" && run "service_nfs stop" ++ run "umount /srv/nfs/vmcore" ++ run "umount /workspace" ++ run "rm -rf /workspace /srv/nfs/vmcore" ++ run "rm workspace.image" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-mount-nfsv4-show-wrong-port ++ run "echo '$expdir *(rw,no_root_squash)' >>/etc/exports" ++ run "service_nfs restart" ++ #avoid issues restarting the server too quickly ++ sleep 10 ++ run "exportfs -v" ++ run "mount -t nfs -o vers=4 localhost:$expdir $nfsmp" ++ run "mount -t nfs4 | grep $nfsmp" - ++ run "mount -t nfs4 | grep $nfsmp | grep -q port=2049" 0 "Should show port=2049" ++ run "umount $nfsmp" ++ run "echo '[nfsd]' > /etc/nfs.conf" ++ run "echo 'port=20050' >> /etc/nfs.conf" ++ run "service_nfs restart" ++ run "sleep 10" ++ run "rpcinfo -p | grep -w nfs | grep 20050" ++ run "mount -t nfs -o vers=4 localhost:$expdir $nfsmp" - ++ if [ $? -eq 0 ]; then ++ run "mount -t nfs4" - ++ run "mount -t nfs4 | grep -q port=20050" 0 "Should show port=20050" ++ run "umount $nfsmp" ++ fi ++ run "mount -t nfs -o vers=4,port=0 localhost:$expdir $nfsmp" - ++ if [ $? -eq 0 ]; then ++ run "mount -t nfs4" - ++ run "mount -t nfs4 | grep -q port=20050" 0 "Should show port=20050" ++ run "umount $nfsmp" ++ fi ++ run "mount -t nfs -o vers=4,port=20050 localhost:$expdir $nfsmp" ++ run "mount -t nfs4 | grep $nfsmp" - ++ run "mount -t nfs4 | grep $nfsmp | grep -q port=20050" 0 "Should show port=20050" ++ run "umount $nfsmp" ++ rlPhaseEnd ++ ++ rlPhaseStartCleanup do-Cleanup- ++ run 'rm -rf $expdir $nfsmp $subexpdir $tmpnfsmp' ++ rlFileRestore ++ run "service_nfs restart" ++ #avoid issues restarting the server too quickly ++ sleep 10 ++ rlPhaseEnd ++rlJournalEnd ++#rlJournalPrintText ++#enable_avc_check +diff --git a/tests/export-mount-local/subtest.yml b/tests/export-mount-local/subtest.yml +new file mode 100644 +index 0000000..1a77920 +--- /dev/null ++++ b/tests/export-mount-local/subtest.yml +@@ -0,0 +1 @@ ++attr: {ssched: yes} +diff --git a/tests/exportfs/PURPOSE b/tests/exportfs/PURPOSE +new file mode 100644 +index 0000000..3299ed8 +--- /dev/null ++++ b/tests/exportfs/PURPOSE +@@ -0,0 +1,2 @@ ++Description: test for command exportfs ++Author: Stevens Yin +diff --git a/tests/exportfs/_env b/tests/exportfs/_env +new file mode 100644 +index 0000000..b57092a +--- /dev/null ++++ b/tests/exportfs/_env +@@ -0,0 +1,7 @@ ++export TOPLEVEL_NAMESPACE=nfs-utils ++export PKG_NAMESPACE=nfs-utils ++export RELATIVE_PATH=exportfs ++export PACKAGE=nfs-utils ++export PACKAGE_NAME=nfs-utils ++export PKG_LIST=nfs-utils nfs-utils-lib libnfsidmap libsss_idmap libtirpc rpcbind ++export TEST=/nfs-utils/exportfs +diff --git a/tests/exportfs/runtest.sh b/tests/exportfs/runtest.sh +new file mode 100755 +index 0000000..8e34a8c +--- /dev/null ++++ b/tests/exportfs/runtest.sh +@@ -0,0 +1,313 @@ ++#!/bin/bash ++# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: test for command exportfs ++# Author: Stevens Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2013 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh ++. /usr/share/beakerlib/beakerlib.sh || exit 1 ++ ++#=============================================================================== ++ ++#setting locale as test check infomration on man pages ++export LC_ALL=en_US.utf8 ++ ++BZ=exportfs ++nfsmp=/mnt/nfsmp-$BZ ++expdir=/expdir-$BZ ++prog=exportfs ++ ++rlJournalStart ++ rlPhaseStartSetup do-Setup ++ # Load beakerlib you needed ++ rlImport kernel/base ++ envinfo ++ read IP4 _nil <<<$(getDefaultIp) ++ read IP6 _nil <<<$(getDefaultIp 6) ++ if echo "$HOSTNAME" | grep -q "localhost"; then ++ hostnamectl set-hostname exportfs.test ++ fi ++ #clean nfs garbage, avoid affect from pre case ++ { exportfs -ua; service nfs stop &>/dev/null; } ++ rlFileBackup /etc/sysconfig/nfs /etc/exports ++ rlFileBackup --clean /etc/exports.d/ ++ run 'rm -f /etc/exports.d/*' ++ run 'mkdir -p $nfsmp $expdir' ++ run 'echo "$expdir *(rw,no_root_squash,fsid=0)" > /etc/exports' ++ service_nfs start ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test"-$prog-with-wrong-option" ++ run 'exportfs -xxxx 2>&1' 1-255 "should exit with an error code" ++ run 'exportfs -xxxx 2>&1 | egrep -i "(usage:|try.*for more info)"' 0 "should output usage to user" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test"-$prog-IpV6" ++ run 'echo "[$IP6]:$expdir"' - ++ run 'exportfs -vi "[$IP6]:$expdir"' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-exportfs-a-and-o-check ++ run 'cp /etc/exports /etc/exports.bak' ++ run 'mkdir ${expdir}2' ++ run 'echo "${expdir}2 *(ro)" >>/etc/exports' ++ run 'exportfs -a' 0 "exportfs -a to export all directories" ++ run 'showmount -e' ++ run 'test $(showmount -e | grep $expdir | wc -l) = 2' 0 "there should be two expdir entries" ++ run 'exportfs -v' ++ run 'exportfs -v | sed -n -e "/\t/! {N; s/[\n\t]/ /g;p}" -e "/\t/p" | ++ grep "${expdir}2" | grep ro | grep -w root_squash' 0 "check the the export options" ++ ++ run 'exportfs -i -o rw,no_root_squash *:${expdir}2' 0 "exportfs -i -o override default export options" ++ run 'exportfs -v' ++ run 'exportfs -v | sed -n -e "/\t/! {N; s/[\n\t]/ /g;p}" -e "/\t/p" | ++ grep "${expdir}2" | grep rw | grep -w no_root_squash' 0 "check if the options be override" ++ run 'mv /etc/exports.bak /etc/exports' 0 "Restore /etc/exports" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-reexport-check ++ run 'exportfs -rv' 0 "exportfs -rv to reexport all directories" ++ run 'exportfs -v | grep "${expdir}2"' 1 "${expdir}2 removed from /etc/exports so no entry about it exported" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-exportfs-u-check ++ run 'exportfs -u' 0 "exportfs -u unexport one or more directories" ++ run 'showmount -e | grep "$expdir"' 0 "$expdir unexport" ++ run 'exportfs *:${expdir}2' ++ run 'exportfs' - ++ run "exportfs -v -u *:$expdir" 0 "unexport one directory only" ++ run 'exportfs' - ++ run "exportfs | grep '${expdir}2'" 0 "${expdir}2 should not be unexported" ++ run 'exportfs -ua' ++ run 'exportfs -f' 0 "exportfs -f flush everything out of the kernel?s export table" ++ run 'rm -rf ${expdir}2' ++ rlPhaseEnd ++ ++ # test NFS_MAXPATHLEN(1024) boundary value test ++ dname=$(echo {1..88}|sed 's/ /_/g') #dname with 254 chars ++ fpath=/$dname/$dname/$dname/$dname #fpath with 1020 chars ++ fpath2=/$dname/$dname/$dname/$dname/abc #fpath with 1024 chars ++ fpath3=/$dname/$dname/$dname/$dname/abckkkk #fpath with 1028 chars ++ rlPhaseStartTest do-Test-exportfs-pathlenth-${#fpath}-${#fpath2}-${#fpath3} ++ run "mkdir -p $fpath" 0 "create a long export path(${#fpath})" ++ run "mkdir -p $fpath2" 0 "create a long export path(${#fpath2})" ++ run "mkdir -p $fpath3" 0 "create a long export path(${#fpath3})" ++ run "exportfs -vi $IP4:$fpath &>std.log" 0 "exportfs long path(${#fpath}) should success" ++ run 'cat std.log' - ++ run 'grep "does not support NFS export" std.log' 1 ++ ++ run "exportfs -vi $IP4:$fpath2 &>std2.log" 0 "exportfs long path(${#fpath2}) should success" ++ run 'cat std2.log' - ++ run 'grep "does not support NFS export" std2.log' 1 ++ ++ run "exportfs -vi $IP4:$fpath3 &>std3.log" 1 "exportfs long path(${#fpath3}) should fail" ++ run 'cat std3.log' - ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-exportfs-dir-with-white-space ++ run 'mkdir -p "/dir with white spaces"' ++ run 'exportfs -vi $IP4:"/dir with white spaces"' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-exportfs-dir-invalid-arg-not-exist ++ run 'exportfs -ua; exportfs -i *:/not.exist &> stdout.log' 1-255 ++ run 'cat stdout.log' - ++ run 'test -n stdout.log' 0 "Path not exist, should output error info to user." ++ run 'cat stdout.log | grep -i usage' 0,1 "should output the usage for invalid argument" ++ run 'exportfs' - ++ run 'test -z "$(exportfs)"' 0,1 "should not exported the invalid path" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-exportfs-dir-without-uuid-and-fsid ++ run 'exportfs -ua; exportfs -i *:/dev/shm &> stdout.log' 1-255 ++ run 'cat stdout.log' - ++ run 'test -n stdout.log' 0 "Path no uuid and fsid, should output error info to user" ++ run 'exportfs' - ++ run 'test -z "$(exportfs)"' 0,1 "should not exported the invalid path" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-exportfs-when-/proc/fs/nfsd-not-mount ++ run 'mkdir -p ${expdir}_tmp' ++ run 'service nfs start' ++ run 'pkill rpc.mountd && umount /proc/fs/nfsd' ++ run 'exportfs -iv *:${expdir}_tmp' ++ run 'mount -t nfsd nfsd /proc/fs/nfsd' 0-255 "restore env: mount nfsd" ++ run 'rm -rf ${expdir}_tmp' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-option-nordirplus ++ #nfsv3 export option nordirplus support test ++ run 'service nfs start' ++ run 'exportfs -i -o nordirplus "*:$expdir"' ++ run 'mount -o vers=3 localhost:$expdir $nfsmp' ++ run 'grep $nfsmp /proc/mounts' ++ run 'grep nfs /proc/mounts | grep nordirplus' - ++ run 'man 5 exports | col -b | grep nordirplus' ++ run 'umount $nfsmp' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-extra-export.d-files-base ++ # test files under /etc/exports.d ++ run 'rm -rf /etc/exports.d' ++ run 'exportfs -r 2>&1 | grep "No such file or directory"' 1 "should not output garbage log" ++ run 'mkdir -p /etc/exports.d' ++ run 'echo "$expdir *(rw,no_root_squash)" > /etc/exports.d/test.exports' ++ run 'cp /etc/exports /etc/exports.bak' ++ run 'echo "" > /etc/exports' ++ run 'cat /etc/exports.d/test.exports' - ++ run 'exportfs -ua; exportfs -a' 0 "export all directories" ++ run 'showmount -e | grep $expdir' ++ run 'mount localhost:$expdir $nfsmp' ++ run 'grep $nfsmp /proc/mounts' ++ run 'umount $nfsmp' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-extra-export.d-files-max-filelen ++ name_max=$(getconf NAME_MAX $expdir) ++ min_export_sz=$(expr length ".exports") ++ max_export_len=$(($name_max-$min_export_sz)) ++ run 'mkdir ${expdir}.max_length' ++ run 'echo "${expdir}.max_length *(ro)" > /etc/exports.d/$(printf "%0${max_export_len}d").exports' ++ run 'ls -la /etc/exports.d/' - ++ run 'exportfs -rv' 0 "exportfs -rv to reexport all directories" ++ run 'showmount -e | grep "max_length"' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-extra-export.d-files-filename-format ++ run 'mkdir ${expdir}.should_ignored' ++ run 'echo "${expdir}.should_ignored *(rw)" > /etc/exports.d/.ignored.exports' ++ run 'echo "${expdir}.should_ignored *(rw)" > /etc/exports.d/ignored.export' ++ run 'echo "${expdir}.should_ignored *(rw)" > /etc/exports.d/exports' ++ run 'ls -la /etc/exports.d/' - ++ run 'exportfs -rv' 0 "exportfs -rv to reexport all directories" ++ run 'showmount -e | grep "should_ignored"' 1 ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-extra-export.d-files-filetype-link ++ run 'ln -s /etc/exports.d/ignored.export /etc/exports.d/linked.exports' ++ run 'ls -la /etc/exports.d/' - ++ run 'exportfs -rv' 0 "exportfs -rv to reexport all directories" ++ run 'showmount -e | grep "should_ignored"' 0 "should consider the link file" ++ run 'test $(showmount -e | grep $expdir | wc -l) = 3' 0 "there should be two expdir entries" ++ run 'rm -rf ${expdir}.*' ++ run 'rm -rf /etc/exports.d' ++ run 'mv /etc/exports.bak /etc/exports' 0 "Restore /etc/exports" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-option-mountpoint ++ run "service_nfs start" ++ run "exportfs -ua" ++ run "mkdir -p ${expdir}_share" ++ run "exportfs -i *:${expdir}_share -o mp" ++ run "exportfs -v" - ++ run "mountpoint ${expdir}_share" 1-255 "It is not mounted yet" ++ # The mount point will still show... but when trying to ++ # mount the directory the client mount should be failed ++ run "showmount -e | grep share" - ++ run "timeout 60 mount localhost:${expdir}_share $nfsmp" 1-123,125-255 "Should be failed without hang" ++ [ $? -eq 0 ] && run "umount $nfsmp" ++ log "{Info} Creating a small fs on loopback device and mount it." ++ run "dd if=/dev/zero of=fs_tmp.img bs=1M count=100" - ++ run "losetup /dev/loop0 fs_tmp.img" - ++ run "mkfs /dev/loop0" - ++ run "mount /dev/loop0 ${expdir}_share" ++ run "mountpoint ${expdir}_share" 0 "It should be mounted now" ++ run "showmount -e | grep share" 0 "Should be listed in output of showmount -e now" ++ run "mount localhost:${expdir}_share $nfsmp" 0 "Should success now" ++ [ $? -eq 0 ] && run "umount $nfsmp" ++ log "{Info} Recovering it." ++ run "service_nfs stop" ++ run "umount ${expdir}_share" ++ run "losetup -d /dev/loop0" - ++ run "rm -f fs_tmp.img" - ++ run "rm -rf ${expdir}_share" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"exportfs -u incorrectly exits with a 1 whenever the exportlist has multiple FQDN exports" ++ run "exportfs -ua" ++ run "exportfs -v" - ++ run "exportfs -o rw,sync localhost:$expdir" ++ run "exportfs -o rw,sync $IP4:$expdir" ++ run "exportfs -v" - ++ run 'test $(exportfs -v | grep $expdir | wc -l) = 2' ++ run "exportfs -u $IP4:$expdir" 0 "should not exit with 1 when the exportlist has multiple FQDN exports" ++ run "exportfs -v" - ++ run 'test $(exportfs -v | grep $expdir | wc -l) = 1' ++ run "exportfs -u localhost:$expdir" ++ run "exportfs -v" - ++ run 'test $(exportfs -v | grep $expdir | wc -l) = 0' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"exportfs -u cannot unexport when the specified path involves a trailing /" ++ run "exportfs -ua" ++ run "exportfs -o rw,sync localhost:$expdir" ++ run "exportfs -u not.exist:$expdir" 1-255 "should be failed and return error code" ++ run "exportfs -v" - ++ run "test $(exportfs | wc -l) -ne 0" 0 "Should not be cleared as previous cmd failed" ++ run "exportfs -u localhost:$expdir/" 0 "Should unexport even if path involves trailing /" ++ run "exportfs -v" - ++ run "test $(exportfs | wc -l) -eq 0" 0 "Should have nothing to export" ++ run "exportfs -ua" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"exportfs -u can exit with status 1 if there are multiple ip exports that cannot be resolved to hostnames" ++ # Should test with un-used ip address ++ run "ping -c 1 192.168.1.100 >/dev/null || ping -c 1 192.168.1.101 >/dev/null" 1 ++ [ "$?" = "0" ] && { ++ log "{WARN} Should test with un-used ip address, skip the test." ++ report_result $TEST FAIL ++ exit 0 ++ } ++ run "exportfs -ua && exportfs -v" - ++ log "{INFO} Test with ip that cannot be resolved to a hostname." ++ run "exportfs -o rw,sync 192.168.1.100:$expdir" ++ run "exportfs -o rw,sync 192.168.1.101:$expdir" ++ run "exportfs -v" - ++ run 'test $(exportfs -v | grep $expdir | wc -l) = 2' ++ run "exportfs -u 192.168.1.101:$expdir" 0 "Should not exit with 1 if unexports successfully." ++ run "exportfs -v" - ++ run 'test $(exportfs -v | grep $expdir | wc -l) = 1' ++ run "exportfs -u 192.168.1.100:$expdir" 0 "Should not exit with 1 if unexports successfully." ++ run "exportfs -v" - ++ run 'test $(exportfs -v | grep $expdir | wc -l) = 0' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-'exportfs: support "security_label" export option' ++ run "exportfs -ua && exportfs -v" - ++ run "exportfs -o security_label localhost:$expdir" ++ run "exportfs -v" - ++ run "exportfs -v | grep -q security_label" ++ run "exportfs -ua" ++ rlPhaseEnd ++ ++ rlPhaseStartCleanup do-Cleanup ++ rlFileRestore ++ if echo "$HOSTNAME" | grep -q "localhost"; then ++ hostnamectl set-hostname $HOSTNAME ++ fi ++ rm -rf $nfsmp $expdir ++ run "service_nfs restart" ++ rlPhaseEnd ++rlJournalEnd ++#rlJournalPrintText ++ +diff --git a/tests/mount/PURPOSE b/tests/mount/PURPOSE +new file mode 100644 +index 0000000..3c215eb +--- /dev/null ++++ b/tests/mount/PURPOSE +@@ -0,0 +1,2 @@ ++Description: Test for command mount.nfs{,4} ++Author: Stevens Yin +diff --git a/tests/mount/_env b/tests/mount/_env +new file mode 100644 +index 0000000..d016f7c +--- /dev/null ++++ b/tests/mount/_env +@@ -0,0 +1,7 @@ ++export TOPLEVEL_NAMESPACE=nfs-utils ++export PKG_NAMESPACE=nfs-utils ++export RELATIVE_PATH=mount ++export PACKAGE=nfs-utils ++export PACKAGE_NAME=nfs-utils ++export PKG_LIST=nfs-utils nfs-utils-lib libnfsidmap libsss_idmap libtirpc rpcbind ++export TEST=/nfs-utils//mount +diff --git a/tests/mount/runtest.sh b/tests/mount/runtest.sh +new file mode 100755 +index 0000000..fb2f585 +--- /dev/null ++++ b/tests/mount/runtest.sh +@@ -0,0 +1,113 @@ ++#!/bin/bash ++# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: Test for command mount.nfs{,4} ++# Author: Stevens Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2013 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh ++. /usr/share/beakerlib/beakerlib.sh || exit 1 ++ ++#=============================================================================== ++ ++mnt=/nfs-mount ++expdir=/expdir ++expdir_with_more_slash=$expdir///expdir-mount ++prog=mount.nfs ++ ++rlJournalStart ++ rlPhaseStartSetup do-Setup ++ # Load beakerlib you needed ++ rlImport kernel/base ++ envinfo ++ read IP4 _nil <<<$(getDefaultIp) ++ rlFileBackup /etc/sysconfig/nfs /etc/exports ++ run "mkdir -p $mnt $expdir $expdir_with_more_slash" ++ run "echo '$expdir *(rw,no_root_squash)' > /etc/exports" ++ run "echo '$expdir_with_more_slash *(rw,no_root_squash)' >> /etc/exports" ++ run 'service_nfs restart' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-$prog-with-wrong-option ++ run "$prog -xxxx" 1-255 "should exit with an error code" ++ run "$prog -xxxx 2>&1 | egrep -i '(usage:|try.*for more info)'" 0 "should output usage to user" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-$prog-without-args ++ run "$prog" 1-255 "should exit with an error code" ++ run "$prog 2>&1 | egrep -i '(usage:|try.*for more info)'" 0 "should output usage to user" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-$prog--h ++ run "$prog -h" - ++ std=$($prog -h 2>&1) ++ run "$prog -h 2>&1 | egrep -i usage:" 0 "should output usage to user" ++ [ $? = 0 ] && { ++ options=$(echo "$std"|grep -o '\[-[a-z]\+\]') ++ [ ${#options} -gt 3 ] && { ++ optionNuma=$((${#options} - 3)) ++ optionNumb=$(echo "$std" | sed -n "/\t-$options/p" | wc -l) ++ optionNumc=$(echo "$std" | sed -n "/\t-[a-zA-Z]/p" | wc -l) ++ run "test $optionNuma = $optionNumb" ++ run "test $optionNuma = $optionNumc" ++ run 'echo "$std" | sed -n "/\t-$options/p" | grep " "' 1 ++ } ++ } ++ rlPhaseEnd ++ ++if rpcinfo -p | awk '$2=="2"' | grep -q -w nfs; then ++ rlPhaseStartTest do-Test-$prog--o-vers=2 ++ run "$prog localhost:$expdir $mnt -o vers=2" ++ run "umount -vvv $mnt &> >(tee verbose.log)" ++ run 'test $(wc -l >(tee verbose.log)" ++ run 'test $(wc -l >(tee verbose.log)" ++ run 'test $(wc -l ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2006 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh ++. /usr/share/beakerlib/beakerlib.sh || exit 1 ++ ++#=============================================================================== ++ ++TESTNAME=${TEST/*\//} ++expdir=/exportdir/home ++nfsmp=/mnt/$TESTNAME ++ ++ORIGINAL_HOSTNAME=$HOSTNAME ++ ++rlJournalStart ++ rlPhaseStartSetup do-$role-Setup- ++ # Load beakerlib you needed ++ rlImport kernel/base ++ envinfo ++ rlFileBackup /etc/sysconfig/nfs /etc/exports ++ if echo "$HOSTNAME" | grep -q "localhost"; then ++ # In case "localhost.localdomain" ++ hostnamectl set-hostname nfs-mount-options-all.test ++ HOSTNAME=nfs-mount-options-all.test ++ fi ++ run 'rm -rf $expdir $nfsmp && mkdir -p $expdir $nfsmp' ++ run 'chmod 777 $expdir' ++ run 'echo "$expdir *(rw,sync,no_root_squash)" >/etc/exports' ++ run 'service_nfs restart' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-$role-Test-fg_bg_retry_devil ++ read IP4 _nil <<<$(getDefaultIp) ++ run 'iptables -F' - ++ MNT_OPTS="vers=3,soft,fg,retry=1" ++ log "{Info} Retry 1 minute (60s) NFS mount in *foreground* before giving up." ++ run 'iptables -A INPUT -s $IP4 -j DROP' - ++ run 'iptables -L' - ++ run 'sleep 10' ++ start_time=$(date +%s) ++ run "mount ${IP4}:$expdir $nfsmp -o ${MNT_OPTS}" 1-255 ++ retry_time=$((`date +%s` - start_time)) ++ log "{Info} Actually the nfs.mount hang $retry_time seconds." ++ run 'ps aux | grep -v grep | grep ${MNT_OPTS}' 1 ++ run 'iptables -F' - ++ run 'ip6tables -F' - ++ run 'mountpoint $nfsmp && umount $nfsmp' 1 ++ ++ MNT_OPTS="vers=3,soft,bg,retry=1" ++ log "{Info} Retry 1 minute (60s) NFS mount in *background* before giving up." ++ run 'iptables -A INPUT -s $IP4 -j DROP' - ++ run 'iptables -L' - ++ run 'sleep 10' ++ # When background exit and fork an childprocess, still, returns 0 ++ run "mount ${IP4}:$expdir $nfsmp -o ${MNT_OPTS}" 0 "should return ok" ++ if [ $? -eq 0 ]; then ++ # bg ground, the mount fork an child process ++ run 'ps aux | grep -v grep | grep ${MNT_OPTS}' 0 "works in bg.. show background process" ++ [ $? = 0 ] && { ++ log "{Info} We are sleeping a little longer than 60 seconds (retry=1)." ++ run "sleep $((retry_time + 10))" 0 "Actually a little more than $retry_time seconds." ++ # demo mounting process should exit after 60s as retry=1 (minute) ++ run 'ps aux | grep -v grep | grep ${MNT_OPTS}' 1 "retry=1 for 60s should works file after sleep 70s" ++ } ++ fi ++ run 'iptables -F' - ++ # should not mount successfully as it expired ++ run 'mountpoint $nfsmp && umount $nfsmp' 1 ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-retry-option-should-not-be-ignored ++ # test retry of the default value (2 minutes) for foreground - NFS(5) ++ run "service_nfs stop" ++ run "mount ${HOSTNAME}:$expdir $nfsmp &" ++ run "sleep 100 ; service_nfs start ; sleep 10" ++ run "nfsstat -m | grep $nfsmp" 0 ++ [ $? = 0 ] && run "umount $nfsmp" ++ ++ # test retry of 10 minutes for foreground ++ MNT_OPTS="retry=10" ++ log "\n{Info} ${MNT_OPTS}" ++ run "service_nfs stop" ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS} &" ++ run "sleep 10 ; service_nfs start ; sleep 10" ++ run "nfsstat -m | grep $nfsmp" 0 ++ [ $? = 0 ] && run "umount $nfsmp" ++ ++ # test retry of 100 minutes for background ++ MNT_OPTS="bg,retry=100" ++ log "\n{Info} ${MNT_OPTS}" ++ run "service_nfs stop" ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}" ++ run "sleep 10 ; service_nfs start ; sleep 10" ++ run "nfsstat -m | grep $nfsmp" ++ [ $? = 0 ] && run "umount $nfsmp" ++ ++ # test retry of the default value (10000 minutes) for background - NFS(5) ++ MNT_OPTS="bg" ++ log "\n{Info} ${MNT_OPTS}" ++ run "service_nfs stop" ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}" ++ run "sleep 10 ; service_nfs start ; sleep 10" ++ run "nfsstat -m | grep $nfsmp" ++ [ $? = 0 ] && run "umount $nfsmp" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-$role-Test-resvport_noresvport_test ++ run 'service_nfs restart' ++ MNT_OPTS="resvport" ++ log "{Info} ${MNT_OPTS}" ++ run 'mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}' 0 ++ run 'mountpoint $nfsmp && umount $nfsmp' ++ ++ MNT_OPTS="noresvport" ++ log "{Info} ${MNT_OPTS}" ++ run 'mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}' 1-255 "should got permission denied" ++ run 'mountpoint $nfsmp && umount $nfsmp' 1 ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-$role-Test-cache_nocache_test ++ MNT_OPTS="noac" ++ log "\n{Info} ${MNT_OPTS}" ++ run 'chmod 777 $expdir' ++ run 'touch $expdir/foo.txt && chmod 777 $expdir/foo.txt' ++ run 'service_nfs restart' ++ run 'mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}' 0 ++ [ $? -eq 0 ] && { ++ ATTR_TMP1=$(ls -al $nfsmp | grep foo.txt | awk '{ print $1 }') ++ chmod 666 $expdir/foo.txt ++ sleep 1 ++ ATTR_TMP2=$(ls -al $nfsmp | grep foo.txt | awk '{ print $1 }') ++ log "{Info} $ATTR_TMP1 ~ $ATTR_TMP2" ++ run "[ x"$ATTR_TMP1" != x"$ATTR_TMP2" ]" 0 "with noac, attribution should not cached" ++ } ++ run 'mountpoint $nfsmp && umount $nfsmp' ++ run 'rm -f $expdir/foo.txt' ++ ++ MNT_OPTS="ac,acregmin=20,acregmax=40,acdirmin=30,acdirmax=60" ++ log "\n{Info} ${MNT_OPTS}" ++ run 'touch $expdir/foo.txt && chmod 777 $expdir/foo.txt' ++ run 'mkdir $expdir/foo.dir && chmod 777 $expdir/foo.dir' ++ run 'mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}' ++ [ $? -eq 0 ] && { ++ ATTR_TMPREG1=$(ls -al $nfsmp | grep foo.txt | awk '{ print $1 }') ++ ATTR_TMPDIR1=$(ls -al $nfsmp | grep foo.dir | awk '{ print $1 }') ++ chmod 666 $expdir/foo.txt ++ chmod 555 $expdir/foo.dir ++ sleep 7 ++ ATTR_TMPREG2=$(ls -al $nfsmp | grep foo.txt | awk '{ print $1 }') ++ sleep 7 #7+7 ++ ATTR_TMPDIR2=$(ls -al $nfsmp | grep foo.dir | awk '{ print $1 }') ++ sleep 30 #7+7+30 ++ ATTR_TMPREG3=$(ls -al $nfsmp | grep foo.txt | awk '{ print $1 }') ++ sleep 20 #7+7+30+20 ++ ATTR_TMPDIR3=$(ls -al $nfsmp | grep foo.dir | awk '{ print $1 }') ++ ++ log "{Info} Regfile Attribution: $ATTR_TMPREG1 ~ $ATTR_TMPREG2 ~ $ATTR_TMPREG3" ++ run '[ x"$ATTR_TMPREG1" == x"$ATTR_TMPREG2" -a x"$ATTR_TMPREG1" != x"$ATTR_TMPREG3" ]' ++ ++ log "{Info} Directory Attribution: $ATTR_TMPDIR1 ~ $ATTR_TMPDIR2 ~ $ATTR_TMPDIR3" ++ run '[ x"$ATTR_TMPDIR1" == x"$ATTR_TMPDIR2" -a x"$ATTR_TMPDIR1" != x"$ATTR_TMPDIR3" ]' ++ } ++ run 'mountpoint $nfsmp && umount $nfsmp' ++ run 'rm -f $expdir/foo.txt' ++ run 'rm -rf $expdir/foo.dir' ++ ++ MNT_OPTS="ac,actimeo=20" ++ log "\n{Info} ${MNT_OPTS}" ++ run 'mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}' ++ [ $? -eq 0 ] && { ++ run 'grep ${TESTNAME} /proc/mounts | grep "acregmin=20" | grep "acregmax=20" | grep "acdirmin=20" | grep "acdirmax=20"' ++ } ++ run 'mountpoint $nfsmp && umount $nfsmp' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-$role-Test-sharecache_nosharecache_test ++ MNT_OPTS="vers=3,nosharecache" ++ MNT_OPTS="nosharecache,ac,acregmin=30,acregmax=60" ++ log "\n{Info} ${MNT_OPTS}" ++ run 'chmod 777 $expdir' ++ run 'touch $expdir/foo.txt && chmod 777 $expdir/foo.txt' ++ run 'mkdir -p $nfsmp-{1,2}' ++ run 'service_nfs restart' ++ ++ run 'mount ${HOSTNAME}:$expdir $nfsmp-1 -o ${MNT_OPTS} && ++ mount ${HOSTNAME}:$expdir $nfsmp-2 -o ${MNT_OPTS}' ++ [ $? = 0 ] && { ++ chmod 555 $nfsmp-1/foo.txt ++ sleep 1 ++ chmod 444 $nfsmp-2/foo.txt ++ ++ ATTR_TMPREG1=$(ls -al $nfsmp-1 | grep foo.txt | awk '{ print $1 }') ++ ATTR_TMPREG2=$(ls -al $nfsmp-2 | grep foo.txt | awk '{ print $1 }') ++ ATTR_TMPREG3=$(ls -al $expdir/ | grep foo.txt | awk '{ print $1 }') ++ ++ log "{Info} $ATTR_TMPREG1 ~ $ATTR_TMPREG2 ~ $ATTR_TMPREG3" ++ run '[ x"$ATTR_TMPREG1" == x"$ATTR_TMPREG2" -a x"$ATTR_TMPREG1" == x"$ATTR_TMPREG3" ]' ++ } ++ run 'mountpoint $nfsmp-1 && umount $nfsmp-1' ++ run 'mountpoint $nfsmp-2 && umount $nfsmp-2' ++ run 'rm -f $expdir/foo.txt' ++ run 'rm -rf $nfsmp-{1,2}' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-$role-Test-lookupcache_test ++ MNT_OPTS="ac,acdirmin=30,acdirmax=60,lookupcache=pos" ++ log "\n{Info} ${MNT_OPTS}" ++ run 'chmod 777 $expdir' ++ run 'mkdir -p $expdir/foodir && touch $expdir/foodir/foo-1.txt' ++ run 'service_nfs restart' ++ run 'mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}' ++ [ $? = 0 ] && { ++ run 'ls -l $nfsmp/foodir/ | grep foo-1.txt' ++ run 'rm -f $expdir/foodir/foo-1.txt' ++ run 'sleep 1' - ++ log "{Info} Checking again..." ++ run 'ls -l $nfsmp/foodir/ | grep foo-1.txt' 1 ++ run 'umount $nfsmp' ++ } ++ run 'rm -fr $expdir' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-$role-Test-rsize-wsize ++ minSize=1024 ++ minFixSize=4096 ++ #maxSize=1048576 ++ run "cat /proc/fs/nfsd/max_block_size" 0 "The default max block size varies depending on RAM size, with a maximum of 1M." ++ maxSize=$(cat /proc/fs/nfsd/max_block_size) ++ run 'mkdir -p $expdir' ++ run 'echo "$expdir *(rw,sync,no_root_squash)" > /etc/exports' ++ run 'service_nfs restart' ++ MNT_OPTS="rsize=1024,wsize=1024" ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}" ++ run 'grep $nfsmp /proc/mounts' - ++ run "cat /proc/mounts | grep -q $MNT_OPTS" ++ run 'umount $nfsmp' ++ MNT_OPTS="rsize=8192,wsize=8192" ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}" ++ run 'grep $nfsmp /proc/mounts' - ++ run "cat /proc/mounts | grep -q $MNT_OPTS" ++ run 'umount $nfsmp' ++ MNT_OPTS="rsize=1,wsize=255" # less than min_size($minSize) ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}" ++ run 'grep $nfsmp /proc/mounts' - ++ run "cat /proc/mounts | grep -q rsize=$minFixSize,wsize=$minFixSize" 0 "Specified values lower than $minSize are replaced with $minFixSize" ++ run 'umount $nfsmp' ++ MNT_OPTS="rsize=1048577,wsize=2048576" # great than max_size($maxSize) ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}" ++ run 'grep $nfsmp /proc/mounts' - ++ run "cat /proc/mounts | grep -q rsize=$maxSize,wsize=$maxSize" 0 "Specified values more than $maxSize are replaced with $maxSize" ++ run 'umount $nfsmp' ++ MNT_OPTS="rsize=0,wsize=0" ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}" ++ run 'grep $nfsmp /proc/mounts' - ++ run "cat /proc/mounts | grep -q rsize=$maxSize,wsize=$maxSize" 0 "Specified values more than $maxSize are replaced with $maxSize" ++ run 'umount $nfsmp' ++ MNT_OPTS="rsize=-1,wsize=-3" ++ run "mount ${HOSTNAME}:$expdir $nfsmp -o ${MNT_OPTS}" 1-255 ++ rlPhaseEnd ++ ++for V in $(ls_nfsvers); do ++ rlPhaseStartTest do-$role-NFS-mount-options-can-be-lost-when-using-bg-option-vers${V} ++ run 'service_nfs stop' ++ run 'mount -v -t nfs -o rw,bg,hard,nointr,tcp,vers=$V,timeo=600,rsize=32768,wsize=32768,actimeo=0,noac localhost:$expdir $nfsmp' ++ run 'service_nfs start' ++ run 'while ! grep -q $nfsmp /proc/mounts; do sleep 15; done' - ++ run 'grep $nfsmp /proc/mounts' ++ run 'grep $nfsmp /proc/mounts | grep -q "rw,sync"' ++ if [ "$V" = "2" ]; then ++ run 'grep $nfsmp /proc/mounts | grep -q "vers=$V,rsize=8192,wsize=8192"' ++ else ++ run 'grep $nfsmp /proc/mounts | grep -q "vers=$V,rsize=32768,wsize=32768"' ++ fi ++ run 'grep $nfsmp /proc/mounts | grep -q "acregmin=0,acregmax=0,acdirmin=0,acdirmax=0,hard,noac,proto=tcp"' ++ run 'grep $nfsmp /proc/mounts | grep -q "timeo=600,retrans=2,sec=sys"' ++ run "umount $nfsmp" ++ rlPhaseEnd ++done ++ ++ rlPhaseStartTest do-$role-Test-"mount-nfs-needs-descriptive-error-when-nfsvers-specified-incorrectly" ++ run "log=`mktemp -q`" 0 "Creating temporary log file" ++ log "{Info} Specify the invalid value." ++ for vers in {"v3","vers","+","*",""}; do ++ run "mount -t nfs -o vers=$vers localhost:$expdir $nfsmp 2>$log" 32 \ ++ "should be failed as expected using invalid value" ++ run "mount -t nfs -o nfsvers=$vers localhost:$expdir $nfsmp 2>>$log" 32 \ ++ "should be failed as expected using invalid value" ++ run "cat $log" - ++ run "egrep -q 'Bad nfs mount parameter|parsing error|invalid value' $log" ++ run ">$log" 0 "clear $log content" ++ done ++ log "{Info} Specify the valid number (maybe not supported)." ++ run "ls_nfsvers" - ++ for vers in {1,2,3,4,5,23}; do ++ if ls_nfsvers | grep -q "^$vers"; then ++ run "mount -t nfs -o vers=$vers localhost:$expdir $nfsmp" ++ run "umount $nfsmp" ++ run "mount -t nfs -o nfsvers=$vers localhost:$expdir $nfsmp" ++ run "umount $nfsmp" ++ else ++ run "mount -t nfs -o vers=$vers localhost:$expdir $nfsmp 2>$log" 32 \ ++ "should be failed as expected using unsupported version" ++ [ $? = 0 ] && run "umount $nfsmp" ++ run "mount -t nfs -o nfsvers=$vers localhost:$expdir $nfsmp 2>>$log" 32 \ ++ "should be failed as expected using unsupported version" ++ [ $? = 0 ] && run "umount $nfsmp" ++ run "cat $log" - ++ run "egrep -q 'not supported|parsing error|invalid value|call failed' $log" ++ run ">$log" 0 "clear $log content" ++ fi ++ done ++ run "rm -f $log" 0 "Remove temporary log file" ++ rlPhaseEnd ++ ++ rlPhaseStartCleanup do-$role-Cleanup- ++ run 'mountpoint $nfsmp && umount $nfsmp' 1 ++ hostnamectl set-hostname $ORIGINAL_HOSTNAME ++ run 'rm -rf $expdir $nfsmp' ++ rlFileRestore ++ run 'service_nfs restart' ++ rlPhaseEnd ++rlJournalEnd ++#rlJournalPrintText ++ +diff --git a/tests/systemd-nfs/PURPOSE b/tests/systemd-nfs/PURPOSE +new file mode 100644 +index 0000000..556df42 +--- /dev/null ++++ b/tests/systemd-nfs/PURPOSE +@@ -0,0 +1 @@ ++# nothing +diff --git a/tests/systemd-nfs/_env b/tests/systemd-nfs/_env +new file mode 100644 +index 0000000..d90f45d +--- /dev/null ++++ b/tests/systemd-nfs/_env +@@ -0,0 +1,7 @@ ++export TOPLEVEL_NAMESPACE=nfs-utils ++export PKG_NAMESPACE=nfs-utils ++export RELATIVE_PATH=systemd-nfs ++export PACKAGE=nfs-utils ++export PACKAGE_NAME=nfs-utils ++export PKG_LIST=nfs-utils nfs-utils-lib libnfsidmap libsss_idmap libtirpc rpcbind ++export TEST=/nfs-utils/systemd-nfs +diff --git a/tests/systemd-nfs/runtest.sh b/tests/systemd-nfs/runtest.sh +new file mode 100755 +index 0000000..227ec36 +--- /dev/null ++++ b/tests/systemd-nfs/runtest.sh +@@ -0,0 +1,287 @@ ++#!/bin/bash ++# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: test for: nfs ++# Author: Jianhong Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2014 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh ++. /usr/share/beakerlib/beakerlib.sh || exit 1 ++ ++#=============================================================================== ++ ++#signal trap ++trap "cleanup" SIGINT SIGTERM SIGHUP SIGQUIT ++cleanup() { ++ rlFileRestore ++ run 'service_nfsconfig restart' ++ #rm -rf $expdir $nfsmp ++} ++ ++#global var define ++serv=nfs ++rpm -q systemd || { ++ echo "{Warn} no systemd installed, skip the test" ++ report_result $TEST PASS ++ exit 0 ++} ++ ++rlJournalStart ++ rlPhaseStartSetup do-Setup- ++ # Load beakerlib you needed ++ rlImport kernel/base ++ envinfo ++ rlFileBackup /etc/exports /etc/sysconfig/nfs ++ run 'echo "/usr/share *(ro)" >/etc/exports' ++ run 'echo "RPCNFSDARGS=8" >/etc/sysconfig/nfs' 0 "avoid invalid config file" ++ run 'service_nfsconfig restart' 0 "RHEL-7.1 or later need restart nfs-config to reload /etc/sysconfig/nfs" ++ run "useradd testuserqa" - ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-start ++ run "service_$serv start" 0 "Service must start without problem" ++ run "service_$serv status" 0 "Then Status command" ++ run "service_$serv start" 0 "Already started service" ++ run "service_$serv status" 0 "Again status command" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-restart ++ run "service_$serv restart" 0 "Restarting of service" ++ run "service_$serv status" 0 "Status command" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-stop ++ run "service_$serv stop" 0 "Stopping service" ++ run "service_$serv status" 3 "Status of stopped service" ++ run "service_$serv stop" 0 "Stopping service again" ++ run "service_$serv status" 3 "Status of stopped service" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"insufficient-rights" ++ run "service_$serv restart " 0 "Starting service for restarting under nonpriv user" ++ run "su testuserqa -c 'service_$serv stop'" 1,4 "Insufficient rights, stopping service under nonprivileged user must fail" ++ run "su testuserqa -c 'service_$serv start'" 0,1,4 "Insufficient rights, starting service under nonprivileged user must fail or pass as already started" ++ run "su testuserqa -c 'service_$serv status'" 0 "Sufficient rights, service status should be accessible to nonprivileged users" ++ run "service_$serv stop" 0 "Stopping service for starting under nonpriv user" ++ run "su testuserqa -c 'service_$serv start'" 1,4 "Insufficient rights, starting of stopped service under nonprivileged user must fail" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"operations" ++ run "service_$serv start" 0 "Service have to implement start function" ++ run 'sleep 5' 0 "sleep a while avoid the start rate limit" ++ run "service_$serv restart" 0 "Service have to implement restart function" ++ run "service_$serv status" 0 "Service have to implement status function" ++ run 'sleep 5' 0 "sleep a while avoid the start rate limit" ++ run "service_$serv condrestart" 0 "Service have to implement condrestart function" ++ [ $? != 0 ] && run "journalctl -xn" - ++ run 'sleep 5' 0 "sleep a while avoid the start rate limit" ++ run "service_$serv try-restart" 0 "Service have to implement try-restart function" ++ [ $? != 0 ] && run "journalctl -xn" - ++ run "service_$serv reload" 0 "Service have to implement reload function" ++ [ $? != 0 ] && run "journalctl -xn" - ++ run "service_$serv force-reload" 0 "Service have to implement force-reload function" ++ [ $? != 0 ] && run "journalctl -xn" - ++ run "service_$serv noexistop" 2 "Testing proper return code when nonexisting function" ++ rlPhaseEnd ++ ++ # Should do nothing if a service is already stopped or not running (according to manpage of systemctl) ++ # http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT ++ rlPhaseStartTest do-Test-"operations-stopped" ++ run "service_$serv stop" 0 "Service have to implement stop function" ++ run "service_$serv condrestart" 0 "Service have to implement condrestart function" ++ run "service_$serv try-restart" 0 "Service have to implement try-restart function" ++ run "service_$serv force-reload" 0 "Service have to implement force-reload function" ++ run "service_$serv status" 3 "Above oprations should do nothing if service are not running" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-enable-disable-$serv ++ if systemctl --quiet is-enabled $serv; then ++ run "systemctl disable $serv" 0 "Disable service on boot" ++ run "systemctl is-enabled $serv" 1 "Check whether service is disabled" ++ run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "systemctl enable $serv" 0 "Enable service on boot" ++ run "systemctl is-enabled $serv" 0 "Check whether service is enabled" ++ run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ else ++ run "systemctl enable $serv" 0 "Enable service on boot" ++ run "systemctl is-enabled $serv" 0 "Check whether service is enabled" ++ run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "systemctl disable $serv" 0 "Disable service on boot" ++ run "systemctl is-enabled $serv" 1 "Check whether service is disabled" ++ run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ fi ++ rlPhaseEnd ++ ++ # ystemctl enable fails for symlinks in /usr/lib/systemd/system ++ # Use a workaround to test enable/disable with nfs-server.service ++ rlPhaseStartTest do-Test-enable-disable-nfs-server ++ if systemctl --quiet is-enabled nfs-server; then ++ run "systemctl disable nfs-server" 0 "Disable nfs-serverice on boot" ++ run "systemctl is-enabled nfs-server" 1 "Check whether nfs-serverice is disabled" ++ run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "systemctl enable nfs-server" 0 "Enable nfs-serverice on boot" ++ run "systemctl is-enabled nfs-server" 0 "Check whether nfs-serverice is enabled" ++ run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ else ++ run "systemctl enable nfs-server" 0 "Enable nfs-serverice on boot" ++ run "systemctl is-enabled nfs-server" 0 "Check whether nfs-serverice is enabled" ++ run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "systemctl disable nfs-server" 0 "Disable nfs-serverice on boot" ++ run "systemctl is-enabled nfs-server" 1 "Check whether nfs-serverice is disabled" ++ run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ fi ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-nfsv4-only ++ run 'service nfs stop' ++ # MOUNTD_NFS_V2 MOUNTD_NFS_V3 was not supported in RHEL-7.x ++ run 'echo -e "RPCMOUNTDOPTS=\"-N 2 -N 3\"" >>/etc/sysconfig/nfs' 0 "enabling nfsv4 only" ++ # If in RHEL-7.1 or later need restart nfs-config service to flush /etc/sysconfig/nfs to /run/sysconfig/nfs-utils ++ # But since RHEL-7.3, nfs-config change to be ru-run during the dependent service starting ++ run 'service_nfsconfig status &>/dev/null && service_nfsconfig restart' - ++ run 'cat /run/sysconfig/nfs-utils | grep RPCMOUNTDARGS | grep "\""' 0 "quote variable in /run/sysconfig/nfs-utils" ++ run 'sleep 5' 0 "sleep a while avoid service script bug" ++ run 'service_nfs start' ++ run 'rpcinfo -s | grep -w mountd' 1 "if nfsv4 only, no mountd info in rpcinfo" ++ rlFileRestore /etc/sysconfig/nfs ++ run 'service_nfsconfig restart' ++ rlPhaseEnd ++ ++ # Since nfs-service no longer starts the daemons in question. They are now split ++ # into their own services (nfs-mountd.service, rpc-statd.service, nfs-idmapd.service). ++ # Then `systemctl status nfs-server.service` cannot accurately reflect the ++ # state of the combination of daemons that are needed for a working NFS server. ++ rlPhaseStartTest do-Test-"nfs-server-is-active-even-processes-terminated" ++ run 'service_nfs restart' ++ run 'pkill rpc.mountd' - ++ run 'killall -9 nfsd' - ++ run 'ps axf | grep -e "rpc.mountd" -e "nfsd"' - ++ run 'service nfs-mountd status' 1-255 ++ run 'rpcinfo -t localhost 100005' 1 "pings mountd" ++ log '{Info} nfsserver resource agent has been updated to monitor all its daemons' ++ run 'service_nfs status' 1-255,0 ++ run 'service_nfs status 2>&1 | grep "active"' - ++ run 'service_nfs stop' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"should-auto-mount-/proc/fs/nfsd" ++ run 'service_nfs restart' ++ run 'service_nfs stop' ++ run 'umount /proc/fs/nfsd' ++ run 'service_nfs start 2>&1 | grep "mount -t nfsd"' 1 "should auto mount nfsd" ++ run 'mount -t nfsd nfsd /proc/fs/nfsd' - ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"use-rpcbind.service-in-nfs-server.service" ++ run "systemctl reset-failed" 0 "workaround for failure of starting too often" ++ log "{Info} Starting nfs while rpcbind is stopped" ++ run "service rpcbind stop; service rpcbind stop" 0 "stop twice as workaround" ++ run "service rpcbind status" 3 "rpcbind.service should be stopped" ++ run "service nfs restart" ++ run "service nfs status" 0 "should start nfs successfully" ++ run "service rpcbind status" 0 "starting nfs should bring rpcbind up" ++ ++ log "{Info} Starting nfs while rpcbind is active" ++ run "service rpcbind start" ++ run "service rpcbind status" 0 "rpcbind should be active" ++ run "service nfs restart" ++ run "service nfs status" 0 "should start nfs successfully" ++ run "service rpcbind status" 0 "starting nfs should keep rpcbind up" ++ ++ log "{Info} Stopping nfs while rpcbind is active" ++ run "service rpcbind start" ++ run "service rpcbind status" 0 "rpcbind should be active" ++ run "service nfs start; service nfs status" ++ run "service nfs stop; service nfs status" 3 ++ run "service rpcbind status" 0 "stopping nfs should keep rpcbind up" ++ ++ log "{Info} Stopping nfs while rpcbind is stopped" ++ run "service nfs start" 0 "firstly start nfs since it can bring rpcbind up" ++ run "service nfs status" 0 "should start nfs successfully" ++ run "service rpcbind stop; service rpcbind stop" 0 "stop twice as workaround" ++ run "service rpcbind status" 3 "rpcbind should be stopped" ++ run "service nfs stop" ++ # If a daemon tries to connect to port 111 systemd will start rpcbind automaticly ++ run "service rpcbind status" 0 "stopping nfs should bring rpcbind up" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"restarting rpbind also restart the the nfs server" ++ run "systemctl reset-failed" 0 "workaround for failure of starting too often" ++ log "{Info} Starting rpcbind while nfs is stopped" ++ run "service nfs stop" ++ run "service nfs status" 3 "nfs should be stopped" ++ run "service rpcbind restart" ++ run "service nfs status" 3 "starting rpcbind should NOT bring nfs up" ++ ++ log "{Info} Starting rpcbind while nfs is active" ++ run "service nfs start" ++ run "service nfs status" 0 "nfs should be active" ++ run "service rpcbind restart" ++ run "service nfs status" 0 "starting rpcbind should NOT interfere nfs" ++ ++ log "{Info} Stopping rpcbind while nfs is active" ++ run "service nfs start" ++ run "service nfs status" 0 "nfs should be active" ++ run "service rpcbind start; service rpcbind stop" ++ run "service nfs status" 0 "stopping rpcbind should NOT bring nfs down" ++ ++ log "{Info} Stopping rpcbind while nfs is stopped" ++ run "service nfs stop" ++ run "service nfs status" 3 "nfs should be stopped" ++ run "service rpcbind start; service rpcbind stop" ++ run "service nfs status" 3 "stopping rpcbind should NOT interfere nfs" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-fix-long-nfsd-startup-delay-in-absence-of-rpcbind ++ run "systemctl stop rpcbind" ++ run "systemctl stop nfs-server" ++ run "systemctl mask rpcbind" 0 "Mask systemd service rpcbind.service" ++ run "timeLimitRun 10 systemctl start nfs-server" 1-255 "Start service nfs-server without rpcbind will be failed due to systemd unit dependency" ++ run "systemctl unmask rpcbind" ++ run "timeLimitRun 10 systemctl stop nfs-server" - ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"nfs-utils need to cause gssproxy reload" ++ run "cp /etc/gssproxy/gssproxy.conf /etc/gssproxy/gssproxy.conf.backup" 0 "backuping" ++ run "echo '[gssproxy]' > /etc/gssproxy/gssproxy.conf" ++ run "echo 'debug = true' >> /etc/gssproxy/gssproxy.conf" ++ run "systemctl restart gssproxy" ++#FIXME when BZ#1535424 is fixed. Should not use /var/log/messages as it is not used on Fedora any more. ++ run "echo '' > /var/log/messages" ++ run "systemctl restart nfs" ++ run "systemctl status nfs" ++ run "systemctl status gssproxy" ++ run "cat /var/log/messages | grep 'gssproxy:'" - ++ run "cat /var/log/messages | grep -q 'gssproxy:.*loaded'" 0 "should re-reading config" ++ run "mv /etc/gssproxy/gssproxy.conf.backup /etc/gssproxy/gssproxy.conf" 0 "recovering" ++ run "systemctl restart gssproxy" ++ rlPhaseEnd ++ ++ rlPhaseStartCleanup do-Cleanup- ++ run "userdel -rf testuserqa" - ++ rlFileRestore ++ run 'timeLimitRun 10 service_nfsconfig restart' ++ rlPhaseEnd ++ ++rlJournalEnd ++#rlJournalPrintText ++#enable_avc_check +diff --git a/tests/systemd-nfs/subtest.yml b/tests/systemd-nfs/subtest.yml +new file mode 100644 +index 0000000..705c8b0 +--- /dev/null ++++ b/tests/systemd-nfs/subtest.yml +@@ -0,0 +1,2 @@ ++attr: {ssched: yes.dangerous} ++attr: {ssched: yes.dangerous}, setup: [--kernel-options=ipv6.disable=1] +diff --git a/tests/tests.yml b/tests/tests.yml +new file mode 100644 +index 0000000..8b5bd0d +--- /dev/null ++++ b/tests/tests.yml +@@ -0,0 +1,20 @@ ++--- ++# Tests that run in classic context ++- hosts: localhost ++ roles: ++ - role: standard-test-rhts ++ use_beakerlib_libraries: yes ++ tags: ++ - classic ++ tests: ++ - exportfs ++ - export-mount-local ++ - mount ++ - nfs-mount-options-all ++ - systemd-nfs ++ - umount ++ required_packages: ++ - bind-utils # export-mount-local needs this package ++ - findutils # beakerlib needs find command ++ - nfs-utils ++ - redhat-lsb-core # lsb_release is needed by tests +diff --git a/tests/umount/PURPOSE b/tests/umount/PURPOSE +new file mode 100644 +index 0000000..9f896d5 +--- /dev/null ++++ b/tests/umount/PURPOSE +@@ -0,0 +1,2 @@ ++Description: Test for command umount.nfs{,4} ++Author: Stevens Yin +diff --git a/tests/umount/_env b/tests/umount/_env +new file mode 100644 +index 0000000..dd7d64f +--- /dev/null ++++ b/tests/umount/_env +@@ -0,0 +1,7 @@ ++export TOPLEVEL_NAMESPACE=nfs-utils ++export PKG_NAMESPACE=nfs-utils ++export RELATIVE_PATH=umount ++export PACKAGE=nfs-utils ++export PACKAGE_NAME=nfs-utils ++export PKG_LIST=nfs-utils nfs-utils-lib libnfsidmap libsss_idmap libtirpc rpcbind ++export TEST=/nfs-utils/umount +diff --git a/tests/umount/runtest.sh b/tests/umount/runtest.sh +new file mode 100644 +index 0000000..8dee5c7 +--- /dev/null ++++ b/tests/umount/runtest.sh +@@ -0,0 +1,122 @@ ++#!/bin/bash ++# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: Test for command umount.nfs{,4} ++# Author: Stevens Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2013 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh ++. /usr/share/beakerlib/beakerlib.sh || exit 1 ++ ++#=============================================================================== ++ ++mnt=/nfs-mount ++expDir=/expDir ++prog=umount.nfs ++ ++rlJournalStart ++ rlPhaseStartSetup do-Setup ++ # Load beakerlib you needed ++ rlImport kernel/base ++ envinfo ++ read IP4 _nil <<<$(getDefaultIp) ++ rlFileBackup /etc/sysconfig/nfs /etc/exports ++ run "mkdir -p $mnt $expDir" ++ run "echo '$expDir *(rw,no_root_squash,fsid=0)' > /etc/exports" ++ run 'service_nfs restart' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-$prog-with-wrong-option ++ run "$prog -xxxx" 1-255 "should exit with an error code" ++ run "$prog -xxxx 2>&1 | egrep -i '(usage:|try.*for more info)'" 0 "should output usage to user" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-$prog-without-args ++ run "$prog" 1-255 "should exit with an error code" ++ run "$prog 2>&1 | egrep -i '(usage:|try.*for more info)'" 0 "should output usage to user" ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-$prog--h ++ run "$prog -h" - ++ std=$($prog -h 2>&1) ++ run "$prog -h 2>&1 | egrep -i usage:" ++ [ $? = 0 ] && { ++ options=$(echo "$std"|grep -o '\[-[a-z]\+\]') ++ [ ${#options} -gt 3 ] && { ++ optionNuma=$((${#options} - 3)) ++ optionNumb=$(echo "$std" | sed -n "/\t-$options/p" | wc -l) ++ optionNumc=$(echo "$std" | sed -n "/\t-[a-zA-Z]/p" | wc -l) ++ run "test $optionNuma = $optionNumb" ++ run "test $optionNuma = $optionNumc" ++ run 'echo "$std" | sed -n "/\t-$options/p" | grep " "' 1 ++ } ++ } ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-Cannot-umount-NFS-mp-with-spaces ++ serv=localhost ++ expdirWithSpaces="/expdir with spaces" ++ nfsmpWithSpaces="/mnt/nfsmp with spaces" ++ run 'mkdir -p "$expdirWithSpaces" "$nfsmpWithSpaces"' ++ run 'echo "\"$expdirWithSpaces\" *(rw,no_root_squash,fsid=0)" > /etc/exports' ++ run 'service_nfs restart' ++ run 'service_nfs restart 2>&1 | grep "expdir with spaces does not support"' 1 \ ++ "exportfs give incorrect message for mount dir containing spaces" ++ run 'mount -t nfs "$serv:$expdirWithSpaces" "$nfsmpWithSpaces"' 0 "mount dir with spaces" ++ run 'grep "$nfsmpWithSpaces" /proc/mounts' - ++ run 'umount "$nfsmpWithSpaces"' 0 "umount dir with spaces" ++ run 'grep "$nfsmpWithSpaces" /proc/mounts' 1 "cat /proc/mounts and umount successfully" ++ run 'rm -rf "$expdirWithSpaces" "$nfsmpWithSpaces"' ++ rlPhaseEnd ++ ++ rlPhaseStartTest do-Test-"[nfsv3] umount.nfs: Failed to find '' protocol" ++ log "{Info} Creating a small (separate) fs on a loopback device." ++ run "dd if=/dev/zero of=fs.img bs=1M count=1000" - ++ run "losetup /dev/loop0 fs.img" - ++ run "mkfs.ext4 /dev/loop0" - ++ run "mkdir $expDir/foo" ++ run "mount /dev/loop0 $expDir/foo" ++ log "{Info} Listing the contents of the directory to trigger a submount." ++ run "echo '$expDir *(crossmnt)' > /etc/exports" ++ run "service_nfs restart" ++ run "mount localhost:$expDir $mnt -o vers=3" ++ run "ls $mnt/foo" ++ run "cat /proc/mounts | grep $mnt" - ++ run "umount $mnt/foo &>stdout.log" ++ run "cat stdout.log" - ++ run "cat stdout.log | grep -q 'Failed'" 1 "should not output error msg" ++ run "umount $mnt" ++ log "{Info} Recovering it." ++ run "service_nfs stop" ++ run "umount $expDir/foo" ++ run "rm -rf $expDir/foo" ++ run "losetup -d /dev/loop0" - ++ run "rm -f fs.img" - ++ rlPhaseEnd ++ ++ rlPhaseStartCleanup do-Cleanup ++ rlFileRestore ++ rm -rf $mnt $expDir ++ rlPhaseEnd ++rlJournalEnd ++#rlJournalPrintText ++ + +From 5218121ee7e9c9ed75f3d1b91bae0b2a15f154b2 Mon Sep 17 00:00:00 2001 +From: Bruno Goncalves +Date: Jan 17 2019 20:02:54 +0000 +Subject: [PATCH 2/6] fixed some test issues + + +--- + +diff --git a/tests/exportfs/runtest.sh b/tests/exportfs/runtest.sh +index 8e34a8c..69d9532 100755 +--- a/tests/exportfs/runtest.sh ++++ b/tests/exportfs/runtest.sh +@@ -48,7 +48,7 @@ rlJournalStart + hostnamectl set-hostname exportfs.test + fi + #clean nfs garbage, avoid affect from pre case +- { exportfs -ua; service nfs stop &>/dev/null; } ++ { exportfs -ua; service_nfs stop &>/dev/null; } + rlFileBackup /etc/sysconfig/nfs /etc/exports + rlFileBackup --clean /etc/exports.d/ + run 'rm -f /etc/exports.d/*' +@@ -148,7 +148,7 @@ rlJournalStart + + rlPhaseStartTest do-Test-exportfs-when-/proc/fs/nfsd-not-mount + run 'mkdir -p ${expdir}_tmp' +- run 'service nfs start' ++ run 'service_nfs start' + run 'pkill rpc.mountd && umount /proc/fs/nfsd' + run 'exportfs -iv *:${expdir}_tmp' + run 'mount -t nfsd nfsd /proc/fs/nfsd' 0-255 "restore env: mount nfsd" +@@ -157,7 +157,7 @@ rlJournalStart + + rlPhaseStartTest do-Test-option-nordirplus + #nfsv3 export option nordirplus support test +- run 'service nfs start' ++ run 'service_nfs start' + run 'exportfs -i -o nordirplus "*:$expdir"' + run 'mount -o vers=3 localhost:$expdir $nfsmp' + run 'grep $nfsmp /proc/mounts' +diff --git a/tests/systemd-nfs/runtest.sh b/tests/systemd-nfs/runtest.sh +index 227ec36..63d8593 100755 +--- a/tests/systemd-nfs/runtest.sh ++++ b/tests/systemd-nfs/runtest.sh +@@ -38,7 +38,7 @@ cleanup() { + } + + #global var define +-serv=nfs ++serv=nfs-server + rpm -q systemd || { + echo "{Warn} no systemd installed, skip the test" + report_result $TEST PASS +diff --git a/tests/tests.yml b/tests/tests.yml +index 8b5bd0d..865464b 100644 +--- a/tests/tests.yml ++++ b/tests/tests.yml +@@ -2,7 +2,7 @@ + # Tests that run in classic context + - hosts: localhost + roles: +- - role: standard-test-rhts ++ - role: standard-test-beakerlib + use_beakerlib_libraries: yes + tags: + - classic +@@ -16,5 +16,6 @@ + required_packages: + - bind-utils # export-mount-local needs this package + - findutils # beakerlib needs find command ++ - iptables # nfs-mount-options-all needs this package + - nfs-utils + - redhat-lsb-core # lsb_release is needed by tests + +From 69a4cec52d5d1803bfa88670501b4f8d1dcd9481 Mon Sep 17 00:00:00 2001 +From: Bruno Goncalves +Date: Jan 18 2019 17:24:32 +0000 +Subject: [PATCH 3/6] sync export-mount-local and systemd-nfs with tests from QE + + +--- + +diff --git a/tests/export-mount-local/Makefile b/tests/export-mount-local/Makefile +new file mode 100644 +index 0000000..6ddfa94 +--- /dev/null ++++ b/tests/export-mount-local/Makefile +@@ -0,0 +1,76 @@ ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: test for: export-mount ++# Author: Jianhong Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2014 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++#Generate and export TEST= PACKAGE= ++TENV=_env ++ifeq ($(PKG_TOP_DIR),) ++ export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ export _TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ -include $(PKG_TOP_DIR)/env.mk ++endif ++include $(TENV) ++ifeq ($(_TOP_DIR),) ++ _TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE) ++endif ++#=============================================================================== ++export TESTVERSION=1.0 ++ ++BUILT_FILES= ++FILES=$(TENV) $(METADATA) runtest.sh Makefile PURPOSE ++ ++.PHONY: all install download clean ++ ++run: $(FILES) build ++ ( set +o posix; [ -e /usr/bin/rhts_environment.sh ] && . /usr/bin/rhts_environment.sh; \ ++. /usr/share/beakerlib/beakerlib.sh || exit 1; \ ++. runtest.sh ) ++ ++build: $(BUILT_FILES) ++ test -x runtest.sh || chmod a+x runtest.sh ++ ++clean: ++ rm -f *~ $(BUILT_FILES) ++ ++-include /usr/share/rhts/lib/rhts-make.include ++ ++$(METADATA): Makefile ++ @echo "Owner: Jianhong Yin " > $(METADATA) ++ @echo "Name: $(TEST)" >> $(METADATA) ++ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) ++ @echo "Path: $(TEST_DIR)" >> $(METADATA) ++ @echo "Description: test for: export-mount" >> $(METADATA) ++ @echo "Type: function" >> $(METADATA) ++ @echo "Type: $(PACKAGE)-level-tier1" >> $(METADATA) ++ @echo "TestTime: 30m" >> $(METADATA) ++ @echo "RunFor: $(PACKAGE)" >> $(METADATA) ++ @echo "Requires: $(PACKAGE)" >> $(METADATA) ++ @echo "Priority: Normal" >> $(METADATA) ++ @echo "License: GPLv2" >> $(METADATA) ++ @echo "Requires: library(kernel/base)" >> $(METADATA) ++ @echo "Requires: nfs-utils" >> $(METADATA) ++ @echo "Requires: bind-utils" >> $(METADATA) ++ @echo "RhtsRequires: library(kernel/base)" >> $(METADATA) ++ rhts-lint $(METADATA) +diff --git a/tests/export-mount-local/runtest.sh b/tests/export-mount-local/runtest.sh +index e72e0f4..60d0c90 100755 +--- a/tests/export-mount-local/runtest.sh ++++ b/tests/export-mount-local/runtest.sh +@@ -1,39 +1,43 @@ + #!/bin/bash + # vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-# +-# Description: test for: export-mount ++# Description: test for: export-mount-local + # Author: Jianhong Yin +-# + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # + # Copyright (c) 2014 Red Hat, Inc. + # +-# This program is free software: you can redistribute it and/or +-# modify it under the terms of the GNU General Public License as +-# published by the Free Software Foundation, either version 2 of +-# the License, or (at your option) any later version. ++# This copyrighted material is made available to anyone wishing ++# to use, modify, copy, or redistribute it subject to the terms ++# and conditions of the GNU General Public License version 2. + # + # This program is distributed in the hope that it will be + # useful, but WITHOUT ANY WARRANTY; without even the implied + # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +-# PURPOSE. See the GNU General Public License for more details. ++# PURPOSE. See the GNU General Public License for more details. + # +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see http://www.gnu.org/licenses/. ++# You should have received a copy of the GNU General Public ++# License along with this program; if not, write to the Free ++# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++# Boston, MA 02110-1301, USA. + # + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + [ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh + . /usr/share/beakerlib/beakerlib.sh || exit 1 + ++# Load beakerlib you needed ++rlImport kernel/base ++envinfo ++#disable_avc_check ++ + #=============================================================================== + + #signal trap + trap "cleanup" SIGINT SIGTERM SIGHUP SIGQUIT + cleanup() { +- rlFileRestore +- rm -rf $expdir $nfsmp ++ rlFileRestore ++ rm -rf $expdir $nfsmp + } + + #global var define +@@ -41,202 +45,180 @@ BZ=exp-mount-local + expdir=/exportDir-$BZ + nfsmp=/mnt/nfsmp-$BZ + subexpdir=/exportDir-$BZ/sub +-tmpnfsmp=/tmp/nfsmp-$BZ ++tmpnfsmp=${nfsmp}-tmp + +-host="$HOSTNAME" ++read ipv4 _nil <<<$(getDefaultIp) ++read ipv6s _nil <<<$(getDefaultIp 6) ++ipv6="[$ipv6s]" + # in case "localhost.localdomain" +-echo "$host" | grep -q "localhost" && host="localhost" ++if echo "$HOSTNAME" | grep -q "localhost"; then ++ ORIGINAL_HOSTNAME="$HOSTNAME" ++ HOSTNAME="$BZ" ++ hostnamectl set-hostname "$HOSTNAME" ++fi ++host="$HOSTNAME" + + rlJournalStart + rlPhaseStartSetup do-Setup- +- # Load beakerlib you needed +- rlImport kernel/base +- read ipv4 _nil <<<$(getDefaultIp) +- read ipv6s _nil <<<$(getDefaultIp 6 global) +- ipv6="[$ipv6s]" +- envinfo +- rlFileBackup /etc/exports /etc/sysconfig/nfs /etc/nfs.conf /etc/hosts +- if [ "$host" = "localhost" ]; then ++ rlFileBackup /etc/{exports,auto.master} /etc/sysconfig/{nfs,autofs} /etc/nfs.conf /etc/hosts ++ if [ -n "ORIGINAL_HOSTNAME" ]; then + run "echo '$ipv4 $host' >> /etc/hosts" +- if [ -n "$ipv6s" ]; then +- run "echo '$ipv6s $host' >> /etc/hosts" +- fi ++ run "echo '$ipv6s $host' >> /etc/hosts" + run "cat /etc/hosts" - + fi +- run 'rm -rf $expdir $nfsmp && mkdir -p $expdir $nfsmp' +- run 'rm -rf $subexpdir $tmpnfsmp && mkdir -p $subexpdir $tmpnfsmp' +- run 'echo "/tmp *(ro,sync)" >/etc/exports' +- run 'service_nfs restart' +- #avoid issues restarting the server too quickly +- sleep 10 +- run 'ls_nfsvers' ++ run "rm -rf $expdir $nfsmp && mkdir -p $expdir $nfsmp" ++ run "rm -rf $subexpdir $tmpnfsmp && mkdir -p $subexpdir $tmpnfsmp" ++ run "service_nfs restart" ++ run "ls_nfsvers" + rlPhaseEnd + +-for V in $(ls_nfsvers); do +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-ipv4 +- run "exportfs -au && exportfs -iv $ipv4:$expdir -o ro,sync,no_root_squash" +- run 'mount -o vers=$V $ipv4:$expdir $nfsmp' +- run 'umount $nfsmp' +- rlPhaseEnd +- if [ -n "$ipv6s" ]; then ++ for V in $(ls_nfsvers); do ++ # export by IPv4 and try to mount it ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-ipv4 ++ run "exportfs -au && exportfs -iv $ipv4:$expdir -o ro,sync,no_root_squash" ++ run "mount -o vers=$V $ipv4:$expdir $nfsmp" ++ run "umount $nfsmp" ++ rlPhaseEnd + rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-ipv6-x +- run 'mount -o vers=$V $ipv6:$expdir $nfsmp' 1-255 +- [ $? = 0 ] && run "umount $nfsmp" ++ if [ -n "$ipv6s" ]; then ++ run "mount -o vers=$V $ipv6:$expdir $nfsmp" 1-255 ++ [ $? = 0 ] && run "umount $nfsmp" ++ fi ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-host-bz876847 ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "umount $nfsmp" + rlPhaseEnd +- fi +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-host +- run 'mount -o vers=$V $host:$expdir $nfsmp' +- run 'umount $nfsmp' +- rlPhaseEnd + +- if [ -n "$ipv6s" ]; then +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-ipv6 +- run "exportfs -au && exportfs -iv $ipv6:$expdir -o ro,sync,no_root_squash" +- run 'mount -o vers=$V $ipv6:$expdir $nfsmp' +- run 'umount $nfsmp' ++ if [ -n "$ipv6s" ]; then ++ # export by IPv6 and try to mount it ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-ipv6 ++ run "exportfs -au && exportfs -iv $ipv6:$expdir -o ro,sync,no_root_squash" ++ run "mount -o vers=$V $ipv6:$expdir $nfsmp" ++ run "umount $nfsmp" ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-ipv4-x ++ run "mount -o vers=$V $ipv4:$expdir $nfsmp" 1-255 ++ [ $? = 0 ] && run "umount $nfsmp" ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-host ++ run "dig -t aaaa $HOSTNAME +short" 0 "To get the IPv6 address" ++ if [ -n "$ipv6s" ]; then ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "umount $nfsmp" ++ fi ++ rlPhaseEnd ++ fi ++ ++ # export by hostname and try to mount it ++ rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-host ++ run "exportfs -au && exportfs -iv $host:$expdir -o ro,sync,no_root_squash" ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "umount $nfsmp" + rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-ipv4-x +- run 'mount -o vers=$V $ipv4:$expdir $nfsmp' 1-255 +- [ $? = 0 ] && run "umount $nfsmp" ++ rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-ipv4 ++ run "mount -o vers=$V $ipv4:$expdir $nfsmp" ++ run "umount $nfsmp" + rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-host +- if [ -n "$(dig -t aaaa $HOSTNAME +short)" ]; then +- run 'mount -o vers=$V $host:$expdir $nfsmp' +- run 'umount $nfsmp' ++ rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-ipv6 ++ run "dig -t aaaa $HOSTNAME +short" 0 "To get the IPv6 address" ++ if [ -n "$ipv6s" ]; then ++ run "mount -o vers=$V $ipv6:$expdir $nfsmp" ++ run "umount $nfsmp" + fi + rlPhaseEnd +- fi + +- rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-host +- run "exportfs -au && exportfs -iv $host:$expdir -o ro,sync,no_root_squash" +- run 'mount -o vers=$V $host:$expdir $nfsmp' +- run 'umount $nfsmp' +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-ipv4 +- run 'mount -o vers=$V $ipv4:$expdir $nfsmp' +- run 'umount $nfsmp' +- rlPhaseEnd +- if [ -n "$ipv6s" ]; then +- rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-ipv6 +- if [ -n "$(dig -t aaaa $HOSTNAME +short)" ]; then +- run 'mount -o vers=$V $ipv6:$expdir $nfsmp' +- run 'umount $nfsmp' ++ # export sub-directory by IPv4 and try to mount it ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-ipv4 ++ run "echo '$expdir *(ro,sync,no_root_squash)' >/etc/exports" ++ run "echo '$subexpdir $ipv4(ro,sync,no_root_squash)' >>/etc/exports" ++ which systemctl >/dev/null 2>&1 && run "systemctl reset-failed" ++ run "service_nfs restart" ++ run "showmount -e" - ++ run "mount -o vers=$V $ipv4:$expdir $nfsmp" ++ run "mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp" ++ run "umount $nfsmp $tmpnfsmp" ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-ipv6-x-bz1198900 ++ if [ -n "$ipv6s" ]; then ++ run "mount -o vers=$V $ipv6:$expdir $nfsmp" ++ run "mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp" 1-255 "bz1198900 should not mount sub-directory with different ip" ++ [ $? = 0 ] && run "umount $tmpnfsmp" ++ run "umount $nfsmp" + fi + rlPhaseEnd +- fi +- +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-ipv4 +- run 'echo "$expdir *(ro,sync,no_root_squash)" >/etc/exports' +- run 'echo "$subexpdir $ipv4(ro,sync,no_root_squash)" >>/etc/exports' +- run 'service_nfs restart' +- #avoid issues restarting the server too quickly +- sleep 10 +- run 'showmount -e' - +- run 'mount -o vers=$V $ipv4:$expdir $nfsmp' +- run 'mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp' +- run 'umount $nfsmp $tmpnfsmp' +- rlPhaseEnd +- if [ -n "$ipv6s" ]; then +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-ipv6-x +- run 'mount -o vers=$V $ipv6:$expdir $nfsmp' +- run 'mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp' 1-255 "should not mount sub-directory with different ip" +- [ $? = 0 ] && run "umount $tmpnfsmp" +- run "umount $nfsmp" ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-host ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "mount -o vers=$V $host:$subexpdir $tmpnfsmp" ++ run "umount $nfsmp $tmpnfsmp" + rlPhaseEnd +- fi +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-host +- run 'mount -o vers=$V $host:$expdir $nfsmp' +- run 'mount -o vers=$V $host:$subexpdir $tmpnfsmp' +- run 'umount $nfsmp $tmpnfsmp' +- rlPhaseEnd + +- if [ -n "$ipv6s" ]; then +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-ipv4-x +- run 'echo "$expdir *(ro,sync,no_root_squash)" >/etc/exports' +- run 'echo "$subexpdir $ipv6s(ro,sync,no_root_squash)" >>/etc/exports' +- run 'service_nfs restart' +- #avoid issues restarting the server too quickly +- sleep 10 +- run 'showmount -e' - +- run 'mount -o vers=$V $ipv4:$expdir $nfsmp' +- run 'mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp' 1-255 "should not mount sub-directory with different ip" +- [ $? = 0 ] && run "umount $tmpnfsmp" +- run "umount $nfsmp" ++ if [ -n "$ipv6s" ]; then ++ # export sub-directory by IPv6 and try to mount it ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-ipv4-x-bz1198900 ++ run "echo '$expdir *(ro,sync,no_root_squash)' >/etc/exports" ++ run "echo '$subexpdir $ipv6s(ro,sync,no_root_squash)' >>/etc/exports" ++ which systemctl >/dev/null 2>&1 && run "systemctl reset-failed" ++ run "service_nfs restart" ++ run "showmount -e" - ++ run "mount -o vers=$V $ipv4:$expdir $nfsmp" ++ run "mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp" 1-255 "bz1198900 should not mount sub-directory with different ip" ++ [ $? = 0 ] && run "umount $tmpnfsmp" ++ run "umount $nfsmp" ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-ipv6 ++ run "mount -o vers=$V $ipv6:$expdir $nfsmp" ++ run "mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp" ++ run "umount $nfsmp $tmpnfsmp" ++ rlPhaseEnd ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-host ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "mount -o vers=$V $host:$subexpdir $tmpnfsmp" ++ run "umount $nfsmp $tmpnfsmp" ++ rlPhaseEnd ++ fi ++ ++ # export sub-directory by hostname and try to mount it ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-ipv4 ++ run "echo '$expdir *(ro,sync,no_root_squash)' >/etc/exports" ++ run "echo '$subexpdir $host(ro,sync,no_root_squash)' >>/etc/exports" ++ which systemctl >/dev/null 2>&1 && run "systemctl reset-failed" ++ run "service_nfs restart" ++ run "showmount -e" - ++ run "mount -o vers=$V $ipv4:$expdir $nfsmp" ++ run "mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp" ++ run "umount $nfsmp $tmpnfsmp" + rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-ipv6 +- run 'mount -o vers=$V $ipv6:$expdir $nfsmp' +- run 'mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp' +- run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-ipv6 ++ if [ -n "$ipv6s" ]; then ++ run "mount -o vers=$V $ipv6:$expdir $nfsmp" ++ run "mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp" ++ run "umount $nfsmp $tmpnfsmp" ++ fi + rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-host +- run 'mount -o vers=$V $host:$expdir $nfsmp' +- run 'mount -o vers=$V $host:$subexpdir $tmpnfsmp' +- run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-host ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "mount -o vers=$V $host:$subexpdir $tmpnfsmp" ++ run "umount $nfsmp $tmpnfsmp" + rlPhaseEnd +- fi + +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-ipv4 +- run 'echo "$expdir *(ro,sync,no_root_squash)" >/etc/exports' +- run 'echo "$subexpdir $host(ro,sync,no_root_squash)" >>/etc/exports' +- run 'service_nfs restart' +- #avoid issues restarting the server too quickly +- sleep 10 +- run 'showmount -e' - +- run 'mount -o vers=$V $ipv4:$expdir $nfsmp' +- run 'mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp' +- run 'umount $nfsmp $tmpnfsmp' +- rlPhaseEnd +- if [ -n "$ipv6s" ]; then +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-ipv6 +- run 'mount -o vers=$V $ipv6:$expdir $nfsmp' +- run 'mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp' +- run 'umount $nfsmp $tmpnfsmp' ++ rlPhaseStartTest do-Test-nfsV$V-default-option-overridden-by-client-specific-option ++ run "echo '$expdir -ro,sync *(rw,no_root_squash)' >/etc/exports" ++ run "service_nfs restart" ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "touch $nfsmp/testfile && mkdir $nfsmp/testdir" 0 "exports option should be overridden by client specific." ++ run "rm -rf $nfsmp/test*" ++ run "umount $nfsmp" ++ run "echo '$expdir -ro,sec=sys,sync *(rw,no_root_squash)' >/etc/exports" 0 "sec=sys may cause it to be failed." ++ run "exportfs -rv" ++ run "mount -o vers=$V $host:$expdir $nfsmp" ++ run "touch $nfsmp/testfile && mkdir $nfsmp/testdir" 0 "bz1359042 exports option should be overridden by client specific." ++ run "rm -rf $nfsmp/test*" ++ run "umount $nfsmp" + rlPhaseEnd +- fi +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-host +- run 'mount -o vers=$V $host:$expdir $nfsmp' +- run 'mount -o vers=$V $host:$subexpdir $tmpnfsmp' +- run 'umount $nfsmp $tmpnfsmp' +- rlPhaseEnd +- +- rlPhaseStartTest do-Test-nfsV$V-default-option-overridden-by-client-specific-option +- run "echo '$expdir -ro,sync *(rw,no_root_squash)' >/etc/exports" +- run "service_nfs restart" +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "touch $nfsmp/testfile && mkdir $nfsmp/testdir" 0 "exports option should be overridden by client specific." +- run "rm -rf $nfsmp/test*" +- run "umount $nfsmp" +- run "echo '$expdir -ro,sec=sys,sync *(rw,no_root_squash)' >/etc/exports" 0 "sec=sys may cause it to be failed." +- run "exportfs -rv" +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "touch $nfsmp/testfile && mkdir $nfsmp/testdir" 0 "exports option should be overridden by client specific." +- run "rm -rf $nfsmp/test*" +- run "umount $nfsmp" +- rlPhaseEnd +-done ++ done + +- rlPhaseStartTest do-Test-exports-options-twice +- run 'echo "/ *(sync,hide,no_wdelay)" > /etc/exports' +- run "service_nfs restart" +- #avoid issues restarting the server too quickly +- sleep 10 +- +- # Count all options from list printed by exportfs -s(rhel-7) or exportfs -v(rhel-6) +- allOptions=$( (exportfs -s 2>/dev/null || exportfs -v) | sed 's/^.*(//;s/)$//;s/,/\n/g' | wc -l) +- # Count unique options from list printed by exportfs -s(rhel-7) or exportfs -v(rhel-6) +- uniqOptions=$( (exportfs -s 2>/dev/null || exportfs -v) | sed 's/^.*(//;s/)$//;s/,/\n/g' | sort | uniq | wc -l) +- +- log "{Info} exportfs -s(rhel-7) or exportfs -v(rhel-6) will print option list for each export path" +- log "{Info} All options printed by exportfs -s(rhel-7) or exportfs -v(rhel-6) (sorted):" +- run "(exportfs -s 2>/dev/null || exportfs -v) | sed 's/^.*(//;s/)$//;s/,/\n/g' | sort" +- log "{Info} For exported path '/', there are $allOptions options printed in all options list and $uniqOptions of them are unique" +- run 'test $uniqOptions -eq $allOptions' 0 "Should not output any options twice, quantity of all options should be equal to quantity of unique options" +- for opt in sync hide no_wdelay; do +- run "(exportfs -s 2>/dev/null || exportfs -v) | grep -q $opt" 0 "Option list should contain option $opt specified in /etc/exports" +- done +- rlPhaseEnd +- +- rlPhaseStartTest do-Test-server-side-using-bind-mount ++ rlPhaseStartTest do-Test-bz1479135-server-side-using-bind-mount + run "dd if=/dev/zero of=workspace.image bs=3M count=500" + run "mkfs -t ext3 -F workspace.image" + run "mkdir -p /workspace" +@@ -247,8 +229,6 @@ done + run "echo '/srv/nfs/vmcore *(rw,no_root_squash)' > /etc/exports" + run "echo '/workspace *(rw,no_root_squash)' >> /etc/exports" + run "service_nfs restart" +- #avoid issues restarting the server too quickly +- sleep 10 + run "mount $host:/workspace $nfsmp" + run "ls $nfsmp/work_dir" + run "umount $nfsmp" +@@ -259,45 +239,103 @@ done + run "rm workspace.image" + rlPhaseEnd + +- rlPhaseStartTest do-Test-mount-nfsv4-show-wrong-port +- run "echo '$expdir *(rw,no_root_squash)' >>/etc/exports" +- run "service_nfs restart" +- #avoid issues restarting the server too quickly +- sleep 10 +- run "exportfs -v" +- run "mount -t nfs -o vers=4 localhost:$expdir $nfsmp" +- run "mount -t nfs4 | grep $nfsmp" - +- run "mount -t nfs4 | grep $nfsmp | grep -q port=2049" 0 "Should show port=2049" +- run "umount $nfsmp" +- run "echo '[nfsd]' > /etc/nfs.conf" +- run "echo 'port=20050' >> /etc/nfs.conf" +- run "service_nfs restart" +- run "sleep 10" +- run "rpcinfo -p | grep -w nfs | grep 20050" +- run "mount -t nfs -o vers=4 localhost:$expdir $nfsmp" - +- if [ $? -eq 0 ]; then +- run "mount -t nfs4" - +- run "mount -t nfs4 | grep -q port=20050" 0 "Should show port=20050" +- run "umount $nfsmp" +- fi +- run "mount -t nfs -o vers=4,port=0 localhost:$expdir $nfsmp" - +- if [ $? -eq 0 ]; then +- run "mount -t nfs4" - +- run "mount -t nfs4 | grep -q port=20050" 0 "Should show port=20050" +- run "umount $nfsmp" +- fi +- run "mount -t nfs -o vers=4,port=20050 localhost:$expdir $nfsmp" +- run "mount -t nfs4 | grep $nfsmp" - +- run "mount -t nfs4 | grep $nfsmp | grep -q port=20050" 0 "Should show port=20050" +- run "umount $nfsmp" ++ rlPhaseStartTest do-Test-bz1465259-mount-nfsv4-show-wrong-port ++ run "echo '$expdir *(rw,no_root_squash)' > /etc/exports" ++ run "service_nfs restart" ++ run "exportfs -v" ++ run "mount -t nfs -o vers=4 localhost:$expdir $nfsmp" ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "cat /proc/mounts | grep $nfsmp | grep -q 'port='" 1 "Omit displaying 'port=' by default" ++ run "mount -o remount,ro $nfsmp" ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "cat /proc/mounts | grep $nfsmp | grep -q 'port='" 1 "Omit displaying 'port=' by default" ++ run "umount $nfsmp" ++ if [ -e "/etc/nfs.conf" ]; then ++ echo "[nfsd]" > /etc/nfs.conf ++ echo "port=20050" >> /etc/nfs.conf ++ run "cat /etc/nfs.conf" - ++ run "service_nfs restart" ++ run "sleep 10" ++ run "rpcinfo -p | grep -w nfs | grep 20050" ++ run "mount -t nfs4 -o port=20050 localhost:$expdir $nfsmp" ++ if [ $? -eq 0 ]; then ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "cat /proc/mounts | grep $nfsmp | grep -q port=20050" 0 "Should show port=20050" ++ run "mount -o remount,ro $nfsmp" ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "cat /proc/mounts | grep $nfsmp | grep -q port=20050" 0 "Should show port=20050" ++ run "umount $nfsmp" ++ fi ++ log "{Info} If NFS service is not available on the specified port" ++ run "mount -t nfs4 -o port=2049 localhost:$expdir $nfsmp" 1-255 ++ if [ $? -eq 0 ]; then ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "umount $nfsmp" ++ fi ++ log "{Info} If port value is not specified" ++ if ls_nfsvers | grep -q -w 3; then ++ run "mount -t nfs -o vers=3 localhost:$expdir $nfsmp" 0 "for v2/v3 client uses port advertised by server's rpcbind service" ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "umount $nfsmp" ++ fi ++ run "mount -t nfs -o vers=4 localhost:$expdir $nfsmp" 1-255 "for v4 client uses the standard NFS port (2049) without checking" ++ if [ $? -eq 0 ]; then ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "umount $nfsmp" ++ fi ++ log "{Info} If the specified port value is 0" ++ run "mount -t nfs -o vers=4,port=0 localhost:$expdir $nfsmp" ++ if [ $? -eq 0 ]; then ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "cat /proc/mounts | grep $nfsmp | grep -q port=0" 0 "Should show port=0" ++ run "umount $nfsmp" ++ fi ++ run "echo '' > /etc/nfs.conf" 0 "Recovering" ++ fi + rlPhaseEnd + ++ if ls_nfsvers | grep -q -w "4.0"; then ++ rlPhaseStartTest do-Test-bz1592915-sanity-check-clientaddr-during-mount ++ run "echo '$expdir *(rw,no_root_squash)' > /etc/exports" ++ run "service_nfs restart" ++ run "exportfs -v" ++ log "{Info} Mounting v4.0 by default" ++ run "mount -o vers=4,minorversion=0 localhost:$expdir $nfsmp -v" ++ if [ $? -eq 0 ]; then ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "umount $nfsmp" ++ fi ++ log "{Info} Setting 'clientaddr=' not match any local address" ++ # use normal mode (no verbose) to check the emitted warning ++ run "mount -o vers=4,minorversion=0,clientaddr=1.2.3.4 localhost:$expdir $nfsmp &> >(tee stdout.log)" ++ if [ $? -eq 0 ]; then ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "umount $nfsmp" ++ fi ++ run "cat stdout.log | grep -q '[warning].*not match any existing network addresses'" 0 "Should warn the administrators" ++ log "{Info} Specifying IPv4_ANY (0.0.0.0) signifying client does not want delegations" ++ run "mount -o vers=4,minorversion=0,clientaddr=0.0.0.0 localhost:$expdir $nfsmp -v" ++ if [ $? -eq 0 ]; then ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "umount $nfsmp" ++ fi ++ log "{Info} Specifying IPv6_ANY (::0) signifying client does not want delegations" ++ run "mount -o vers=4,minorversion=0,clientaddr=::0 localhost:$expdir $nfsmp -v" ++ if [ $? -eq 0 ]; then ++ run "cat /proc/mounts | grep $nfsmp" - ++ run "umount $nfsmp" ++ fi ++ rlPhaseEnd ++ fi ++ + rlPhaseStartCleanup do-Cleanup- +- run 'rm -rf $expdir $nfsmp $subexpdir $tmpnfsmp' ++ run "rm -rf $expdir $nfsmp $subexpdir $tmpnfsmp" + rlFileRestore + run "service_nfs restart" +- #avoid issues restarting the server too quickly +- sleep 10 ++ if [ -n "ORIGINAL_HOSTNAME" ]; then ++ HOSTNAME="$ORIGINAL_HOSTNAME" ++ hostnamectl set-hostname "$HOSTNAME" ++ fi + rlPhaseEnd + rlJournalEnd + #rlJournalPrintText +diff --git a/tests/exportfs/Makefile b/tests/exportfs/Makefile +new file mode 100644 +index 0000000..d367651 +--- /dev/null ++++ b/tests/exportfs/Makefile +@@ -0,0 +1,79 @@ ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: test for command exportfs ++# Author: Stevens Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2013 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++TENV=_env ++ifeq ($(PKG_TOP_DIR),) ++ export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ export _TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ -include $(PKG_TOP_DIR)/env.mk ++endif ++include $(TENV) ++ifeq ($(_TOP_DIR),) ++ _TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE) ++endif ++#=============================================================================== ++ ++export TESTVERSION=1.0 ++ ++BUILT_FILES= ++ ++FILES=$(TENV) $(METADATA) runtest.sh Makefile PURPOSE ++ ++.PHONY: all install download clean ++ ++run: $(FILES) build ++ ( set +o posix; [ -e /usr/bin/rhts_environment.sh ] && . /usr/bin/rhts_environment.sh; \ ++. /usr/share/beakerlib/beakerlib.sh; \ ++. runtest.sh ) ++ ++build: $(BUILT_FILES) ++ test -x runtest.sh || chmod a+x runtest.sh ++ ++clean: ++ rm -f *~ $(BUILT_FILES) ++ ++ ++-include /usr/share/rhts/lib/rhts-make.include ++ ++$(METADATA): Makefile ++ @echo "Owner: Stevens Yin " > $(METADATA) ++ @echo "Name: $(TEST)" >> $(METADATA) ++ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) ++ @echo "Path: $(TEST_DIR)" >> $(METADATA) ++ @echo "Description: test for command exportfs" >> $(METADATA) ++ @echo "Type: Regression" >> $(METADATA) ++ @echo "TestTime: 30m" >> $(METADATA) ++ @echo "RunFor: $(PACKAGE)" >> $(METADATA) ++ @echo "Requires: $(PACKAGE)" >> $(METADATA) ++ @echo "Requires: library(kernel/base)" >> $(METADATA) ++ @echo "RhtsRequires: library(kernel/base)" >> $(METADATA) ++ @echo "Priority: Normal" >> $(METADATA) ++ @echo "License: GPLv2" >> $(METADATA) ++ @echo "Confidential: no" >> $(METADATA) ++ @echo "Destructive: no" >> $(METADATA) ++ ++ rhts-lint $(METADATA) ++ +diff --git a/tests/mount/Makefile b/tests/mount/Makefile +new file mode 100644 +index 0000000..412b640 +--- /dev/null ++++ b/tests/mount/Makefile +@@ -0,0 +1,79 @@ ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: Test for command mount.nfs{,4} ++# Author: Stevens Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2013 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++TENV=_env ++ifeq ($(PKG_TOP_DIR),) ++ export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ export _TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ -include $(PKG_TOP_DIR)/env.mk ++endif ++include $(TENV) ++ifeq ($(_TOP_DIR),) ++ _TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE) ++endif ++#=============================================================================== ++ ++export TESTVERSION=1.0 ++ ++BUILT_FILES= ++ ++FILES=$(TENV) $(METADATA) runtest.sh Makefile PURPOSE ++ ++.PHONY: all install download clean ++ ++run: $(FILES) build ++ ( set +o posix; [ -e /usr/bin/rhts_environment.sh ] && . /usr/bin/rhts_environment.sh; \ ++. /usr/share/beakerlib/beakerlib.sh; \ ++. runtest.sh ) ++ ++build: $(BUILT_FILES) ++ test -x runtest.sh || chmod a+x runtest.sh ++ ++clean: ++ rm -f *~ $(BUILT_FILES) ++ ++ ++-include /usr/share/rhts/lib/rhts-make.include ++ ++$(METADATA): Makefile ++ @echo "Owner: Stevens Yin " > $(METADATA) ++ @echo "Name: $(TEST)" >> $(METADATA) ++ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) ++ @echo "Path: $(TEST_DIR)" >> $(METADATA) ++ @echo "Description: Test for command mount.nfs{,4}" >> $(METADATA) ++ @echo "Type: Regression" >> $(METADATA) ++ @echo "TestTime: 30m" >> $(METADATA) ++ @echo "RunFor: $(PACKAGE)" >> $(METADATA) ++ @echo "Requires: $(PACKAGE)" >> $(METADATA) ++ @echo "Requires: library(kernel/base)" >> $(METADATA) ++ @echo "RhtsRequires: library(kernel/base)" >> $(METADATA) ++ @echo "Priority: Normal" >> $(METADATA) ++ @echo "License: GPLv2" >> $(METADATA) ++ @echo "Confidential: no" >> $(METADATA) ++ @echo "Destructive: no" >> $(METADATA) ++ ++ rhts-lint $(METADATA) ++ +diff --git a/tests/nfs-mount-options-all/Makefile b/tests/nfs-mount-options-all/Makefile +new file mode 100644 +index 0000000..afc24cc +--- /dev/null ++++ b/tests/nfs-mount-options-all/Makefile +@@ -0,0 +1,77 @@ ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: Test for nfs mount options ++# Author: Bill Peck ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2006 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++TENV=_env ++ifeq ($(PKG_TOP_DIR),) ++ export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ export _TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ -include $(PKG_TOP_DIR)/env.mk ++endif ++include $(TENV) ++ifeq ($(_TOP_DIR),) ++ _TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE) ++endif ++#=============================================================================== ++ ++ ++export TESTVERSION=0.1 ++ ++.PHONY: all install download clean ++ ++METADATA=testinfo.desc ++BUILT_FILES= # built executables should be added here ++FILES=$(TENV) $(METADATA) runtest.sh Makefile ++ ++build: $(BUILT_FILES) ++ chmod a+x ./runtest.sh ++ ++clean: ++ rm -f .*.swp *~ $(BUILT_FILES) ++ ++run: $(FILES) build ++ ( set +o posix; [ -e /usr/bin/rhts_environment.sh ] && . /usr/bin/rhts_environment.sh; \ ++. /usr/share/beakerlib/beakerlib.sh; \ ++. runtest.sh ) ++ ++-include /usr/share/rhts/lib/rhts-make.include ++# Generate the testinfo.desc here: ++$(METADATA): Makefile ++ @touch $(METADATA) ++ @echo "Owner: Nicol TAO" > $(METADATA) ++ @echo "Name: $(TEST)" >> $(METADATA) ++ @echo "Path: $(TEST_DIR)" >> $(METADATA) ++ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) ++ @echo "Description: nfs general mount options supported by all nfs versions" >> $(METADATA) ++ @echo "TestTime: 45m" >> $(METADATA) ++ @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) ++ @echo "RunFor: nfs-utils" >> $(METADATA) ++ @echo "Requires: $(PACKAGE_NAME)" >> $(METADATA) ++ @echo "Requires: library(kernel/base)" >> $(METADATA) ++ @echo "Requires: nfs-utils" >> $(METADATA) ++ @echo "RhtsRequires: library(kernel/base)" >> $(METADATA) ++ @echo "Priority: Medium" >> $(METADATA) ++ @echo "Type: Regression" >> $(METADATA) ++ @echo "License: GPL" >> $(METADATA) +diff --git a/tests/systemd-nfs/Makefile b/tests/systemd-nfs/Makefile +new file mode 100644 +index 0000000..111c1fc +--- /dev/null ++++ b/tests/systemd-nfs/Makefile +@@ -0,0 +1,74 @@ ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: test for: nfs ++# Author: Jianhong Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2014 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++#Generate and export TEST= PACKAGE= ++TENV=_env ++ifeq ($(PKG_TOP_DIR),) ++ export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ export _TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ -include $(PKG_TOP_DIR)/env.mk ++endif ++include $(TENV) ++ifeq ($(_TOP_DIR),) ++ _TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE) ++endif ++#=============================================================================== ++export TESTVERSION=1.0 ++ ++BUILT_FILES= ++FILES=$(TENV) $(METADATA) runtest.sh Makefile PURPOSE ++ ++.PHONY: all install download clean ++ ++run: $(FILES) build ++ ( set +o posix; [ -e /usr/bin/rhts_environment.sh ] && . /usr/bin/rhts_environment.sh; \ ++. /usr/share/beakerlib/beakerlib.sh || exit 1; \ ++. runtest.sh ) ++ ++build: $(BUILT_FILES) ++ test -x runtest.sh || chmod a+x runtest.sh ++ ++clean: ++ rm -f *~ $(BUILT_FILES) ++ ++-include /usr/share/rhts/lib/rhts-make.include ++ ++$(METADATA): Makefile ++ @echo "Owner: Jianhong Yin " > $(METADATA) ++ @echo "Name: $(TEST)" >> $(METADATA) ++ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) ++ @echo "Path: $(TEST_DIR)" >> $(METADATA) ++ @echo "Description: test for: nfs" >> $(METADATA) ++ @echo "Type: regression" >> $(METADATA) ++ @echo "Type: $(PACKAGE)-level-tier1" >> $(METADATA) ++ @echo "TestTime: 30m" >> $(METADATA) ++ @echo "RunFor: $(PACKAGE)" >> $(METADATA) ++ @echo "Requires: $(PACKAGE)" >> $(METADATA) ++ @echo "Priority: Normal" >> $(METADATA) ++ @echo "License: GPLv2" >> $(METADATA) ++ @echo "Requires: nfs-utils" >> $(METADATA) ++ @echo "RhtsRequires: library(kernel/base)" >> $(METADATA) ++ rhts-lint $(METADATA) +diff --git a/tests/systemd-nfs/runtest.sh b/tests/systemd-nfs/runtest.sh +old mode 100755 +new mode 100644 +index 63d8593..ec2d219 +--- a/tests/systemd-nfs/runtest.sh ++++ b/tests/systemd-nfs/runtest.sh +@@ -1,40 +1,44 @@ + #!/bin/bash + # vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-# + # Description: test for: nfs + # Author: Jianhong Yin +-# + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # + # Copyright (c) 2014 Red Hat, Inc. + # +-# This program is free software: you can redistribute it and/or +-# modify it under the terms of the GNU General Public License as +-# published by the Free Software Foundation, either version 2 of +-# the License, or (at your option) any later version. ++# This copyrighted material is made available to anyone wishing ++# to use, modify, copy, or redistribute it subject to the terms ++# and conditions of the GNU General Public License version 2. + # + # This program is distributed in the hope that it will be + # useful, but WITHOUT ANY WARRANTY; without even the implied + # warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +-# PURPOSE. See the GNU General Public License for more details. ++# PURPOSE. See the GNU General Public License for more details. + # +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see http://www.gnu.org/licenses/. ++# You should have received a copy of the GNU General Public ++# License along with this program; if not, write to the Free ++# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ++# Boston, MA 02110-1301, USA. + # + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + [ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh + . /usr/share/beakerlib/beakerlib.sh || exit 1 + ++# Load beakerlib you needed ++rlImport kernel/base ++envinfo ++#disable_avc_check + #=============================================================================== + + #signal trap + trap "cleanup" SIGINT SIGTERM SIGHUP SIGQUIT + cleanup() { + rlFileRestore +- run 'service_nfsconfig restart' +- #rm -rf $expdir $nfsmp ++ run 'service_nfs restart' ++ run 'service_nfsconfig status &>/dev/null && service_nfsconfig restart' - ++ run 'userdel -rf testuserqa' - + } + + #global var define +@@ -47,135 +51,152 @@ rpm -q systemd || { + + rlJournalStart + rlPhaseStartSetup do-Setup- +- # Load beakerlib you needed +- rlImport kernel/base +- envinfo + rlFileBackup /etc/exports /etc/sysconfig/nfs + run 'echo "/usr/share *(ro)" >/etc/exports' +- run 'echo "RPCNFSDARGS=8" >/etc/sysconfig/nfs' 0 "avoid invalid config file" +- run 'service_nfsconfig restart' 0 "RHEL-7.1 or later need restart nfs-config to reload /etc/sysconfig/nfs" ++ run 'echo "" > /etc/sysconfig/nfs' 0 "avoid invalid config file" ++ # If in RHEL-7.1 or later need restart nfs-config service to flush /etc/sysconfig/nfs to /run/sysconfig/nfs-utils ++ # But since RHEL-7.3, nfs-config change to be ru-run during the dependent service starting ++ run 'service_nfsconfig status &>/dev/null && service_nfsconfig restart' - + run "useradd testuserqa" - + rlPhaseEnd + + rlPhaseStartTest do-Test-start +- run "service_$serv start" 0 "Service must start without problem" +- run "service_$serv status" 0 "Then Status command" +- run "service_$serv start" 0 "Already started service" +- run "service_$serv status" 0 "Again status command" ++ run "service_nfs start" 0 "Service must start without problem" ++ run "service_nfs status" 0 "Then Status command" ++ run "service_nfs start" 0 "Already started service" ++ run "service_nfs status" 0 "Again status command" + rlPhaseEnd + + rlPhaseStartTest do-Test-restart +- run "service_$serv restart" 0 "Restarting of service" +- run "service_$serv status" 0 "Status command" ++ run "service_nfs restart" 0 "Restarting of service" ++ run "service_nfs status" 0 "Status command" + rlPhaseEnd + + rlPhaseStartTest do-Test-stop +- run "service_$serv stop" 0 "Stopping service" +- run "service_$serv status" 3 "Status of stopped service" +- run "service_$serv stop" 0 "Stopping service again" +- run "service_$serv status" 3 "Status of stopped service" ++ run "service_nfs stop" 0 "Stopping service" ++ run "service_nfs status" 3 "Status of stopped service" ++ run "service_nfs stop" 0 "Stopping service again" ++ run "service_nfs status" 3 "Status of stopped service" + rlPhaseEnd + + rlPhaseStartTest do-Test-"insufficient-rights" +- run "service_$serv restart " 0 "Starting service for restarting under nonpriv user" +- run "su testuserqa -c 'service_$serv stop'" 1,4 "Insufficient rights, stopping service under nonprivileged user must fail" +- run "su testuserqa -c 'service_$serv start'" 0,1,4 "Insufficient rights, starting service under nonprivileged user must fail or pass as already started" +- run "su testuserqa -c 'service_$serv status'" 0 "Sufficient rights, service status should be accessible to nonprivileged users" +- run "service_$serv stop" 0 "Stopping service for starting under nonpriv user" +- run "su testuserqa -c 'service_$serv start'" 1,4 "Insufficient rights, starting of stopped service under nonprivileged user must fail" ++ run "service_nfs restart " 0 "Starting service for restarting under nonpriv user" ++ run "su testuserqa -c 'service_nfs stop'" 1,4 "Insufficient rights, stopping service under nonprivileged user must fail" ++ run "su testuserqa -c 'service_nfs start'" 0,1,4 "Insufficient rights, starting service under nonprivileged user must fail or pass as already started" ++ run "su testuserqa -c 'service_nfs status'" 0 "Sufficient rights, service status should be accessible to nonprivileged users" ++ run "service_nfs stop" 0 "Stopping service for starting under nonpriv user" ++ run "su testuserqa -c 'service_nfs start'" 1,4 "Insufficient rights, starting of stopped service under nonprivileged user must fail" + rlPhaseEnd + + rlPhaseStartTest do-Test-"operations" +- run "service_$serv start" 0 "Service have to implement start function" +- run 'sleep 5' 0 "sleep a while avoid the start rate limit" +- run "service_$serv restart" 0 "Service have to implement restart function" +- run "service_$serv status" 0 "Service have to implement status function" +- run 'sleep 5' 0 "sleep a while avoid the start rate limit" +- run "service_$serv condrestart" 0 "Service have to implement condrestart function" ++ run "service_nfs start" 0 "Service have to implement start function" ++ run 'sleep 5' 0 "sleep a while avoid the start rate limit, bz1160506" ++ run "service_nfs restart" 0 "Service have to implement restart function" ++ run "service_nfs status" 0 "Service have to implement status function" ++ run 'sleep 5' 0 "sleep a while avoid the start rate limit, bz1160506" ++ run "service_nfs condrestart" 0 "Service have to implement condrestart function" + [ $? != 0 ] && run "journalctl -xn" - +- run 'sleep 5' 0 "sleep a while avoid the start rate limit" +- run "service_$serv try-restart" 0 "Service have to implement try-restart function" ++ run 'sleep 5' 0 "sleep a while avoid the start rate limit, bz1160506" ++ run "service_nfs try-restart" 0 "Service have to implement try-restart function" + [ $? != 0 ] && run "journalctl -xn" - +- run "service_$serv reload" 0 "Service have to implement reload function" ++ run "service_nfs reload" 0 "Service have to implement reload function" + [ $? != 0 ] && run "journalctl -xn" - +- run "service_$serv force-reload" 0 "Service have to implement force-reload function" ++ run "service_nfs force-reload" 0 "Service have to implement force-reload function" + [ $? != 0 ] && run "journalctl -xn" - +- run "service_$serv noexistop" 2 "Testing proper return code when nonexisting function" ++ run "service_nfs noexistop" 2 "Testing proper return code when nonexisting function" + rlPhaseEnd + + # Should do nothing if a service is already stopped or not running (according to manpage of systemctl) + # http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT + rlPhaseStartTest do-Test-"operations-stopped" +- run "service_$serv stop" 0 "Service have to implement stop function" +- run "service_$serv condrestart" 0 "Service have to implement condrestart function" +- run "service_$serv try-restart" 0 "Service have to implement try-restart function" +- run "service_$serv force-reload" 0 "Service have to implement force-reload function" +- run "service_$serv status" 3 "Above oprations should do nothing if service are not running" ++ run "service_nfs stop" 0 "Service have to implement stop function" ++ run "service_nfs condrestart" 0 "Service have to implement condrestart function" ++ run "service_nfs try-restart" 0 "Service have to implement try-restart function" ++ run "service_nfs force-reload" 0 "Service have to implement force-reload function" ++ run "service_nfs status" 3 "Above oprations should do nothing if service are not running" + rlPhaseEnd + + rlPhaseStartTest do-Test-enable-disable-$serv + if systemctl --quiet is-enabled $serv; then + run "systemctl disable $serv" 0 "Disable service on boot" + run "systemctl is-enabled $serv" 1 "Check whether service is disabled" +- run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "test `systemctl is-enabled nfs-server` = disabled" + run "systemctl enable $serv" 0 "Enable service on boot" + run "systemctl is-enabled $serv" 0 "Check whether service is enabled" +- run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "test `systemctl is-enabled nfs-server` = enabled" + else + run "systemctl enable $serv" 0 "Enable service on boot" + run "systemctl is-enabled $serv" 0 "Check whether service is enabled" +- run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "test `systemctl is-enabled nfs-server` = enabled" + run "systemctl disable $serv" 0 "Disable service on boot" + run "systemctl is-enabled $serv" 1 "Check whether service is disabled" +- run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "test `systemctl is-enabled nfs-server` = disabled" + fi + rlPhaseEnd + +- # ystemctl enable fails for symlinks in /usr/lib/systemd/system ++ # As Bug 1159308 - systemctl enable fails for symlinks in /usr/lib/systemd/system + # Use a workaround to test enable/disable with nfs-server.service +- rlPhaseStartTest do-Test-enable-disable-nfs-server ++ if [ -f /usr/lib/systemd/system/nfs.service ]; then ++ rlPhaseStartTest do-Test-enable-disable-nfs-symlinks + if systemctl --quiet is-enabled nfs-server; then +- run "systemctl disable nfs-server" 0 "Disable nfs-serverice on boot" +- run "systemctl is-enabled nfs-server" 1 "Check whether nfs-serverice is disabled" +- run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" +- run "systemctl enable nfs-server" 0 "Enable nfs-serverice on boot" +- run "systemctl is-enabled nfs-server" 0 "Check whether nfs-serverice is enabled" +- run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "systemctl disable nfs" 0 "Disable nfs on boot" ++ run "systemctl is-enabled nfs" 1 "Check whether nfs is disabled" ++ run "test `systemctl is-enabled nfs` = `systemctl is-enabled nfs-server`" ++ run "systemctl enable nfs" 0 "Enable nfs on boot" ++ run "systemctl is-enabled nfs" 0 "Check whether nfs is enabled" ++ run "test `systemctl is-enabled nfs` = `systemctl is-enabled nfs-server`" + else +- run "systemctl enable nfs-server" 0 "Enable nfs-serverice on boot" +- run "systemctl is-enabled nfs-server" 0 "Check whether nfs-serverice is enabled" +- run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" +- run "systemctl disable nfs-server" 0 "Disable nfs-serverice on boot" +- run "systemctl is-enabled nfs-server" 1 "Check whether nfs-serverice is disabled" +- run "test `systemctl is-enabled nfs-server` = `systemctl is-enabled nfs`" ++ run "systemctl enable nfs" 0 "Enable nfs on boot" ++ run "systemctl is-enabled nfs" 0 "Check whether nfs is enabled" ++ run "test `systemctl is-enabled nfs` = `systemctl is-enabled nfs-server`" ++ run "systemctl disable nfs" 0 "Disable nfs on boot" ++ run "systemctl is-enabled nfs" 1 "Check whether nfs is disabled" ++ run "test `systemctl is-enabled nfs` = `systemctl is-enabled nfs-server`" + fi + rlPhaseEnd ++ fi + +- rlPhaseStartTest do-Test-nfsv4-only +- run 'service nfs stop' ++ rlPhaseStartTest do-Test-bz641291-nfsv4-only ++ run 'service_nfs stop' ++ run 'cp /etc/sysconfig/nfs /etc/sysconfig/nfs.backup' + # MOUNTD_NFS_V2 MOUNTD_NFS_V3 was not supported in RHEL-7.x +- run 'echo -e "RPCMOUNTDOPTS=\"-N 2 -N 3\"" >>/etc/sysconfig/nfs' 0 "enabling nfsv4 only" +- # If in RHEL-7.1 or later need restart nfs-config service to flush /etc/sysconfig/nfs to /run/sysconfig/nfs-utils +- # But since RHEL-7.3, nfs-config change to be ru-run during the dependent service starting ++ run 'echo "RPCMOUNTDOPTS=\"-N 2 -N 3\"" > /etc/sysconfig/nfs' 0 "disabling mountd v2/v3" + run 'service_nfsconfig status &>/dev/null && service_nfsconfig restart' - +- run 'cat /run/sysconfig/nfs-utils | grep RPCMOUNTDARGS | grep "\""' 0 "quote variable in /run/sysconfig/nfs-utils" + run 'sleep 5' 0 "sleep a while avoid service script bug" + run 'service_nfs start' ++ [ -f /run/sysconfig/nfs-utils ] && \ ++ run 'cat /run/sysconfig/nfs-utils | grep RPCMOUNTDARGS | grep "\""' 0 "bz1175160 quote variable in /run/sysconfig/nfs-utils" + run 'rpcinfo -s | grep -w mountd' 1 "if nfsv4 only, no mountd info in rpcinfo" +- rlFileRestore /etc/sysconfig/nfs +- run 'service_nfsconfig restart' ++ # we allow running V4-only nfsd without rpcbind ++ log "{Info} bz1433390 nfsd startup won't delay in absence of rpcbind" ++ run 'echo "RPCNFSDARGS=\"-N 2 -N 3\"" >>/etc/sysconfig/nfs' 0 "disabling nfsd v2/v3" ++ run 'service_nfsconfig status &>/dev/null && service_nfsconfig restart' - ++ run 'service_nfs restart' ++ [ -f /run/sysconfig/nfs-utils ] && \ ++ run 'cat /run/sysconfig/nfs-utils | grep RPCNFSDARGS' - ++ run 'rpcinfo -s | grep -w nfs' ++ run 'service_nfs stop' ++ run 'service rpcbind stop' ++ run 'systemctl mask rpcbind' 0 "Mask systemd service rpcbind.service" ++ run 'timeLimitRun 10 service_nfs start' 0 "nfs should come up successfully without rpcbind" ++ run 'service_nfs status' ++ run 'systemctl unmask rpcbind' ++ run 'timeLimitRun 10 service_nfs stop' ++ run 'mv /etc/sysconfig/nfs.backup /etc/sysconfig/nfs' ++ run 'service_nfsconfig status &>/dev/null && service_nfsconfig restart' - + rlPhaseEnd + ++ # Accoring to https://bugzilla.redhat.com/show_bug.cgi?id=1126073#c29 + # Since nfs-service no longer starts the daemons in question. They are now split + # into their own services (nfs-mountd.service, rpc-statd.service, nfs-idmapd.service). + # Then `systemctl status nfs-server.service` cannot accurately reflect the + # state of the combination of daemons that are needed for a working NFS server. +- rlPhaseStartTest do-Test-"nfs-server-is-active-even-processes-terminated" ++ rlPhaseStartTest do-Test-"bz1126073-nfs-server-is-active-even-processes-terminated" + run 'service_nfs restart' + run 'pkill rpc.mountd' - + run 'killall -9 nfsd' - + run 'ps axf | grep -e "rpc.mountd" -e "nfsd"' - +- run 'service nfs-mountd status' 1-255 ++ run 'service_nfs-mountd status' 1-255 + run 'rpcinfo -t localhost 100005' 1 "pings mountd" + log '{Info} nfsserver resource agent has been updated to monitor all its daemons' + run 'service_nfs status' 1-255,0 +@@ -183,7 +204,7 @@ rlJournalStart + run 'service_nfs stop' + rlPhaseEnd + +- rlPhaseStartTest do-Test-"should-auto-mount-/proc/fs/nfsd" ++ rlPhaseStartTest do-Test-"bz1010634-should-auto-mount-/proc/fs/nfsd" + run 'service_nfs restart' + run 'service_nfs stop' + run 'umount /proc/fs/nfsd' +@@ -191,95 +212,90 @@ rlJournalStart + run 'mount -t nfsd nfsd /proc/fs/nfsd' - + rlPhaseEnd + +- rlPhaseStartTest do-Test-"use-rpcbind.service-in-nfs-server.service" ++ rlPhaseStartTest do-Test-"bz1171603-use-rpcbind.service-in-nfs-server.service" + run "systemctl reset-failed" 0 "workaround for failure of starting too often" + log "{Info} Starting nfs while rpcbind is stopped" +- run "service rpcbind stop; service rpcbind stop" 0 "stop twice as workaround" ++ run "service rpcbind stop; service rpcbind stop" 0 "stop twice as workaround for bug 1257129" + run "service rpcbind status" 3 "rpcbind.service should be stopped" +- run "service nfs restart" +- run "service nfs status" 0 "should start nfs successfully" ++ run "service_nfs restart" ++ run "service_nfs status" 0 "should start nfs successfully" + run "service rpcbind status" 0 "starting nfs should bring rpcbind up" + + log "{Info} Starting nfs while rpcbind is active" + run "service rpcbind start" + run "service rpcbind status" 0 "rpcbind should be active" +- run "service nfs restart" +- run "service nfs status" 0 "should start nfs successfully" ++ run "service_nfs restart" ++ run "service_nfs status" 0 "should start nfs successfully" + run "service rpcbind status" 0 "starting nfs should keep rpcbind up" + + log "{Info} Stopping nfs while rpcbind is active" + run "service rpcbind start" + run "service rpcbind status" 0 "rpcbind should be active" +- run "service nfs start; service nfs status" +- run "service nfs stop; service nfs status" 3 ++ run "service_nfs start; service_nfs status" ++ run "service_nfs stop; service_nfs status" 3 + run "service rpcbind status" 0 "stopping nfs should keep rpcbind up" + + log "{Info} Stopping nfs while rpcbind is stopped" +- run "service nfs start" 0 "firstly start nfs since it can bring rpcbind up" +- run "service nfs status" 0 "should start nfs successfully" +- run "service rpcbind stop; service rpcbind stop" 0 "stop twice as workaround" ++ run "service_nfs start" 0 "firstly start nfs since it can bring rpcbind up" ++ run "service_nfs status" 0 "should start nfs successfully" ++ run "service rpcbind stop; service rpcbind stop" 0 "stop twice as workaround for bug 1257129" + run "service rpcbind status" 3 "rpcbind should be stopped" +- run "service nfs stop" ++ run "service_nfs stop" + # If a daemon tries to connect to port 111 systemd will start rpcbind automaticly ++ # https://bugzilla.redhat.com/show_bug.cgi?id=1266993#c7 ++ run "sleep 1" 0 "Wait a while for starting" + run "service rpcbind status" 0 "stopping nfs should bring rpcbind up" + rlPhaseEnd + +- rlPhaseStartTest do-Test-"restarting rpbind also restart the the nfs server" ++ rlPhaseStartTest do-Test-bz1266993-"restarting rpbind also restart the the nfs server" + run "systemctl reset-failed" 0 "workaround for failure of starting too often" + log "{Info} Starting rpcbind while nfs is stopped" +- run "service nfs stop" +- run "service nfs status" 3 "nfs should be stopped" ++ run "service_nfs stop" ++ run "service_nfs status" 3 "nfs should be stopped" + run "service rpcbind restart" +- run "service nfs status" 3 "starting rpcbind should NOT bring nfs up" ++ run "service_nfs status" 3 "starting rpcbind should NOT bring nfs up" + + log "{Info} Starting rpcbind while nfs is active" +- run "service nfs start" +- run "service nfs status" 0 "nfs should be active" ++ run "service_nfs start" ++ run "service_nfs status" 0 "nfs should be active" + run "service rpcbind restart" +- run "service nfs status" 0 "starting rpcbind should NOT interfere nfs" ++ run "service_nfs status" 0 "starting rpcbind should NOT interfere nfs" + + log "{Info} Stopping rpcbind while nfs is active" +- run "service nfs start" +- run "service nfs status" 0 "nfs should be active" ++ run "service_nfs start" ++ run "service_nfs status" 0 "nfs should be active" + run "service rpcbind start; service rpcbind stop" +- run "service nfs status" 0 "stopping rpcbind should NOT bring nfs down" ++ run "service_nfs status" 0 "stopping rpcbind should NOT bring nfs down" + + log "{Info} Stopping rpcbind while nfs is stopped" +- run "service nfs stop" +- run "service nfs status" 3 "nfs should be stopped" ++ run "service_nfs stop" ++ run "service_nfs status" 3 "nfs should be stopped" + run "service rpcbind start; service rpcbind stop" +- run "service nfs status" 3 "stopping rpcbind should NOT interfere nfs" +- rlPhaseEnd +- +- rlPhaseStartTest do-Test-fix-long-nfsd-startup-delay-in-absence-of-rpcbind +- run "systemctl stop rpcbind" +- run "systemctl stop nfs-server" +- run "systemctl mask rpcbind" 0 "Mask systemd service rpcbind.service" +- run "timeLimitRun 10 systemctl start nfs-server" 1-255 "Start service nfs-server without rpcbind will be failed due to systemd unit dependency" +- run "systemctl unmask rpcbind" +- run "timeLimitRun 10 systemctl stop nfs-server" - ++ run "service_nfs status" 3 "stopping rpcbind should NOT interfere nfs" + rlPhaseEnd + +- rlPhaseStartTest do-Test-"nfs-utils need to cause gssproxy reload" +- run "cp /etc/gssproxy/gssproxy.conf /etc/gssproxy/gssproxy.conf.backup" 0 "backuping" +- run "echo '[gssproxy]' > /etc/gssproxy/gssproxy.conf" +- run "echo 'debug = true' >> /etc/gssproxy/gssproxy.conf" +- run "systemctl restart gssproxy" +-#FIXME when BZ#1535424 is fixed. Should not use /var/log/messages as it is not used on Fedora any more. +- run "echo '' > /var/log/messages" +- run "systemctl restart nfs" +- run "systemctl status nfs" +- run "systemctl status gssproxy" +- run "cat /var/log/messages | grep 'gssproxy:'" - +- run "cat /var/log/messages | grep -q 'gssproxy:.*loaded'" 0 "should re-reading config" +- run "mv /etc/gssproxy/gssproxy.conf.backup /etc/gssproxy/gssproxy.conf" 0 "recovering" +- run "systemctl restart gssproxy" ++ rlPhaseStartTest do-Test-"nfs-utils should reload gssproxy" ++ run "cp /etc/gssproxy/gssproxy.conf /etc/gssproxy/gssproxy.conf.backup" 0 "backuping" ++ run "echo '[gssproxy]' > /etc/gssproxy/gssproxy.conf" ++ run "echo 'debug = true' >> /etc/gssproxy/gssproxy.conf" ++ log "{Info} Check reloading when gssproxy is started" ++ run "systemctl restart gssproxy" ++ run "service_nfs restart" ++ run "systemctl status gssproxy -l" ++ run "systemctl status gssproxy -l | grep 'gssproxy\[[0-9]*\]' | grep -q 'New config loaded'" 0 "Should re-reading config" ++ run "systemctl status gssproxy -l | grep 'systemd\[[0-9]*\]' | grep -q 'Reloaded GSSAPI Proxy Daemon'" 0 "Should re-reading config" ++ log "{Info} Check reloading when gssproxy is stopped" ++ run "systemctl stop gssproxy" ++ run "service_nfs restart" ++ run "systemctl status gssproxy -l" ++ run "systemctl status gssproxy -l | grep 'gssproxy\[[0-9]*\]' | grep -q 'New config loaded'" 0 "Should re-reading config" ++ run "systemctl status gssproxy -l | grep 'systemd\[[0-9]*\]' | grep -q 'Reloaded GSSAPI Proxy Daemon'" 0 "Should re-reading config" ++ run "mv /etc/gssproxy/gssproxy.conf.backup /etc/gssproxy/gssproxy.conf" 0 "recovering" ++ run "systemctl restart gssproxy" + rlPhaseEnd + + rlPhaseStartCleanup do-Cleanup- +- run "userdel -rf testuserqa" - +- rlFileRestore +- run 'timeLimitRun 10 service_nfsconfig restart' ++ cleanup + rlPhaseEnd + + rlJournalEnd +diff --git a/tests/umount/Makefile b/tests/umount/Makefile +new file mode 100644 +index 0000000..4e4da65 +--- /dev/null ++++ b/tests/umount/Makefile +@@ -0,0 +1,79 @@ ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Description: Test for command umount.nfs{,4} ++# Author: Stevens Yin ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++# ++# Copyright (c) 2013 Red Hat, Inc. ++# ++# This program is free software: you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation, either version 2 of ++# the License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be ++# useful, but WITHOUT ANY WARRANTY; without even the implied ++# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ++# PURPOSE. See the GNU General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see http://www.gnu.org/licenses/. ++# ++# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++TENV=_env ++ifeq ($(PKG_TOP_DIR),) ++ export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ export _TOP_DIR := $(shell p=$$PWD; while :; do \ ++ [ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) ++ -include $(PKG_TOP_DIR)/env.mk ++endif ++include $(TENV) ++ifeq ($(_TOP_DIR),) ++ _TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE) ++endif ++#=============================================================================== ++ ++export TESTVERSION=1.0 ++ ++BUILT_FILES= ++ ++FILES=$(TENV) $(METADATA) runtest.sh Makefile PURPOSE ++ ++.PHONY: all install download clean ++ ++run: $(FILES) build ++ ( set +o posix; [ -e /usr/bin/rhts_environment.sh ] && . /usr/bin/rhts_environment.sh; \ ++. /usr/share/beakerlib/beakerlib.sh; \ ++. runtest.sh ) ++ ++build: $(BUILT_FILES) ++ test -x runtest.sh || chmod a+x runtest.sh ++ ++clean: ++ rm -f *~ $(BUILT_FILES) ++ ++ ++-include /usr/share/rhts/lib/rhts-make.include ++ ++$(METADATA): Makefile ++ @echo "Owner: Stevens Yin " > $(METADATA) ++ @echo "Name: $(TEST)" >> $(METADATA) ++ @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) ++ @echo "Path: $(TEST_DIR)" >> $(METADATA) ++ @echo "Description: Test for command umount.nfs{,4}" >> $(METADATA) ++ @echo "Type: Regression" >> $(METADATA) ++ @echo "TestTime: 30m" >> $(METADATA) ++ @echo "RunFor: $(PACKAGE)" >> $(METADATA) ++ @echo "Requires: $(PACKAGE)" >> $(METADATA) ++ @echo "Requires: library(kernel/base)" >> $(METADATA) ++ @echo "RhtsRequires: library(kernel/base)" >> $(METADATA) ++ @echo "Priority: Normal" >> $(METADATA) ++ @echo "License: GPLv2" >> $(METADATA) ++ @echo "Confidential: no" >> $(METADATA) ++ @echo "Destructive: no" >> $(METADATA) ++ ++ rhts-lint $(METADATA) ++ + +From ae009836a573c8b55e55d9504bf72d63800d83e4 Mon Sep 17 00:00:00 2001 +From: Bruno Goncalves +Date: Jan 21 2019 10:57:57 +0000 +Subject: [PATCH 4/6] fix ipv6 test on export-mount-local + + +--- + +diff --git a/tests/export-mount-local/runtest.sh b/tests/export-mount-local/runtest.sh +index 60d0c90..29a351a 100755 +--- a/tests/export-mount-local/runtest.sh ++++ b/tests/export-mount-local/runtest.sh +@@ -48,7 +48,8 @@ subexpdir=/exportDir-$BZ/sub + tmpnfsmp=${nfsmp}-tmp + + read ipv4 _nil <<<$(getDefaultIp) +-read ipv6s _nil <<<$(getDefaultIp 6) ++#read ipv6s _nil <<<$(getDefaultIp 6) ++ipv6s=::1 + ipv6="[$ipv6s]" + # in case "localhost.localdomain" + if echo "$HOSTNAME" | grep -q "localhost"; then + +From 2371443256b25b8d6088788f791284caa012df11 Mon Sep 17 00:00:00 2001 +From: Bruno Goncalves +Date: Jan 21 2019 15:26:27 +0000 +Subject: [PATCH 5/6] add nic name to ipv6 addr + + +--- + +diff --git a/tests/export-mount-local/runtest.sh b/tests/export-mount-local/runtest.sh +index 29a351a..eeb5dde 100755 +--- a/tests/export-mount-local/runtest.sh ++++ b/tests/export-mount-local/runtest.sh +@@ -47,9 +47,9 @@ nfsmp=/mnt/nfsmp-$BZ + subexpdir=/exportDir-$BZ/sub + tmpnfsmp=${nfsmp}-tmp + ++read default_nic <<<$(getDefaultNic) + read ipv4 _nil <<<$(getDefaultIp) +-#read ipv6s _nil <<<$(getDefaultIp 6) +-ipv6s=::1 ++read ipv6s _nil <<<$(getDefaultIp 6nfs) + ipv6="[$ipv6s]" + # in case "localhost.localdomain" + if echo "$HOSTNAME" | grep -q "localhost"; then + +From 9ba8cf83a319c5894f342e931e94ce61a7c89b88 Mon Sep 17 00:00:00 2001 +From: Bruno Goncalves +Date: Jan 23 2019 08:04:16 +0000 +Subject: [PATCH 6/6] drop export-mount-local test case and add gating file + + +--- + +diff --git a/gating.yaml b/gating.yaml +new file mode 100644 +index 0000000..6985029 +--- /dev/null ++++ b/gating.yaml +@@ -0,0 +1,6 @@ ++--- !Policy ++product_versions: ++ - rhel-8 ++decision_context: osci_compose_gate ++rules: ++ - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} +diff --git a/tests/export-mount-local/Makefile b/tests/export-mount-local/Makefile +deleted file mode 100644 +index 6ddfa94..0000000 +--- a/tests/export-mount-local/Makefile ++++ /dev/null +@@ -1,76 +0,0 @@ +-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-# +-# Description: test for: export-mount +-# Author: Jianhong Yin +-# +-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-# +-# Copyright (c) 2014 Red Hat, Inc. +-# +-# This program is free software: you can redistribute it and/or +-# modify it under the terms of the GNU General Public License as +-# published by the Free Software Foundation, either version 2 of +-# the License, or (at your option) any later version. +-# +-# This program is distributed in the hope that it will be +-# useful, but WITHOUT ANY WARRANTY; without even the implied +-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +-# PURPOSE. See the GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program. If not, see http://www.gnu.org/licenses/. +-# +-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- +-#Generate and export TEST= PACKAGE= +-TENV=_env +-ifeq ($(PKG_TOP_DIR),) +- export PKG_TOP_DIR := $(shell p=$$PWD; while :; do \ +- [ -e $$p/env.mk -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) +- export _TOP_DIR := $(shell p=$$PWD; while :; do \ +- [ -d $$p/.git -o -z "$$p" ] && { echo $$p; break; }; p=$${p%/*}; done) +- -include $(PKG_TOP_DIR)/env.mk +-endif +-include $(TENV) +-ifeq ($(_TOP_DIR),) +- _TOP_DIR=/mnt/tests/$(TOPLEVEL_NAMESPACE) +-endif +-#=============================================================================== +-export TESTVERSION=1.0 +- +-BUILT_FILES= +-FILES=$(TENV) $(METADATA) runtest.sh Makefile PURPOSE +- +-.PHONY: all install download clean +- +-run: $(FILES) build +- ( set +o posix; [ -e /usr/bin/rhts_environment.sh ] && . /usr/bin/rhts_environment.sh; \ +-. /usr/share/beakerlib/beakerlib.sh || exit 1; \ +-. runtest.sh ) +- +-build: $(BUILT_FILES) +- test -x runtest.sh || chmod a+x runtest.sh +- +-clean: +- rm -f *~ $(BUILT_FILES) +- +--include /usr/share/rhts/lib/rhts-make.include +- +-$(METADATA): Makefile +- @echo "Owner: Jianhong Yin " > $(METADATA) +- @echo "Name: $(TEST)" >> $(METADATA) +- @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) +- @echo "Path: $(TEST_DIR)" >> $(METADATA) +- @echo "Description: test for: export-mount" >> $(METADATA) +- @echo "Type: function" >> $(METADATA) +- @echo "Type: $(PACKAGE)-level-tier1" >> $(METADATA) +- @echo "TestTime: 30m" >> $(METADATA) +- @echo "RunFor: $(PACKAGE)" >> $(METADATA) +- @echo "Requires: $(PACKAGE)" >> $(METADATA) +- @echo "Priority: Normal" >> $(METADATA) +- @echo "License: GPLv2" >> $(METADATA) +- @echo "Requires: library(kernel/base)" >> $(METADATA) +- @echo "Requires: nfs-utils" >> $(METADATA) +- @echo "Requires: bind-utils" >> $(METADATA) +- @echo "RhtsRequires: library(kernel/base)" >> $(METADATA) +- rhts-lint $(METADATA) +diff --git a/tests/export-mount-local/PURPOSE b/tests/export-mount-local/PURPOSE +deleted file mode 100644 +index 556df42..0000000 +--- a/tests/export-mount-local/PURPOSE ++++ /dev/null +@@ -1 +0,0 @@ +-# nothing +diff --git a/tests/export-mount-local/_env b/tests/export-mount-local/_env +deleted file mode 100644 +index 90b8e90..0000000 +--- a/tests/export-mount-local/_env ++++ /dev/null +@@ -1,7 +0,0 @@ +-export TOPLEVEL_NAMESPACE=nfs-utils +-export PKG_NAMESPACE=nfs-utils +-export RELATIVE_PATH=export-mount-local +-export PACKAGE=nfs-utils +-export PACKAGE_NAME=nfs-utils +-export PKG_LIST=nfs-utils nfs-utils-lib libnfsidmap libsss_idmap libtirpc rpcbind +-export TEST=/nfs-utils/export-mount-local +diff --git a/tests/export-mount-local/runtest.sh b/tests/export-mount-local/runtest.sh +deleted file mode 100755 +index eeb5dde..0000000 +--- a/tests/export-mount-local/runtest.sh ++++ /dev/null +@@ -1,343 +0,0 @@ +-#!/bin/bash +-# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-# Description: test for: export-mount-local +-# Author: Jianhong Yin +-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +-# +-# Copyright (c) 2014 Red Hat, Inc. +-# +-# This copyrighted material is made available to anyone wishing +-# to use, modify, copy, or redistribute it subject to the terms +-# and conditions of the GNU General Public License version 2. +-# +-# This program is distributed in the hope that it will be +-# useful, but WITHOUT ANY WARRANTY; without even the implied +-# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +-# PURPOSE. See the GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public +-# License along with this program; if not, write to the Free +-# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +-# Boston, MA 02110-1301, USA. +-# +-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- +-[ -e /usr/bin/rhts-environment.sh ] && . /usr/bin/rhts-environment.sh +-. /usr/share/beakerlib/beakerlib.sh || exit 1 +- +-# Load beakerlib you needed +-rlImport kernel/base +-envinfo +-#disable_avc_check +- +-#=============================================================================== +- +-#signal trap +-trap "cleanup" SIGINT SIGTERM SIGHUP SIGQUIT +-cleanup() { +- rlFileRestore +- rm -rf $expdir $nfsmp +-} +- +-#global var define +-BZ=exp-mount-local +-expdir=/exportDir-$BZ +-nfsmp=/mnt/nfsmp-$BZ +-subexpdir=/exportDir-$BZ/sub +-tmpnfsmp=${nfsmp}-tmp +- +-read default_nic <<<$(getDefaultNic) +-read ipv4 _nil <<<$(getDefaultIp) +-read ipv6s _nil <<<$(getDefaultIp 6nfs) +-ipv6="[$ipv6s]" +-# in case "localhost.localdomain" +-if echo "$HOSTNAME" | grep -q "localhost"; then +- ORIGINAL_HOSTNAME="$HOSTNAME" +- HOSTNAME="$BZ" +- hostnamectl set-hostname "$HOSTNAME" +-fi +-host="$HOSTNAME" +- +-rlJournalStart +- rlPhaseStartSetup do-Setup- +- rlFileBackup /etc/{exports,auto.master} /etc/sysconfig/{nfs,autofs} /etc/nfs.conf /etc/hosts +- if [ -n "ORIGINAL_HOSTNAME" ]; then +- run "echo '$ipv4 $host' >> /etc/hosts" +- run "echo '$ipv6s $host' >> /etc/hosts" +- run "cat /etc/hosts" - +- fi +- run "rm -rf $expdir $nfsmp && mkdir -p $expdir $nfsmp" +- run "rm -rf $subexpdir $tmpnfsmp && mkdir -p $subexpdir $tmpnfsmp" +- run "service_nfs restart" +- run "ls_nfsvers" +- rlPhaseEnd +- +- for V in $(ls_nfsvers); do +- # export by IPv4 and try to mount it +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-ipv4 +- run "exportfs -au && exportfs -iv $ipv4:$expdir -o ro,sync,no_root_squash" +- run "mount -o vers=$V $ipv4:$expdir $nfsmp" +- run "umount $nfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-ipv6-x +- if [ -n "$ipv6s" ]; then +- run "mount -o vers=$V $ipv6:$expdir $nfsmp" 1-255 +- [ $? = 0 ] && run "umount $nfsmp" +- fi +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv4-mount-host-bz876847 +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "umount $nfsmp" +- rlPhaseEnd +- +- if [ -n "$ipv6s" ]; then +- # export by IPv6 and try to mount it +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-ipv6 +- run "exportfs -au && exportfs -iv $ipv6:$expdir -o ro,sync,no_root_squash" +- run "mount -o vers=$V $ipv6:$expdir $nfsmp" +- run "umount $nfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-ipv4-x +- run "mount -o vers=$V $ipv4:$expdir $nfsmp" 1-255 +- [ $? = 0 ] && run "umount $nfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-ipv6-mount-host +- run "dig -t aaaa $HOSTNAME +short" 0 "To get the IPv6 address" +- if [ -n "$ipv6s" ]; then +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "umount $nfsmp" +- fi +- rlPhaseEnd +- fi +- +- # export by hostname and try to mount it +- rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-host +- run "exportfs -au && exportfs -iv $host:$expdir -o ro,sync,no_root_squash" +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "umount $nfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-ipv4 +- run "mount -o vers=$V $ipv4:$expdir $nfsmp" +- run "umount $nfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-host-mount-ipv6 +- run "dig -t aaaa $HOSTNAME +short" 0 "To get the IPv6 address" +- if [ -n "$ipv6s" ]; then +- run "mount -o vers=$V $ipv6:$expdir $nfsmp" +- run "umount $nfsmp" +- fi +- rlPhaseEnd +- +- # export sub-directory by IPv4 and try to mount it +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-ipv4 +- run "echo '$expdir *(ro,sync,no_root_squash)' >/etc/exports" +- run "echo '$subexpdir $ipv4(ro,sync,no_root_squash)' >>/etc/exports" +- which systemctl >/dev/null 2>&1 && run "systemctl reset-failed" +- run "service_nfs restart" +- run "showmount -e" - +- run "mount -o vers=$V $ipv4:$expdir $nfsmp" +- run "mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp" +- run "umount $nfsmp $tmpnfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-ipv6-x-bz1198900 +- if [ -n "$ipv6s" ]; then +- run "mount -o vers=$V $ipv6:$expdir $nfsmp" +- run "mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp" 1-255 "bz1198900 should not mount sub-directory with different ip" +- [ $? = 0 ] && run "umount $tmpnfsmp" +- run "umount $nfsmp" +- fi +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv4-mount-host +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "mount -o vers=$V $host:$subexpdir $tmpnfsmp" +- run "umount $nfsmp $tmpnfsmp" +- rlPhaseEnd +- +- if [ -n "$ipv6s" ]; then +- # export sub-directory by IPv6 and try to mount it +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-ipv4-x-bz1198900 +- run "echo '$expdir *(ro,sync,no_root_squash)' >/etc/exports" +- run "echo '$subexpdir $ipv6s(ro,sync,no_root_squash)' >>/etc/exports" +- which systemctl >/dev/null 2>&1 && run "systemctl reset-failed" +- run "service_nfs restart" +- run "showmount -e" - +- run "mount -o vers=$V $ipv4:$expdir $nfsmp" +- run "mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp" 1-255 "bz1198900 should not mount sub-directory with different ip" +- [ $? = 0 ] && run "umount $tmpnfsmp" +- run "umount $nfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-ipv6 +- run "mount -o vers=$V $ipv6:$expdir $nfsmp" +- run "mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp" +- run "umount $nfsmp $tmpnfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-ipv6-mount-host +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "mount -o vers=$V $host:$subexpdir $tmpnfsmp" +- run "umount $nfsmp $tmpnfsmp" +- rlPhaseEnd +- fi +- +- # export sub-directory by hostname and try to mount it +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-ipv4 +- run "echo '$expdir *(ro,sync,no_root_squash)' >/etc/exports" +- run "echo '$subexpdir $host(ro,sync,no_root_squash)' >>/etc/exports" +- which systemctl >/dev/null 2>&1 && run "systemctl reset-failed" +- run "service_nfs restart" +- run "showmount -e" - +- run "mount -o vers=$V $ipv4:$expdir $nfsmp" +- run "mount -o vers=$V $ipv4:$subexpdir $tmpnfsmp" +- run "umount $nfsmp $tmpnfsmp" +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-ipv6 +- if [ -n "$ipv6s" ]; then +- run "mount -o vers=$V $ipv6:$expdir $nfsmp" +- run "mount -o vers=$V $ipv6:$subexpdir $tmpnfsmp" +- run "umount $nfsmp $tmpnfsmp" +- fi +- rlPhaseEnd +- rlPhaseStartTest do-Test-nfsV$V-exp-sub-host-mount-host +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "mount -o vers=$V $host:$subexpdir $tmpnfsmp" +- run "umount $nfsmp $tmpnfsmp" +- rlPhaseEnd +- +- rlPhaseStartTest do-Test-nfsV$V-default-option-overridden-by-client-specific-option +- run "echo '$expdir -ro,sync *(rw,no_root_squash)' >/etc/exports" +- run "service_nfs restart" +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "touch $nfsmp/testfile && mkdir $nfsmp/testdir" 0 "exports option should be overridden by client specific." +- run "rm -rf $nfsmp/test*" +- run "umount $nfsmp" +- run "echo '$expdir -ro,sec=sys,sync *(rw,no_root_squash)' >/etc/exports" 0 "sec=sys may cause it to be failed." +- run "exportfs -rv" +- run "mount -o vers=$V $host:$expdir $nfsmp" +- run "touch $nfsmp/testfile && mkdir $nfsmp/testdir" 0 "bz1359042 exports option should be overridden by client specific." +- run "rm -rf $nfsmp/test*" +- run "umount $nfsmp" +- rlPhaseEnd +- done +- +- rlPhaseStartTest do-Test-bz1479135-server-side-using-bind-mount +- run "dd if=/dev/zero of=workspace.image bs=3M count=500" +- run "mkfs -t ext3 -F workspace.image" +- run "mkdir -p /workspace" +- run "mount -o loop workspace.image /workspace" +- run "mkdir -p /workspace/vmcore /srv/nfs/vmcore" +- run "touch /workspace/work_dir /workspace/vmcore/vmcore_dir" +- run "mount --bind /workspace/vmcore /srv/nfs/vmcore" +- run "echo '/srv/nfs/vmcore *(rw,no_root_squash)' > /etc/exports" +- run "echo '/workspace *(rw,no_root_squash)' >> /etc/exports" +- run "service_nfs restart" +- run "mount $host:/workspace $nfsmp" +- run "ls $nfsmp/work_dir" +- run "umount $nfsmp" +- run "exportfs -au" && run "service_nfs stop" +- run "umount /srv/nfs/vmcore" +- run "umount /workspace" +- run "rm -rf /workspace /srv/nfs/vmcore" +- run "rm workspace.image" +- rlPhaseEnd +- +- rlPhaseStartTest do-Test-bz1465259-mount-nfsv4-show-wrong-port +- run "echo '$expdir *(rw,no_root_squash)' > /etc/exports" +- run "service_nfs restart" +- run "exportfs -v" +- run "mount -t nfs -o vers=4 localhost:$expdir $nfsmp" +- run "cat /proc/mounts | grep $nfsmp" - +- run "cat /proc/mounts | grep $nfsmp | grep -q 'port='" 1 "Omit displaying 'port=' by default" +- run "mount -o remount,ro $nfsmp" +- run "cat /proc/mounts | grep $nfsmp" - +- run "cat /proc/mounts | grep $nfsmp | grep -q 'port='" 1 "Omit displaying 'port=' by default" +- run "umount $nfsmp" +- if [ -e "/etc/nfs.conf" ]; then +- echo "[nfsd]" > /etc/nfs.conf +- echo "port=20050" >> /etc/nfs.conf +- run "cat /etc/nfs.conf" - +- run "service_nfs restart" +- run "sleep 10" +- run "rpcinfo -p | grep -w nfs | grep 20050" +- run "mount -t nfs4 -o port=20050 localhost:$expdir $nfsmp" +- if [ $? -eq 0 ]; then +- run "cat /proc/mounts | grep $nfsmp" - +- run "cat /proc/mounts | grep $nfsmp | grep -q port=20050" 0 "Should show port=20050" +- run "mount -o remount,ro $nfsmp" +- run "cat /proc/mounts | grep $nfsmp" - +- run "cat /proc/mounts | grep $nfsmp | grep -q port=20050" 0 "Should show port=20050" +- run "umount $nfsmp" +- fi +- log "{Info} If NFS service is not available on the specified port" +- run "mount -t nfs4 -o port=2049 localhost:$expdir $nfsmp" 1-255 +- if [ $? -eq 0 ]; then +- run "cat /proc/mounts | grep $nfsmp" - +- run "umount $nfsmp" +- fi +- log "{Info} If port value is not specified" +- if ls_nfsvers | grep -q -w 3; then +- run "mount -t nfs -o vers=3 localhost:$expdir $nfsmp" 0 "for v2/v3 client uses port advertised by server's rpcbind service" +- run "cat /proc/mounts | grep $nfsmp" - +- run "umount $nfsmp" +- fi +- run "mount -t nfs -o vers=4 localhost:$expdir $nfsmp" 1-255 "for v4 client uses the standard NFS port (2049) without checking" +- if [ $? -eq 0 ]; then +- run "cat /proc/mounts | grep $nfsmp" - +- run "umount $nfsmp" +- fi +- log "{Info} If the specified port value is 0" +- run "mount -t nfs -o vers=4,port=0 localhost:$expdir $nfsmp" +- if [ $? -eq 0 ]; then +- run "cat /proc/mounts | grep $nfsmp" - +- run "cat /proc/mounts | grep $nfsmp | grep -q port=0" 0 "Should show port=0" +- run "umount $nfsmp" +- fi +- run "echo '' > /etc/nfs.conf" 0 "Recovering" +- fi +- rlPhaseEnd +- +- if ls_nfsvers | grep -q -w "4.0"; then +- rlPhaseStartTest do-Test-bz1592915-sanity-check-clientaddr-during-mount +- run "echo '$expdir *(rw,no_root_squash)' > /etc/exports" +- run "service_nfs restart" +- run "exportfs -v" +- log "{Info} Mounting v4.0 by default" +- run "mount -o vers=4,minorversion=0 localhost:$expdir $nfsmp -v" +- if [ $? -eq 0 ]; then +- run "cat /proc/mounts | grep $nfsmp" - +- run "umount $nfsmp" +- fi +- log "{Info} Setting 'clientaddr=' not match any local address" +- # use normal mode (no verbose) to check the emitted warning +- run "mount -o vers=4,minorversion=0,clientaddr=1.2.3.4 localhost:$expdir $nfsmp &> >(tee stdout.log)" +- if [ $? -eq 0 ]; then +- run "cat /proc/mounts | grep $nfsmp" - +- run "umount $nfsmp" +- fi +- run "cat stdout.log | grep -q '[warning].*not match any existing network addresses'" 0 "Should warn the administrators" +- log "{Info} Specifying IPv4_ANY (0.0.0.0) signifying client does not want delegations" +- run "mount -o vers=4,minorversion=0,clientaddr=0.0.0.0 localhost:$expdir $nfsmp -v" +- if [ $? -eq 0 ]; then +- run "cat /proc/mounts | grep $nfsmp" - +- run "umount $nfsmp" +- fi +- log "{Info} Specifying IPv6_ANY (::0) signifying client does not want delegations" +- run "mount -o vers=4,minorversion=0,clientaddr=::0 localhost:$expdir $nfsmp -v" +- if [ $? -eq 0 ]; then +- run "cat /proc/mounts | grep $nfsmp" - +- run "umount $nfsmp" +- fi +- rlPhaseEnd +- fi +- +- rlPhaseStartCleanup do-Cleanup- +- run "rm -rf $expdir $nfsmp $subexpdir $tmpnfsmp" +- rlFileRestore +- run "service_nfs restart" +- if [ -n "ORIGINAL_HOSTNAME" ]; then +- HOSTNAME="$ORIGINAL_HOSTNAME" +- hostnamectl set-hostname "$HOSTNAME" +- fi +- rlPhaseEnd +-rlJournalEnd +-#rlJournalPrintText +-#enable_avc_check +diff --git a/tests/export-mount-local/subtest.yml b/tests/export-mount-local/subtest.yml +deleted file mode 100644 +index 1a77920..0000000 +--- a/tests/export-mount-local/subtest.yml ++++ /dev/null +@@ -1 +0,0 @@ +-attr: {ssched: yes} +diff --git a/tests/tests.yml b/tests/tests.yml +index 865464b..e8d6ecb 100644 +--- a/tests/tests.yml ++++ b/tests/tests.yml +@@ -8,13 +8,11 @@ + - classic + tests: + - exportfs +- - export-mount-local + - mount + - nfs-mount-options-all + - systemd-nfs + - umount + required_packages: +- - bind-utils # export-mount-local needs this package + - findutils # beakerlib needs find command + - iptables # nfs-mount-options-all needs this package + - nfs-utils + diff --git a/SOURCES/nfs-utils-2.3.3-gssd-usegssproxy.patch b/SOURCES/nfs-utils-2.3.3-gssd-usegssproxy.patch new file mode 100644 index 0000000..720752c --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-gssd-usegssproxy.patch @@ -0,0 +1,70 @@ +commit 104f90f4ce964ddcfe50d4d24cc5e7ff96952299 +Author: Steve Dickson +Date: Sat Oct 20 12:01:37 2018 -0400 + + gssd: Introduce use-gss-proxy boolean to nfs.conf + + Allow the used of the gssprox-mech(8) through a the + boolean variable in the [gssd] section of nfs.conf + + Signed-off-by: Steve Dickson + +diff --git a/nfs.conf b/nfs.conf +index 0d0ec9b..5546109 100644 +--- a/nfs.conf ++++ b/nfs.conf +@@ -11,6 +11,7 @@ + #[gssd] + # use-memcache=0 + # use-machine-creds=1 ++# use-gss-proxy=0 + # avoid-dns=1 + # limit-to-legacy-enctypes=0 + # context-timeout=0 +diff --git a/systemd/nfs.conf.man b/systemd/nfs.conf.man +index 189b052..699db3f 100644 +--- a/systemd/nfs.conf.man ++++ b/systemd/nfs.conf.man +@@ -213,6 +213,7 @@ for details. + Recognized values: + .BR use-memcache , + .BR use-machine-creds , ++.BR use-gss-proxy , + .BR avoid-dns , + .BR limit-to-legacy-enctypes , + .BR context-timeout , +diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c +index 00df2fc..2e92f28 100644 +--- a/utils/gssd/gssd.c ++++ b/utils/gssd/gssd.c +@@ -89,6 +89,7 @@ char *preferred_realm = NULL; + char *ccachedir = NULL; + /* Avoid DNS reverse lookups on server names */ + static bool avoid_dns = true; ++static bool use_gssproxy = false; + int thread_started = false; + pthread_mutex_t pmutex = PTHREAD_MUTEX_INITIALIZER; + pthread_cond_t pcond = PTHREAD_COND_INITIALIZER; +@@ -872,6 +873,7 @@ read_gss_conf(void) + if (s) + preferred_realm = s; + ++ use_gssproxy = conf_get_bool("gssd", "use-gss-proxy", use_gssproxy); + } + + int +@@ -957,6 +959,14 @@ main(int argc, char *argv[]) + exit(1); + } + ++ if (use_gssproxy) { ++ if (setenv("GSS_USE_PROXY", "yes", 1) < 0) { ++ printerr(0, "gssd: Unable to set $GSS_USE_PROXY: %s\n", ++ strerror(errno)); ++ exit(EXIT_FAILURE); ++ } ++ } ++ + if (ccachedir) { + char *ccachedir_copy; + char *ptr; diff --git a/SOURCES/nfs-utils-2.3.3-junction-update.patch b/SOURCES/nfs-utils-2.3.3-junction-update.patch new file mode 100644 index 0000000..6921df9 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-junction-update.patch @@ -0,0 +1,162 @@ +diff --git a/aclocal/libxml2.m4 b/aclocal/libxml2.m4 +index 5c399b2..8231553 100644 +--- a/aclocal/libxml2.m4 ++++ b/aclocal/libxml2.m4 +@@ -1,15 +1,17 @@ + dnl Checks for libxml2.so + AC_DEFUN([AC_LIBXML2], [ + +- if test "$enable_junction" = yes; then ++ PKG_PROG_PKG_CONFIG([0.9.0]) ++ AS_IF( ++ [test "$enable_junction" = "yes"], ++ [PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.4], ++ [LIBXML2="${XML2_LIBS}" ++ AM_CPPFLAGS="${AM_CPPFLAGS} ${XML2_CFLAGS}" ++ AC_DEFINE([HAVE_LIBXML2], [1], ++ [Define to 1 if you have and wish to use libxml2.])], ++ [AC_MSG_ERROR([libxml2 not found.])])]) + +- dnl look for the library; do not add to LIBS if found +- AC_CHECK_LIB([xml2], [xmlParseFile], [LIBXML2=-lxml2], +- [AC_MSG_ERROR([libxml2 not found.])]) +- AC_SUBST(LIBXML2) +- +- dnl XXX should also check for presence of xml headers +- +- fi ++ AC_SUBST([AM_CPPFLAGS]) ++ AC_SUBST(LIBXML2) + + ])dnl +diff --git a/configure.ac b/configure.ac +index cf1c4b9..b458891 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -165,7 +165,7 @@ AC_ARG_ENABLE(uuid, + choose_blkid=default) + AC_ARG_ENABLE(mount, + [AC_HELP_STRING([--disable-mount], +- [Don't build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])], ++ [Do not build mount.nfs and do use the util-linux mount(8) functionality. @<:@default=no@:>@])], + enable_mount=$enableval, + enable_mount=yes) + AM_CONDITIONAL(CONFIG_MOUNT, [test "$enable_mount" = "yes"]) +@@ -185,7 +185,13 @@ AC_ARG_ENABLE(junction, + [enable support for NFS junctions @<:@default=no@:>@])], + enable_junction=$enableval, + enable_junction=no) +-AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ]) ++ if test "$enable_junction" = yes; then ++ AC_DEFINE(HAVE_JUNCTION_SUPPORT, 1, ++ [Define this if you want junction support compiled in]) ++ else ++ enable_junction= ++ fi ++ AM_CONDITIONAL(CONFIG_JUNCTION, [test "$enable_junction" = "yes" ]) + + AC_ARG_ENABLE(tirpc, + [AC_HELP_STRING([--disable-tirpc], +diff --git a/support/junction/Makefile.am b/support/junction/Makefile.am +index 97e7426..be6958b 100644 +--- a/support/junction/Makefile.am ++++ b/support/junction/Makefile.am +@@ -30,5 +30,3 @@ libjunction_la_SOURCES = display.c export-cache.c junction.c \ + locations.c nfs.c path.c xml.c + + MAINTAINERCLEANFILES = Makefile.in +- +-AM_CPPFLAGS = -I. -I../include -I/usr/include/libxml2 +diff --git a/utils/mountd/cache.c b/utils/mountd/cache.c +index 6f42512..7e8d403 100644 +--- a/utils/mountd/cache.c ++++ b/utils/mountd/cache.c +@@ -976,8 +976,9 @@ lookup_export(char *dom, char *path, struct addrinfo *ai) + return found; + } + +-#ifdef CONFIG_JUNCTION ++#ifdef HAVE_JUNCTION_SUPPORT + ++#include + #include "junction.h" + + struct nfs_fsloc_set { +@@ -1084,8 +1085,7 @@ static bool locations_to_fslocdata(struct nfs_fsloc_set *locations, + *ttl = 0; + + for (;;) { +- enum jp_status status; +- int len; ++ int len, status; + + status = get_next_location(locations, &server, + &rootpath, ttl); +@@ -1219,7 +1219,7 @@ nfs_get_basic_junction(const char *junct_path, struct nfs_fsloc_set **locset) + return EINVAL; + } + +- locset->ns_current = locset->ns_list; ++ new->ns_current = new->ns_list; + new->ns_ttl = 300; + *locset = new; + return 0; +@@ -1242,7 +1242,7 @@ static struct exportent *lookup_junction(char *dom, const char *pathname, + status = nfs_get_basic_junction(pathname, &locations); + switch (status) { + xlog(L_WARNING, "Dangling junction %s: %s", +- pathname, strerro(status)); ++ pathname, strerror(status)); + goto out; + } + +@@ -1252,8 +1252,8 @@ static struct exportent *lookup_junction(char *dom, const char *pathname, + + exp = locations_to_export(locations, pathname, parent); + +- nfs_free_locations(locset->ns_list); +- free(locset); ++ nfs_free_locations(locations->ns_list); ++ free(locations); + + out: + xmlCleanupParser(); +@@ -1273,7 +1273,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path + free(eep); + } + +-#else /* !CONFIG_JUNCTION */ ++#else /* !HAVE_JUNCTION_SUPPORT */ + + static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path, + struct addrinfo *UNUSED(ai)) +@@ -1281,7 +1281,7 @@ static void lookup_nonexport(int f, char *buf, int buflen, char *dom, char *path + dump_to_cache(f, buf, buflen, dom, path, NULL, 0); + } + +-#endif /* !CONFIG_JUNCTION */ ++#endif /* !HAVE_JUNCTION_SUPPORT */ + + static void nfsd_export(int f) + { +diff --git a/utils/nfsref/Makefile.am b/utils/nfsref/Makefile.am +index 2b2bb53..2409dd0 100644 +--- a/utils/nfsref/Makefile.am ++++ b/utils/nfsref/Makefile.am +@@ -27,13 +27,11 @@ noinst_HEADERS = nfsref.h + + sbin_PROGRAMS = nfsref + nfsref_SOURCES = add.c lookup.c nfsref.c remove.c +-LDADD = $(LIBXML2) $(LIBCAP) \ +- ../../support/nfs/libnfs.la \ +- ../../support/junction/libjunction.la ++LDADD = ../../support/nfs/libnfs.la \ ++ ../../support/junction/libjunction.la \ ++ $(LIBXML2) $(LIBCAP) + + man8_MANS = nfsref.man + + MAINTAINERCLEANFILES = Makefile.in + +-AM_CPPFLAGS = -I. -I../../support/include +-##AM_LDFLAGS = -Wl,--as-needed diff --git a/SOURCES/nfs-utils-2.3.3-man-tcpwrappers.patch b/SOURCES/nfs-utils-2.3.3-man-tcpwrappers.patch new file mode 100644 index 0000000..65fee3a --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-man-tcpwrappers.patch @@ -0,0 +1,89 @@ +diff -up nfs-utils-2.3.3/utils/mountd/mountd.man.orig nfs-utils-2.3.3/utils/mountd/mountd.man +--- nfs-utils-2.3.3/utils/mountd/mountd.man.orig 2018-09-06 14:09:08.000000000 -0400 ++++ nfs-utils-2.3.3/utils/mountd/mountd.man 2018-10-26 09:53:10.005127368 -0400 +@@ -232,36 +232,7 @@ section include + which each have same same meaning as given by + .BR rpc.nfsd (8). + +-.SH TCP_WRAPPERS SUPPORT +-You can protect your +-.B rpc.mountd +-listeners using the +-.B tcp_wrapper +-library or +-.BR iptables (8). +-.PP +-Note that the +-.B tcp_wrapper +-library supports only IPv4 networking. +-.PP +-Add the hostnames of NFS peers that are allowed to access +-.B rpc.mountd +-to +-.IR /etc/hosts.allow . +-Use the daemon name +-.B mountd +-even if the +-.B rpc.mountd +-binary has a different name. +-.PP +-Hostnames used in either access file will be ignored when +-they can not be resolved into IP addresses. +-For further information see the +-.BR tcpd (8) +-and +-.BR hosts_access (5) +-man pages. +-.SS IPv6 and TI-RPC support ++.SH IPv6 and TI-RPC support + TI-RPC is a pre-requisite for supporting NFS on IPv6. + If TI-RPC support is built into + .BR rpc.mountd , +@@ -288,7 +259,6 @@ table of clients accessing server's expo + .BR nfs (5), + .BR nfs.conf (5), + .BR tcpd (8), +-.BR hosts_access (5), + .BR iptables (8), + .BR netconfig (5) + .sp +diff -up nfs-utils-2.3.3/utils/statd/statd.man.orig nfs-utils-2.3.3/utils/statd/statd.man +--- nfs-utils-2.3.3/utils/statd/statd.man.orig 2018-10-26 09:52:27.609358805 -0400 ++++ nfs-utils-2.3.3/utils/statd/statd.man 2018-10-26 09:53:37.345978117 -0400 +@@ -319,28 +319,6 @@ chooses, simply use + .BR chown (1) + to set the owner of + the state directory. +-.PP +-You can also protect your +-.B rpc.statd +-listeners using the +-.B tcp_wrapper +-library or +-.BR iptables (8). +-To use the +-.B tcp_wrapper +-library, add the hostnames of peers that should be allowed access to +-.IR /etc/hosts.allow . +-Use the daemon name +-.B statd +-even if the +-.B rpc.statd +-binary has a different filename. +-.P +-For further information see the +-.BR tcpd (8) +-and +-.BR hosts_access (5) +-man pages. + .SH ADDITIONAL NOTES + Lock recovery after a reboot is critical to maintaining data integrity + and preventing unnecessary application hangs. +@@ -445,7 +423,6 @@ network transport capability database + .BR rpc.nfsd (8), + .BR rpcbind (8), + .BR tcpd (8), +-.BR hosts_access (5), + .BR iptables (8), + .BR netconfig (5) + .sp diff --git a/SOURCES/nfs-utils-2.3.3-mount-sharecache.patch b/SOURCES/nfs-utils-2.3.3-mount-sharecache.patch new file mode 100644 index 0000000..9737a08 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-mount-sharecache.patch @@ -0,0 +1,47 @@ +diff -up nfs-utils-2.3.3/utils/mount/Makefile.am.orig nfs-utils-2.3.3/utils/mount/Makefile.am +--- nfs-utils-2.3.3/utils/mount/Makefile.am.orig 2018-09-06 14:09:08.000000000 -0400 ++++ nfs-utils-2.3.3/utils/mount/Makefile.am 2018-10-25 10:27:33.881804941 -0400 +@@ -27,6 +27,7 @@ endif + + mount_nfs_LDADD = ../../support/nfs/libnfs.la \ + ../../support/export/libexport.a \ ++ ../../support/misc/libmisc.a \ + $(LIBTIRPC) + + mount_nfs_SOURCES = $(mount_common) +diff -up nfs-utils-2.3.3/utils/mount/stropts.c.orig nfs-utils-2.3.3/utils/mount/stropts.c +--- nfs-utils-2.3.3/utils/mount/stropts.c.orig 2018-09-06 14:09:08.000000000 -0400 ++++ nfs-utils-2.3.3/utils/mount/stropts.c 2018-10-25 10:27:59.733825016 -0400 +@@ -48,6 +48,7 @@ + #include "version.h" + #include "parse_dev.h" + #include "conffile.h" ++#include "misc.h" + + #ifndef NFS_PROGRAM + #define NFS_PROGRAM (100003) +@@ -1078,14 +1079,18 @@ static int nfsmount_fg(struct nfsmount_i + if (nfs_try_mount(mi)) + return EX_SUCCESS; + +- if (errno == EBUSY) +- /* The only cause of EBUSY is if exactly the desired +- * filesystem is already mounted. That can arguably +- * be seen as success. "mount -a" tries to optimise +- * out this case but sometimes fails. Help it out +- * by pretending everything is rosy ++#pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" ++ if (errno == EBUSY && is_mountpoint(mi->node)) { ++#pragma GCC diagnostic warning "-Wdiscarded-qualifiers" ++ /* ++ * EBUSY can happen when mounting a filesystem that ++ * is already mounted or when the context= are ++ * different when using the -o sharecache ++ * ++ * Only error out in the latter case. + */ + return EX_SUCCESS; ++ } + + if (nfs_is_permanent_error(errno)) + break; diff --git a/SOURCES/nfs-utils-2.3.3-nfsconf-usegssproxy.patch b/SOURCES/nfs-utils-2.3.3-nfsconf-usegssproxy.patch new file mode 100644 index 0000000..e4f13a4 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-nfsconf-usegssproxy.patch @@ -0,0 +1,82 @@ +diff -up nfs-utils-2.3.3/nfs.conf.orig nfs-utils-2.3.3/nfs.conf +--- nfs-utils-2.3.3/nfs.conf.orig 2018-10-22 13:34:58.927700353 -0400 ++++ nfs-utils-2.3.3/nfs.conf 2018-10-22 14:14:36.864110090 -0400 +@@ -2,16 +2,16 @@ + # This is a general configuration for the + # NFS daemons and tools + # +-#[general] ++[general] + # pipefs-directory=/var/lib/nfs/rpc_pipefs + # +-#[exportfs] ++[exportfs] + # debug=0 + # +-#[gssd] ++[gssd] + # use-memcache=0 + # use-machine-creds=1 +-# use-gss-proxy=0 ++use-gss-proxy=1 + # avoid-dns=1 + # limit-to-legacy-enctypes=0 + # context-timeout=0 +@@ -20,11 +20,11 @@ + # cred-cache-directory= + # preferred-realm= + # +-#[lockd] ++[lockd] + # port=0 + # udp-port=0 + # +-#[mountd] ++[mountd] + # debug=0 + # manage_gids=n + # descriptors=0 +@@ -34,18 +34,17 @@ + # state-directory-path=/var/lib/nfs + # ha-callout= + # +-#[nfsdcltrack] ++[nfsdcltrack] + # debug=0 + # storagedir=/var/lib/nfs/nfsdcltrack + # +-#[nfsd] ++[nfsd] + # debug=0 + # threads=8 + # host= + # port=0 + # grace-time=90 + # lease-time=90 +-# udp=n + # tcp=y + # vers2=n + # vers3=y +@@ -55,7 +54,7 @@ + # vers4.2=y + # rdma=n + # +-#[statd] ++[statd] + # debug=0 + # port=0 + # outgoing-port=0 +@@ -63,12 +62,10 @@ + # state-directory-path=/var/lib/nfs/statd + # ha-callout= + # +-#[sm-notify] ++[sm-notify] + # debug=0 + # retry-time=900 + # outgoing-port= + # outgoing-addr= + # lift-grace=y + # +-#[svcgssd] +-# principal= diff --git a/SOURCES/nfs-utils-2.3.3-nfsd-disable-v4.patch b/SOURCES/nfs-utils-2.3.3-nfsd-disable-v4.patch new file mode 100644 index 0000000..16b0330 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-nfsd-disable-v4.patch @@ -0,0 +1,104 @@ +diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c +index 2c14e5f..00df2fc 100644 +--- a/utils/gssd/gssd.c ++++ b/utils/gssd/gssd.c +@@ -888,6 +888,9 @@ main(int argc, char *argv[]) + + read_gss_conf(); + ++ verbosity = conf_get_num("gssd", "Verbosity", verbosity); ++ rpc_verbosity = conf_get_num("gssd", "RPC-Verbosity", rpc_verbosity); ++ + while ((opt = getopt(argc, argv, "DfvrlmnMp:k:d:t:T:R:")) != -1) { + switch (opt) { + case 'f': +diff --git a/utils/gssd/svcgssd.c b/utils/gssd/svcgssd.c +index 8e918cc..ec49b61 100644 +--- a/utils/gssd/svcgssd.c ++++ b/utils/gssd/svcgssd.c +@@ -113,6 +113,10 @@ main(int argc, char *argv[]) + else + principal = s; + ++ verbosity = conf_get_num("svcgssd", "Verbosity", verbosity); ++ rpc_verbosity = conf_get_num("svcgssd", "RPC-Verbosity", rpc_verbosity); ++ idmap_verbosity = conf_get_num("svcgssd", "IDMAP-Verbosity", idmap_verbosity); ++ + while ((opt = getopt(argc, argv, "fivrnp:")) != -1) { + switch (opt) { + case 'f': +diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c +index 4811e0f..d14eef7 100644 +--- a/utils/idmapd/idmapd.c ++++ b/utils/idmapd/idmapd.c +@@ -261,6 +261,10 @@ main(int argc, char **argv) + strlcpy(pipefsdir, xpipefsdir, sizeof(pipefsdir)); + CONF_SAVE(nobodyuser, conf_get_str("Mapping", "Nobody-User")); + CONF_SAVE(nobodygroup, conf_get_str("Mapping", "Nobody-Group")); ++ if (conf_get_bool("General", "server-only", false)) ++ clientstart = 0; ++ if (conf_get_bool("General", "client-only", false)) ++ serverstart = 0; + } + } else { + conf_path = NFS_CONFFILE; +@@ -276,6 +280,10 @@ main(int argc, char **argv) + "cache-expiration", DEFAULT_IDMAP_CACHE_EXPIRY); + CONF_SAVE(nobodyuser, conf_get_str("Mapping", "Nobody-User")); + CONF_SAVE(nobodygroup, conf_get_str("Mapping", "Nobody-Group")); ++ if (conf_get_bool("General", "server-only", false)) ++ clientstart = 0; ++ if (conf_get_bool("General", "client-only", false)) ++ serverstart = 0; + } + + while ((opt = getopt(argc, argv, GETOPTSTR)) != -1) +diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c +index 6b57e2b..b256bd9 100644 +--- a/utils/nfsd/nfsd.c ++++ b/utils/nfsd/nfsd.c +@@ -83,6 +83,9 @@ main(int argc, char **argv) + + conf_init_file(NFS_CONFFILE); + xlog_from_conffile("nfsd"); ++ ++ nfssvc_get_minormask(&minormask); ++ + count = conf_get_num("nfsd", "threads", count); + grace = conf_get_num("nfsd", "grace-time", grace); + lease = conf_get_num("nfsd", "lease-time", lease); +@@ -101,13 +104,19 @@ main(int argc, char **argv) + for (i = 2; i <= 4; i++) { + char tag[20]; + sprintf(tag, "vers%d", i); +- if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) ++ if (conf_get_bool("nfsd", tag, NFSCTL_VERISSET(versbits, i))) { + NFSCTL_VERSET(versbits, i); +- else ++ if (i == 4) ++ minorvers = minorversset = minormask; ++ } else { + NFSCTL_VERUNSET(versbits, i); ++ if (i == 4) { ++ minorvers = 0; ++ minorversset = minormask; ++ } ++ } + } + +- nfssvc_get_minormask(&minormask); + /* We assume the kernel will default all minor versions to 'on', + * and allow the config file to disable some. + */ +diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c +index 7a48473..29dad38 100644 +--- a/utils/statd/sm-notify.c ++++ b/utils/statd/sm-notify.c +@@ -503,6 +503,7 @@ main(int argc, char **argv) + s = conf_get_str("statd", "state-directory-path"); + if (s && !nsm_setup_pathnames(argv[0], s)) + exit(1); ++ opt_update_state = conf_get_bool("sm-notify", "update-state", opt_update_state); + + while ((c = getopt(argc, argv, "dm:np:v:P:f")) != -1) { + switch (c) { diff --git a/SOURCES/nfs-utils-2.3.3-remove-osd_login.patch b/SOURCES/nfs-utils-2.3.3-remove-osd_login.patch new file mode 100644 index 0000000..d626790 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-remove-osd_login.patch @@ -0,0 +1,188 @@ +commit 80b17639d78e152306d8d1753d719654ebb40e01 +Author: Steve Dickson +Date: Fri Oct 19 10:26:10 2018 -0400 + + Remove osd_login + + This ancient script has not been used + in years, if used at all. + + Signed-off-by: Steve Dickson + +diff --git a/configure.ac b/configure.ac +index e82ff14..cf1c4b9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -238,13 +238,6 @@ AC_ARG_ENABLE(nfsdcltrack, + enable_nfsdcltrack=$enableval, + enable_nfsdcltrack="yes") + +-AC_ARG_ENABLE(osdlogin, +- [AC_HELP_STRING([--enable-osdlogin], +- [enable osd_login scripts @<:@default=no@:>@])], +- enable_osdlogin=$enableval, +- enable_osdlogin="no") +- AM_CONDITIONAL(CONFIG_OSD_LOGIN, [test "$enable_osdlogin" = "yes" ]) +- + dnl Check for TI-RPC library and headers + AC_LIBTIRPC + +@@ -631,7 +624,6 @@ AC_CONFIG_FILES([ + utils/nfsidmap/Makefile + utils/showmount/Makefile + utils/statd/Makefile +- utils/osd_login/Makefile + systemd/Makefile + tests/Makefile + tests/nsm_client/Makefile]) +diff --git a/utils/Makefile.am b/utils/Makefile.am +index d361aea..0a5b062 100644 +--- a/utils/Makefile.am ++++ b/utils/Makefile.am +@@ -34,7 +34,6 @@ SUBDIRS = \ + nfsstat \ + showmount \ + statd \ +- osd_login \ + $(OPTDIRS) + + MAINTAINERCLEANFILES = Makefile.in +diff --git a/utils/osd_login/Makefile.am b/utils/osd_login/Makefile.am +deleted file mode 100644 +index ded1fd3..0000000 +--- a/utils/osd_login/Makefile.am ++++ /dev/null +@@ -1,9 +0,0 @@ +-## 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 +- +-dist_sbin_SCRIPTS = osd_login +- +-MAINTAINERCLEANFILES = Makefile.in +diff --git a/utils/osd_login/osd_login b/utils/osd_login/osd_login +deleted file mode 100644 +index 08cd2d2..0000000 +--- a/utils/osd_login/osd_login ++++ /dev/null +@@ -1,118 +0,0 @@ +-#!/bin/bash +-# +-# osd_login : This script is part of the autologin feature +-# mandated by the pnfs-objects standard. +-# It is called from objlayoutdriver.ko in the kernel. +- +-# Copyright (C) 2012, Sachin Bhamare +-# Copyright (C) 2012, Boaz Harrosh +-# +-# This program is free software; you can redistribute it and/or modify +-# it under the terms of the GNU General Public License version 2 as +-# published by the Free Software Foundation. +-# +-# This program is distributed in the hope that it will be useful, +-# but WITHOUT ANY WARRANTY; without even the implied warranty of +-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-# GNU General Public License for more details. +-# +-# You should have received a copy of the GNU General Public License +-# along with this program; if not, write to the Free Software +-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +-# MA 02110-1301 USA +- +-umask 022 +- +-PATH="/sbin:/usr/sbin:/bin:/usr/bin" +- +-iscsiadm=/sbin/iscsiadm +- +-PARENT_PID=$BASHPID +-WATCHDOG_TIMEOUT=15 +- +-protocol="" +-portal="" +-uri="" +-osdname="" +-systemid="" +- +-usage() +-{ +- echo "Usage: $0 -u -o -s " +- echo "Options:" +- echo "-u target uri e.g. iscsi://:" +- echo "-o osdname of the target OSD" +- echo "-s systemid of the target OSD" +-} +- +-parse_cmdline() +-{ +- argc=$# +- if [ $# -lt 3 ]; then +- usage +- exit 1 +- fi +- +- # parse the input arguments +- while getopts "u:o:s:" options; do +- case $options in +- u ) uri=$OPTARG;; +- o ) osdname=$OPTARG;; +- s ) systemid=$OPTARG;; +- \? ) usage +- exit 1;; +- * ) usage +- exit 1;; +- esac +- done +- +- echo "-u : $uri" +- echo "-o : $osdname" +- echo "-s : $systemid" +- +- protocol=`echo $uri | awk -F ':' '{print $1}'` +- portal=`echo $uri | awk -F '//' '{print $2}'` +-} +- +-watchdog() +-{ +- timeout=$1 +- portal=$2 +- +- sleep $timeout +- if kill -9 $PARENT_PID; then +- echo "watchdog : Timed out (>$timeout seconds) while login into $portal" | logger -t "osd_login" +- fi +- echo "watchdog: exiting .." +- exit 2 +-} +- +-login_iscsi_osd() +-{ +- echo "login into: $1" +- if ! $iscsiadm -m discovery -o nonpersistent -t sendtargets -p $1 --login; then +- echo "$iscsiadm -m discovery -t sendtargets -p $1 --login returned error $? !" +- sleep 1; +- fi +-} +- +-echo "============= osd_login =========" +-echo "progname : $0" +-parse_cmdline "$@" +-echo "protocol: $protocol" +-echo "portal: $portal" +- +-watchdog $WATCHDOG_TIMEOUT $portal & +-watchdog_pid=$! +- +-case $protocol in +-iscsi) +- login_iscsi_osd $portal |& logger -t "osd_login" +- ;; +-*) +- echo "Error: protocol $protocol not supported !" | logger -t "osd_login" +- ;; +-esac +- +-kill -9 $watchdog_pid +-exit 0 diff --git a/SOURCES/nfs-utils-2.3.3-statd-no-notify.patch b/SOURCES/nfs-utils-2.3.3-statd-no-notify.patch new file mode 100644 index 0000000..e29d2e4 --- /dev/null +++ b/SOURCES/nfs-utils-2.3.3-statd-no-notify.patch @@ -0,0 +1,105 @@ +commit 5394f939b591e65fec37a6bee826c13620d3f39b +Author: Justin Mitchell +Date: Mon Mar 4 11:53:09 2019 -0500 + + Add nfs.conf equivalent for the statd --no-notify cmdline option + + Also cleaned up how nfs.conf is read. + + Signed-off-by: Justin Mitchell + Signed-off-by: Steve Dickson + +diff --git a/nfs.conf b/nfs.conf +index f1ebfdb..d332375 100644 +--- a/nfs.conf ++++ b/nfs.conf +@@ -62,6 +62,7 @@ + # name= + # state-directory-path=/var/lib/nfs/statd + # ha-callout= ++# no-notify=0 + # + [sm-notify] + # debug=0 +diff --git a/utils/statd/statd.c b/utils/statd/statd.c +index 2cc6cf3..1467380 100644 +--- a/utils/statd/statd.c ++++ b/utils/statd/statd.c +@@ -238,6 +238,39 @@ static void set_nlm_port(char *type, int port) + fprintf(stderr, "%s: failed to open %s: %s\n", + name_p, pathbuf, strerror(errno)); + } ++int port = 0, out_port = 0; ++int nlm_udp = 0, nlm_tcp = 0; ++ ++inline static void ++read_nfsconf(char **argv) ++{ ++ char *s; ++ ++ conf_init_file(NFS_CONFFILE); ++ xlog_from_conffile("statd"); ++ ++ out_port = conf_get_num("statd", "outgoing-port", out_port); ++ port = conf_get_num("statd", "port", port); ++ ++ MY_NAME = conf_get_str("statd", "name"); ++ if (MY_NAME) ++ run_mode |= STATIC_HOSTNAME; ++ ++ s = conf_get_str("statd", "state-directory-path"); ++ if (s && !nsm_setup_pathnames(argv[0], s)) ++ exit(1); ++ ++ s = conf_get_str("statd", "ha-callout"); ++ if (s) ++ ha_callout_prog = s; ++ ++ nlm_tcp = conf_get_num("lockd", "port", nlm_tcp); ++ /* udp defaults to the same as tcp ! */ ++ nlm_udp = conf_get_num("lockd", "udp-port", nlm_tcp); ++ ++ if (conf_get_bool("statd", "no-notify", false)) ++ run_mode |= MODE_NO_NOTIFY; ++} + + /* + * Entry routine/main loop. +@@ -245,11 +278,8 @@ static void set_nlm_port(char *type, int port) + int main (int argc, char **argv) + { + extern char *optarg; +- char *s; + int pid; + int arg; +- int port = 0, out_port = 0; +- int nlm_udp = 0, nlm_tcp = 0; + struct rlimit rlim; + int notify_sockfd; + char *env; +@@ -275,23 +305,8 @@ int main (int argc, char **argv) + /* Set hostname */ + MY_NAME = NULL; + +- conf_init_file(NFS_CONFFILE); +- xlog_from_conffile("statd"); +- out_port = conf_get_num("statd", "outgoing-port", out_port); +- port = conf_get_num("statd", "port", port); +- MY_NAME = conf_get_str("statd", "name"); +- if (MY_NAME) +- run_mode |= STATIC_HOSTNAME; +- s = conf_get_str("statd", "state-directory-path"); +- if (s && !nsm_setup_pathnames(argv[0], s)) +- exit(1); +- s = conf_get_str("statd", "ha-callout"); +- if (s) +- ha_callout_prog = s; +- +- nlm_tcp = conf_get_num("lockd", "port", nlm_tcp); +- /* udp defaults to the same as tcp ! */ +- nlm_udp = conf_get_num("lockd", "udp-port", nlm_tcp); ++ /* Read nfs.conf */ ++ read_nfsconf(argv); + + /* Process command line switches */ + while ((arg = getopt_long(argc, argv, "h?vVFNH:dn:p:o:P:LT:U:", longopts, NULL)) != EOF) { diff --git a/SOURCES/nfsconvert.py b/SOURCES/nfsconvert.py new file mode 100644 index 0000000..da2f621 --- /dev/null +++ b/SOURCES/nfsconvert.py @@ -0,0 +1,312 @@ +#!/usr/bin/env python3 +""" +Read in the deprecated /etc/sysconfig/nfs file and +set the corresponding values in nfs.conf +""" + +from __future__ import print_function +import os +import sys +import getopt +import subprocess +import configparser + +CONF_NFS = '/etc/nfs.conf' +CONF_IDMAP = '/etc/idmapd.conf' +SYSCONF_NFS = '/etc/sysconfig/nfs' +SYSCONF_BACKUP = ".rpmsave" +CONF_TOOL = '/usr/sbin/nfsconf' + +# options for nfsd found in RPCNFSDARGS +OPTS_NFSD = 'dH:p:rR:N:V:stTuUG:L:' +LONG_NFSD = ['debug', 'host=', 'port=', 'rdma=', 'nfs-version=', 'no-nfs-version=', + 'tcp', 'no-tcp', 'udp', 'no-udp', 'grace-time=', 'lease-time='] +CONV_NFSD = {'-d': (CONF_NFS, 'nfsd', 'debug', 'all'), + '-H': (CONF_NFS, 'nfsd', 'host', ','), + '-p': (CONF_NFS, 'nfsd', 'port', '$1'), + '-r': (CONF_NFS, 'nfsd', 'rdma', 'nfsrdma'), + '-R': (CONF_NFS, 'nfsd', 'rdma', '$1'), + '-N': (CONF_NFS, 'nfsd', 'vers$1', 'n'), + '-V': (CONF_NFS, 'nfsd', 'vers$1', 'y'), + '-t': (CONF_NFS, 'nfsd', 'tcp', '1'), + '-T': (CONF_NFS, 'nfsd', 'tcp', '0'), + '-u': (CONF_NFS, 'nfsd', 'udp', '1'), + '-U': (CONF_NFS, 'nfsd', 'udp', '0'), + '-G': (CONF_NFS, 'nfsd', 'grace-time', '$1'), + '-L': (CONF_NFS, 'nfsd', 'lease-time', '$1'), + '$1': (CONF_NFS, 'nfsd', 'threads', '$1'), + '--debug': (CONF_NFS, 'nfsd', 'debug', 'all'), + '--host': (CONF_NFS, 'nfsd', 'host', ','), + '--port': (CONF_NFS, 'nfsd', 'port', '$1'), + '--rdma': (CONF_NFS, 'nfsd', 'rdma', '$1'), + '--no-nfs-version': (CONF_NFS, 'nfsd', 'vers$1', 'n'), + '--nfs-version': (CONF_NFS, 'nfsd', 'vers$1', 'y'), + '--tcp': (CONF_NFS, 'nfsd', 'tcp', '1'), + '--no-tcp': (CONF_NFS, 'nfsd', 'tcp', '0'), + '--udp': (CONF_NFS, 'nfsd', 'udp', '1'), + '--no-udp': (CONF_NFS, 'nfsd', 'udp', '0'), + '--grace-time': (CONF_NFS, 'nfsd', 'grace-time', '$1'), + '--lease-time': (CONF_NFS, 'nfsd', 'lease-time', '$1'), + } + +# options for mountd found in RPCMOUNTDOPTS +OPTS_MOUNTD = 'go:d:H:p:N:nrs:t:V:' +LONG_MOUNTD = ['descriptors=', 'debug=', 'nfs-version=', 'no-nfs-version=', + 'port=', 'no-tcp', 'ha-callout=', 'state-directory-path=', + 'num-threads=', 'reverse-lookup', 'manage-gids', 'no-udp'] + +CONV_MOUNTD = {'-g': (CONF_NFS, 'mountd', 'manage-gids', '1'), + '-o': (CONF_NFS, 'mountd', 'descriptors', '$1'), + '-d': (CONF_NFS, 'mountd', 'debug', '$1'), + '-H': (CONF_NFS, 'mountd', 'ha-callout', '$1'), + '-p': (CONF_NFS, 'mountd', 'port', '$1'), + '-N': (CONF_NFS, 'nfsd', 'vers$1', 'n'), + '-V': (CONF_NFS, 'nfsd', 'vers$1', 'y'), + '-n': (CONF_NFS, 'nfsd', 'tcp', '0'), + '-s': (CONF_NFS, 'mountd', 'stat-directory-path', '$1'), + '-t': (CONF_NFS, 'mountd', 'threads', '$1'), + '-r': (CONF_NFS, 'mountd', 'reverse-lookup', '1'), + '-u': (CONF_NFS, 'nfsd', 'udp', '0'), + '--manage-gids': (CONF_NFS, 'mountd', 'manage-gids', '1'), + '--descriptors': (CONF_NFS, 'mountd', 'descriptors', '$1'), + '--debug': (CONF_NFS, 'mountd', 'debug', '$1'), + '--ha-callout': (CONF_NFS, 'mountd', 'ha-callout', '$1'), + '--port': (CONF_NFS, 'mountd', 'port', '$1'), + '--nfs-version': (CONF_NFS, 'nfsd', 'vers$1', 'y'), + '--no-nfs-version': (CONF_NFS, 'nfsd', 'vers$1', 'n'), + '--no-tcp': (CONF_NFS, 'nfsd', 'tcp', '0'), + '--state-directory-path': (CONF_NFS, 'mountd', 'state-directory-path', '$1'), + '--num-threads': (CONF_NFS, 'mountd', 'threads', '$1'), + '--reverse-lookup': (CONF_NFS, 'mountd', 'reverse-lookup', '1'), + '--no-udp': (CONF_NFS, 'nfsd', 'udp', '0'), + } + +# options for statd found in STATDARG +OPTS_STATD = 'o:p:T:U:n:P:H:L' +LONG_STATD = ['outgoing-port=', 'port=', 'name=', 'state-directory-path=', + 'ha-callout=', 'nlm-port=', 'nlm-udp-port=', 'no-notify'] +CONV_STATD = {'-o': (CONF_NFS, 'statd', 'outgoing-port', '$1'), + '-p': (CONF_NFS, 'statd', 'port', '$1'), + '-T': (CONF_NFS, 'lockd', 'port', '$1'), + '-U': (CONF_NFS, 'lockd', 'udp-port', '$1'), + '-n': (CONF_NFS, 'statd', 'name', '$1'), + '-P': (CONF_NFS, 'statd', 'state-directory-path', '$1'), + '-H': (CONF_NFS, 'statd', 'ha-callout', '$1'), + '-L': (CONF_NFS, 'statd', 'no-notify', '1'), + '--outgoing-port': (CONF_NFS, 'statd', 'outgoing-port', '$1'), + '--port': (CONF_NFS, 'statd', 'port', '$1'), + '--name': (CONF_NFS, 'statd', 'name', '$1'), + '--state-directory-path': (CONF_NFS, 'statd', 'state-directory-path', '$1'), + '--ha-callout': (CONF_NFS, 'statd', 'ha-callout', '$1'), + '--nlm-port': (CONF_NFS, 'lockd', 'port', '$1'), + '--nlm-udp-port': (CONF_NFS, 'lockd', 'udp-port', '$1'), + '--no-notify': (CONF_NFS, 'statd', 'no-notify', '1'), + } + +# options for sm-notify found in SMNOTIFYARGS +OPTS_SMNOTIFY = 'dm:np:v:P:' +CONV_SMNOTIFY = {'-d': (CONF_NFS, 'sm-notify', 'debug', 'all'), + '-m': (CONF_NFS, 'sm-notify', 'retry-time', '$1'), + '-n': (CONF_NFS, 'sm-notify', 'update-state', '1'), + '-p': (CONF_NFS, 'sm-notify', 'outgoing-port', '$1'), + '-v': (CONF_NFS, 'sm-notify', 'outgoing-addr', '$1'), + '-P': (CONF_NFS, 'statd', 'state-directory-path', '$1'), + } + +# options for idmapd found in RPCIDMAPDARGS +OPTS_IDMAPD = 'vp:CS' +CONV_IDMAPD = {'-v': (CONF_IDMAP, 'general', 'verbosity', '+'), + '-p': (CONF_NFS, 'general', 'pipefs-directory', '$1'), + '-C': (CONF_IDMAP, 'general', 'client-only', '1'), + '-S': (CONF_IDMAP, 'general', 'server-only', '1'), + } + +# options for gssd found in RPCGSSDARGS +OPTS_GSSD = 'Mnvrp:k:d:t:T:R:lD' +CONV_GSSD = {'-M': (CONF_NFS, 'gssd', 'use-memcache', '1'), + '-n': (CONF_NFS, 'gssd', 'root_uses_machine_creds', '0'), + '-v': (CONF_NFS, 'gssd', 'verbosity', '+'), + '-r': (CONF_NFS, 'gssd', 'rpc-verbosity', '+'), + '-p': (CONF_NFS, 'general', 'pipefs-directory', '$1'), + '-k': (CONF_NFS, 'gssd', 'keytab-file', '$1'), + '-d': (CONF_NFS, 'gssd', 'cred-cache-directory', '$1'), + '-t': (CONF_NFS, 'gssd', 'context-timeout', '$1'), + '-T': (CONF_NFS, 'gssd', 'rpc-timeout', '$1'), + '-R': (CONF_NFS, 'gssd', 'preferred-realm', '$1'), + '-l': (CONF_NFS, 'gssd', 'limit-to-legacy-enctypes', '0'), + '-D': (CONF_NFS, 'gssd', 'avoid-dns', '0'), + } + +# options for blkmapd found in BLKMAPDARGS +OPTS_BLKMAPD = '' +CONV_BLKMAPD = {} + +# meta list of all the getopt lists +GETOPT_MAPS = [('RPCNFSDARGS', OPTS_NFSD, LONG_NFSD, CONV_NFSD), + ('RPCMOUNTDOPTS', OPTS_MOUNTD, LONG_MOUNTD, CONV_MOUNTD), + ('STATDARG', OPTS_STATD, LONG_STATD, CONV_STATD), + ('STATDARGS', OPTS_STATD, LONG_STATD, CONV_STATD), + ('SMNOTIFYARGS', OPTS_SMNOTIFY, [], CONV_SMNOTIFY), + ('RPCIDMAPDARGS', OPTS_IDMAPD, [], CONV_IDMAPD), + ('RPCGSSDARGS', OPTS_GSSD, [], CONV_GSSD), + ('BLKMAPDARGS', OPTS_BLKMAPD, [], CONV_BLKMAPD), + ] + +# map for all of the single option values +VALUE_MAPS = {'LOCKD_TCPPORT': (CONF_NFS, 'lockd', 'port', '$1'), + 'LOCKD_UDPPORT': (CONF_NFS, 'lockd', 'udp-port', '$1'), + 'RPCNFSDCOUNT': (CONF_NFS, 'nfsd', 'threads', '$1'), + 'NFSD_V4_GRACE': (CONF_NFS, 'nfsd', 'grace-time', '$1'), + 'NFSD_V4_LEASE': (CONF_NFS, 'nfsd', 'lease-time', '$1'), + 'MOUNTD_PORT': (CONF_NFS, 'mountd', 'port', '$1'), + 'STATD_PORT': (CONF_NFS, 'statd', 'port', '$1'), + 'STATD_OUTGOING_PORT': (CONF_NFS, 'statd', 'outgoing-port', '$1'), + 'STATD_HA_CALLOUT': (CONF_NFS, 'statd', 'ha-callout', '$1'), + 'GSS_USE_PROXY': (CONF_NFS, 'gssd', 'use-gss-proxy', '$1') + } + +def eprint(*args, **kwargs): + """ Print error to stderr """ + print(*args, file=sys.stderr, **kwargs) + +def makesub(param, value): + """ Variable substitution """ + return param.replace('$1', value) + +def set_value(value, entry): + """ Set a configuration value by running nfsconf tool""" + cfile, section, tag, param = entry + + tag = makesub(tag, value) + param = makesub(param, value) + if param == '+': + param = value + if param == ',': + param = value + args = [CONF_TOOL, "--file", cfile, "--set", section, tag, param] + + try: + subprocess.check_output(args, stderr=subprocess.STDOUT) + except subprocess.CalledProcessError as e: + print("Error running nfs-conf tool:\n %s" % (e.output.decode())) + print("Args: %s\n" % args) + raise Exception + +def convert_getopt(optname, options, optstring, longopts, conversions): + """ Parse option string into seperate config items + + Take a getopt string and a table of conversions + parse it all and spit out the converted config + + Keyword arguments: + options -- the argv string to convert + optstring -- getopt format option list + conversions -- table of translations + """ + optcount = 0 + try: + args = options.strip('\"').split() + optlist, optargs = getopt.gnu_getopt(args, optstring, longopts=longopts) + except getopt.GetoptError as err: + eprint(err) + raise Exception + + setlist = {} + for (k, v) in optlist: + if k in conversions: + # it's already been set once + param = conversions[k][3] + tag = k + makesub(conversions[k][2], v) + if tag in setlist: + value = setlist[tag][0] + # is it a cummulative entry + if param == '+': + value = str(int(value) + 1) + if param == ',': + value += "," + v + else: + if param == '+': + value = "1" + elif param == ',': + value = v + else: + value = v + setlist[tag] = (value, conversions[k]) + else: + if v: + eprint("Ignoring unrecognised option %s=%s in %s" % (k, v, optname)) + else: + eprint("Ignoring unrecognised option %s in %s" % (k, optname)) + + + for v, c in setlist.values(): + try: + set_value(v, c) + optcount += 1 + except Exception: + raise + + i = 1 + for o in optargs: + opname = '$' + str(i) + if opname in conversions: + try: + set_value(o, conversions[opname]) + optcount += 1 + except Exception: + raise + else: + eprint("Unrecognised trailing arguments") + raise Exception + i += 1 + + return optcount + +def map_values(): + """ Main function """ + mapcount = 0 + + # Lets load the old config + with open(SYSCONF_NFS) as cfile: + file_content = '[sysconf]\n' + cfile.read() + sysconfig = configparser.RawConfigParser() + sysconfig.read_string(file_content) + + # Map all the getopt option lists + for (name, opts, lopts, conv) in GETOPT_MAPS: + if name in sysconfig['sysconf']: + try: + mapcount += convert_getopt(name, sysconfig['sysconf'][name], opts, + lopts, conv) + except Exception: + eprint("Error whilst converting %s to nfsconf options." % (name)) + raise + + # Map the single value options + for name, opts in VALUE_MAPS.items(): + if name in sysconfig['sysconf']: + try: + value = sysconfig['sysconf'][name] + set_value(value.strip('\"'), opts) + mapcount += 1 + except Exception: + raise + + # All went well, move aside the old file + # but dont bother if there were no changes and + # an old config file already exists + backupfile = SYSCONF_NFS + SYSCONF_BACKUP + if mapcount > 0 or not os.path.exists(backupfile): + try: + os.replace(SYSCONF_NFS, backupfile) + except OSError as err: + eprint("Error moving old config %s: %s" % (SYSCONF_NFS, err)) + raise + +# Main routine +try: + map_values() +except Exception as e: + eprint(e) + eprint("Conversion failed. Please correct the error and try again.") + exit(1) diff --git a/SOURCES/nfsconvert.sh b/SOURCES/nfsconvert.sh new file mode 100644 index 0000000..f4e5b2d --- /dev/null +++ b/SOURCES/nfsconvert.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +# +# Convert /etc/sysconfig/nfs values in /etc/nfs.conf valuse +# + +# +# No file no conversion +# +if [ ! -f /etc/sysconfig/nfs ]; then + exit 0 +fi + +# +# See if the conversion happen already +# +grep "nfs.conf" /etc/sysconfig/nfs > /dev/null +if [ $? -eq 0 ]; then + exit 0 +fi + +if [ -f /etc/nfs.conf.rpmnew ]; then + # See if it is the we want to use + grep tag1234 /etc/nfs.conf.rpmnew > /dev/null + if [ $? -eq 0 ]; then + cp /etc/nfs.conf /etc/nfs.conf.rpmsave + cat /etc/nfs.conf.rpmnew | sed '/tag123/d' > /etc/nfs.conf + rm /etc/nfs.conf.rpmnew + fi +else + cp /etc/nfs.conf /etc/nfs.conf.rpmsave +fi + +# +# Do the conversion +# +/usr/sbin/nfsconvert + +# +# Make sure the modes are correct +# +if [ $? -eq 0 ]; then + chmod 644 /etc/nfs.conf +fi diff --git a/SPECS/nfs-utils.spec b/SPECS/nfs-utils.spec new file mode 100644 index 0000000..a6c1b38 --- /dev/null +++ b/SPECS/nfs-utils.spec @@ -0,0 +1,1979 @@ +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: 14%{?dist} +Epoch: 1 + +# group all 32bit related archs +%define all_32bit_archs i386 i486 i586 i686 athlon ppc sparcv9 + +Source0: https://www.kernel.org/pub/linux/utils/nfs-utils/%{version}/%{name}-%{version}.tar.xz +Source1: id_resolver.conf +Source2: lockd.conf +Source3: 24-nfs-server.conf +Source4: nfsconvert.py +Source5: nfsconvert.sh +Source6: nfs-convert.service + +# +# RHEL 8.0 +# +Patch001: nfs-utils-2.3.3-nfsd-disable-v4.patch +Patch002: nfs-utils-2.3.3-remove-osd_login.patch +Patch003: nfs-utils-2.3.3-mount-sharecache.patch +Patch004: nfs-utils-2.3.3-gssd-usegssproxy.patch +Patch005: nfs-utils-2.3.3-nfsconf-usegssproxy.patch +Patch006: nfs-utils-2.3.3-man-tcpwrappers.patch +Patch007: nfs-utils-2.3.3-junction-update.patch +Patch008: nfs-utils-2.3.3-gating-tests.patch + +# +# RHEL 8.0-Z +# +Patch009: nfs-utils-2.3.3-statd-no-notify.patch + +Patch100: nfs-utils-1.2.1-statdpath-man.patch +Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch +Patch102: nfs-utils-1.2.5-idmap-errmsg.patch +Patch103: nfs-utils-2.3.1-systemd-gssproxy-restart.patch +Patch104: nfs-utils-2.3.1-systemd-svcgssd-removed.patch + +Provides: exportfs = %{epoch}:%{version}-%{release} +Provides: nfsstat = %{epoch}:%{version}-%{release} +Provides: showmount = %{epoch}:%{version}-%{release} +Provides: rpcdebug = %{epoch}:%{version}-%{release} +Provides: rpc.idmapd = %{epoch}:%{version}-%{release} +Provides: rpc.mountd = %{epoch}:%{version}-%{release} +Provides: rpc.nfsd = %{epoch}:%{version}-%{release} +Provides: rpc.statd = %{epoch}:%{version}-%{release} +Provides: rpc.gssd = %{epoch}:%{version}-%{release} +Provides: mount.nfs = %{epoch}:%{version}-%{release} +Provides: mount.nfs4 = %{epoch}:%{version}-%{release} +Provides: umount.nfs = %{epoch}:%{version}-%{release} +Provides: umount.nfs4 = %{epoch}:%{version}-%{release} +Provides: sm-notify = %{epoch}:%{version}-%{release} +Provides: start-statd = %{epoch}:%{version}-%{release} + +License: MIT and GPLv2 and GPLv2+ and BSD +Requires: rpcbind, sed, gawk, grep +Requires: kmod, keyutils, quota +BuildRequires: libevent-devel libcap-devel +BuildRequires: libtirpc-devel libblkid-devel +BuildRequires: krb5-libs >= 1.4 autoconf >= 2.57 openldap-devel >= 2.2 +BuildRequires: automake, libtool, gcc, device-mapper-devel +BuildRequires: krb5-devel, libmount-devel, libxml2-devel +BuildRequires: sqlite-devel +BuildRequires: python3-devel +BuildRequires: systemd +BuildRequires: rpcgen +Requires(pre): shadow-utils >= 4.0.3-25 +Requires(pre): util-linux +Requires(pre): coreutils +Requires(preun): coreutils +Requires: libnfsidmap libevent +Requires: libtirpc >= 0.2.3-1 libblkid libcap libmount +%{?systemd_requires} +Requires: gssproxy => 0.7.0-3 + +%package -n libnfsidmap +Summary: NFSv4 User and Group ID Mapping Library +Provides: libnfsidmap%{?_isa} = %{epoch}:%{version}-%{release} +License: BSD +BuildRequires: pkgconfig, openldap-devel +BuildRequires: automake, libtool +Requires(postun): /sbin/ldconfig +Requires(pre): /sbin/ldconfig +Requires: openldap + +%description -n libnfsidmap +Library that handles mapping between names and ids for NFSv4. + +%package -n libnfsidmap-devel +Summary: Development files for the libnfsidmap library +Requires: libnfsidmap%{?_isa} = %{epoch}:%{version}-%{release} +Requires: pkgconfig + +%description -n libnfsidmap-devel +This package includes header files and libraries necessary for +developing programs which use the libnfsidmap library. + + +%description +The nfs-utils package provides a daemon for the kernel NFS server and +related tools, which provides a much higher level of performance than the +traditional Linux NFS server used by most users. + +This package also contains the showmount program. Showmount queries the +mount daemon on a remote host for information about the NFS (Network File +System) server on the remote host. For example, showmount can display the +clients which are mounted on that host. + +This package also contains the mount.nfs and umount.nfs program. + +%prep +%autosetup -p1 + +# Remove .orig files +find . -name "*.orig" | xargs rm -f + +# Change shebangs +find -name \*.py -exec sed -r -i '1s|^#!\s*/usr/bin.*python.*|#!%{__python3}|' {} \; + +%build +sh -x autogen.sh +%define _statdpath /var/lib/nfs/statd +%configure \ + CFLAGS="%{build_cflags} -D_FILE_OFFSET_BITS=64 `pkg-config --cflags libtirpc`" \ + LDFLAGS="%{build_ldflags} `pkg-config --libs libtirpc`" \ + --enable-mountconfig \ + --enable-ipv6 \ + --with-statdpath=%{_statdpath} \ + --enable-libmount-mount \ + --with-systemd \ + --without-tcp-wrappers \ + --with-pluginpath=%{_libdir}/libnfsidmap \ + --enable-junction + +%make_build all + +%install +%define _pkgdir %{_prefix}/lib/systemd + +rm -rf $RPM_BUILD_ROOT/* + +mkdir -p $RPM_BUILD_ROOT/sbin +mkdir -p $RPM_BUILD_ROOT%{_sbindir} +mkdir -p $RPM_BUILD_ROOT%{_libexecdir}/nfs-utils/ +mkdir -p $RPM_BUILD_ROOT%{_pkgdir}/system +mkdir -p $RPM_BUILD_ROOT%{_pkgdir}/system-generators +mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8 +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/request-key.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/ +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gssproxy + +%make_install + +install -s -m 755 tools/rpcdebug/rpcdebug $RPM_BUILD_ROOT%{_sbindir} +install -m 644 utils/mount/nfsmount.conf $RPM_BUILD_ROOT%{_sysconfdir} +install -m 644 nfs.conf $RPM_BUILD_ROOT%{_sysconfdir} +install -m 644 support/nfsidmap/idmapd.conf $RPM_BUILD_ROOT%{_sysconfdir} +install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/request-key.d + +mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/scripts +install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/modprobe.d/lockd.conf +install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/gssproxy +install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sbindir}/nfsconvert +install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/%{_libexecdir}/nfs-utils/nfsconvert.sh +install -m 644 %{SOURCE6} $RPM_BUILD_ROOT%{_pkgdir}/system + + +rm -rf $RPM_BUILD_ROOT%{_libdir}/*.{a,la} +rm -rf $RPM_BUILD_ROOT%{_libdir}/libnfsidmap/*.{a,la} + +mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/rpc_pipefs + +touch $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/rmtab +mv $RPM_BUILD_ROOT%{_sbindir}/rpc.statd $RPM_BUILD_ROOT/sbin + +mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/statd/sm +mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/statd/sm.bak +mkdir -p $RPM_BUILD_ROOT%{_sharedstatedir}/nfs/v4recovery +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/exports.d + + +%pre +# move files so the running service will have this applied as well +for x in gssd idmapd ; do + if [ -f /var/lock/subsys/rpc.$x ]; then + mv /var/lock/subsys/rpc.$x /var/lock/subsys/rpc$x + fi +done + +%define rpcuser_uid 29 +# Create rpcuser gid as long as it does not already exist +cat /etc/group | cut -d':' -f 1 | grep --quiet rpcuser 2>/dev/null +if [ "$?" -eq 1 ]; then + /usr/sbin/groupadd -g %{rpcuser_uid} rpcuser >/dev/null 2>&1 || : +else + /usr/sbin/groupmod -g %{rpcuser_uid} rpcuser >/dev/null 2>&1 || : +fi + +# Create rpcuser uid as long as it does not already exist. +cat /etc/passwd | cut -d':' -f 1 | grep --quiet rpcuser 2>/dev/null +if [ "$?" -eq 1 ]; then + /usr/sbin/useradd -l -c "RPC Service User" -r -g %{rpcuser_uid} \ + -s /sbin/nologin -u %{rpcuser_uid} -d /var/lib/nfs rpcuser >/dev/null 2>&1 || : +else + /usr/sbin/usermod -u %{rpcuser_uid} -g %{rpcuser_uid} rpcuser >/dev/null 2>&1 || : +fi + +# Using the 16-bit value of -2 for the nfsnobody uid and gid +%define nfsnobody_uid 65534 + +# Create nfsnobody gid as long as it does not already exist +cat /etc/group | cut -d':' -f 3 | grep --quiet %{nfsnobody_uid} 2>/dev/null +if [ "$?" -eq 1 ]; then + /usr/sbin/groupadd -g %{nfsnobody_uid} nfsnobody >/dev/null 2>&1 || : +fi + +# Create nfsnobody uid as long as it does not already exist. +cat /etc/passwd | cut -d':' -f 3 | grep --quiet %{nfsnobody_uid} 2>/dev/null +if [ $? -eq 1 ]; then + /usr/sbin/useradd -l -c "Anonymous NFS User" -r -g %{nfsnobody_uid} \ + -s /sbin/nologin -u %{nfsnobody_uid} -d /var/lib/nfs nfsnobody >/dev/null 2>&1 || : +fi + +%post + +# Enable nfs-convert so if an old configuration +# exists a conversion will occur +/bin/systemctl enable nfs-convert >/dev/null 2>&1 || : + +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl enable nfs-client.target >/dev/null 2>&1 || : + /bin/systemctl start nfs-client.target >/dev/null 2>&1 || : +fi +%systemd_post nfs-server + +%preun +if [ $1 -eq 0 ]; then + %systemd_preun nfs-client.target + %systemd_preun nfs-server.server + + rm -rf /var/lib/nfs/statd + rm -rf /var/lib/nfs/v4recovery +fi + +%postun +%systemd_postun_with_restart nfs-client.target +%systemd_postun_with_restart nfs-server + +/bin/systemctl --system daemon-reload >/dev/null 2>&1 || : + +%triggerin -- nfs-utils > 1:2.1.1-3 +/bin/systemctl try-restart gssproxy || : + +%files +%config(noreplace) /etc/nfsmount.conf +%dir %{_sysconfdir}/exports.d +%dir %{_sharedstatedir}/nfs/v4recovery +%dir %attr(555, root, root) %{_sharedstatedir}/nfs/rpc_pipefs +%dir %{_sharedstatedir}/nfs +%dir %{_libexecdir}/nfs-utils +%dir %attr(700,rpcuser,rpcuser) %{_sharedstatedir}/nfs/statd +%dir %attr(700,rpcuser,rpcuser) %{_sharedstatedir}/nfs/statd/sm +%dir %attr(700,rpcuser,rpcuser) %{_sharedstatedir}/nfs/statd/sm.bak +%ghost %attr(644,rpcuser,rpcuser) %{_statdpath}/state +%config(noreplace) %{_sharedstatedir}/nfs/etab +%config(noreplace) %{_sharedstatedir}/nfs/rmtab +%config(noreplace) %{_sysconfdir}/request-key.d/id_resolver.conf +%config(noreplace) %{_sysconfdir}/modprobe.d/lockd.conf +%config(noreplace) %{_sysconfdir}/nfs.conf +%attr(0600,root,root) %config(noreplace) /%{_sysconfdir}/gssproxy/24-nfs-server.conf +%doc linux-nfs/ChangeLog linux-nfs/KNOWNBUGS linux-nfs/NEW linux-nfs/README +%doc linux-nfs/THANKS linux-nfs/TODO +/sbin/rpc.statd +/sbin/nfsdcltrack +%{_sbindir}/exportfs +%{_sbindir}/nfsstat +%{_sbindir}/rpcdebug +%{_sbindir}/rpc.mountd +%{_sbindir}/rpc.nfsd +%{_sbindir}/showmount +%{_sbindir}/rpc.idmapd +%{_sbindir}/rpc.gssd +%{_sbindir}/sm-notify +%{_sbindir}/start-statd +%{_sbindir}/mountstats +%{_sbindir}/nfsiostat +%{_sbindir}/nfsidmap +%{_sbindir}/blkmapd +%{_sbindir}/nfsconf +%{_sbindir}/nfsref +%{_sbindir}/nfsconvert +%{_mandir}/*/* +%{_pkgdir}/*/* + +%attr(4755,root,root) /sbin/mount.nfs +%attr(755,root,root) %{_libexecdir}/nfs-utils/nfsconvert.sh + +/sbin/mount.nfs4 +/sbin/umount.nfs +/sbin/umount.nfs4 + +%files -n libnfsidmap +%doc support/nfsidmap/AUTHORS support/nfsidmap/README support/nfsidmap/COPYING +%config(noreplace) %{_sysconfdir}/idmapd.conf +%{_libdir}/libnfsidmap.so.* +%{_libdir}/libnfsidmap/*.so +%{_mandir}/man3/nfs4_uid_to_name.* +%{_mandir}/man5/idmapd.conf.* + +%files -n libnfsidmap-devel +%{_libdir}/pkgconfig/libnfsidmap.pc +%{_includedir}/nfsidmap.h +%{_includedir}/nfsidmap_plugin.h +%{_libdir}/libnfsidmap.so + +%changelog +* Wed Apr 3 2019 Steve Dickson 2.3.3-14_0 +- Add nfs.conf equivalent for the statd --no-notify cmdline option (1690280) +- Correct the modes on /etc/nfs.conf after a conversion (bz 1690266) + +* Wed Feb 13 2019 Steve Dickson 2.3.3-14 +- Fix typo in checking for the 65534 uid/gid (bz 1655960) + +* Tue Feb 12 2019 Steve Dickson 2.3.3-13 +- Always have the nfs-convert service enabled (bz 1673685) + +* Sat Feb 9 2019 Steve Dickson 2.3.3-12 +- Change nfsconvert.sh not to set the immutable bit (bz 1673685) +- Change nfsconvert.py not to create the new dummy /etc/sysconfig/nfs (bz 1673685) + +* Sat Feb 9 2019 Steve Dickson 2.3.3-11 +- Do not install /etc/sysconfig/nfs (bz 1673685) + +* Fri Jan 25 2019 Steve Dickson 2.3.3-10 +- Only create nfsnobody when uid 65534 does not exist (bz 1655960) + +* Wed Jan 23 2019 Steve Dickson 2.3.3-9 +- Critical component nfs-utils requires tests for gating (bz 1653927) + +* Wed Dec 12 2018 Steve Dickson 2.3.3-8 +- Update junction code with latest upstream code (1543126) +- Make sure /etc/sysconfig/nfs is immutabl (1639432) + +* Tue Nov 6 2018 Steve Dickson 2.3.3-7 +- Use systemd scripts to convert NFS configurations (bz 1646626) + +* Fri Oct 26 2018 Steve Dickson 2.3.3-6 +- Changed /var/lib/nfs/rpc_pipefs to have 555 permissions (bz 1583489) +- Removed tcp wrappers support from man pages (bz 1642596) +- Reload not restart gssproxy in nfs-server.service (bz 1592660) + +* Thu Oct 25 2018 Steve Dickson 2.3.3-5 +- mount.nfs: Add braces around EBUSY code (bz 1629644) + +* Mon Oct 22 2018 Steve Dickson 2.3.3-4 +- Deprecated /etc/sysconfig/nfs (bz 1639432) + +* Sat Oct 20 2018 Steve Dickson 2.3.3-3 +- Ensure /var/lib/nfs/rpc_pipefs has the correct permissions (bz 1583489) +- mount.nfs: Only ignore EBUSY when a filesystem is already mount (bz 1629644) + +* Fri Oct 19 2018 Steve Dickson 2.3.3-2 +- Enable NFS basic junction support (bz 1543126) +- Removed osd_login (bz 1636434) + +* Fri Oct 5 2018 Steve Dickson 2.3.3-1 +- nfs.conf: fail to disable major NFS version 4 using "vers4=n" (bz 1624319) + +* Thu Sep 13 2018 Steve Dickson 2.3.3-0 +- Updated to the latest upstream release: nfs-utils-2-3-3 (bz 1543126) + +* Fri Sep 7 2018 Steve Dickson 2.3.1-8.rc1 +- Ensure /var/lib/nfs/rpc_pipefs has the correct permissions (bz 1583489) +- Remove rpc.svcgssd from systemd scripts (bz 1591700) + +* Thu May 3 2018 Steve Dickson 2.3.1-8.rc1 +- nfsd: Set default minor versions (bz 1570066) + +* Wed Apr 11 2018 Steve Dickson 2.3.1-7.rc1 +- mount.nfs: Fix auto protocol negotiation (bz 1565310) + +* Mon Apr 9 2018 Steve Dickson 2.3.1-6.rc1 +- Stop failing when systemctl try-restart gssproxy fails (bz 1552976) +- Use Fedora build flags (bz 1548679) + +* Fri Mar 2 2018 Steve Dickson 2.3.1-5.rc1 +- Updated to latest upstream RC release: nfs-utils-2-3-2-rc1 + +* Wed Feb 14 2018 Kevin Fenzi - 1:2.3.1-5 +- Rebuild for new libevent + +* Fri Feb 09 2018 Igor Gnatenko - 1:2.3.1-4 +- Escape macros in %%changelog + +* Thu Feb 08 2018 Fedora Release Engineering - 1:2.3.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Fri Jan 19 2018 Steve Dickson 2.3.1-2 +- Restart gssproxy (if running) when the NFS server is started (bz 1527653) + +* Tue Jan 9 2018 Steve Dickson 2.3.1-1 +- Added rpcgen dependency (bz 1531540) + +* Wed Dec 20 2017 Steve Dickson 2.3.1-0 +- Updated to latest upstream release: 2.3.1 +- Removed unnecessary chown rpcuser in %%post + +* Tue Dec 19 2017 Steve Dickson 2.2.1-3.rc2 +- Fix typo in nfs-utils_env.sh (bz 1516004) + +* Mon Dec 18 2017 Steve Dickson 2.2.1-2.rc2 +- Removed tcp_wrappers dependency (bz 1518769) + +* Fri Dec 15 2017 Steve Dickson 2.2.1-1.rc2 +- Updated to latest upstream RC release: nfs-utils-2-2-2-rc2 + +* Tue Nov 07 2017 Igor Gnatenko - 1:2.2.1-1.rc1.1 +- Remove old crufty coreutils requires + +* Mon Nov 6 2017 Steve Dickson 2.2.1-1.rc1 +- Restore ABI compat with pre-merge libnfsidmap (bz 1509063) +- Add a build-time dependency on python3-devel + +* Thu Nov 2 2017 Steve Dickson 2.2.1-0.rc1 +- Updated to latest upstream RC release: nfs-utils-2-2-2-rc1 + +* Mon Oct 30 2017 Steve Dickson 2.2.1-0 +- Updated to latest upstream release: nfs-utils-2-2-1 + +* Mon Oct 16 2017 Steve Dickson 2.1.1-8.rc6 +- Own the /usr/libexec/nfs-utils dir (bz 1484300) + +* Thu Oct 5 2017 Steve Dickson 2.1.1-7.rc6 +- Updated to the latest RC releease: nfs-utils-2-1-2-rc6 + +* Tue Sep 19 2017 Orion Poplawski 2.1.1-7.rc5 +- Fix URL + +* Thu Jul 27 2017 Steve Dickson 2.1.1-6.rc5 +- Updated to the latest RC releease: nfs-utils-2-1-2-rc5 + +* Wed Jul 26 2017 Fedora Release Engineering - 1:2.1.1-6.rc4.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 19 2017 Steve Dickson 2.1.1-6.rc4 +- Removed build dependency on fedfs-utils-devel (bz 1427493) + +* Wed Jun 21 2017 Steve Dickson 2.1.1-5.rc4 +- Updated to the latest RC releease: nfs-utils-2-1-2-rc4 (bz 1462218) +- rpc.c: added include file so UINT16_MAX is defined + +* Thu Jun 1 2017 Steve Dickson 2.1.1-5.rc3 +- Updated to the latest RC releease: nfs-utils-2-1-2-rc3 (bz 1457921) + +* Wed Apr 26 2017 Steve Dickson 2.1.1-5.rc2 +- Conditionally restart gssproxy now that config file is installed (bz 1440885) +- systemd: Afters are also needed for the Wants=network-online.target (bz 1419351) +- nfsdcltrack: silence some expected errors (bz 1445863) +- Cleaned up fuzzy patches + +* Mon Apr 10 2017 Steve Dickson 2.1.1-4.rc2 +- Updated to the latest RC release: nfs-utils-2-1-2-rc2 (bz 1419351) +- Fixed typo in nfs.sysconfig (bz 1422249) + +* Tue Mar 28 2017 Steve Dickson 2.1.1-3.rc1 +- Added gssproxy server config file (bz 1431272) + +* Wed Feb 15 2017 Steve Dickson 2.1.1-2.rc1 +- Updated to the latest RC release: nfs-utils-2-1-2-rc1 + +* Fri Feb 10 2017 Fedora Release Engineering - 1:2.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 19 2017 Steve Dickson 2.1.1-1 +- Added back the nfs-config service for backwards compatibility + +* Thu Jan 19 2017 Steve Dickson 2.1.1-0 +- Updated to latest upstream release: nfs-utils-2-1-1 (bz 1413232) + +* Mon Dec 19 2016 Miro Hronok - 1:1.3.4-1.rc3.1 +- Rebuild for Python 3.6 + +* Wed Nov 23 2016 Steve Dickson 1.3.4-1.rc3 +- Updated to the latest RC release: nfs-utils-1-3-5-rc3 + +* Thu Aug 25 2016 Steve Dickson 1.3.4-1.rc2 +- Updated to the latest RC release: nfs-utils-1-3-5-rc2 (bz 1369714) + +* Mon Aug 22 2016 Steve Dickson 1.3.4-1.rc1 +- Stop removing users and groups (bz 1364836) + +* Sat Aug 20 2016 Steve Dickson 1.3.4-0.rc1 +- Updated to the latest RC release: nfs-utils-1-3-5-rc1 +- Updated the Requires(pre) (bz 1319196) + +* Sat Aug 6 2016 Steve Dickson 1.3.4-0 +- Updated to latest upstream version 1.3.4 + +* Thu Jul 21 2016 Steve Dickson 1.3.3-9.rc6 +- Removed the rpc-svcgssd.service systemd file (bz 1334741) + +* Tue Jul 19 2016 Steve Dickson 1.3.3-8.rc6 +- Updated to the latest RC release: nfs-utils-1-3-4-rc6 + +* Mon May 2 2016 Steve Dickson 1.3.3-8.rc5 +- Updated to the latest RC release: nfs-utils-1-3-4-rc5 + +* Wed Mar 16 2016 Steve Dickson 1.3.3-7.rc4 +- Updated to the latest RC release: nfs-utils-1-3-4-rc4 (bz 1316701) +- Changed BuildRequires: glibc-headers ==> BuildRequires: gcc (bz 1230477) + +* Thu Feb 04 2016 Fedora Release Engineering - 1:1.3.3-6.rc3.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Jan 16 2016 Steve Dickson 1.3.3-6.rc3 +- Updated to the latest RC release: nfs-utils-1-3-4-rc3 + +* Wed Dec 16 2015 Steve Dickson 1.3.3-6.rc2 +- mountd: fix netgroup lookup for short hostnames (bz 1284079) + +* Fri Dec 11 2015 Steve Dickson 1.3.3-5.rc2 +- Updated to the latest RC release: nfs-utils-1-3-4-rc2 + +* Tue Nov 17 2015 Steve Dickson 1.3.3-4.rc1 +- ghost-ed rpc.statd state file (bz 1158466) + +* Mon Nov 16 2015 Steve Dickson 1.3.3-3.rc1 +- Improving rpc.gssd's debugging (bz 1282600) + +* Mon Nov 16 2015 Steve Dickson 1.3.3-2.rc1 +- Decouple the starting of nfs-service and rpcbind (bz 1279526) + +* Tue Nov 10 2015 Fedora Release Engineering - 1:1.3.3-1.rc1.1 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Wed Nov 4 2015 Steve Dickson 1.3.3-1.rc1 +- Updated to the latest RC release: nfs-utils-1-3-4-rc1 + +* Tue Nov 3 2015 Steve Dickson 1.3.3-1 +- Removed legacy triggers to remove rpm build errors + +* Mon Nov 2 2015 Steve Dickson 1.3.3-0 +- Updated to latest upstream version 1.3.3 + +* Fri Jul 31 2015 Steve Dickson 1.3.2-12 +- Fixed return value being overrun in gssd (bz 1249046) + +* Mon Jul 13 2015 Miro Hronok - 1:1.3.2-11 +- Replace Python scripts shebangs with %%{__python3} and require python3-devel to have that + +* Fri Jun 26 2015 Steve Dickson 1.3.2-10 +- Update to latest RC release: nfs-utils-1-3-3-rc5 (bz 1233005) + +* Wed Jun 17 2015 Fedora Release Engineering - 1:1.3.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 10 2015 Steve Dickson 1.3.2-8 +- Make systemd args backwards compatible (bz 1210751) +- Stop scribbling on stderr (bz 1211008) + +* Tue May 12 2015 Colin Walters - 1:1.3.2-7 +- Add patch to fix initial start on OSTree managed systems (bz 1219871) + +* Thu May 7 2015 Steve Dickson 1.3.2-4 +- Update to latest RC release: nfs-utils-1-3-3-rc4 + +* Mon Apr 6 2015 Steve Dickson 1.3.2-3 +- Update to latest RC release: nfs-utils-1-3-3-rc3 + +* Thu Apr 2 2015 Steve Dickson 1.3.2-2.1 +- Removed RPCRQUOTADOPTS from /etc/sysconfig/nfs (bz 1208516) + +* Thu Mar 19 2015 Steve Dickson 1.3.2-2.0 +- Update to latest RC release: nfs-utils-1-3-3-rc2 (bz 1088665) + +* Thu Feb 26 2015 Steve Dickson 1.3.2-1.0 +- Update to latest RC release: nfs-utils-1-3-3-rc1 + +* Mon Feb 9 2015 Steve Dickson 1.3.2-0.2 +- Change statd-notify.service to not wait for network to come up (bz 1183293) +- Added the rpcuser group before adding the rpcuser uid (bz 1165322) + +* Sun Feb 1 2015 Steve Dickson 1.3.2-0.1 +- statd: Fix test for foreground mode (bz 1188040) + +* Sat Jan 31 2015 Steve Dickson 1.3.2-0.0 +- Updated to latest upstream release: 1-3-2 + +* Mon Jan 19 2015 Steve Dickson 1.3.1-6.0 +- Set the GSS_USE_PROXY variable in nfs-utils_env.sh (bz 1183787) + +* Thu Jan 15 2015 Steve Dickson 1.3.1-5.0 +- Updated to latest upstream RC release: nfs-utils-1-3-2-rc5 (bz 1181708) + +* Wed Jan 14 2015 Steve Dickson 1.3.1-4.2 +- Added SMNOTIFYARGS to /etc/sysconf/nfs (bz 1182227) + +* Fri Jan 2 2015 Steve Dickson 1.3.1-4.1 +- Change if statments to string comparisons in nfs-utils_env.sh (bz 1170354) + +* Sat Dec 13 2014 Steve Dickson 1.3.1-4.0 +- Updated to latest upstream RC release: nfs-utils-1-3-2-rc4 (bz 1164477) +- Handle the rpcuser like other created users (bz 1165322) +- Restored lockd port and v4 grace/lease interface (bz 1115225) +- Make sure nfs-client target is enabled (bz 1173564) + +* Wed Dec 3 2014 Steve Dickson 1.3.1-2.4 +- Fixed typos in nfs-utils sysconfig files (bz 1170354) + +* Thu Nov 13 2014 Steve Dickson 1.3.1-2.3 +- Fixed a mount DOS (bz 1163886) + +* Thu Nov 6 2014 Richard W.M. Jones 1.3.1-2.2 +- Rebuild against new libnfsimap (bz 1160883) + +* Thu Nov 6 2014 Steve Dickson 1.3.1-2.1 +- Rebuild against new libnfsimap (bz 1160883) + +* Tue Nov 4 2014 Steve Dickson 1.3.1-2.0 +- Updated to latest upstream RC release: nfs-utils-1-3-2-rc2 (bz 1115179) + +* Tue Nov 4 2014 Steve Dickson 1.3.1-1.2 +- Rebuild with new glibc (bz 1158846) + +* Fri Oct 24 2014 Steve Dickson 1.3.1-1.1 +- Added fix to umount in the nfs-utils-1.3.2-rc1.patch + +* Wed Oct 22 2014 Steve Dickson 1.3.1-1.0 +- Updated to latest upstream RC release: nfs-utils-1-3-2-rc1 (bz 1142842) + +* Thu Sep 25 2014 Steve Dickson 1.3.1-0.0 +- Update to the latest upstream release: nfs-utils-1-3-1 +- Enable gssproxy to manage the GSSAPI creds on the server. + +* Fri Sep 12 2014 Steve Dickson 1.3.0-7.0 +- Updated to latest upstream RC release: nfs-utils-1-3-1-rc4 (bz 1108615) + +* Sun Aug 17 2014 Fedora Release Engineering - 1:1.3.0-6.0 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jul 27 2014 Steve Dickson 1.3.0-5.0 +- Updated to latest upstream RC release: nfs-utils-1-3-1-rc3 +- Use _statdpath to define where statd's state lives + +* Tue Jul 01 2014 Jeff Layton - 1:1.3.0-4.0 +- clean up lockd configuration + +* Sat Jun 07 2014 Fedora Release Engineering - 1:1.3.0-3.0 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Jun 1 2014 Steve Dickson 1.3.0-2.0 +- Updated to latest upstream RC release: nfs-utils-1-3-1-rc2 + +* Sat May 24 2014 Steve Dickson 1.3.0-1.3 +- Use systemd_post macro to enable services (bz 1087950) + +* Thu May 1 2014 Steve Dickson 1.3.0-1.2 +- mountd: fix segfault in add_name with newer gcc compilers + +* Thu May 1 2014 Steve Dickson 1.3.0-1.1 +- start-statd: rpc.statd's systemd unit changed names + +* Wed Apr 30 2014 Steve Dickson 1.3.0-1.0 +- Updated to latest upstream RC release: nfs-utils-1-3-1-rc1 + +* Fri Apr 25 2014 Steve Dickson 1.3.0-0.2 +- Fix PATH problem in start-statd (bz 1088226) + +* Mon Apr 14 2014 Steve Dickson 1.3.0-0.1 +- Incorporated new upstream systemd units + +* Tue Mar 25 2014 Steve Dickson 1.3.0-0.0 +- Updated to latest major release: nfs-utils-1-3-0 + +* Wed Jan 22 2014 Steve Dickson 1.2.9-3.0 +- Updated to latest upstream RC release: nfs-utils-1-2-10-rc3 + - gssd: Improve first attempt at acquiring GSS credentials (bz 1055077) +- gssd: set $HOME to prevent recursion (bz 1052902) + +* Fri Jan 10 2014 Steve Dickson 1.2.9-2.1 +- Fixed typo in nfs-service file. (bz 1047972) + +* Wed Jan 8 2014 Steve Dickson 1.2.9-2.0 +- Updated to latest upstream RC release: nfs-utils-1-2-10-rc2 +- Added Also=nfs.target to nfs-service file. (bz 1047972) + +* Wed Nov 20 2013 Steve Dickson 1.2.9-1.0 +- Updated to latest upstream RC release: nfs-utils-1-2-10-rc1 + +* Tue Nov 5 2013 Steve Dickson 1.2.9-0.0 +- Updated to latest upstream Release: nfs-utils-1-2-9 + +* Tue Sep 24 2013 Steve Dickson 1.2.8-6.0 +- Updated to latest upstream RC release: nfs-utils-1-2-9-rc6 + +* Wed Sep 18 2013 Steve Dickson 1.2.8-5.0 +- Updated to latest upstream RC release: nfs-utils-1-2-9-rc5 + +* Thu Aug 22 2013 Steve Dickson 1.2.8-4.1 +- nfs-utils: fix a number of specfile problems + +* Mon Aug 19 2013 Steve Dickson 1.2.8-4.0 +- Updated to latest upstream RC release: nfs-utils-1-2-9-rc4 + +* Sat Aug 03 2013 Fedora Release Engineering - 1:1.2.8-4.0 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Tue Jul 23 2013 Steve Dickson 1.2.8-3.0 +- Updated to latest upstream RC release: nfs-utils-1-2-9-rc3 + +* Tue Jul 23 2013 Steve Dickson 1.2.8-2.1 +- Make sure nfs.target is enabled (bz 970595) +- Fix nfs server reloads (bz 951247) + +* Fri May 31 2013 Steve Dickson 1.2.8-2.0 +- Update to latest upstream RC release: nfs-utils.1.2.9-rc1 +- Added GSS_USE_PROXY variable to nfs.sysconfig (bz 967112) + +* Tue May 7 2013 Steve Dickson 1.2.8-1.1 + systemd: nfs-server.service needs to be split up (bz 769879) + +* Tue May 7 2013 Steve Dickson 1.2.8-1 +- Updated to the latest upstream RC release: nfs-utils.1.2.9-rc1 + +* Tue Apr 23 2013 Steve Dickson 1.2.8-0 +- Updated to latest upstream release: 1.2.8 +- Removed the libgssglue dependency + +* Mon Apr 1 2013 Steve Dickson 1.2.7-6 +- Added v4.1 support rpc.nfsd (bz 947073) + +* Mon Mar 25 2013 Steve Dickson 1.2.7-5 +- Updated to latest upstream RC release: nfs-utils.1.2.8-rc4 +- Added nfs-lock.service to After line in nfs-server.service (bz 914792) + +* Thu Feb 14 2013 Fedora Release Engineering - 1:1.2.7-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jan 16 2013 Steve Dickson 1.2.7-3 +- Updated to latest upstream RC release: nfs-utils.1.2.8-rc3 +- Took ownership of /usr/lib/nfs-utils (bz 894535) + +* Mon Dec 17 2012 Steve Dickson 1.2.7-2 +- Update to latest upstream RC release: nfs-utils.1.2.8-rc2 + +* Wed Nov 28 2012 Steve Dickson 1.2.7-1 +- Update to latest upstream RC release: nfs-utils.1.2.8-rc1 + +* Fri Nov 9 2012 Steve Dickson 1.2.7-0 +- Updated to latest upstream release: nfs-utils.1.2.7 + +* Thu Nov 8 2012 Steve Dickson 1.2.6-14 +- Allow the service to start when RPCNFSDCOUNT is comment out. (bz 870143) +- Removed some old cruft from the spec file (bz 226198) + +* Mon Oct 15 2012 Steve Dickson 1.2.6-13 +- Added a Requires for the quota package (bz 866225) + +* Thu Aug 23 2012 Steve Dickson 1.2.6-12 +- Added FedFS support by added a BuildRequires for fedfs-utils-devel +- Introduce new systemd-rpm macros (bz 850227) +- Updated to latest upstream RC release: nfs-utils.1.2.7-rc5 (bz 833024) + +* Mon Aug 6 2012 Steve Dickson 1.2.6-11 +- Updated to latest upstream RC release: nfs-utils.1.2.7-rc4 + +* Thu Aug 2 2012 Steve Dickson 1.2.6-10 +- Removed modprobe.d/nfs.conf + +* Thu Jul 19 2012 Steve Dickson 1.2.6-9 +- Updated to latest upstream RC release: nfs-utils.1.2.7-rc3 + +* Thu Jul 5 2012 Steve Dickson 1.2.6-8 +- nfsidmap: default domain no being set (bz 829362) + +* Fri Jun 22 2012 Steve Dickson 1.2.6-7 +- Reworked how the legacy names are enabled in systemd +- Fixed typo in nfs-mountd.service + +* Tue Jun 12 2012 Steve Dickson 1.2.6-6 +- Updated to latest upstream RC release: nfs-utils.1.2.7-rc2 (bz 833555) + +* Tue Jun 12 2012 Steve Dickson 1.2.6-5 +- Reworked how the services are restarted. + +* Tue Jun 12 2012 Steve Dickson 1.2.6-4 +- Enable legacy service names. + +* Tue May 29 2012 Steve Dickson 1.2.6-3 +- Updated to latest upstream RC release: nfs-utils.1.2.7-rc1 + +* Tue May 29 2012 Steve Dickson 1.2.6-2 +* Fixed typo in the checking of nfsnobody (bz 816149) + +* Fri May 25 2012 Steve Dickson 1.2.6-1 +- Correctly search for the existence of nfsnobody (bz 816149) +- Correctly change the default group id for nfsnobody (bz 816149) + +* Tue May 15 2012 Steve Dickson 1.2.6-0 +- Update to the latest upstream release: nfs-utils-1.2.6 (bz 821673) +- Split out NFS server daemons into individual service files (bz 769879) +- Removed Wants= from nfs-lock.service (bz 817895) +- Only enable services if they are enabled on upgrades (bz 807020) + +* Thu May 3 2012 Steve Dickson 1.2.5-16 +- Update to the latest RC release: nfs-utils-1.2.6-rc7 + +* Thu Apr 26 2012 Josh Boyer 1.2.5-15 +- Add modprobe config file to alias 'nfs4' to 'nfs' (bz 806333) + +* Thu Mar 22 2012 Steve Dickson 1.2.5-14 +- gssd: Look for user creds in user defined directory (bz 786993) +- gssd: Don't link with libgssapi_krb5 (bz 784908) + +* Fri Mar 16 2012 Steve Dickson 1.2.5-13 +- Make sure statd is start before NFS mounts (bz 786050) +- rpc.idmap: Hide global symbols from libidmap plugins (bz 797332) +- nfsd: Bump up the default to 8 nprocs (bz 757452) + +* Wed Feb 08 2012 Harald Hoyer 1.2.5-12 +- require kmod instead of modutils (bz 788571) + +* Mon Jan 16 2012 Steve Dickson 1.2.5-11 +- Update to upstream RC release: nfs-utils-1.2.6-rc6 +- Reworked how the nfsd service requires the rpcbind service (bz 768550) + +* Mon Jan 9 2012 Steve Dickson 1.2.5-10 +- Added back the SUID bits on mount commands (bz 772396) +- Added a decency on keyutils (bz 769724) + +* Thu Jan 5 2012 Steve Dickson 1.2.5-9 +- Update to upstream RC release: nfs-utils-1.2.6-rc5 + +* Thu Dec 15 2011 Steve Dickson 1.2.5-8 +- Removed the nfs-idmap service. rpc.idmap is now part of + the nfs-server service + +* Tue Dec 13 2011 Steve Dickson 1.2.5-7 +- Enabled new idmaping by installing the id_resolver.conf file. +- Update to upstream RC release: nfs-utils-1.2.6-rc4 + +* Fri Nov 18 2011 Steve Dickson 1.2.5-6 +- Remove RQUOTAD_PORT and RQUOTAD from /etc/sysconfig/nfs (bz 754496) +- Ensured nfs-idmap service is started after the named is up (bz 748275) + +* Mon Nov 14 2011 Steve Dickson 1.2.5-5 +- Ensured nfs-idmap service is started after the network up (bz 748275) +- Update to upstream RC release: nfs-utils-1.2.6-rc3 (bz 746497) + +* Thu Oct 20 2011 Steve Dickson 1.2.5-4 +- Added pNFS debugging to rpcdebug. + +* Tue Oct 18 2011 Steve Dickson 1.2.5-3 +- Update to upstream RC release: nfs-utils-1.2.6-rc2 + +* Tue Oct 4 2011 Steve Dickson 1.2.5-2 +- Removed SUID bits on mount commands (bz 528498) +- Fixed a few typos in a couple man pages (bz 668124, 673818, 664330) +- Fixed a I/0 problem in rpc.idmapd (bz 684308) + +* Mon Oct 3 2011 Steve Dickson 1.2.5-1 +- Update to upstream RC release: nfs-utils-1.2.6-rc1 +- Added named.service to After list in nfs-server.service (bz 742746) + +* Tue Sep 27 2011 Steve Dickson 1.2.5-0 +- Update to upstream release: nfs-utils-1.2.5 (bz 717931) + +* Wed Sep 21 2011 Steve Dickson 1.2.4-11 +- Update to upstream RC release: nfs-utils-1.2.5-rc3 + +* Wed Sep 14 2011 Steve Dickson 1.2.4-10 +- Created /etc/exports.d to stop a warning (bz 697006) + +* Tue Aug 30 2011 Steve Dickson 1.2.4-9 +- Both the nfs.lock and nfs.idmap services should always + enabled on both installs and upgrades (bz 699040) +- Fixed the paths to the server scriptlets (bz 733531) + +* Mon Aug 29 2011 Steve Dickson 1.2.4-8 +- Update to upstream RC release: nfs-utils-1.2.5-rc2 + +* Wed Aug 24 2011 Steve Dickson 1.2.4-7 +- Added StandardError=syslog+console to all the service files + so startup errors will be logged. +- Changed exportfs to only log errors on existing /etc/export.d + directory, which eliminates a needless syslog entry. +- Automount /proc/fs/nfsd for rpc.nfsd + +* Wed Aug 10 2011 Steve Dickson 1.2.4-6 +- Fixed some bugs in the triggerun script as well in + the nfs-server scripts (bz 699040). + +* Wed Aug 3 2011 Steve Dickson 1.2.4-5 +- Cleaned up the .preconfig and .postconfig files per + code review request. + +* Wed Aug 3 2011 Steve Dickson 1.2.4-4 +- Converted init scrips to systemd services. (bz 699040) +- Made nfsnobody's uid/gid to always be a 16-bit value of -2 +- mount: fix for libmount from util-linux >= 2.20 + +* Thu Jul 21 2011 Steve Dickson 1.2.4-3 +- Updated to latest upstream release: nfs-utils-1-2-5-rc1 + +* Thu Jul 7 2011 Ville Skyttä - 1:1.2.4-2 +- Don't ship Makefiles or INSTALL in docs (#633934). + +* Mon Jul 4 2011 J. Bruce Fields 1.2.4-1 +- Rely on crypto module autoloading in init scripts +- initscripts: just try to mount rpc_pipefs always + +* Wed Jun 29 2011 Steve Dickson 1.2.4-0 +- Updated to latest upstream release: nfs-utils-1-2-4 + +* Wed Apr 20 2011 Steve Dickson 1.2.3-13 +- Updated to latest upstream release: nfs-utils-1-2-4-rc8 + +* Wed Apr 6 2011 Steve Dickson 1.2.3-12 +- Updated to latest upstream release: nfs-utils-1-2-4-rc7 +- Enabled the libmount code. + +* Mon Mar 7 2011 Steve Dickson 1.2.3-11 +- Updated to latest upstream release: nfs-utils-1-2-4-rc6 + +* Wed Feb 09 2011 Christopher Aillon - 1.2.3-10 +- Rebuild against newer libevent + +* Tue Feb 08 2011 Fedora Release Engineering - 1:1.2.3-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Jan 26 2011 Steve Dickson 1.2.3-8 +- Fixed segfault in rpc.mountd (bz 669065) + +* Fri Jan 14 2011 Steve Dickson 1.2.3-7 +- Updated to latest upstream release: nfs-utils-1-2-4-rc5 +- Add initscripts changes needed for rpcbind to be running when nfs is started +- Initscripts changes needed to support NFS over RDMA +- Allow the setting of the NFSv4 grace period (bz 665387) + +* Mon Dec 13 2010 Steve Dickson 1.2.3-6 +- Updated to latest upstream release: nfs-utils-1-2-4-rc4 + +* Wed Dec 8 2010 Steve Dickson 1.2.3-5 +- Replace the nfs-utils-lib dependency with a libnfsidmap + dependency + +* Wed Dec 1 2010 Steve Dickson 1.2.3-4 +- The nfs service is not stopped on reboot or halt (bz 652786) +- Removed obsolete configuration values (bz 653765) + +* Mon Nov 29 2010 Steve Dickson 1.2.3-3 +- Updated to latest upstream release: nfs-utils-1-2-4-rc3 + +* Fri Oct 15 2010 Steve Dickson 1.2.3-2 +- Initscripts do not conform to LSB specification (bz 621562) +- sm-notify needs to call res_init() before each try (bz 625531) +- exports(5) man page duplicated paragraphs (bz 590921) + +* Thu Oct 14 2010 Steve Dickson 1.2.3-1 +- Updated to latest upstream release: nfs-utils-1-2-4-rc1 + +* Mon Oct 4 2010 Steve Dickson 1.2.3-0.1 +- Fixed a regession with -p arguemnt to rpc.mountd + +* Thu Sep 30 2010 Steve Dickson 1.2.3-0 +- Updated to latest upstream release: nfs-utils-1-2-3 + +* Thu Sep 16 2010 Steve Dickson 1.2.2-8 +- Update to upstream RC release: nfs-utils-1-2-3-rc6 + +* Thu Sep 9 2010 Steve Dickson 1.2.2-7 +- Update to upstream RC release: nfs-utils-1-2-3-rc5 + +* Tue Jun 22 2010 Steve Dickson 1.2.2-6 +- Update to upstream RC release: nfs-utils-1-2-3-rc4 + +* Thu May 6 2010 Steve Dickson 1.2.2-4 +- Update to upstream RC release: nfs-utils-1-2-3-rc3 + +* Fri Apr 16 2010 Steve Dickson 1.2.2-3 +- Update to upstream RC release: nfs-utils-1-2-3-rc2 + +* Mon Mar 22 2010 Steve Dickson 1.2.2-2 +- Update to upstream RC release: nfs-utils-1-2-3-rc1 + +* Thu Feb 18 2010 Steve Dickson 1.2.2-1 +- Updated to latest upstream version: 1.2.2 + +* Thu Jan 28 2010 Steve Dickson 1.2.1-17 +- Backed out the "Don't fail mounts when /etc/netconfig is + nonexistent" patch + +* Wed Jan 27 2010 Steve Dickson 1.2.1-16 +- mount.nfs: Don't fail mounts when /etc/netconfig is nonexistent + +* Mon Jan 25 2010 Steve Dickson 1.2.1-15 +- statd: Teach nfs_compare_sockaddr() to handle NULL + arguments + +* Fri Jan 22 2010 Steve Dickson 1.2.1-14 +- Update to upstream RC release: nfs-utils-1-2-2-rc9 + +* Thu Jan 21 2010 Steve Dickson 1.2.1-13 +- mount.nfs: Configuration file parser ignoring options +- mount.nfs: Set the default family for lookups based on + defaultproto= setting +- Enabled ipv6 + +* Sun Jan 17 2010 Steve Dickson 1.2.1-12 +- Updated to latest upstream RC release: nfs-utils-1-2-2-rc7 + which includes Ipv6 support for tcpwrapper (disabled by default). + +* Sat Jan 16 2010 Steve Dickson 1.2.1-11 +- Updated to latest upstream RC release: nfs-utils-1-2-2-rc7 + which includes Ipv6 support for statd (disabled by default). + +* Thu Jan 14 2010 Steve Dickson 1.2.1-10 +- Updated to the latest pseudo root release (rel10) which + containts the upstream pseudo root release + +* Tue Jan 12 2010 Steve Dickson 1.2.1-9 +- Updated to latest upstream RC release: nfs-utils-1-2-2-rc5 + +* Mon Jan 4 2010 Steve Dickson 1.2.1-8 +- mount.nfs: don't use IPv6 unless IPV6_SUPPORTED is set + +* Mon Dec 14 2009 Steve Dickson 1.2.1-7 +- Updated to latest upstream RC release: nfs-utils-1-2-2-rc3 + +* Thu Dec 10 2009 Steve Dickson 1.2.1-6 +- Update the pseudo root to handle security flavors better. + +* Mon Dec 7 2009 Steve Dickson 1.2.1-5 +- mount.nfs: Retry v4 mounts with v3 on ENOENT errors + +* Mon Dec 7 2009 Steve Dickson 1.2.1-4 +- Updated to the latest pseudo root release (rel9) (bz 538609). + +* Thu Nov 12 2009 Steve Dickson 1.2.1-3 +- Stop rpc.nfsd from failing to startup when the network + is down (bz 532270) + +* Wed Nov 11 2009 Steve Dickson 1.2.1-2 +- Updated to the latest pseudo root release (rel8). + +* Wed Nov 4 2009 Steve Dickson 1.2.1-1 +- Updated to latest upstream release: 1.2.0 + +* Tue Nov 3 2009 Steve Dickson 1.2.0-18 +- Reworked and remove some of the Default-Start/Stop stanzas + in the init scripts (bz 531425) + +* Mon Nov 2 2009 Steve Dickson 1.2.0-17 +- Updated to the latest pseudo root release (rel7). +- Added upstream 1.2.1-rc7 patch which fixes: + - Stop ignoring the -o v4 option (bz 529407) + - Allow network protocol roll backs when proto is set + in the config file (bz 529864) +- v4 mounts will roll back to v3 mounts when the mount + fails with ENOENT. + +* Mon Oct 5 2009 Steve Dickson 1.2.0-16 +- Fixed a whole where '-o v4' was not overriding the + version in the conf file. + +* Wed Sep 30 2009 Steve Dickson 1.2.0-15 +- Change the nfsmount.conf file to define v3 as the default + protocol version. +- Make sure versions set on the command line override version + set in nfsmount.conf +- Make version rollbacks still work when versions are set in + nfsmount.conf + +* Tue Sep 29 2009 Steve Dickson 1.2.0-13 +- Added upstream 1.2.1-rc5 patch + - mount.nfs: Support negotiation between v4, v3, and v2 + - mount.nfs: Keep server's address in nfsmount_info + - mount.nfs: Sandbox each mount attempt + - mount.nfs: Support negotiation between v4, v3, and v2 + +* Wed Sep 23 2009 Steve Dickson 1.2.0-12 +- Updated to the latest pseudo root release (rel6). + +* Tue Sep 15 2009 Steve Dickson 1.2.0-11 +- Added upstream 1.2.1-rc5 patch + - Added --sort --list functionality to nfs-iostat.py + - Fixed event handler in idmapd + - Added -o v4 support + - Disabled IPv6 support in nfsd + - Don't give client an empty flavor list + - Fixed gssed so it does not blindly caches machine credentials + +* Mon Aug 17 2009 Steve Dickson 1.2.0-10 +- Added upstream 1.2.1-rc4 patch + - Fix bug when both crossmnt + - nfs(5): Add description of lookupcache mount option + - nfs(5): Remove trailing blanks + - Added nfs41 support to nfssat + - Added support for mount to us a configuration file. + +* Fri Aug 14 2009 Steve Dickson 1.2.0-9 +- Added upstream 1.2.1-rc3 patch + - Add IPv6 support to nfsd + - Allow nfssvc_setfds to properly deal with AF_INET6 + - Convert nfssvc_setfds to use getaddrinfo + - Move check for active knfsd to helper function + - Declare a static common buffer for nfssvc.c routine + - Convert rpc.nfsd to use xlog() and add --debug and --syslog options + +* Tue Jul 28 2009 Steve Dickson 1.2.0-8 +- Fixed 4.1 versioning problem (bz 512377) + +* Wed Jul 15 2009 Steve Dickson 1.2.0-7 +- Added upstream 1.2.1-rc2 patch + - A large number of mount command changes. + +* Mon Jul 13 2009 Steve Dickson 1.2.0-6 +- Added NFSD v4 dynamic pseudo root patch which allows + NFS v3 exports to be mounted by v4 clients. + +* Mon Jun 29 2009 Steve Dickson 1.2.0-5 +- Stopped rpc.idmapd from spinning (bz 508221) + +* Mon Jun 22 2009 Steve Dickson 1.2.0-4 +- Added upstream 1.2.1-rc1 patch + - Fix to check in closeall() + - Make --enable-tirpc the default + - Set all verbose types in gssd daemons + - Retry exports if getfh() fails + +* Wed Jun 10 2009 Steve Dickson 1.2.0-3 +- Updated init scripts to add dependencies + on other system facilities (bz 475133) + +* Wed Jun 10 2009 Steve Dickson 1.2.0-2 +- nfsnobody gid is wrong (bz 485379) + +* Tue Jun 2 2009 Steve Dickson 1.2.0-1 +- Updated to latest upstream release: 1.2.0 + +* Tue May 19 2009 Tom "spot" Callaway 1.1.6-4 +- Replace the Sun RPC license with the BSD license, with the explicit permission of Sun Microsystems + +* Mon May 18 2009 Steve Dickson 1.1.6-3 +- Added upstream 1.1.7-rc1 patch + - utils/nfsd: add support for minorvers4 + - sm-notify: Don't orphan addrinfo structs + - sm-notify: Failed DNS lookups should be retried + - mount: remove legacy version of nfs_name_to_address() + - compiling error in rpcgen + - nfs-utils: Fix IPv6 support in support/nfs/rpc_socket.c + - umount.nfs: Harden umount.nfs error reportin + +* Mon Apr 27 2009 Steve Dickson 1.1.6-2 +- nfslock.init: options not correctly parsed (bz 459591) + +* Mon Apr 20 2009 Steve Dickson 1.1.6-1 +- Updated to latest upstream release: 1.1.6 + +* Mon Mar 23 2009 Steve Dickson 1.1.5-4 +- Added upstream rc3 patch + - gssd: initialize fakeseed in prepare_krb5_rfc1964_buffer + - gssd: NULL-terminate buffer after read in read_service_info (try #2) + - gssd: free buffer allocated by gssd_k5_err_msg + - gssd: fix potential double-frees in gssd + - Removed a number of warn_unused_result warnings + +* Mon Mar 16 2009 Steve Dickson 1.1.5-3 +- Added upstream rc2 patch + +* Fri Mar 6 2009 Steve Dickson 1.1.5-2 +- Fixed lockd not using settings in sysconfig/nfs (bz 461043) +- Fixed some lost externs in the tcpwrapper code + +* Thu Mar 5 2009 Steve Dickson 1.1.5-1 +- Updated to latest upstream version: 1.1.5 + +* Wed Mar 4 2009 Steve Dickson 1.1.4-21 +- configure: fix AC_CACHE_VAL warnings + +* Wed Feb 25 2009 Fedora Release Engineering - 1:1.1.4-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Feb 18 2009 Steve Dickson 1.1.4-19 +- Exportfs and rpc.mountd optimalization (bz 76643) + +* Tue Feb 17 2009 Steve Dickson 1.1.4-18 +- umount.nfs command: Add an AF_INET6-capable version of nfs_call_unmount() +- umount.nfs command: Support AF_INET6 server addresses +- umount command: remove do_nfs_umount23 function + +* Tue Feb 17 2009 Steve Dickson 1.1.4-17 +- Integrated the upstream fix for bz 483375 +- mount: segmentation faults on UDP mounts (bz 485448) + +* Sat Jan 31 2009 Steve Dickson 1.1.4-16 +- Fixed typo in -mount-textbased.patch (bz 483375) + +* Sat Jan 31 2009 Steve Dickson 1.1.4-15 +- Reworked tcp wrapper code to correctly use API (bz 480223) +- General clean up of tcp wrapper code. + +* Tue Jan 27 2009 Steve Dickson 1.1.4-14 +- text-based mount command: make po_rightmost() work for N options +- text-based mount command: Function to stuff "struct pmap" from mount options +- text-based mount options: Use new pmap stuffer when rewriting mount options +- text-based mount command: fix mount option rewriting logic +- text-based mount command: support AF_INET6 in rewrite_mount_options() + +* Tue Jan 20 2009 Steve Dickson 1.1.4-13 +- mountd: Don't do tcp wrapper check when there are no rules (bz 448898) + +* Wed Jan 7 2009 Steve Dickson 1.1.4-12 +- configure: Remove inet_ntop(3) check from configure.ac +- configure: Add new build option "--enable-tirpc" +- showmount command: Quiesce warning when TI-RPC is disabled + +* Sat Jan 3 2009 Steve Dickson 1.1.4-11 +- Added warnings to tcp wrapper code when mounts are + denied due to misconfigured DNS configurations. +- gssd: By default, don't spam syslog when users' credentials expire +- mount: revert recent fix for build problems on old systems +- mount: use gethostbyname(3) when building on old systems +- mount: getport: don't use getaddrinfo(3) on old systems +- mount: Random clean up +- configure: use "--disable-uuid" instead of "--without-uuid" + +* Fri Dec 19 2008 Steve Dickson 1.1.4-10 +- Re-enabled and fixed/enhanced tcp wrappers. + +* Wed Dec 17 2008 Steve Dickson 1.1.4-9 +- text-based mount command: add function to parse numeric mount options +- text-based mount command: use po_get_numeric() for handling retry +- sm-notify command: fix a use-after-free bug +- statd: not unlinking host files + +* Thu Dec 11 2008 Steve Dickson 1.1.4-8 +- mount command: AF_INET6 support for probe_bothports() +- mount command: support AF_INET6 in probe_nfsport() and probe_mntport() +- mount command: full support for AF_INET6 addresses in probe_port() +- gssd/svcgssd: add support to retrieve actual context expiration +- svcgssd: use the actual context expiration for cache + +* Sat Dec 6 2008 Steve Dickson 1.1.4-7 +- sm-notify: always exiting without any notification. + +* Tue Dec 2 2008 Steve Dickson 1.1.4-6 +- mount command: remove local getport() implementation +- mount command: Replace clnt_ping() and getport() calls in probe_port() +- mount command: Use nfs_error() instead of perror() +- mount command: Use nfs_pmap_getport() in probe_statd() + +* Mon Dec 1 2008 Steve Dickson 1.1.4-5 +- Make sure /proc/fs/nfsd exists when the nfs init script + does the exports (bz 473396) +- Fixed typo in nfs init script that caused rpc.rquotad daemons + to be started but not stoppped (bz 473929) + +* Wed Nov 26 2008 Steve Dickson 1.1.4-4 +- gssd: unblock DNOTIFY_SIGNAL in case it was blocked +- Ensure statd gets started if required when non-root + user mounts an NFS filesystem + +* Tue Nov 25 2008 Steve Dickson 1.1.4-3 +- Give showmount support for querying via rpcbindv3/v4 + +* Tue Nov 18 2008 Steve Dickson 1.1.4-2 +- Add AF_INET6-capable API to acquire an RPC CLIENT +- Introduce rpcbind client utility functions + +* Sat Oct 18 2008 Steve Dickson 1.1.4-1 +- Updated to latest upstream version: 1.1.4 + +* Tue Oct 14 2008 Steve Dickson 1.1.3-6 +- sm-notify exists when there are no hosts to notify + +* Thu Sep 18 2008 Steve Dickson 1.1.3-5 +- Reworked init scripts so service will be able to + stop when some of the checks fail. (bz 462508) +- Pre-load nfsd when args to rpc.nfsd are given (bz 441983) + +* Thu Aug 28 2008 Steve Dickson 1.1.3-4 +- Added in a number of up upstream patches (101 thru 110). + +* Mon Aug 11 2008 Tom "spot" Callaway 1.1.3-3 +- fix license tag + +* Thu Jul 31 2008 Steve Dickson 1.1.3-2 +- Mount command did not compile against older glibc versions. + +* Mon Jul 28 2008 Steve Dickson 1.1.3-1 +- Updated to latest upstream version: 1.1.3 + +* Wed Jul 2 2008 Steve Dickson 1.1.2-12 +- Changed the default directories for sm-notify (bz 435480) +- Added 'condstop' to init scripts so service are not + started when nfs-utils is removed. + +* Mon Jun 30 2008 Dennis Gilmore 1.1.2-11 +- add sparc arch handling + +* Mon Jun 30 2008 Steve Dickson 1.1.2-10 +- Rebuild for the updated libevent lib. + +* Fri Jun 27 2008 Steve Dickson 1.1.2-9 +- Removed the nfslock service start/stop from %%post section + (bz 453046) + +* Wed Jun 25 2008 Steve Dickson 1.1.2-8 +- FQDNs in the rmtab causes exportfs to seg fault (bz 444275) + +* Mon Jun 23 2008 Steve Dickson 1.1.2-7 +- Added -D_FILE_OFFSET_BITS=64 to CFLAGS +- make nfsstat read and print stats as unsigned integers +- Added (but not installed) the mountstats and nfs-iostat + python scripts. + +* Fri Jun 6 2008 Steve Dickson 1.1.2-6 +- Added 5 (111 thru 115) upstream patches that fixed + things mostly in the text mounting code. + +* Thu May 8 2008 Steve Dickson 1.1.2-5 +- Added 10 (101 thru 110) upstream patches that fixed + things mostly in the mount and gssd code. + +* Wed May 7 2008 Steve Dickson 1.1.2-4 +- Added ppc arch to the all_32bit_archs list (bz 442847) + +* Wed Apr 23 2008 Steve Dickson 1.1.2-3 +- Documented how to turn off/on protocol support for + rpc.nfsd in /etc/sysconfig/nfs (bz443625) +- Corrected the nfslock initscript 'status' return code (bz 441605) +- Removed obsolete code from the nfslock initscript (bz 441604) + +* Mon Apr 14 2008 Steve Dickson 1.1.2-2 +- Make EACCES a non fatal error (bz 439807) + +* Tue Mar 25 2008 Steve Dickson 1.1.2-1 +- Upgrade to nfs-utils-1.1.2 + +* Mon Mar 3 2008 Steve Dickson 1.1.1-5 +- Stopped mountd from incorrectly logging an error + (commit 9dd9b68c4c44f0d9102eb85ee2fa36a8b7f638e3) +- Stop gssd from ignoring the machine credential caches + (commit 46d439b17f22216ce8f9257a982c6ade5d1c5931) +- Fixed typo in the nfsstat command line arugments. + (commit acf95d32a44fd8357c24e8a04ec53fc6900bfc58) +- Added test to stop buffer overflow in idmapd + (commit bcd0fcaf0966c546da5043be700587f73174ae25) + +* Sat Feb 9 2008 Steve Dickson 1.1.1-4 +- Cleaned up some typos that were found in the various + places in the mountd code + +* Thu Jan 24 2008 Steve Dickson 1.1.1-3 +- Added in relatime mount option so mount.nfs stays + compatible with the mount command in util-linux-ng (bz 274301) + +* Tue Jan 22 2008 Steve Dickson 1.1.1-2 +- Added -S/--since to the nfsstat(1) manpage +- The wording in the exportfs man page can be a bit confusing, implying + that "exportfs -u :/foo" will unexport /foo from all hosts, which it won't +- Removed nfsprog option since the kernel no longer supports it. +- Removed mountprog option since the kernel no longer supports it. +- Stop segfaults on amd64 during warnings messages. +- Fix bug when both crossmnt and fsid are set. + +* Sat Jan 5 2008 Steve Dickson 1.1.1-1 +- Updated to latest upstream release, nfs-utils-1.1.1 +- Added the removal of sm-notify.pid to nfslock init script. +- Changed spec file to use condrestart instead of condstop + when calling init scripts. +- Fixed typo in rpc.mountd man page +- Turn on 'nohide' automatically for all refer exports (bz 313561) + +* Tue Dec 04 2007 Release Engineering - 1.1.0-7 + - Rebuild for openldap bump + +* Wed Oct 17 2007 Steve Dickson 1.1.0-6 +- Switch the libgssapi dependency to libgssglue + +* Fri Sep 14 2007 Steve Dickson 1.1.0-5 +- Changed the default paths in sm-notify to + /var/lib/nfs/statd (bz 258461) +- Updated exportfs manpage (bz 262861) + +* Wed Aug 15 2007 Steve Dickson 1.1.0-4 +- Make sure the open() system calling in exportfs uses + mode bits when creating the etab file (bz 252440). + +* Mon Aug 13 2007 Steve Dickson 1.1.0-3 +- Added nosharecache mount option which re-enables + rw/ro mounts to the same server (bz 243913). + +* Thu Aug 2 2007 Steve Dickson 1.1.0-2 +- Make sure the gss and idmap daemons remove thier lock + files when they are stopped. + +* Sat Jul 28 2007 Steve Dickson 1.1.0-1 +- Upgraded to the latest upstream version (nfs-utils-1.1.0) + +* Thu May 24 2007 Steve Dickson 1.0.10-7 +- Fixed typo in mount.nfs4 that causes a segfault during + error processing (bz 241190) + +* Tue May 22 2007 Steve Dickson 1.0.10-6 +- Make sure the condrestarts exit with a zero value (bz 240225) +- Stopped /etc/sysconfig/nfs from being overwritten on updates (bz 234543) +- Added -o nordirplus mount option to disable READDIRPLUS (bz 240357) +- Disabled the FSCache patch, for now... + +* Thu May 10 2007 Steve Dickson 1.0.12-5 +- Fix mount.nfs4 to display correct error message (bz 227212) +- Updated mountd and showmount reverse lookup flags (bz 220772) +- Eliminate timeout on nfsd shutdowns (bz 222001) +- Eliminate memory leak in mountd (bz 239536) +- Make sure statd uses correct uid/gid by chowning + the /var/lib/nfs/statd with the rpcuser id. (bz 235216) +- Correct some sanity checking in rpc.nfsd. (bz 220887) +- Added missing unlock_mtab() call in moutnd +- Have mountd hold open etab file to force inode number to change (bz 236823) +- Create a /etc/sysconfig/nfs with all the possible init script + variables (bz 234543) +- Changed nfs initscript to exit with correct value (bz 221874) + +* Tue Apr 3 2007 Steve Dickson 1.0.12-4 +- Replace portmap dependency with an rpcbind dependency (bz 228894) + +* Mon Mar 12 2007 Steve Dickson 1.0.12-3 +- Incorporated Merge Review comments (bz 226198) + +* Fri Mar 9 2007 Steve Dickson 1.0.12-2 +- Added condstop to all the initscripts (bz 196934) +- Made no_subtree_check a default export option (bz 212218) + +* Tue Mar 6 2007 Steve Dickson 1.0.12-1 +- Upgraded to 1.0.12 +- Fixed typo in Summary. + +* Thu Mar 1 2007 Karel Zak 1.0.11-2 +- Fixed mount.nfs -f (fake) option (bz 227988) + +* Thu Feb 22 2007 Steve Dickson 1.0.11-1 +- Upgraded to 1.0.11 + +* Wed Feb 21 2007 Steve Dickson 1.0.10-7 +- Added FS_Location support + +* Mon Dec 18 2006 Karel Zak 1.0.10-6 +- add support for mount options that contain commas (bz 219645) + +* Wed Dec 13 2006 Steve Dickson 1.0.10-5 +- Stopped v4 umounts from ping rpc.mountd (bz 215553) + +* Tue Nov 28 2006 Steve Dickson 1.0.10-4 +- Doing a connect on UDP sockets causes the linux network + stack to reject UDP patches from multi-home server with + nic on the same subnet. (bz 212471) + +* Wed Nov 15 2006 Steve Dickson 1.0.10-3 +- Removed some old mounting versioning code that was + stopping tcp mount from working (bz 212471) + +* Tue Oct 31 2006 Steve Dickson 1.0.10-2 +- Fixed -o remount (bz 210346) +- fix memory leak in rpc.idmapd (bz 212547) +- fix use after free bug in dirscancb (bz 212547) +- Made no_subtree_check a default export option (bz 212218) + +* Wed Oct 25 2006 Steve Dickson 1.0.10-1 +- Upgraded to 1.0.10 + +* Mon Oct 16 2006 Steve Dickson 1.0.9-10 +- Fixed typo in nfs man page (bz 210864). + +* Fri Oct 13 2006 Steve Dickson 1.0.9-9 +- Unable to mount NFS V3 share where sec=none is specified (bz 210644) + +* Tue Sep 26 2006 Steve Dickson 1.0.9-8 +- mount.nfs was not returning a non-zero exit value + on failed mounts (bz 206705) + +* Wed Sep 20 2006 Karel Zak 1.0.9-7 +- Added support for the mount -s (sloppy) option (#205038) +- Added nfs.5 man page from util-linux +- Added info about [u]mount.nfs to the package description + +* Mon Sep 11 2006 1.0.9-6 +- Removed the compiling of getiversion and getkversion since + UTS_RELEASE is no longer defined and these binary are + not installed. + +* Fri Aug 18 2006 1.0.9-5 +- Changed gssd daemons to cache things in memory + instead of /tmp which makes selinux much happier. + (bz 203078) + +* Wed Aug 16 2006 1.0.9-4 +- Allow variable for HA callout program in /etc/init.d/nfslock + (bz 202790) + +* Wed Aug 02 2006 1.0.9-3 +- add epoch (#196359) + +* Fri Jul 28 2006 1.0.9-2 +- Enabled the creating of mount.nfs and umount.nfs binaries +- Added mount option fixes suggested by upstream. +- Fix lazy umounts (bz 169299) +- Added -o fsc mount option. + +* Mon Jul 24 2006 1.0.9-1 +- Updated to 1.0.9 release + +* Wed Jul 12 2006 Jesse Keating - 1:1.0.8-5.1 +- rebuild + +* Sun Jul 2 2006 1:1.0.8-5 +- Introduce epoch to fix upgrade path + +* Sat Jul 1 2006 1.0.8-3 +- Fixed typos in /etc/rc.d/init.d/nfs file (bz 184486) + +* Fri Jun 30 2006 1.0.8-3 +- Split the controlling of nfs version, ports, and protocol + into two different patches +- Fixed and added debugging statements to rpc.mountd. +- Fixed -p arg to work with priviledged ports (bz 156655) +- Changed nfslock initscript to set LOCKD_TCPPORT and + LOCKD_UDPPORT (bz 162133) +- Added MOUNTD_NFS_V1 variable to version 1 of the + mount protocol can be turned off. (bz 175729) +- Fixed gssd to handel mixed case characters in + the domainname. (bz 186069) + +* Wed Jun 21 2006 1.0.8-2 +- Updated to nfs-utils-1.0.8 + +* Thu Jun 8 2006 1.0.8.rc4-1 +- Upgraded to the upstream 1.0.8.rc4 version + +* Fri Feb 10 2006 Jesse Keating - 1.0.8.rc2-4.FC5.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.0.8.rc2-4.FC5.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Jan 20 2006 Steve Dickson 1.0.8.rc2-4.FC5 +- Added new libnfsidmap call, nfs4_set_debug(), to rpc.idmapd + which turns on debugging in the libarary. + +* Mon Jan 16 2006 Steve Dickson 1.0.8.rc2-3.FC5 +- Added innetgr patch that changes configure scripts to + check for the innetgr function. (bz 177899) + +* Wed Jan 11 2006 Peter Jones 1.0.8.rc2-2.FC5 +- Fix lockfile naming in the initscripts so they're stopped correctly. + +* Mon Jan 9 2006 Steve Dickson 1.0.8.rc2-1.FC5 +- Updated to 1.0.8-rc2 release +- Broke out libgssapi into its own rpm +- Move librpcsecgss and libnfsidmap in the new nfs-utils-lib rpm +- Removed libevent code; Required to be installed. + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Sun Oct 23 2005 Steve Dickson 1.0.7-19 +- Updated to latest code in SourceForge CVS +- Updated to latest CITI patches (1.0.7-4) +- Fix bug in nfsdreopen by compiling in server defaults + +* Thu Sep 22 2005 Steve Dickson 1.0.7-18 +- Updated libnfsidmap to 0.11 +- Updated libgssapi to 0.5 +- Made sure the gss daemons and new libs are + all using the same include files. +- Removed code from the tree that is no longer used. +- Add ctlbits patch that introduced the -N -T and -U + command line flags to rpc.nfsd. + +* Sun Sep 18 2005 Steve Dickson 1.0.7-17 +- Updated to latest nfs-utils code in upstream CVS tree +- Updated libevent from 1.0b to 1.1a +- Added libgssapi-0.4 and librpcsecgss-0.6 libs from CITI + +* Thu Sep 8 2005 Steve Dickson 1.0.7-16 +- Reworked the nfslock init script so if lockd is running + it will be killed which is what the HA community needs. (bz 162446) +- Stopped rpcidmapd.init from doing extra echoing when + condstart-ed. + +* Wed Aug 24 2005 Peter Jones - 1.0.7-15 +- don't strip during "make install", so debuginfo packages are generated right + +* Thu Aug 18 2005 Florian La Roche +- no need to still keep a requirement for kernel-2.2 or newer + +* Tue Aug 16 2005 Steve Dickson 1.0.7-13 +- Changed mountd to use stat64() (bz 165062) + +* Tue Aug 2 2005 Steve Dickson 1.0.7-12 +- Changed useradd to use new -l flag (bz149407) +- 64bit fix in gssd code (bz 163139) +- updated broken dependencies +- updated rquotad to compile with latest + quota version. + +* Thu May 26 2005 Steve Dickson 1.0.7-8 +- Fixed subscripting problem in idmapd (bz 158188) + +* Thu May 19 2005 Steve Dickson 1.0.7-7 +- Fixed buffer overflow in rpc.svcgssd (bz 114288) + +* Wed Apr 13 2005 Steve Dickson 1.0.7-6 +- Fixed misformated output from nfslock script (bz 154648) + +* Tue Mar 29 2005 Steve Dickson 1.0.7-4 +- Fixed a compile error on x86_64 machines in the gss code. +- Updated the statd-notify-hostname.patch to eliminate + a segmentation fault in rpc.statd when an network + interface was down. (bz 151828) + +* Sat Mar 19 2005 Steve Dickson 1.0.7-3 +- Changed xlog to use LOG_INFO instead of LOG_DEBUG + so debug messages will appear w/out any config + changes to syslog.conf. +- Reworked how /etc/exports is setup (bz 151389) + +* Wed Mar 2 2005 Steve Dickson 1.0.7-2 +- Tied the rpcsecgss debugging in with gssd and + svcgssd debugging + +* Mon Feb 14 2005 Steve Dickson +- Added support to rpcgssd.init and rpcsvcgssd.init scripts + to insmod security modules. +- Changed the nfs.init script to bring rpc.svcgssd up and down, + since rpc.svcgssd is only needed with the NFS server is running. + +* Tue Dec 14 2004 Steve Dickson +- Fix problem in idmapd that was causing "xdr error 10008" + errors (bz 142813) +- make sure the correct hostname is used in the SM_NOTIFY + message that is sent from a rebooted server which has + multiple network interfaces. (bz 139101) + +- Changed nfslock to send lockd a -KILL signal + when coming down. (bz 125257) + +* Thu Nov 11 2004 Steve Dickson +- Replaced a memcopy with explicit assignments + in getquotainfo() of rquotad to fix potential overflow + that can occur on 64bit machines. (bz 138068) + +* Mon Nov 8 2004 Steve Dickson +- Updated to latest sourceforge code +- Updated to latest CITIT nfs4 patches + +* Sun Oct 17 2004 Steve Dickson +- Changed nfs.init to bring down rquotad correctly + (bz# 136041) + +* Thu Oct 14 2004 Steve Dickson +- Added "$RQUOTAD_PORT" variable to nfs.init which + allows the rpc.rquotad to use a predefined port + (bz# 124676) + +* Fri Oct 1 2004 +- Make sure the uid/gid of nfsnobody is the + correct value for all archs (bz# 123900) +- Fixed some security issues found by SGI (bz# 133556) + +* Mon Aug 30 2004 Steve Dickson +- Major clean up. +- Removed all unused/old patches +- Rename and condensed a number of patches +- Updated to CITI's nfs-utils-1.0.6-13 patches + +* Tue Aug 10 2004 Bill Nottingham +- move if..fi condrestart stanza to %%postun (#127914, #128601) + +* Wed Jun 16 2004 +- nfslock stop is now done on package removals +- Eliminate 3 syslog messages that are logged for + successful events. + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Mon Jun 14 2004 +- Fixed syntax error in nfs initscripts when + NETWORKING is not defined +- Removed sync warning on readonly exports. +- Changed run levels in rpc initscripts. +- Replaced modinfo with lsmod when checking + for loaded modules. + +* Tue Jun 1 2004 +- Changed the rpcgssd init script to ensure the + rpcsec_gss_krb5 module is loaded + +* Tue May 18 2004 +- Removed the auto option from MOUNTD_NFS_V2 and + MOUNTD_NFS_V3 variables. Since v2 and v3 are on + by default, there only needs to be away of + turning them off. + +* Mon May 10 2004 +- Rebuilt + +* Thu Apr 15 2004 +- Changed the permission on idmapd.conf to 644 +- Added mydaemon code to svcgssd +- Updated the add_gssd.patch from upstream + +* Wed Apr 14 2004 +- Created a pipe between the parent and child so + the parent process can report the correct exit + status to the init scripts +- Added SIGHUP processing to rpc.idmapd and the + rpcidmapd init script. + +* Mon Mar 22 2004 +- Make sure check_new_cache() is looking in the right place + +* Wed Mar 17 2004 +- Changed the v4 initscripts to use $prog for the + arugment to daemon + +* Tue Mar 16 2004 +- Made the nfs4 daemons initscripts work better when + sunrpc is not a module +- added more checks to see if modules are being used. + +* Mon Mar 15 2004 +- Add patch that sets up gssapi_mech.conf correctly + +* Fri Mar 12 2004 +- Added the shutting down of the rpc v4 daemons. +- Updated the Red Hat only patch with some init script changes. + +* Thu Mar 11 2004 Bill Nottingham +- rpc_pipefs mounting and aliases are now in modutils; require that + +* Thu Mar 11 2004 +- Updated the gssd patch. + +* Sun Mar 7 2004 +- Added the addition and deletion of rpc_pipefs to /etc/fstab +- Added the addition and deletion of module aliases to /etc/modules.conf + +* Mon Mar 1 2004 +- Removed gssd tarball and old nfsv4 patch. +- Added new nfsv4 patches that include both the + gssd and idmapd daemons +- Added redhat-only v4 patch that reduces the + static librpc.a to only contain gss rpc related + routines (I would rather have gssd use the glibc + rpc routines) +-Changed the gssd svcgssd init scripts to only + start up if SECURE_NFS is set to 'yes' in + /etc/sysconfig/nfs + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Thu Feb 12 2004 Thomas Woerner +- make rpc.lockd, rpc.statd, rpc.mountd and rpc.nfsd pie + +* Wed Jan 28 2004 Steve Dickson +- Added the NFSv4 bits + +* Mon Dec 29 2003 Steve Dickson +- Added the -z flag to nfsstat + +* Wed Dec 24 2003 Steve Dickson +- Fixed lockd port setting in nfs.int script + +* Wed Oct 22 2003 Steve Dickson +- Upgrated to 1.0.6 +- Commented out the acl path for fedora + +* Wed Aug 27 2003 Steve Dickson +- Added the setting of lockd ports via sysclt interface +- Removed queue setting code since its no longer needed + +* Thu Aug 7 2003 Steve Dickson +- Added back the acl patch Taroon b2 + +* Wed Jul 23 2003 Steve Dickson +- Commented out the acl patch (for now) + +* Mon Jul 21 2003 Steve Dickson +- Upgrated to 1.0.5 + +* Wed Jun 18 2003 Steve Dickson +- Added security update +- Fixed the drop-privs.patch which means the chroot +patch could be removed. + +* Mon Jun 9 2003 Steve Dickson +- Defined the differ kinds of debugging avaliable for mountd in +the mountd man page. + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Tue Jun 3 2003 Steve Dickson +- Upgraded to 1.0.3 +- Fixed numerous bugs in init scrips +- Added nfsstat overflow patch + +* Thu Jan 23 2003 Tim Powers 1.0.1-2.9 +- rebuild + +* Fri Dec 13 2002 Daniel J Walsh +- change init script to not start rpc.lock if already running + +* Wed Dec 11 2002 Daniel J Walsh +- Moved access code to be after dropping privs + +* Mon Nov 18 2002 Stephen C. Tweedie +- Build with %%configure +- Add nhfsgraph, nhfsnums and nhfsrun to the files list + +* Mon Nov 11 2002 Stephen C. Tweedie +- Don't drop privs until we've bound the notification socket + +* Thu Nov 7 2002 Stephen C. Tweedie +- Ignore SIGPIPE in rpc.mountd + +* Thu Aug 1 2002 Bob Matthews +- Add Sean O'Connell's nfs control tweaks +- to nfs init script. + +* Mon Jul 22 2002 Bob Matthews +- Move to nfs-utils-1.0.1 + +* Mon Feb 18 2002 Bob Matthews +- "service nfs restart" should start services even if currently +- not running (#59469) +- bump version to 0.3.3-4 + +* Wed Oct 3 2001 Bob Matthews +- Move to nfs-utils-0.3.3 +- Make nfsnobody a system account (#54221) + +* Tue Aug 21 2001 Bob Matthews +- if UID 65534 is unassigned, add user nfsnobody (#22685) + +* Mon Aug 20 2001 Bob Matthews +- fix typo in nfs init script which prevented MOUNTD_PORT from working (#52113) + +* Tue Aug 7 2001 Bob Matthews +- nfs init script shouldn't fail if /etc/exports doesn't exist (#46432) + +* Fri Jul 13 2001 Bob Matthews +- Make %%pre useradd consistent with other Red Hat packages. + +* Tue Jul 03 2001 Michael K. Johnson +- Added sh-utils dependency for uname -r in nfs init script + +* Tue Jun 12 2001 Bob Matthews +- make non RH kernel release strings scan correctly in +- nfslock init script (#44186) + +* Mon Jun 11 2001 Bob Matthews +- don't install any rquota pages in _mandir: (#39707, #44119) +- don't try to manipulate rpc.rquotad in init scripts +- unless said program actually exists: (#43340) + +* Tue Apr 10 2001 Preston Brown +- don't translate initscripts for 6.x + +* Tue Apr 10 2001 Michael K. Johnson +- do not start lockd on kernel 2.2.18 or higher (done automatically) + +* Fri Mar 30 2001 Preston Brown +- don't use rquotad from here now; quota package contains a version that + works with 2.4 (#33738) + +* Mon Mar 12 2001 Bob Matthews +- Statd logs at LOG_DAEMON rather than LOG_LOCAL5 +- s/nfs/\$0/ where appropriate in init scripts + +* Tue Mar 6 2001 Jeff Johnson +- Move to nfs-utils-0.3.1 + +* Wed Feb 14 2001 Bob Matthews +- #include patch + +* Mon Feb 12 2001 Bob Matthews +- Really enable netgroups + +* Mon Feb 5 2001 Bernhard Rosenkraenzer +- i18nize initscripts + +* Fri Jan 19 2001 Bob Matthews +- Increased {s,r}blen in rpcmisc.c:makesock to accommodate eepro100 + +* Tue Jan 16 2001 Bob Matthews +- Hackish fix in build section to enable netgroups + +* Wed Jan 3 2001 Bob Matthews +- Fix incorrect file specifications in statd manpage. +- Require gawk 'cause it's used in nfslock init script. + +* Wed Dec 13 2000 Bob Matthews +- Require sed because it's used in nfs init script + +* Tue Dec 12 2000 Bob Matthews +- Don't do a chroot(2) after dropping privs, in statd. + +* Mon Dec 11 2000 Bob Matthews +- NFSv3 if kernel >= 2.2.18, detected in init script + +* Thu Nov 23 2000 Florian La Roche +- update to 0.2.1 + +* Tue Nov 14 2000 Bill Nottingham +- don't start lockd on 2.4 kernels; it's unnecessary + +* Tue Sep 5 2000 Florian La Roche +- more portable fix for mandir + +* Sun Sep 3 2000 Florian La Roche +- update to 0.2-release + +* Fri Sep 1 2000 Florian La Roche +- fix reload script + +* Thu Aug 31 2000 Florian La Roche +- update to 0.2 from CVS +- adjust statd-drop-privs patch +- disable tcp_wrapper support + +* Wed Aug 2 2000 Bill Nottingham +- fix stop priority of nfslock + +* Tue Aug 1 2000 Bill Nottingham +- um, actually *include and apply* the statd-drop-privs patch + +* Mon Jul 24 2000 Bill Nottingham +- fix init script ordering (#14502) + +* Sat Jul 22 2000 Bill Nottingham +- run statd chrooted and as non-root +- add prereqs + +* Tue Jul 18 2000 Trond Eivind Glomsrød +- use "License", not "Copyright" +- use %%{_tmppath} and %%{_mandir} + +* Mon Jul 17 2000 Matt Wilson +- built for next release + +* Mon Jul 17 2000 Matt Wilson +- 0.1.9.1 +- remove patch0, has been integrated upstream + +* Wed Feb 9 2000 Bill Nottingham +- the wonderful thing about triggers, is triggers are wonderful things... + +* Thu Feb 03 2000 Cristian Gafton +- switch to nfs-utils as the base tree +- fix the statfs patch for the new code base +- single package that obsoletes everything we had before (if I am to keep + some traces of my sanity with me...) + +* Mon Jan 17 2000 Preston Brown +- use statfs syscall instead of stat to determinal optimal blksize