From ef5bea6a633c60321beb9e13ea9568f1c8009d11 Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Thu, 13 Aug 2026 16:42:05 +0200 Subject: [PATCH 1/3] fix(dracut-install): warn about missing source files Files missing without any indication why causes trouble when debugging initramfs builds. --- src/install/dracut-install.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/dracut-install.c b/src/install/dracut-install.c index a3f0cdb7c4..b9409e0d31 100644 --- a/src/install/dracut-install.c +++ b/src/install/dracut-install.c @@ -1431,7 +1431,7 @@ static int dracut_install(const char *orig_src, const char *orig_dst, bool isdir if (!hash_path) return -ENOMEM; hashmap_put(items_failed, hash_path, hash_path); - /* src does not exist */ + log_debug("src does not exist: '%s'; fullsrcpath: '%s'", src, fullsrcpath); return 1; } } else { From bd188a826ff06592f7511e84fb6f855ca63e20ba Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Wed, 19 Aug 2026 23:21:56 +0200 Subject: [PATCH 2/3] fix(functions): warn about missing source in inst_simple Files missing without any indication why causes trouble when debugging initramfs builds. --- dracut-functions.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dracut-functions.sh b/dracut-functions.sh index 39a2767149..506d393739 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -1156,9 +1156,13 @@ inst_simple() { fi [[ -e ${dstdir}/"${2:-$1}" ]] && return 0 # already there if [[ $1 == /* ]]; then - [[ -e ${dracutsysrootdir-}/${1#"${dracutsysrootdir-}"} ]] || return 1 # no source - else - [[ -e $1 ]] || return 1 # no source + if [[ ! -e ${dracutsysrootdir-}/${1#"${dracutsysrootdir-}"} ]]; then + dwarn "no source: '$1'!" + return 1 + fi + elif [[ ! -e $1 ]]; then + dwarn "no source: '$1'!" + return 1 fi if $DRACUT_INSTALL ${dracutsysrootdir:+-r "$dracutsysrootdir"} ${dstdir:+-D "$dstdir"} ${loginstall:+-L "$loginstall"} ${_hostonly_install:+-H} "$@"; then return 0 From 9b7eeaebc1d9b081b210f2807879b6fc1b0e69fa Mon Sep 17 00:00:00 2001 From: Fiona Klute Date: Wed, 19 Aug 2026 18:22:45 +0200 Subject: [PATCH 3/3] fix(functions): avoid spurious warning for inst_simple -H If hostonly mode is enabled, a possible -H option is shifted out before processing the numbered arguments. If -H was passed and hostonly mode disabled, inst_simple would treat "-H" as a non-existing file and return an error code, skipping the actual file. The previous commit added a warning about missing source files, leading to spurious warnings with -H. Instead, explicitly skip inst_simple calls with -H if hostonly mode is disabled, and log a debug level message. --- dracut-functions.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dracut-functions.sh b/dracut-functions.sh index 506d393739..6dfbe87c4c 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -1150,9 +1150,14 @@ inst_script() { inst_simple() { local dstdir="${dstdir:-"$initdir"}" local _ret _hostonly_install - if [[ $1 == "-H" ]] && [[ $hostonly ]]; then - _hostonly_install="-H" - shift + if [[ $1 == "-H" ]]; then + if [[ $hostonly ]]; then + _hostonly_install="-H" + shift + else + ddebug "skipping install of '$2', not in hostonly mode" + return 0 + fi fi [[ -e ${dstdir}/"${2:-$1}" ]] && return 0 # already there if [[ $1 == /* ]]; then