]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
3 weeks 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.

3 weeks agoci: run iscsi tests with network-manager
Jo Zzsi [Sun, 14 Dec 2025 13:45:27 +0000 (08:45 -0500)] 
ci: run iscsi tests with network-manager

iscsi tests seems to be more reliable with network-manager.

3 weeks agoci: separate out iscsi and nbd tests into its own GA
Jo Zzsi [Sun, 14 Dec 2025 13:39:05 +0000 (08:39 -0500)] 
ci: separate out iscsi and nbd tests into its own GA

iscsi tests are known to be flaky, let's make sure we run
them as a separate GA to be able to manage flakiness better.

3 weeks agochore: upgrade shellcheck
Jo Zzsi [Sat, 13 Dec 2025 02:25:29 +0000 (21:25 -0500)] 
chore: upgrade shellcheck

Switch CI to a newer version of Ubuntu to get a newer version of
shellcheck.

3 weeks agofix(Makefile): improve support for shfmt v3.8.0+
Jo Zzsi [Sat, 13 Dec 2025 17:43:28 +0000 (12:43 -0500)] 
fix(Makefile): improve support for shfmt v3.8.0+

Add the --apply-ignore flag to respect ignore rules even when processing
specific files by name or via stdin.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1866
3 weeks agofix(dracut): ignore shellcheck SC2329 in addition to SC2317
Benjamin Drung [Wed, 26 Nov 2025 00:22:08 +0000 (01:22 +0100)] 
fix(dracut): 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.

3 weeks agofix(dracut): ignore failing find_binary dracut-install
Benjamin Drung [Fri, 12 Dec 2025 15:04:51 +0000 (16:04 +0100)] 
fix(dracut): ignore failing find_binary dracut-install

The call `find_binary dracut-install` might fail. Ignore this failure,
because a proper error message will be printed later in the code.

3 weeks agotest(run-qemu): support RISC-V
Benjamin Drung [Fri, 5 Dec 2025 13:20:50 +0000 (14:20 +0100)] 
test(run-qemu): support RISC-V

Use the `virt` machine on RISC-V. This machine does not have a PCI bus.
So use `virtio-rng-device` as RNG device there.

3 weeks agofeat(dracut): always check DRACUT_INSTALL being executable
Benjamin Drung [Thu, 11 Dec 2025 20:32:35 +0000 (21:32 +0100)] 
feat(dracut): always check DRACUT_INSTALL being executable

If `DRACUT_INSTALL` is set externally (to `valgrind dracut-install` for
example), dracut will skip the check for the dracut-install command.

Better check the first parameter in `DRACUT_INSTALL` being executable
(e.g. check `valgrind` being present when `DRACUT_INSTALL` is set to
`valgrind dracut-install`).

3 weeks agofeat: source dracut-logger.sh from dracut-functions.sh
Benjamin Drung [Thu, 11 Dec 2025 20:06:16 +0000 (21:06 +0100)] 
feat: source dracut-logger.sh from dracut-functions.sh

Some functions in `dracut-functions.sh` use logger functions defined in
`dracut-logger.sh`, for example `inst_hook` might call `dfatal`.

So move the inclusion of `dracut-logger.sh` into `dracut-functions.sh`
to make `dracut-functions.sh` useable on its own.

Move including `dracut-functions.sh` further up in `dracut.sh` because
the logger function `dfatal` is needed afterwards.

3 weeks agofix(dracut): remove newlines from libdirs variable
Benjamin Drung [Fri, 12 Dec 2025 13:11:53 +0000 (14:11 +0100)] 
fix(dracut): remove newlines from libdirs variable

The `libdirs` variable might contain newlines:

```
$ dracut --printconfig
[...]
dracutconfig: libdirs= /lib64 /usr/lib64 /lib /usr/lib /usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libfakeroot
```

This is confusing. Replace those newlines by spaces:

```
$ dracut --printconfig
[...]
dracutconfig: libdirs=/lib64 /usr/lib64 /lib /usr/lib /usr/lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu/libfakeroot
```

3 weeks agodocs(test): document numbering of tests
Benjamin Drung [Fri, 12 Dec 2025 12:09:00 +0000 (13:09 +0100)] 
docs(test): document numbering of tests

Document the numbering of the tests. See commit 5bb613dc902f
("test: reorganize tests").

3 weeks agofix(dracut): --printconfig does not work without --force
Antonio Alvarez Feijoo [Fri, 12 Dec 2025 08:57:24 +0000 (09:57 +0100)] 
fix(dracut): --printconfig does not work without --force

```
$ dracut --printconfig
dracut[F]: Will not override existing initramfs (/boot/initrd-6.17.0-2-default) without --force
```

Follow-up for 8e24c4bf06850da1bc89022081b7e793548d9b0b

3 weeks agofeat(dracut): print $initrdname with --printconfig
Antonio Alvarez Feijoo [Fri, 12 Dec 2025 13:49:40 +0000 (14:49 +0100)] 
feat(dracut): print $initrdname with --printconfig

kiwi will need this to properly get the name of the initrd output file.

See https://github.com/OSInside/kiwi/issues/2918

4 weeks agofeat(Makefile): do not install network-legacy by default 1607/head
Jo Zzsi [Thu, 6 Nov 2025 12:28:38 +0000 (07:28 -0500)] 
feat(Makefile): do not install network-legacy by default

This commit is the next step in the multi year effort to
discourage the usage or network-legacy dracut module.

This commit changes the default build/packaging so that
distributions wish to continue using network-legacy would
have to explicitly opt in to it in the packaging step.

4 weeks agofix(man): avoid bold italic text
Benjamin Drung [Wed, 26 Nov 2025 12:38:48 +0000 (13:38 +0100)] 
fix(man): avoid bold italic text

asciidoctor (on Ubuntu) does not format bold italic text correctly. The
following text will be in italic.

Since man pages do not use italic bold text, just use italic (similar to
other instances).

4 weeks agofix(man): avoid nesting italic in bold text
Benjamin Drung [Mon, 24 Nov 2025 12:40:16 +0000 (13:40 +0100)] 
fix(man): avoid nesting italic in bold text

asciidoctor (on Ubuntu) does not format nested italic in bold text
correctly. The following text will be in italic.

Since man pages do not use italic bold text, remove the nesting and pick
either italic or bold.

4 weeks agofix(multipath): always forcefully load multipath modules
Jo Zzsi [Sat, 1 Nov 2025 19:29:39 +0000 (15:29 -0400)] 
fix(multipath): always forcefully load multipath modules

cmdline() function gets called both in hostonly and non-hostonly mode.
Make sure that non-hostonly mode is handled properly.

5 weeks agoci: run network tests also on arm64
Benjamin Drung [Tue, 2 Dec 2025 15:17:04 +0000 (16:17 +0100)] 
ci: run network tests also on arm64

Increase test coverage by also running the network tests on arm64. Since
arm64 is slower than amd64 and test 60 already takes five minutes on
amd64, double the timeout for arm64.

5 weeks agoci: also run arm64 integration tests on debian:sid
Benjamin Drung [Tue, 2 Dec 2025 10:05:19 +0000 (11:05 +0100)] 
ci: also run arm64 integration tests on debian:sid

Increase the test coverage and run the arm64 integration tests on
`debian:sid` (in addition to `debian:latest`).

5 weeks agoci(debian): install dracut-test into the CI container
Jo Zzsi [Sat, 29 Nov 2025 02:46:24 +0000 (21:46 -0500)] 
ci(debian): install dracut-test into the CI container

Debian/Ubuntu maintains a downstream package for CI
dependencies called dracut-test (similar to Alpine).

This package is a useful addition upstream as well to ensure
that all CI dependencies are installed into the CI container.

5 weeks agofeat(systemd): install new dlopened libraries
Antonio Alvarez Feijoo [Wed, 12 Nov 2025 10:33:22 +0000 (11:33 +0100)] 
feat(systemd): install new dlopened libraries

Preparation for systemd-v259. In chronological order:

- libaudit: https://github.com/systemd/systemd/commit/4d8c5c657ae0829f93944a00302e7ce700913e54
- libacl: https://github.com/systemd/systemd/commit/7c3a7f925f83bd05a49e8b1f09726cccc26977f7
- libblkid: https://github.com/systemd/systemd/commit/c349edfe49dc2c4b8a79e5d08ecf7c8e93c4c909
- libseccomp: https://github.com/systemd/systemd/commit/aaca6bd5d97258f29c1b8c991e8617c7272308e0
- libmount: https://github.com/systemd/systemd/commit/b3243f4beead231e27a4f017f53288a303177cb2
- libselinux: https://github.com/systemd/systemd/commit/83b6ef9b62765b11bc602eae906ff13a5464a638

5 weeks agochore: set expectation for function compatibility
Jo Zzsi [Sat, 22 Nov 2025 22:38:48 +0000 (17:38 -0500)] 
chore: set expectation for function compatibility

Set clear boundaries for which functions are maintained for
compatibility with existing dracut modules.

Document the compatibility differences between dracut.sh and
dracut-functions.sh, and move any functions from dracut.sh to
dracut-functions.sh that are clearly required for dracut
module compatibility.

This commit moves all functions from dracut.sh to dracut-functions.sh
that are already documented in man/dracut.modules.7.adoc.

5 weeks agoci: run extra network-manager tests on Ubuntu
Benjamin Drung [Mon, 1 Dec 2025 22:00:33 +0000 (23:00 +0100)] 
ci: run extra network-manager tests on Ubuntu

Increase the test coverage and run the `network-manager` tests in
`integration-extra.yml` on `ubuntu:devel` and `ubuntu:rolling`.

5 weeks agoci: add test 44 (drivers) to integration extra
Benjamin Drung [Mon, 1 Dec 2025 12:57:18 +0000 (13:57 +0100)] 
ci: add test 44 (drivers) to integration extra

The test 44 (drivers) is only run in the integration workflow. Add test
44 (drivers) to integration extra to run this test in all containers.

Fixes: 21096b7e0e85 ("feat(kernel-modules-export): make kernel modules from initramfs available")
5 weeks agoci: use ubuntu:rolling instead of ubuntu:latest
Benjamin Drung [Mon, 1 Dec 2025 15:28:20 +0000 (16:28 +0100)] 
ci: use ubuntu:rolling instead of ubuntu:latest

`ubuntu:latest` points to the latest LTS version (currently 24.04) and
`ubuntu:rolling` to the latest release (currently 25.10). Use
`ubuntu:rolling` instead of `ubuntu:latest` consistently everywhere.

5 weeks agoci: document forwarded missing .efi suffix Ubuntu bug
Benjamin Drung [Mon, 1 Dec 2025 15:27:06 +0000 (16:27 +0100)] 
ci: document forwarded missing .efi suffix Ubuntu bug

