blob: 73c2e0915f3e9be488c26ad3c7f614dc4332de5a [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "Initramfs generator using udev"
Brad Bishopd7bf8c12018-02-25 22:55:05 -05002HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
Patrick Williamsb48b7b42016-08-17 15:04:38 -05003DESCRIPTION = "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"
Andrew Geissler72956ed2021-01-08 16:11:14 -06009PV = "051"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050010
Andrew Geissler72956ed2021-01-08 16:11:14 -060011SRCREV = "e473057ae1de303340dec297c786c4a701cc61bd"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050012SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
13 file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
14 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050015
Brad Bishopd7bf8c12018-02-25 22:55:05 -050016DEPENDS += "kmod"
Patrick Williams213cb262021-08-07 19:21:33 -050017DEPENDS:append:libc-musl = " fts"
Brad Bishopd7bf8c12018-02-25 22:55:05 -050018
19inherit bash-completion pkgconfig
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020
21S = "${WORKDIR}/git"
22
23EXTRA_OECONF = "--prefix=${prefix} \
24 --libdir=${prefix}/lib \
25 --datadir=${datadir} \
26 --sysconfdir=${sysconfdir} \
27 --sbindir=${sbindir} \
28 --disable-documentation \
29 --bindir=${bindir} \
30 --includedir=${includedir} \
31 --localstatedir=${localstatedir} \
32 "
33
34# RDEPEND on systemd optionally
Brad Bishop6e60e8b2018-02-01 10:27:11 -050035PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050036PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
37
Brad Bishopd7bf8c12018-02-25 22:55:05 -050038EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
39
Patrick Williams213cb262021-08-07 19:21:33 -050040LDLIBS:append:libc-musl = " -lfts"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050041
42do_configure() {
43 ./configure ${EXTRA_OECONF}
44}
45
46do_install() {
47 oe_runmake install DESTDIR=${D}
48 # Its Makefile uses cp -arx to install modules.d, so fix the owner
49 # to root:root
50 chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
51}
52
Patrick Williams213cb262021-08-07 19:21:33 -050053FILES:${PN} += "${prefix}/lib/kernel \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050054 ${prefix}/lib/dracut \
55 ${systemd_unitdir} \
56 "
Patrick Williams213cb262021-08-07 19:21:33 -050057FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050058
Patrick Williams213cb262021-08-07 19:21:33 -050059CONFFILES:${PN} += "${sysconfdir}/dracut.conf"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050060
Patrick Williams213cb262021-08-07 19:21:33 -050061RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050062
63# This could be optimized a bit, but let's avoid non-booting systems :)
Patrick Williams213cb262021-08-07 19:21:33 -050064RRECOMMENDS:${PN} = " \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050065 kernel-modules \
66 busybox \
Patrick Williamsddad1a12017-02-23 20:36:32 -060067 coreutils \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050068 "
Andrew Geissler69721092021-07-23 12:57:00 -040069
70# CVE-2010-4176 affects only Fedora
71CVE_CHECK_WHITELIST += "CVE-2010-4176"