]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
7 weeks agotest(NFS): enable tests when dhclient is not available
Jo Zzsi [Sun, 14 Sep 2025 13:32:05 +0000 (09:32 -0400)] 
test(NFS): enable tests when dhclient is not available

$USE_NETWORK dracut module needs to be added explicitly
when networking is required.

Follow-up to 16b5e37 .

7 weeks agoci: allow porting to dnsmasq from isc-dhcp-server
Jo Zzsi [Sun, 14 Sep 2025 12:47:37 +0000 (08:47 -0400)] 
ci: allow porting to dnsmasq from isc-dhcp-server

Add dnsmasq to prepare to change the test cases to use dnsmasq.

This is a step towards fixing https://github.com/dracut-ng/dracut-ng/issues/1451.

7 weeks agoci: remove dhclient from Arch, Debian, Fedora CI
Jo Zzsi [Sun, 14 Sep 2025 12:37:32 +0000 (08:37 -0400)] 
ci: remove dhclient from Arch, Debian, Fedora CI

The motivation to remove dhclient is to make sure that dracut
networking does not need dhclient (when used with network-manager
or systemd-networkd).

Some distributions (such as Alpine) no longer packages dhclient,
which might happen to some of these other distributions as well.

7 weeks agotest(NFS): do not use rd.net.timeout.dhcp
Jo Zzsi [Sun, 14 Sep 2025 01:37:38 +0000 (21:37 -0400)] 
test(NFS): do not use rd.net.timeout.dhcp

rd.net.timeout.dhcp is only understood by network-legacy
dracut module.

We want to start migrating to network-manager from network-legacy,
so stop using this command line option in tests.

7 weeks agoci: only add qemu-net dracut module to networked tests
Jo Zzsi [Sun, 14 Sep 2025 03:33:11 +0000 (23:33 -0400)] 
ci: only add qemu-net dracut module to networked tests

Do not slow down local storage tests with qemu-net dependency.

7 weeks agoci: add more daily networking test
Jo Zzsi [Sun, 14 Sep 2025 01:05:10 +0000 (21:05 -0400)] 
ci: add more daily networking test

Create a separate job for network-manager and include all
passing CI containers as network-manager.

7 weeks agoci: enable controlling TEST_FSTYPE as part of container test run
Jo Zzsi [Sat, 13 Sep 2025 23:55:28 +0000 (19:55 -0400)] 
ci: enable controlling TEST_FSTYPE as part of container test run

Pass TEST_FSTYPE to the test container and document a more complex
test run using TEST_FSTYPE.

7 weeks agofix(test-makeroot): make it dependent on initqueue
Jo Zzsi [Sun, 14 Sep 2025 00:04:06 +0000 (20:04 -0400)] 
fix(test-makeroot): make it dependent on initqueue

In its current form test-makeroot dracut module depends on
the initqueue module.

7 weeks agoci: simplify test cases
Jo Zzsi [Sat, 13 Sep 2025 23:22:53 +0000 (19:22 -0400)] 
ci: simplify test cases

Remove unnecessary opinionated parts of the test cases.

Do not add and manage drivers manually in the test case unless
the test case is specifically testing for that.

Consolidate test configurations into common comfig files
when possible.

7 weeks agoci: add more drivers to pass CI in strict hostonly mode as well
Jo Zzsi [Sat, 13 Sep 2025 22:14:14 +0000 (18:14 -0400)] 
ci: add more drivers to pass CI in strict hostonly mode as well

Strict hostonly mode is missing some drivers - especially
when these drivers are not built into the Linux kernel
(e.g. on CentOS or Alpine).

7 weeks agoci(pr): run job only on pull_request main branch
Jo Zzsi [Sat, 13 Sep 2025 19:44:22 +0000 (15:44 -0400)] 
ci(pr): run job only on pull_request main branch

I noticed that commisery job runs even when commit is not
changed. Align job with the rest of the GA.

7 weeks agoci(alpine): enable arm64
Jo Zzsi [Sat, 13 Sep 2025 19:30:31 +0000 (15:30 -0400)] 
ci(alpine): enable arm64

Alpine supports arm64, enable it on the CI.

7 weeks agoci: add test coverage for omitting systemd on a systemd container
Jo Zzsi [Sat, 13 Sep 2025 16:10:15 +0000 (12:10 -0400)] 
ci: add test coverage for omitting systemd on a systemd container

Omitting systemd on a systemd enabled environment is supported, so
let's add test coverage for this configuration.

7 weeks agofix(overlayfs): overlayfs should not use rootfsflags as mount options
Jo Zzsi [Sat, 6 Sep 2025 23:14:34 +0000 (19:14 -0400)] 
fix(overlayfs): overlayfs should not use rootfsflags as mount options

Do not pass all rootfsflags to overlay mount, as it breaks
overlay mount, e.g. if subvol rootfsflags is used for mounting
btrfs subvol.

Here is an example with ext4 rootfs that would result in a failed
boot without this commit.

```
rootflags='nodelalloc' ro rd.live.overlay.overlayfs=1
```

7 weeks agoci(openSUSE): revert cce3ba8
Jo Zzsi [Sat, 13 Sep 2025 15:45:38 +0000 (11:45 -0400)] 
ci(openSUSE): revert cce3ba8

Fedora provides CI coverage for strict hostonly.

7 weeks agoci(integration-extra): disable UEFI test on debian:sid
Jo Zzsi [Fri, 15 Aug 2025 21:29:05 +0000 (17:29 -0400)] 
ci(integration-extra): disable UEFI test on debian:sid

This test has been failing on debian:sid for a while and passing on
all other test containers.

I was unable to find a root cause and what is even more interesting
is that the test is passing on debian:latest (trixie).

At this point of time debian:sid and debian:latest (trixie) should
be very similar, so there is a decent chance that this is a
distribution issue and not a dracut issue.

This is the last remaining failure to make the integration-extra
GA green.

7 weeks agochore(rootfs-block, usrmount): align systemd and non-systemd initramfs
Jo Zzsi [Sun, 7 Sep 2025 01:36:34 +0000 (21:36 -0400)] 
chore(rootfs-block, usrmount): align systemd and non-systemd initramfs

`rootfs-block/mount-root.sh` and `srmount/mount-usr.sh ` are only
included in the initramfs if systemd is _not_ included.

`systemd` does not poke into `NEWROOT` to determine fsck options,
which seems like a good idea.

Let's do the same for non-systemd initramfs. Lot of the related path
 - e.g. `/etc/sysconfig/autofsck` are distribution specific anyways.

7 weeks agofix(dracut): enforce that hostonly is set for hostonly_install
Jo Zzsi [Sat, 2 Aug 2025 15:34:04 +0000 (11:34 -0400)] 
fix(dracut): enforce that hostonly is set for hostonly_install

Before honoring `-H` command line argument, check if
hostonly is actually set.

Here is an examples where `inst` is called even in generic
mode which would result in picking up files from the host
from the /etc directory.

```
inst_simple -H "/etc/nvme/hostnqn"
```

7 weeks agofix(fedora): always include chroot binary
Jo Zzsi [Mon, 11 Aug 2025 11:18:06 +0000 (07:18 -0400)] 
fix(fedora): always include chroot binary

It seems RedHat requires chroot, which is addressed by a commit revert
currently instead of a proper permanent solution, see
https://github.com/redhat-plumbers/dracut-rhel10/pull/49

This commit provides a long term permanent solution that does not
require a downstream revert.

7 weeks agofeat(fedora): switch to strict hostonly mode by default
Jo Zzsi [Fri, 12 Sep 2025 17:41:25 +0000 (13:41 -0400)] 
feat(fedora): switch to strict hostonly mode by default

For Fedora generated initramfs size is a priority over initramfs
portability.

Change the Fedora configuration to reflect this Fedora policy decision.

7 weeks agofeat(Makefile): filter out s390 specific dracut modules
Jo Zzsi [Fri, 15 Aug 2025 11:31:20 +0000 (07:31 -0400)] 
feat(Makefile): filter out s390 specific dracut modules

This commit filters out s390 specific dracut modules, so that they
only get packaged for s390 specific packages.

This commit would allow sharing the list of s390 specific dracut modules
between distributions upstream.

7 weeks agofix(fs-lib): include modules for charsets for working vfat support
Fabian Vogt [Fri, 22 Aug 2025 12:25:54 +0000 (14:25 +0200)] 
fix(fs-lib): include modules for charsets for working vfat support

vfat always needs a codepage and iocharset for mounting, so make sure
those are included.

It's not trivial to get a list of exactly the needed modules,
(depends on mount options and kernel defaults), so take the easy route
and include them all, except in strict hostonly mode.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1303
8 weeks agofix(74nvmf): make sure autoconnect script is run at least once
Martin Wilck [Fri, 5 Sep 2025 17:24:15 +0000 (19:24 +0200)] 
fix(74nvmf): make sure autoconnect script is run at least once

With the previous patch applied, if netroot is not set by the nvmf module
and /dev/root is found, dracut may proceed to pivot without having tried
to connect the nvmf devices. Avoid that by requiring that the autoconnect
script is called at least once.

Signed-off-by: Martin Wilck <mwilck@suse.com>
8 weeks agofix(74nvmf): only set netroot if it's yet empty
Martin Wilck [Fri, 5 Sep 2025 17:19:51 +0000 (19:19 +0200)] 
fix(74nvmf): only set netroot if it's yet empty

The netroot variable is also set by other modules, in particular
"livenet". Don't override it if it is already set. Otherwise booting
a live image may fail in presence of an NBFT table.

Signed-off-by: Martin Wilck <mwilck@suse.com>
8 weeks agoci: do not force no-hostonly-cmdline during testing
Jo Zzsi [Sun, 7 Sep 2025 04:54:47 +0000 (00:54 -0400)] 
ci: do not force no-hostonly-cmdline during testing

There is no longer a need to force additional no-hostonly-cmdline
dracut command line option during test case runs.

8 weeks agochore(deps): bump actions/setup-node from 4 to 5
dependabot[bot] [Tue, 9 Sep 2025 20:02:12 +0000 (20:02 +0000)] 
chore(deps): bump actions/setup-node from 4 to 5

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

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

Signed-off-by: dependabot[bot] <support@github.com>
8 weeks agofix: place dracut generated cmdline conf files in the 10-49 range
Jo Zzsi [Sun, 10 Aug 2025 12:05:48 +0000 (08:05 -0400)] 
fix: place dracut generated cmdline conf files in the 10-49 range

The main motivation of this PR is to make it easier to reason
about the ordering numbers of dracut generated cmdline conf files.

Prefix almost all dracut generated cmdline conf file in the 20 ordering
as the ordering is usually not significant for these cmdline conf file.

Document that 50-59 is the recommended ordering range for
3rd party cmdline conf files to make it consistent with e.g.
3rd party dracut modules recommendation.

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

8 weeks agofix(dracut): library directory creation in --kernel-only
Benjamin Drung [Thu, 14 Aug 2025 17:55:51 +0000 (19:55 +0200)] 
fix(dracut): library directory creation in --kernel-only

Create a initrd with `--kernel-only`. For example:

```
./configure
make
./dracut.sh -l --kernel-only -m kernel-modules -d "ext4 sd_mod" -f $(pwd)/test --keep
```

The resulting has directories with spaces:

```
$ ls -l /var/tmp/dracut.dS9eq2i/initramfs
total 0
drwxrwxr-x 3 root root 60 Aug 13 23:36 ' '
lrwxrwxrwx 1 root root  7 Aug 13 23:36  lib -> usr/lib
drwxr-xr-x 3 root root 60 Aug 13 23:36  usr
$ find /var/tmp/dracut.dS9eq2i/initramfs/\
/var/tmp/dracut.dS9eq2i/initramfs/
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?/usr
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?/usr/lib
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?/usr/lib/x86_64-linux-gnu
/var/tmp/dracut.dS9eq2i/initramfs/ /lib64 /usr/lib64 /lib /usr/lib /lib/x86_64-linux-gnu?/usr/lib/x86_64-linux-gnu/libfakeroot
```

Do not quote `libdirs` when iterating over it since it contains a
space-separated list of library directories.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1570
8 weeks agoimprovement(74nvmf): lookup required NIC kernel modules for NBFT interfaces
Tomas Bzatek [Tue, 3 Jun 2025 16:34:39 +0000 (18:34 +0200)] 
improvement(74nvmf): lookup required NIC kernel modules for NBFT interfaces

When dracut is called with '--hostonly-mode strict' and perhaps even
with --hostonly-nics '' as done by kdump/mkdumprd, all the kernel
modules related to hostonly networking are stripped down. In such
a case it is viable to lookup and install the required kernel modules
ourselves, based on any currently present nbft interfaces.

Note: the lookup depends on the current 'nbftX' network interface
naming.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
8 weeks agofeat(debian.conf): add i18n_vars for Debian/Ubuntu
Benjamin Drung [Wed, 3 Sep 2025 10:31:48 +0000 (12:31 +0200)] 
feat(debian.conf): add i18n_vars for Debian/Ubuntu

Add `i18n_vars` for Debian/Ubuntu.

Bug-Ubuntu: https://launchpad.net/bugs/2032141
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
2 months agoci(azure): reenable FULL-SYSTEMD on azurelinux:3.0
Jo Zzsi [Sat, 6 Sep 2025 10:13:17 +0000 (06:13 -0400)] 
ci(azure): reenable FULL-SYSTEMD on azurelinux:3.0

Since multipath dracut module is disabled in azurelinux CI container
FULL-SYSTEMD can be reenabled.

2 months agotest(USR-MOUNT): add a test run for mounting btrfs subvolume rw
Jo Zzsi [Sun, 7 Sep 2025 02:44:01 +0000 (22:44 -0400)] 
test(USR-MOUNT): add a test run for mounting btrfs subvolume rw

Add a test run for mounting top btrfs root volume readonly
and writeable /usr.

2 months agotest(USR-MOUNT): improve readability by removing separate fstab file
Jo Zzsi [Sun, 7 Sep 2025 02:40:47 +0000 (22:40 -0400)] 
test(USR-MOUNT): improve readability by removing separate fstab file

Let's test dracut's --mount command line option.

2 months agotest(USR-MOUNT): remove / entry from fstab
Jo Zzsi [Sun, 7 Sep 2025 02:38:48 +0000 (22:38 -0400)] 
test(USR-MOUNT): remove / entry from fstab

root is specific in the kernel command line, no need to
list it again with default mount options.

2 months agotest(USR-MOUNT): use the same btrfs drive for both root and /usr
Jo Zzsi [Sun, 7 Sep 2025 02:36:32 +0000 (22:36 -0400)] 
test(USR-MOUNT): use the same btrfs drive for both root and /usr

Use btrfs to its fullest capabilities and create a subvolume for
/usr instead of a separate drive.

2 months agoci: only force include qemu dracut module in the tested initramfs
Jo Zzsi [Sat, 6 Sep 2025 18:58:34 +0000 (14:58 -0400)] 
ci: only force include qemu dracut module in the tested initramfs

Test dracut's module detection capabilities and do not force
additional dracut modules to increase code coverage.

2 months agoci: dhclient is no longer a requirement for server networking
Jo Zzsi [Sat, 6 Sep 2025 19:31:06 +0000 (15:31 -0400)] 
ci: dhclient is no longer a requirement for server networking

dhclient was a requirement for network-legacy dracut module but
it is now optional as server networking is supported by other means
as well.

2 months agoci: only test network-legacy as part of Daily CI
Jo Zzsi [Sat, 6 Sep 2025 15:26:25 +0000 (11:26 -0400)] 
ci: only test network-legacy as part of Daily CI

network-manager is the preferred networking dracut module over
network-legacy.

Currently some tests are only tested with network-legacy.
Improve the situation by actually testing the preferred
dracut module.

2 months agoci: add support for non-legacy network dracut modules
Jo Zzsi [Sat, 6 Sep 2025 14:30:23 +0000 (10:30 -0400)] 
ci: add support for non-legacy network dracut modules

Those network tests that need a server VM currently only
support network-legacy.

Upgrade those test cases to support other network dracut modules
such as network-manager.

2 months agoci: fix GA yml
Jo Zzsi [Sun, 7 Sep 2025 00:47:37 +0000 (20:47 -0400)] 
ci: fix GA yml

bf345f3 unfortunately included incorrect syntax.

This commit fixes the syntax for the GitHub Action.

2 months agoci(opensuse): install zstd as that is the configured compression method
Jo Zzsi [Sat, 6 Sep 2025 19:24:56 +0000 (15:24 -0400)] 
ci(opensuse): install zstd as that is the configured compression method

Commit eada0fb exposed that even though openSUSE configures zstd
compression, it is not installed in the CI container.

This commit eliminates the following warning during tests

```
dracut[E]: Cannot execute compression command 'zstd -3 -T0 -q', falling back to default
```

2 months agoci(ubuntu): exclude test 30
Jo Zzsi [Fri, 15 Aug 2025 21:52:42 +0000 (17:52 -0400)] 
ci(ubuntu): exclude test 30

TEST-30 is passing on all other CI containers including
debian:sid.

This is likely not a dracut issue, so let's exclude it from the
CI for now.

2 months agorefactor(dracut): introduce cpio_extract function
Benjamin Drung [Tue, 12 Aug 2025 14:09:54 +0000 (16:09 +0200)] 
refactor(dracut): introduce cpio_extract function

In preparation to support 3cpio as alternative archive tool, move the
cpio extraction call into `cpio_extract`.

2 months agofix(kernel-modules-extra): remove stray \ before /
Pavel Valena [Mon, 4 Aug 2025 21:48:59 +0000 (23:48 +0200)] 
fix(kernel-modules-extra): remove stray \ before /

Fixes grep warning:
```grep: warning: stray \ before /```

Introduced in grep version 3.11.

2 months agofix(Makefile): exclude hidden directories from shellcheck
Benjamin Drung [Wed, 13 Aug 2025 10:15:22 +0000 (12:15 +0200)] 
fix(Makefile): exclude hidden directories from shellcheck

`shfmt -f .` also searches in hidden directories (like `.git` or
`.pc`). The `.pc` is used on Debian for patch tracking and should not be
searched for files.

So ignore the top-level hidden directories from shellcheck.

2 months agofix(dracut-install): cache resolve_deps calls for speed and less noise
James Le Cuirot [Mon, 11 Aug 2025 09:51:51 +0000 (10:51 +0100)] 
fix(dracut-install): cache resolve_deps calls for speed and less noise

The dlopen dependency failure warning was particularly noisy and likely
to trigger. We were already caching the processed items in resolve_lazy,
but resolve_deps recurses many times, so it was necessary to move the
cache down a level. I didn't reuse "items" here because it would have
clashed with its usage elsewhere.

I had to think about whether the cache would function correctly with
changing values of pdeps. If a dependency is not found on the first
attempt, it does not prevent its consumer from being installed, so it
does not matter that it might be found via a RUNPATH on a subsequent
attempt.

Closes: https://github.com/dracut-ng/dracut-ng/issues/1552
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2 months agofix(dracut-install): handling of multiple sonames in dlopen JSON
James Le Cuirot [Mon, 11 Aug 2025 09:12:59 +0000 (10:12 +0100)] 
fix(dracut-install): handling of multiple sonames in dlopen JSON

We should not try to install every library referenced in the soname
array, only the first one present. The array is intended to be an
ordered preference list.

Closes: https://github.com/dracut-ng/dracut-ng/issues/1552
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2 months agoci(azurelinux): disable multipath dracut module
Jo Zzsi [Mon, 1 Sep 2025 00:31:47 +0000 (20:31 -0400)] 
ci(azurelinux): disable multipath dracut module

Multipath dracut module interferes with FULL-SYSTEMD test on
azurelinux.

Instead of disabling the test, let's instead omit the multipath dracut
module.

This commit improves the workaround for
https://github.com/dracut-ng/dracut-ng/issues/1315 .

2 months agoci: watchdog should not be required for non-networking tests
Jo Zzsi [Mon, 1 Sep 2025 05:24:30 +0000 (01:24 -0400)] 
ci: watchdog should not be required for non-networking tests

Strengthen the test suite by omitting the watchdog dracut
module for non-networking tests.

2 months agoci: run networking tests in more test containers as daily integration
Jo Zzsi [Sun, 24 Aug 2025 04:52:11 +0000 (00:52 -0400)] 
ci: run networking tests in more test containers as daily integration

Run NETWORK test in more CI containers, including ubuntu:devel
as part of daily integration.

2 months agofix(74nvmf): set root=nvmf
Tomas Bzatek [Tue, 24 Jun 2025 14:50:31 +0000 (16:50 +0200)] 
fix(74nvmf): set root=nvmf

In a restricted image like kdump the kernel commandline argument root=
is typically absent. However it is required by the 45net-lib/netroot.sh
module that fails with:

    [   23.599862] dracut: FATAL: No or empty root= argument
    [   23.604956] dracut: Refusing to continue

Inspired by the 74iscsi module, let's set it to root=nvmf if not set
before.

Signed-off-by: Tomas Bzatek <tbzatek@redhat.com>
2 months agofix(UKI): explicitly specify '--uname'
Vitaly Kuznetsov [Mon, 18 Aug 2025 13:24:20 +0000 (15:24 +0200)] 
fix(UKI): explicitly specify '--uname'

When '--uname' is not passed to 'ukify' it uses an autodetection mechanism
which is "hacky as hell" (see systemd commit 483c9c1b8a) and there's

 Kernel version not specified, starting autodetection ðŸ˜–.

in the log. In some cases autodetection fails. As dracut has the required
information already, there's no need to use it at all.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2 months agofeat(dracut): make hostonly the default
Jo Zzsi [Thu, 14 Aug 2025 23:48:10 +0000 (19:48 -0400)] 
feat(dracut): make hostonly the default

Hostonly is already the default in the last dracut release,
but the default was set as a configuration file.

This commit changes that and sets the default inside the dracut.sh
script (unless of course a distribution or user overrides the default).

The hostonly configuration file is kept intentionally, but it is now
not used by the configure option by default.

2 months agoci(alpine): add networkmanager-initrd-generator package
Jo Zzsi [Sun, 24 Aug 2025 15:17:57 +0000 (11:17 -0400)] 
ci(alpine): add networkmanager-initrd-generator package

NETWORK test now would pass on alpine as long as
networkmanager-initrd-generator is installed.

This commit would expand test coverage for network-manager
dracut module.

Dowstream alpine maintains a dracut-tests package the
already does a good job installing dracut test dependencies
including networkmanager-initrd-generator.

Let's rely on dracut-tests package to further reduce
the need to maintain alpine package lists here upstream.

See https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/dracut/APKBUILD

2 months agotest: remove unmaintained tests MULTINIC and BONDBRIDGEVLAN
Jo Zzsi [Sun, 24 Aug 2025 04:12:42 +0000 (00:12 -0400)] 
test: remove unmaintained tests MULTINIC and BONDBRIDGEVLAN

These tests are always skipped in all CI containers as they
no longer pass. These tests require network-legacy and in some
cases ifcfg and nobody stepped up to modernize them for years.

Since the tests are in revision history, iof someone step up
to maintain these tests, the project can easily bring them back.

2 months agofix(resume): avoid matching extra resume= substrings in cmdline
Alexander Zubkov [Sun, 31 Aug 2025 08:12:38 +0000 (10:12 +0200)] 
fix(resume): avoid matching extra resume= substrings in cmdline

`grep ... 'resume='` matches not only 'resume' parameter, but any alike
substring. It could be other parameter ending in 'resume' or even parameter
value. The presense of those could fail the module setup.
Fix it by checking for a space or the beginning of a line.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1595
Signed-off-by: Alexander Zubkov <green@qrator.net>
2 months agofix(dracut-systemd): avoid matching extra root= substrings in cmdline
Alexander Zubkov [Sun, 31 Aug 2025 07:50:29 +0000 (09:50 +0200)] 
fix(dracut-systemd): avoid matching extra root= substrings in cmdline

`strstr ... 'root='` matches not only 'root' parameter, but any alike
substring. It could be other parameter ending in 'root', for example
'cryto_root=' or even parameter value. The presense of those in cmdline
could fail the boot process.
Fix it by adding a space in front of the matched string.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1595
Signed-off-by: Alexander Zubkov <green@qrator.net>
2 months agofix(systemd-sysusers): increase ordering from 68 to 78
Jo Zzsi [Sun, 31 Aug 2025 01:45:52 +0000 (21:45 -0400)] 
fix(systemd-sysusers): increase ordering from 68 to 78

This module should be orders afer all modules that depends on it

This is to make sure that all inst_sysusers calls are in place
before systemd-sysusers is called.

This rule is already documented in the module-setup.sh file
but was not followed for all modules.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1610
2 months agofix: ignore shellcheck SC2329 in addition to SC2317
Benjamin Drung [Wed, 13 Aug 2025 10:33:12 +0000 (12:33 +0200)] 
fix: ignore shellcheck SC2329 in addition to SC2317

Shellcheck <= 0.10 complains about SC2317 (info): Command appears to be
unreachable. Check usage (or ignore if invoked indirectly). Shellcheck
0.11 changes this complaint to SC2329 (info): This function is never
invoked. Check usage (or ignored if invoked indirectly).

So ignore shellcheck SC2329 in addition to SC2317 to make both
shellcheck versions happy.

2 months agofix(dm,dmraid): shellcheck SC2268
Benjamin Drung [Wed, 13 Aug 2025 10:27:27 +0000 (12:27 +0200)] 
fix(dm,dmraid): shellcheck SC2268

Shellcheck 0.11 complains about SC2268 (style): Avoid x-prefix in
comparisons as it no longer serves a purpose.

2 months agodocs: update minimal versions in the compatibility table
Jo Zzsi [Fri, 15 Aug 2025 16:24:43 +0000 (12:24 -0400)] 
docs: update minimal versions in the compatibility table

Now that the minimal supported version is Debian 13, let's
update the corresponding developer documentation.

2 months agoci: switching the main CI to ubuntu:devel from ubuntu:rolling
Jo Zzsi [Sun, 31 Aug 2025 01:31:20 +0000 (21:31 -0400)] 
ci: switching the main CI to ubuntu:devel from ubuntu:rolling

