mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-26 19:47:17 +00:00
7f17da1543
If we enable 'cryptsetup' PACKAGECONFIG for systemd, there would be circular dependency issue among 'systemd', 'cryptsetup' and 'lvm2'. cryptsetup only needs libdevmapper from lvm2. So we separte libdevmapper into a new recipe to solve this circular dependency issue. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
82 lines
3.1 KiB
BlitzBasic
82 lines
3.1 KiB
BlitzBasic
require lvm2.inc
|
|
|
|
SRC_URI[md5sum] = "c5a54ee0b86703daaad6e856439e115a"
|
|
SRC_URI[sha256sum] = "e120b066b85b224552efda40204488c5123de068725676fd6e5c8bc655051b94"
|
|
|
|
DEPENDS += "autoconf-archive-native"
|
|
|
|
LVM2_PACKAGECONFIG = "dmeventd lvmetad"
|
|
LVM2_PACKAGECONFIG_append_class-target = " \
|
|
${@bb.utils.filter('DISTRO_FEATURES', 'selinux', d)} \
|
|
thin-provisioning-tools \
|
|
udev \
|
|
"
|
|
|
|
PACKAGECONFIG ??= "${LVM2_PACKAGECONFIG}"
|
|
|
|
# Unset user/group to unbreak install.
|
|
EXTRA_OECONF = "--with-user= \
|
|
--with-group= \
|
|
--enable-realtime \
|
|
--enable-applib \
|
|
--enable-cmdlib \
|
|
--enable-pkgconfig \
|
|
--with-usrlibdir=${libdir} \
|
|
--with-systemdsystemunitdir=${systemd_system_unitdir} \
|
|
--disable-thin_check_needs_check \
|
|
--with-thin-check=${sbindir}/thin_check \
|
|
--with-thin-dump=${sbindir}/thin_dump \
|
|
--with-thin-repair=${sbindir}/thin_repair \
|
|
--with-thin-restore=${sbindir}/thin_restore \
|
|
"
|
|
|
|
CACHED_CONFIGUREVARS += "MODPROBE_CMD=${base_sbindir}/modprobe"
|
|
|
|
do_install_append() {
|
|
# Install machine specific configuration file
|
|
install -d ${D}${sysconfdir}/lvm
|
|
install -m 0644 ${WORKDIR}/lvm.conf ${D}${sysconfdir}/lvm/lvm.conf
|
|
sed -i -e 's:@libdir@:${libdir}:g' ${D}${sysconfdir}/lvm/lvm.conf
|
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
|
|
oe_runmake 'DESTDIR=${D}' install install_systemd_units
|
|
sed -i -e 's:/usr/bin/true:${base_bindir}/true:g' ${D}${systemd_system_unitdir}/blk-availability.service
|
|
else
|
|
oe_runmake 'DESTDIR=${D}' install install_initscripts
|
|
mv ${D}${sysconfdir}/rc.d/init.d ${D}${sysconfdir}/init.d
|
|
rm -rf ${D}${sysconfdir}/rc.d
|
|
fi
|
|
# Remove things related to libdevmapper
|
|
rm -f ${D}${sbindir}/dmsetup
|
|
rm -f ${D}${libdir}/libdevmapper.so.*
|
|
rm -f ${D}${libdir}/libdevmapper.so ${D}${libdir}/pkgconfig/devmapper.pc ${D}${includedir}/libdevmapper.h
|
|
}
|
|
|
|
PACKAGE_BEFORE_PN = "${PN}-scripts ${PN}-udevrules"
|
|
|
|
SYSTEMD_PACKAGES = "${PN}"
|
|
SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'dmeventd', 'lvm2-monitor.service dm-event.socket dm-event.service', '', d)} \
|
|
${@bb.utils.contains('PACKAGECONFIG', 'lvmetad', 'lvm2-lvmetad.socket lvm2-pvscan@.service', '', d)} \
|
|
blk-availability.service"
|
|
SYSTEMD_AUTO_ENABLE = "disable"
|
|
|
|
TARGET_CC_ARCH += "${LDFLAGS}"
|
|
|
|
FILES_${PN} += "${libdir}/device-mapper/*.so"
|
|
FILES_${PN}-scripts = " \
|
|
${sbindir}/blkdeactivate \
|
|
${sbindir}/fsadm \
|
|
${sbindir}/lvmconf \
|
|
${sbindir}/lvmdump \
|
|
"
|
|
# Specified explicitly for the udev rules, just in case that it does not get picked
|
|
# up automatically:
|
|
FILES_${PN}-udevrules = "${nonarch_base_libdir}/udev/rules.d"
|
|
RDEPENDS_${PN}_append_class-target = " libdevmapper"
|
|
|
|
RDEPENDS_${PN}-scripts = "${PN} (= ${EXTENDPKGV}) bash"
|
|
RRECOMMENDS_${PN}_class-target = "${PN}-scripts (= ${EXTENDPKGV})"
|
|
|
|
CONFFILES_${PN} += "${sysconfdir}/lvm/lvm.conf"
|
|
|
|
BBCLASSEXTEND = "native nativesdk"
|