Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "Initramfs generator using udev" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 2 | HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 3 | DESCRIPTION = "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 | |
| 5 | LICENSE = "GPLv2" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" |
| 7 | |
| 8 | PE = "1" |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 9 | PV = "051" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 10 | |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 11 | SRCREV = "e473057ae1de303340dec297c786c4a701cc61bd" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 12 | SRC_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 Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 15 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 16 | DEPENDS += "kmod" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 17 | DEPENDS:append:libc-musl = " fts" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 18 | |
| 19 | inherit bash-completion pkgconfig |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 20 | |
| 21 | S = "${WORKDIR}/git" |
| 22 | |
| 23 | EXTRA_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 Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 35 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 36 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd" |
| 37 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 38 | EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"' |
| 39 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | LDLIBS:append:libc-musl = " -lfts" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 41 | |
| 42 | do_configure() { |
| 43 | ./configure ${EXTRA_OECONF} |
| 44 | } |
| 45 | |
| 46 | do_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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | FILES:${PN} += "${prefix}/lib/kernel \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 54 | ${prefix}/lib/dracut \ |
| 55 | ${systemd_unitdir} \ |
| 56 | " |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 57 | FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 58 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 59 | CONFFILES:${PN} += "${sysconfdir}/dracut.conf" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 60 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 61 | RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 62 | |
| 63 | # This could be optimized a bit, but let's avoid non-booting systems :) |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 64 | RRECOMMENDS:${PN} = " \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 65 | kernel-modules \ |
| 66 | busybox \ |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 67 | coreutils \ |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 68 | " |
Andrew Geissler | 6972109 | 2021-07-23 12:57:00 -0400 | [diff] [blame] | 69 | |
| 70 | # CVE-2010-4176 affects only Fedora |
| 71 | CVE_CHECK_WHITELIST += "CVE-2010-4176" |