[packages/dracut/DRACUT_103] cherry pick fix for glibc 2.44; rel 2
atler
atler at pld-linux.org
Sat Aug 8 21:37:29 CEST 2026
commit 2490ff32b210c048a6648a9875db2a659c84a401
Author: Jan Palus <atler at pld-linux.org>
Date: Sat Aug 8 21:34:50 2026 +0200
cherry pick fix for glibc 2.44; rel 2
with glibc 2.44 our current drucut produced unusable images (see commit
message for details)
dracut.spec | 14 ++++++++------
glibc-2.44.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+), 6 deletions(-)
---
diff --git a/dracut.spec b/dracut.spec
index 3bd0118..aad1b65 100644
--- a/dracut.spec
+++ b/dracut.spec
@@ -2,7 +2,7 @@ Summary: Initramfs generator using udev
Summary(pl.UTF-8): Generator initramfs wykorzystujący udev
Name: dracut
Version: 103
-Release: 1
+Release: 2
License: GPL v2+
Group: Base
Source0: https://github.com/dracut-ng/dracut-ng/archive/%{version}/%{name}-%{version}.tar.gz
@@ -13,6 +13,7 @@ Patch2: arch-libdir.patch
Patch3: systemd-paths.patch
Patch4: cryptsetup.patch
Patch5: bash.patch
+Patch6: glibc-2.44.patch
URL: https://github.com/dracut-ng/dracut-ng/wiki
BuildRequires: asciidoc
BuildRequires: dash
@@ -179,11 +180,12 @@ Bashowe dopełnianie składni dla polecenia dracut.
%prep
%setup -q -n dracut-ng-%{version}
-%patch0 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
+%patch -P0 -p1
+%patch -P2 -p1
+%patch -P3 -p1
+%patch -P4 -p1
+%patch -P5 -p1
+%patch -P6 -p1
%{__sed} -i -e 's, at libexecdir@,%{_libexecdir},g' modules.d/50plymouth/module-setup.sh
%{__sed} -i -e 's, at lib@,%{_lib},g' modules.d/95resume/module-setup.sh
diff --git a/glibc-2.44.patch b/glibc-2.44.patch
new file mode 100644
index 0000000..9443000
--- /dev/null
+++ b/glibc-2.44.patch
@@ -0,0 +1,42 @@
+From 40e7af014b47ab91ef559610af3cb3f8dbf0fbb9 Mon Sep 17 00:00:00 2001
+From: Josh Poimboeuf <jpoimboe at kernel.org>
+Date: Wed, 15 Apr 2026 10:21:07 -0700
+Subject: [PATCH] fix(dracut-install): remove FTS_NOSTAT in install_modules()
+ fts traversal
+
+install_modules() uses FTS_NOSTAT when traversing kernel module
+directories. With FTS_NOSTAT, fts may skip stat() and report regular
+files as FTS_NSOK instead of FTS_F. However, the fts_info check only
+accepts FTS_F and FTS_SL, causing all .ko files found this way to be
+silently skipped.
+
+This was previously masked by glibc's fts implementation which ignored
+FTS_NOSTAT when FTS_LOGICAL was also set, always calling stat and
+returning FTS_F. A recent glibc change (commit 99303f3871, "io: Use
+gnulib fts implementation") now honors FTS_NOSTAT regardless, exposing
+this bug.
+
+The result is that all '=directory' pattern module installs (=drivers,
+=crypto, =fs, etc.) find zero modules, producing an initramfs with only
+explicitly-named modules (~40 instead of ~500+), which typically fails
+to boot.
+
+Fix it by removing FTS_NOSTAT so that fts always stats files and
+reliably reports actual file types.
+---
+ 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 efa64306ec..ac70b8dd77 100644
+--- a/src/install/dracut-install.c
++++ b/src/install/dracut-install.c
+@@ -2708,7 +2708,7 @@ static int install_modules(int argc, char **argv)
+
+ {
+ char *paths[] = { path1, path2, path3, NULL };
+- fts = fts_open(paths, FTS_COMFOLLOW | FTS_NOCHDIR | FTS_NOSTAT | FTS_LOGICAL, NULL);
++ fts = fts_open(paths, FTS_COMFOLLOW | FTS_NOCHDIR | FTS_LOGICAL, NULL);
+ }
+
+ for (FTSENT *ftsent = fts_read(fts); ftsent != NULL; ftsent = fts_read(fts)) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dracut.git/commitdiff/2490ff32b210c048a6648a9875db2a659c84a401
More information about the pld-cvs-commit
mailing list