blob: 3eee6669a32e62d91796c63fea99739cfa9f330b [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SUMMARY = "Initramfs generator using udev"
2HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
3DESCRIPTION = "Dracut is an event driven initramfs infrastructure. dracut (the tool) is used to create an initramfs image by copying tools and files from an installed system and combining it with the dracut framework, usually found in /usr/lib/dracut/modules.d."
4
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8PE = "1"
9
10SRCREV = "86bf2533d77762e823ad7a3e06a574522c1a90e3"
11SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http;branch=master \
12 file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
13 "
14
15DEPENDS += "kmod"
16DEPENDS:append:libc-musl = " fts"
17
18inherit bash-completion pkgconfig
19
20S = "${WORKDIR}/git"
21
22EXTRA_OECONF = "--prefix=${prefix} \
23 --libdir=${prefix}/lib \
24 --datadir=${datadir} \
25 --sysconfdir=${sysconfdir} \
26 --sbindir=${sbindir} \
27 --disable-documentation \
28 --bindir=${bindir} \
29 --includedir=${includedir} \
30 --localstatedir=${localstatedir} \
31 "
32
33# RDEPEND on systemd optionally
34PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
35PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
36
37EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
38
39LDLIBS:append:libc-musl = " -lfts"
40
41do_configure() {
42 ./configure ${EXTRA_OECONF}
43}
44
45do_install() {
46 oe_runmake install DESTDIR=${D}
47 # Its Makefile uses cp -arx to install modules.d, so fix the owner
48 # to root:root
49 chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
50}
51
52FILES:${PN} += "${prefix}/lib/kernel \
53 ${prefix}/lib/dracut \
54 ${systemd_unitdir} \
55 "
56FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug"
57
58CONFFILES:${PN} += "${sysconfdir}/dracut.conf"
59
60RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
61
62# This could be optimized a bit, but let's avoid non-booting systems :)
63RRECOMMENDS:${PN} = " \
64 kernel-modules \
65 busybox \
66 coreutils \
67 "
68
69# CVE-2010-4176 affects only Fedora
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000070CVE_CHECK_IGNORE += "CVE-2010-4176"