- Add 0001-Replace-all-var-run-with-run.patch
Use /run instead of /var/run (bsc#1185170) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=238
This commit is contained in:
parent
9e09855b47
commit
375c2490c1
121
0001-Replace-all-var-run-with-run.patch
Normal file
121
0001-Replace-all-var-run-with-run.patch
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
From 57f49934ac3aeab90ddbe878971bed548e6e70a4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: NeilBrown <neilb@suse.de>
|
||||||
|
Date: Tue, 4 May 2021 10:49:57 +1000
|
||||||
|
Subject: [PATCH] Replace all /var/run with /run
|
||||||
|
|
||||||
|
FHS 3.0 deprecated /var/run in favour of /run.
|
||||||
|
FHS 3.0 was released over 5 years ago.
|
||||||
|
I think it is time for nfs-utils to catch up.
|
||||||
|
Note that some places, particularly systemd unit files, already use just
|
||||||
|
"/run".
|
||||||
|
|
||||||
|
Signed-off-by: NeilBrown <neilb@suse.de>
|
||||||
|
---
|
||||||
|
support/nfs/getport.c | 2 +-
|
||||||
|
tests/test-lib.sh | 2 +-
|
||||||
|
utils/blkmapd/device-discovery.c | 2 +-
|
||||||
|
utils/statd/sm-notify.c | 4 ++--
|
||||||
|
utils/statd/start-statd | 10 +++++-----
|
||||||
|
utils/statd/statd.c | 2 +-
|
||||||
|
utils/statd/statd.man | 2 +-
|
||||||
|
7 files changed, 12 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
--- a/support/nfs/getport.c
|
||||||
|
+++ b/support/nfs/getport.c
|
||||||
|
@@ -904,7 +904,7 @@ int nfs_getport_ping(struct sockaddr *sa
|
||||||
|
* 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).
|
||||||
|
*/
|
||||||
|
--- a/tests/test-lib.sh
|
||||||
|
+++ b/tests/test-lib.sh
|
||||||
|
@@ -56,5 +56,5 @@ start_statd() {
|
||||||
|
|
||||||
|
# shut down statd
|
||||||
|
kill_statd() {
|
||||||
|
- kill `cat /var/run/rpc.statd.pid`
|
||||||
|
+ kill `cat /run/rpc.statd.pid`
|
||||||
|
}
|
||||||
|
--- a/utils/blkmapd/device-discovery.c
|
||||||
|
+++ b/utils/blkmapd/device-discovery.c
|
||||||
|
@@ -64,7 +64,7 @@
|
||||||
|
#define EVENT_BUFSIZE (1024 * EVENT_SIZE)
|
||||||
|
|
||||||
|
#define RPCPIPE_DIR "/var/lib/nfs/rpc_pipefs"
|
||||||
|
-#define PID_FILE "/var/run/blkmapd.pid"
|
||||||
|
+#define PID_FILE "/run/blkmapd.pid"
|
||||||
|
|
||||||
|
#define CONF_SAVE(w, f) do { \
|
||||||
|
char *p = f; \
|
||||||
|
--- a/utils/statd/sm-notify.c
|
||||||
|
+++ b/utils/statd/sm-notify.c
|
||||||
|
@@ -901,7 +901,7 @@ find_host(uint32_t xid)
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * 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.
|
||||||
|
@@ -913,7 +913,7 @@ static int record_pid(void)
|
||||||
|
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;
|
||||||
|
|
||||||
|
--- a/utils/statd/start-statd
|
||||||
|
+++ b/utils/statd/start-statd
|
||||||
|
@@ -1,18 +1,18 @@
|
||||||
|
#!/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"
|
||||||
|
|
||||||
|
# Use flock to serialize the running of this script
|
||||||
|
-exec 9> /var/run/rpc.statd.lock
|
||||||
|
+exec 9> /run/rpc.statd.lock
|
||||||
|
flock -e 9
|
||||||
|
|
||||||
|
-if [ -s /var/run/rpc.statd.pid ] &&
|
||||||
|
- [ 1`cat /var/run/rpc.statd.pid` -gt 1 ] &&
|
||||||
|
- kill -0 `cat /var/run/rpc.statd.pid` > /dev/null 2>&1
|
||||||
|
+if [ -s /run/rpc.statd.pid ] &&
|
||||||
|
+ [ 1`cat /run/rpc.statd.pid` -gt 1 ] &&
|
||||||
|
+ kill -0 `cat /run/rpc.statd.pid` > /dev/null 2>&1
|
||||||
|
then
|
||||||
|
# statd already running - must have been slow to respond.
|
||||||
|
exit 0
|
||||||
|
--- a/utils/statd/statd.c
|
||||||
|
+++ b/utils/statd/statd.c
|
||||||
|
@@ -161,7 +161,7 @@ usage(void)
|
||||||
|
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)
|
||||||
|
--- a/utils/statd/statd.man
|
||||||
|
+++ b/utils/statd/statd.man
|
||||||
|
@@ -440,7 +440,7 @@ directory containing notify list
|
||||||
|
.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
|
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 4 01:09:57 UTC 2021 - Neil Brown <nfbrown@suse.com>
|
||||||
|
|
||||||
|
- Add 0001-Replace-all-var-run-with-run.patch
|
||||||
|
Use /run instead of /var/run
|
||||||
|
(bsc#1185170)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Mar 11 09:45:07 UTC 2021 - Guilherme Moro <gmoro@suse.com>
|
Thu Mar 11 09:45:07 UTC 2021 - Guilherme Moro <gmoro@suse.com>
|
||||||
|
|
||||||
|
@ -42,6 +42,7 @@ Source25: rpc-svcgssd.options.conf
|
|||||||
Source26: nfs.conf
|
Source26: nfs.conf
|
||||||
Source27: nfs-kernel-server.tmpfiles.conf
|
Source27: nfs-kernel-server.tmpfiles.conf
|
||||||
Patch0: nfs-utils-1.0.7-bind-syntax.patch
|
Patch0: nfs-utils-1.0.7-bind-syntax.patch
|
||||||
|
Patch1: 0001-Replace-all-var-run-with-run.patch
|
||||||
|
|
||||||
BuildRequires: e2fsprogs-devel
|
BuildRequires: e2fsprogs-devel
|
||||||
BuildRequires: fedfs-utils-devel
|
BuildRequires: fedfs-utils-devel
|
||||||
|
Loading…
Reference in New Issue
Block a user