Benjamin Drung [Wed, 12 Feb 2025 10:10:30 +0000 (11:10 +0100)]
fix(dracut-lib): support "set -e" in setdebug
A `return` statement will return with the exit code of the previous
command if no exit code is specified. In case `/usr/lib/initrd-release`
does not exist, `setdebug` will return with the exit code 1.
Return this function with code 0 in that case to support `set -e` users.
Fixes: 2b125c69cc80 ("base/dracut-lib.sh: do not setdebug, if not in initramfs")
Laszlo Gombos [Sat, 8 Feb 2025 01:48:42 +0000 (20:48 -0500)]
fix(release): tagging and release generation is no longer automated
Create release commit on relese branch automatically, but leave the
rest of the release creation process up to the project admins to
allow manual review and intervention.
We do not have a valid email address for the release automation,
so let's make it obvious that it is just a placeholder email address.
Benjamin Drung [Fri, 7 Feb 2025 18:35:35 +0000 (19:35 +0100)]
test(FULL-SYSTEMD): skip systemd-network-management if missing
The Debian/Ubuntu package runs the FULL-SYSTEMD test without
dracut-network installed. Therefore the test fails due to the missing
`systemd-network-management` module:
```
TEST: Full systemd serialization/deserialization test with /usr mount
dracut[E]: Module 'systemd-network-management' cannot be found.
```
Fixes: 75f3a191b675 ("test(FULL-SYSTEMD): when systemd-networkd is available, install it")
Benjamin Drung [Tue, 11 Feb 2025 11:57:34 +0000 (12:57 +0100)]
test: ignore shellcheck for disk_index
shellcheck complains about `disk_index` for appearing to be unused, but
this variable is used in `qemu_add_drive`. So ignore those shellcheck
complaints.
Jo Zzsi [Mon, 27 Jan 2025 00:24:05 +0000 (19:24 -0500)]
test(KERNEL-INSTALL): include generating and testing rescue boot
Make sure kernel-install generates the regular hostonly initrd and
the rescue (non-hostonly) initrd as well.
It is not necessary recommended for distributions to follow this
test case, in fact rescue (non-hostonly) initrd is not enabled by
default, but this is a very convinient way on the CI to test
both configuration and avoid regressions going forward.
Jo Zzsi [Sun, 26 Jan 2025 01:53:55 +0000 (20:53 -0500)]
test(KERNEL-INSTALL): enable for all CI container
Add preconditions, which would skip this test on
Debian/Ubuntu for now.
Move enviroment variables - such as BOOT_ROOT - out
from the test specific code to the common test infrastrucutre
so that it is available for all test cases.
Jo Zzsi [Fri, 24 Jan 2025 14:08:15 +0000 (09:08 -0500)]
ci: rename test-github to test-container
test-container better reflects that this scripts is meant to
install and run dracut in container and not restricted to be used
as part of GitHub Actions.
Also add a safety check to make sure that the script gets executed
inside a container and not on a host.
Martin Wilck [Fri, 16 Aug 2024 21:03:22 +0000 (23:03 +0200)]
fix(iscsi): attempt iSCSI login before all interfaces are up
When booting from iSCSI, we don't need to wait for retries until all network
interfaces are up. We can just attempt to activate iSCSI on those interfaces
that are currently up (in the offload case like bnx2i, we can even try without
any network interfaces). If the root fs is found, we can go on booting;
otherwise, the iscsiroot script will be called again later anyway.
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.
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.
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.
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>
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.
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
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.