diff --git a/nfs-utils-1.3.3-rundir.patch b/nfs-utils-1.3.3-rundir.patch new file mode 100644 index 0000000..4b608cb --- /dev/null +++ b/nfs-utils-1.3.3-rundir.patch @@ -0,0 +1,114 @@ +diff -Nru nfs-utils-1.3.3.orig/support/nfs/getport.c nfs-utils-1.3.3/support/nfs/getport.c +--- nfs-utils-1.3.3.orig/support/nfs/getport.c 2015-09-26 16:01:11.000000000 +0200 ++++ nfs-utils-1.3.3/support/nfs/getport.c 2015-11-06 13:12:12.565448067 +0100 +@@ -903,7 +903,7 @@ + * listen on AF_LOCAL. + * + * If that doesn't work (for example, if portmapper is running, or rpcbind +- * isn't listening on /var/run/rpcbind.sock), send a query via UDP to localhost ++ * isn't listening on /run/rpcbind.sock), send a query via UDP to localhost + * (UDP doesn't leave a socket in TIME_WAIT, and the timeout is a relatively + * short 3 seconds). + */ +diff -Nru nfs-utils-1.3.3.orig/systemd/nfs-blkmap.service nfs-utils-1.3.3/systemd/nfs-blkmap.service +--- nfs-utils-1.3.3.orig/systemd/nfs-blkmap.service 2015-11-06 13:10:23.376392802 +0100 ++++ nfs-utils-1.3.3/systemd/nfs-blkmap.service 2015-11-06 13:11:11.836973182 +0100 +@@ -9,7 +9,7 @@ + + [Service] + Type=forking +-PIDFile=/var/run/blkmapd.pid +-EnvironmentFile=-/run/sysconfig/nfs-utils ++PIDFile=/run/blkmapd.pid ++EnvironmentFile=-/run/nfs-utils + ExecStart=/usr/sbin/blkmapd $BLKMAPDARGS + +diff -Nru nfs-utils-1.3.3.orig/systemd/rpc-statd.service nfs-utils-1.3.3/systemd/rpc-statd.service +--- nfs-utils-1.3.3.orig/systemd/rpc-statd.service 2015-11-06 13:10:23.381392759 +0100 ++++ nfs-utils-1.3.3/systemd/rpc-statd.service 2015-11-06 13:10:49.572165905 +0100 +@@ -13,5 +13,5 @@ + [Service] + EnvironmentFile=-/run/nfs-utils + Type=forking +-PIDFile=/var/run/rpc.statd.pid ++PIDFile=/run/rpc.statd.pid + ExecStart=/usr/sbin/rpc.statd --no-notify $STATDARGS +diff -Nru nfs-utils-1.3.3.orig/tests/test-lib.sh nfs-utils-1.3.3/tests/test-lib.sh +--- nfs-utils-1.3.3.orig/tests/test-lib.sh 2015-09-26 16:01:11.000000000 +0200 ++++ nfs-utils-1.3.3/tests/test-lib.sh 2015-11-06 13:11:48.084659658 +0100 +@@ -56,5 +56,5 @@ + + # shut down statd + kill_statd() { +- kill `cat /var/run/rpc.statd.pid` ++ kill `cat /run/rpc.statd.pid` + } +diff -Nru nfs-utils-1.3.3.orig/utils/blkmapd/device-discovery.c nfs-utils-1.3.3/utils/blkmapd/device-discovery.c +--- nfs-utils-1.3.3.orig/utils/blkmapd/device-discovery.c 2015-09-26 16:01:11.000000000 +0200 ++++ nfs-utils-1.3.3/utils/blkmapd/device-discovery.c 2015-11-06 13:11:29.333821808 +0100 +@@ -58,7 +58,7 @@ + #define BL_PIPE_FILE "/var/lib/nfs/rpc_pipefs/nfs/blocklayout" + #define NFSPIPE_DIR "/var/lib/nfs/rpc_pipefs/nfs" + #define RPCPIPE_DIR "/var/lib/nfs/rpc_pipefs" +-#define PID_FILE "/var/run/blkmapd.pid" ++#define PID_FILE "/run/blkmapd.pid" + + struct bl_disk *visible_disk_list; + int bl_watch_fd, bl_pipe_fd, nfs_pipedir_wfd, rpc_pipedir_wfd; +diff -Nru nfs-utils-1.3.3.orig/utils/statd/sm-notify.c nfs-utils-1.3.3/utils/statd/sm-notify.c +--- nfs-utils-1.3.3.orig/utils/statd/sm-notify.c 2015-09-26 16:01:11.000000000 +0200 ++++ nfs-utils-1.3.3/utils/statd/sm-notify.c 2015-11-06 13:12:03.394527318 +0100 +@@ -871,7 +871,7 @@ + } + + /* +- * Record pid in /var/run/sm-notify.pid ++ * Record pid in /run/sm-notify.pid + * This file should remain until a reboot, even if the + * program exits. + * If file already exists, fail. +@@ -883,7 +883,7 @@ + int fd; + + (void)snprintf(pid, sizeof(pid), "%d\n", (int)getpid()); +- fd = open("/var/run/sm-notify.pid", O_CREAT|O_EXCL|O_WRONLY, 0600); ++ fd = open("/run/sm-notify.pid", O_CREAT|O_EXCL|O_WRONLY, 0600); + if (fd < 0) + return 0; + +diff -Nru nfs-utils-1.3.3.orig/utils/statd/start-statd nfs-utils-1.3.3/utils/statd/start-statd +--- nfs-utils-1.3.3.orig/utils/statd/start-statd 2015-09-26 16:01:11.000000000 +0200 ++++ nfs-utils-1.3.3/utils/statd/start-statd 2015-11-06 13:12:36.640240100 +0100 +@@ -1,7 +1,7 @@ + #!/bin/sh + # nfsmount calls this script when mounting a filesystem with locking + # enabled, but when statd does not seem to be running (based on +-# /var/run/rpc.statd.pid). ++# /run/rpc.statd.pid). + # It should run statd with whatever flags are apropriate for this + # site. + PATH="/sbin:/usr/sbin:/bin:/usr/bin" +diff -Nru nfs-utils-1.3.3.orig/utils/statd/statd.c nfs-utils-1.3.3/utils/statd/statd.c +--- nfs-utils-1.3.3.orig/utils/statd/statd.c 2015-09-26 16:01:11.000000000 +0200 ++++ nfs-utils-1.3.3/utils/statd/statd.c 2015-11-06 13:12:24.620343918 +0100 +@@ -159,7 +159,7 @@ + fprintf(stderr," -H Specify a high-availability callout program.\n"); + } + +-static const char *pidfile = "/var/run/rpc.statd.pid"; ++static const char *pidfile = "/run/rpc.statd.pid"; + + int pidfd = -1; + static void create_pidfile(void) +diff -Nru nfs-utils-1.3.3.orig/utils/statd/statd.man nfs-utils-1.3.3/utils/statd/statd.man +--- nfs-utils-1.3.3.orig/utils/statd/statd.man 2015-09-26 16:01:11.000000000 +0200 ++++ nfs-utils-1.3.3/utils/statd/statd.man 2015-11-06 13:12:50.900116969 +0100 +@@ -398,7 +398,7 @@ + .I /var/lib/nfs/state + NSM state number for this host + .TP 2.5i +-.I /var/run/run.statd.pid ++.I /run/run.statd.pid + pid file + .TP 2.5i + .I /etc/netconfig diff --git a/nfs-utils.spec b/nfs-utils.spec index 0f63228..9a565c8 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -8,8 +8,8 @@ %define with_mount 1 Name: nfs-utils -Version: 1.3.1 -Release: 2mamba +Version: 1.3.3 +Release: 3mamba Summary: NFS utilities and supporting clients and daemons for the kernel NFS server Group: Network/File Systems Vendor: openmamba @@ -21,6 +21,7 @@ Source0: http://downloads.sourceforge.net/project/nfs/nfs-utils/%{version} Source1: nfs-utils-sysconfig Source7: nfs-utils-idmapd.conf Patch0: %{name}-1.2.5-arm-PAGE_SIZE.patch +Patch1: nfs-utils-1.3.3-rundir.patch License: GPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel @@ -64,13 +65,14 @@ This package contains libraries and header files for developing applications tha %prep %setup -q +%patch1 -p1 sed -i "s|/run/sysconfig|/run|" systemd/* %build # --disable-tirpc: we currently use portmap. # Enabling tirpc causes nfs.mountd not to start when IPv6 is disabled %configure \ - --enable-nfsv4 \ + --disable-nfsv4 \ --enable-tirpc \ %if "%{stage1}" == "1" --disable-gss \ @@ -86,7 +88,7 @@ sed -i "s|/run/sysconfig|/run|" systemd/* --enable-shared \ --disable-static \ --with-statduser=rpcuser \ - --with-start-statd=/sbin/start-statd \ + --with-start-statd=%{_sbindir}/start-statd \ %if "%{_host}" != "%{_build}" --without-krb5 \ LDFLAGS="-L%{_prefix}/%{_host}/lib -lnsl -ldl -luuid -lgssglue -lrpcsecgss" @@ -185,27 +187,33 @@ fi %attr(4755,root,root) /sbin/umount.nfs %attr(4755,root,root) /sbin/umount.nfs4 %endif -/sbin/nfsdcltrack +#/sbin/nfsdcltrack /sbin/osd_login -%{_sbindir}/blkmapd +#%{_sbindir}/blkmapd %{_sbindir}/mountstats -%{_sbindir}/nfsidmap +#%{_sbindir}/nfsidmap %{_sbindir}/nfsiostat %{_sbindir}/nfsstat %{_sbindir}/rpcdebug -%{_sbindir}/rpc.idmapd +#%{_sbindir}/rpc.idmapd %if "%{stage1}" != "1" %{_sbindir}/rpc.gssd -%{_sbindir}/rpc.svcgssd +#%{_sbindir}/rpc.svcgssd %endif #%if %{with_rquotad} #%{_sbindir}/rpc.rquotad #%endif %{_sbindir}/rpc.statd -%{_sbindir}/sm-notify %{_sbindir}/showmount +%{_sbindir}/sm-notify +%{_sbindir}/start-statd %{_unitdir}/nfs-client.target +%{_unitdir}/nfs-config.service +%{_unitdir}/rpc-statd.service %{_unitdir}/nfs-utils.service +%{_unitdir}/nfs-blkmap.service +%{_unitdir}/nfs-idmapd.service +%{_unitdir}/nfs-mountd.service %{_unitdir}/rpc-gssd.service %{_unitdir}/rpc-statd-notify.service %{_prefix}/lib/systemd/scripts/nfs-utils_env.sh @@ -220,22 +228,25 @@ fi %config(noreplace) /var/lib/nfs/state %config(noreplace) /var/lib/nfs/xtab %{_mandir}/man5/nfs.5* -%{_mandir}/man8/blkmapd.8* +%{_mandir}/man5/nfsmount.conf.5* +#%{_mandir}/man8/blkmapd.8* %{_mandir}/man8/gssd.8* -%{_mandir}/man8/idmapd.8* +#%{_mandir}/man8/idmapd.8* %{_mandir}/man8/mount.nfs.8* %{_mandir}/man8/mountstats.8* -%{_mandir}/man8/nfsdcltrack.8* -%{_mandir}/man8/nfsidmap.8* +#%{_mandir}/man8/nfsdcltrack.8* +#%{_mandir}/man8/nfsidmap.8* %{_mandir}/man8/nfsiostat.8* %{_mandir}/man8/nfsstat.8* %{_mandir}/man8/rpc.gssd.8* -%{_mandir}/man8/rpc.idmapd.8* +#%{_mandir}/man8/rpc.idmapd.8* +%{_mandir}/man8/rpc.sm-notify.8* +%{_mandir}/man8/rpc.statd.8* %{_mandir}/man8/rpcdebug.8* %{_mandir}/man8/showmount.8* %{_mandir}/man8/sm-notify.8* %{_mandir}/man8/statd.8* -%{_mandir}/man8/svcgssd.8* +#%{_mandir}/man8/svcgssd.8* %{_mandir}/man8/umount.nfs.8* %doc COPYING #linux-nfs/* @@ -243,19 +254,13 @@ fi %files -n nfs-server %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/exports -%{_sbindir}/start-statd %{_sbindir}/exportfs %{_sbindir}/rpc.mountd %{_sbindir}/rpc.nfsd %{_unitdir}/auth-rpcgss-module.service -%{_unitdir}/nfs-blkmap.service -%{_unitdir}/nfs-blkmap.target -%{_unitdir}/nfs-config.service -%{_unitdir}/nfs-idmapd.service -%{_unitdir}/nfs-mountd.service +#%{_unitdir}/nfs-blkmap.target %{_unitdir}/nfs-server.service %{_unitdir}/proc-fs-nfsd.mount -%{_unitdir}/rpc-statd.service %{_unitdir}/rpc-svcgssd.service %{_unitdir}/var-lib-nfs-rpc_pipefs.mount %{_mandir}/man5/exports.5* @@ -264,12 +269,24 @@ fi %{_mandir}/man8/nfsd.8* %{_mandir}/man8/rpc.mountd.8* %{_mandir}/man8/rpc.nfsd.8* -%{_mandir}/man8/rpc.sm-notify.8* -%{_mandir}/man8/rpc.statd.8* -%{_mandir}/man8/rpc.svcgssd.8* +#%{_mandir}/man8/rpc.svcgssd.8* %{_mandir}/man7/nfsd.7* %changelog +* Fri Nov 06 2015 Silvan Calarco 1.3.3-3mamba +- move nfs-config.service to client package +- patch for /run instead of /var/run +- fix configured path for start-statd + +* Fri Oct 30 2015 Silvan Calarco 1.3.3-2mamba +- disable nfsv4 and move rpc-statd and other services from server to client package + +* Wed Oct 28 2015 Automatic Build System 1.3.3-1mamba +- automatic version update by autodist + +* Tue Feb 17 2015 Automatic Build System 1.3.2-1mamba +- automatic version update by autodist + * Wed Oct 01 2014 Silvan Calarco 1.3.1-2mamba - provide nfs-utils_env.sh script and /etc/sysconfig/nfs