Files
meta-openembedded/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
Hongxu Jia 4d45ebe7ad dracut: fix generated initramfs boot failure under bash 5
If shebang is set to /bin/sh and /bin/sh is a symlink to /bin/bash,
bash turn on posix mode.

Since bash is upgraded to 5.0, it follows 'IEEE 1003.2 POSIX Shell
Standard', to implement 'functions do not have local traps or options,
and it is not possible to define local variables'

For more detail, see variables.c:push_posix_temp_var in the following commit
http://git.savannah.gnu.org/cgit/bash.git/commit/?id=d233b485e83c3a784b803fb894280773f16f2deb

The IEEE 1003.2 POSIX Shell Standard:
https://www.cs.ait.ac.th/~on/O/oreilly/unix/ksh/appa_02.htm

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-06-21 06:22:19 -07:00

72 lines
2.4 KiB
BlitzBasic

SUMMARY = "Initramfs generator using udev"
HOMEPAGE = "https://dracut.wiki.kernel.org/index.php/Main_Page"
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."
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
PE = "1"
PV = "049"
# v048 tag
SRCREV = "225e4b94cbdb702cf512490dcd2ad9ca5f5b22c1"
SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
file://0001-dracut.sh-improve-udevdir.patch \
file://0001-set-viriable-_drv-not-local.patch \
"
DEPENDS += "kmod"
DEPENDS_append_libc-musl = " fts"
inherit bash-completion pkgconfig
S = "${WORKDIR}/git"
EXTRA_OECONF = "--prefix=${prefix} \
--libdir=${prefix}/lib \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--sbindir=${sbindir} \
--disable-documentation \
--bindir=${bindir} \
--includedir=${includedir} \
--localstatedir=${localstatedir} \
"
# RDEPEND on systemd optionally
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
LDLIBS_append_libc-musl = " -lfts"
do_configure() {
./configure ${EXTRA_OECONF}
}
do_install() {
oe_runmake install DESTDIR=${D}
# Its Makefile uses cp -arx to install modules.d, so fix the owner
# to root:root
chown -R root:root ${D}/${prefix}/lib/dracut/modules.d
}
FILES_${PN} += "${prefix}/lib/kernel \
${prefix}/lib/dracut \
${systemd_unitdir} \
"
FILES_${PN}-dbg += "${prefix}/lib/dracut/.debug"
CONFFILES_${PN} += "${sysconfdir}/dracut.conf"
RDEPENDS_${PN} = "findutils cpio util-linux-blkid util-linux-getopt util-linux bash ldd"
# This could be optimized a bit, but let's avoid non-booting systems :)
RRECOMMENDS_${PN} = " \
kernel-modules \
busybox \
coreutils \
"