diff options
Diffstat (limited to 'meta-oe/recipes-support/multipath-tools/files')
13 files changed, 394 insertions, 329 deletions
diff --git a/meta-oe/recipes-support/multipath-tools/files/0001-add-explicit-dependency-on-libraries.patch b/meta-oe/recipes-support/multipath-tools/files/0001-add-explicit-dependency-on-libraries.patch new file mode 100644 index 0000000000..3b0a704480 --- /dev/null +++ b/meta-oe/recipes-support/multipath-tools/files/0001-add-explicit-dependency-on-libraries.patch @@ -0,0 +1,40 @@ +From ee9f7b6e764be5668bc958f8bb97a46e5056d050 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Mon, 25 May 2020 23:22:55 -0700 +Subject: [PATCH] add explicit dependency on libraries + +[snip] +gcc/i686-overc-linux/10.1.0/ld: cannot find -lmpathpersist +collect2: error: ld returned 1 exit status +Makefile:36: recipe for target 'multipathd' failed +make[1]: *** [multipathd] Error 1 +make[1]: Leaving directory 'git/multipathd' +Makefile:29: recipe for target 'multipathd' failed +make: *** [multipathd] Error 2 +ln -sf libmpathpersist.so.0 libmpathpersist.so +[snip] + +Upstream-Status: Pending + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index f195b570..2d22881c 100644 +--- a/Makefile ++++ b/Makefile +@@ -78,6 +78,7 @@ libmultipath: libmpathutil + libmpathpersist libmpathvalid multipath multipathd: libmultipath + libmultipath/prioritizers libmultipath/checkers libmultipath/foreign: libmultipath + mpathpersist multipathd: libmpathpersist ++libmultipath mpathpersist multipath multipathd: libmpathcmd + + DEPS_ON_MULTIPATH := \ + multipath \ +-- +2.38.1 + diff --git a/meta-oe/recipes-support/multipath-tools/files/0001-fix-bug-of-do_compile-and-do_install.patch b/meta-oe/recipes-support/multipath-tools/files/0001-fix-bug-of-do_compile-and-do_install.patch new file mode 100644 index 0000000000..bc07d75cc1 --- /dev/null +++ b/meta-oe/recipes-support/multipath-tools/files/0001-fix-bug-of-do_compile-and-do_install.patch @@ -0,0 +1,43 @@ +From 51f1f351262a31d94c10504e4d135526c6a7caeb Mon Sep 17 00:00:00 2001 +From: Wang Mingyu <wangmy@cn.fujitsu.com> +Date: Sun, 10 May 2020 21:22:53 +0800 +Subject: [PATCH] fix bug of do_compile and do_install + +when multiple processes make run in parallel, +because of dependency error will occur. + +Signed-off-by: Wang Mingyu <wangmy@cn.fujitsu.com> + +[OP: Rebase to 0.9.3] +[OP: Drop dependencies that are already present in the 0.9.3 Makefile] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> +--- +Upstream-Status: Pending + + Makefile | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/Makefile b/Makefile +index 27b4641f..f195b570 100644 +--- a/Makefile ++++ b/Makefile +@@ -79,6 +79,16 @@ libmpathpersist libmpathvalid multipath multipathd: libmultipath + libmultipath/prioritizers libmultipath/checkers libmultipath/foreign: libmultipath + mpathpersist multipathd: libmpathpersist + ++DEPS_ON_MULTIPATH := \ ++ multipath \ ++ multipathd \ ++ mpathpersist \ ++ libmpathpersist ++ ++$(DEPS_ON_MULTIPATH:=.install): libmultipath.install ++mpathpersist.install: libmpathpersist.install ++libdmmp.install libmultipath/foreign.install: mpathpersist.install ++ + libmultipath/checkers.install \ + libmultipath/prioritizers.install \ + libmultipath/foreign.install: libmultipath.install +-- +2.38.1 + diff --git a/meta-oe/recipes-support/multipath-tools/files/0021-RH-fixup-udev-rules-for-redhat.patch b/meta-oe/recipes-support/multipath-tools/files/0021-RH-fixup-udev-rules-for-redhat.patch index 4ef3e708da..395f9a9b03 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0021-RH-fixup-udev-rules-for-redhat.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0021-RH-fixup-udev-rules-for-redhat.patch @@ -1,4 +1,4 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From 9a941729d3c0d19d30d65e16b291c380e589eeb3 Mon Sep 17 00:00:00 2001 From: Benjamin Marzinski <bmarzins@redhat.com> Date: Thu, 13 Apr 2017 07:22:23 -0500 Subject: [PATCH] RH: fixup udev rules for redhat @@ -10,31 +10,38 @@ false warnings that gcc throws because of the changed options. Fix these too. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> + +Update patch to 0.8.0 + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- +Upstream-Status: Pending + Makefile.inc | 2 +- kpartx/kpartx.rules | 2 +- multipath/Makefile | 4 ++-- - multipath/main.c | 2 +- - 4 files changed, 5 insertions(+), 5 deletions(-) + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.inc b/Makefile.inc -index af2f5ba..0b271ea 100644 +index 4d843ce5..57779fd8 100644 --- a/Makefile.inc +++ b/Makefile.inc -@@ -51,7 +51,7 @@ endif +@@ -81,7 +81,7 @@ endif prefix = exec_prefix = $(prefix) usr_prefix = $(prefix) -bindir = $(exec_prefix)/sbin +bindir = $(exec_prefix)/usr/sbin libudevdir = $(prefix)/$(SYSTEMDPATH)/udev + tmpfilesdir = $(prefix)/$(SYSTEMDPATH)/tmpfiles.d udevrulesdir = $(libudevdir)/rules.d - multipathdir = $(TOPDIR)/libmultipath diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules -index 8f99049..8a3a171 100644 +index 1969dee0..d2b28233 100644 --- a/kpartx/kpartx.rules +++ b/kpartx/kpartx.rules -@@ -32,6 +32,6 @@ LABEL="mpath_kpartx_end" +@@ -39,6 +39,6 @@ LABEL="mpath_kpartx_end" GOTO="kpartx_end" LABEL="run_kpartx" @@ -43,40 +50,27 @@ index 8f99049..8a3a171 100644 LABEL="kpartx_end" diff --git a/multipath/Makefile b/multipath/Makefile -index 0828a8f..b9bbb3c 100644 +index 116348e2..8482de6a 100644 --- a/multipath/Makefile +++ b/multipath/Makefile -@@ -24,7 +24,7 @@ install: +@@ -23,7 +23,7 @@ install: $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ $(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/56-multipath.rules -+ $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules - $(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir) - $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir) - $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) -@@ -33,7 +33,7 @@ install: - uninstall: - $(RM) $(DESTDIR)$(bindir)/$(EXEC) +- $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/56-multipath.rules ++ $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules + $(INSTALL_PROGRAM) -d $(DESTDIR)$(modulesloaddir) + $(INSTALL_PROGRAM) -m 644 modules-load.conf $(DESTDIR)$(modulesloaddir)/multipath.conf + $(INSTALL_PROGRAM) -d $(DESTDIR)$(tmpfilesdir) +@@ -43,7 +43,7 @@ uninstall: $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules + $(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf + $(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf - $(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules + $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules - $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8.gz - $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz - -diff --git a/multipath/main.c b/multipath/main.c -index 3f0a6aa..6fdde03 100644 ---- a/multipath/main.c -+++ b/multipath/main.c -@@ -389,7 +389,7 @@ static int find_multipaths_check_timeout(const struct path *pp, long tmo, - struct timespec now, ftimes[2], tdiff; - struct stat st; - long fd; -- int r, err, retries = 0; -+ int r, err = 0, retries = 0; - - clock_gettime(CLOCK_REALTIME, &now); + $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8 + $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5 -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0022-RH-Remove-the-property-blacklist-exception-builtin.patch b/meta-oe/recipes-support/multipath-tools/files/0022-RH-Remove-the-property-blacklist-exception-builtin.patch index a5c2b5e6c8..c15444a85d 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0022-RH-Remove-the-property-blacklist-exception-builtin.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0022-RH-Remove-the-property-blacklist-exception-builtin.patch @@ -1,10 +1,7 @@ -From 1fede9514566a21cdf3da99e22ddf5a7b2c856c6 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Fri, 23 Nov 2018 16:47:31 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 - 00:00:00 2001 From: Benjamin Marzinski <bmarzins@redhat.com> Date: Wed, 2 Jul - 2014 12:49:53 -0500 Subject: [PATCH] RH: Remove the property blacklist - exception builtin +From 0000000000000000000000000000000000000000 Mon Sep 17 +00:00:00 2001 From:Benjamin Marzinski <bmarzins@redhat.com> Date: Wed, 2 Jul +2014 12:49:53 -0500 Subject: [PATCH] RH: Remove the property blacklist +exception builtin Multipath set the default property blacklist exceptions to (ID_SCSI_VPD|ID_WWN). This has the effect of blacklisting some internal @@ -18,43 +15,44 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Upsteam-Status: Pending -update this patch to new version +Update patch to 0.8.2 Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- - libmultipath/blacklist.c | 13 +++++-------- - 1 file changed, 5 insertions(+), 8 deletions(-) +Upstream-Status: Pending + + libmultipath/blacklist.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c -index 318ec03..145fed3 100644 +index 8d15d2ea..820b0d68 100644 --- a/libmultipath/blacklist.c +++ b/libmultipath/blacklist.c -@@ -192,12 +192,6 @@ setup_default_blist (struct config * conf) - char * str; +@@ -198,9 +198,6 @@ setup_default_blist (struct config * conf) + struct hwentry *hwe; int i; -- str = STRDUP("^(ram|raw|loop|fd|md|dm-|sr|scd|st|dcssblk)[0-9]"); -- if (!str) -- return 1; -- if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) +- if (store_ble(conf->blist_devnode, "!^(sd[a-z]|dasd[a-z]|nvme[0-9])", ORIGIN_DEFAULT)) - return 1; - - str = STRDUP("^(td|hd|vd)[a-z]"); - if (!str) + if (store_ble(conf->elist_property, "(SCSI_IDENT_|ID_WWN)", ORIGIN_DEFAULT)) return 1; -@@ -415,8 +409,11 @@ filter_property(struct config * conf, struct udev_device * udev) - } + +@@ -435,8 +432,11 @@ filter_property(const struct config *conf, struct udev_device *udev, + r = MATCH_NOTHING; } -- log_filter(devname, NULL, NULL, NULL, env, NULL, r); +- log_filter(devname, NULL, NULL, NULL, env, NULL, r, lvl); - return r; -+ if (VECTOR_SIZE(conf->elist_property)) { -+ log_filter(devname, NULL, NULL, NULL, env, NULL, r); -+ return r; -+ } -+ return 0; ++ if (VECTOR_SIZE(conf->elist_property)) { ++ log_filter(devname, NULL, NULL, NULL, env, NULL, r, lvl); ++ return r; ++ } ++ return 0; } static void free_ble(struct blentry *ble) -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0023-RH-don-t-start-without-a-config-file.patch b/meta-oe/recipes-support/multipath-tools/files/0023-RH-don-t-start-without-a-config-file.patch index ea6137f878..840b00093d 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0023-RH-don-t-start-without-a-config-file.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0023-RH-don-t-start-without-a-config-file.patch @@ -1,4 +1,4 @@ -From 0bf8ff8dab26201b268b419809844c07e168f17d Mon Sep 17 00:00:00 2001 +From 056fdaece0f1a3a5ca92e8c08912730faa89875d Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Fri, 23 Nov 2018 17:25:15 +0800 Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 @@ -19,30 +19,32 @@ Upstream-Status: Pending update this patch to new version Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- libmultipath/config.c | 18 ++++++++++++++++++ libmultipath/config.h | 1 + - multipath/multipath.rules | 1 + + multipath/multipath.rules.in | 1 + multipathd/multipathd.8 | 2 ++ multipathd/multipathd.service | 1 + 5 files changed, 23 insertions(+) diff --git a/libmultipath/config.c b/libmultipath/config.c -index 5af7af5..e4233f1 100644 +index 5c5c0726..31894810 100644 --- a/libmultipath/config.c +++ b/libmultipath/config.c @@ -26,6 +26,7 @@ - #include "devmapper.h" #include "mpath_cmd.h" #include "propsel.h" + #include "foreign.h" +#include "version.h" - static int - hwe_strmatch (const struct hwentry *hwe1, const struct hwentry *hwe2) -@@ -743,6 +745,23 @@ load_config (char * file) - goto out; + /* + * We don't support re-initialization after +@@ -966,6 +967,23 @@ int _init_config (const char *file, struct config *conf) } factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); + validate_pctable(conf->overrides, 0, file); + } else { + condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); + if (conf->blist_devnode == NULL) { @@ -64,21 +66,21 @@ index 5af7af5..e4233f1 100644 conf->processed_main_config = 1; diff --git a/libmultipath/config.h b/libmultipath/config.h -index 7d0cd9a..d7fb8e2 100644 +index 87947469..0dc89c16 100644 --- a/libmultipath/config.h +++ b/libmultipath/config.h -@@ -9,6 +9,7 @@ +@@ -10,6 +10,7 @@ #define ORIGIN_DEFAULT 0 #define ORIGIN_CONFIG 1 +#define ORIGIN_NO_CONFIG 2 - /* - * In kernel, fast_io_fail == 0 means immediate failure on rport delete. -diff --git a/multipath/multipath.rules b/multipath/multipath.rules -index 9df11a9..0486bf7 100644 ---- a/multipath/multipath.rules -+++ b/multipath/multipath.rules + enum devtypes { + DEV_NONE, +diff --git a/multipath/multipath.rules.in b/multipath/multipath.rules.in +index 8d3cf33a..5c4447a2 100644 +--- a/multipath/multipath.rules.in ++++ b/multipath/multipath.rules.in @@ -9,6 +9,7 @@ IMPORT{cmdline}="nompath" ENV{nompath}=="?*", GOTO="end_mpath" IMPORT{cmdline}="multipath" @@ -88,30 +90,30 @@ index 9df11a9..0486bf7 100644 ENV{DEVTYPE}!="partition", GOTO="test_dev" IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH" diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8 -index 94c3f97..ed13efd 100644 +index bdf102eb..a16a0bd5 100644 --- a/multipathd/multipathd.8 +++ b/multipathd/multipathd.8 -@@ -38,6 +38,8 @@ map regains its maximum performance and redundancy. - This daemon executes the external \fBmultipath\fR tool when events occur. - In turn, the multipath tool signals the multipathd daemon when it is done with - devmap reconfiguration, so that it can refresh its failed path list. +@@ -48,6 +48,8 @@ map regains its maximum performance and redundancy. + With the \fB-k\fR option, \fBmultipathd\fR acts as a client utility that + sends commands to a running instance of the multipathd daemon (see + \fBCOMMANDS\fR below). + +In this Linux distribution, multipathd does not run unless a /etc/multipath.conf file exists. . . .\" ---------------------------------------------------------------------------- diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service -index ba24983..17434ce 100644 +index aec62dbb..ab7585de 100644 --- a/multipathd/multipathd.service +++ b/multipathd/multipathd.service -@@ -4,6 +4,7 @@ Wants=systemd-udev-trigger.service systemd-udev-settle.service - Before=iscsi.service iscsid.service lvm2-activation-early.service - Before=local-fs-pre.target blk-availability.service - After=multipathd.socket systemd-udev-trigger.service systemd-udev-settle.service +@@ -5,6 +5,7 @@ Before=local-fs-pre.target blk-availability.service shutdown.target + Wants=systemd-udevd-kernel.socket + After=systemd-udevd-kernel.socket + After=multipathd.socket systemd-remount-fs.service +ConditionPathExists=/etc/multipath.conf + Before=initrd-cleanup.service DefaultDependencies=no Conflicts=shutdown.target - ConditionKernelCommandLine=!nompath -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0024-RH-use-rpm-optflags-if-present.patch b/meta-oe/recipes-support/multipath-tools/files/0024-RH-use-rpm-optflags-if-present.patch index 77dd96fee6..e7b3e12238 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0024-RH-use-rpm-optflags-if-present.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0024-RH-use-rpm-optflags-if-present.patch @@ -1,9 +1,13 @@ -From 436f7594485e35523269e662c4b5dc3a2c10ff9b Mon Sep 17 00:00:00 2001 +From cc38276a5d3926fd96e58366e15ba887d7d02ed0 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Mon, 26 Nov 2018 09:19:17 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 - 00:00:00 2001 From: Benjamin Marzinski <bmarzins@redhat.com> Date: Wed, 19 - Apr 2017 06:10:01 -0500 Subject: [PATCH] RH: use rpm optflags if present +Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep + +17 + 00:00:00 2001 From: Benjamin Marzinski <bmarzins@redhat.com> Date: Wed, +19 + Apr 2017 06:10:01 -0500 Subject: [PATCH] RH: use rpm optflags if +present Use the passed in optflags when compiling as an RPM, and keep the default flags as close as possible to the current fedora flags, while @@ -16,27 +20,29 @@ Upstream-Status: Pending update this patch to new version Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- - Makefile.inc | 25 ++++++++++++++++--------- - 1 file changed, 16 insertions(+), 9 deletions(-) + Makefile.inc | 28 ++++++++++++++++++---------- + 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/Makefile.inc b/Makefile.inc -index b86cba6..295afb9 100644 +index 57779fd8..34f2cc6d 100644 --- a/Makefile.inc +++ b/Makefile.inc -@@ -85,15 +85,22 @@ TEST_CC_OPTION = $(shell \ - echo "$(2)"; \ +@@ -140,20 +140,28 @@ FORTIFY_OPT := $(shell \ + echo "-D_FORTIFY_SOURCE=2"; \ fi) -STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) -ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,) +-WNOCLOBBERED := $(call TEST_CC_OPTION,-Wno-clobbered -Wno-error=clobbered,) +-WFORMATOVERFLOW := $(call TEST_CC_OPTION,-Wformat-overflow=2,) - --OPTFLAGS = -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int \ +-OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4 +-WARNFLAGS := -Werror -Wall -Wextra -Wformat=2 $(WFORMATOVERFLOW) -Werror=implicit-int \ - -Werror=implicit-function-declaration -Werror=format-security \ -- -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered \ -- -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \ -- -Wp,-D_FORTIFY_SOURCE=2 $(STACKPROT) \ -- --param=ssp-buffer-size=4 +- $(WNOCLOBBERED) -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) +ifndef RPM_OPT_FLAGS + STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) + OPTFLAGS = -O2 -g -pipe -Wall -Werror=format-security \ @@ -53,9 +59,16 @@ index b86cba6..295afb9 100644 + -Werror=implicit-function-declaration -Wno-sign-compare \ + -Wno-unused-parameter -Werror=cast-qual \ + -Werror=discarded-qualifiers - - CFLAGS := $(OPTFLAGS) -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \ - -MMD -MP $(CFLAGS) ++ + CPPFLAGS := $(FORTIFY_OPT) \ + -DBIN_DIR=\"$(bindir)\" -DMULTIPATH_DIR=\"$(plugindir)\" -DRUN_DIR=\"${RUN}\" \ + -DRUNTIME_DIR=\"$(runtimedir)\" \ + -DCONFIG_DIR=\"$(configdir)\" -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP +-CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe ++CFLAGS := --std=gnu99 $(CFLAGS) $(OPTFLAGS) -pipe + BIN_CFLAGS = -fPIE -DPIE + LIB_CFLAGS = -fPIC + SHARED_FLAGS = -shared -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0025-RH-add-mpathconf.patch b/meta-oe/recipes-support/multipath-tools/files/0025-RH-add-mpathconf.patch index a1407718d5..471ff09323 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0025-RH-add-mpathconf.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0025-RH-add-mpathconf.patch @@ -1,4 +1,4 @@ -From eb5a36e6e0caedf06008e48eb77b7bf7c6534ee5 Mon Sep 17 00:00:00 2001 +From b0b4cca566e3e0c3a232b3754555c41d4e0c1273 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Mon, 26 Nov 2018 09:55:12 +0800 Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 @@ -19,21 +19,23 @@ Upstream-Status: Pending update this patch to new version Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- libmultipath/config.c | 1 + - multipath/Makefile | 5 + - multipath/mpathconf | 464 ++++++++++++++++++++++++++++++++++++++++++++++++++ - multipath/mpathconf.8 | 101 +++++++++++ - 4 files changed, 571 insertions(+) + multipath/Makefile | 4 + + multipath/mpathconf | 464 ++++++++++++++++++++++++++++++++++++++++++ + multipath/mpathconf.8 | 101 +++++++++ + 4 files changed, 570 insertions(+) create mode 100644 multipath/mpathconf create mode 100644 multipath/mpathconf.8 diff --git a/libmultipath/config.c b/libmultipath/config.c -index e4233f1..b779505 100644 +index 31894810..af59dd3c 100644 --- a/libmultipath/config.c +++ b/libmultipath/config.c -@@ -747,6 +747,7 @@ load_config (char * file) - factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); +@@ -969,6 +969,7 @@ int _init_config (const char *file, struct config *conf) + validate_pctable(conf->overrides, 0, file); } else { condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); + condlog(0, "You can run /sbin/mpathconf to create or modify /etc/multipath.conf"); @@ -41,42 +43,39 @@ index e4233f1..b779505 100644 conf->blist_devnode = vector_alloc(); if (!conf->blist_devnode) { diff --git a/multipath/Makefile b/multipath/Makefile -index b9bbb3c..e720c7f 100644 +index 8482de6a..780b1b73 100644 --- a/multipath/Makefile +++ b/multipath/Makefile -@@ -18,10 +18,12 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so - $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS) - $(GZIP) $(EXEC).8 > $(EXEC).8.gz - $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz -+ $(GZIP) mpathconf.8 > mpathconf.8.gz - +@@ -21,6 +21,7 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so install: $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ + $(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/ $(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 -@@ -29,13 +31,16 @@ install: - $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir) + $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)$(udevrulesdir)/62-multipath.rules +@@ -32,6 +33,7 @@ install: + $(INSTALL_PROGRAM) -m 644 $(EXEC).8 $(DESTDIR)$(man8dir) $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) - $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir) -+ $(INSTALL_PROGRAM) -m 644 mpathconf.8.gz $(DESTDIR)$(man8dir) - - uninstall: - $(RM) $(DESTDIR)$(bindir)/$(EXEC) - $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules + $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5 $(DESTDIR)$(man5dir) ++ $(INSTALL_PROGRAM) -m 644 mpathconf.8 $(DESTDIR)$(man8dir) + ifneq ($(SCSI_DH_MODULES_PRELOAD),) + $(INSTALL_PROGRAM) -m 644 scsi_dh.conf $(DESTDIR)$(modulesloaddir)/scsi_dh.conf + for _x in $(SCSI_DH_MODULES_PRELOAD); do echo "$$_x"; done \ +@@ -44,8 +46,10 @@ uninstall: + $(RM) $(DESTDIR)$(modulesloaddir)/multipath.conf + $(RM) $(DESTDIR)$(modulesloaddir)/scsi_dh.conf $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules + $(RM) $(DESTDIR)$(bindir)/mpathconf - $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8.gz - $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz -+ $(RM) $(DESTDIR)$(man8dir)/mpathconf.8.gz + $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8 + $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5 ++ $(RM) $(DESTDIR)$(man8dir)/mpathconf.8 clean: dep_clean - $(RM) core *.o $(EXEC) *.gz + $(RM) core *.o $(EXEC) multipath.rules tmpfiles.conf diff --git a/multipath/mpathconf b/multipath/mpathconf new file mode 100644 -index 0000000..e839134 +index 00000000..e8391347 --- /dev/null +++ b/multipath/mpathconf @@ -0,0 +1,464 @@ @@ -546,7 +545,7 @@ index 0000000..e839134 +fi diff --git a/multipath/mpathconf.8 b/multipath/mpathconf.8 new file mode 100644 -index 0000000..4cd3267 +index 00000000..4cd32672 --- /dev/null +++ b/multipath/mpathconf.8 @@ -0,0 +1,101 @@ @@ -652,5 +651,5 @@ index 0000000..4cd3267 +.SH AUTHOR +Benjamin Marzinski <bmarzins@redhat.com> -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch b/meta-oe/recipes-support/multipath-tools/files/0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch index 912832a084..17c36e86c5 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0026-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch @@ -1,9 +1,13 @@ -From 694a2a6c7e4b523603b30a109b6efb1c30a7cec3 Mon Sep 17 00:00:00 2001 +From 262de33671ede81e424344ea9125d9e546cf8612 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> -Date: Mon, 26 Nov 2018 10:17:58 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 - 00:00:00 2001 From: Benjamin Marzinski <bmarzins@redhat.com> Date: Fri, 17 - Oct 2014 11:20:34 -0500 Subject: [PATCH] RH: add wwids from kernel cmdline +Date: Thu, 26 Sep 2019 16:29:48 +0800 +Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep + +17 + 00:00:00 2001 From: Benjamin Marzinski <bmarzins@redhat.com> Date: Fri, +17 + Oct 2014 11:20:34 -0500 Subject: [PATCH] RH: add wwids from kernel +cmdline mpath.wwids with -A This patch adds another option to multipath, "-A", which reads @@ -19,25 +23,24 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Upstream-Status: Pending -Update this patch to new version +Update this patch to new version 0.8.2 Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- - libmultipath/wwids.c | 44 +++++++++++++++++++++++++++++++++++++++++++ - libmultipath/wwids.h | 1 + - multipath/main.c | 10 ++++++++-- - multipath/multipath.8 | 3 +++ - multipathd/multipathd.service | 1 + - 5 files changed, 57 insertions(+), 2 deletions(-) + libmultipath/wwids.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ + libmultipath/wwids.h | 1 + + 2 files changed, 45 insertions(+) diff --git a/libmultipath/wwids.c b/libmultipath/wwids.c -index 53e7951..9ba9b62 100644 +index 89bb60ca..bab9aa85 100644 --- a/libmultipath/wwids.c +++ b/libmultipath/wwids.c -@@ -443,3 +443,47 @@ int op ## _wwid(const char *wwid) \ - declare_failed_wwid_op(is_failed, false) - declare_failed_wwid_op(mark_failed, true) - declare_failed_wwid_op(unmark_failed, true) +@@ -451,3 +451,47 @@ int unmark_failed_wwid(const char *wwid) + print_failed_wwid_result("unmark_failed", wwid, r); + return r; + } + +int remember_cmdline_wwid(void) +{ @@ -83,7 +86,7 @@ index 53e7951..9ba9b62 100644 + return ret; +} diff --git a/libmultipath/wwids.h b/libmultipath/wwids.h -index 0c6ee54..e32a0b0 100644 +index 0c6ee54d..e32a0b0e 100644 --- a/libmultipath/wwids.h +++ b/libmultipath/wwids.h @@ -17,6 +17,7 @@ int remember_wwid(char *wwid); @@ -94,74 +97,6 @@ index 0c6ee54..e32a0b0 100644 enum { WWID_IS_NOT_FAILED = 0, -diff --git a/multipath/main.c b/multipath/main.c -index ffa5b22..bcf8885 100644 ---- a/multipath/main.c -+++ b/multipath/main.c -@@ -120,7 +120,7 @@ usage (char * progname) - { - fprintf (stderr, VERSION_STRING); - fprintf (stderr, "Usage:\n"); -- fprintf (stderr, " %s [-a|-c|-w|-W] [-d] [-r] [-i] [-v lvl] [-p pol] [-b fil] [-q] [dev]\n", progname); -+ fprintf (stderr, " %s [-a|-A|-c|-w|-W] [-d] [-r] [-i] [-v lvl] [-p pol] [-b fil] [-q] [dev]\n", progname); - fprintf (stderr, " %s -l|-ll|-f [-v lvl] [-b fil] [-R num] [dev]\n", progname); - fprintf (stderr, " %s -F [-v lvl] [-R num]\n", progname); - fprintf (stderr, " %s [-t|-T]\n", progname); -@@ -134,6 +134,8 @@ usage (char * progname) - " -f flush a multipath device map\n" - " -F flush all multipath device maps\n" - " -a add a device wwid to the wwids file\n" -+ " -A add devices from kernel command line mpath.wwids\n" -+ " parameters to wwids file\n" - " -c check if a device should be a path in a multipath device\n" - " -C check if a multipath device has usable paths\n" - " -q allow queue_if_no_path when multipathd is not running\n" -@@ -868,7 +870,7 @@ main (int argc, char *argv[]) - exit(1); - multipath_conf = conf; - conf->retrigger_tries = 0; -- while ((arg = getopt(argc, argv, ":adcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) { -+ while ((arg = getopt(argc, argv, ":aAdcChl::FfM:v:p:b:BrR:itquUwW")) != EOF ) { - switch(arg) { - case 1: printf("optarg : %s\n",optarg); - break; -@@ -935,6 +937,10 @@ main (int argc, char *argv[]) - case 't': - r = dump_config(conf, NULL, NULL); - goto out_free_config; -+ case 'A': -+ if (remember_cmdline_wwid() != 0) -+ exit(1); -+ exit(0); - case 'T': - cmd = CMD_DUMP_CONFIG; - break; -diff --git a/multipath/multipath.8 b/multipath/multipath.8 -index 9cdd05a..1e120f3 100644 ---- a/multipath/multipath.8 -+++ b/multipath/multipath.8 -@@ -167,6 +167,9 @@ itself doesn't attempt to do I/O on the device. - Check if the device specified in the program environment should be - a path in a multipath device. - . -+.B \-A -+add wwids from any kernel command line mpath.wwid parameters to the wwids file -+. - .TP - .B \-U - Check if the device specified in the program environment is a multipath device -diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service -index 17434ce..0fbcc46 100644 ---- a/multipathd/multipathd.service -+++ b/multipathd/multipathd.service -@@ -15,6 +15,7 @@ Type=notify - NotifyAccess=main - LimitCORE=infinity - ExecStartPre=-/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath -+ExecStartPre=-/sbin/multipath -A - ExecStart=/sbin/multipathd -d -s - ExecReload=/sbin/multipathd reconfigure - TasksMax=infinity -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0027-RH-warn-on-invalid-regex-instead-of-failing.patch b/meta-oe/recipes-support/multipath-tools/files/0027-RH-warn-on-invalid-regex-instead-of-failing.patch index 57d04d02bb..22cb4beeb8 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0027-RH-warn-on-invalid-regex-instead-of-failing.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0027-RH-warn-on-invalid-regex-instead-of-failing.patch @@ -1,10 +1,7 @@ -From d16de70b76919269561b4e404825f78286ea9a40 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Mon, 26 Nov 2018 10:31:30 +0800 -Subject: [PATCH] From 0000000000000000000000000000000000000000 Mon Sep 17 - 00:00:00 2001 From: Benjamin Marzinski <bmarzins@redhat.com> Date: Mon, 6 Nov - 2017 21:39:28 -0600 Subject: [PATCH] RH: warn on invalid regex instead of - failing +From 0000000000000000000000000000000000000000 Mon Sep 17 +00:00:00 2001 From: Benjamin Marzinski <bmarzins@redhat.com> Date: Mon, 6 Nov +2017 21:39:28 -0600 Subject: [PATCH] RH: warn on invalid regex instead of +failing multipath.conf used to allow "*" as a match everything regular expression, instead of requiring ".*". Instead of erroring when the old style @@ -15,29 +12,44 @@ Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Upstream-Status: Pending -update this patch to new version +update this patch to 0.8.2 Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +[OP: adjusted FREE() -> free(), made set_regex_value() static] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- - libmultipath/dict.c | 29 ++++++++++++++++++++++------- - libmultipath/parser.c | 13 +++++++++++++ - libmultipath/parser.h | 2 +- - 3 files changed, 36 insertions(+), 8 deletions(-) + libmultipath/dict.c | 42 +++++++++++++++++++++++++++++++++++------- + 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/libmultipath/dict.c b/libmultipath/dict.c -index a81c051..0689763 100644 +index aa93fe43..55a22d32 100644 --- a/libmultipath/dict.c +++ b/libmultipath/dict.c -@@ -59,6 +59,21 @@ set_str(vector strvec, void *ptr) +@@ -155,6 +155,34 @@ set_str_noslash(vector strvec, void *ptr, const char *file, int line_nr) + return 0; } - static int -+set_regex(vector strvec, void *ptr) ++static void * ++set_regex_value(vector strvec) ++{ ++ char *buff = set_value(strvec); ++ ++ if (buff && strcmp("*", buff) == 0) { ++ condlog(0, "Invalid regular expression \"*\" in multipath.conf. Using \".*\""); ++ free(buff); ++ return strdup(".*"); ++ } ++ return buff; ++} ++ ++static int ++set_regex(vector strvec, void *ptr, const char *file, int line_nr) +{ + char **str_ptr = (char **)ptr; + + if (*str_ptr) -+ FREE(*str_ptr); ++ free(*str_ptr); + *str_ptr = set_regex_value(strvec); + + if (!*str_ptr) @@ -46,11 +58,10 @@ index a81c051..0689763 100644 + return 0; +} + -+static int - set_yes_no(vector strvec, void *ptr) + static int + set_yes_no(vector strvec, void *ptr, const char *file, int line_nr) { - char * buff; -@@ -1346,8 +1361,8 @@ ble_ ## option ## _handler (struct config *conf, vector strvec) \ +@@ -1679,8 +1707,8 @@ ble_ ## option ## _handler (struct config *conf, vector strvec, \ \ if (!conf->option) \ return 1; \ @@ -61,7 +72,7 @@ index a81c051..0689763 100644 if (!buff) \ return 1; \ \ -@@ -1363,7 +1378,7 @@ ble_ ## option ## _ ## name ## _handler (struct config *conf, vector strvec) \ +@@ -1700,7 +1728,7 @@ ble_ ## option ## _ ## name ## _handler (struct config *conf, vector strvec, \ if (!conf->option) \ return 1; \ \ @@ -70,7 +81,7 @@ index a81c051..0689763 100644 if (!buff) \ return 1; \ \ -@@ -1466,16 +1481,16 @@ device_handler(struct config *conf, vector strvec) +@@ -1806,16 +1834,16 @@ device_handler(struct config *conf, vector strvec, const char *file, return 0; } @@ -91,43 +102,6 @@ index a81c051..0689763 100644 declare_hw_snprint(bl_product, print_str) declare_hw_handler(hwhandler, set_str) -diff --git a/libmultipath/parser.c b/libmultipath/parser.c -index 92ef7cf..0e2cf49 100644 ---- a/libmultipath/parser.c -+++ b/libmultipath/parser.c -@@ -384,6 +384,19 @@ set_value(vector strvec) - return alloc; - } - -+void * -+set_regex_value(vector strvec) -+{ -+ char *buff = set_value(strvec); -+ -+ if (buff && strcmp("*", buff) == 0) { -+ condlog(0, "Invalid regular expression \"*\" in multipath.conf. Using \".*\""); -+ FREE(buff); -+ return strdup(".*"); -+ } -+ return buff; -+} -+ - /* non-recursive configuration stream handler */ - static int kw_level = 0; - -diff --git a/libmultipath/parser.h b/libmultipath/parser.h -index 62906e9..b6899fc 100644 ---- a/libmultipath/parser.h -+++ b/libmultipath/parser.h -@@ -76,7 +76,7 @@ extern int _install_keyword(vector keywords, char *string, - extern void dump_keywords(vector keydump, int level); - extern void free_keywords(vector keywords); - extern vector alloc_strvec(char *string); --extern void *set_value(vector strvec); -+extern void *set_regex_value(vector strvec); - extern int process_file(struct config *conf, char *conf_file); - extern struct keyword * find_keyword(vector keywords, vector v, char * name); - int snprint_keyword(char *buff, int len, char *fmt, struct keyword *kw, -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch b/meta-oe/recipes-support/multipath-tools/files/0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch index 4fa7960b17..952009b1d5 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0029-multipath-tools-modify-Makefile.inc-for-cross-compil.patch @@ -1,10 +1,7 @@ -From a805b601fcf4bb9e269566a8d25e48d9e60915c0 Mon Sep 17 00:00:00 2001 +From d139474f2a6d87c1cd20dfbb916fe650bfcce968 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> -Date: Mon, 26 Nov 2018 11:14:24 +0800 -Subject: [PATCH] From 8bdd4481d822b6625d8bf719431ca74ed1b5e021 Mon Sep 17 - 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Mon, 16 - Jul 2018 15:56:37 +0800 Subject: [PATCH] multipath-tools: modify Makefile.inc - for cross-compilation +Date: Tue, 4 Jun 2019 11:39:39 +0800 +Subject: [PATCH] multipath-tools: modify Makefile.inc for cross-compilation Do not look for systemd info on the host, and allow us to pass in CFLAGS using the OPTFLAGS variable. @@ -27,23 +24,30 @@ remove change about CFLAGS part, since patch 0024 already have similar function. Signed-off-by: Changqing Li <changqing.li@windriver.com> -update for version 0.7.9 +update for version 0.8.1 Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- - Makefile.inc | 6 ------ - 1 file changed, 6 deletions(-) + Makefile.inc | 11 ----------- + 1 file changed, 11 deletions(-) diff --git a/Makefile.inc b/Makefile.inc -index 295afb9..7136db3 100644 +index 34f2cc6d..ee6a4c9f 100644 --- a/Makefile.inc +++ b/Makefile.inc -@@ -38,12 +38,6 @@ ifndef RUN +@@ -42,17 +42,6 @@ ifndef RUN endif endif -ifndef SYSTEMD -- ifeq ($(shell systemctl --version > /dev/null 2>&1 && echo 1), 1) -- SYSTEMD = $(shell systemctl --version 2> /dev/null | sed -n 's/systemd \([0-9]*\)/\1/p') +- ifeq ($(shell $(PKGCONFIG) --modversion libsystemd >/dev/null 2>&1 && echo 1), 1) +- SYSTEMD = $(shell $(PKGCONFIG) --modversion libsystemd | awk '{print $$1}') +- else +- ifeq ($(shell systemctl --version >/dev/null 2>&1 && echo 1), 1) +- SYSTEMD = $(shell systemctl --version 2> /dev/null | \ +- sed -n 's/systemd \([0-9]*\).*/\1/p') +- endif - endif -endif - @@ -51,5 +55,5 @@ index 295afb9..7136db3 100644 SYSTEMDPATH=usr/lib endif -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0030-Always-use-devmapper.patch b/meta-oe/recipes-support/multipath-tools/files/0030-Always-use-devmapper.patch index 3e88b41004..c2025ed6ff 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0030-Always-use-devmapper.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0030-Always-use-devmapper.patch @@ -1,7 +1,7 @@ -From e4acb46b10484d1da6f093257e34f269832e6a37 Mon Sep 17 00:00:00 2001 +From f20d7651a62efff818ebd0d1bc920f6f362c890d Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Mon, 26 Nov 2018 11:17:41 +0800 -Subject: [PATCH] Subject: [PATCH] Always use devmapper +Subject: [PATCH] Subject: [PATCH] Always use devmapper Do not try to compute several _API_ make variables from host information when cross-compiling. @@ -21,40 +21,57 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> Rebase to 0.7.9 Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- - libmultipath/Makefile | 19 ++++--------------- - 1 file changed, 4 insertions(+), 15 deletions(-) + libmultipath/Makefile | 34 +++++++--------------------------- + 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/libmultipath/Makefile b/libmultipath/Makefile -index 33f5269..adf6f4a 100644 +index 3b60a525..72aca7ca 100644 --- a/libmultipath/Makefile +++ b/libmultipath/Makefile -@@ -20,21 +20,10 @@ ifdef SYSTEMD +@@ -22,33 +22,13 @@ ifdef SYSTEMD endif endif --ifneq ($(call check_func,dm_task_no_flush,/usr/include/libdevmapper.h),0) -- CFLAGS += -DLIBDM_API_FLUSH -D_GNU_SOURCE +-ifneq ($(call check_func,dm_task_no_flush,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) +- CPPFLAGS += -DLIBDM_API_FLUSH -endif - --ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h),0) -- CFLAGS += -DLIBDM_API_COOKIE +-ifneq ($(call check_func,dm_task_get_errno,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) +- CPPFLAGS += -DLIBDM_API_GET_ERRNO -endif - --ifneq ($(call check_func,udev_monitor_set_receive_buffer_size,/usr/include/libudev.h),0) -- CFLAGS += -DLIBUDEV_API_RECVBUF +-ifneq ($(call check_func,dm_task_set_cookie,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) +- CPPFLAGS += -DLIBDM_API_COOKIE -endif - --ifneq ($(call check_func,dm_task_deferred_remove,/usr/include/libdevmapper.h),0) -- CFLAGS += -DLIBDM_API_DEFERRED +-ifneq ($(call check_func,udev_monitor_set_receive_buffer_size,$(LIBUDEV_INCDIR)/libudev.h),0) +- CPPFLAGS += -DLIBUDEV_API_RECVBUF -endif -+CFLAGS += -DLIBDM_API_FLUSH -D_GNU_SOURCE -+CFLAGS += -DLIBDM_API_COOKIE -+CFLAGS += -DLIBUDEV_API_RECVBUF -+CFLAGS += -DLIBDM_API_DEFERRED +- +-ifneq ($(call check_func,dm_task_deferred_remove,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) +- CPPFLAGS += -DLIBDM_API_DEFERRED +-endif +- +-ifneq ($(call check_func,dm_hold_control_dev,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) +- CPPFLAGS += -DLIBDM_API_HOLD_CONTROL +-endif +- +-ifneq ($(call check_var,ELS_DTAG_LNK_INTEGRITY,$(LINUX_HEADERS_INCDIR)/scsi/fc/fc_els.h),0) +- CPPFLAGS += -DFPIN_EVENT_HANDLER +-endif ++CPPFLAGS += -DLIBDM_API_FLUSH ++CPPFLAGS += -DLIBDM_API_GET_ERRNO ++CPPFLAGS += -DLIBDM_API_COOKIE ++CPPFLAGS += -DLIBUDEV_API_RECVBUF ++CPPFLAGS += -DLIBDM_API_DEFERRED ++CPPFLAGS += -DLIBDM_API_HOLD_CONTROL ++CPPFLAGS += -DFPIN_EVENT_HANDLER - OBJS = memory.o parser.o vector.o devmapper.o callout.o \ - hwtable.o blacklist.o util.o dmparser.o config.o \ + # object files referencing MULTIPATH_DIR or CONFIG_DIR + # they need to be recompiled for unit tests -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0031-Always-use-devmapper-for-kpartx.patch b/meta-oe/recipes-support/multipath-tools/files/0031-Always-use-devmapper-for-kpartx.patch index 418c0200f4..2d043c3991 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0031-Always-use-devmapper-for-kpartx.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0031-Always-use-devmapper-for-kpartx.patch @@ -1,4 +1,4 @@ -From 1fe937835311a2d0afbc85ce4a4dbd3c9e0c912f Mon Sep 17 00:00:00 2001 +From 820d2ef3596189041da43d1139da8689336bb918 Mon Sep 17 00:00:00 2001 From: Changqing Li <changqing.li@windriver.com> Date: Mon, 26 Nov 2018 11:19:45 +0800 Subject: [PATCH] Subject: [PATCH] Always use devmapper for kpartx @@ -19,25 +19,27 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> Rebase to 0.7.9 Signed-off-by: Changqing Li <changqing.li@windriver.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> --- kpartx/Makefile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kpartx/Makefile b/kpartx/Makefile -index 7eb467e..c143321 100644 +index 742d3bcd..d886483d 100644 --- a/kpartx/Makefile +++ b/kpartx/Makefile -@@ -8,9 +8,7 @@ LDFLAGS += $(BIN_LDFLAGS) +@@ -9,9 +9,7 @@ LDFLAGS += $(BIN_LDFLAGS) LIBDEPS += -ldevmapper --ifneq ($(call check_func,dm_task_set_cookie,/usr/include/libdevmapper.h),0) -- CFLAGS += -DLIBDM_API_COOKIE +-ifneq ($(call check_func,dm_task_set_cookie,$(DEVMAPPER_INCDIR)/libdevmapper.h),0) +- CPPFLAGS += -DLIBDM_API_COOKIE -endif -+CFLAGS += -DLIBDM_API_COOKIE ++CPPFLAGS += -DLIBDM_API_COOKIE OBJS = bsd.o dos.o kpartx.o solaris.o unixware.o dasd.o sun.o \ gpt.o mac.o ps3.o crc32.o lopart.o xstrncpy.o devmapper.o -- -2.7.4 +2.38.1 diff --git a/meta-oe/recipes-support/multipath-tools/files/0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch b/meta-oe/recipes-support/multipath-tools/files/0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch new file mode 100644 index 0000000000..ec123b212b --- /dev/null +++ b/meta-oe/recipes-support/multipath-tools/files/0032-libdmmp-Makefile-replace-perl-with-sed-in-install-ta.patch @@ -0,0 +1,44 @@ +From 21a8680b7bd436867ac689a0b4b1b18a3359e208 Mon Sep 17 00:00:00 2001 +From: Geoff Parker <geoffrey.parker@arthrex.com> +Date: Fri, 9 Oct 2020 17:48:47 +0000 +Subject: [PATCH] libdmmp/Makefile: replace perl with sed in install target to + work with pseudo + +The multipath-tools libdmmp/Makefile install target uses 'perl -i' instead +of 'sed -i' for string substitutions. The perl method creates a temporary file +and overwrites the original which changes the inodes and corrupts the pseudo +db. Changes to pseduo cause a build abort rather than allow possible bad +ownership or permissions settings on the files. 'sed -i' is compatible +with pseudo. + +Signed-off-by: Geoff Parker <geoffrey.parker@arthrex.com> +[OP: Rebase to 0.9.3] +Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com> +--- +Upstream-Status: Pending + + libdmmp/Makefile | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/libdmmp/Makefile b/libdmmp/Makefile +index e4589250..34e06425 100644 +--- a/libdmmp/Makefile ++++ b/libdmmp/Makefile +@@ -39,11 +39,11 @@ install: + $(LN) $(LIBS) $(DESTDIR)$(usrlibdir)/$(DEVLIB) + $(INSTALL_PROGRAM) -m 644 -D \ + $(PKGFILE).in $(DESTDIR)$(pkgconfdir)/$(PKGFILE) +- perl -i -pe 's|__VERSION__|$(LIBDMMP_VERSION)|g' \ ++ sed -i 's|__VERSION__|$(LIBDMMP_VERSION)|g' \ + $(DESTDIR)$(pkgconfdir)/$(PKGFILE) +- perl -i -pe 's|__LIBDIR__|$(usrlibdir)|g' \ ++ sed -i 's|__LIBDIR__|$(usrlibdir)|g' \ + $(DESTDIR)$(pkgconfdir)/$(PKGFILE) +- perl -i -pe 's|__INCLUDEDIR__|$(includedir)|g' \ ++ sed -i 's|__INCLUDEDIR__|$(includedir)|g' \ + $(DESTDIR)$(pkgconfdir)/$(PKGFILE) + $(INSTALL_PROGRAM) -d 755 $(DESTDIR)$(man3dir) + $(INSTALL_PROGRAM) -m 644 -t $(DESTDIR)$(man3dir) docs/man/*.3 +-- +2.38.1 + |