419d39b261
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> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
86 lines
2.3 KiB
Makefile
86 lines
2.3 KiB
Makefile
################################################################################
|
|
#
|
|
# lvm2
|
|
#
|
|
################################################################################
|
|
|
|
LVM2_VERSION = 2.03.23
|
|
LVM2_SOURCE = LVM2.$(LVM2_VERSION).tgz
|
|
LVM2_SITE = https://sourceware.org/ftp/lvm2
|
|
LVM2_INSTALL_STAGING = YES
|
|
LVM2_LICENSE = GPL-2.0, LGPL-2.1
|
|
LVM2_LICENSE_FILES = COPYING COPYING.LIB
|
|
LVM2_CPE_ID_VENDOR = redhat
|
|
# parallel build issues
|
|
LVM2_MAKE = $(MAKE1)
|
|
|
|
# Make sure that binaries and libraries are installed with write
|
|
# permissions for the owner. We disable NLS because it's broken, and
|
|
# the package anyway doesn't provide any translation files.
|
|
LVM2_CONF_OPTS += \
|
|
--enable-write_install \
|
|
--enable-pkgconfig \
|
|
--enable-cmdlib \
|
|
--enable-dmeventd \
|
|
--disable-nls \
|
|
--with-symvers=no
|
|
|
|
LVM2_DEPENDENCIES += host-pkgconf
|
|
|
|
# LVM2 uses autoconf, but not automake, and the build system does not
|
|
# take into account the toolchain passed at configure time.
|
|
LVM2_MAKE_ENV = $(TARGET_CONFIGURE_OPTS)
|
|
|
|
# package/readline is GPL-3.0+, so not license compatible
|
|
LVM2_CONF_OPTS += --disable-readline
|
|
|
|
LVM2_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR)
|
|
LVM2_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR)
|
|
|
|
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
|
|
LVM2_CONF_OPTS += --enable-udev_rules
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
|
LVM2_CONF_OPTS += --enable-selinux
|
|
LVM2_DEPENDENCIES += libselinux
|
|
else
|
|
LVM2_CONF_OPTS += --disable-selinux
|
|
endif
|
|
|
|
ifeq ($(BR2_PACKAGE_LVM2_STANDARD_INSTALL),y)
|
|
LVM2_DEPENDENCIES += libaio
|
|
LVM2_INSTALL_STAGING_OPTS += install
|
|
LVM2_INSTALL_TARGET_OPTS += install
|
|
ifeq ($(BR2_INIT_SYSTEMD),y)
|
|
LVM2_INSTALL_TARGET_OPTS += install_systemd_units install_systemd_generators
|
|
endif
|
|
else
|
|
LVM2_MAKE_OPTS = device-mapper
|
|
LVM2_INSTALL_STAGING_OPTS += install_device-mapper
|
|
LVM2_INSTALL_TARGET_OPTS += install_device-mapper
|
|
endif
|
|
|
|
ifeq ($(BR2_TOOLCHAIN_SUPPORTS_PIE),)
|
|
LVM2_CONF_ENV += ac_cv_flag_HAVE_PIE=no
|
|
endif
|
|
|
|
HOST_LVM2_DEPENDENCIES = host-pkgconf host-libaio
|
|
HOST_LVM2_CONF_OPTS = \
|
|
--enable-write_install \
|
|
--enable-pkgconfig \
|
|
--disable-cmdlib \
|
|
--disable-dmeventd \
|
|
--disable-fsadm \
|
|
--disable-readline \
|
|
--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))
|