blob: 364beec5d86e6c70d6e98b0435c9877666444205 [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
Andrew Geissler9aee5002022-03-30 16:27:02 +00005LICENSE = "GPL-2.0-only"
Andrew Geissler595f6302022-01-24 19:11:47 +00006LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8PE = "1"
9
Patrick Williamsde0582f2022-04-08 10:23:27 -050010SRCREV = "631d5f72a223288aa1f48bb8e8d0313e75947400"
Andrew Geissler595f6302022-01-24 19:11:47 +000011SRC_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 \
Patrick Williamsde0582f2022-04-08 10:23:27 -050013 file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \
Andrew Geissler517393d2023-01-13 08:55:19 -060014 file://0001-install-Do-not-undef-_FILE_OFFSET_BITS.patch \
Andrew Geissler595f6302022-01-24 19:11:47 +000015 "
16
17DEPENDS += "kmod"
18DEPENDS:append:libc-musl = " fts"
19
20inherit bash-completion pkgconfig
21
22S = "${WORKDIR}/git"
23
24EXTRA_OECONF = "--prefix=${prefix} \
25 --libdir=${prefix}/lib \
26 --datadir=${datadir} \
27 --sysconfdir=${sysconfdir} \
28 --sbindir=${sbindir} \
29 --disable-documentation \
30 --bindir=${bindir} \
31 --includedir=${includedir} \
32 --localstatedir=${localstatedir} \
33 "
34
35# RDEPEND on systemd optionally
36PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
37PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
38
39EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
40
Patrick Williamsde0582f2022-04-08 10:23:27 -050041CFLAGS:append = " -fPIC"
Andrew Geissler595f6302022-01-24 19:11:47 +000042LDLIBS:append:libc-musl = " -lfts"
43
44do_configure() {
45 ./configure ${EXTRA_OECONF}
46}
47
48do_install() {
49 oe_runmake install DESTDIR=${D}
50 # Its Makefile uses cp -arx to install modules.d, so fix the owner
51 # to root:root
52 chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
53}
54
55FILES:${PN} += "${prefix}/lib/kernel \
56 ${prefix}/lib/dracut \
57 ${systemd_unitdir} \
58 "
59FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug"
60
61CONFFILES:${PN} += "${sysconfdir}/dracut.conf"
62
63RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
64
65# This could be optimized a bit, but let's avoid non-booting systems :)
66RRECOMMENDS:${PN} = " \
67 kernel-modules \
68 busybox \
69 coreutils \
70 "
71
72# CVE-2010-4176 affects only Fedora
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000073CVE_CHECK_IGNORE += "CVE-2010-4176"