diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2022-04-01 17:41:59 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-04-06 20:25:33 -0400 |
commit | fcdafe933c96149b5e433d3755a75e7f9ee7a42c (patch) | |
tree | 377a4ecfe478964db0e0de023d747d3cdf9f986b /meta-initramfs/recipes-devtools/dracut/dracut_056.bb | |
parent | f00ec3db13a4eaa0b94a65ec587c795deb8aaefe (diff) | |
download | meta-openembedded-fcdafe933c96149b5e433d3755a75e7f9ee7a42c.tar.gz |
dracut: upgrade 055 -> 056
* Add a patch to fix musl build:
src/install/util.c:30:19: error: missing binary operator before token "("
30 | #if __GLIBC_PREREQ(2, 30) == 0
| ^
make: *** [Makefile:57: src/install/util.o] Error 1
* Pass "-fPIC" to CFLAGS to fix build warning with musl build:
WARNING: dracut-1_056-r0 do_package_qa: QA Issue: dracut: ELF binary
/usr/lib/dracut/dracut-install has relocations in .text [textrel]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-initramfs/recipes-devtools/dracut/dracut_056.bb')
-rw-r--r-- | meta-initramfs/recipes-devtools/dracut/dracut_056.bb | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_056.bb b/meta-initramfs/recipes-devtools/dracut/dracut_056.bb new file mode 100644 index 0000000000..7b89006103 --- /dev/null +++ b/meta-initramfs/recipes-devtools/dracut/dracut_056.bb | |||
@@ -0,0 +1,72 @@ | |||
1 | SUMMARY = "Initramfs generator using udev" | ||
2 | HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page" | ||
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 = "GPL-2.0-only" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | ||
7 | |||
8 | PE = "1" | ||
9 | |||
10 | SRCREV = "631d5f72a223288aa1f48bb8e8d0313e75947400" | ||
11 | SRC_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 | file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \ | ||
14 | " | ||
15 | |||
16 | DEPENDS += "kmod" | ||
17 | DEPENDS:append:libc-musl = " fts" | ||
18 | |||
19 | inherit bash-completion pkgconfig | ||
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 | ||
35 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
36 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd" | ||
37 | |||
38 | EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"' | ||
39 | |||
40 | CFLAGS:append = " -fPIC" | ||
41 | LDLIBS:append:libc-musl = " -lfts" | ||
42 | |||
43 | do_configure() { | ||
44 | ./configure ${EXTRA_OECONF} | ||
45 | } | ||
46 | |||
47 | do_install() { | ||
48 | oe_runmake install DESTDIR=${D} | ||
49 | # Its Makefile uses cp -arx to install modules.d, so fix the owner | ||
50 | # to root:root | ||
51 | chown -R root:root ${D}/${prefix}/lib/dracut/modules.d | ||
52 | } | ||
53 | |||
54 | FILES:${PN} += "${prefix}/lib/kernel \ | ||
55 | ${prefix}/lib/dracut \ | ||
56 | ${systemd_unitdir} \ | ||
57 | " | ||
58 | FILES:${PN}-dbg += "${prefix}/lib/dracut/.debug" | ||
59 | |||
60 | CONFFILES:${PN} += "${sysconfdir}/dracut.conf" | ||
61 | |||
62 | RDEPENDS:${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd" | ||
63 | |||
64 | # This could be optimized a bit, but let's avoid non-booting systems :) | ||
65 | RRECOMMENDS:${PN} = " \ | ||
66 | kernel-modules \ | ||
67 | busybox \ | ||
68 | coreutils \ | ||
69 | " | ||
70 | |||
71 | # CVE-2010-4176 affects only Fedora | ||
72 | CVE_CHECK_IGNORE += "CVE-2010-4176" | ||