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

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

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

7 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

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

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

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

7 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

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

8 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

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

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

8 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

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

8 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

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

8 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

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

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

8 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

8 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

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

8 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

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

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

8 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

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

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

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

8 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

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

8 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

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

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

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

8 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

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

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

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

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

8 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

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

8 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

8 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>
8 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

8 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

8 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

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

8 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
9 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):

9 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
9 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")

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

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

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

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

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

9 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

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

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

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

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

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

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

9 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
9 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
9 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)")
9 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

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

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

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

9 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")
9 months agochore: wrap long lines
Benjamin Drung [Tue, 19 Nov 2024 22:36:32 +0000 (23:36 +0100)] 
chore: wrap long lines

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

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

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

9 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

9 months agotest: print all server startup logs in V=1 or V=2 mode
Benjamin Drung [Tue, 19 Nov 2024 16:50:00 +0000 (17:50 +0100)] 
test: print all server startup logs in V=1 or V=2 mode

In V=0 mode only print "Waiting for the server to startup" once and do
not print anything from the server startup logs.

In V=1 and V=2 print all lines from the server startup while waiting
for the server to be ready to ease debugging (e.g. when the kernel
crashes the last 10 lines will not be enough).

9 months agotest: use QEMU OUI for server MAC addresses
Benjamin Drung [Tue, 19 Nov 2024 13:10:55 +0000 (14:10 +0100)] 
test: use QEMU OUI for server MAC addresses

QEMU uses the OUI 52:54:00, but the server test cases use the OUI
52:54:01.

Change the server MAC addresses into the 52:54:00:42:00:xx range to have
them in the QEMU OUI range and also easy identifiable.

9 months agotest: enable TEST 61 on fedora
Jo Zzsi [Tue, 19 Nov 2024 13:46:08 +0000 (08:46 -0500)] 
test: enable TEST 61 on fedora

This change will enable us to drive at least with one eye open :-)

9 months agoci: reenable ubuntu:rolling
Jo Zzsi [Tue, 19 Nov 2024 13:50:05 +0000 (08:50 -0500)] 
ci: reenable ubuntu:rolling

9 months agoci: switch from ubuntu:rolling to ubuntu:devel
Jo Zzsi [Tue, 19 Nov 2024 03:09:18 +0000 (22:09 -0500)] 
ci: switch from ubuntu:rolling to ubuntu:devel

The goal is to test with latest Ubuntu before a dracut release.

9 months agofix(dracut-lib): initialize getcmdline/getarg local variables
Benjamin Drung [Tue, 19 Nov 2024 11:36:10 +0000 (12:36 +0100)] 
fix(dracut-lib): initialize getcmdline/getarg local variables

Re-generate initrd without the systemd module with dracut 102-3.fc41:

```
dracut --omit systemd --regenerate-all --force -v
```

The resulting initrd fails to boot, and prints some errors:

```
dracut Warning: Signal caught
/lib/dracut-lib.sh: line 147: CMDLINE_PROC: unbound variable
/lib/dracut-lib.sh: line 198: _newoption: unbound variable
```

This failure can be explained when calling `getcmdline` or `getarg` with
`set -u`. Initialize the local variables.

Fixes: #997
9 months agodocs: update formatting of dracut.conf man page
Ian Wienand [Tue, 19 Nov 2024 04:24:55 +0000 (15:24 +1100)] 
docs: update formatting of dracut.conf man page

This updates a few things in the dracut.conf man page.

Firstly I've dedented the definition lists.  This isn't just for fun, the
indent works but becomes unwiedly when trying to use paragraphs or do things
like correctly associate admonitions, because the obvious thing of

title:
  blah
  +
  WARNING: warning

doesn't work for whatever magic parsing reasons; you have to dedent the "+".

Doing it consitently just looks neater.

I've been through and correctly added the existing admonitions so they're
associated with the definition they relate to.  I've also put things into
paragraphs where they were getting too long, which I think improves clarity.

I've made a few other minor changes to formatting, mostly adding `` around
literal things, updating the debug table, some minor wording clarity things and
using =,== for titles as I think that much better visually represents the
level.

Certainly more could be done but it's a start.

9 months agoci(gentoo): force hostonly mode as this is the config recommended by Gentoo wiki
Jo Zzsi [Tue, 19 Nov 2024 00:41:31 +0000 (19:41 -0500)] 
ci(gentoo): force hostonly mode as this is the config recommended by Gentoo wiki

See https://wiki.gentoo.org/wiki/Dracut.

9 months agodocs: warn against the usage of omit, drivers, dracutmodules
Jo Zzsi [Tue, 19 Nov 2024 01:32:45 +0000 (20:32 -0500)] 
docs: warn against the usage of omit, drivers, dracutmodules

These are common footguns. We should do a better job
warning the users against these usually untested configurations.

Follow-up to eb1ae6c .

9 months agotest: do not redirect /dev/null to stdin
Benjamin Drung [Tue, 19 Nov 2024 02:32:43 +0000 (03:32 +0100)] 
test: do not redirect /dev/null to stdin

The test cases have comments saying "Uncomment this to debug failures",
but uncommenting `DEBUGFAIL` is not enough. The initrd will not take any
keyboard presses, because /dev/null is redirected to stdin.

To ease debugging, do not redirect /dev/null to stdin.

9 months agotest: allow MAKEFLAGS override during debugging
Jo Zzsi [Tue, 19 Nov 2024 01:52:06 +0000 (20:52 -0500)] 
test: allow MAKEFLAGS override during debugging

This is a convenience feature and should have no impact on the running CI.

9 months agotest(MULTINIC): fix virtio regression
Jo Zzsi [Sun, 17 Nov 2024 17:30:46 +0000 (12:30 -0500)] 
test(MULTINIC): fix virtio regression

Resolve regression from 0fca6f4 .

9 months agofeat: default config profile
Jo Zzsi [Fri, 15 Nov 2024 16:47:23 +0000 (11:47 -0500)] 
feat: default config profile

During packaging - at configure stage - allow setting
the defauflt dracut configuration from the predefined
list of of "profiles".

As an example Ubuntu packaging can call
./confgure --configprofile "generic".

9 months agotest(MULTINIC): avoid /usr/bin/env in server initrd
Benjamin Drung [Mon, 18 Nov 2024 12:39:38 +0000 (13:39 +0100)] 
test(MULTINIC): avoid /usr/bin/env in server initrd

The MULTINIC test fails to start the server on Ubuntu:

```
/usr/bin/env: 'bash': No such file or directory
[    8.026059] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
```

This is caused by missing `/usr/bin/env` in the server initrd. So just
rely on bash being present in the initrd.

Fixes: 4f0a784186e5 ("chore(tests): search for bash in $PATH to improve portability")
9 months agotest: fail test if server has terminated
Benjamin Drung [Mon, 18 Nov 2024 20:50:03 +0000 (21:50 +0100)] 
test: fail test if server has terminated

The server might shutdown on error. When waiting for the server to
startup, check if the server QEMU process has vanished and abort the
test in that case.

9 months agotest: introduce wait_for_server_startup
Benjamin Drung [Mon, 18 Nov 2024 20:39:28 +0000 (21:39 +0100)] 
test: introduce wait_for_server_startup

The code for the server startup is duplicated in multiple test cases. So
introduce a helper function to reduce code duplication.

9 months agoci: remove unnecessary workarounds
Jo Zzsi [Sun, 17 Nov 2024 17:24:02 +0000 (12:24 -0500)] 
ci: remove unnecessary workarounds