* [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule.
2023-10-17 8:57 [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Simon Tournier
@ 2023-10-23 21:52 ` Ludovic Courtès
2023-10-24 16:48 ` Simon Tournier
2023-10-24 16:47 ` [bug#66586] [PATCH v2] " Simon Tournier
` (5 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2023-10-23 21:52 UTC (permalink / raw)
To: Simon Tournier; +Cc: 66586, Yann Dupont, Tobias Geerinckx-Rice, Leo Famulari
Hi!
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> From: Yann Dupont <Yann.Dupont@univ-nantes.fr>
>
> Fixes <https://issues.guix.gnu.org/65177>.
> Reported by Adrien 'neox' Bourmault <neox@gnu.org>.
>
> * gnu/packages/patches/lvm2-no-systemd.patch: New file.
> * gnu/packages/linux.scm (lvm2)[source]: Apply patch.
> * gnu/local.mk: Register new patch.
One minor nit:
> +++ b/gnu/packages/patches/lvm2-no-systemd.patch
> @@ -0,0 +1,22 @@
> +Fixes <https://issues.guix.gnu.org/65177>.
> +
> +Since lvm2 2.03.14, the included udev rules use systemd-run to run vgchange
> +and activate the volume group. lvm2 was updated recently from 2.03.11 to
> +2.03.21, then 2.03.22, and probably started exhibiting this behavior then. It
> +removes the indirection through systemd-run and directly run vgchange.
I propose to change this paragraph so that it is self-contained, like:
Run ‘vgchange’ directly instead of attempting to run it via
‘systemd-run’ as the udev rules included in lvm2 >= 2.03.14 do.
LGTM with a change along these lines!
Ludo’.
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule.
2023-10-23 21:52 ` Ludovic Courtès
@ 2023-10-24 16:48 ` Simon Tournier
0 siblings, 0 replies; 15+ messages in thread
From: Simon Tournier @ 2023-10-24 16:48 UTC (permalink / raw)
To: Ludovic Courtès
Cc: 66586, Yann Dupont, Tobias Geerinckx-Rice, Leo Famulari
Hi Ludo,
On Mon, 23 Oct 2023 at 23:52, Ludovic Courtès <ludo@gnu.org> wrote:
> I propose to change this paragraph so that it is self-contained, like:
>
> Run ‘vgchange’ directly instead of attempting to run it via
> ‘systemd-run’ as the udev rules included in lvm2 >= 2.03.14 do.
I copy/pasted these lines in v2.
Cheers,
simon
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#66586] [PATCH v2] gnu: lvm2: Remove systemd rule.
2023-10-17 8:57 [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Simon Tournier
2023-10-23 21:52 ` Ludovic Courtès
@ 2023-10-24 16:47 ` Simon Tournier
2023-10-29 23:22 ` Ludovic Courtès
2023-10-31 22:11 ` [bug#66586] [PATCH v3] " Simon Tournier
` (4 subsequent siblings)
6 siblings, 1 reply; 15+ messages in thread
From: Simon Tournier @ 2023-10-24 16:47 UTC (permalink / raw)
To: 66586; +Cc: Yann Dupont, ludo
From: Yann Dupont <Yann.Dupont@univ-nantes.fr>
Fixes <https://issues.guix.gnu.org/65177>.
Reported by Adrien 'neox' Bourmault <neox@gnu.org>.
* gnu/packages/patches/lvm2-no-systemd.patch: New file.
* gnu/packages/linux.scm (lvm2)[source]: Apply patch.
* gnu/local.mk: Register new patch.
---
gnu/local.mk | 1 +
gnu/packages/linux.scm | 1 +
gnu/packages/patches/lvm2-no-systemd.patch | 20 ++++++++++++++++++++
3 files changed, 22 insertions(+)
create mode 100644 gnu/packages/patches/lvm2-no-systemd.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 43145caf80..4c8800b274 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1627,6 +1627,7 @@ dist_patch_DATA = \
%D%/packages/patches/mcrypt-CVE-2012-4527.patch \
%D%/packages/patches/libmemcached-build-with-gcc7.patch \
%D%/packages/patches/libmhash-hmac-fix-uaf.patch \
+ %D%/packages/patches/lvm2-no-systemd.patch \
%D%/packages/patches/maturin-no-cross-compile.patch \
%D%/packages/patches/mecab-variable-param.patch \
%D%/packages/patches/memtest86+-build-reproducibly.patch \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index f02577d2d5..c618651553 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4494,6 +4494,7 @@ (define-public lvm2
(sha256
(base32
"0z6w6bknhwh1n3qfkb5ij6x57q3wjf28lq3l8kh7rkhsplinjnjc"))
+ (patches (search-patches "lvm2-no-systemd.patch"))
(modules '((guix build utils)))
(snippet
'(begin
diff --git a/gnu/packages/patches/lvm2-no-systemd.patch b/gnu/packages/patches/lvm2-no-systemd.patch
new file mode 100644
index 0000000000..440559b96d
--- /dev/null
+++ b/gnu/packages/patches/lvm2-no-systemd.patch
@@ -0,0 +1,20 @@
+Fixes <https://issues.guix.gnu.org/65177>.
+
+Run 'vgchange' directly instead of attempting to run it via 'systemd-run' as
+the udev rules included in lvm2 >= 2.03.14 do.
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index ff15681..f9e5b70 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -75,8 +75,8 @@ LABEL="lvm_scan"
+ # TODO: adjust the output of vgchange -aay so that
+ # it's better suited to appearing in the journal.
+
+-IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay
+ GOTO="lvm_end"
+
+ LABEL="lvm_end"
base-commit: f3714b3d5f51aced4b31447c42d5e89c75e3079f
--
2.38.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#66586] [PATCH v2] gnu: lvm2: Remove systemd rule.
2023-10-24 16:47 ` [bug#66586] [PATCH v2] " Simon Tournier
@ 2023-10-29 23:22 ` Ludovic Courtès
2023-10-31 8:58 ` bug#66586: " Simon Tournier
0 siblings, 1 reply; 15+ messages in thread
From: Ludovic Courtès @ 2023-10-29 23:22 UTC (permalink / raw)
To: Simon Tournier; +Cc: 66586, Yann Dupont
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> From: Yann Dupont <Yann.Dupont@univ-nantes.fr>
>
> Fixes <https://issues.guix.gnu.org/65177>.
> Reported by Adrien 'neox' Bourmault <neox@gnu.org>.
>
> * gnu/packages/patches/lvm2-no-systemd.patch: New file.
> * gnu/packages/linux.scm (lvm2)[source]: Apply patch.
> * gnu/local.mk: Register new patch.
LGTM, thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#66586: [PATCH v2] gnu: lvm2: Remove systemd rule.
2023-10-29 23:22 ` Ludovic Courtès
@ 2023-10-31 8:58 ` Simon Tournier
2023-10-31 20:07 ` [bug#66586] " Josselin Poiret via Guix-patches via
0 siblings, 1 reply; 15+ messages in thread
From: Simon Tournier @ 2023-10-31 8:58 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 66586-done, Yann Dupont
Hi,
On lun., 30 oct. 2023 at 00:22, Ludovic Courtès <ludo@gnu.org> wrote:
> Simon Tournier <zimon.toutoune@gmail.com> skribis:
>
>> From: Yann Dupont <Yann.Dupont@univ-nantes.fr>
>>
>> Fixes <https://issues.guix.gnu.org/65177>.
>> Reported by Adrien 'neox' Bourmault <neox@gnu.org>.
>>
>> * gnu/packages/patches/lvm2-no-systemd.patch: New file.
>> * gnu/packages/linux.scm (lvm2)[source]: Apply patch.
>> * gnu/local.mk: Register new patch.
>
> LGTM, thanks!
Pushed as c0895371c5759c7d9edb330774e90f192cc4cf2c.
Cheers,
simon
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#66586] [PATCH v3] gnu: lvm2: Remove systemd rule.
2023-10-17 8:57 [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Simon Tournier
2023-10-23 21:52 ` Ludovic Courtès
2023-10-24 16:47 ` [bug#66586] [PATCH v2] " Simon Tournier
@ 2023-10-31 22:11 ` Simon Tournier
2024-03-05 15:51 ` [bug#66586] [PATCH] " Yann Dupont
` (3 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Simon Tournier @ 2023-10-31 22:11 UTC (permalink / raw)
To: 66586; +Cc: Yann.Dupont, dev, Simon Tournier, Leo Famulari,
Tobias Geerinckx-Rice
Follow-up of 3991d9e4d9867ec499283bfc71b34d7bfebe49b3.
* gnu/packages/patches/lvm2-no-systemd.patch: New file.
* gnu/packages/linux.scm (lvm2)[source]: Apply patch.
* gnu/local.mk: Register new patch.
Change-Id: I916fb5f6ae786d22af69f0a7d81c0c28da3c96ea
---
gnu/local.mk | 1 +
gnu/packages/linux.scm | 1 +
gnu/packages/patches/lvm2-no-systemd.patch | 19 +++++++++++++++++++
3 files changed, 21 insertions(+)
create mode 100644 gnu/packages/patches/lvm2-no-systemd.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 8d817379a7..27e57302ae 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1629,6 +1629,7 @@ dist_patch_DATA = \
%D%/packages/patches/mcrypt-CVE-2012-4527.patch \
%D%/packages/patches/libmemcached-build-with-gcc7.patch \
%D%/packages/patches/libmhash-hmac-fix-uaf.patch \
+ %D%/packages/patches/lvm2-no-systemd.patch \
%D%/packages/patches/maturin-no-cross-compile.patch \
%D%/packages/patches/mecab-variable-param.patch \
%D%/packages/patches/memtest86+-build-reproducibly.patch \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 7a9f357681..6abdb23958 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4494,6 +4494,7 @@ (define-public lvm2
(sha256
(base32
"0z6w6bknhwh1n3qfkb5ij6x57q3wjf28lq3l8kh7rkhsplinjnjc"))
+ (patches (search-patches "lvm2-no-systemd.patch"))
(modules '((guix build utils)))
(snippet
'(begin
diff --git a/gnu/packages/patches/lvm2-no-systemd.patch b/gnu/packages/patches/lvm2-no-systemd.patch
new file mode 100644
index 0000000000..f786cd9705
--- /dev/null
+++ b/gnu/packages/patches/lvm2-no-systemd.patch
@@ -0,0 +1,19 @@
+Fixes <https://issues.guix.gnu.org/65177>.
+
+Run 'vgchange' directly instead of attempting to run it via 'systemd-run' as
+the udev rules included in lvm2 >= 2.03.14 do.
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index ff15681..d3cc125 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -75,8 +75,7 @@ LABEL="lvm_scan"
+ # TODO: adjust the output of vgchange -aay so that
+ # it's better suited to appearing in the journal.
+
+-IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+
+ LABEL="lvm_end"
base-commit: 3991d9e4d9867ec499283bfc71b34d7bfebe49b3
--
2.41.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule.
2023-10-17 8:57 [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Simon Tournier
` (2 preceding siblings ...)
2023-10-31 22:11 ` [bug#66586] [PATCH v3] " Simon Tournier
@ 2024-03-05 15:51 ` Yann Dupont
2024-04-02 17:26 ` Adrien 'neox' Bourmault
` (2 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Yann Dupont @ 2024-03-05 15:51 UTC (permalink / raw)
To: 66586
Hi, this bug is still open, and, as far as I can tell, generating a VM
using lvm2 is still currently broken.
Is there still a problem preventing this path from being integrated?
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule.
2023-10-17 8:57 [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Simon Tournier
` (3 preceding siblings ...)
2024-03-05 15:51 ` [bug#66586] [PATCH] " Yann Dupont
@ 2024-04-02 17:26 ` Adrien 'neox' Bourmault
2024-04-10 13:19 ` [bug#66586] (no subject) Yann Dupont
2024-04-18 10:20 ` [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Yann Dupont
6 siblings, 0 replies; 15+ messages in thread
From: Adrien 'neox' Bourmault @ 2024-04-02 17:26 UTC (permalink / raw)
To: 66586
Hi there, I just tested it but it did not work while not showing the error I
reported earlier. I just obtain "Device ... not found or access denied".
However, it might be linked to 70051 too, so I'll try to test with that too (or
wait it's merged).
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#66586] (no subject)
2023-10-17 8:57 [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Simon Tournier
` (4 preceding siblings ...)
2024-04-02 17:26 ` Adrien 'neox' Bourmault
@ 2024-04-10 13:19 ` Yann Dupont
2024-04-18 10:20 ` [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Yann Dupont
6 siblings, 0 replies; 15+ messages in thread
From: Yann Dupont @ 2024-04-10 13:19 UTC (permalink / raw)
To: 66586
[-- Attachment #1: Type: text/plain, Size: 716 bytes --]
Hi there,
I'd looked at the patch Simon reformatted and it seemed fine, but I just
tested *this* thread's patch, and it doesn't seem to work.
I suspect there's an extra "-" in the 1st line of the 3rd patch (it
wasn't in my original patch https://issues.guix.gnu.org/65177#3)
<https://issues.guix.gnu.org/65177#3>.
the « - » in the line '-IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache
--listvg --checkcomplete --vgonline --autoactivation event --udevoutput
--journal=output $env{DEVNAME}' is too much in the patch.
I've just tested the generation of a VM generated with the patch
amputated from the excess line and it's ok.
Unless someone does it before me, I'll try again to post the correct
version.
[-- Attachment #2: Type: text/html, Size: 1039 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule.
2023-10-17 8:57 [bug#66586] [PATCH] gnu: lvm2: Remove systemd rule Simon Tournier
` (5 preceding siblings ...)
2024-04-10 13:19 ` [bug#66586] (no subject) Yann Dupont
@ 2024-04-18 10:20 ` Yann Dupont
2024-05-25 18:03 ` bug#66586: " Lars-Dominik Braun
6 siblings, 1 reply; 15+ messages in thread
From: Yann Dupont @ 2024-04-18 10:20 UTC (permalink / raw)
To: 66586
[-- Attachment #1: Type: text/plain, Size: 69 bytes --]
I hope this time patch won't be garbled… (trying to attach patch)
[-- Attachment #2: patch-for-65177 --]
[-- Type: text/plain, Size: 2232 bytes --]
diff --git a/gnu/local.mk b/gnu/local.mk
index 2e0c6a5d3c..d9d11b31b9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1694,6 +1694,7 @@ dist_patch_DATA = \
%D%/packages/patches/mcrypt-CVE-2012-4527.patch \
%D%/packages/patches/libmemcached-build-with-gcc7.patch \
%D%/packages/patches/libmhash-hmac-fix-uaf.patch \
+ %D%/packages/patches/lvm2-no-systemd.patch \
%D%/packages/patches/maturin-no-cross-compile.patch \
%D%/packages/patches/mecab-variable-param.patch \
%D%/packages/patches/memtest86+-build-reproducibly.patch \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9c819838bd..549de85ea4 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4613,6 +4613,7 @@ (define-public lvm2
(sha256
(base32
"0z6w6bknhwh1n3qfkb5ij6x57q3wjf28lq3l8kh7rkhsplinjnjc"))
+ (patches (search-patches "lvm2-no-systemd.patch"))
(modules '((guix build utils)))
(snippet
'(begin
diff --git a/gnu/packages/patches/lvm2-no-systemd.patch b/gnu/packages/patches/lvm2-no-systemd.patch
new file mode 100644
index 0000000000..f43e568bb1
--- /dev/null
+++ b/gnu/packages/patches/lvm2-no-systemd.patch
@@ -0,0 +1,18 @@
+Fixes <https://issues.guix.gnu.org/65177>.
+
+Run 'vgchange' directly instead of attempting to run it via 'systemd-run' as
+the udev rules included in lvm2 >= 2.03.14 do.
+
+diff --git a/udev/69-dm-lvm.rules.in b/udev/69-dm-lvm.rules.in
+index ff1568145..8879a2ef9 100644
+--- a/udev/69-dm-lvm.rules.in
++++ b/udev/69-dm-lvm.rules.in
+@@ -76,7 +76,7 @@ LABEL="lvm_scan"
+ # it's better suited to appearing in the journal.
+
+ IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --autoactivation event --udevoutput --journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(SYSTEMDRUN) --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
++ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="(LVM_EXEC)/lvm vgchange -aay --autoactivation event $env{LVM_VG_NAME_COMPLETE}"
+ GOTO="lvm_end"
+
+ LABEL="lvm_end"
^ permalink raw reply related [flat|nested] 15+ messages in thread