Switch the main CI to ubuntu:devel as it seems more stable and
more forward looking at this time.

Continue to test ubuntu:rolling as part of Daily Integration test.

This commit does not change the test coverage - it just changes
to run tests on ubuntu:devel more frequently.

2 months agoci(gentoo): install networkmanager when systemd is not installed
Jo Zzsi [Sun, 31 Aug 2025 01:59:19 +0000 (21:59 -0400)] 
ci(gentoo): install networkmanager when systemd is not installed

network-manager dracut module no longer depends on the systemd
dracut module.

Alpine and Void CI containers have switched over to networkmanager
networking already.

Let's install networkmanager into the Gentoo CI container as well.

2 months agotest: run-qemu requires initrd argument to be last
Jo Zzsi [Sun, 24 Aug 2025 04:05:46 +0000 (00:05 -0400)] 
test: run-qemu requires initrd argument to be last

If initrd argument is not last the following is seen in the test case run:

```
getopt: invalid option -- 'd'
getopt: invalid option -- 'a'
getopt: invalid option -- 'e'
getopt: invalid option -- 'o'
getopt: invalid option -- 'n'
getopt: invalid option -- 'i'
getopt: invalid option -- 'z'
getopt: invalid option -- 'e'
Usage: lsinitrd [options] [<initramfs file> [<filename> [<filename> [...] ]]]
```

2 months agochore(deps): bump actions/upload-pages-artifact from 3 to 4
dependabot[bot] [Wed, 27 Aug 2025 04:48:19 +0000 (04:48 +0000)] 
chore(deps): bump actions/upload-pages-artifact from 3 to 4

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

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

