From 658639ca5b6c4875402b3141473a19557899bc0c Mon Sep 17 00:00:00 2001 From: Liu Yiding Date: Tue, 9 Dec 2025 15:02:15 +0800 Subject: multipath-tools: upgrade 0.11.3 -> 0.12.1 Update 0004-RH-use-rpm-optflags-if-present.patch for 0.12.1. Signed-off-by: Liu Yiding Signed-off-by: Khem Raj --- .../0004-RH-use-rpm-optflags-if-present.patch | 24 ++-- .../multipath-tools/multipath-tools_0.11.3.bb | 126 --------------------- .../multipath-tools/multipath-tools_0.12.1.bb | 126 +++++++++++++++++++++ 3 files changed, 141 insertions(+), 135 deletions(-) delete mode 100644 meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.3.bb create mode 100644 meta-oe/recipes-support/multipath-tools/multipath-tools_0.12.1.bb diff --git a/meta-oe/recipes-support/multipath-tools/files/0004-RH-use-rpm-optflags-if-present.patch b/meta-oe/recipes-support/multipath-tools/files/0004-RH-use-rpm-optflags-if-present.patch index 5f65ceaa29..8fad8d5645 100644 --- a/meta-oe/recipes-support/multipath-tools/files/0004-RH-use-rpm-optflags-if-present.patch +++ b/meta-oe/recipes-support/multipath-tools/files/0004-RH-use-rpm-optflags-if-present.patch @@ -19,23 +19,26 @@ Signed-off-by: Changqing Li Rebase to 0.10.0 Signed-off-by: Yi Zhao + +Rebase to 0.12.1 +Signed-off-by: Liu Yiding --- Makefile.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile.inc b/Makefile.inc -index 596e68c0..42766867 100644 +index d04a3175..eb339251 100644 --- a/Makefile.inc +++ b/Makefile.inc -@@ -99,7 +99,15 @@ SYSTEMD_LIBDEPS := $(if $(SYSTEMD),$(if $(shell test $(SYSTEMD) -gt 209 && echo +@@ -102,7 +102,15 @@ SYSTEMD_LIBDEPS := $(if $(SYSTEMD),$(if $(shell test $(SYSTEMD) -gt 209 && echo MODPROBE_UNIT := $(shell test "0$(SYSTEMD)" -lt 245 2>/dev/null || \ echo "modprobe@dm_multipath.service") -OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4 +ifndef RPM_OPT_FLAGS -+ OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4 ++ OPTFLAGS := -O2 -g $(STACKPROT) --param=ssp-buffer-size=4 +else -+ OPTFLAGS = $(RPM_OPT_FLAGS) ++ OPTFLAGS = $(RPM_OPT_FLAGS) +endif +OPTFLAGS += -Wextra -Wstrict-prototypes -Wformat=0 -Werror=implicit-int \ + -Werror=implicit-function-declaration -Wno-sign-compare \ @@ -44,12 +47,15 @@ index 596e68c0..42766867 100644 # Set WARN_ONLY=1 to avoid compilation erroring out due to warnings. Useful during development. WARN_ONLY := -@@ -115,7 +123,7 @@ CPPFLAGS := $(FORTIFY_OPT) $(CPPFLAGS) $(D_URCU_VERSION) \ - -DRUNTIME_DIR=\"$(runtimedir)\" -DCONFIG_DIR=\"$(TGTDIR)$(configdir)\" \ - -DDEFAULT_CONFIGFILE=\"$(TGTDIR)$(configfile)\" -DSTATE_DIR=\"$(TGTDIR)$(statedir)\" \ - -DEXTRAVERSION=\"$(EXTRAVERSION)\" -MMD -MP +@@ -121,7 +129,7 @@ CPPFLAGS := $(FORTIFY_OPT) $(CPPFLAGS) $(D_URCU_VERSION) \ + -DABSTRACT_SOCKET=\"$(abstract_socket)\" -DPATHNAME_SOCKET=\"$(pathname_socket)\" \ + -DWSTRINGOP_TRUNCATION=$(if $(WSTRINGOP_TRUNCATION),1,0) \ + -MMD -MP -CFLAGS := -std=$(C_STD) $(CFLAGS) $(OPTFLAGS) $(WARNFLAGS) -pipe \ -+CFLAGS := -std=$(C_STD) $(CFLAGS) $(OPTFLAGS) -pipe \ ++CFLAGS := -std=$(C_STD) $(CFLAGS) $(OPTFLAGS) -pipe \ -fexceptions BIN_CFLAGS := -fPIE -DPIE LIB_CFLAGS := -fPIC +-- +2.43.0 + diff --git a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.3.bb b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.3.bb deleted file mode 100644 index 8e26d4c2a8..0000000000 --- a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.11.3.bb +++ /dev/null @@ -1,126 +0,0 @@ -SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver" - -DESCRIPTION = "It provides tools to manage multipath devices \ -by instructing the device-mapper kernel module what to do. These \ -tools include: \ -1. multipath - Scan the system for multipath devices and assemble them.\ -2. multipathd - Detects when paths fail and execs multipath to update \ -things.\ -3. mpathpersist - Persistent reservation management feature allows \ -cluster management software to manage persistent reservation through \ -mpath device. It processes management requests from callers and hides \ -the management task details. It also handles persistent reservation \ -management of data path life cycle and state changes.\ -4. kpartx - This tool, derived from util-linux's partx, reads partition \ -tables on specified device and create device maps over partitions \ -segments detected. It is called from hotplug upon device maps creation \ -and deletion" - -HOMEPAGE = "http://christophe.varoqui.free.fr/" - -DEPENDS = "libdevmapper \ - lvm2 \ - libaio \ - liburcu \ - readline \ - udev \ - json-c \ - " - -LICENSE = "GPL-2.0-only" - -SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=https;branch=stable-0.11.y \ - file://multipathd.oe \ - file://multipath.conf.example \ - file://0001-RH-fixup-udev-rules-for-redhat.patch \ - file://0002-RH-Remove-the-property-blacklist-exception-builtin.patch \ - file://0003-RH-don-t-start-without-a-config-file.patch \ - file://0004-RH-use-rpm-optflags-if-present.patch \ - file://0005-RH-add-mpathconf.patch \ - file://0006-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \ - file://0007-RH-warn-on-invalid-regex-instead-of-failing.patch \ - file://0008-RH-reset-default-find_mutipaths-value-to-off.patch \ - file://0009-multipath-tools-modify-create-config.mk-for-cross-co.patch \ - file://0010-Always-use-devmapper.patch \ - file://0011-fix-bug-of-do_compile-and-do_install.patch \ - file://0012-add-explicit-dependency-on-libraries.patch \ - file://0013-libdmmp-Makefile-Add-target-docs-man-dmmp_strerror.3.patch \ - " - -LIC_FILES_CHKSUM = "file://COPYING;md5=9ec28527f3d544b51ceb0e1907d0bf3f" - -SRCREV = "7a84cc602ea0884ae0c767e6c89592059012db04" - - -inherit systemd pkgconfig - -SYSTEMD_SERVICE:${PN} = "multipathd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -TARGET_CC_ARCH += "${LDFLAGS}" - -# multipath-tools includes a copy of the valgrind.h header -# file and uses the macros to suppress some false positives. However, -# that only works on ARM when thumb is disabled. Otherwise one gets: -# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3' -# ../Makefile.inc:66: recipe for target 'debug.o' failed -ARM_INSTRUCTION_SET:armv4 = "arm" -ARM_INSTRUCTION_SET:armv5 = "arm" - -# The exact version of SYSTEMD does not matter but should be greater than 209. -# -EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \ - OPTFLAGS="${CFLAGS}" \ - prefix=${prefix} \ - etc_prefix=${sysconfdir} \ - bindir=${base_sbindir} \ - LIB=${base_libdir} libdir=${base_libdir}/multipath \ - usrlibdir=${libdir} \ - plugindir=${base_libdir}/multipath \ - unitdir=${systemd_system_unitdir} \ - libudevdir=${nonarch_base_libdir}/udev \ - modulesloaddir=${sysconfdir}/modules-load.d \ - tmpfilesdir=${sysconfdir}/tmpfiles.d \ - ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ - KBUILD_BUILD_TIMESTAMP="$(date -u -d "@$SOURCE_DATE_EPOCH" +"%Y-%m-%d %H:%M:%S +0000")" \ - ' - -do_install() { - oe_runmake install - - # We copy an initscript, but do not start multipathd at init time. - # - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then - install -d ${D}${sysconfdir}/init.d - cp ${UNPACKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd - fi - - sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \ - ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules - - install -d ${D}${sysconfdir} - install -m 0644 ${UNPACKDIR}/multipath.conf.example \ - ${D}${sysconfdir}/multipath.conf.example -} - -FILES:${PN} += "${systemd_system_unitdir}" -FILES:${PN}-dbg += "${base_libdir}/multipath/.debug" - -PACKAGES =+ "${PN}-libs" -FILES:${PN}-libs = "${base_libdir}/lib*.so.* \ - ${base_libdir}/multipath/lib*.so*" -RDEPENDS:${PN} += "${PN}-libs bash libgcc" - -PROVIDES += "device-mapper-multipath" -RPROVIDES:${PN} += "device-mapper-multipath" -RPROVIDES:${PN}-libs += "device-mapper-multipath-libs" - -FILES:${PN}-dev += "${base_libdir}/pkgconfig" - -PACKAGES =+ "kpartx" -FILES:kpartx = "${base_sbindir}/kpartx \ - ${nonarch_base_libdir}/udev/kpartx_id \ - " - -RDEPENDS:${PN} += "kpartx" -PARALLEL_MAKE = "" diff --git a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.12.1.bb b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.12.1.bb new file mode 100644 index 0000000000..20d9b6a1b5 --- /dev/null +++ b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.12.1.bb @@ -0,0 +1,126 @@ +SUMMARY = "The upstream project used to drive the Device Mapper multipathing driver" + +DESCRIPTION = "It provides tools to manage multipath devices \ +by instructing the device-mapper kernel module what to do. These \ +tools include: \ +1. multipath - Scan the system for multipath devices and assemble them.\ +2. multipathd - Detects when paths fail and execs multipath to update \ +things.\ +3. mpathpersist - Persistent reservation management feature allows \ +cluster management software to manage persistent reservation through \ +mpath device. It processes management requests from callers and hides \ +the management task details. It also handles persistent reservation \ +management of data path life cycle and state changes.\ +4. kpartx - This tool, derived from util-linux's partx, reads partition \ +tables on specified device and create device maps over partitions \ +segments detected. It is called from hotplug upon device maps creation \ +and deletion" + +HOMEPAGE = "http://christophe.varoqui.free.fr/" + +DEPENDS = "libdevmapper \ + lvm2 \ + libaio \ + liburcu \ + readline \ + udev \ + json-c \ + " + +LICENSE = "GPL-2.0-only" + +SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=https;branch=stable-0.12.y \ + file://multipathd.oe \ + file://multipath.conf.example \ + file://0001-RH-fixup-udev-rules-for-redhat.patch \ + file://0002-RH-Remove-the-property-blacklist-exception-builtin.patch \ + file://0003-RH-don-t-start-without-a-config-file.patch \ + file://0004-RH-use-rpm-optflags-if-present.patch \ + file://0005-RH-add-mpathconf.patch \ + file://0006-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch \ + file://0007-RH-warn-on-invalid-regex-instead-of-failing.patch \ + file://0008-RH-reset-default-find_mutipaths-value-to-off.patch \ + file://0009-multipath-tools-modify-create-config.mk-for-cross-co.patch \ + file://0010-Always-use-devmapper.patch \ + file://0011-fix-bug-of-do_compile-and-do_install.patch \ + file://0012-add-explicit-dependency-on-libraries.patch \ + file://0013-libdmmp-Makefile-Add-target-docs-man-dmmp_strerror.3.patch \ + " + +LIC_FILES_CHKSUM = "file://COPYING;md5=9ec28527f3d544b51ceb0e1907d0bf3f" + +SRCREV = "a1f7f3d5b4972c39e8950c722a04c21a9e030a31" + + +inherit systemd pkgconfig + +SYSTEMD_SERVICE:${PN} = "multipathd.service" +SYSTEMD_AUTO_ENABLE = "disable" + +TARGET_CC_ARCH += "${LDFLAGS}" + +# multipath-tools includes a copy of the valgrind.h header +# file and uses the macros to suppress some false positives. However, +# that only works on ARM when thumb is disabled. Otherwise one gets: +# Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r12,r12,ror#3' +# ../Makefile.inc:66: recipe for target 'debug.o' failed +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" + +# The exact version of SYSTEMD does not matter but should be greater than 209. +# +EXTRA_OEMAKE = 'MULTIPATH_VERSION=${PV} DESTDIR=${D} syslibdir=${base_libdir} \ + OPTFLAGS="${CFLAGS}" \ + prefix=${prefix} \ + etc_prefix=${sysconfdir} \ + bindir=${base_sbindir} \ + LIB=${base_libdir} libdir=${base_libdir}/multipath \ + usrlibdir=${libdir} \ + plugindir=${base_libdir}/multipath \ + unitdir=${systemd_system_unitdir} \ + libudevdir=${nonarch_base_libdir}/udev \ + modulesloaddir=${sysconfdir}/modules-load.d \ + tmpfilesdir=${sysconfdir}/tmpfiles.d \ + ${@bb.utils.contains("DISTRO_FEATURES", "systemd", "SYSTEMD=216", "", d)} \ + KBUILD_BUILD_TIMESTAMP="$(date -u -d "@$SOURCE_DATE_EPOCH" +"%Y-%m-%d %H:%M:%S +0000")" \ + ' + +do_install() { + oe_runmake install + + # We copy an initscript, but do not start multipathd at init time. + # + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)};then + install -d ${D}${sysconfdir}/init.d + cp ${UNPACKDIR}/multipathd.oe ${D}${sysconfdir}/init.d/multipathd + fi + + sed -i "s:/usr/lib/udev/kpartx_id:${nonarch_base_libdir}/udev/kpartx_id:g" \ + ${D}${nonarch_base_libdir}/udev/rules.d/11-dm-mpath.rules + + install -d ${D}${sysconfdir} + install -m 0644 ${UNPACKDIR}/multipath.conf.example \ + ${D}${sysconfdir}/multipath.conf.example +} + +FILES:${PN} += "${systemd_system_unitdir}" +FILES:${PN}-dbg += "${base_libdir}/multipath/.debug" + +PACKAGES =+ "${PN}-libs" +FILES:${PN}-libs = "${base_libdir}/lib*.so.* \ + ${base_libdir}/multipath/lib*.so*" +RDEPENDS:${PN} += "${PN}-libs bash libgcc" + +PROVIDES += "device-mapper-multipath" +RPROVIDES:${PN} += "device-mapper-multipath" +RPROVIDES:${PN}-libs += "device-mapper-multipath-libs" + +FILES:${PN}-dev += "${base_libdir}/pkgconfig" + +PACKAGES =+ "kpartx" +FILES:kpartx = "${base_sbindir}/kpartx \ + ${nonarch_base_libdir}/udev/kpartx_id \ + " + +RDEPENDS:${PN} += "kpartx" +PARALLEL_MAKE = "" -- cgit v1.2.3-54-g00ecf