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