summaryrefslogtreecommitdiffstats
path: root/meta-initramfs/recipes-devtools/dracut/dracut_111.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-initramfs/recipes-devtools/dracut/dracut_111.bb')
-rw-r--r--meta-initramfs/recipes-devtools/dracut/dracut_111.bb100
1 files changed, 100 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_111.bb b/meta-initramfs/recipes-devtools/dracut/dracut_111.bb
new file mode 100644
index 0000000000..8b88e441b8
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_111.bb
@@ -0,0 +1,100 @@
1SUMMARY = "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 = "GPL-2.0-only"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
7
8PE = "1"
9
10SRCREV = "b3b4f7ef914b84964a56500cfec83f21dc513e6a"
11SRC_URI = "git://github.com/dracut-ng/dracut-ng.git;protocol=http;branch=main;tag=${PV}"
12
13DEPENDS += "kmod"
14DEPENDS:append:libc-musl = " fts"
15
16inherit bash-completion pkgconfig
17
18EXTRA_OECONF = "--prefix=${prefix} \
19 --libdir=${nonarch_libdir} \
20 --datadir=${datadir} \
21 --sysconfdir=${sysconfdir} \
22 --sbindir=${sbindir} \
23 --bindir=${bindir} \
24 --includedir=${includedir} \
25 --localstatedir=${localstatedir} \
26 --disable-documentation \
27 "
28
29# RDEPEND on systemd optionally
30PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
31PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
32
33EXTRA_OEMAKE += 'libdir=${nonarch_libdir} LDLIBS="${LDLIBS}" enable_test=no DRACUT_FULL_VERSION=${PV}'
34
35CFLAGS:append = " -fPIC"
36LDLIBS:append:libc-musl = " -lfts"
37
38do_configure() {
39 ./configure ${EXTRA_OECONF}
40}
41
42do_install() {
43 oe_runmake install DESTDIR=${D}
44 # Its Makefile uses cp -arx to install modules.d, so fix the owner
45 # to root:root
46 chown -R root:root ${D}/${nonarch_libdir}/dracut/modules.d \
47 ${D}/${nonarch_libdir}/dracut/dracut.conf.d
48
49 if ! ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
50 rm -rf ${D}${nonarch_libdir}/systemd
51 fi
52}
53
54do_install:append:class-target () {
55 # Generate and install a config file listing where the DISTRO puts things, dracut
56 # is not always savvy enough to figure it out by itself
57 # Since this primarily fixes systemd issues, only install it when using systemd.
58 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
59 cat << EOF > ${B}/${DISTRO}.conf
60stdloglvl=3
61sysloglvl=5
62sysctlconfdir=${sysconfdir}/sysctl.d
63systemdutildir=${systemd_unitdir}
64systemdutilconfdir=${sysconfdir}/systemd
65systemdcatalog=${systemd_unitdir}catalog
66systemdntpunits=${systemd_unitdir}ntp-units.d
67systemdntpunitsconfdir=${sysconfdir}/systemd/ntp-units.d
68systemdportable=${systemd_unitdir}/portable
69systemdportableconfdir=${sysconfdir}/systemd/portable
70systemdsystemunitdir=${systemd_system_unitdir}
71systemdsystemconfdir=${sysconfdir}/systemd/system
72systemduser=${systemd_user_unitdir}
73systemduserconfdir=${sysconfdir}/systemd/user
74EOF
75 install -m 0644 ${B}/${DISTRO}.conf ${D}${nonarch_libdir}/dracut/dracut.conf.d/
76 fi
77}
78
79
80FILES:${PN} += "${nonarch_libdir}/kernel \
81 ${nonarch_libdir}/dracut \
82 ${systemd_unitdir} \
83 "
84FILES:${PN}-dbg += "${nonarch_libdir}/dracut/.debug"
85
86CONFFILES:${PN} += "${sysconfdir}/dracut.conf"
87
88# The native variant uses a non-ldd based method of getting library
89# dependencies, so ldd is only needed on the target
90RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash"
91RDEPENDS:${PN}:append:class-target = " ldd"
92
93# This could be optimized a bit, but let's avoid non-booting systems :)
94RRECOMMENDS:${PN}:class-target = "kernel-modules \
95 coreutils \
96 "
97
98BBCLASSEXTEND = "native nativesdk"
99
100CVE_STATUS[CVE-2010-4176] = "not-applicable-platform: Applies only to Fedora"