mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] lvm2: make libaio dependency conditional
@ 2026-06-30 16:01 Sven Püschel
  2026-06-30 16:01 ` [ptxdist] [PATCH 2/2] lvm2: add option for libdevmapper-event.so Sven Püschel
  2026-07-03  6:03 ` [ptxdist] [PATCH 1/2] lvm2: make libaio dependency conditional Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: Sven Püschel @ 2026-06-30 16:01 UTC (permalink / raw)
  To: ptxdist; +Cc: Sven Püschel

When only using the device-mapper related part of lvm2, libaio is not
required. This requires us to only use the [install_]device-mapper
make targets to avoid trying to compile the lvm2 tools, which depend on
libaio.

Also move the lvm2 configuration file to the LVM_TOOLS option, as it
won't be built by the device-mapper target and doesn't seem to be
relevant for dmsetup alone.

Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
---
 rules/lvm2.in   | 2 +-
 rules/lvm2.make | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/rules/lvm2.in b/rules/lvm2.in
index f0b8123fc..dc1724ecc 100644
--- a/rules/lvm2.in
+++ b/rules/lvm2.in
@@ -4,7 +4,6 @@ menuconfig LVM2
 	tristate
 	select LIBC_DL
 	select GCCLIBS_GCC_S
-	select LIBAIO
 	select READLINE
 	select NCURSES
 	select SYSTEMD if LVM2_SYSTEMD
@@ -19,6 +18,7 @@ if LVM2
 config LVM2_LVM_TOOLS
 	bool
 	default y
+	select LIBAIO
 	prompt "install lvm tools"
 	help
 	  If disabled, only dmsetup and the dm-mapper library are installed.
diff --git a/rules/lvm2.make b/rules/lvm2.make
index 6e781c66f..d45c89356 100644
--- a/rules/lvm2.make
+++ b/rules/lvm2.make
@@ -90,6 +90,11 @@ LVM2_CONF_OPT := \
 	--with-device-gid=$(PTXCONF_LVM2_DEVICE_GID) \
 	--with-device-mode=$(PTXCONF_LVM2_DEVICE_MODE)
 
+ifndef PTXCONF_LVM2_LVM_TOOLS
+LVM2_MAKE_OPT := device-mapper
+LVM2_INSTALL_OPT := install_device-mapper
+endif
+
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
@@ -153,9 +158,9 @@ ifdef PTXCONF_LVM2_LVM_TOOLS
 	@$(call install_link, lvm2, lvm, /usr/sbin/vgs)
 	@$(call install_link, lvm2, lvm, /usr/sbin/vgscan)
 	@$(call install_link, lvm2, lvm, /usr/sbin/vgsplit)
-endif
 
 	@$(call install_alternative, lvm2, 0, 0, 0644, /etc/lvm/lvm.conf)
+endif
 
 	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper)
 	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper-event)
-- 
2.47.3




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

* [ptxdist] [PATCH 2/2] lvm2: add option for libdevmapper-event.so
  2026-06-30 16:01 [ptxdist] [PATCH 1/2] lvm2: make libaio dependency conditional Sven Püschel
