Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f4ff3e79c | ||
|
|
17a4f14190 |
5 changed files with 449 additions and 3 deletions
26
0038-multipathd-Add-missing-ctype-include.patch
Normal file
26
0038-multipathd-Add-missing-ctype-include.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Bastian Germann <bage@debian.org>
|
||||
Date: Thu, 14 Oct 2021 00:34:33 +0200
|
||||
Subject: [PATCH] multipathd: Add missing ctype include
|
||||
|
||||
In uxclnt.c, there are isspace calls. Add an explicit include.
|
||||
|
||||
Signed-off-by: Bastian Germann <bage@debian.org>
|
||||
Reviewed-by: Martin Wilck <mwilck@suse.com>
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
multipathd/uxclnt.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/multipathd/uxclnt.c b/multipathd/uxclnt.c
|
||||
index a76f8e29..f16a7309 100644
|
||||
--- a/multipathd/uxclnt.c
|
||||
+++ b/multipathd/uxclnt.c
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdarg.h>
|
||||
+#include <ctype.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <sys/ioctl.h>
|
||||
103
0039-multipathd-replace-libreadline-with-libedit.patch
Normal file
103
0039-multipathd-replace-libreadline-with-libedit.patch
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Fri, 12 Aug 2022 18:58:15 +0200
|
||||
Subject: [PATCH] multipathd: replace libreadline with libedit
|
||||
|
||||
Linking multipathd with libreadline may cause a license conflict,
|
||||
because libreadline is licensed under GPL-3.0-or-later, and
|
||||
libmultipath contains several files under GPL-2.0.
|
||||
|
||||
See:
|
||||
https://github.com/opensvc/multipath-tools/issues/36
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=979095
|
||||
https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility
|
||||
|
||||
Replace the readline functionality with libedit, which comes under
|
||||
a BSD license. The readline library can still be enabled (e.g. for
|
||||
binaries not intended to be distributed) by running
|
||||
"make READLINE=libreadline".
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
Makefile.inc | 5 +++++
|
||||
multipathd/Makefile | 12 +++++++++++-
|
||||
multipathd/cli.c | 5 +++++
|
||||
multipathd/uxclnt.c | 6 ++++++
|
||||
4 files changed, 27 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.inc b/Makefile.inc
|
||||
index 5ac660de..4502e2b2 100644
|
||||
--- a/Makefile.inc
|
||||
+++ b/Makefile.inc
|
||||
@@ -14,6 +14,11 @@
|
||||
#
|
||||
# Uncomment to disable dmevents polling support
|
||||
# ENABLE_DMEVENTS_POLL = 0
|
||||
+#
|
||||
+# Readline library to use, libedit or libreadline
|
||||
+# Caution: Using libreadline may make the multipathd binary undistributable,
|
||||
+# see https://github.com/opensvc/multipath-tools/issues/36
|
||||
+READLINE = libedit
|
||||
|
||||
PKGCONFIG ?= pkg-config
|
||||
|
||||
diff --git a/multipathd/Makefile b/multipathd/Makefile
|
||||
index 393b6cbb..abd9ef6f 100644
|
||||
--- a/multipathd/Makefile
|
||||
+++ b/multipathd/Makefile
|
||||
@@ -15,7 +15,17 @@ CFLAGS += $(BIN_CFLAGS) -I$(multipathdir) -I$(mpathpersistdir) \
|
||||
LDFLAGS += $(BIN_LDFLAGS)
|
||||
LIBDEPS += -L$(multipathdir) -lmultipath -L$(mpathpersistdir) -lmpathpersist \
|
||||
-L$(mpathcmddir) -lmpathcmd -ludev -ldl -lurcu -lpthread \
|
||||
- -ldevmapper -lreadline
|
||||
+ -ldevmapper
|
||||
+
|
||||
+ifeq ($(READLINE),libedit)
|
||||
+CFLAGS += -DUSE_LIBEDIT
|
||||
+LIBDEPS += -ledit
|
||||
+endif
|
||||
+ifeq ($(READLINE),libreadline)
|
||||
+CFLAGS += -DUSE_LIBREADLINE
|
||||
+LIBDEPS += -lreadline
|
||||
+endif
|
||||
+
|
||||
CFLAGS += $(shell $(PKGCONFIG) --modversion liburcu 2>/dev/null | \
|
||||
awk -F. '{ printf("-DURCU_VERSION=0x%06x", 256 * ( 256 * $$1 + $$2) + $$3); }')
|
||||
|
||||
diff --git a/multipathd/cli.c b/multipathd/cli.c
|
||||
index 4d6c37c9..cc547e67 100644
|
||||
--- a/multipathd/cli.c
|
||||
+++ b/multipathd/cli.c
|
||||
@@ -11,7 +11,12 @@
|
||||
#include "parser.h"
|
||||
#include "util.h"
|
||||
#include "version.h"
|
||||
+#ifdef USE_LIBEDIT
|
||||
+#include <editline/readline.h>
|
||||
+#endif
|
||||
+#ifdef USE_LIBREADLINE
|
||||
#include <readline/readline.h>
|
||||
+#endif
|
||||
|
||||
#include "mpath_cmd.h"
|
||||
#include "cli.h"
|
||||
diff --git a/multipathd/uxclnt.c b/multipathd/uxclnt.c
|
||||
index f16a7309..2c17d8fc 100644
|
||||
--- a/multipathd/uxclnt.c
|
||||
+++ b/multipathd/uxclnt.c
|
||||
@@ -16,8 +16,14 @@
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <poll.h>
|
||||
+
|
||||
+#ifdef USE_LIBEDIT
|
||||
+#include <editline/readline.h>
|
||||
+#endif
|
||||
+#ifdef USE_LIBREADLINE
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
+#endif
|
||||
|
||||
#include "mpath_cmd.h"
|
||||
#include "uxsock.h"
|
||||
153
0040-multipathd-ignore-duplicated-multipathd-command-keys.patch
Normal file
153
0040-multipathd-ignore-duplicated-multipathd-command-keys.patch
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
Date: Thu, 8 Sep 2022 11:54:49 -0500
|
||||
Subject: [PATCH] multipathd: ignore duplicated multipathd command keys
|
||||
|
||||
multipath adds rather than or-s the values of command keys. Fix this.
|
||||
Also, return an invalid fingerprint if a key is used more than once.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
multipathd/cli.c | 8 ++--
|
||||
multipathd/main.c | 106 +++++++++++++++++++++++-----------------------
|
||||
2 files changed, 58 insertions(+), 56 deletions(-)
|
||||
|
||||
diff --git a/multipathd/cli.c b/multipathd/cli.c
|
||||
index cc547e67..eb2e8c1d 100644
|
||||
--- a/multipathd/cli.c
|
||||
+++ b/multipathd/cli.c
|
||||
@@ -342,9 +342,11 @@ fingerprint(vector vec)
|
||||
if (!vec)
|
||||
return 0;
|
||||
|
||||
- vector_foreach_slot(vec, kw, i)
|
||||
- fp += kw->code;
|
||||
-
|
||||
+ vector_foreach_slot(vec, kw, i) {
|
||||
+ if (fp & kw->code)
|
||||
+ return (uint64_t)-1;
|
||||
+ fp |= kw->code;
|
||||
+ }
|
||||
return fp;
|
||||
}
|
||||
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index 6145e512..2db2994b 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -1683,62 +1683,62 @@ uxlsnrloop (void * ap)
|
||||
/* Tell main thread that thread has started */
|
||||
post_config_state(DAEMON_CONFIGURE);
|
||||
|
||||
- set_handler_callback(LIST+PATHS, cli_list_paths);
|
||||
- set_handler_callback(LIST+PATHS+FMT, cli_list_paths_fmt);
|
||||
- set_handler_callback(LIST+PATHS+RAW+FMT, cli_list_paths_raw);
|
||||
- set_handler_callback(LIST+PATH, cli_list_path);
|
||||
- set_handler_callback(LIST+MAPS, cli_list_maps);
|
||||
- set_handler_callback(LIST+STATUS, cli_list_status);
|
||||
- set_unlocked_handler_callback(LIST+DAEMON, cli_list_daemon);
|
||||
- set_handler_callback(LIST+MAPS+STATUS, cli_list_maps_status);
|
||||
- set_handler_callback(LIST+MAPS+STATS, cli_list_maps_stats);
|
||||
- set_handler_callback(LIST+MAPS+FMT, cli_list_maps_fmt);
|
||||
- set_handler_callback(LIST+MAPS+RAW+FMT, cli_list_maps_raw);
|
||||
- set_handler_callback(LIST+MAPS+TOPOLOGY, cli_list_maps_topology);
|
||||
- set_handler_callback(LIST+TOPOLOGY, cli_list_maps_topology);
|
||||
- set_handler_callback(LIST+MAPS+JSON, cli_list_maps_json);
|
||||
- set_handler_callback(LIST+MAP+TOPOLOGY, cli_list_map_topology);
|
||||
- set_handler_callback(LIST+MAP+FMT, cli_list_map_fmt);
|
||||
- set_handler_callback(LIST+MAP+RAW+FMT, cli_list_map_fmt);
|
||||
- set_handler_callback(LIST+MAP+JSON, cli_list_map_json);
|
||||
- set_handler_callback(LIST+CONFIG+LOCAL, cli_list_config_local);
|
||||
- set_handler_callback(LIST+CONFIG, cli_list_config);
|
||||
- set_handler_callback(LIST+BLACKLIST, cli_list_blacklist);
|
||||
- set_handler_callback(LIST+DEVICES, cli_list_devices);
|
||||
- set_handler_callback(LIST+WILDCARDS, cli_list_wildcards);
|
||||
- set_handler_callback(RESET+MAPS+STATS, cli_reset_maps_stats);
|
||||
- set_handler_callback(RESET+MAP+STATS, cli_reset_map_stats);
|
||||
- set_handler_callback(ADD+PATH, cli_add_path);
|
||||
- set_handler_callback(DEL+PATH, cli_del_path);
|
||||
- set_handler_callback(ADD+MAP, cli_add_map);
|
||||
- set_handler_callback(DEL+MAP, cli_del_map);
|
||||
- set_handler_callback(DEL+MAPS, cli_del_maps);
|
||||
- set_handler_callback(SWITCH+MAP+GROUP, cli_switch_group);
|
||||
+ set_handler_callback(LIST|PATHS, cli_list_paths);
|
||||
+ set_handler_callback(LIST|PATHS|FMT, cli_list_paths_fmt);
|
||||
+ set_handler_callback(LIST|PATHS|RAW|FMT, cli_list_paths_raw);
|
||||
+ set_handler_callback(LIST|PATH, cli_list_path);
|
||||
+ set_handler_callback(LIST|MAPS, cli_list_maps);
|
||||
+ set_handler_callback(LIST|STATUS, cli_list_status);
|
||||
+ set_unlocked_handler_callback(LIST|DAEMON, cli_list_daemon);
|
||||
+ set_handler_callback(LIST|MAPS|STATUS, cli_list_maps_status);
|
||||
+ set_handler_callback(LIST|MAPS|STATS, cli_list_maps_stats);
|
||||
+ set_handler_callback(LIST|MAPS|FMT, cli_list_maps_fmt);
|
||||
+ set_handler_callback(LIST|MAPS|RAW|FMT, cli_list_maps_raw);
|
||||
+ set_handler_callback(LIST|MAPS|TOPOLOGY, cli_list_maps_topology);
|
||||
+ set_handler_callback(LIST|TOPOLOGY, cli_list_maps_topology);
|
||||
+ set_handler_callback(LIST|MAPS|JSON, cli_list_maps_json);
|
||||
+ set_handler_callback(LIST|MAP|TOPOLOGY, cli_list_map_topology);
|
||||
+ set_handler_callback(LIST|MAP|FMT, cli_list_map_fmt);
|
||||
+ set_handler_callback(LIST|MAP|RAW|FMT, cli_list_map_fmt);
|
||||
+ set_handler_callback(LIST|MAP|JSON, cli_list_map_json);
|
||||
+ set_handler_callback(LIST|CONFIG|LOCAL, cli_list_config_local);
|
||||
+ set_handler_callback(LIST|CONFIG, cli_list_config);
|
||||
+ set_handler_callback(LIST|BLACKLIST, cli_list_blacklist);
|
||||
+ set_handler_callback(LIST|DEVICES, cli_list_devices);
|
||||
+ set_handler_callback(LIST|WILDCARDS, cli_list_wildcards);
|
||||
+ set_handler_callback(RESET|MAPS|STATS, cli_reset_maps_stats);
|
||||
+ set_handler_callback(RESET|MAP|STATS, cli_reset_map_stats);
|
||||
+ set_handler_callback(ADD|PATH, cli_add_path);
|
||||
+ set_handler_callback(DEL|PATH, cli_del_path);
|
||||
+ set_handler_callback(ADD|MAP, cli_add_map);
|
||||
+ set_handler_callback(DEL|MAP, cli_del_map);
|
||||
+ set_handler_callback(DEL|MAPS, cli_del_maps);
|
||||
+ set_handler_callback(SWITCH|MAP|GROUP, cli_switch_group);
|
||||
set_unlocked_handler_callback(RECONFIGURE, cli_reconfigure);
|
||||
- set_handler_callback(SUSPEND+MAP, cli_suspend);
|
||||
- set_handler_callback(RESUME+MAP, cli_resume);
|
||||
- set_handler_callback(RESIZE+MAP, cli_resize);
|
||||
- set_handler_callback(RELOAD+MAP, cli_reload);
|
||||
- set_handler_callback(RESET+MAP, cli_reassign);
|
||||
- set_handler_callback(REINSTATE+PATH, cli_reinstate);
|
||||
- set_handler_callback(FAIL+PATH, cli_fail);
|
||||
- set_handler_callback(DISABLEQ+MAP, cli_disable_queueing);
|
||||
- set_handler_callback(RESTOREQ+MAP, cli_restore_queueing);
|
||||
- set_handler_callback(DISABLEQ+MAPS, cli_disable_all_queueing);
|
||||
- set_handler_callback(RESTOREQ+MAPS, cli_restore_all_queueing);
|
||||
+ set_handler_callback(SUSPEND|MAP, cli_suspend);
|
||||
+ set_handler_callback(RESUME|MAP, cli_resume);
|
||||
+ set_handler_callback(RESIZE|MAP, cli_resize);
|
||||
+ set_handler_callback(RELOAD|MAP, cli_reload);
|
||||
+ set_handler_callback(RESET|MAP, cli_reassign);
|
||||
+ set_handler_callback(REINSTATE|PATH, cli_reinstate);
|
||||
+ set_handler_callback(FAIL|PATH, cli_fail);
|
||||
+ set_handler_callback(DISABLEQ|MAP, cli_disable_queueing);
|
||||
+ set_handler_callback(RESTOREQ|MAP, cli_restore_queueing);
|
||||
+ set_handler_callback(DISABLEQ|MAPS, cli_disable_all_queueing);
|
||||
+ set_handler_callback(RESTOREQ|MAPS, cli_restore_all_queueing);
|
||||
set_unlocked_handler_callback(QUIT, cli_quit);
|
||||
set_unlocked_handler_callback(SHUTDOWN, cli_shutdown);
|
||||
- set_handler_callback(GETPRSTATUS+MAP, cli_getprstatus);
|
||||
- set_handler_callback(SETPRSTATUS+MAP, cli_setprstatus);
|
||||
- set_handler_callback(UNSETPRSTATUS+MAP, cli_unsetprstatus);
|
||||
- set_handler_callback(FORCEQ+DAEMON, cli_force_no_daemon_q);
|
||||
- set_handler_callback(RESTOREQ+DAEMON, cli_restore_no_daemon_q);
|
||||
- set_handler_callback(GETPRKEY+MAP, cli_getprkey);
|
||||
- set_handler_callback(SETPRKEY+MAP+KEY, cli_setprkey);
|
||||
- set_handler_callback(UNSETPRKEY+MAP, cli_unsetprkey);
|
||||
- set_handler_callback(SETMARGINAL+PATH, cli_set_marginal);
|
||||
- set_handler_callback(UNSETMARGINAL+PATH, cli_unset_marginal);
|
||||
- set_handler_callback(UNSETMARGINAL+MAP, cli_unset_all_marginal);
|
||||
+ set_handler_callback(GETPRSTATUS|MAP, cli_getprstatus);
|
||||
+ set_handler_callback(SETPRSTATUS|MAP, cli_setprstatus);
|
||||
+ set_handler_callback(UNSETPRSTATUS|MAP, cli_unsetprstatus);
|
||||
+ set_handler_callback(FORCEQ|DAEMON, cli_force_no_daemon_q);
|
||||
+ set_handler_callback(RESTOREQ|DAEMON, cli_restore_no_daemon_q);
|
||||
+ set_handler_callback(GETPRKEY|MAP, cli_getprkey);
|
||||
+ set_handler_callback(SETPRKEY|MAP|KEY, cli_setprkey);
|
||||
+ set_handler_callback(UNSETPRKEY|MAP, cli_unsetprkey);
|
||||
+ set_handler_callback(SETMARGINAL|PATH, cli_set_marginal);
|
||||
+ set_handler_callback(UNSETMARGINAL|PATH, cli_unset_marginal);
|
||||
+ set_handler_callback(UNSETMARGINAL|MAP, cli_unset_all_marginal);
|
||||
|
||||
umask(077);
|
||||
uxsock_listen(&uxsock_trigger, ux_sock, ap);
|
||||
141
0041-multipath-tools-use-run-instead-of-dev-shm.patch
Normal file
141
0041-multipath-tools-use-run-instead-of-dev-shm.patch
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Wilck <mwilck@suse.com>
|
||||
Date: Thu, 1 Sep 2022 19:21:30 +0200
|
||||
Subject: [PATCH] multipath-tools: use /run instead of /dev/shm
|
||||
|
||||
/dev/shm may have unsafe permissions. Use /run instead.
|
||||
Use systemd's tmpfiles.d mechanism to create /run/multipath
|
||||
early during boot.
|
||||
|
||||
For backward compatibilty, make the runtime directory configurable
|
||||
via the "runtimedir" make variable.
|
||||
|
||||
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
.gitignore | 2 ++
|
||||
Makefile.inc | 4 +++-
|
||||
libmultipath/defaults.h | 2 +-
|
||||
multipath/Makefile | 9 +++++++--
|
||||
multipath/{multipath.rules => multipath.rules.in} | 4 ++--
|
||||
multipath/tmpfiles.conf.in | 1 +
|
||||
6 files changed, 16 insertions(+), 6 deletions(-)
|
||||
rename multipath/{multipath.rules => multipath.rules.in} (95%)
|
||||
create mode 100644 multipath/tmpfiles.conf.in
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 087dffc2..6ee4fa09 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -11,6 +11,8 @@ cscope.files
|
||||
cscope.out
|
||||
kpartx/kpartx
|
||||
multipath/multipath
|
||||
+multipath/multipath.rules
|
||||
+multipath/tmpfiles.conf
|
||||
multipathd/multipathd
|
||||
mpathpersist/mpathpersist
|
||||
.nfs*
|
||||
diff --git a/Makefile.inc b/Makefile.inc
|
||||
index 4502e2b2..b2d082f2 100644
|
||||
--- a/Makefile.inc
|
||||
+++ b/Makefile.inc
|
||||
@@ -62,6 +62,7 @@ exec_prefix = $(prefix)
|
||||
usr_prefix = $(prefix)
|
||||
bindir = $(exec_prefix)/usr/sbin
|
||||
libudevdir = $(prefix)/$(SYSTEMDPATH)/udev
|
||||
+tmpfilesdir = $(prefix)/$(SYSTEMDPATH)/tmpfiles.d
|
||||
udevrulesdir = $(libudevdir)/rules.d
|
||||
multipathdir = $(TOPDIR)/libmultipath
|
||||
man8dir = $(prefix)/usr/share/man/man8
|
||||
@@ -79,6 +80,7 @@ libdmmpdir = $(TOPDIR)/libdmmp
|
||||
nvmedir = $(TOPDIR)/libmultipath/nvme
|
||||
includedir = $(prefix)/usr/include
|
||||
pkgconfdir = $(usrlibdir)/pkgconfig
|
||||
+runtimedir = /$(RUN)
|
||||
|
||||
GZIP = gzip -9 -c
|
||||
RM = rm -f
|
||||
@@ -120,7 +122,7 @@ WARNFLAGS := -Werror -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int
|
||||
$(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \
|
||||
-Wstrict-prototypes
|
||||
CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \
|
||||
- -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
|
||||
+ -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" -DRUNTIME_DIR=\"$(runtimedir)\" \
|
||||
-MMD -MP
|
||||
BIN_CFLAGS = -fPIE -DPIE
|
||||
LIB_CFLAGS = -fPIC
|
||||
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
|
||||
index e0dd32ad..cec82f07 100644
|
||||
--- a/libmultipath/defaults.h
|
||||
+++ b/libmultipath/defaults.h
|
||||
@@ -69,7 +69,7 @@
|
||||
#define DEFAULT_WWIDS_FILE "/etc/multipath/wwids"
|
||||
#define DEFAULT_PRKEYS_FILE "/etc/multipath/prkeys"
|
||||
#define DEFAULT_CONFIG_DIR "/etc/multipath/conf.d"
|
||||
-#define MULTIPATH_SHM_BASE "/dev/shm/multipath/"
|
||||
+#define MULTIPATH_SHM_BASE RUNTIME_DIR "/multipath/"
|
||||
|
||||
|
||||
static inline char *set_default(char *str)
|
||||
diff --git a/multipath/Makefile b/multipath/Makefile
|
||||
index e720c7f6..f3d98012 100644
|
||||
--- a/multipath/Makefile
|
||||
+++ b/multipath/Makefile
|
||||
@@ -12,7 +12,7 @@ EXEC = multipath
|
||||
|
||||
OBJS = main.o
|
||||
|
||||
-all: $(EXEC)
|
||||
+all: $(EXEC) multipath.rules tmpfiles.conf
|
||||
|
||||
$(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so
|
||||
$(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS)
|
||||
@@ -27,6 +27,8 @@ install:
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir)
|
||||
$(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir)
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules
|
||||
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(tmpfilesdir)
|
||||
+ $(INSTALL_PROGRAM) -m 644 tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/multipath.conf
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir)
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir)
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
|
||||
@@ -43,9 +45,12 @@ uninstall:
|
||||
$(RM) $(DESTDIR)$(man8dir)/mpathconf.8.gz
|
||||
|
||||
clean: dep_clean
|
||||
- $(RM) core *.o $(EXEC) *.gz
|
||||
+ $(RM) core *.o $(EXEC) *.gz multipath.rules tmpfiles.conf
|
||||
|
||||
include $(wildcard $(OBJS:.o=.d))
|
||||
|
||||
dep_clean:
|
||||
$(RM) $(OBJS:.o=.d)
|
||||
+
|
||||
+%: %.in
|
||||
+ sed 's,@RUNTIME_DIR@,$(runtimedir),' $< >$@
|
||||
diff --git a/multipath/multipath.rules b/multipath/multipath.rules.in
|
||||
similarity index 95%
|
||||
rename from multipath/multipath.rules
|
||||
rename to multipath/multipath.rules.in
|
||||
index 0486bf70..5fb499e6 100644
|
||||
--- a/multipath/multipath.rules
|
||||
+++ b/multipath/multipath.rules.in
|
||||
@@ -1,8 +1,8 @@
|
||||
# Set DM_MULTIPATH_DEVICE_PATH if the device should be handled by multipath
|
||||
SUBSYSTEM!="block", GOTO="end_mpath"
|
||||
KERNEL!="sd*|dasd*|nvme*", GOTO="end_mpath"
|
||||
-ACTION=="remove", TEST=="/dev/shm/multipath/find_multipaths/$major:$minor", \
|
||||
- RUN+="/usr/bin/rm -f /dev/shm/multipath/find_multipaths/$major:$minor"
|
||||
+ACTION=="remove", TEST=="@RUNTIME_DIR@/multipath/find_multipaths/$major:$minor", \
|
||||
+ RUN+="/usr/bin/rm -f @RUNTIME_DIR@/multipath/find_multipaths/$major:$minor"
|
||||
ACTION!="add|change", GOTO="end_mpath"
|
||||
|
||||
IMPORT{cmdline}="nompath"
|
||||
diff --git a/multipath/tmpfiles.conf.in b/multipath/tmpfiles.conf.in
|
||||
new file mode 100644
|
||||
index 00000000..21be438a
|
||||
--- /dev/null
|
||||
+++ b/multipath/tmpfiles.conf.in
|
||||
@@ -0,0 +1 @@
|
||||
+d @RUNTIME_DIR@/multipath 0700 root root -
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Name: device-mapper-multipath
|
||||
Version: 0.8.7
|
||||
Release: 8%{?dist}
|
||||
Release: 9%{?dist}
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
License: GPLv2
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
|
|
@ -47,12 +47,17 @@ Patch0034: 0034-RH-make-parse_vpd_pg83-match-scsi_id-output.patch
|
|||
Patch0035: 0035-libmultipath-use-asprintf-to-allocate-prefixed_uuid.patch
|
||||
Patch0036: 0036-RH-add-support-to-mpathconf-for-setting-arbitrary-de.patch
|
||||
Patch0037: 0037-RH-add-support-to-mpathconf-for-setting-recheck_wwid.patch
|
||||
Patch0038: 0038-multipathd-Add-missing-ctype-include.patch
|
||||
Patch0039: 0039-multipathd-replace-libreadline-with-libedit.patch
|
||||
Patch0040: 0040-multipathd-ignore-duplicated-multipathd-command-keys.patch
|
||||
Patch0041: 0041-multipath-tools-use-run-instead-of-dev-shm.patch
|
||||
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: kpartx = %{version}-%{release}
|
||||
Requires: device-mapper >= 1.02.96
|
||||
Requires: userspace-rcu
|
||||
Requires: libedit
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
|
|
@ -70,7 +75,7 @@ Conflicts: udisks2 < 2.8.0-2
|
|||
# build/setup
|
||||
BuildRequires: libaio-devel, device-mapper-devel >= 1.02.89
|
||||
BuildRequires: libselinux-devel, libsepol-devel
|
||||
BuildRequires: readline-devel, ncurses-devel
|
||||
BuildRequires: libedit-devel, ncurses-devel
|
||||
BuildRequires: systemd-units, systemd-devel
|
||||
BuildRequires: json-c-devel, perl-interpreter, pkgconfig, gcc
|
||||
BuildRequires: userspace-rcu-devel
|
||||
|
|
@ -149,7 +154,8 @@ cp %{SOURCE1} .
|
|||
rcdir=%{_initrddir} \
|
||||
unitdir=%{_unitdir} \
|
||||
includedir=%{_includedir} \
|
||||
pkgconfdir=%{_pkgconfdir}
|
||||
pkgconfdir=%{_pkgconfdir} \
|
||||
tmpfilesdir=%{_tmpfilesdir}
|
||||
|
||||
# tree fix up
|
||||
install -d %{buildroot}/etc/multipath
|
||||
|
|
@ -188,6 +194,7 @@ fi
|
|||
%{_mandir}/man8/mpathpersist.8.gz
|
||||
%config /usr/lib/udev/rules.d/62-multipath.rules
|
||||
%config /usr/lib/udev/rules.d/11-dm-mpath.rules
|
||||
%{_tmpfilesdir}/multipath.conf
|
||||
%doc README.md
|
||||
%doc README.alua
|
||||
%doc multipath.conf
|
||||
|
|
@ -244,6 +251,22 @@ fi
|
|||
%{_pkgconfdir}/libdmmp.pc
|
||||
|
||||
%changelog
|
||||
* Wed Oct 26 2022 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-9
|
||||
- Add 0040-multipathd-ignore-duplicated-multipathd-command-keys.patch
|
||||
* Fixes bz #2137414
|
||||
- Add 0041-multipath-tools-use-run-instead-of-dev-shm.patch
|
||||
* Fixes bz #2137416
|
||||
- Resolves: bz #2137414, #2137416
|
||||
|
||||
* Tue Aug 23 2022 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-8.1
|
||||
- Add 0038-multipathd-Add-missing-ctype-include.patch
|
||||
- Add 0039-multipathd-replace-libreadline-with-libedit.patch
|
||||
* replace readline with libedit, to avoid license conflicts. readline
|
||||
is licensed GPL v3, and multipathd includes code licensed gpl v2
|
||||
only.
|
||||
- Require libedit instead of readline
|
||||
|
||||
|
||||
* Mon Feb 7 2022 Benjamin Marzinski <bmarzins@redhat.com> - 0.8.7-8
|
||||
- Add 0036-RH-add-support-to-mpathconf-for-setting-arbitrary-de.patch
|
||||
* add the ability for mpathconf to set arbitray options with --option
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue