]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
3 months agofeat(dracut): add busybox support for 3cpio and enhanced_cpio
Jo Zzsi [Tue, 13 Jan 2026 17:48:54 +0000 (12:48 -0500)] 
feat(dracut): add busybox support for 3cpio and enhanced_cpio

3cpio and enhanced_cpio is already supported with coreutils.

This PR adds support for 3cpio and enhanced_cpio for busybox as well.
busybox stat does not support `file-system` syntax, instead
it supports `-f` syntax only.

3 months agotest(DMSQUASH): use test_marker_check
Benjamin Drung [Thu, 15 Jan 2026 12:55:50 +0000 (13:55 +0100)] 
test(DMSQUASH): use test_marker_check

Use `test_marker_check` to shorten the test case code.

3 months agoci: replace non-standard PLATFORM with standard TARGETARCH
Jo Zzsi [Thu, 15 Jan 2026 13:45:18 +0000 (08:45 -0500)] 
ci: replace non-standard PLATFORM with standard TARGETARCH

The simple goal of this PR is to remove unnecessary variable
to make the code more readable and maintainable.

3 months agochore(dracut): remove support for 255 error for is_qemu_virtualized
Jo Zzsi [Wed, 14 Jan 2026 12:54:04 +0000 (07:54 -0500)] 
chore(dracut): remove support for 255 error for is_qemu_virtualized

Treat the return value as a boolean and not an integer, to simplify
the API before potentially exposing this API as a public API.

3 months agoci(Alpine): add support for EFI stub and ukify
Jo Zzsi [Wed, 14 Jan 2026 03:50:22 +0000 (22:50 -0500)] 
ci(Alpine): add support for EFI stub and ukify

alpine:edge has support for EFI stub and ukify. Adding these
packages would allow the projuct to increase CI test coverage.

3 months agofix(dracut): remove trailing null characters from SBATs when building UKIs
Li Tian [Wed, 14 Jan 2026 05:24:36 +0000 (13:24 +0800)] 
fix(dracut): remove trailing null characters from SBATs when building UKIs

SBAT of kernel has null character paddings at the end. Using tools
like ukify will display massive amount of '\0' in SBAT. Ukify is
doing ".rstrip('b\x00')" when merging SBATs.

3 months agotest(KERNEL-INSTALL): check kernel-install result
Benjamin Drung [Tue, 13 Jan 2026 14:36:22 +0000 (15:36 +0100)] 
test(KERNEL-INSTALL): check kernel-install result

The kernel-install call should create an `initrd` file that the test
will use later in `test_run`. Check that this file has been created to
ease debugging in case of a failure.

3 months agotest: drop duplicate check for -daemonize
Benjamin Drung [Tue, 13 Jan 2026 18:29:54 +0000 (19:29 +0100)] 
test: drop duplicate check for -daemonize

`run-qemu` checks twice for the `-daemonize` parameter.

Fixes: a3f73298f287 ("testsuite: refactor qemu options")
3 months agofix(i18n): remove Gentoo workaround that is no longer needed
Jo Zzsi [Sat, 6 Sep 2025 18:49:40 +0000 (14:49 -0400)] 
fix(i18n): remove Gentoo workaround that is no longer needed

Gentoo no longer sets KEYMAP to something like "-u pl2", instead
it is set to "pl12".

This piece of code is part of the very original commit of the i18n
dracut module from 2010 - 87122af

There is no mention of '-u' in the oldest version of the wiki from 2013
https://wiki.gentoo.org/index.php?title=Keyboard_layout_switching&diff=1320347&oldid=16937

Remove this workaround that is no longer used or tested to
make it easier to reason about the code.

3 months agorefactor: move defining inst_sysusers to dracut-functions.sh
Jo Zzsi [Fri, 9 Jan 2026 14:26:48 +0000 (09:26 -0500)] 
refactor: move defining inst_sysusers to dracut-functions.sh

inst_sysusers is a public interface to dracut modules, move it
to `dracut-functions.sh`.

Document inst_sysusers in the man page as from now on it is a
public interface.

3 months agotest: run QEMU with a timeout unless daemonized
Benjamin Drung [Mon, 12 Jan 2026 12:16:25 +0000 (13:16 +0100)] 
test: run QEMU with a timeout unless daemonized

Dracut tests might hang. The Dracut CI sets a timeout to kill those
hanging tests, but downstream might not configure something similar.

Run QEMU with a timeout (unless daemonized) to avoid hanging tests
forever.

The slowest tests executions that I have seen on Debian/Ubuntu:

* 33:44 for test 11 (5 client tests) on Ubuntu resolute on armhf
* 101:58 for test 60 (19 client tests) on Debian unstable on ppc64el
* 19:58 for test 70 (3 client tests) on Ubuntu resolute on arm64
* 22:35 for test 71 (4 client tests) on Ubuntu resolute on arm64
* 52:48 for test 72 (8 client tests) Debian unstable on ppc64el

These slow tests take between 5:22 and 6:45 for each client tests on
average (ignoring the setup cost). So set the timeout to 10 minutes as
default.

Fixes: https://bugs.debian.org/1121884
3 months agoci: unskip FULL-SYSTEMD on containers where it is passing
Jo Zzsi [Sat, 10 Jan 2026 22:37:02 +0000 (17:37 -0500)] 
ci: unskip FULL-SYSTEMD on containers where it is passing

This test is now passing on arm openSUSE and gentoo. Skip it.

3 months agotest(FULL-SYSTEMD): do not depend on -smbios qemu feature
Jo Zzsi [Sat, 10 Jan 2026 21:39:23 +0000 (16:39 -0500)] 
test(FULL-SYSTEMD): do not depend on -smbios qemu feature

smbios support is architecture dependent and not widely supported.

Using smbios when available does not increase the test coverage
for dracut significantly.

Partial revert of 817dd6125 .

3 months agoci(basic): correct syntax to exclude several tests
Jo Zzsi [Sun, 11 Jan 2026 00:49:31 +0000 (19:49 -0500)] 
ci(basic): correct syntax to exclude several tests

Make sure tests 20 and 26 are excluded as intended by fixing
GitHub Action syntax.

Follow-up to 1798677 .

3 months agoci: skip running failing tesst due to 2021
Jo Zzsi [Sat, 10 Jan 2026 21:07:05 +0000 (16:07 -0500)] 
ci: skip running failing tesst due to 2021

Temporary skip running tests until
https://github.com/dracut-ng/dracut-ng/issues/2021
is resolved.

Follow-up to 1798677 .

3 months agoci: simplify GitHub Action job naming
Jo Zzsi [Sat, 10 Jan 2026 20:33:34 +0000 (15:33 -0500)] 
ci: simplify GitHub Action job naming

network-manager dracut module is the default networking provider.

Remove forcing network-manager networking and simplify naming.

3 months agoci: skip running failing tesst due to 2021
Jo Zzsi [Sat, 10 Jan 2026 19:33:29 +0000 (14:33 -0500)] 
ci: skip running failing tesst due to 2021

Temporary skip running tests until
https://github.com/dracut-ng/dracut-ng/issues/2021
is resolved.

3 months agoci: skip running tests that are failing due to 1988
Jo Zzsi [Sat, 10 Jan 2026 18:18:33 +0000 (13:18 -0500)] 
ci: skip running tests that are failing due to 1988

Temporary skip running tests until
https://github.com/dracut-ng/dracut-ng/issues/1988
is resolved.

3 months agoci: run network-systemd tests on arm as well
Jo Zzsi [Sat, 10 Jan 2026 15:38:10 +0000 (10:38 -0500)] 
ci: run network-systemd tests on arm as well

Add arm to the test matrix for network-systemd.

3 months agoci: move mkosi testing into daily testsuite
Jo Zzsi [Sat, 10 Jan 2026 17:00:23 +0000 (12:00 -0500)] 
ci: move mkosi testing into daily testsuite

mkosi is not default/native in any of the test containers and it
does not seem to be stable.

This PR moves running mkosi reference test into
daily testing so that the dedicated GitHub Action can be just
disabled without a PR.

3 months agoci(openSUSE): container build fix
Jo Zzsi [Sat, 10 Jan 2026 17:30:14 +0000 (12:30 -0500)] 
ci(openSUSE): container build fix

ruby3.4-rubygem-asciidoctor is now called ruby4.0-rubygem-asciidoctor.

3 months agoci: run network-legacy tests on arm as well
Jo Zzsi [Sat, 10 Jan 2026 14:56:14 +0000 (09:56 -0500)] 
ci: run network-legacy tests on arm as well

Add arm to the test matrix for network-legacy.

3 months agoci: remove leftover and duplicated GitHub Action
Jo Zzsi [Sat, 10 Jan 2026 15:42:39 +0000 (10:42 -0500)] 
ci: remove leftover and duplicated GitHub Action

daily-systemd-arm64 GitHub Action is no longer needed as it is
covered by daily-systemd.

Follow-up to a43bd7a .

3 months agoci: fix GitHub Action syntax
Jo Zzsi [Sat, 10 Jan 2026 14:22:20 +0000 (09:22 -0500)] 
ci: fix GitHub Action syntax

excluding architectures requires {runner: 'ubuntu-24.04', tag: 'amd'} .

3 months agoci: combine omitsystemd x64 and arm64 into one GitHub action
Jo Zzsi [Sat, 10 Jan 2026 13:53:01 +0000 (08:53 -0500)] 
ci: combine omitsystemd x64 and arm64 into one GitHub action

Running tests on arm64 is just as stable as x64, there is
no need to separate them. Combine them into one GitHub
action should make it easier to reason about regressions.

3 months agoci: combine systemd x64 and arm64 into one GitHub action
Jo Zzsi [Sat, 10 Jan 2026 13:30:41 +0000 (08:30 -0500)] 
ci: combine systemd x64 and arm64 into one GitHub action

Running tests on arm64 is just as stable as x64, there is
no need to separate them. Combine them into one GitHub
action should make it easier to reason about regressions.

3 months agoci: combine hostonlystrict x64 and arm64 into one GitHub action
Jo Zzsi [Sat, 10 Jan 2026 13:19:49 +0000 (08:19 -0500)] 
ci: combine hostonlystrict x64 and arm64 into one GitHub action

Running tests on arm64 is just as stable as x64, there is
no need to separate them. Combine them into one GitHub
action should make it easier to reason about regressions.

3 months agoci: combine network-manager x64 and arm64 into one GitHub action
Jo Zzsi [Sat, 10 Jan 2026 13:05:25 +0000 (08:05 -0500)] 
ci: combine network-manager x64 and arm64 into one GitHub action

Running tests on arm64 is just as stable as x64, there is
no need to separate them. Combine them into one GitHub
action should make it easier to reason about regressions.

3 months agoci: combine basic x64 and arm64 into one GitHub action
Jo Zzsi [Sat, 10 Jan 2026 12:19:44 +0000 (07:19 -0500)] 
ci: combine basic x64 and arm64 into one GitHub action

Running tests on arm64 is just as stable as x64, there is
no need to separate them. Combine them into one GitHub
action should make it easier to reason about regressions.

3 months agoci(busybox): make test 80 compatible with busybox
Jo Zzsi [Sat, 10 Jan 2026 11:43:35 +0000 (06:43 -0500)] 
ci(busybox): make test 80 compatible with busybox

BusyBox ln does not support the -r argument. This argument
can be removed from the test suite without losing test coverage.

Now that the test runs with busybox, add it to the busybox daily
testsuite.

3 months agoci(busybox): make test 30 compatible with busybox
Jo Zzsi [Sat, 10 Jan 2026 11:36:30 +0000 (06:36 -0500)] 
ci(busybox): make test 30 compatible with busybox

busybox dd understands bs=1M but it does not understands bs=1MiB.

Now that the test runs with busybox, add it to the busybox daily
testsuite.

3 months agoci: run TEST_CONTAINER_COMMAND before configure runs
Jo Zzsi [Sat, 10 Jan 2026 11:21:43 +0000 (06:21 -0500)] 
ci: run TEST_CONTAINER_COMMAND before configure runs

Move running TEST_CONTAINER_COMMAND during CI tests
earlier so that packages can be installed/uninstalled
before configure runs.

3 months agoci: daily busybox tests
Jo Zzsi [Sat, 10 Jan 2026 10:48:37 +0000 (05:48 -0500)] 
ci: daily busybox tests

Add a GitHub action to run and pass as many of the
existing tests as possible without installing coreutils.

3 months agoci: modularize GitHub Actions for daily tests
Jo Zzsi [Fri, 9 Jan 2026 13:23:32 +0000 (08:23 -0500)] 
ci: modularize GitHub Actions for daily tests

Move each job into its own GA yaml file so that each job
can be individually enabled/disabled via the GitHub web interface.

This change prevents triggering all test runs every time
the monolithic yaml file is modified.

3 months agotest(KERNEL-INSTALL): layout and uki_generator set must be set on Gentoo
Jo Zzsi [Fri, 9 Jan 2026 16:13:03 +0000 (11:13 -0500)] 
test(KERNEL-INSTALL): layout and uki_generator set must be set on Gentoo

Set layout, initrd_generator, and uki_generator for kernel-install.

Fixes https://github.com/dracut-ng/dracut-ng/issues/2018 .

3 months agoci(alpine-busybox): grep is no longer required
Jo Zzsi [Fri, 9 Jan 2026 12:51:49 +0000 (07:51 -0500)] 
ci(alpine-busybox): grep is no longer required

busybox grep is supports all the required functionality and
command line arguments to pass dracut's basic test.

Installing GNU grep on top of busybox is no longer required.

Follow-up to 2de5129 .

3 months agoci: verify marker images consistently
Jo Zzsi [Fri, 9 Jan 2026 10:32:28 +0000 (05:32 -0500)] 
ci: verify marker images consistently

Use grep -F -a to check marker images after test runs.

This affects test evaluation only and does not modify dracut
core logic.

3 months agoci: add a test run for basic tests using busybox
Jo Zzsi [Wed, 7 Jan 2026 22:34:48 +0000 (17:34 -0500)] 
ci: add a test run for basic tests using busybox

This test prevents regressions when running basic tests on
Alpine with busybox.

3 months agofix(dracut): use proper dracut logging when possible
Jo Zzsi [Thu, 8 Jan 2026 13:35:35 +0000 (08:35 -0500)] 
fix(dracut): use proper dracut logging when possible

The recent restructuring of the code allows using proper dracut logging
in more areas of the code.

Follow-up to 8552a0f .

3 months agoci(alpine-busybox): alpine container with busybox
Jo Zzsi [Thu, 8 Jan 2026 02:20:54 +0000 (21:20 -0500)] 
ci(alpine-busybox): alpine container with busybox

The coreutils binaries are not installed and only busybox
binaries are available.

This container is meant to prevent regressions when running
basic test with busybox.

3 months agorefactor(dracut-install): simplify boolean evaluation
Benjamin Drung [Wed, 7 Jan 2026 23:14:39 +0000 (00:14 +0100)] 
refactor(dracut-install): simplify boolean evaluation

Checking a boolean with `== false` can be simplified to use the `not`
operator.

3 months agotest: use syntax compatible with busybox implementation
Jo Zzsi [Wed, 7 Jan 2026 20:09:35 +0000 (15:09 -0500)] 
test: use syntax compatible with busybox implementation

busybox du only support `-s` for summary and `-b` for block-size.

Follow-up to d4af288f0 .

