]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
13 hours agoci: remove stalebot config file main
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).

2 days 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.

2 days 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.

2 days 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.

2 days 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
2 days agofix: grammatical errors
Louis Narvaez [Wed, 5 Nov 2025 18:14:20 +0000 (13:14 -0500)] 
fix: grammatical errors

3 days 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
3 days 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.

3 days 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 .

3 days 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 .

3 days 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.

3 days 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 days 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 days 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.

5 days 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.

5 days 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.

5 days 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.

5 days 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=`.

5 days 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.

5 days 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

5 days 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 _.

6 days 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 .

7 days 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.

8 days 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>
9 days 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
9 days 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`).

10 days 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.

10 days 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.

10 days 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

10 days 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.

10 days 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.

10 days 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.

10 days 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.

10 days 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.

10 days 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.

10 days 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

10 days 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.

10 days 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.

10 days 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.

10 days 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.

10 days 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.

10 days 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.

10 days 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.

11 days 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.

11 days 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
12 days 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.

12 days 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.

12 days 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.

12 days 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`).

12 days 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.

12 days 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
```

13 days 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").

13 days 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

13 days 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

3 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.

3 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).

3 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.

3 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.

3 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.

3 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`).

3 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.

3 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

3 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.

3 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`.

3 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")
3 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.

3 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

3 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
3 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.

3 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.

3 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

3 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.

3 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).

3 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.

3 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
3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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 .

3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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
3 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.

3 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.

3 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.

4 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.

4 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.

4 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.

4 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.

4 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.