5 weeks agoci: enable test 30 on ubuntu:rolling again
Benjamin Drung [Mon, 1 Dec 2025 15:22:05 +0000 (16:22 +0100)] 
ci: enable test 30 on ubuntu:rolling again

The test 30 succeed again on `ubuntu:rolling`. The failure was probably
due to uutil's coreutils in the image.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1590
5 weeks agoci: update ubuntu:rolling images
Benjamin Drung [Mon, 1 Dec 2025 13:53:39 +0000 (14:53 +0100)] 
ci: update ubuntu:rolling images

The `ghcr.io/dracut-ng/ubuntu:rolling-amd` image is three month old and
has not been updated.

Update the `ubuntu:rolling` images.

5 weeks agoci: use GNU coreutils on ubuntu:rolling
Benjamin Drung [Mon, 1 Dec 2025 13:51:08 +0000 (14:51 +0100)] 
ci: use GNU coreutils on ubuntu:rolling

Ubuntu rolling (which is currently 25.10) uses uutil's coreutils as well
and is affected by the same bugs as Ubuntu devel.

So use GNU coreutils instead of uutil's coreutils on Ubuntu rolling.

5 weeks agoperf(resume): remove unreachable code
Antonio Alvarez Feijoo [Mon, 1 Dec 2025 13:02:35 +0000 (14:02 +0100)] 
perf(resume): remove unreachable code

systemd-hibernate-resume [1] and systemd-hibernate-resume-generator [2] were
added in systemd-v217 (2014), so the fallback using the custom dracut code to
handle resume is not used with systemd.

[1] https://github.com/systemd/systemd/commit/42483a747489ff46aed3588b78bf4b9480dbeaf7
[2] https://github.com/systemd/systemd/commit/d2c68822c47e37b582820f45b496b2e7d1f9e642

5 weeks agoperf(resume): do not search cmdline options in /etc/cmdline{,.d}
Antonio Alvarez Feijoo [Mon, 10 Nov 2025 07:27:34 +0000 (08:27 +0100)] 
perf(resume): do not search cmdline options in /etc/cmdline{,.d}

Both `/etc/cmdline` and `/etc/cmdline.d` are only created in the initrd, they do
not exist in the host, where dracut calls `module-setup.sh` functions, so there
is no need to grep there.

5 weeks agoperf(resume): do not attempt to install systemd-hibernate-resume@.service
Antonio Alvarez Feijoo [Mon, 10 Nov 2025 07:27:07 +0000 (08:27 +0100)] 
perf(resume): do not attempt to install systemd-hibernate-resume@.service