@ 2026-06-30 16:01 ` Sven Püschel
  2026-07-03  6:04   ` Michael Olbrich
  2026-07-03  6:03 ` [ptxdist] [PATCH 1/2] lvm2: make libaio dependency conditional Michael Olbrich
  1 sibling, 1 reply; 4+ messages in thread
From: Sven Püschel @ 2026-06-30 16:01 UTC (permalink / raw)
  To: ptxdist; +Cc: Sven Püschel

Add an option for libdevmapper-event.so, as it's not required by
dmsetup. This allows omitting the library, if it's not being used by
any other application on the system.

Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
---
 rules/lvm2.in   | 6 ++++++
 rules/lvm2.make | 3 +++
 2 files changed, 9 insertions(+)

diff --git a/rules/lvm2.in b/rules/lvm2.in
index dc1724ecc..71d1c0c94 100644
--- a/rules/lvm2.in
+++ b/rules/lvm2.in
@@ -19,6 +19,7 @@ config LVM2_LVM_TOOLS
 	bool
 	default y
 	select LIBAIO
+	select LVM2_LIBDEVMAPPER_EVENT
 	prompt "install lvm tools"
 	help
 	  If disabled, only dmsetup and the dm-mapper library are installed.
@@ -33,6 +34,11 @@ config LVM2_STARTSCRIPT
 
 endif
 
+config LVM2_LIBDEVMAPPER_EVENT
+	bool
+	default n
+	prompt "install libdevmapper-event.so"
+
 config LVM2_DEVICE_UID
 	int
 	default 0
diff --git a/rules/lvm2.make b/rules/lvm2.make
index d45c89356..57773a1f7 100644
--- a/rules/lvm2.make
+++ b/rules/lvm2.make
@@ -163,7 +163,10 @@ ifdef PTXCONF_LVM2_LVM_TOOLS
 endif
 
 	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper)
+
+ifdef PTXCONF_LVM2_LIBDEVMAPPER_EVENT
 	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper-event)
+endif
 
 ifdef PTXCONF_LVM2_STARTSCRIPT
 	@$(call install_alternative, lvm2, 0, 0, 0755, /etc/init.d/lvm2)
-- 
2.47.3




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

* Re: [ptxdist] [PATCH 1/2] lvm2: make libaio dependency conditional
  2026-06-30 16:01 [ptxdist] [PATCH 1/2] lvm2: make libaio dependency conditional Sven Püschel
  2026-06-30 16:01 ` [ptxdist] [PATCH 2/2] lvm2: add option for libdevmapper-event.so Sven Püschel
@ 2026-07-03  6:03 ` Michael Olbrich
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2026-07-03  6:03 UTC (permalink / raw)
  To: Sven Püschel; +Cc: ptxdist

On Tue, Jun 30, 2026 at 06:01:56PM +0200, Sven Püschel wrote:
> When only using the device-mapper related part of lvm2, libaio is not
> required. This requires us to only use the [install_]device-mapper
> make targets to avoid trying to compile the lvm2 tools, which depend on
> libaio.
> 
> Also move the lvm2 configuration file to the LVM_TOOLS option, as it
> won't be built by the device-mapper target and doesn't seem to be
> relevant for dmsetup alone.
> 
> Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
> ---
>  rules/lvm2.in   | 2 +-
>  rules/lvm2.make | 7 ++++++-
>  2 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/rules/lvm2.in b/rules/lvm2.in
> index f0b8123fc..dc1724ecc 100644
> --- a/rules/lvm2.in
> +++ b/rules/lvm2.in
> @@ -4,7 +4,6 @@ menuconfig LVM2
>  	tristate
>  	select LIBC_DL
>  	select GCCLIBS_GCC_S
> -	select LIBAIO

Keep this here with:

	select LIBAIO	if LVM2_LVM_TOOLS

>  	select READLINE
>  	select NCURSES
>  	select SYSTEMD if LVM2_SYSTEMD
> @@ -19,6 +18,7 @@ if LVM2
>  config LVM2_LVM_TOOLS
>  	bool
>  	default y
> +	select LIBAIO
>  	prompt "install lvm tools"
>  	help
>  	  If disabled, only dmsetup and the dm-mapper library are installed.
> diff --git a/rules/lvm2.make b/rules/lvm2.make
> index 6e781c66f..d45c89356 100644
> --- a/rules/lvm2.make
> +++ b/rules/lvm2.make
> @@ -90,6 +90,11 @@ LVM2_CONF_OPT := \
>  	--with-device-gid=$(PTXCONF_LVM2_DEVICE_GID) \
>  	--with-device-mode=$(PTXCONF_LVM2_DEVICE_MODE)
>  
> +ifndef PTXCONF_LVM2_LVM_TOOLS
> +LVM2_MAKE_OPT := device-mapper
> +LVM2_INSTALL_OPT := install_device-mapper
> +endif
> +
>  # ----------------------------------------------------------------------------
>  # Target-Install
>  # ----------------------------------------------------------------------------
> @@ -153,9 +158,9 @@ ifdef PTXCONF_LVM2_LVM_TOOLS
>  	@$(call install_link, lvm2, lvm, /usr/sbin/vgs)
>  	@$(call install_link, lvm2, lvm, /usr/sbin/vgscan)
>  	@$(call install_link, lvm2, lvm, /usr/sbin/vgsplit)
> -endif
>  
>  	@$(call install_alternative, lvm2, 0, 0, 0644, /etc/lvm/lvm.conf)
> +endif
>  
>  	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper)
>  	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper-event)
> -- 
> 2.47.3
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

* Re: [ptxdist] [PATCH 2/2] lvm2: add option for libdevmapper-event.so
  2026-06-30 16:01 ` [ptxdist] [PATCH 2/2] lvm2: add option for libdevmapper-event.so Sven Püschel
