Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config
@ 2024-04-12 22:24 Julien Olivain
  2024-04-12 22:24 ` [Buildroot] [PATCH 2/2] support/testing: lvm2: remove kernel config fragment Julien Olivain
  2024-05-09 15:46 ` [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 4+ messages in thread
From: Julien Olivain @ 2024-04-12 22:24 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

LVM2 has a hard dependency on the device-mapper presence in the Kernel.
This commit enables those mandatory Kernel configuration by defining
the _LINUX_CONFIG_FIXUPS macro. This will make sure the final system
image will end up in a working configuration.

This was suggested by Arnout in [1].

[1] https://lists.buildroot.org/pipermail/buildroot/2024-April/688776.html

Suggested-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 package/lvm2/lvm2.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/lvm2/lvm2.mk b/package/lvm2/lvm2.mk
index bda16489550..4fcfddb1bbd 100644
--- a/package/lvm2/lvm2.mk
+++ b/package/lvm2/lvm2.mk
@@ -76,5 +76,10 @@ HOST_LVM2_CONF_OPTS = \
 	--disable-selinux \
 	--with-confdir=$(HOST_DIR)/etc
 
+define LVM2_LINUX_CONFIG_FIXUPS
+	$(call KCONFIG_ENABLE_OPT,CONFIG_MD)
+	$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_DM)
+endef
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
-- 
2.44.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH 2/2] support/testing: lvm2: remove kernel config fragment
  2024-04-12 22:24 [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config Julien Olivain
@ 2024-04-12 22:24 ` Julien Olivain
  2024-05-09 15:46 ` [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 4+ messages in thread
From: Julien Olivain @ 2024-04-12 22:24 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain

The lvm2 package now enables the required Kernel configuration. The
Kernel config fragment included in this test is no longer needed.

This commit removes it.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 DEVELOPERS                                            |  1 -
 support/testing/tests/package/test_lvm2.py            | 11 ++++-------
 .../tests/package/test_lvm2/linux-lvm2.fragment       |  2 --
 3 files changed, 4 insertions(+), 10 deletions(-)
 delete mode 100644 support/testing/tests/package/test_lvm2/linux-lvm2.fragment

diff --git a/DEVELOPERS b/DEVELOPERS
index 399b2931ff3..836fa9149a0 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1818,7 +1818,6 @@ F:	support/testing/tests/package/test_libjxl.py
 F:	support/testing/tests/package/test_lrzip.py
 F:	support/testing/tests/package/test_ltrace.py
 F:	support/testing/tests/package/test_lvm2.py
-F:	support/testing/tests/package/test_lvm2/
 F:	support/testing/tests/package/test_lzip.py
 F:	support/testing/tests/package/test_lsof.py
 F:	support/testing/tests/package/test_lz4.py
diff --git a/support/testing/tests/package/test_lvm2.py b/support/testing/tests/package/test_lvm2.py
index bdbae7a4ec7..75ea3fa449f 100644
--- a/support/testing/tests/package/test_lvm2.py
+++ b/support/testing/tests/package/test_lvm2.py
@@ -5,13 +5,11 @@ import infra.basetest
 
 
 class TestLvm2(infra.basetest.BRTest):
-    # This test creates a lvm2 volume. A specific Kernel need to be
-    # built with a config fragment enabling this support. This test
-    # also uses resize2fs from e2fsprogs.
-    kernel_fragment = \
-        infra.filepath("tests/package/test_lvm2/linux-lvm2.fragment")
+    # The lvm2 package has _LINUX_CONFIG_FIXUPS, so we cannot use
+    # the runtime test pre-built Kernel. We need to compile a Kernel
+    # to make sure it will include the required configuration.
     config = \
-        f"""
+        """
         BR2_aarch64=y
         BR2_TOOLCHAIN_EXTERNAL=y
         BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
@@ -20,7 +18,6 @@ class TestLvm2(infra.basetest.BRTest):
         BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.77"
         BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
         BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
-        BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{kernel_fragment}"
         BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
         BR2_PACKAGE_E2FSPROGS=y
         BR2_PACKAGE_E2FSPROGS_RESIZE2FS=y
diff --git a/support/testing/tests/package/test_lvm2/linux-lvm2.fragment b/support/testing/tests/package/test_lvm2/linux-lvm2.fragment
deleted file mode 100644
index 0fade167a3c..00000000000
--- a/support/testing/tests/package/test_lvm2/linux-lvm2.fragment
+++ /dev/null
@@ -1,2 +0,0 @@
-CONFIG_MD=y
-CONFIG_BLK_DEV_DM=y
-- 
2.44.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config
  2024-04-12 22:24 [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config Julien Olivain
  2024-04-12 22:24 ` [Buildroot] [PATCH 2/2] support/testing: lvm2: remove kernel config fragment Julien Olivain
@ 2024-05-09 15:46 ` Thomas Petazzoni via buildroot
  2024-06-03 15:17   ` Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-09 15:46 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot

On Sat, 13 Apr 2024 00:24:58 +0200
Julien Olivain <ju.o@free.fr> wrote:

> LVM2 has a hard dependency on the device-mapper presence in the Kernel.
> This commit enables those mandatory Kernel configuration by defining
> the _LINUX_CONFIG_FIXUPS macro. This will make sure the final system
> image will end up in a working configuration.
> 
> This was suggested by Arnout in [1].
> 
> [1] https://lists.buildroot.org/pipermail/buildroot/2024-April/688776.html
> 
> Suggested-by: Arnout Vandecappelle <arnout@mind.be>
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
>  package/lvm2/lvm2.mk | 5 +++++
>  1 file changed, 5 insertions(+)

Both applied, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config
  2024-05-09 15:46 ` [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config Thomas Petazzoni via buildroot
@ 2024-06-03 15:17   ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2024-06-03 15:17 UTC (permalink / raw)
  To: Thomas Petazzoni via buildroot; +Cc: Julien Olivain, Thomas Petazzoni

>>>>> "Thomas" == Thomas Petazzoni via buildroot <buildroot@buildroot.org> writes:

 > On Sat, 13 Apr 2024 00:24:58 +0200
 > Julien Olivain <ju.o@free.fr> wrote:

 >> LVM2 has a hard dependency on the device-mapper presence in the Kernel.
 >> This commit enables those mandatory Kernel configuration by defining
 >> the _LINUX_CONFIG_FIXUPS macro. This will make sure the final system
 >> image will end up in a working configuration.
 >> 
 >> This was suggested by Arnout in [1].
 >> 
 >> [1] https://lists.buildroot.org/pipermail/buildroot/2024-April/688776.html
 >> 
 >> Suggested-by: Arnout Vandecappelle <arnout@mind.be>
 >> Signed-off-by: Julien Olivain <ju.o@free.fr>
 >> ---
 >> package/lvm2/lvm2.mk | 5 +++++
 >> 1 file changed, 5 insertions(+)

 > Both applied, thanks!

Committed both to 2024.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-03 15:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12 22:24 [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config Julien Olivain
2024-04-12 22:24 ` [Buildroot] [PATCH 2/2] support/testing: lvm2: remove kernel config fragment Julien Olivain
2024-05-09 15:46 ` [Buildroot] [PATCH 1/2] package/lvm2: enable device-mapper in Kernel config Thomas Petazzoni via buildroot
2024-06-03 15:17   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox