Bug 2173100

Summary: dracut dracut-059-1.fc39 and newer breaks kernel builds
Product: [Fedora] Fedora Reporter: Justin M. Forbes <jforbes>
Component: dracutAssignee: Pavel Valena <pvalena>
Status: MODIFIED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 39CC: dracut-maint-list, jamacku, lnykryn, pvalena, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dracut-059-3.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Koji dracut output with debug passed. none

Description Justin M. Forbes 2023-02-23 22:30:11 UTC
Description of problem:
Starting with Fedora 38, kernel builds call to dracut to build a UKI. See https://fedoraproject.org/wiki/Changes/Unified_Kernel_Support_Phase_1
This was working fine until the dracut updates this week.  Now x86_64 is failing with:

+ dracut --conf=/builddir/build/SOURCES/dracut-virt.conf --confdir=/tmp/tmp.WxC1nQa2D2 --verbose --kver 6.2.0-63.fc39.x86_64+debug --kmoddir /builddir/build/BUILDROOT/kernel-6.2.0-63.fc39.x86_64/lib/modules/6.2.0-63.fc39.x86_64+debug/ --logfile=/tmp/tmp.hyHNF2DrN5 --uefi --kernel-image /builddir/build/BUILD/kernel-6.2/linux-6.2.0-63.fc39.x86_64/arch/x86/boot/bzImage --kernel-cmdline 'console=tty0 console=ttyS0' /builddir/build/BUILDROOT/kernel-6.2.0-63.fc39.x86_64/lib/modules/6.2.0-63.fc39.x86_64+debug/vmlinuz-virt.efi
dracut: drivers_dir path set via -k/--kmoddir must contain "/lib/modules/" as a parent of your kernel module directory,
dracut: or modules may not be placed in the correct location inside the initramfs.
dracut: was given: /builddir/build/BUILDROOT/kernel-6.2.0-63.fc39.x86_64/lib/modules/6.2.0-63.fc39.x86_64+debug/
dracut: expected: /builddir/build/BUILDROOT/kernel-6.2.0-63.fc39.x86_64/lib/modules/6.2.0-63.fc39.x86_64+debug/lib/modules/6.2.0-63.fc39.x86_64+debug
dracut: Please move your modules into the correct directory structure and pass the new location,
dracut: or set DRACUT_KMODDIR_OVERRIDE=1 to ignore this check.
error: Bad exit status from /var/tmp/rpm-tmp.MU2Js2 (%build)

As you can see, this breaks the kernel build.  To verify that it was in fact the dracut update, and not something changed in kernel, I did scratch build of the srpm from kernel-6.2.0-63.fc39.  It built successfully on Monday, Feb 20, but the same SRPM fails with the above error now.

Both Fedora and ELN/RHEL kernels are failing.

Comment 1 Justin M. Forbes 2023-02-24 14:39:25 UTC
Created attachment 1946206 [details]
Koji dracut output with debug passed.

Comment 2 Pavel Valena 2023-02-24 18:18:49 UTC
Culprit is the trailing `/`, which dracut can't handle, unfortunately:

https://github.com/dracutdevs/dracut/issues/2236

I will submit an upstream fix, and patch in Rawhide as well.

Comment 3 Fedora Release Engineering 2023-08-16 08:06:57 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.