libstoragemgmt/move_to_run.patch

94 lines
4.3 KiB
Diff
Raw Normal View History

bsc#1185067, migrate /var/run to /run.
diff -Naur libstoragemgmt-1.9.1.orig/c_binding/lsm_datatypes.cpp libstoragemgmt-1.9.1/c_binding/lsm_datatypes.cpp
--- libstoragemgmt-1.9.1.orig/c_binding/lsm_datatypes.cpp 2021-04-22 14:40:32.652139249 +0800
+++ libstoragemgmt-1.9.1/c_binding/lsm_datatypes.cpp 2021-04-22 14:47:32.747146709 +0800
@@ -52,7 +52,7 @@
#ifdef __cplusplus
extern "C" {
#endif
-#define LSM_DEFAULT_PLUGIN_DIR "/var/run/lsm/ipc"
+#define LSM_DEFAULT_PLUGIN_DIR "/run/lsm/ipc"
int lsm_string_list_append(lsm_string_list *sl, const char *value) {
int rc = LSM_ERR_INVALID_ARGUMENT;
diff -Naur libstoragemgmt-1.9.1.orig/daemon/lsm_daemon.c libstoragemgmt-1.9.1/daemon/lsm_daemon.c
--- libstoragemgmt-1.9.1.orig/daemon/lsm_daemon.c 2021-04-22 14:40:32.644139192 +0800
+++ libstoragemgmt-1.9.1/daemon/lsm_daemon.c 2021-04-22 14:47:47.095249430 +0800
@@ -44,7 +44,7 @@
#include <syslog.h>
#include <unistd.h>
-#define BASE_DIR "/var/run/lsm"
+#define BASE_DIR "/run/lsm"
#define SOCKET_DIR BASE_DIR "/ipc"
#define PLUGIN_DIR "/usr/bin"
#define LSM_USER "libstoragemgmt"
diff -Naur libstoragemgmt-1.9.1.orig/packaging/daemon/libstoragemgmt.conf libstoragemgmt-1.9.1/packaging/daemon/libstoragemgmt.conf
--- libstoragemgmt-1.9.1.orig/packaging/daemon/libstoragemgmt.conf 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/packaging/daemon/libstoragemgmt.conf 2021-04-22 14:48:46.227672759 +0800
@@ -1,2 +1,2 @@
-D /var/run/lsm 0775 root libstoragemgmt -
-D /var/run/lsm/ipc 0775 root libstoragemgmt -
+D /run/lsm 0775 root libstoragemgmt -
+D /run/lsm/ipc 0775 root libstoragemgmt -
diff -Naur libstoragemgmt-1.9.1.orig/packaging/daemon/libstoragemgmtd libstoragemgmt-1.9.1/packaging/daemon/libstoragemgmtd
--- libstoragemgmt-1.9.1.orig/packaging/daemon/libstoragemgmtd 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/packaging/daemon/libstoragemgmtd 2021-04-22 14:49:33.028007801 +0800
@@ -15,7 +15,7 @@
NAME=lsmd
PROG=/usr/bin/$NAME
-PID=/var/run/lsm/lsmd.pid
+PID=/run/lsm/lsmd.pid
LOCK=/var/lock/subsys/libstoragemgmtd
RETVAL=0
@@ -27,8 +27,8 @@
fi
check_dirs() {
- test -d /var/run/lsm || mkdir -p /var/run/lsm/ipc
- test -d /var/run/lsm/ipc || mkdir -p /var/run/lsm/ipc
+ test -d /run/lsm || mkdir -p /run/lsm/ipc
+ test -d /run/lsm/ipc || mkdir -p /run/lsm/ipc
}
status_lsm() {
diff -Naur libstoragemgmt-1.9.1.orig/packaging/libstoragemgmt.spec libstoragemgmt-1.9.1/packaging/libstoragemgmt.spec
--- libstoragemgmt-1.9.1.orig/packaging/libstoragemgmt.spec 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/packaging/libstoragemgmt.spec 2021-04-22 14:56:16.814918561 +0800
@@ -265,7 +265,7 @@
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
- useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
+ useradd -r -g libstoragemgmt -d /run/lsm -s /sbin/nologin \
-c "daemon account for libstoragemgmt" libstoragemgmt
%post
diff -Naur libstoragemgmt-1.9.1.orig/packaging/libstoragemgmt.spec.in libstoragemgmt-1.9.1/packaging/libstoragemgmt.spec.in
--- libstoragemgmt-1.9.1.orig/packaging/libstoragemgmt.spec.in 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/packaging/libstoragemgmt.spec.in 2021-04-22 14:56:24.466975698 +0800
@@ -265,7 +265,7 @@
%pre
getent group libstoragemgmt >/dev/null || groupadd -r libstoragemgmt
getent passwd libstoragemgmt >/dev/null || \
- useradd -r -g libstoragemgmt -d /var/run/lsm -s /sbin/nologin \
+ useradd -r -g libstoragemgmt -d /run/lsm -s /sbin/nologin \
-c "daemon account for libstoragemgmt" libstoragemgmt
%post
diff -Naur libstoragemgmt-1.9.1.orig/python_binding/lsm/_common.py libstoragemgmt-1.9.1/python_binding/lsm/_common.py
--- libstoragemgmt-1.9.1.orig/python_binding/lsm/_common.py 2021-04-22 14:40:32.648139221 +0800
+++ libstoragemgmt-1.9.1/python_binding/lsm/_common.py 2021-04-22 14:50:10.312274721 +0800
@@ -153,7 +153,7 @@
return getattr(self.proxied_obj, _proxy_method_name)(*args, **kwargs)
# variable in client and specified on the command line for the daemon
-UDS_PATH = '/var/run/lsm/ipc'
+UDS_PATH = '/run/lsm/ipc'
# Set to True for verbose logging
LOG_VERBOSE = True