Debian Patches

Status for dracut/108-3

Patch Description Author Forwarded Bugs Origin Last update
udevsettle udevsettle
In a KVM VM the network is not configured properly, it shows ens3
(instead of eth0), which is not in status up and no IP address.
Thomas Lange <lange@debian.org> no 2025-08-04
debian-initramfs-post-update.patch Run bootloader hooks from /etc/initramfs/post-update.d after making the image, and add $NO_POST_UPDATE_HOOKS to disable this

See <https://kernel-team.pages.debian.net/kernel-handbook/ch-update-hooks.html#s-initramfs-hooks>
=?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz> not-needed debian 2022-11-17
test-skip-using-kernel-install-due-to-bug-1104848.patch test: skip using kernel-install due to bug #1104848
Test 12 fails on Debian:

```
Not removing /tmp/autopkgtest-lxc.ctfqn41q/downtmp/autopkgtest_tmp/dracut-test.kzFcFU/dracut.dNC7kmJ.
Using ukify via kernel-install to create UKI
Not adding version '6.12.25-amd64', because kernel image not found.
No kernels to install found.
[...]
```

Skip using kernel-install in test 12 and wait for the kernel-install
issue reported in https://bugs.debian.org/1104848 to be fixed.
Benjamin Drung <benjamin.drung@canonical.com> not-needed 2025-05-07
fix-dracut-do-not-call-uname-r-in-chroot-environments.patch fix(dracut): do not call uname -r in chroot environments
Running dracut in a schroot environment (even with `systemd-detect-virt`
installed) will pick `uname -r` as kernel version despite that kernel
not being available.

So also check `systemd-detect-virt --chroot` before relying on
`uname -r`.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-04
feat-debian.conf-default-to-initrd.img-kernel-on-Debian-U.patch feat(debian.conf): default to initrd.img-${kernel} on Debian/Ubuntu
Extend the Debian/Ubuntu Dracut configuration to change the default
`initrdname` to `initrd.img-${kernel}`. This is done to keep the name
the same as initramfs-tools which has been the default for a long time.
This change will be carried for quite some time to ease the switch from
initramfs-tools to dracut.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-07-30
test-drop-requiring-iscsiuio.socket.patch test: drop requiring iscsiuio.socket
The iscsiuio socket/service is only needed on specific hardware. It is
not needed for the ISCSI and ISCSI-MULTI test cases. Without this check
the tests will succeed on Debian and Ubuntu.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-06
feat-Makefile-set-Dracut-version-on-install.patch feat(Makefile): set Dracut version on install
Distributions can override `DRACUT_VERSION` or `DRACUT_FULL_VERSION` to
include the distribution's revision in the dracut version. This override
is not reflected in the installed `dracut-version.sh` and needs to be
modified by the distribution.

Persist the version in the installed `dracut-version.sh` during
`make install`.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-04
feat-Makefile-introduce-distclean-target.patch feat(Makefile): introduce distclean target
Add a `distclean` target to remove all generated files including the one
(`Makefile.inc`) created by `configure`. Calling `make distclean` should
have the same result as `git clean -fdx`.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-05
fix-hwdb-make-module-setup.sh-executable.patch fix(hwdb): make module-setup.sh executable
The `module-setup.sh` scripts are shell scripts and should be
executable.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-05
fix-Makefile-use-install-for-installing-files.patch fix(Makefile): use install for installing files
The `cp` command will copy the file/directory permissions from the
source files. The local source files might have group write permission
set which should not be applied to the installation.

Tighten the file/directory permission by using the `install` command
with specifying the mode.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-05
fix-Makefile-exclude-hidden-directories-from-shellcheck.patch fix(Makefile): exclude hidden directories from shellcheck
`shfmt -f .` also searches in hidden directories (like `.git` or
`.pc`). The `.pc` is used on Debian for patch tracking and should not be
searched for files.

So ignore the top-level hidden directories from shellcheck.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-13
fix-dm-dmraid-shellcheck-SC2268.patch fix(dm,dmraid): shellcheck SC2268
Shellcheck 0.11 complains about SC2268 (style): Avoid x-prefix in
comparisons as it no longer serves a purpose.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-13
fix-ignore-shellcheck-SC2329-in-addition-to-SC2317.patch fix: ignore shellcheck SC2329 in addition to SC2317
Shellcheck <= 0.10 complains about SC2317 (info): Command appears to be
unreachable. Check usage (or ignore if invoked indirectly). Shellcheck
0.11 changes this complaint to SC2329 (info): This function is never
invoked. Check usage (or ignored if invoked indirectly).