Signed-off-by: dependabot[bot] <support@github.com>
2 months agochore(deps): bump actions/checkout from 4 to 5
dependabot[bot] [Fri, 15 Aug 2025 23:33:35 +0000 (23:33 +0000)] 
chore(deps): bump actions/checkout from 4 to 5

Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [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/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 months agoci(debian): install 3cpio on Debian and Ubuntu
Benjamin Drung [Fri, 22 Aug 2025 22:55:41 +0000 (00:55 +0200)] 
ci(debian): install 3cpio on Debian and Ubuntu

In preparation for supporting 3cpio, install it on the Debian and Ubuntu
containers (except Debian stable where 3cpio is not available).

2 months agoci: increase test coverage by not forcing additional config
Jo Zzsi [Sun, 24 Aug 2025 15:24:53 +0000 (11:24 -0400)] 
ci: increase test coverage by not forcing additional config

Test suite should also strip if it is enabled in the CI test
container. Make the test case less opinionated to increase
tests coverage.

2 months agofix(dracut): use "-name" to avoid find matching temporary directory
Deli Zhang [Mon, 18 Aug 2025 01:41:10 +0000 (01:41 +0000)] 
fix(dracut): use "-name" to avoid find matching temporary directory

$initdir includes a temporary directory, and the "-path" option of
find attempts to match the entire path. If the temporary directory
happens to contain ".ko", e.g.
  initdir=/var/tmp/dracut.ko79pT/initramfs
this can lead to a incorrect match, finally all executable files are
excluded.

Signed-off-by: Deli Zhang <deli.zhang@cloud.com>
2 months agofix(dracut): decrease logging by default
Jo Zzsi [Fri, 15 Aug 2025 16:03:23 +0000 (12:03 -0400)] 
fix(dracut): decrease logging by default

The current default set in dracut is "4". All distributions
(except Debian), sets the default to "3".

Instead of relying on good defaults only within distribution
configurations, let's set the dracut default to be less verbose.

Most users new to dracut perceive the verbose dracut logs as errors.
This change will help prevent and eliminate user confusion and improve
the user experience.

2 months agoci: introduce networking tests into Daily integration tests
Jo Zzsi [Fri, 15 Aug 2025 16:42:27 +0000 (12:42 -0400)] 
ci: introduce networking tests into Daily integration tests

The newly introduced NETWORK test case is simple enough to run on all
available dracut network modules. Let's use Debian and Arch only for
now to keep the test matrix small.

2 months agofix(debian): lower the ordering number for debian conf
Jo Zzsi [Fri, 15 Aug 2025 16:30:08 +0000 (12:30 -0400)] 
fix(debian): lower the ordering number for debian conf

All other distribution config files (Fedora, openSUSE) has the
ordering number 01, except Debian.

The path of least resistance is to align Debian conf file as well
and number it 01.

2 months agoci: remove kernel command line workarounds from test config
Jo Zzsi [Fri, 15 Aug 2025 20:14:26 +0000 (16:14 -0400)] 
ci: remove kernel command line workarounds from test config

This commit makes the test suite runs less opinionated and
closer to actual users environment.

Some of these workarounds have been added to the CI as patch work,
this is a good time to reevaluate if these are still needed.

2 months agofix(man): move the documentation hostonly and hostonly_mode variables
Jo Zzsi [Fri, 15 Aug 2025 10:37:41 +0000 (06:37 -0400)] 
fix(man): move the documentation hostonly and hostonly_mode variables

Move the documentation block to the man pages.

2 months agofix(man): expand the documentation for hostonly-cmdline
Jo Zzsi [Fri, 15 Aug 2025 11:13:52 +0000 (07:13 -0400)] 
fix(man): expand the documentation for hostonly-cmdline

Explained that it is up to each dracut module what cmdline
arguments get generated.

Explained that bootloader cmdline arguments have priority over
dracut generated cmdline arguments inside the initrd.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1536
2 months agofix(ubuntu): set DISTRIBUTION when building container
Jo Zzsi [Fri, 15 Aug 2025 14:03:03 +0000 (10:03 -0400)] 
fix(ubuntu): set DISTRIBUTION when building container

The containers built with as part of container-extra GA set
DISTRIBUTION variable when when building container.

Do the same for the container GA to make sure that ubuntu:rolling
container is properly built.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1581
2 months agoci: add arm testing to the integration testsuite for each PR
Jo Zzsi [Fri, 15 Aug 2025 01:00:16 +0000 (21:00 -0400)] 
ci: add arm testing to the integration testsuite for each PR

Currently PRs are not tested on arm - only an extended
tessuite that runs once a day run some arm tests.

Let's run at least the basic tests on arm for each PR.

2 months agotest: do not force set hostonly_cmdline to no
Jo Zzsi [Sat, 9 Aug 2025 14:26:03 +0000 (10:26 -0400)] 
test: do not force set hostonly_cmdline to no

hostonly_cmdline=yes is not tested by the CI as CI force sets it to
no.

Make the test case less opinionated and go with the distribution
default configuration, to test both hostonly_cmdline set to no and yes.

2 months agofix(debian.conf): re-enable hostonly_cmdline
Jo Zzsi [Fri, 15 Aug 2025 11:17:18 +0000 (07:17 -0400)] 
fix(debian.conf): re-enable hostonly_cmdline

Do not set hostonly_cmdline to no for Debian-based distributions
and let dracut modules store generated cmdline inside the initrd.

Fixes: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103457
2 months agofeat(configure): autoconfigure configprofile
Jo Zzsi [Sun, 10 Aug 2025 12:20:09 +0000 (08:20 -0400)] 
feat(configure): autoconfigure configprofile

The original motivation of this PR was to set the openSUSE config
inside the openSUSE CI container.

This commit will autoconfigure those configprofiles that are
maintained upstream for fedora, debian and opensuse based distro's.

One notable change from this commit is that it would now allow testing
hostonly_cmdline=yes configuration which is currently untested
on the CI.

2 months agotest(NETWORK): remove the hostonly_mode=sloppy workaround
Jo Zzsi [Tue, 12 Aug 2025 02:47:52 +0000 (22:47 -0400)] 
test(NETWORK): remove the hostonly_mode=sloppy workaround

The test now passes regardless of the value of hostonly_mode.

2 months agofix(network-manager): load required kernel modules
Jo Zzsi [Tue, 12 Aug 2025 03:02:05 +0000 (23:02 -0400)] 
fix(network-manager): load required kernel modules

network-manager always requires nf_tables and other kernel modules
in the generated initramfs to function, regardless if these
modules are loaded on the host or not at the time of initramfs
generation.

2 months agofix(net-lib): always include af_packet
Jo Zzsi [Sat, 9 Aug 2025 22:24:32 +0000 (18:24 -0400)] 
fix(net-lib): always include af_packet

For static IPv4 configurations, we use arping to check for duplicate
IP addresses. arping requires the af_packet module to work, and if arping
fails, the IP address will not be set and booting will fail.
af_packet may not be loaded / required in the running system, for example if
the system had been booted in an IPv6 configuration, or if it had been
manually unloaded. Make sure it's included in initramfs in hostonly mode, too.

Follow-up to b0742165e1fec168 and to de862885e .

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1437
2 months agochore: always set hostonly and hostonly_mode
Jo Zzsi [Sat, 2 Aug 2025 23:08:44 +0000 (19:08 -0400)] 
chore: always set hostonly and hostonly_mode

It makes it easier to reason both for built-in and out-of-tree dracut
modules with the assumption that hostonly and hostonly_mode variables
are always set.

Document most commonly used shell variables for dracut modules and
document that they are always set.

Partial revert of c85c93245bf .

2 months agorevert(efaee44): hostonly_cmdline should continue to default to yes
Jo Zzsi [Tue, 12 Aug 2025 11:17:52 +0000 (07:17 -0400)] 
revert(efaee44): hostonly_cmdline should continue to default to yes

Despite the Fedora setting, let's keep the default to yes
for distributions that do not whish to overwrite the default.

2 months agofix(dracut-install): broken calls to mmap with 0 length
James Le Cuirot [Tue, 12 Aug 2025 09:15:58 +0000 (10:15 +0100)] 
fix(dracut-install): broken calls to mmap with 0 length

This results in an invalid argument error, so check for 0 length first.

Fixes: https://bugs.gentoo.org/961340
Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
2 months agofix(debian): remove Debian 12 support
Jo Zzsi [Sat, 2 Aug 2025 17:40:55 +0000 (13:40 -0400)] 
fix(debian): remove Debian 12 support

Debian v13 (Trixie) is now the minimal Debian version supported
by the CI.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1458
2 months agofix(lsinitrd): avoid rechecking for squash images
Benjamin Drung [Mon, 11 Aug 2025 12:01:23 +0000 (14:01 +0200)] 
fix(lsinitrd): avoid rechecking for squash images

The function `extract_squash_img` uses `SQUASH_TMPDIR` to check that it
was already called but did not find any squash image.

Instead of setting `SQUASH_TMPDIR` `SQUASH_TMPFILE` was set and
therefore the cpio file is searched again on every `extract_squash_img`
call.

2 months agofix(Makefile): use install for installing files
Benjamin Drung [Tue, 5 Aug 2025 17:16:17 +0000 (19:16 +0200)] 
fix(Makefile): use install for installing files

The `cp` command will copy the file/directory permissions from the
source files. The local source files might have group write permission
set which should not be applied to the installation.

Tighten the file/directory permission by using the `install` command
with specifying the mode.

2 months agorefactor(lsinitrd): introduce cpio_list function
Benjamin Drung [Wed, 6 Aug 2025 17:50:49 +0000 (19:50 +0200)] 
refactor(lsinitrd): introduce cpio_list function

In preparation to support 3cpio as alternative archive tool, move the
cpio listing call into `cpio_list`.

2 months agorefactor(lsinitrd): introduce cpio_extract_to_stdout function
Benjamin Drung [Wed, 6 Aug 2025 17:50:08 +0000 (19:50 +0200)] 
refactor(lsinitrd): introduce cpio_extract_to_stdout function

In preparation to support 3cpio as alternative archive tool, move the
cpio extraction to stdout call into `cpio_extract_to_stdout`.

2 months agorefactor(lsinitrd): introduce cpio_extract function
Benjamin Drung [Wed, 6 Aug 2025 16:57:15 +0000 (18:57 +0200)] 
refactor(lsinitrd): introduce cpio_extract function

In preparation to support 3cpio as alternative archive tool, move the
cpio extraction call into `cpio_extract`.

2 months agofix(kernel-modules): add Cadence USB driver to base
Benjamin Drung [Thu, 31 Jul 2025 19:45:17 +0000 (21:45 +0200)] 
fix(kernel-modules): add Cadence USB driver to base

Installed Debian Trixie d-i rc2 (dvd-1) on USB storage on Pine64 Star64
is not bootable due to missing modules `cdns3_starfive` and `cdns3` from
initramfs.

Note the above USB support on Pine64 Star64 is directly part of StarFive
JH7110 CPU and differs from StarFive VisionFive2 which uses an external
controller attached to the PCIe bus.

Bug-Debian: https://bugs.debian.org/1108924

2 months agofix(systemd-portabled, initqueue): enable systemd type units
Jo Zzsi [Sun, 10 Aug 2025 17:55:08 +0000 (13:55 -0400)] 
fix(systemd-portabled, initqueue): enable systemd type units

Use systemctl enable command (instead of add-wants command) to
enable systemd type units.

Without these changes the following error message is seen on
TEST-FULL-SYSTEMD:

```
Failed to add dependency on unit: Unit initrd.target does not exist
Failed to add dependency on unit: Unit initrd.target does not exist
```

2 months agotest(KERNEL-INSTALL): config path for test dracut config
Jo Zzsi [Sun, 10 Aug 2025 11:30:29 +0000 (07:30 -0400)] 
test(KERNEL-INSTALL): config path for test dracut config

The path for test dracut config has changed. Fix it.

2 months agotest(NETWORK): coverage for bringing up network interface
Jo Zzsi [Sun, 13 Jul 2025 05:35:51 +0000 (01:35 -0400)] 
test(NETWORK): coverage for bringing up network interface

Currently, all networking tests in the dracut CI require a client and a
server VM, and all the server VMs are enabled to work with network-legacy only.

Introduce a simpler networking test that tests the rd.neednet dracut
boot time argument and ensures that the interface is up without needing
a server VM.

This simple networking test could be run in most networking configurations
and pass in the Void test containers as well, which previously have not had
any network tests enabled.

2 months agotest: remove leftover comment
Jo Zzsi [Sun, 10 Aug 2025 10:55:20 +0000 (06:55 -0400)] 
test: remove leftover comment

The 'install the files needed to make the root filesystem' comment
no longer adds value to the understanding of the test cases.
Remove it.

2 months agofix(systemd-sysext): skip manual systemct enablement for systemd>=258
Vitaly Kuznetsov [Mon, 11 Aug 2025 09:36:41 +0000 (11:36 +0200)] 
fix(systemd-sysext): skip manual systemct enablement for systemd>=258

systemd-258 ships the required initrd.target.wants symlinks, there is
no need to enable services manually. Use the existence of old
systemd-confext/systemd-sysext units as an indication of when manual
(legacy) enablement is still needed.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2 months agofix(systemd-sysext): package initrd.target.wants symlinks
Vitaly Kuznetsov [Mon, 11 Aug 2025 09:34:56 +0000 (11:34 +0200)] 
fix(systemd-sysext): package initrd.target.wants symlinks

Systemd-258 provides the 'initrd.target.wants' symlinks for systemd-confext/
systemd-sysext initrd services. Include them to the image when present.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2 months agoci: remove testing with ubuntu:latest
Jo Zzsi [Sun, 10 Aug 2025 15:44:15 +0000 (11:44 -0400)] 
ci: remove testing with ubuntu:latest

ubuntu:latest could be as old as two years old, and, while testing with
debian:stable makes sense, testing with ubuntu:latest seems redundant.

Ubuntu is now well integrated with dracut and dracut usptream main no
longer needs to target (or backported) to ubuntu:latest.