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 <[email protected]> --- v2 - use an conditional if on LIBAIO and also indent the systemd if --- rules/lvm2.in | 4 ++-- rules/lvm2.make | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rules/lvm2.in b/rules/lvm2.in index f0b8123fc..db009f8d5 100644 --- a/rules/lvm2.in +++ b/rules/lvm2.in @@ -4,10 +4,10 @@ menuconfig LVM2 tristate select LIBC_DL select GCCLIBS_GCC_S - select LIBAIO + select LIBAIO if LVM2_LVM_TOOLS select READLINE select NCURSES - select SYSTEMD if LVM2_SYSTEMD + select SYSTEMD if LVM2_SYSTEMD prompt "lvm2 " help LVM2 refers to a new userspace toolset that provide logical volume management 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
