summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2021-12-27 01:01:54 +0100
committerLars Wendler <polynomial-c@gentoo.org>2021-12-27 01:05:13 +0100
commitc52ed8996b70a39521a5f6a82d2d64d7ddc08d99 (patch)
treef7c3cf5e7dbcd54e997145961014f7f11bb7eec1 /sys-fs/lvm2
parentgames-rpg/celeste: New package (diff)
downloadgentoo-c52ed8996b70a39521a5f6a82d2d64d7ddc08d99.tar.gz
gentoo-c52ed8996b70a39521a5f6a82d2d64d7ddc08d99.tar.bz2
gentoo-c52ed8996b70a39521a5f6a82d2d64d7ddc08d99.zip
sys-fs/lvm2: Don't use systemd-run on openrc systems
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-fs/lvm2')
-rw-r--r--sys-fs/lvm2/files/lvm2-2.03.14-dm_lvm_rules_no_systemd.patch37
-rw-r--r--sys-fs/lvm2/lvm2-2.03.14-r1.ebuild (renamed from sys-fs/lvm2/lvm2-2.03.14.ebuild)5
2 files changed, 42 insertions, 0 deletions
diff --git a/sys-fs/lvm2/files/lvm2-2.03.14-dm_lvm_rules_no_systemd.patch b/sys-fs/lvm2/files/lvm2-2.03.14-dm_lvm_rules_no_systemd.patch
new file mode 100644
index 000000000000..0b4a156c630f
--- /dev/null
+++ b/sys-fs/lvm2/files/lvm2-2.03.14-dm_lvm_rules_no_systemd.patch
@@ -0,0 +1,37 @@
+From 88d5b3d711c8546864e57dbfba7591a19be80c4d Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Mon, 27 Dec 2021 00:53:21 +0100
+Subject: [PATCH] Don't use systemd-run in 69-dm-lvm.rules
+
+some people don't run systemd
+---
+ udev/69-dm-lvm.rules.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index 39e5b9807..6ba4efa0f 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -62,8 +62,8 @@ ENV{SYSTEMD_READY}="1"
+ # LVM_VG_NAME_COMPLETE='foo'
+ #
+ # When the VG is complete it can be activated, so
+-# vgchange -aay <vgname> is run. It is run via
+-# systemd since it can take longer to run than
++# vgchange -aay <vgname> is run. It can take
++# longer to run than
+ # udev wants to block when processing rules.
+ # (if there are hundreds of LVs to activate,
+ # the vgchange can take many seconds.)
+@@ -80,7 +80,7 @@ ENV{SYSTEMD_READY}="1"
+ # it's better suited to appearing in the journal.
+
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --udevoutput --journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} lvm vgchange -aay --nohints $env{LVM_VG_NAME_COMPLETE}"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --nohints $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+
+ LABEL="lvm_end"
+--
+2.34.1
+
diff --git a/sys-fs/lvm2/lvm2-2.03.14.ebuild b/sys-fs/lvm2/lvm2-2.03.14-r1.ebuild
index f27b82cc4ef0..a0f3b38b6ae8 100644
--- a/sys-fs/lvm2/lvm2-2.03.14.ebuild
+++ b/sys-fs/lvm2/lvm2-2.03.14-r1.ebuild
@@ -99,6 +99,11 @@ pkg_setup() {
src_prepare() {
default
+ # Users without systemd get no auto-activation of any logical volume
+ if ! use systemd ; then
+ eapply "${FILESDIR}"/${PN}-2.03.14-dm_lvm_rules_no_systemd.patch
+ fi
+
sed -i \
-e "1iAR = $(tc-getAR)" \
-e "s:CC ?= @CC@:CC = $(tc-getCC):" \