@ 2026-07-03  6:04   ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2026-07-03  6:04 UTC (permalink / raw)
  To: Sven Püschel; +Cc: ptxdist

On Tue, Jun 30, 2026 at 06:01:57PM +0200, Sven Püschel wrote:
> Add an option for libdevmapper-event.so, as it's not required by
> dmsetup. This allows omitting the library, if it's not being used by
> any other application on the system.
> 
> Signed-off-by: Sven Püschel <s.pueschel@pengutronix.de>
> ---
>  rules/lvm2.in   | 6 ++++++
>  rules/lvm2.make | 3 +++
>  2 files changed, 9 insertions(+)
> 
> diff --git a/rules/lvm2.in b/rules/lvm2.in
> index dc1724ecc..71d1c0c94 100644
> --- a/rules/lvm2.in
> +++ b/rules/lvm2.in
> @@ -19,6 +19,7 @@ config LVM2_LVM_TOOLS
>  	bool
>  	default y
>  	select LIBAIO
> +	select LVM2_LIBDEVMAPPER_EVENT
>  	prompt "install lvm tools"
>  	help
>  	  If disabled, only dmsetup and the dm-mapper library are installed.
> @@ -33,6 +34,11 @@ config LVM2_STARTSCRIPT
>  
>  endif
>  
> +config LVM2_LIBDEVMAPPER_EVENT
> +	bool
> +	default n

This line is redundant. Just remove it.

Michael

> +	prompt "install libdevmapper-event.so"
> +
>  config LVM2_DEVICE_UID
>  	int
>  	default 0
> diff --git a/rules/lvm2.make b/rules/lvm2.make
> index d45c89356..57773a1f7 100644
> --- a/rules/lvm2.make
> +++ b/rules/lvm2.make
> @@ -163,7 +163,10 @@ ifdef PTXCONF_LVM2_LVM_TOOLS
>  endif
>  
>  	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper)
> +
> +ifdef PTXCONF_LVM2_LIBDEVMAPPER_EVENT
>  	@$(call install_lib, lvm2, 0, 0, 0644, libdevmapper-event)
> +endif
>  
>  ifdef PTXCONF_LVM2_STARTSCRIPT
>  	@$(call install_alternative, lvm2, 0, 0, 0755, /etc/init.d/lvm2)
> -- 
> 2.47.3
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2026-07-03  6:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-30 16:01 [ptxdist] [PATCH 1/2] lvm2: make libaio dependency conditional Sven Püschel
2026-06-30 16:01 ` [ptxdist] [PATCH 2/2] lvm2: add option for libdevmapper-event.so Sven Püschel
2026-07-03  6:04   ` Michael Olbrich
2026-07-03  6:03 ` [ptxdist] [PATCH 1/2] lvm2: make libaio dependency conditional Michael Olbrich

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