diff --git a/sys-kernel/dracut/dracut-057.ebuild b/sys-kernel/dracut/dracut-057-r1.ebuild similarity index 94% rename from sys-kernel/dracut/dracut-057.ebuild rename to sys-kernel/dracut/dracut-057-r1.ebuild index 27e50da..e4d5342 100644 --- a/sys-kernel/dracut/dracut-057.ebuild +++ b/sys-kernel/dracut/dracut-057-r1.ebuild @@ -64,6 +64,8 @@ QA_MULTILIB_PATHS="usr/lib/dracut/.*" PATCHES=( "${FILESDIR}"/gentoo-ldconfig-paths-r1.patch "${FILESDIR}"/057-aggressive-strip-typo.patch + "${FILESDIR}"/057-virtiofs-split-usr.patch + "${FILESDIR}"/057-i18n-keymaps.patch ) src_configure() { @@ -72,13 +74,17 @@ src_configure() { --sysconfdir="${EPREFIX}/etc" --bashcompletiondir="$(get_bashcompdir)" --systemdsystemunitdir="$(systemd_get_systemunitdir)" - --enable-dracut-cpio="$(usex dracut-cpio)" ) tc-export CC PKG_CONFIG echo ./configure "${myconf[@]}" ./configure "${myconf[@]}" || die + + if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then + # Source tarball from github doesn't include this file + echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die + fi } src_test() { diff --git a/sys-kernel/dracut/dracut-9999.ebuild b/sys-kernel/dracut/dracut-9999.ebuild index e9206b9..c2b129e 100644 --- a/sys-kernel/dracut/dracut-9999.ebuild +++ b/sys-kernel/dracut/dracut-9999.ebuild @@ -78,6 +78,11 @@ src_configure() { echo ./configure "${myconf[@]}" ./configure "${myconf[@]}" || die + + if [[ ${PV} != 9999 && ! -f dracut-version.sh ]] ; then + # Source tarball from github doesn't include this file + echo "DRACUT_VERSION=${PV}" > dracut-version.sh || die + fi } src_test() { diff --git a/sys-kernel/dracut/files/057-i18n-keymaps.patch b/sys-kernel/dracut/files/057-i18n-keymaps.patch new file mode 100644 index 0000000..77ac607 --- /dev/null +++ b/sys-kernel/dracut/files/057-i18n-keymaps.patch @@ -0,0 +1,28 @@ +From bef99c5120809cc5603e51dcc1987767205f241f Mon Sep 17 00:00:00 2001 +From: Antonio Alvarez Feijoo +Date: Mon, 27 Jun 2022 13:19:41 +0200 +Subject: [PATCH] fix(i18n): add required includes for keymaps + +Commit https://github.com/dracutdevs/dracut/commit/f3441cc7 removed shell +options but didn't adapt all the code that requires nullglob and globstar. +This caused the initrd to be generated without the required includes for +keymaps. +--- + modules.d/10i18n/module-setup.sh | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/modules.d/10i18n/module-setup.sh b/modules.d/10i18n/module-setup.sh +index 35bda36fb..6fd5fd433 100755 +--- a/modules.d/10i18n/module-setup.sh ++++ b/modules.d/10i18n/module-setup.sh +@@ -63,7 +63,9 @@ install() { + readarray -t INCLUDES < <("$CMD" '^include ' "$MAP" | while read -r _ a _ || [ -n "$a" ]; do echo "${a//\"/}"; done) + + for INCL in "${INCLUDES[@]}"; do +- for FN in "$dracutsysrootdir""${kbddir}"/keymaps/**/"$INCL"*; do ++ local -a FNS ++ mapfile -t -d '' FNS < <(find "${dracutsysrootdir}${kbddir}"/keymaps/ -type f -name "${INCL}*" -print0) ++ for FN in "${FNS[@]}"; do + [[ -f $FN ]] || continue + [[ -v KEYMAPS["$FN"] ]] || findkeymap "$FN" + done diff --git a/sys-kernel/dracut/files/057-virtiofs-split-usr.patch b/sys-kernel/dracut/files/057-virtiofs-split-usr.patch new file mode 100644 index 0000000..5bb51a9 --- /dev/null +++ b/sys-kernel/dracut/files/057-virtiofs-split-usr.patch @@ -0,0 +1,43 @@ +From dd63cc0a25f9fb34a2f28306c06a668d66564463 Mon Sep 17 00:00:00 2001 +From: Mike Gilbert +Date: Mon, 4 Jul 2022 19:08:45 -0400 +Subject: [PATCH] fix(virtiofs): make shebangs work on split-usr systems + +Fixes: c29325a982013a315418cdb2318e90cf77e387b5 +Signed-off-by: Mike Gilbert +--- + modules.d/95virtiofs/module-setup.sh | 2 +- + modules.d/95virtiofs/mount-virtiofs.sh | 2 +- + modules.d/95virtiofs/parse-virtiofs.sh | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/modules.d/95virtiofs/module-setup.sh b/modules.d/95virtiofs/module-setup.sh +index e5f209e0a..70c10584a 100755 +--- a/modules.d/95virtiofs/module-setup.sh ++++ b/modules.d/95virtiofs/module-setup.sh +@@ -1,4 +1,4 @@ +-#!/usr/bin/bash ++#!/bin/bash + + # called by dracut + check() { +diff --git a/modules.d/95virtiofs/mount-virtiofs.sh b/modules.d/95virtiofs/mount-virtiofs.sh +index 507911cf5..c7e31d041 100755 +--- a/modules.d/95virtiofs/mount-virtiofs.sh ++++ b/modules.d/95virtiofs/mount-virtiofs.sh +@@ -1,4 +1,4 @@ +-#!/usr/bin/sh ++#!/bin/sh + + if [ "${fstype}" = "virtiofs" -o "${root%%:*}" = "virtiofs" ]; then + if ! { modprobe virtiofs || strstr "$(cat /proc/filesystems)" virtiofs; }; then +diff --git a/modules.d/95virtiofs/parse-virtiofs.sh b/modules.d/95virtiofs/parse-virtiofs.sh +index 8b8cf760d..760e41385 100755 +--- a/modules.d/95virtiofs/parse-virtiofs.sh ++++ b/modules.d/95virtiofs/parse-virtiofs.sh +@@ -1,4 +1,4 @@ +-#!/usr/bin/sh ++#!/bin/sh + # Accepted formats: + # rootfstype=virtiofs root= + # root=virtiofs: