]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
11 months agofix(iscsi): don't require network setup for bnx2i
Martin Wilck [Fri, 16 Aug 2024 20:33:18 +0000 (22:33 +0200)] 
fix(iscsi): don't require network setup for bnx2i

The bnx2i iSCSI transport doesn't require networking to be set up in order to
bring up iSCSI connections. Quite to the contrary, trying to bring up the
network may actually disturb the iSCSI connection. This holds in particular
for bnx2i device with NPAR (network partitioning) support, where a given
network interface can be used for both iSCSI and regular networking. Setting
certain network parameters like MTU on the network side can fatally disrupt
an existing iSCSI connection. Even if this does not happen, trying to bring
up the regular network interfaces is pointless because iSCSI won't be enabled
over regular TCP/IP anyway. Trying to bring up the network interfaces and
possibly failing delays booting unecessarily and may cause timeout, without
benefit.

Detect the bnx2i offload module at setup time and communicate it to
parse-iscsiroot.sh using a new parameter, "rd.iscsi.transport". It's currently
only effective for bnx2i. It might be useful for other transports as well,
but we haven't been able to test the other transports as thoroughly as bnx2i.

Signed-off-by: Martin Wilck <mwilck@suse.com>
11 months agoci: fix daily integration tests
Jo Zzsi [Fri, 17 Jan 2025 23:53:04 +0000 (18:53 -0500)] 
ci: fix daily integration tests

With recent changes in CI container tags
latest tag is required.

11 months agoci: disable arm64 containers where the test does not yet run
Jo Zzsi [Fri, 17 Jan 2025 23:34:53 +0000 (18:34 -0500)] 
ci: disable arm64 containers where the test does not yet run

arm64 containers build, but the CI tests are failing
on the following platforms
 - alpine
 - arch
 - opensuse
 - void

11 months agoci: run arm64 tests on more CI containers
Jo Zzsi [Fri, 17 Jan 2025 17:35:17 +0000 (12:35 -0500)] 
ci: run arm64 tests on more CI containers

In addition to Debian and Fedora, run arm64 tests
on Alpine, openSUSE, Ubuntu and Void as well.

debian-arm64 and fedora-arm64 tags are no longer needed.

11 months agoci: tag both amd and arm containers
Jo Zzsi [Fri, 17 Jan 2025 17:51:40 +0000 (12:51 -0500)] 
ci: tag both amd and arm containers

This PR meant to resolve the CI regression introduced by a413783.

11 months agoci: build arm64 containers for all non-extra containers
Jo Zzsi [Fri, 17 Jan 2025 16:47:25 +0000 (11:47 -0500)] 
ci: build arm64 containers for all non-extra containers

Now that GitHub Actions provide the facility to build
arm64 containers nativly, the project can afford building
all CI containers for arm64 that supports it.

11 months agoci: switch to native ARM GitHub runners
Jo Zzsi [Fri, 17 Jan 2025 13:22:06 +0000 (08:22 -0500)] 
ci: switch to native ARM GitHub runners

See https://github.blog/changelog/2025-01-16-linux-arm64-hosted-runners-now-available-for-free-in-public-repositories-public-preview/

11 months agotest(UEFI): unskip test for Arch
Jo Zzsi [Thu, 16 Jan 2025 01:57:45 +0000 (20:57 -0500)] 
test(UEFI): unskip test for Arch

On Arch the path for OVMF is
/usr/share/edk2/x64/OVMF_CODE.4m.fd

11 months agofeat(livenet): get live image size from TFTP servers
Antonio Alvarez Feijoo [Thu, 16 Jan 2025 10:36:14 +0000 (11:36 +0100)] 
feat(livenet): get live image size from TFTP servers

While the current code handles HTTP and FTP headers, parsing `Content-Length`,
TFTP servers need a special handling. E.g.:

```
$ curl -sIL tftp://127.0.0.1/leap-15.3/Leap-15.3_appliance.x86_64-1.15.3.iso
$ echo $?
8
```

Being more verbose (`-v`), we can see:

```
$ curl -vsIL tftp://127.0.0.1/leap-15.3/Leap-15.3_appliance.x86_64-1.15.3.iso
*   Trying 127.0.0.1:69...
* Connected to 127.0.0.1 (127.0.0.1) port 69
* set timeouts for state 0; Total  300000, retry 6 maxtry 50
* got option=(tsize) value=(285802496)
* tsize parsed from OACK (285802496)
* got option=(timeout) value=(6)
* got option=(blksize) value=(512)
* blksize parsed from OACK (512) requested (512)
* Connected for receive
* set timeouts for state 1; Total  0, retry 72 maxtry 50
* Closing connection
$ echo $?
8
```

So, in this case, we can ignore the non-zero exit from curl and parse the
`tsize` value received.

11 months agofix(systemd-sysuser): add support for Gentoo
Jo Zzsi [Sun, 12 Jan 2025 23:33:12 +0000 (18:33 -0500)] 
fix(systemd-sysuser): add support for Gentoo

systemd-sysuser dracut module uses inst_sysusers function
to install configuration files. These configuration files are
named differently in Gentoo, which impacts upstream Gentoo CI
as well.

Partially fixes https://github.com/dracut-ng/dracut-ng/issues/274

Based on Gentoo downstream patch
https://github.com/gentoo/gentoo/blob/master/sys-kernel/dracut/files/dracut-103-acct-user-group-gentoo.patch
by Nowa Ammerlaan <nowa@gentoo.org>

11 months agofix(img-lib): trim required binaries
Jo Zzsi [Tue, 14 Jan 2025 13:28:02 +0000 (08:28 -0500)] 
fix(img-lib): trim required binaries

Make all compression methods optional to allow
including only the binaries that are needed to uncompress.

11 months agofix(systemd-ask-password): do not half-install systemd-ask-password-wall
Jo Zzsi [Mon, 13 Jan 2025 01:01:09 +0000 (20:01 -0500)] 
fix(systemd-ask-password): do not half-install systemd-ask-password-wall

Do not install the path unit when the service unit is not installed
for systemd-ask-password-wall.

Fixes the following warning on the CI:

[FAILED] Failed to start Forward Password Requests to Wall Directory Watch.
See 'systemctl status systemd-ask-password-wall.path' for details.
...
systemd[1]: systemd-ask-password-wall.path: Refusing to start, unit systemd-ask-password-wall.service to trigger not loaded.
systemd[1]: Failed to start Forward Password Requests to Wall Directory Watch.

11 months agotest(FULL-SYSTEMD): support both dbus-broker and dbus-daemon
Jo Zzsi [Sun, 12 Jan 2025 22:48:52 +0000 (17:48 -0500)] 
test(FULL-SYSTEMD): support both dbus-broker and dbus-daemon

All CI containers should be able to test the following dracut
modules, so no check is needed
 - systemd-hostnamed
 - systemd-portabled
 - systemd-timedated
 - systemd-network-management

11 months agoci(fedora): switch Fedora to dbus-broker
Jo Zzsi [Sun, 12 Jan 2025 20:41:57 +0000 (15:41 -0500)] 
ci(fedora): switch Fedora to dbus-broker

switch Fedora to dbus-broker and document the status of dbus-daemon
and dbus-broker for each CI container.

In general if the distribution supports a dbus metapackage, try
to honor the distribution default choice.

11 months agorefactor(test-root): move more test steps from FULL-SYSTEMD test
Jo Zzsi [Sun, 12 Jan 2025 15:59:06 +0000 (10:59 -0500)] 
refactor(test-root): move more test steps from FULL-SYSTEMD test

Move more test steps from FULL-SYSTEMD test into test-root
dracut module.

11 months agorefactor(test-root): move systemd testsuite files from FULL-SYSTEMD
Jo Zzsi [Sun, 12 Jan 2025 15:10:47 +0000 (10:10 -0500)] 
refactor(test-root): move systemd testsuite files from FULL-SYSTEMD

Move systemd testsuite files from FULL-SYSTEMD test to test-root
dracut module to be able to share between tests.

11 months agotest(FULL-SYSTEMD): factor out systemd unit files to be shared between tests
Jo Zzsi [Sun, 12 Jan 2025 14:46:36 +0000 (09:46 -0500)] 
test(FULL-SYSTEMD): factor out systemd unit files to be shared between tests

Create testsuite.target and testsuite.service files.

11 months agotest: check for /usr/lib/systemd/system for systemd enabled rootfs
Jo Zzsi [Sat, 11 Jan 2025 13:24:14 +0000 (08:24 -0500)] 
test: check for /usr/lib/systemd/system for systemd enabled rootfs

Follow-up to bc2b6b0

11 months agotest: graceful poweroff for systemd based tests
Jo Zzsi [Sat, 11 Jan 2025 02:04:59 +0000 (21:04 -0500)] 
test: graceful poweroff for systemd based tests

This PR makes the test case more life-like and prepares
for testing dracut-shutdown.

11 months agotest: remove special handling of the plymouth binary/process
Jo Zzsi [Wed, 8 Jan 2025 02:23:57 +0000 (21:23 -0500)] 
test: remove special handling of the plymouth binary/process

Special handling is no longer required and it just adds
congnitive load to the project.

plymouth handling should be consolidated into the
plymouth dracut modules as much as possible.

11 months agofix(nfs): do not set DRACUT_RESOLVE_LAZY for musl
Jo Zzsi [Sat, 4 Jan 2025 12:17:12 +0000 (07:17 -0500)] 
fix(nfs): do not set DRACUT_RESOLVE_LAZY for musl

Also move inst_libdir_file as the last step to handle
the error case better.

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

11 months agofeat(systemd-sysusers): run systemd-sysusers as part of the build process
Jo Zzsi [Sat, 4 Jan 2025 23:45:32 +0000 (18:45 -0500)] 
feat(systemd-sysusers): run systemd-sysusers as part of the build process

This PR makes the boot process faster and the generated initrd smaller.

It also make the code easier to maintain.

The primary goal of this PR is refactoring and removing code,
this is why it is not marked as perf() in the commit.

That said, with this PR systemd-sysusers no longer needs to be copied
into the initrd, so that is about 50KB saving both on when initrd gets
saved/compressed and when it gets loaded and uncompressed.

This PR also make the debugging slightly easier as one can just
inspect /etc/passwd with lsinitrd instead of trying to figure out
which users are created runtime.

11 months agofeat(dracut-systemd): install dracut-* into /usr/bin
Benjamin Drung [Fri, 22 Nov 2024 18:22:54 +0000 (19:22 +0100)] 
feat(dracut-systemd): install dracut-* into /usr/bin

Modern systems have /usr merged and `/bin` pointing to `/usr/bin`. So
install all `dracut-*` scripts into `/usr/bin` instead of `/bin`.

11 months agochore(deps): bump softprops/action-gh-release from 2.2.0 to 2.2.1
dependabot[bot] [Tue, 7 Jan 2025 20:36:21 +0000 (20:36 +0000)] 
chore(deps): bump softprops/action-gh-release from 2.2.0 to 2.2.1

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.2.0 to 2.2.1.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.2.0...v2.2.1)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
11 months agochore(crypt): do not use recursive on removing a file
Jo Zzsi [Tue, 7 Jan 2025 14:42:03 +0000 (09:42 -0500)] 
chore(crypt): do not use recursive on removing a file

11 months agoci(opensuses): limit the number of warnings with small fixes
Jo Zzsi [Tue, 7 Jan 2025 02:49:29 +0000 (21:49 -0500)] 
ci(opensuses): limit the number of warnings with small fixes

procps is already installed.
iproute maps to iproute2.
kernel maps to kernel-vanilla
nfs-utils maps to nfs-kernel-server
qemu-kvm maps to qemu

12 months agotest(FULL-SYSTEMD): systemd-network-management dracut module coverage
Jo Zzsi [Mon, 6 Jan 2025 00:54:35 +0000 (19:54 -0500)] 
test(FULL-SYSTEMD): systemd-network-management dracut module coverage

Follow-up to 75f3a19. Only mask systemd-sysuser for read-only test.

12 months agotest(FULL-SYSTEMD): when systemd-networkd is available, install it
Jo Zzsi [Sun, 5 Jan 2025 22:42:38 +0000 (17:42 -0500)] 
test(FULL-SYSTEMD): when systemd-networkd is available, install it

12 months agotest(FULL-SYSTEMD): when dbus-broker is available, add dbus dependent modules
Jo Zzsi [Sun, 5 Jan 2025 20:41:05 +0000 (15:41 -0500)] 
test(FULL-SYSTEMD): when dbus-broker is available, add dbus dependent modules

Goal is to gradually test more systemd modules and without destabilizing
the CI.

12 months agoci(opensuse): install systemd-portable
Jo Zzsi [Sun, 5 Jan 2025 20:57:47 +0000 (15:57 -0500)] 
ci(opensuse): install systemd-portable

systemd-portable is installed on all other systemd enabled containers
except opensuse. systemd-portable is an established tool,
there is no need to handle teh case in the CI when it is not available.

12 months agorevert(ci): uninstall btrfs-progs for centos
Jo Zzsi [Sun, 5 Jan 2025 13:12:50 +0000 (08:12 -0500)] 
revert(ci): uninstall btrfs-progs for centos

12 months agoci(centos): install btrfs-progs
Jo Zzsi [Sun, 5 Jan 2025 01:54:15 +0000 (20:54 -0500)] 
ci(centos): install btrfs-progs

12 months agochore: drop support for ifcfg
Jo Zzsi [Sat, 4 Jan 2025 23:26:02 +0000 (18:26 -0500)] 
chore: drop support for ifcfg

Follow-up to 8ba8d55

12 months agotest: test.sh should run privileged containers for development
Jo Zzsi [Sun, 5 Jan 2025 01:56:36 +0000 (20:56 -0500)] 
test: test.sh should run privileged containers for development

Some tests would only pass in privileged containers.

Follow-up to 1a4f523.

12 months agochore(i18n): install kbd_mode and stty optionally
Jo Zzsi [Sat, 4 Jan 2025 22:58:51 +0000 (17:58 -0500)] 
chore(i18n): install kbd_mode and stty optionally

12 months agotest: simplify tty handling
Jo Zzsi [Sat, 4 Jan 2025 22:03:41 +0000 (17:03 -0500)] 
test: simplify tty handling

12 months agofix(crypt): crypt-lib.sh optionally depends on stty
Jo Zzsi [Sat, 4 Jan 2025 21:56:03 +0000 (16:56 -0500)] 
fix(crypt): crypt-lib.sh optionally depends on stty

Follow-up to 1af3531.

12 months agorefactor(i18n): move code around to increase readability
Jo Zzsi [Sat, 4 Jan 2025 21:12:29 +0000 (16:12 -0500)] 
refactor(i18n): move code around to increase readability

12 months agotest(FULL-SYSTEMD): only set kernel command line when needed
Jo Zzsi [Sat, 4 Jan 2025 16:45:23 +0000 (11:45 -0500)] 
test(FULL-SYSTEMD): only set kernel command line when needed

12 months agofix(i18n): make /etc/vconsole.conf optional
Jo Zzsi [Sat, 4 Jan 2025 13:15:39 +0000 (08:15 -0500)] 
fix(i18n): make /etc/vconsole.conf optional

/etc/vconsole.conf should be optional as these variables can be set
on the kernel command line as well.

12 months agochore(systemd): vconsole.conf and locale.conf managed by i18n module
Jo Zzsi [Wed, 1 Jan 2025 21:21:41 +0000 (16:21 -0500)] 
chore(systemd): vconsole.conf and locale.conf managed by i18n module

12 months agochore(base): make chown optional
Jo Zzsi [Wed, 1 Jan 2025 16:50:58 +0000 (11:50 -0500)] 
chore(base): make chown optional

Take this opportunity to sort the lists.

12 months agofix(dracut-systemd): check SYSTEMD_SULOGIN_FORCE before allowing passwordless
Jo Zzsi [Sun, 17 Nov 2024 14:12:18 +0000 (09:12 -0500)] 
fix(dracut-systemd): check SYSTEMD_SULOGIN_FORCE before allowing passwordless

Follow-up to https://github.com/dracutdevs/dracut/commit/32f68c1

This functionality matches default systemd (and as such mkosi, mkinitcpio).

12 months agofix(nfs): use the same directory set ownership and permissions as the host
Jo Zzsi [Tue, 31 Dec 2024 13:30:20 +0000 (08:30 -0500)] 
fix(nfs): use the same directory set ownership and permissions as the host

Related bug report: https://bugzilla.redhat.com/show_bug.cgi?id=1924950

12 months agofix(systemd-tmpfiles): passwd and group file management
Jo Zzsi [Sun, 15 Dec 2024 01:43:35 +0000 (20:43 -0500)] 
fix(systemd-tmpfiles): passwd and group file management

Do not install full unmodified /etc/passwd and /etc/group form the host.

This code is misleading as it is always a no-op since /etc/passwd
would already exists and this line would be ignored.

12 months agoci(opensuse): make mkosi-initrd installation more complete
Jo Zzsi [Mon, 30 Dec 2024 14:55:33 +0000 (09:55 -0500)] 
ci(opensuse): make mkosi-initrd installation more complete

Add '--privileged' flag for running systemd tests to make sure
mkosi-initrd runs well.

12 months agotest(BASIC): simplify and further strip down basic test
Jo Zzsi [Sun, 29 Dec 2024 21:51:45 +0000 (16:51 -0500)] 
test(BASIC): simplify and further strip down basic test

Move fips testing into the more complex STORAGE test.

Build the kernel command line option into the BASIC initrd.

12 months agotest: make sure TEST_FSTYPE kernel driver is included in the initrd
Jo Zzsi [Sun, 29 Dec 2024 12:42:22 +0000 (07:42 -0500)] 
test: make sure TEST_FSTYPE kernel driver is included in the initrd

12 months agoci: test xfs on Fedora and btrfs on Arch
Jo Zzsi [Sun, 29 Dec 2024 17:40:03 +0000 (12:40 -0500)] 
ci: test xfs on Fedora and btrfs on Arch

btrfs is not readily available on CentOS.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1079
12 months agoci(opensuse): remove the workaround to disable hostonly mode
Jo Zzsi [Sun, 29 Dec 2024 15:38:57 +0000 (10:38 -0500)] 
ci(opensuse): remove the workaround to disable hostonly mode

Switch back to ext4 from btrfs for now to ensure first that
hostonly mode now works with openSUSE.

12 months agoci(fedora): change the default FSTYPE to btrfs for Fedora
Jo Zzsi [Sun, 29 Dec 2024 14:07:39 +0000 (09:07 -0500)] 
ci(fedora): change the default FSTYPE to btrfs for Fedora

12 months agoci(opensuse): switch from dnf to zypper for package management
Jo Zzsi [Sun, 29 Dec 2024 00:06:24 +0000 (19:06 -0500)] 
ci(opensuse): switch from dnf to zypper for package management

zypper is the recommended package manager for openSUSE.

Also mkosi openSUSE package has a dependency on zypper.

12 months agotest(FULL-SYSTEMD): add a reference test step for mkosi
Jo Zzsi [Sat, 28 Dec 2024 12:54:16 +0000 (07:54 -0500)] 
test(FULL-SYSTEMD): add a reference test step for mkosi

Fail the test if mkosi installs some services that dracut does not.

12 months agoci(opensuse): install mkosi for reference
Jo Zzsi [Sat, 28 Dec 2024 14:15:45 +0000 (09:15 -0500)] 
ci(opensuse): install mkosi for reference

mkosi is well supported in openSUSE and I was not able to
make it work in the Arch container, so lets move mkosi
reference testing from Arch to openSUSE.

12 months agoci(debian): install console-data instead of console-setup to test i18n module
Jo Zzsi [Fri, 27 Dec 2024 12:47:44 +0000 (07:47 -0500)] 
ci(debian): install console-data instead of console-setup to test i18n module

console-data is required for loadkeys to work properly.

If console-data is not installed, the following command fails

loadkeys  --default
loadkeys: Unable to find file: defkeymap.map

12 months agofix(ENC-RAID-LVM): correct test name and remove obsolete step
Jo Zzsi [Thu, 26 Dec 2024 15:36:41 +0000 (10:36 -0500)] 
fix(ENC-RAID-LVM): correct test name and remove obsolete step

Follow-up to 10d5b3d .

12 months agoci(centos): remove workaround for centos
Jo Zzsi [Thu, 26 Dec 2024 15:39:29 +0000 (10:39 -0500)] 
ci(centos): remove workaround for centos

Follow-up to e78963f .

Workaround is no longer needed after 23ef35d .

12 months agofeat(crypt): remove empty /etc/crypttab to allow creating it later
Jo Zzsi [Thu, 26 Dec 2024 13:51:53 +0000 (08:51 -0500)] 
feat(crypt): remove empty /etc/crypttab to allow creating it later

crypt module should not install an empty /etc/crypttab in hostonly mode.

Some distributions ship with an /etc/crypttab without entries (just
with comments). In those distributions installing /etc/crypttab
as part of --install command line option in hostonly mode would not
work as expected.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1057
12 months agoci(ubuntu): install plymouth-themes
Jo Zzsi [Wed, 25 Dec 2024 18:04:39 +0000 (13:04 -0500)] 
ci(ubuntu): install plymouth-themes

https://bugs.launchpad.net/ubuntu/+source/dracut/+bug/1596220 is fixed.

12 months agotest(DMSQUASH): increase partition size
Jo Zzsi [Wed, 25 Dec 2024 14:29:32 +0000 (09:29 -0500)] 
test(DMSQUASH): increase partition size

initrd on void is larger due to non-hostonly configuration.
Increase partition size to accommodate the larger initrd.

12 months agofix(test): running tests on bare metal fail with syntax error
Antonio Alvarez Feijoo [Mon, 23 Dec 2024 16:17:52 +0000 (17:17 +0100)] 
fix(test): running tests on bare metal fail with syntax error

```
$ sudo make TESTS="62" check
make[1]: Entering directory '/mnt/work/dracut-ng/test/TEST-62-BONDBRIDGEVLAN'
/mnt/work/dracut-ng/test/test-functions: line 252: [: : integer expression expected
```

Fixes add225f6b4198c7eaa20e5504b0711ee37bd7f13

12 months agofix(systemd-pcrphase): include systemd-pcrphase in hostonly mode
Jo Zzsi [Sun, 15 Dec 2024 13:46:47 +0000 (08:46 -0500)] 
fix(systemd-pcrphase): include systemd-pcrphase in hostonly mode

Commit https://github.com/jozzsi/dracut-ng/commit/a2193b7 enables
to include systemd-pcrphase in hostonly mode without undesired
side-effects.

12 months agofix(systemd-sysext): install new initrd-specific units
Antonio Alvarez Feijoo [Wed, 18 Dec 2024 13:36:29 +0000 (14:36 +0100)] 
fix(systemd-sysext): install new initrd-specific units

The old service units will no longer be activated in the initrd.

Added in https://github.com/systemd/systemd/commit/7a8556b90119412db8f55534c72a1158edf275e6

12 months agochore(deps): bump softprops/action-gh-release from 2.1.0 to 2.2.0
dependabot[bot] [Tue, 17 Dec 2024 20:30:28 +0000 (20:30 +0000)] 
chore(deps): bump softprops/action-gh-release from 2.1.0 to 2.2.0

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
12 months agoci(arch): add linux-firmware to increase test coverage
Laszlo Gombos [Tue, 17 Dec 2024 03:09:22 +0000 (22:09 -0500)] 
ci(arch): add linux-firmware to increase test coverage

12 months agofix(systemd-sysusers): systemd.conf no longer exists
Jo Zzsi [Sun, 15 Dec 2024 13:11:48 +0000 (08:11 -0500)] 
fix(systemd-sysusers): systemd.conf no longer exists

systemd.conf has been removed in systemd v250.

See https://github.com/systemd/systemd/commit/564761f

12 months agoci: reenable systemd tests for openSUSE
Jo Zzsi [Sat, 14 Dec 2024 14:29:35 +0000 (09:29 -0500)] 
ci: reenable systemd tests for openSUSE

12 months agotest(FULL-SYSTEMD): install more systemd services into test rootfs
Jo Zzsi [Sat, 14 Dec 2024 14:15:46 +0000 (09:15 -0500)] 
test(FULL-SYSTEMD): install more systemd services into test rootfs

Make the test scenario more similar to a typical usage scenario.

12 months agofix(systemd-tmpfiles): copy 20-systemd-stub.conf into the initrd
Jo Zzsi [Tue, 10 Dec 2024 19:11:13 +0000 (14:11 -0500)] 
fix(systemd-tmpfiles): copy 20-systemd-stub.conf into the initrd

Some of the tmpfiles to be managed during initrd phase are now
described in a separate tmpfiles.d snippet, see
https://github.com/systemd/systemd/commit/408ab988dbf6723871afd3503d11bd0deb50f846

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1046
13 months agoci(alpine): dhclient is no longer packaged in alpine
Jo Zzsi [Thu, 5 Dec 2024 13:13:15 +0000 (08:13 -0500)] 
ci(alpine): dhclient is no longer packaged in alpine

Resolves the following error:
dhclient (no such package):

13 months agotest: skip UEFI test on architectures without support
Benjamin Drung [Wed, 27 Nov 2024 17:40:24 +0000 (18:40 +0100)] 
test: skip UEFI test on architectures without support

UEFI is only supported on x86, aarch64, and riscv64 (see architecture
check in `dracut.sh`). It is not supported on s390x.

So skip TEST-12-UEFI on architectures that do not support UEFI.

Fixes: https://github.com/dracut-ng/dracut-ng/issues/976
13 months agofix(35network-manager): install nftables kernel modules needed
Fernando Fernandez Mancera [Tue, 26 Nov 2024 10:27:54 +0000 (11:27 +0100)] 
fix(35network-manager): install nftables kernel modules needed

NetworkManager requires nf_tables, nfnetlink and nft_fwd_netdev kernel
modules to operate balance-slb bonding mode.

Fixes a6264d1726d9 ("fix(35network-manager): install nft binary during module installation")

13 months agotest(ENC-RAID-LVM): simplify raid configuration
Jo Zzsi [Mon, 25 Nov 2024 21:43:03 +0000 (16:43 -0500)] 
test(ENC-RAID-LVM): simplify raid configuration

Use two (instead of three) drives for the raid to speculativly
improve the stability of this tests.
It has been randomly failing on the CI.

13 months agotest(SYSTEMD): remove subtests that do not increase test coverage
Jo Zzsi [Mon, 25 Nov 2024 21:06:01 +0000 (16:06 -0500)] 
test(SYSTEMD): remove subtests that do not increase test coverage

Testing without an option does not really increase test coverage, if
we anyways test both with "ro" and "rw".

It is not actually tested if volatile mode is actually enabled.
Let's remove these tests steps until there is an actual assertion
for these modes.

13 months agotest(test-root): include terminfo dracut module
Jo Zzsi [Sun, 24 Nov 2024 02:12:38 +0000 (21:12 -0500)] 
test(test-root): include terminfo dracut module

Include an existing dracut module instead of attempting
to reimplement it.

13 months agofix(systemd): systemd dlopens libbpf
Jo Zzsi [Sun, 24 Nov 2024 01:44:34 +0000 (20:44 -0500)] 
fix(systemd): systemd dlopens libbpf

13 months agotest(FULL-SYSTEMD): install more systemd services into the sysroot
Jo Zzsi [Sun, 24 Nov 2024 00:45:57 +0000 (19:45 -0500)] 
test(FULL-SYSTEMD): install more systemd services into the sysroot

Speculative fix to make the test more stable and not fail intermittently.

13 months agofix(test-root): dracut-getarg and dracut-lib are no longer used for test-root
Jo Zzsi [Sat, 23 Nov 2024 22:10:35 +0000 (17:10 -0500)] 
fix(test-root): dracut-getarg and dracut-lib are no longer used for test-root

13 months agofix(base): fallback when shell-interpreter is not included
Jo Zzsi [Fri, 22 Nov 2024 19:50:18 +0000 (14:50 -0500)] 
fix(base): fallback when shell-interpreter is not included

Follow-up to e139edb

When dracut is invoked with -m and shell-interpreter is not listed,
than shell interpreter is not included.

The base module is the only module that is absolutely mandatory
(and its dependencies).

shell-intrepreter dracut module is optional - the same way e.g.
dash module is optional.

13 months agotest: do not require a kernel for --clean
Benjamin Drung [Fri, 22 Nov 2024 23:44:39 +0000 (00:44 +0100)] 
test: do not require a kernel for --clean

The make `clean` target is called during Debian/Ubuntu package build in
an environment that does not have a kernel installed. It fails to set
`VMLINUZ`.

Move the code that sets `KVERSION` and `VMLINUZ` into helper functions
and only call them in case `--clean` is not called.

13 months agoci: release Dracut quarterly
Benjamin Drung [Fri, 22 Nov 2024 23:52:57 +0000 (00:52 +0100)] 
ci: release Dracut quarterly

Release Dracut quarterly to synchronize the Dracut release with the
Ubuntu release. Ubuntu XX.04 has its feature freeze mid to end of
February. Ubuntu XX.10 has its feature freeze mid to end of August. So
release Dracut on the beginning of February and August to have some time
left to get it landed in the distribution.

13 months agotest(NFS): reenable NFS3 testing
Jo Zzsi [Fri, 22 Nov 2024 16:42:45 +0000 (11:42 -0500)] 
test(NFS): reenable NFS3 testing

revert 4440acb

Removed one negative test as it does not add a lot of test coverage
and destabilizes the CI.

13 months agofix(35network-manager): install nft binary during module installation
Fernando Fernandez Mancera [Wed, 20 Nov 2024 23:40:27 +0000 (00:40 +0100)] 
fix(35network-manager): install nft binary during module installation

NetworkManager has a new bonding mode called balance-slb. This mode is
used in environments where NICs are connected to switches without LACP.
In order to work, NetworkManager configures a set of nftables rules.

The 'nft' binary is required to work.

Signed-off-by: Fernando Fernandez Mancera <ffmancera@riseup.net>
13 months agofix(iscsi): do not install services when not using systemd
Benjamin Drung [Fri, 22 Nov 2024 02:58:56 +0000 (03:58 +0100)] 
fix(iscsi): do not install services when not using systemd

The iscsid and iscsiuio services are installed by an `inst_multiple` two
times. Remove installing these service files when not using systemd.

Fixes: b31f3fe0d1be ("95iscsi: Replace iscsistart with iscsid")
13 months agofix(iscsi): remove duplicate inst_multiple calls for iscsiadm and iscsid
Benjamin Drung [Fri, 22 Nov 2024 02:56:26 +0000 (03:56 +0100)] 
fix(iscsi): remove duplicate inst_multiple calls for iscsiadm and iscsid

The iscsiadm and iscsid binaries are installed by an `inst_multiple` two
times when using the systemd module. Remove the already installed
binaries from the second call.

Fixes: b31f3fe0d1be ("95iscsi: Replace iscsistart with iscsid")
13 months agofix(base): remove fallback for shell selection
Jo Zzsi [Fri, 22 Nov 2024 16:28:21 +0000 (11:28 -0500)] 
fix(base): remove fallback for shell selection

This fallback is no longer needed after the introduction of
the shell-interpreter dracut module.

13 months agofeat(nvmf): enable other shells (dash) not just bash
Jo Zzsi [Fri, 22 Nov 2024 01:04:24 +0000 (20:04 -0500)] 
feat(nvmf): enable other shells (dash) not just bash

Fixes: 2f03d69f9df ("95nvmf: add module for NVMe-oF").
The module scripts for nvmf have no bashisms.

13 months agofix(iscsi): include /usr/lib/open-iscsi/startup-checks.sh if needed
Benjamin Drung [Wed, 20 Nov 2024 16:59:51 +0000 (17:59 +0100)] 
fix(iscsi): include /usr/lib/open-iscsi/startup-checks.sh if needed

On Debian/Ubuntu iscsid.service (from open-iscsi 2.1.10-1) fails to
start in the initrd, because its `ExecStartPre` script is not included
in the initrd:

```
$ grep ExecStartPre /usr/lib/systemd/system/iscsid.service
ExecStartPre=/usr/lib/open-iscsi/startup-checks.sh
```

The upstream open-iscsi project ships an `iscsid.service` [1] that does not
have an `ExecStartPre` entry, but Debian/Ubuntu uses their own service
file [2].

The TEST-70-ISCSI test will succeed on Ubuntu 25.04 (plucky) with
open-iscsi 2.1.10-1ubuntu2 (see https://launchpad.net/bugs/2072484).

[1] https://github.com/open-iscsi/open-iscsi/blob/master/etc/systemd/iscsid.service.template
[2] https://salsa.debian.org/linux-blocks-team/open-iscsi/-/blob/master/debian/iscsid.service
Fixes: https://launchpad.net/bugs/2081172
13 months agofix(shell-interpreter): move later in the module ordering
Jo Zzsi [Wed, 20 Nov 2024 01:15:03 +0000 (20:15 -0500)] 
fix(shell-interpreter): move later in the module ordering

This PR ensures that shell dependencies (e.g. on bash) is
computed before shell-interpreter gets executed.

Do not explicitly depend on shell-interpreter as this would trigger
calling the shell-interpreter depend() function too
early in the model evaluation process.

The impact of this PR can be observed in the BASIC test when
running on void CI containers. Before this PR both 'dash' and
'bash' dracut modules gets included in the initrd.

After the PR only the 'bash' module gets included in the initrd.

Fixes: #860
13 months agoci: address new yamllint warnings and errors
Benjamin Drung [Thu, 21 Nov 2024 14:26:37 +0000 (15:26 +0100)] 
ci: address new yamllint warnings and errors

Address all warnings and errors from yamllint except some of the
line-length warnings:

```
yamllint -d "{extends: default, rules: {line-length: {max: 203}}}"  .
```

Fixes: be7e87fbb7d7 ("feat(systemd-emergency): install rescue and emergency targets")
Fixes: fa194671663d ("ci: reenable test 70 (only on openSUSE)")
13 months agotest(NFS): migrate more tests from NFSv3 to NFSv4
Jo Zzsi [Thu, 21 Nov 2024 12:44:35 +0000 (07:44 -0500)] 
test(NFS): migrate more tests from NFSv3 to NFSv4

13 months agofeat(systemd-emergency): install rescue and emergency targets
Jo Zzsi [Tue, 19 Nov 2024 13:35:30 +0000 (08:35 -0500)] 
feat(systemd-emergency): install rescue and emergency targets

Systemd upstream natively provides emergency and rescue services.
Give an option to install them instead of dracut provided versions.

Both mkinitcpio and mkosi installs these into the initrd.

13 months agofix(plymouth): change severity of shutdown log messages
David Härdeman [Thu, 21 Nov 2024 08:36:48 +0000 (09:36 +0100)] 
fix(plymouth): change severity of shutdown log messages

Right now, if someone is using plymouth and the "quiet" boot parameter,
odds are that they do so in the hope of a more polished boot experience.

The shutdown module prints a couple of warnings and then shuts down
plymouth, meaning that these warnings will flash briefly on screen
before the actual reboot/shutdown.

None of the warnings qualify as warnings though:

1. Printing "Unmounted /oldroot" just means that unmounting /oldroot
   (an internal implementational detail) succeeded.
2. Printing "Killing all remaining processes" hardly qualifies as a
   warning since it's a quite expected result of a reboot.

So downgrade them to "info" (which will respect the "quiet" boot
parameter), leading to a nice, quiet reboot.

13 months agoci: remove dracut modules from the ci containers that are being tested
Jo Zzsi [Wed, 20 Nov 2024 12:23:02 +0000 (07:23 -0500)] 
ci: remove dracut modules from the ci containers that are being tested

As an example, when a module ordering gets changed, without this PR
the module would be available twice under modules.d - once with the
old order number that gets installed with the package manager and
once with the new order number that gets overlaid.

13 months agofix(docs): correct spelling mistake of recommended
Benjamin Drung [Tue, 19 Nov 2024 23:31:19 +0000 (00:31 +0100)] 
fix(docs): correct spelling mistake of recommended

Fixes: eb1ae6c4f836 ("docs: warn against the usage of -m, -o, -d")
Fixes: f6983159fa0b ("docs: warn against the usage of omit, drivers, dracutmodules")
13 months agochore: wrap long lines
Benjamin Drung [Tue, 19 Nov 2024 22:36:32 +0000 (23:36 +0100)] 
chore: wrap long lines

13 months agotest: print skip logs in V=1 or V=2 mode
Benjamin Drung [Tue, 19 Nov 2024 22:12:39 +0000 (23:12 +0100)] 
test: print skip logs in V=1 or V=2 mode

In case a test is skipped, print the log in V=1 or V=2 mode to give a
hint why the test was skipped.

13 months agoci: reenable test 70 (only on openSUSE)
Jo Zzsi [Tue, 19 Nov 2024 19:50:08 +0000 (14:50 -0500)] 
ci: reenable test 70 (only on openSUSE)

My gut feeling is that this test is most stable on
openSUSE with network-legacy.

13 months agotest: move wildcard support from test-github.sh to test.sh
Jo Zzsi [Tue, 19 Nov 2024 19:32:04 +0000 (14:32 -0500)] 
test: move wildcard support from test-github.sh to test.sh

Follow-up to aa967c9 . Since this feature is only used in test.sh
let's not slow down CI runs with it.

13 months agoci(gentoo): depclean is only effective if it is one command
Jo Zzsi [Tue, 19 Nov 2024 15:50:39 +0000 (10:50 -0500)] 
ci(gentoo): depclean is only effective if it is one command