dcavalca / rpms / systemd

Forked from rpms/systemd 6 months ago
Clone
8d419f
From fcaf368341c85285017f77333543656e1382975e Mon Sep 17 00:00:00 2001
8d419f
From: Frantisek Sumsal <frantisek@sumsal.cz>
8d419f
Date: Wed, 9 Feb 2022 22:35:03 +0100
8d419f
Subject: [PATCH] test: lvm 2.03.15 dropped the static autoactivation
8d419f
8d419f
so install the respective generator only if we're running with older
8d419f
lvm versions.
8d419f
8d419f
See: https://sourceware.org/git/?p=lvm2.git;a=commit;h=ee8fb0310c53ed003a43b324c99cdfd891dd1a7c
8d419f
(cherry picked from commit d10d562bd4b9f93130fb2b23f2b0d0d4126ea7d4)
8d419f
8d419f
Related: #2017035
8d419f
---
8d419f
 test/test-functions | 5 ++++-
8d419f
 1 file changed, 4 insertions(+), 1 deletion(-)
8d419f
8d419f
diff --git a/test/test-functions b/test/test-functions
8d419f
index 4827b6bedf..dcc893733c 100644
8d419f
--- a/test/test-functions
8d419f
+++ b/test/test-functions
8d419f
@@ -973,16 +973,19 @@ install_lvm() {
8d419f
     image_install lvm
8d419f
     image_install "${ROOTLIBDIR:?}"/system/lvm2-lvmpolld.{service,socket}
8d419f
     image_install "${ROOTLIBDIR:?}"/system/{blk-availability,lvm2-monitor}.service
8d419f
-    image_install "${ROOTLIBDIR:?}"/system-generators/lvm2-activation-generator
8d419f
     image_install -o "/lib/tmpfiles.d/lvm2.conf"
8d419f
     if get_bool "$LOOKS_LIKE_DEBIAN"; then
8d419f
         inst_rules 56-lvm.rules 69-lvm-metad.rules
8d419f
     else
8d419f
         # Support the new udev autoactivation introduced in lvm 2.03.14
8d419f
         # https://sourceware.org/git/?p=lvm2.git;a=commit;h=67722b312390cdab29c076c912e14bd739c5c0f6
8d419f
+        # Static autoactivation (via lvm2-activation-generator) was dropped
8d419f
+        # in lvm 2.03.15
8d419f
+        # https://sourceware.org/git/?p=lvm2.git;a=commit;h=ee8fb0310c53ed003a43b324c99cdfd891dd1a7c
8d419f
         if [[ -f /lib/udev/rules.d/69-dm-lvm.rules ]]; then
8d419f
             inst_rules 11-dm-lvm.rules 69-dm-lvm.rules
8d419f
         else
8d419f
+            image_install "${ROOTLIBDIR:?}"/system-generators/lvm2-activation-generator
8d419f
             image_install "${ROOTLIBDIR:?}"/system/lvm2-pvscan@.service
8d419f
             inst_rules 11-dm-lvm.rules 69-dm-lvm-metad.rules
8d419f
         fi