This service is no longer shipped since systemd-v254
(https://github.com/systemd/systemd/commit/760e99bb).

5 weeks agoci: update centos from stream10-development to latest
Benjamin Drung [Mon, 1 Dec 2025 12:25:01 +0000 (13:25 +0100)] 
ci: update centos from stream10-development to latest

The last container build for `centos:stream10-development` is from
2024-11-07. CentOS Stream 10 was released on 2024-12-12.

So update the CentOS container from `stream10-development` to `latest`
which is currently CentOS Stream 10.

5 weeks agotest(run-qemu): use hvc0 console on s390x
Benjamin Drung [Fri, 28 Nov 2025 23:34:52 +0000 (00:34 +0100)] 
test(run-qemu): use hvc0 console on s390x

The test `TEST-41-FULL-SYSTEMD` fails (hangs) on s390x:

```
CLIENT TEST START: readonly root
run-qemu: /usr/bin/qemu-system-s390x -cpu max -smp 2 -m 1024 -nodefaults -vga none -display none -no-reboot -watchdog-action poweroff -device virtio-rng-pci -serial stdio -device virtio-scsi-pci,id=scsi0 -drive if=none,format=raw,file=/var/tmp/dracut-test.LX2MPr/marker.img,id=drive-data0 -device scsi-hd,bus=scsi0.0,drive=drive-data0,id=data0,serial=marker -device virtio-scsi-pci,id=scsi1 -drive if=none,format=raw,file=/var/tmp/dracut-test.LX2MPr/root.btrfs,id=drive-data1 -device scsi-hd,bus=scsi1.0,drive=drive-data1,id=data1,serial=root -device virtio-scsi-pci,id=scsi2 -drive if=none,format=raw,file=/var/tmp/dracut-test.LX2MPr/root_crypt.btrfs,id=drive-data2 -device scsi-hd,bus=scsi2.0,drive=drive-data2,id=data2,serial=root_crypt -device virtio-scsi-pci,id=scsi3 -drive if=none,format=raw,file=/var/tmp/dracut-test.LX2MPr/usr.btrfs,id=drive-data3 -device scsi-hd,bus=scsi3.0,drive=drive-data3,id=data3,serial=usr -append 'console=ttyS0,115200 root=LABEL=dracut panic=1 oops=panic softlockup_panic=1 systemd.crash_reboot   mount.usr=LABEL=dracutusr mount.usrflags=subvol=usr ro systemd.mask=systemd-sysusers systemd.mask=systemd-timesyncd systemd.mask=systemd-resolved ' -initrd /var/tmp/dracut-test.LX2MPr/initramfs.testing -kernel /boot/vmlinuz-6.16.12+deb14+1-s390x
[...]
[  OK  ] Reached target initrd-switch-root.target - Switch Root.
[...]
[  104.913552] systemd[1]: Starting testsuite.service - Testsuite service...
         Starting testsuite.service - Testsuite service...
[  105.245935] (test-init)[1028]: testsuite.service: Failed to set up standard input: No such file or directory
[  105.249516] (test-init)[1028]: testsuite.service: Failed at step STDIN spawning /sbin/test-init: No such file or directory
[  105.289084] systemd[1]: testsuite.service: Main process exited, code=exited, status=208/STDIN
[  105.305982] systemd[1]: testsuite.service: Failed with result 'exit-code'.
[FAILED] Failed to start testsuite.service - Testsuite service.
[  105.365771] systemd[1]: Failed to start testsuite.service - Testsuite service.
```

Replacing the default console `ttyS0` by the virtual console `hvc0`
makes the test succeed.

Bug-Debian: https://bugs.debian.org/1120955
Fixes: https://github.com/dracut-ng/dracut-ng/issues/1873
5 weeks agoci: add ubuntu:devel arm64 CI container to the GA
Jo Zzsi [Fri, 28 Nov 2025 18:54:44 +0000 (13:54 -0500)] 
ci: add ubuntu:devel arm64 CI container to the GA

Run the arm64 tests on ubuntu:devel in addition to ubuntu:latest.

5 weeks agoci: change container variable
Jo Zzsi [Fri, 28 Nov 2025 17:56:29 +0000 (12:56 -0500)] 
ci: change container variable

Change container variable to enable adding non-latest containers
to the list.

5 weeks agoci: create a separate job for kernel-install
Jo Zzsi [Fri, 28 Nov 2025 16:52:08 +0000 (11:52 -0500)] 
ci: create a separate job for kernel-install

Increase readability and maintainability by separating
the kernel-install test into its own GA job.

One of the motivations is to minimize the explicit exclusion list.

5 weeks agoci: fix GA syntax
Jo Zzsi [Fri, 28 Nov 2025 17:16:00 +0000 (12:16 -0500)] 
ci: fix GA syntax

Follow-up to bee10d9.

5 weeks agoci: enable arm64 tests on Gentoo container
Jo Zzsi [Fri, 28 Nov 2025 15:05:30 +0000 (10:05 -0500)] 
ci: enable arm64 tests on Gentoo container

Gentoo container now supports arm64. Enable running tests on this
CI container as well.

5 weeks agoci: unskip passing tests
Jo Zzsi [Fri, 28 Nov 2025 13:54:51 +0000 (08:54 -0500)] 
ci: unskip passing tests

After 5e0f6c5 some additional tests are now passing.

Unskip them.

5 weeks agoci: revert installing btrfs-progs in the CentOS container
Jo Zzsi [Fri, 28 Nov 2025 15:01:06 +0000 (10:01 -0500)] 
ci: revert installing btrfs-progs in the CentOS container

Revert 29917ea and leave a comment that CentOS kernel does
not include btrfs kernel module.

5 weeks agoci(gentoo): use emerge-webrsync to fetch the initial snapshot
Jo Zzsi [Fri, 28 Nov 2025 12:36:30 +0000 (07:36 -0500)] 
ci(gentoo): use emerge-webrsync to fetch the initial snapshot

Change the approach for computing the Gentoo container to support
arm64 as well.

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

5 weeks agofeat: remove unused and undocumented argument
Jo Zzsi [Fri, 28 Nov 2025 03:45:18 +0000 (22:45 -0500)] 
feat: remove unused and undocumented argument

-m argument for require_binaries, require_any_binaries and
require_kernel_modules functions are unused.

Remove these arguments before publicly documenting these functions.

5 weeks agoci: install btrfs-progs in the CentOS container
Jo Zzsi [Fri, 28 Nov 2025 13:41:13 +0000 (08:41 -0500)] 
ci: install btrfs-progs in the CentOS container

Install btrfs-progs in the CentOS container because it is needed for
TEST-11-USR-MOUNT.

5 weeks agoci(arm64): enable more tests on arm64
Jo Zzsi [Fri, 28 Nov 2025 02:35:57 +0000 (21:35 -0500)] 
ci(arm64): enable more tests on arm64

Now that test cases improved recently, enable more tests on arm64
and exclude the failing tests explicitly.

5 weeks agoci: install 3cpio in the Arch and Fedora containers
Jo Zzsi [Fri, 28 Nov 2025 12:49:37 +0000 (07:49 -0500)] 
ci: install 3cpio in the Arch and Fedora containers

Install 3cpio in the Arch and Fedora containers to increase
test coverage for 3cpio beyond just Debian based distributions.

5 weeks agoci: install cargo in the Alpine container
Jo Zzsi [Fri, 28 Nov 2025 12:58:41 +0000 (07:58 -0500)] 
ci: install cargo in the Alpine container

Install cargo in the Alpine container because it is needed for
TEST-82-DRACUT-CPIO.

5 weeks agoci: fix GA group name
Jo Zzsi [Thu, 27 Nov 2025 19:19:51 +0000 (14:19 -0500)] 
ci: fix GA group name

The group name should be unique for the project.

Follow-up to fb15792.

5 weeks agoci(arm64): create a separate job for systemd tests
Jo Zzsi [Thu, 27 Nov 2025 18:54:04 +0000 (13:54 -0500)] 
ci(arm64): create a separate job for systemd tests

Do not attempt to run systemd tests on non-systemd enabled
environment.

Follow-up to fb15792.

5 weeks agoci(gentoo): minimize packages between OpenRC and systemd
Jo Zzsi [Thu, 27 Nov 2025 18:31:37 +0000 (13:31 -0500)] 
ci(gentoo): minimize packages between OpenRC and systemd

The goal is to increase test coverage and while keeping the CI
maintenance low.

Instead of having two lists of packages, lets keep the systemd-only
package list to the minimum.

5 weeks agoci: explicitly skip tests are not meant to be supported
Jo Zzsi [Thu, 27 Nov 2025 13:15:32 +0000 (08:15 -0500)] 
ci: explicitly skip tests are not meant to be supported

The motivation of this commit is to not run tests on the CI
that would be skipped. This saves some CI resources and
enables to get back to restore green CI, now that
skipped tests are reported as failures after f120814.

This PR does not change code coverage. This is simply
a different and more efficient way to skip tests on the CI.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1886
5 weeks agoci: create a separate job for systemd tests
Jo Zzsi [Thu, 27 Nov 2025 12:35:06 +0000 (07:35 -0500)] 
ci: create a separate job for systemd tests

Do not attempt to run systemd tests on non-systemd enabled
environment.

5 weeks agotest: print end of client tests even in failure case
Benjamin Drung [Thu, 27 Nov 2025 01:48:26 +0000 (02:48 +0100)] 
test: print end of client tests even in failure case

If client tests started and failed with a command failing, the test will
exit and the ERR trap will execute `print_test_result`. But the client
test end will not be printed.

So call `client_test_end` in `print_test_result` to print a client test
end result in case a client test was in progress.

5 weeks agorefactor: introduce client_test_start/client_test_end
Benjamin Drung [Thu, 27 Nov 2025 01:42:20 +0000 (02:42 +0100)] 
refactor: introduce client_test_start/client_test_end

Introduce the functions `client_test_start` and `client_test_end` to
unify the start and end of subtests.

5 weeks agoci: install more packages for gentoo:amd64-openrc
Jo Zzsi [Thu, 27 Nov 2025 14:01:44 +0000 (09:01 -0500)] 
ci: install more packages for gentoo:amd64-openrc

Increase test coverage for gentoo:amd64-openrc by installing
more dependencies into the test container.

This change should enable running btrfs dependent (e.g. USR-MOUNT)
and squashfs dependent (e.g. DMSQUASH) tests.

5 weeks agotest: exit with code 77 if test is skipped
Benjamin Drung [Wed, 26 Nov 2025 15:17:16 +0000 (16:17 +0100)] 
test: exit with code 77 if test is skipped

Exiting tests that are skipped with exit code 0 will hide that the test
environment probably miss some tools. That can reduce the test coverage
without anybody noting it.

Therefore exit tests that are skipped with exit code 77. In case tests
are intentionally expected to be skipped, an environment variable could
be introduce to exit with code 0 again.

5 weeks agoci: install xfsprogs in all containers
Benjamin Drung [Wed, 26 Nov 2025 14:20:51 +0000 (15:20 +0100)] 
ci: install xfsprogs in all containers

Install xfsprogs in all containers because it is needed for
TEST-44-DRIVERS.

5 weeks agotest: poweroff with systemd if available
Benjamin Drung [Wed, 26 Nov 2025 13:37:57 +0000 (14:37 +0100)] 
test: poweroff with systemd if available

Use the same poweroff code from `modules.d/70test-root/test-init.sh` in
all test cases.

5 weeks agotest: do not keep the initramfs.testing artefacts by default
Benjamin Drung [Wed, 26 Nov 2025 12:12:15 +0000 (13:12 +0100)] 
test: do not keep the initramfs.testing artefacts by default

Calling dracut with `--keep` is not needed for initramfs.testing in most
cases.

5 weeks agotest: use truncate instead of dd if=/dev/zero
Benjamin Drung [Wed, 26 Nov 2025 13:08:17 +0000 (14:08 +0100)] 
test: use truncate instead of dd if=/dev/zero

Use `truncate` to create sparse files.

5 weeks agotest: drop explicitly checking exit code
Benjamin Drung [Wed, 26 Nov 2025 13:24:38 +0000 (14:24 +0100)] 
test: drop explicitly checking exit code

The tests are run with `set -e`. So the test will exit in case of a
failure and `$?` will always be `0`. So drop the check for `$?`.

5 weeks agofix(dracut-install): build with -Werror=discarded-qualifiers
Antonio Alvarez Feijoo [Wed, 26 Nov 2025 09:53:30 +0000 (10:53 +0100)] 
fix(dracut-install): build with -Werror=discarded-qualifiers

```
src/install/dracut-install.c:475:11: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
  475 |         q = strstr(lib, ".so.");
```

- `q` cannot be const, because it's also used for `q = strstr(clib, ".so.");`,
removing the suffix from clib via `q[3] = '\0';`, so create two variables to get
the suffix offsets, one const for `lib`, other non-const for `clib`.

```
src/install/dracut-install.c:2592:11: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
 2592 |         p = strstr(abskpath, "/lib/modules/");
```

- `p` can be const like `abskpath`, since it's not modified.

Fixes #1877

6 weeks agotest: drop sync calls on host
Benjamin Drung [Wed, 26 Nov 2025 00:08:16 +0000 (01:08 +0100)] 
test: drop sync calls on host

Synchronizing cached writes to persistent storage is not needed for the
test host. So drop those sync calls for faster test execution.

Keep only the sync calls in the scripts that are executed in a virtual
machine (like `create-root.sh` and `client-init.sh`).

6 weeks agofix(functions): do not use path escapes for non-paths
Jens Schmidt [Sat, 22 Nov 2025 20:15:24 +0000 (21:15 +0100)] 
fix(functions): do not use path escapes for non-paths

Function dev_unit_name unconditionally calls `systemd-escape -p` on the device
argument, even if that is a non-path, for example, a LUKS UUID.
`systemd-escape -p` writes a warning for non-paths, so just use plain
`systemd-escape` for these.

6 weeks agotest(run-qemu): support UEFI on ARM
Benjamin Drung [Tue, 25 Nov 2025 23:16:43 +0000 (00:16 +0100)] 
test(run-qemu): support UEFI on ARM

The OVMF firmware files are builds of EDK II for 64-bit x86 virtual
machines. They do not work on other architectures.

So search for AAVMF files on ARM. Remove the `cfi.pflash01` driver
setting because it does not work on Ubuntu arm64 and `readonly=on` is
already set for the firmware file.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1861
6 weeks agotest: use UEFI for QEMU when available
Benjamin Drung [Tue, 25 Nov 2025 23:15:33 +0000 (00:15 +0100)] 
test: use UEFI for QEMU when available

Move the `ovmf_code` function and related code to `run-qemu` and always
use UEFI when available. This is a preperation for the following commit.

6 weeks agotest: determine rootfs size dynamically
Benjamin Drung [Sat, 8 Nov 2025 13:54:43 +0000 (14:54 +0100)] 
test: determine rootfs size dynamically

Do not hard-code the size of the rootfs, but determine the needed size
dynamically. This will speed up the creation time for smaller content
and prevent failures in case of bigger content.

6 weeks agochore(deps): bump actions/checkout from 5 to 6
dependabot[bot] [Tue, 25 Nov 2025 20:03:16 +0000 (20:03 +0000)] 
chore(deps): bump actions/checkout from 5 to 6

Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
6 weeks agotest(cpio): add test_archive_major_minor
David Disseldorp [Wed, 8 Oct 2025 03:59:42 +0000 (05:59 +0200)] 
test(cpio): add test_archive_major_minor

Inode numbers are unique (for non-hardlinks) within the archive, so
device ID mapping is unnecessary. Confirm that dracut-cpio behaves like
GNU cpio --ignore-devno. Check this by archiving the /tmp directory
alongside a working-directory nested file; despite differing source
device IDs, the archived major/minor numbers should be zero.

The test is skipped if stat(/tmp) fails, or working-directory and /tmp
device ids match.

6 weeks agofeat(cpio): zero device major/minor numbers
David Disseldorp [Wed, 8 Oct 2025 00:59:57 +0000 (02:59 +0200)] 
feat(cpio): zero device major/minor numbers

initramfs / cpio allow for the tracking of hardlinks for nlink >= 2
entries using a combination of the inode, device major and minor
numbers.

dracut-cpio uses unique inode numbers within an archive via the global
state.ino counter. Device major/minor numbers are also renumbered, with
each unique source device obtaining a major/minor number mapped from the
index within dev_seen()/DevState array.

With archive-unique inode numbers, device major/minor mapping is
unnecessary. This change sees dracut-cpio behave the same as GNU
cpio --ignore-devno, where archive device major/minor numbers are
hardcoded to zero.

Hardlink tracking is simplified, replacing per-device HardlinkState
arrays with a global state.hls array. A hash could be used for faster
source inode+dev -> archive HardlinkState mapping, but the extra
size and complexity isn't worth it IMO, given that hardlinks should be
rare.

6 weeks agofix(cpio): archive correct minor numbers
David Disseldorp [Tue, 7 Oct 2025 09:52:05 +0000 (11:52 +0200)] 
fix(cpio): archive correct minor numbers

A typo that I made in the initial dracut-cpio implementation sees the
stat()-dev_t-derived major number used for both major and minor number
in the cpio archive.

This bug shouldn't cause any real-world issues, as archive-renumbered
inode numbers are already unique and hardlink tracking checks against
the proper dev_t tuple.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1749
6 weeks agochore: call inst_multiple instead of the dracut_install wrapper
Jo Zzsi [Sun, 23 Nov 2025 02:08:40 +0000 (21:08 -0500)] 
chore: call inst_multiple instead of the dracut_install wrapper

dracut_install is no longer preferred. In almost all call sites
inst_multiple is called directly instead of the dracut_install wrapper.

Call inst_multiple directly for better readability, consistency and
possibly slightly faster perf.

6 weeks agotest: replace rev command by sed
Benjamin Drung [Tue, 18 Nov 2025 18:34:52 +0000 (19:34 +0100)] 
test: replace rev command by sed

On Debian-based systems, the `rev` command is shipped by the
bsdextrautils package. Replace the `rev` command by `sed` which is an
essential command and does not need additional packages.

6 weeks agotest(run-qemu): include name in error messages
Benjamin Drung [Tue, 18 Nov 2025 10:27:02 +0000 (11:27 +0100)] 
test(run-qemu): include name in error messages

To ease debugging include the name of the `run-qemu` script in the error
messages.

6 weeks agotest: forward journald logs to console in V=1 or V=2
Benjamin Drung [Tue, 18 Nov 2025 18:44:04 +0000 (19:44 +0100)] 
test: forward journald logs to console in V=1 or V=2

To ease debugging, forward systemd journald logs to console when `V=1`
or `V=2` is set.

6 weeks agoci(fedora): install diffutils
Benjamin Drung [Sun, 23 Nov 2025 08:31:42 +0000 (09:31 +0100)] 
ci(fedora): install diffutils

The test 81 needs the `diff` command which is provided by the diffutils
package on Fedora. Otherwise the test 81 is skipped on Fedora.

6 weeks agofix(Makefile): correct path for man pages for service files
Jo Zzsi [Sat, 22 Nov 2025 17:03:38 +0000 (12:03 -0500)] 
fix(Makefile): correct path for man pages for service files

The man pages for service files are installed to the man8
directory, so delete them from there.

6 weeks agofeat(network-manager): add systemd generator if available
Antonio Alvarez Feijoo [Fri, 21 Nov 2025 07:36:03 +0000 (08:36 +0100)] 
feat(network-manager): add systemd generator if available

A systemd generator was added in [1] to fix an upstream issue [2]. It also
brings the removal of the "[Install]" section from the upstream initrd services;
it is used to mask the initrd services on the host, and to mask the host
services and provide installation links of the initrd services in the initrd.

Additionally, increase the minimum NetworkManager version set to remove custom
systemd services from dracut.

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/commit/636fb5ef24640856515584977174fa44a986e374
[2] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1814

6 weeks agotest: set console cmdline depending on the architecture
Benjamin Drung [Wed, 19 Nov 2025 03:28:38 +0000 (04:28 +0100)] 
test: set console cmdline depending on the architecture

The QEMU process hangs (without printing anything) on some Debian/Ubuntu
architectures. This is caused by the console device is called
differently on those architectures.

So move setting `console` to `run-qemu` and set it to `ttyAMA0` on ARM
systems and to `hvc0` on ppc64el.

6 weeks agotest(run-qemu): include $@ in ARGS array
Benjamin Drung [Wed, 19 Nov 2025 03:20:39 +0000 (04:20 +0100)] 
test(run-qemu): include $@ in ARGS array

To simplify the code and as preparation for the following commit,
include `$@` in the `ARGS` array.

6 weeks agotest(run-qemu): do not expect -initrd as first parameter
Benjamin Drung [Wed, 19 Nov 2025 03:14:28 +0000 (04:14 +0100)] 
test(run-qemu): do not expect -initrd as first parameter

Check all parameters for `-initrd` instead of expecting it to be the
first parameter.

7 weeks agofix(systemd-networkd): install and enable systemd-networkd-resolve-hook.socket
Luca Boccassi [Tue, 18 Nov 2025 19:30:30 +0000 (19:30 +0000)] 
fix(systemd-networkd): install and enable systemd-networkd-resolve-hook.socket

New socket needed for v259~rc1, networkd fails if this is not installed
and enabled

7 weeks agorefactor: introduce create_cpio_* helper functions
Benjamin Drung [Tue, 11 Nov 2025 20:39:20 +0000 (21:39 +0100)] 
refactor: introduce create_cpio_* helper functions

To make the dracut code more reabable and to allow introducing local
variables, move the cpio creation code into helper functions.

7 weeks agofix(dracut): shellcheck SC2086
Jo Zzsi [Tue, 11 Nov 2025 23:10:57 +0000 (18:10 -0500)] 
fix(dracut): shellcheck SC2086

Fix shellcheck SC2086 error reports.

7 weeks agofix(nfs): set the default group of the rpcbind user to the state dir
Antonio Alvarez Feijoo [Wed, 12 Nov 2025 13:22:29 +0000 (14:22 +0100)] 
fix(nfs): set the default group of the rpcbind user to the state dir

Commit 4a236f015905f598e2976ae6f0f460ec9a567f2b sets the fixed "root" group to
`/run/rpcbind`, but it can be different depending on the distribution (for
example, `rpc` in openSUSE and Fedora).

Fixes 4a236f015905f598e2976ae6f0f460ec9a567f2b

7 weeks agoperf(nfs): remove references to old rpcbind state dir
Antonio Alvarez Feijoo [Wed, 12 Nov 2025 11:40:39 +0000 (12:40 +0100)] 
perf(nfs): remove references to old rpcbind state dir

The default state directory (needed by `rpcbind` to save warm start info) was
initially `/tmp`, but it can be configured with `--with-statedir=` since [1].
This default state directory changed to a more appropriate `/var/run` [2], and
then explicitly to `/run` [3].

So, `/var/lib/rpcbind` existed when this dracut module was created because RH/
Fedora had it configured with `--with-statedir=`, like openSUSE until 2016 [4]

[1] https://git.linux-nfs.org/?p=steved/rpcbind.git;a=commitdiff;h=9b1aaa62d44515fa97bc62c00d3eae6c6c3e3c3d
[2] https://git.linux-nfs.org/?p=steved/rpcbind.git;a=commitdiff;h=2e78e6fb51292fea798355e5cb749dbc1de26ca6
[3] https://git.linux-nfs.org/?p=steved/rpcbind.git;a=commitdiff;h=fd1d5387de8078530d51eccf876afe6e6182b975
[4] https://build.opensuse.org/requests/440204/changes

7 weeks agoci: use GNU coreutils instead of uutil's coreutils
Benjamin Drung [Mon, 17 Nov 2025 22:01:41 +0000 (23:01 +0100)] 
ci: use GNU coreutils instead of uutil's coreutils

Tests start to fail on Ubuntu resolute due to rust-coreutils 0.3.0:

```
dd: IO error: Invalid input
```

Use GNU coreutils instead of uutil's coreutils until
https://github.com/uutils/coreutils/issues/9057 and
https://launchpad.net/bugs/2129037 are fixed.

7 weeks agorefactor: change TimeoutSec=0 to TimeoutSec=infinity
Antonio Alvarez Feijoo [Tue, 11 Nov 2025 08:27:03 +0000 (09:27 +0100)] 
refactor: change TimeoutSec=0 to TimeoutSec=infinity

The officially documented way to turn off the timeouts in systemd is setting
them to infinity, 0 is kept as historic compat support.

See https://github.com/systemd/systemd/commit/a9b837aa34a2d0bff1687427c66bed3b74cf0fed

7 weeks agofeat: add header comment to units created by systemd generators
Antonio Alvarez Feijoo [Tue, 11 Nov 2025 08:48:42 +0000 (09:48 +0100)] 
feat: add header comment to units created by systemd generators

Identify which dracut generator created a particular systemd unit or dropin to
help debug issues.

8 weeks agorefactor: fold dracut-init.sh into dracut.sh
Jo Zzsi [Mon, 1 Sep 2025 16:50:47 +0000 (12:50 -0400)] 
refactor: fold dracut-init.sh into dracut.sh

dracut-init.sh is only sourced from dracut.sh, so it could be folded
into one file  and open the door for additional optimizations.

8 weeks agochore(deps): bump github/codeql-action from 3 to 4
dependabot[bot] [Tue, 7 Oct 2025 20:14:26 +0000 (20:14 +0000)] 
chore(deps): bump github/codeql-action from 3 to 4

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
8 weeks agochore(deps): bump actions/upload-artifact from 4 to 5
dependabot[bot] [Tue, 28 Oct 2025 20:03:00 +0000 (20:03 +0000)] 
chore(deps): bump actions/upload-artifact from 4 to 5

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

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

Signed-off-by: dependabot[bot] <support@github.com>
8 weeks agochore(deps): bump actions/setup-node from 5 to 6
dependabot[bot] [Tue, 14 Oct 2025 20:02:46 +0000 (20:02 +0000)] 
chore(deps): bump actions/setup-node from 5 to 6

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

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

Signed-off-by: dependabot[bot] <support@github.com>
8 weeks agofix(dracut-systemd): use expected PS1 in the emergency shell
Antonio Alvarez Feijoo [Mon, 10 Nov 2025 15:35:56 +0000 (16:35 +0100)] 
fix(dracut-systemd): use expected PS1 in the emergency shell

Before starting `dracut-emergency.service`, the function `_emergency_shell()`
writes `PS1` to `/etc/profile`. Then `/etc/profile` is sourced in
`dracut-emergency.sh`, but `PS1` is not exported, so the current hook name is
never displayed in the emergency shell. Also, the default name "dracut" is not
printed either in the fallback `PS1`, because the variable `_name` is not set;
it should be `_rdshell_name`.

8 weeks agofeat: rename rd.live.overlay.overlayfs to rd.overlayfs
Jo Zzsi [Sat, 1 Nov 2025 23:20:42 +0000 (19:20 -0400)] 
feat: rename rd.live.overlay.overlayfs to rd.overlayfs

The overlayfs dracut module can be used without the dmsquash-live
dracut module. This change improves on naming of command line options
with better namespace scoping.

Move overlayfs documentation out of the live images section.

Follow-up to 40dd5c90e.

8 weeks agofix(plymouth): avoid warning if /etc/plymouth/plymouthd.conf is not present
Antonio Alvarez Feijoo [Mon, 10 Nov 2025 15:54:52 +0000 (16:54 +0100)] 
fix(plymouth): avoid warning if /etc/plymouth/plymouthd.conf is not present

openSUSE does not install /etc/plymouth/plymouthd.conf, so plymouthd falls back
to /usr/share/plymouth/plymouthd.defaults

```
$ dracut -f
sed: can't read /etc/plymouth/plymouthd.conf: No such file or directory
```

Follow-up for 7f41458b9d8350d08b0057e050d98b7a25c3e640

8 weeks agofix(dracut-init): do not set DRACUT_KERNEL_MODALIASES for --no-kernel
Jo Zzsi [Sat, 1 Nov 2025 22:25:42 +0000 (18:25 -0400)] 
fix(dracut-init): do not set DRACUT_KERNEL_MODALIASES for --no-kernel

When dracut is invoked with --no-kernel, do not set DRACUT_KERNEL_MODALIASES
to avoid using kmod.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/691
8 weeks agofix(dracut.conf.d): demote uki-virt to CI only
Jo Zzsi [Thu, 6 Nov 2025 13:00:45 +0000 (08:00 -0500)] 
fix(dracut.conf.d): demote uki-virt to CI only

Configurations under dracut.conf.d meant to be shared
and packaged by distributions.

It is unlikely that uki-virt can be commonly agreed
upon by most distributions, so let's demote it to be a
test case only file.

8 weeks agofeat(tpm2-tss): add openSUSE support
Antonio Alvarez Feijoo [Wed, 5 Nov 2025 10:17:31 +0000 (11:17 +0100)] 
feat(tpm2-tss): add openSUSE support

- system-user-tss installs /usr/lib/sysusers.d/system-user-tss.conf
- tpm2-0-tss installs /usr/lib/udev/rules.d/90-tpm.rules