So ignore shellcheck SC2329 in addition to SC2317 to make both
shellcheck versions happy.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-13
fix-dracut-util-crash-if-CMDLINE-ends-with-quotation-mark.patch fix(dracut-util): crash if CMDLINE ends with quotation mark
Sudhakar Verma from the Ubuntu security team found a memory corruption:

```
$ pwd
/tmp/dracut-ng/src/util
$ CC=clang-17 CXX=clang++-17 CFLAGS="-fsanitize=address" cmake .
-- The C compiler identification is Clang 17.0.6
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang-17 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done (0.3s)
-- Generating done (0.0s)
-- Build files have been written to: /tmp/dracut-ng/src/util
$ CC=clang-17 CXX=clang++-17 CFLAGS="-fsanitize=address" make
[ 50%] Building C object CMakeFiles/dracut-util.dir/util.c.o
[100%] Linking C executable dracut-util
[100%] Built target dracut-util
$ ln -s $PWD/dracut-util dracut-getargs
$ ln -s $PWD/dracut-util dracut-getarg

$ CMDLINE=' "' ./dracut-getarg ' '
AddressSanitizer:DEADLYSIGNAL
=================================================================
==163118==ERROR: AddressSanitizer: SEGV on unknown address 0x50210000001d (pc 0x599a6b7d4c07 bp 0x7ffe44ea9ef0 sp 0x7ffe44ea9da0 T0)
==163118==The signal is caused by a READ memory access.
#0 0x599a6b7d4c07 in next_arg util.c
#1 0x599a6b7d3e75 in getarg util.c
#2 0x599a6b7d3448 in main (/tmp/dracut-ng/src/util/dracut-util+0x108448) (BuildId: ea28a61b3c6dd0a75c505cd1749f8711779bd819)
#3 0x72381be2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#4 0x72381be2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
#5 0x599a6b6f7304 in _start (/tmp/dracut-ng/src/util/dracut-util+0x2c304) (BuildId: ea28a61b3c6dd0a75c505cd1749f8711779bd819)

AddressSanitizer can not provide additional info.
==163118==ABORTING
```

The variable `i` in `next_arg` is an unsigned integeter. `i - 1` will
result in an underflow in case `i` is 0.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-07
fix-kernel-modules-add-Cadence-USB-driver-to-base.patch fix(kernel-modules): add Cadence USB driver to base
Installed Debian Trixie d-i rc2 (dvd-1) on USB storage on Pine64 Star64
is not bootable due to missing modules `cdns3_starfive` and `cdns3` from
initramfs.

Note the above USB support on Pine64 Star64 is directly part of StarFive
JH7110 CPU and differs from StarFive VisionFive2 which uses an external
controller attached to the PCIe bus.
Benjamin Drung <benjamin.drung@canonical.com> yes debian 2025-07-31
fix-lsinitrd-avoid-rechecking-for-squash-images.patch fix(lsinitrd): avoid rechecking for squash images
The function `extract_squash_img` uses `SQUASH_TMPDIR` to check that it
was already called but did not find any squash image.

Instead of setting `SQUASH_TMPDIR` `SQUASH_TMPFILE` was set and
therefore the cpio file is searched again on every `extract_squash_img`
call.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-11
refactor-lsinitrd-introduce-cpio_extract-function.patch refactor(lsinitrd): introduce cpio_extract function
In preparation to support 3cpio as alternative archive tool, move the
cpio extraction call into `cpio_extract`.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-06
refactor-lsinitrd-introduce-cpio_extract_to_stdout-functi.patch refactor(lsinitrd): introduce cpio_extract_to_stdout function
In preparation to support 3cpio as alternative archive tool, move the
cpio extraction to stdout call into `cpio_extract_to_stdout`.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-06
refactor-lsinitrd-introduce-cpio_list-function.patch refactor(lsinitrd): introduce cpio_list function
In preparation to support 3cpio as alternative archive tool, move the
cpio listing call into `cpio_list`.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-06
feat-lsinitrd-support-3cpio.patch feat(lsinitrd): support 3cpio
`3cpio` is written in Rust and faster than `cpio`. Use `3cpio` in
`lsinitrd` in case it is available.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-09
refactor-dracut-introduce-cpio_extract-function.patch refactor(dracut): introduce cpio_extract function
In preparation to support 3cpio as alternative archive tool, move the
cpio extraction call into `cpio_extract`.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-12
feat-dracut-support-3cpio-for-creating-initrds.patch feat(dracut): support 3cpio for creating initrds
`3cpio` is written in Rust and faster than `cpio`. Use `3cpio` in
`dracut.sh` in case it is available. `3cpio` supports
`SOURCE_DATE_EPOCH` and therefore clamping the files is not needed.
Benjamin Drung <benjamin.drung@canonical.com> yes 2025-08-13

All known versions for source package 'dracut'

Links