3 months agoci: drop alpine:latest and run tests only on alpine:edge
Jo Zzsi [Wed, 7 Jan 2026 20:44:22 +0000 (15:44 -0500)] 
ci: drop alpine:latest and run tests only on alpine:edge

alpine:edge has been very stable CI environment for this project,
so let's promote it to the main CI and at the same time
let's retire alpine:latest.

The goal of this PR is to reduce time and computation on the CI
without loosing significant test coverage.

3 months agofeat: always preserve file ownership
Jo Zzsi [Wed, 7 Jan 2026 14:50:47 +0000 (09:50 -0500)] 
feat: always preserve file ownership

Currently file ownership is almost always preserved, except when
DRACUT_CP variable is used.

Make all file copying consistent and always preserve file ownership
by passing `-p` to `cp`.

Follow-up to 9ef73b6ad .

3 months agofix(dracut): ensure that inst is called after DRACUT_NO_XATTR is computed
Jo Zzsi [Wed, 7 Jan 2026 17:45:36 +0000 (12:45 -0500)] 
fix(dracut): ensure that inst is called after DRACUT_NO_XATTR is computed

`inst` calls dracut-install which requires DRACUT_NO_XATTR.

Move code block around to make sure DRACUT_NO_XATTR is set before
`inst` is called.

Follow-up to 941b18d .

3 months agofeat(no-xattr): no longer support no-xattr config
Jo Zzsi [Wed, 7 Jan 2026 02:54:26 +0000 (21:54 -0500)] 
feat(no-xattr): no longer support no-xattr config

Starting with dracut release v110, no-xattr is the default
config, so it is no longer desired to maintain a separate config
file for no-xattr.

Follow-up to 941b18d .

3 months agotest(SYSTEMD): run with --no-hostonly-cmdline
Antonio Alvarez Feijoo [Thu, 18 Dec 2025 14:41:16 +0000 (15:41 +0100)] 
test(SYSTEMD): run with --no-hostonly-cmdline

This test aims to run without the `initqueue` module, but the `base` module
depends on it if `$hostonly_cmdline == "yes"` [1]. Although the test ends
successfully, the log shows some errors because `dracut-lib.sh` is not present
if the `base` module cannot be installed:

```
dracut[E]: Module 'base' depends on module 'initqueue', which can't be installed
...
/usr/bin/dracut-cmdline-ask: line 3: /lib/dracut-lib.sh: No such file or directory
[    2.108191] dracut-cmdline[254]: /usr/bin/dracut-cmdline: line 6: /lib/dracut-lib.sh: No such file or directory
[    2.129548] dracut-pre-udev[259]: /usr/bin/dracut-pre-udev: line 6: /lib/dracut-lib.sh: No such file or directory
...
[    3.176822] dracut-pre-pivot[368]: /usr/bin/dracut-pre-pivot: line 7: /lib/dracut-lib.sh: No such file or directory
...
All OK
```

[1] https://github.com/dracut-ng/dracut-ng/blob/bf29f4b79aee9771800dffe78857014970be117e/modules.d/80base/module-setup.sh#L8-L12

3 months agochore(Makefile): use cp -a consistently
Jo Zzsi [Wed, 7 Jan 2026 03:50:42 +0000 (22:50 -0500)] 
chore(Makefile): use cp -a consistently

`cp -a` is used in all call sites except one.
Update the outlier to use the -a flag for consistency.

Follow-up to a0d12aa7d .

3 months agotest(NETWORK): do not set net.ifnames=0
Jo Zzsi [Tue, 6 Jan 2026 01:43:48 +0000 (20:43 -0500)] 
test(NETWORK): do not set net.ifnames=0

Increase test coverage by letting CI test containers to decide
the value of net.ifnames.

Change the test expectation to handle both net.ifnames=0
and net.ifnames=1.

3 months agofeat(dracut): drop unreachable code for dracutbasedir/initdir
Benjamin Drung [Tue, 6 Jan 2026 13:34:36 +0000 (14:34 +0100)] 
feat(dracut): drop unreachable code for dracutbasedir/initdir

`dracut.sh` sets the variables `dracutbasedir` and `initdir`. Then it
creates the `initdir` directory. So checking those variables again can
be dropped.

Follow-up: 4cb4917e1222 ("refactor: fold dracut-init.sh into dracut.sh")

3 months agochore(deps): bump luizm/action-sh-checker from 0.9.0 to 0.10.0
Jo Zzsi [Wed, 7 Jan 2026 02:13:53 +0000 (21:13 -0500)] 
chore(deps): bump luizm/action-sh-checker from 0.9.0 to 0.10.0

