Bug 2173100 - dracut dracut-059-1.fc39 and newer breaks kernel builds
Summary: dracut dracut-059-1.fc39 and newer breaks kernel builds
Keywords:
Status: MODIFIED
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 39
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
Assignee: Pavel Valena
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-23 22:30 UTC by Justin M. Forbes
Modified: 2023-08-16 08:06 UTC (History)
5 users (show)

Fixed In Version: dracut-059-3.fc39
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)
Koji dracut output with debug passed. (18.93 KB, text/plain)
2023-02-24 14:39 UTC, Justin M. Forbes
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github dracutdevs dracut pull 2237 0 None open fix(dracut.sh): kmoddir does not handle trailing / 2023-02-24 18:44:23 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.