diff --git a/0027-11-dm-mpath.rules-fix-warnings-reported-by-udevadm-v.patch b/0027-11-dm-mpath.rules-fix-warnings-reported-by-udevadm-v.patch new file mode 100644 index 0000000000000000000000000000000000000000..e795c14e0e50dea2600829dde95157d693e333a9 --- /dev/null +++ b/0027-11-dm-mpath.rules-fix-warnings-reported-by-udevadm-v.patch @@ -0,0 +1,59 @@ +From 787b6d3c44180ee5dee3336685ffdfe97317d933 Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Sat, 20 May 2023 01:33:56 +0300 +Subject: [PATCH] 11-dm-mpath.rules: fix warnings reported by udevadm verify + +Fix warnings reported by udevadm verify: + +multipath/11-dm-mpath.rules:18 Whitespace after comma is expected. +... +multipath/11-dm-mpath.rules: udev rules check failed + +Note (mwilck): technically, the syntax of the udev rules was correct; +they are parsed and executed by udev correctly, and this is unlikely +to change. But systemd has enabled stricter checks in "udevadm verify" +to ensure better readability of udev rules files +(https://github.com/systemd/systemd/pull/26980). This commit +makes sure the multipath-tools rules comply with these checks. + +Signed-off-by: Dmitry V. Levin +Reviewed-by: Martin Wilck +--- + multipath/11-dm-mpath.rules | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/multipath/11-dm-mpath.rules b/multipath/11-dm-mpath.rules +index d191ae8d..c339f521 100644 +--- a/multipath/11-dm-mpath.rules ++++ b/multipath/11-dm-mpath.rules +@@ -14,7 +14,7 @@ ENV{.MPATH_DEVICE_READY_OLD}="$env{MPATH_DEVICE_READY}" + # multipath sets DM_SUBSYSTEM_UDEV_FLAG2 when it reloads a + # table with no active devices. If this happens, mark the + # device not ready +-ENV{DM_SUBSYSTEM_UDEV_FLAG2}=="1", ENV{MPATH_DEVICE_READY}="0",\ ++ENV{DM_SUBSYSTEM_UDEV_FLAG2}=="1", ENV{MPATH_DEVICE_READY}="0", \ + GOTO="mpath_action" + + # If the last path has failed mark the device not ready +@@ -68,13 +68,13 @@ ENV{MPATH_DEVICE_READY}=="0", ENV{DM_NOSCAN}="1" + # Also skip all foreign rules if no path is available. + # Remember the original value of DM_DISABLE_OTHER_RULES_FLAG + # and restore it back once we have at least one path available. +-ENV{MPATH_DEVICE_READY}=="0", ENV{.MPATH_DEVICE_READY_OLD}=="1",\ +- ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}=="",\ ++ENV{MPATH_DEVICE_READY}=="0", ENV{.MPATH_DEVICE_READY_OLD}=="1", \ ++ ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}=="", \ + ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="$env{DM_UDEV_DISABLE_OTHER_RULES_FLAG}" + ENV{MPATH_DEVICE_READY}=="0", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="1" +-ENV{MPATH_DEVICE_READY}!="0", ENV{.MPATH_DEVICE_READY_OLD}=="0",\ +- ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="$env{DM_DISABLE_OTHER_RULES_FLAG_OLD}",\ +- ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="",\ ++ENV{MPATH_DEVICE_READY}!="0", ENV{.MPATH_DEVICE_READY_OLD}=="0", \ ++ ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}="$env{DM_DISABLE_OTHER_RULES_FLAG_OLD}", \ ++ ENV{DM_DISABLE_OTHER_RULES_FLAG_OLD}="", \ + ENV{DM_ACTIVATION}="1", ENV{MPATH_UNCHANGED}="0" + + # The code to check multipath state ends here. We need to set +-- +2.43.0 + diff --git a/0028-dm-parts.rules-fix-warning-reported-by-udevadm-verif.patch b/0028-dm-parts.rules-fix-warning-reported-by-udevadm-verif.patch new file mode 100644 index 0000000000000000000000000000000000000000..b2fdd4535654a24897b580986043107e534bfad7 --- /dev/null +++ b/0028-dm-parts.rules-fix-warning-reported-by-udevadm-verif.patch @@ -0,0 +1,37 @@ +From 57ee6f941a4f3ea68bba67e018cf10bd954144ac Mon Sep 17 00:00:00 2001 +From: "Dmitry V. Levin" +Date: Wed, 17 May 2023 20:00:00 +0000 +Subject: [PATCH] dm-parts.rules: fix warning reported by udevadm verify + +Fix the following warning reported by udevadm verify: + +kpartx/dm-parts.rules:35 A comma between tokens is expected. +kpartx/dm-parts.rules: udev rules check failed + +Note (mwilck): technically, this udev rule was parsed and +executed by udev correctly, and this is unlikely to change. +But the missing comma didn't comply with the udev(7) man page. +This commit fixes that. + +Signed-off-by: Dmitry V. Levin +Reviewed-by: Martin Wilck +--- + kpartx/dm-parts.rules | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/kpartx/dm-parts.rules b/kpartx/dm-parts.rules +index b48b67c8..ef5ff2e6 100644 +--- a/kpartx/dm-parts.rules ++++ b/kpartx/dm-parts.rules +@@ -31,7 +31,7 @@ ENV{DM_UDEV_LOW_PRIORITY_FLAG}!="1", OPTIONS+="link_priority=50" + IMPORT{program}=="kpartx_id %M %m $env{DM_UUID}" + + # DM_TYPE only has a reasonable value for partitions on multipath. +-ENV{DM_UUID}=="*-mpath-*", ENV{DM_TYPE}=="?*", ENV{DM_SERIAL}=="?*" \ ++ENV{DM_UUID}=="*-mpath-*", ENV{DM_TYPE}=="?*", ENV{DM_SERIAL}=="?*", \ + SYMLINK+="disk/by-id/$env{DM_TYPE}-$env{DM_SERIAL}-part$env{DM_PART}" + ENV{DM_WWN}=="?*", ENV{DM_PART}=="?*", \ + SYMLINK+="disk/by-id/wwn-$env{DM_WWN}-part$env{DM_PART}" +-- +2.43.0 + diff --git a/multipath-tools.spec b/multipath-tools.spec index 2a42ee9d8221801859a6998039053dc3272a8931..d8841769dc9e848c30e7f0433c80cff26ce016eb 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -1,7 +1,7 @@ #needsrootforbuild Name: multipath-tools Version: 0.9.5 -Release: 12 +Release: 13 Summary: Tools to manage multipath devices with the device-mapper License: GPL-2.0-or-later and LGPL-2.0-only URL: http://christophe.varoqui.free.fr/ @@ -35,6 +35,8 @@ Patch23: 0023-multipathd-Stop-double-counting-map-failures-for-no_.patch Patch24: 0024-libmultipath-set-clear-handled-flag-only-in-coalesce.patch Patch25: 0025-add-missing-include-for-cmocka.patch Patch26: 0026-Revert-multipathd-Fixed-multipathd-parameter-invokin.patch +Patch27: 0027-11-dm-mpath.rules-fix-warnings-reported-by-udevadm-v.patch +Patch28: 0028-dm-parts.rules-fix-warning-reported-by-udevadm-verif.patch BuildRequires: multipath-tools, libcmocka, libcmocka-devel BuildRequires: gcc, libaio-devel, userspace-rcu-devel, device-mapper-devel >= 1.02.89 @@ -184,6 +186,9 @@ fi %changelog +* Tue Sep 30 2025 xueyamao - 0.9.5-13 +- fix warnings reported by udevadm verify + * Wed Jul 23 2025 zhangjian - 0.9.5-12 - Revert multipathd-fixed-multipathd-param