Bumps [luizm/action-sh-checker](https://github.com/luizm/action-sh-checker) from 0.9.0 to 0.10.0.
- [Release notes](https://github.com/luizm/action-sh-checker/releases)
- [Commits](luizm/action-sh-checker@v0.9.0...v0.10.0)

Removed the `-s` argument (stands for `--simplify`) as this
argument now overrules .editorconfig and moved setting simplify
to .editorconfig.

3 months agotest: drop --auto=yes from mdadm call
Benjamin Drung [Tue, 6 Jan 2026 16:19:13 +0000 (17:19 +0100)] 
test: drop --auto=yes from mdadm call

mdadm 4.5 emits following warning:

```
mdadm: --auto is deprecated and will be removed in future releases.
```

So drop `--auto=yes` from the `mdadm --create` calls.

3 months agofix(dracut): move comment back to related dracut_args variable
Benjamin Drung [Tue, 6 Jan 2026 13:52:03 +0000 (14:52 +0100)] 
fix(dracut): move comment back to related dracut_args variable

Commit 58dad7025b01 added the comment "store for logging" next to the
`dracut_args` variable. Move that comment back to this place.

3 months agorefactor(dracut-functions): put functions first
Benjamin Drung [Mon, 5 Jan 2026 18:26:42 +0000 (19:26 +0100)] 
refactor(dracut-functions): put functions first

For better readability put all the functions first in
`dracut-functions.sh` and put the executed code last.

3 months agofeat(dracut): disable xattr when creating cpios
Jo Zzsi [Sun, 28 Dec 2025 14:11:45 +0000 (09:11 -0500)] 
feat(dracut): disable xattr when creating cpios

Disable xattr when creating cpio, but do not change
the default for squashfs/erofs.

Move setting the default for DRACUT_CP later in the code to
account for the newly set defaults.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1561
3 months agofix(dracut): source dracut-functions.sh before calling dwarning
Benjamin Drung [Mon, 5 Jan 2026 23:32:20 +0000 (00:32 +0100)] 
fix(dracut): source dracut-functions.sh before calling dwarning

`dracut-functions.sh` sources `dracut-logger.sh` which defines the
`dwarning` function. `dracut.sh` might call `dwarning` before
`dracut-functions.sh` is sourced.

`dracut-functions.sh` calls `find_binary` and `dlog_init` when sourced.
`find_binary` needs `dracutsysrootdir` set and `dlog_init` needs
`stdloglvl`, `sysloglvl`, `kmsgloglvl`, `maxloglvl`, `fileloglvl`,
`logfile`. Move sourcing `dracut-functions.sh` as early as possible, but
after setting those variables.

Follow-up for 8d9887b
Fixes: https://bugs.debian.org/1124479
3 months agochore: move net udev rules to net-lib dracut modules
Jo Zzsi [Sat, 20 Dec 2025 18:46:23 +0000 (13:46 -0500)] 
chore: move net udev rules to net-lib dracut modules

The net-lib dracut module is designed to be always installed when
networking is enabled in the generated initramfs.

Move networking related udev rules to net-lib dracut modules from the
udev-rules dracut module.

The motivation behind this change is to increase modularity,
stay consistent with other dracut modules and potentially
increase performance when networking is not required in the
initramfs.

3 months agoci(alpine): install openRC and build-base
Jo Zzsi [Sun, 4 Jan 2026 15:54:44 +0000 (10:54 -0500)] 
ci(alpine): install openRC and build-base

alpine-base package is required to make the
container bootable and have the openRC services
available.

The alpine-base package is not installed by default in the alpine
container (only the alpine-baselayout package is installed).

Instead of explicitly installing make, install build-base meta-package
for future proofing.

4 months agofeat(dracut): print $uefi with --printconfig
Jo Zzsi [Wed, 24 Dec 2025 22:36:52 +0000 (17:36 -0500)] 
feat(dracut): print $uefi with --printconfig

Allow the enviroment (e.g. package managers) to discover
if uefi is enabled or not.

Similar to 71a713bb2 .

4 months agoci: remove stalebot config file
Jo Zzsi [Wed, 24 Dec 2025 22:33:22 +0000 (17:33 -0500)] 
ci: remove stalebot config file

There is no plan for this project to maintain the a stalebot
(or introduce any other stalebot alternative).

4 months agofix(dm): add explicit rootfs-block dependency
Jo Zzsi [Sat, 20 Dec 2025 23:50:57 +0000 (18:50 -0500)] 
fix(dm): add explicit rootfs-block dependency

Device mapper operates on local storage typically
configured by the rootfs-block module.

This change tightens dependencies to ensure that including only
the dm module via `dracut -m dm` produces a functional initramfs.

4 months agochore: remove support for 64-device-mapper.rules
Jo Zzsi [Sat, 20 Dec 2025 19:13:41 +0000 (14:13 -0500)] 
chore: remove support for 64-device-mapper.rules

64-device-mapper.rules use to be a Gentoo specific file,
which is now obsolete even on Gentoo.

Reverts 5d7298.

4 months agochore: reduce the scope of shellcheck exceptions
Jo Zzsi [Sat, 20 Dec 2025 17:31:08 +0000 (12:31 -0500)] 
chore: reduce the scope of shellcheck exceptions

The motivation behind this commit is to be able easily
identify unused functions in dracut.sh going forward.

4 months agofeat(dracut): add support for --ukify, --no-ukify
Jo Zzsi [Fri, 19 Dec 2025 01:53:05 +0000 (20:53 -0500)] 
feat(dracut): add support for --ukify, --no-ukify

Introduce a dracut option to enable/disable using ukify to
create UKI even if ukify is installed.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1592
4 months agofix: grammatical errors
Louis Narvaez [Wed, 5 Nov 2025 18:14:20 +0000 (13:14 -0500)] 
fix: grammatical errors

4 months agochore: move inst_opt_decompress to i18n dracut module
Jo Zzsi [Sat, 20 Dec 2025 18:20:04 +0000 (13:20 -0500)] 
chore: move inst_opt_decompress to i18n dracut module

`inst_opt_decompress`, `inst_decompress` and get_decompress_cmd
functions are only used in the i18n dracut module.

These functions were never documented as public functions
for dracut modules.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1966
4 months agorefactor: move defining require_X functions to dracut-functions.sh
Jo Zzsi [Sat, 20 Dec 2025 17:53:28 +0000 (12:53 -0500)] 
refactor: move defining require_X functions to dracut-functions.sh

require_X are public interfaces to dracut modules, move them
to `dracut-functions.sh`.

Add documentation for these public functions to make it clear that
it is expected to be used in out-of-tree dracut modules as well.

4 months agoci(alpine): fix regression regarding make is not installed
Jo Zzsi [Sun, 21 Dec 2025 19:23:14 +0000 (14:23 -0500)] 
ci(alpine): fix regression regarding make is not installed

It turns out make it not a dependency for dracut-tests downstream.
Add make dependency to continue upstream development.

Follow-up to 52606ca .

4 months agoci(alpine): simplify CI container after Alpine v3.23 release
Jo Zzsi [Sun, 21 Dec 2025 17:40:36 +0000 (12:40 -0500)] 
ci(alpine): simplify CI container after Alpine v3.23 release

The upstream dracut-tests package in Alpine v3.23 already installs
dracut build dependencies, no need to repeat them here.

Simplify the package list of the dracut CI.

Alpine v3.23 stable has been released on 2025-12-03.

Follow-up to 353373e99b37ef30e9fc218a3766d379e6c1af5b .

4 months agochore(dasd): combine two inst_rules calls into one
Jo Zzsi [Sat, 20 Dec 2025 18:52:56 +0000 (13:52 -0500)] 
chore(dasd): combine two inst_rules calls into one

Instead of sequentially calling inst_rules twice, combine
the two function calls into one.

4 months agoci: remove iscsi test for network-legacy runs
Jo Zzsi [Sun, 21 Dec 2025 13:48:43 +0000 (08:48 -0500)] 
ci: remove iscsi test for network-legacy runs

Further reduce CI coverage for iscsi tests to remove non-determinism
from the CI.

Follow-up to 04db824.

4 months agoci: extend run-qemu function to pass test 82 on Void arm64 as well
Jo Zzsi [Sat, 20 Dec 2025 22:21:41 +0000 (17:21 -0500)] 
ci: extend run-qemu function to pass test 82 on Void arm64 as well

Extend the rules to find the kernel inside the Void container.
Void on arm64 uses the vmlinux filename pattern.

4 months agoci: add omitsystemd and hostonlystrict tests to the ARM CI
Jo Zzsi [Sat, 20 Dec 2025 19:25:05 +0000 (14:25 -0500)] 
ci: add omitsystemd and hostonlystrict tests to the ARM CI

Run omitsystemd and hostonlystrict tests on Daily arm64
CI the same way as they run on amd64.

4 months agofeat: remove rev_lib_symlinks
Jo Zzsi [Fri, 19 Dec 2025 21:06:06 +0000 (16:06 -0500)] 
feat: remove rev_lib_symlinks

rev_lib_symlinks is not used any more by dracut and it is not
a dependency for any of the out-of-tree dracut modules.

`rev_lib_symlinks` function was introduced by a10a141 to be used by
`inst_library`, however `inst_library` no longer uses it
(neither any other function).

It is hard to maintain code that is not documented,
not used and has no test coverage.

4 months agofix(nfs): simplify DRACUT_CP arguments to increase portability
Jo Zzsi [Fri, 19 Dec 2025 21:23:32 +0000 (16:23 -0500)] 
fix(nfs): simplify DRACUT_CP arguments to increase portability

DRACUT_CP defaults to preserving mode and timestamps already,
which allows to just use `-p` argument here.

`busybox` `cp` does not support `--preserve=`, but it does support
`-p` argument.

Follow-up to 2f5a759.

4 months agorefactor: move defining inst_libdir_X and instmods to dracut-functions.sh
Jo Zzsi [Fri, 19 Dec 2025 20:53:37 +0000 (15:53 -0500)] 
refactor: move defining inst_libdir_X and instmods to dracut-functions.sh

inst_libdir_dir, inst_libdir_file and instmods are public interfaces to
dracut modules, move them to `dracut-functions.sh`.

These public functions are all already documented in the man page
and they do not have a dependency on other non-yet-public functions.

4 months agotest: drop root=LABEL=dracut from TEST_KERNEL_CMDLINE
Benjamin Drung [Mon, 15 Dec 2025 14:56:33 +0000 (15:56 +0100)] 
test: drop root=LABEL=dracut from TEST_KERNEL_CMDLINE

Several tests (for example the NFS or iSCSI tests) set the kernel
cmdline `root=` and therefore overwrite `root=LABEL=dracut` set by
`TEST_KERNEL_CMDLINE`.

Shorten the kernel cmdline and avoid confusion, drop `root=LABEL=dracut`
and specify it only in tests that do not set `root=`.

4 months agoci: expose /dev/kvm on arm64 as well
Benjamin Drung [Fri, 19 Dec 2025 17:51:39 +0000 (18:51 +0100)] 
ci: expose /dev/kvm on arm64 as well

Similar to amd64 expose `/dev/kvm` to the arm64 container for faster
QEMU execution.

As of 2025-12-19 the arm64 runners do not provide nested virtualization.
Nested virtualization is possible on AArch64 since Linux 6.16, so it
should be possible to offer even without bare metal instances.

Similar to amd64 expose `/dev/kvm` to the arm64 container for faster
QEMU execution once the runners provide nested virtualization.

4 months agoperf(nfs): do not source /lib/nfs-lib.sh twice
Antonio Alvarez Feijoo [Fri, 19 Dec 2025 09:38:25 +0000 (10:38 +0100)] 
perf(nfs): do not source /lib/nfs-lib.sh twice

Follow-up for bf29f4b79aee9771800dffe78857014970be117e

4 months agorefactor: move defining inst_rules to dracut-functions.sh
Jo Zzsi [Mon, 15 Dec 2025 00:29:08 +0000 (19:29 -0500)] 
refactor: move defining inst_rules to dracut-functions.sh

inst_rules is a public interface to dracut modules, move it
to `dracut-functions.sh`.

To make `dracut-functions.sh` useable on its own, move all the dependent
functions to `dracut-functions.sh` but make internal by prepending
their names with _.

4 months agoci: re-enable running iscsi tests parallel
Jo Zzsi [Thu, 18 Dec 2025 22:37:04 +0000 (17:37 -0500)] 
ci: re-enable running iscsi tests parallel

iscsi tests have been stabilized (based on the CI runs
in the last few days), let's try to open them back
up and re-enable running iscsi tests parallel.

Reverts 9b63e4e .

4 months agofix(nfs): do not execute logic in nfs hooks if netroot is not nfs
Antonio Alvarez Feijoo [Mon, 15 Dec 2025 16:42:59 +0000 (17:42 +0100)] 
fix(nfs): do not execute logic in nfs hooks if netroot is not nfs

If the nfs module is present in the initrd, it always perform some operations
(mount/umount rpc_pipefs, exec/kill rpcbind, rpc.statd and rpc.idmapd), even in
initrds not specifically created for nfsroot (e.g., in non-hostonly mode).

This can create a conflict with some VMware tools that use the rpc_pipefs
filesystem and can run in the initrd.

4 months agochore(deps): bump actions/upload-artifact from 5 to 6
dependabot[bot] [Tue, 16 Dec 2025 20:02:25 +0000 (20:02 +0000)] 
chore(deps): bump actions/upload-artifact from 5 to 6

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agotest(sysroot): run with --no-hostonly-cmdline
Benjamin Drung [Mon, 15 Dec 2025 11:24:21 +0000 (12:24 +0100)] 
test(sysroot): run with --no-hostonly-cmdline

TEST-13-SYSROOT fails in a Ubuntu VM. This is the `lsblk -f` output in
the VM:

```
 NAME    FSTYPE FSVER LABEL           UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
 fd0
 sr0
 vda
 ├─vda1  ext4   1.0   cloudimg-rootfs 606e50c2-c444-4c6c-86a1-a6e16ff87015     19G    12% /
 ├─vda13 ext4   1.0   BOOT            30a0e670-dd1c-4d4f-8489-02af8f2f9a18  844.4M     8% /boot
 ├─vda14
 └─vda15 vfat   FAT32 UEFI            5150-4E06                              98.1M     6% /boot/efi
```

TEST-13-SYSROOT calls dracut with `--hostonly` which leads to
`hostonly_cmdline` default to `yes`. This leads to the code path for
"save host_devs which we need bring up" in
`modules.d/80base/module-setup.sh` being executed. In this VM case the
variables are:

```
host_devs: /dev/vda1 /dev/vda13 /dev/vda15
user_devs:
root_devs: /dev/vda1
```

The code in `modules.d/80base/module-setup.sh` creates systemd units for
`/dev/vda13` and `/dev/vda15` which can be seen in the initrd file:

```
lrwxrwxrwx   1 root     root           78 Nov 24 13:35 etc/systemd/system/initrd.target.wants/dev-disk-by\x2duuid-30a0e670\x2ddd1c\x2d4d4f\x2d8489\x2d02af8f2f9a18.device -> ../dev-disk-by\x2duuid-30a0e670\x2ddd1c\x2d4d4f\x2d8489\x2d02af8f2f9a18.device
lrwxrwxrwx   1 root     root           42 Nov 24 13:35 etc/systemd/system/initrd.target.wants/dev-disk-by\x2duuid-5150\x2d4E06.device -> ../dev-disk-by\x2duuid-5150\x2d4E06.device
```

These two units hang forever in TEST-13-SYSROOT.

So run TEST-13-SYSROOT with `--no-hostonly-cmdline`.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1871
4 months agoci: split install dependencies step from test run step
Benjamin Drung [Mon, 15 Dec 2025 10:37:23 +0000 (11:37 +0100)] 
ci: split install dependencies step from test run step

To ease looking at the test results, split the step that installs the
dependencies step from the step that runs the actual test (in this case
`make syncheck`).

4 months agofeat(dracut-systemd): preserve the content of /var/lib/systemd
Jo Zzsi [Sun, 14 Dec 2025 17:06:12 +0000 (12:06 -0500)] 
feat(dracut-systemd): preserve the content of /var/lib/systemd

Persist the content of /var/lib/systemd in memory during initramfs
execution by linking it to /run/initramfs/systemd .

One of the motivation of this PR is to preserved coredumps
when systemd-coredump dracut module is included in the initrfamfs.

In general, this approach would requires less customization of
systemd configuration for dracut.

4 months agodocs: functions starting with an underscore are private
Benjamin Drung [Mon, 15 Dec 2025 11:13:12 +0000 (12:13 +0100)] 
docs: functions starting with an underscore are private

Document that functions starting with an underscore are private
functions and must not be called directly.

4 months agochore: ignore dracut-cpio build artifacts
Nadzeya Hutsko [Fri, 12 Dec 2025 15:45:44 +0000 (16:45 +0100)] 
chore: ignore dracut-cpio build artifacts

4 months agoci: fix YAML indentation
Benjamin Drung [Mon, 15 Dec 2025 10:42:05 +0000 (11:42 +0100)] 
ci: fix YAML indentation

yamllint complains about wrong indentation.

4 months agochore: order functions as they are documented in dracut.modules
Jo Zzsi [Sun, 14 Dec 2025 02:13:30 +0000 (21:13 -0500)] 
chore: order functions as they are documented in dracut.modules

Improve maintanability by ordering the code and corresponding
documentation the same way.

Follow-up to 883eba5.

4 months agofeat: remove inst_any
Jo Zzsi [Sun, 14 Dec 2025 02:59:45 +0000 (21:59 -0500)] 
feat: remove inst_any

inst_any does not seem to be used. It is hard to maintain code
that is not documented, not used and has no test coverage.

4 months agochore: remove default argument to cp
Jo Zzsi [Sun, 14 Dec 2025 03:06:07 +0000 (22:06 -0500)] 
chore: remove default argument to cp

Adding argument processing for arguments that are the default
anyways just adds to cognitive load of reading the code and
a little bit of performance overhead.

--sparse=auto is the default. There is no need to re-specify it.

4 months agofix(systemd): only install systemd-coredump with systemd-coredump dracut module
Jo Zzsi [Sun, 14 Dec 2025 18:08:54 +0000 (13:08 -0500)] 
fix(systemd): only install systemd-coredump with systemd-coredump dracut module

systemd-coredump is not meant to be installed "by default" and expected
to be an opt-in binary, which is achieved by adding systemd-coredump
dracut module.

4 months agorefactor: move defining DRACUT_INSTALL to dracut-functions.sh
Benjamin Drung [Fri, 12 Dec 2025 21:32:38 +0000 (22:32 +0100)] 
refactor: move defining DRACUT_INSTALL to dracut-functions.sh

Functions in `dracut-functions.sh` call `DRACUT_INSTALL`. To make
`dracut-functions.sh` useable on its own, move the code to define
`DRACUT_INSTALL` from `dracut.sh` there.

4 months agofeat(dmsquash-live): allow booting from compressed ostree filesystems
Brian C. Lane [Wed, 10 Dec 2025 19:35:59 +0000 (11:35 -0800)] 
feat(dmsquash-live): allow booting from compressed ostree filesystems

When combined with the ostree module it is possible to boot from a
compressed ostree filesystem, but the root of this has /ostree not /usr
so it fails.

Related: HMS-8933

4 months agoci: limit iscsi testing to Debian/Ubuntu on Daily testsuite
Jo Zzsi [Sun, 14 Dec 2025 20:03:20 +0000 (15:03 -0500)] 
ci: limit iscsi testing to Debian/Ubuntu on Daily testsuite

Based on CI test tun observations iscsi tests seems to be more flaky
on Arch, Fedora and openSUSE. Remove these flaky test runs from the CI
and keep Debian/Ubuntu, which seems to be more stable.

Follow-up to 79867b5.

4 months agoci(alpine): simplify CI container after Alpine v3.23 release
Jo Zzsi [Sun, 14 Dec 2025 20:08:51 +0000 (15:08 -0500)] 
ci(alpine): simplify CI container after Alpine v3.23 release

The upstream dracut-tests package in Alpine v3.23 already installs
networkmanager-cli and networkmanager-initrd-generator.

Simplify the package list of the dracut CI.

Alpine v3.23 stable has been released on 2025-12-03.

4 months agoci: limit iscsi testing to Debian/Ubuntu
Jo Zzsi [Sun, 14 Dec 2025 18:03:35 +0000 (13:03 -0500)] 
ci: limit iscsi testing to Debian/Ubuntu

Based on CI test tun observations iscsi tests seems to be more flaky
on Arch and openSUSE. Remove these flaky test runs from the CI and
keep Debian/Ubuntu, which seems to be more stable.

4 months agoci: simplify syntax ot exclude test 72 on ubuntu:devel
Jo Zzsi [Sun, 14 Dec 2025 13:50:24 +0000 (08:50 -0500)] 
ci: simplify syntax ot exclude test 72 on ubuntu:devel

Instead of including and than later excluding test 72 on ubuntu:devel
let's just not include it to increase readbility.

4 months agoci: run iscsi tests sequentially
Jo Zzsi [Sun, 14 Dec 2025 13:49:01 +0000 (08:49 -0500)] 
ci: run iscsi tests sequentially

Limit the concurrency to a single job at a time within the matrix strategy
to run iscsi tests sequentially.