]> git.ipfire.org Git - thirdparty/dracut-ng.git/log
thirdparty/dracut-ng.git
6 months agotest: use "set -e" in all tests
Benjamin Drung [Wed, 12 Feb 2025 10:34:24 +0000 (11:34 +0100)] 
test: use "set -e" in all tests

To make all tests more robust, use `set -e` in all tests. Then the
`|| return 1` constructs can be removed.

6 months agofix(dracut-lib): support "set -e" in setdebug
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")
6 months agotest(GETARG): fix shellcheck SC2181
Benjamin Drung [Wed, 12 Feb 2025 10:05:00 +0000 (11:05 +0100)] 
test(GETARG): fix shellcheck SC2181

Fix shellcheck SC2181 in the getarg test case. This also makes the code
work with `set -e`.

6 months agotest(test-functions): support reading empty /etc/machine-id
Benjamin Drung [Wed, 12 Feb 2025 01:23:24 +0000 (02:23 +0100)] 
test(test-functions): support reading empty /etc/machine-id

When `/etc/machine-id` is empty, `read -r TOKEN < /etc/machine-id` will
exit with code 1. This case is supported. So just ignore the exit code.

6 months agotest: ignore exit code of increment in qemu_add_drive
Benjamin Drung [Wed, 12 Feb 2025 01:05:05 +0000 (02:05 +0100)] 
test: ignore exit code of increment in qemu_add_drive

Ignore error status code when incrementing from 0 to 1. See also
https://www.shellcheck.net/wiki/SC2219

Fixes: 1af00bf238c8 ("chore: resolve shellcheck for SC2219")
6 months agofix(dracut): avoid mktemp collisions with find filter
Brian Fjeldstad [Tue, 4 Feb 2025 22:09:04 +0000 (22:09 +0000)] 
fix(dracut): avoid mktemp collisions with find filter

6 months agofix(release): tagging and release generation is no longer automated
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.

6 months agotest(FULL-SYSTEMD): skip systemd-network-management if missing
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")
6 months agotest: log error when constructing sysroot
Benjamin Drung [Fri, 7 Feb 2025 17:51:25 +0000 (18:51 +0100)] 
test: log error when constructing sysroot

Log dracut errors for all dracut invocations. Otherwise tests can fail
without any log output.

Fixes: 8631284afbfa ("ci: do not log how sysroot is constructed")
6 months agotest: ignore shellcheck for disk_index
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.

6 months agotest(FULL-SYSTEMD): skip encrypted root if qemu -smbios is not supported
Benjamin Drung [Mon, 10 Feb 2025 20:33:34 +0000 (21:33 +0100)] 
test(FULL-SYSTEMD): skip encrypted root if qemu -smbios is not supported

The qemu option `-smbios` is not supported on most architectures.
Therefore `TEIT-41-FULL-SYSTEMD` will fail.

Fixes #1213

6 months agotest(FULL-SYSTEMD): make smbios option a parameter of run_client
Benjamin Drung [Mon, 10 Feb 2025 20:31:59 +0000 (21:31 +0100)] 
test(FULL-SYSTEMD): make smbios option a parameter of run_client

6 months agotest: use persistent names for network devices
Benjamin Drung [Tue, 11 Feb 2025 17:05:36 +0000 (18:05 +0100)] 
test: use persistent names for network devices

TEST-70-ISCSI fails on Ubuntu s390x because the network device is named
`enc0` instead of `enp0s1`:

```
CLIENT TEST START: NBD root=nbd:IP:port
[...]
[   36.084991] virtio_net virtio2 enc0: renamed from eth0
```

So use persistent names for network devices by mapping the MAC address
to a name.

6 months agotest: typo in the GitHub Action name
Jo Zzsi [Wed, 12 Feb 2025 01:46:03 +0000 (20:46 -0500)] 
test: typo in the GitHub Action name

These are arm64 runs not amd64 runs.

6 months agofix(systemd-sysusers): always silence stdout
Jo Zzsi [Sat, 8 Feb 2025 01:24:39 +0000 (20:24 -0500)] 
fix(systemd-sysusers): always silence stdout

systemd-sysusers does not have quiet option, so
always silence stdout (but not stderr).

Fixes: https://github.com/dracut-ng/dracut-ng/issues/1195
6 months agotest(ISCSI): skip root=ibft if qemu -acpitable is not supported
Benjamin Drung [Mon, 10 Feb 2025 09:52:40 +0000 (10:52 +0100)] 
test(ISCSI): skip root=ibft if qemu -acpitable is not supported

Several architectures do not support the qemu option `-acpitable`. Skip
the `root=ibft` in this case.

6 months agotest: use "set -eu" in run-qemu
Benjamin Drung [Mon, 10 Feb 2025 09:48:51 +0000 (10:48 +0100)] 
test: use "set -eu" in run-qemu

6 months agotest(ISCSI): make acpitable file a parameter of run_client
Benjamin Drung [Mon, 10 Feb 2025 09:43:29 +0000 (10:43 +0100)] 
test(ISCSI): make acpitable file a parameter of run_client

The ACPI table only needs to be set for one of the iSCSI test cases.

7 months agodocs: update NEWS.md and AUTHORS for release 106 1197/head 106
dracutng[bot] [Sat, 1 Feb 2025 01:20:41 +0000 (01:20 +0000)] 
docs: update NEWS.md and AUTHORS for release 106

7 months agoci: switch integration tests from ubuntu:latest to ubuntu:rolling
Jo Zzsi [Mon, 27 Jan 2025 00:32:02 +0000 (19:32 -0500)] 
ci: switch integration tests from ubuntu:latest to ubuntu:rolling

ubuntu:latest points to Ubuntu 24.04.

ubuntu:rolling currently points ot 24.10 and soon will point to
25.04.

This change has no impact on the "Daily Integration tests", which
anyways expect to test and pass both with ubuntu:latest and
ubuntu:rolling.

For Fedora fedora:latest points to the bi-yearly releases,
and the corresponding label for Ubuntu is ubuntu:rolling.

7 months agofeat(systemd-battery-check): always include the module if possible
Pavel Valena [Wed, 29 Jan 2025 22:26:22 +0000 (23:26 +0100)] 
feat(systemd-battery-check): always include the module if possible

7 months agoci: add arm64 extra containers
Jo Zzsi [Thu, 30 Jan 2025 14:28:56 +0000 (09:28 -0500)] 
ci: add arm64 extra containers

Among other containers, this should enable arm64 for Gentoo.

7 months agotest(UEFI): add subtest for using ukify with kernel-install
Jo Zzsi [Wed, 29 Jan 2025 03:53:29 +0000 (22:53 -0500)] 
test(UEFI): add subtest for using ukify with kernel-install

New test case for end-to-end integration and keep
existing subtests as fallback.

7 months agoci(debian): make sure that systemd-ukify is installed when available
Jo Zzsi [Wed, 29 Jan 2025 04:32:59 +0000 (23:32 -0500)] 
ci(debian): make sure that systemd-ukify is installed when available

Fix typo in the containerfile.

7 months agoci: remove workaround from test cases
Jo Zzsi [Wed, 29 Jan 2025 00:38:02 +0000 (19:38 -0500)] 
ci: remove workaround from test cases

Now that workarounds are executed during test container
generation from containerfile, workarounds are no longer
needed in test cases.

7 months agoci: move distro specific workarounds to the containerfiles
Jo Zzsi [Tue, 28 Jan 2025 23:04:44 +0000 (18:04 -0500)] 
ci: move distro specific workarounds to the containerfiles

Follow-up to cfe8b21.

Debian and Uunbtu container worked well, but ubuntu:rolling and
ubuntu:devel did not.

I tested this PR on ubuntu:rolling.

7 months agoci: move distro specific workarounds to the containerfiles
Jo Zzsi [Tue, 28 Jan 2025 21:55:21 +0000 (16:55 -0500)] 
ci: move distro specific workarounds to the containerfiles

This change helps to keep the test itself more readable.

7 months agoci: reenable some tests for arm64
Jo Zzsi [Tue, 28 Jan 2025 21:57:39 +0000 (16:57 -0500)] 
ci: reenable some tests for arm64

These tests were accidentally disabled by 987be72 .

7 months agoci: pass the test on Fedora and openSUSE on arm64
Jo Zzsi [Tue, 28 Jan 2025 15:26:45 +0000 (10:26 -0500)] 
ci: pass the test on Fedora and openSUSE on arm64

increase timeout for finding sysroot
add workaround for finding kernel on openSUSE on arm64

These changes are required to pass the test on Fedora
and openSUSE on arm64.

7 months agotest(KERNEL-INSTALL): add support for Debian/Ubuntu
Jo Zzsi [Tue, 28 Jan 2025 13:21:26 +0000 (08:21 -0500)] 
test(KERNEL-INSTALL): add support for Debian/Ubuntu

Add workarouund for Debian/Ubuntu based distros, so that
kernel-install can find the kernel image.

7 months agoci(openSUSE): switch to packaged version of mkosi-initrd
Jo Zzsi [Tue, 28 Jan 2025 14:02:41 +0000 (09:02 -0500)] 
ci(openSUSE): switch to packaged version of mkosi-initrd

mkosi v25 packaged now, so lets switch to the packaged version.

7 months agoci: consolidate output filename for test runs
Jo Zzsi [Tue, 28 Jan 2025 12:11:00 +0000 (07:11 -0500)] 
ci: consolidate output filename for test runs

Move initramfs.testing output file name from individual
testins into test-functions.

7 months agoci: add root=LABEL=dracut to the common kernel cmdline for tests
Jo Zzsi [Mon, 27 Jan 2025 01:21:20 +0000 (20:21 -0500)] 
ci: add root=LABEL=dracut to the common kernel cmdline for tests

Individual tests can (and do) overide the default root.

7 months agotest(KERNEL-INSTALL): include generating and testing rescue boot
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.

7 months agotest(KERNEL-INSTALL): enable for all CI container
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.

7 months agotest(KERNEL-INSTALL): enable test for Arch, Gentoo, openSUSE as well
Jo Zzsi [Sun, 26 Jan 2025 00:36:34 +0000 (19:36 -0500)] 
test(KERNEL-INSTALL): enable test for Arch, Gentoo, openSUSE as well

Fix initrd location when /etc/machine-id does not exists.

The test does not yet work on Debian/Ubuntu.

7 months agoci: move more logic to test dracut config
Jo Zzsi [Sun, 26 Jan 2025 00:11:28 +0000 (19:11 -0500)] 
ci: move more logic to test dracut config

test dracut config is available for all test runs, including
kernel-install runs.

7 months agotest(KERNEL-INSTALL): enable dracut test config
Jo Zzsi [Sat, 25 Jan 2025 22:57:21 +0000 (17:57 -0500)] 
test(KERNEL-INSTALL): enable dracut test config

Enable the dracut test config not just the test dracut module.

7 months agotest(BASIC): remove workaround for systemd on arm64
Jo Zzsi [Sat, 25 Jan 2025 22:48:07 +0000 (17:48 -0500)] 
test(BASIC): remove workaround for systemd on arm64

Removed omitting systemd modules from the BASIC test.
Increase the rd.timeout=60 to give enough time for systemd on arm64.

Disable networking for this test (inside the qemu VM)
to increase test covergae and make this test even more basic.

7 months agoci: switch to ubuntu-24.04
Jo Zzsi [Sat, 25 Jan 2025 21:09:14 +0000 (16:09 -0500)] 
ci: switch to ubuntu-24.04

There is no ubuntu-latest for arm and the current ubuntu-latest
gives a warning...

7 months agotest(KERNEL-INSTALL): add test for kernel-install
Jo Zzsi [Sat, 25 Jan 2025 15:40:05 +0000 (10:40 -0500)] 
test(KERNEL-INSTALL): add test for kernel-install

The test requires kernel-install binary and only runs in a container.

7 months agoci: separate out amd64 tests into its own GA file
Jo Zzsi [Sat, 25 Jan 2025 13:47:32 +0000 (08:47 -0500)] 
ci: separate out amd64 tests into its own GA file

Having a separate file give more control to trigger independently.

7 months agoci: only set console for amd64
Jo Zzsi [Fri, 24 Jan 2025 17:59:56 +0000 (12:59 -0500)] 
ci: only set console for amd64

Follow-up to 25795c7.

This restore green CI for arm.

7 months agofeat(dracut.install): force hostonly for kernel-install plugin
Jo Zzsi [Thu, 23 Jan 2025 23:29:42 +0000 (18:29 -0500)] 
feat(dracut.install): force hostonly for kernel-install plugin

Distributions that have adapted and integrated dracut and
adopted the dracut kernel install plugin should default to
hostonly mode initrd.

7 months agoci: rename test-github to test-container
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.

7 months agoci(fedora): use Debian, Arch, Gentoo to test systemd-networkd
Jo Zzsi [Fri, 24 Jan 2025 13:39:50 +0000 (08:39 -0500)] 
ci(fedora): use Debian, Arch, Gentoo to test systemd-networkd

This is in an effort to simplify the CI and minimize
the difference between CentOS and Fedora testing.

While Fedora supports systemd-networkd, CentOS does not and
Debian, Arch and Gentoo already provides enought test coverage
for the Dracut CI.

7 months agoci: demote dmraid testing
Jo Zzsi [Fri, 24 Jan 2025 12:51:14 +0000 (07:51 -0500)] 
ci: demote dmraid testing

dmraid is no longer activly maitaned and has been already removed
form the following distributions
 - CentOS
 - Debian
 - Ubuntu

Dracut will continue to support dmraid, but lets minimize the CI
burdon and only test dmraid on Arch container going forward.

One of the other motivation of this change is to align Fedora
configuration a bit more with CentOS configuration for ease of
maitenance.

7 months agoci: restore regression for console messages
Jo Zzsi [Fri, 24 Jan 2025 00:37:53 +0000 (19:37 -0500)] 
ci: restore regression for console messages

BASIC, UEFI, DMSQUASH tests did not had some of the
kernel command line options properly set

7 months agoci: simplify manually adding dracut modules
Jo Zzsi [Thu, 23 Jan 2025 22:31:52 +0000 (17:31 -0500)] 
ci: simplify manually adding dracut modules

Remove manually adding dracut modules where possible to
let dracut determine which modules are required.

7 months agotest(DMSQUASH): enable all subtests on arm64
Jo Zzsi [Thu, 23 Jan 2025 03:01:05 +0000 (22:01 -0500)] 
test(DMSQUASH): enable all subtests on arm64

All tests are now passing on arm64.

7 months agotest(UEFI): include all kernel command line into the UKI
Jo Zzsi [Wed, 22 Jan 2025 17:25:55 +0000 (12:25 -0500)] 
test(UEFI): include all kernel command line into the UKI

We shoudl have a test with all kernel command line
included in the UKI.

7 months agotest(DMSQUASH): add test step for iso-scan
Jo Zzsi [Wed, 22 Jan 2025 15:41:49 +0000 (10:41 -0500)] 
test(DMSQUASH): add test step for iso-scan

Test iso-scan dracut module argument when xorriso is available
to create an iso.

7 months agoci: install xorriso into CI containers
Jo Zzsi [Wed, 22 Jan 2025 14:41:36 +0000 (09:41 -0500)] 
ci: install xorriso into CI containers

Preparation to test iso-scan dracut feature which requires
an iso file that xorriso would generate.

7 months agotest(DMSQUASH): reorganize test steps into test runs
Jo Zzsi [Mon, 20 Jan 2025 22:03:03 +0000 (17:03 -0500)] 
test(DMSQUASH): reorganize test steps into test runs

Make DMSQUASH test same structure as some other tests to make it easier
to debug and reason about.

7 months agotest(DMSQUASH): fix path and improve directory naming
Jo Zzsi [Mon, 20 Jan 2025 21:16:23 +0000 (16:16 -0500)] 
test(DMSQUASH): fix path and improve directory naming

Follow-up fix to ff370f5 to test the condition if
/proc does not exists.

7 months agotest(DMSQUASH): create rootfs without qemu and enable test for arm
Jo Zzsi [Mon, 20 Jan 2025 17:23:48 +0000 (12:23 -0500)] 
test(DMSQUASH): create rootfs without qemu and enable test for arm

This enables passing this test on arm as well.

Only the first subtest is passing on arm, so run only the first
test on arm, but run all the remaining tests on amd.

7 months agotest(DMSQUASH): qemu module is not needed
Jo Zzsi [Mon, 20 Jan 2025 04:34:37 +0000 (23:34 -0500)] 
test(DMSQUASH): qemu module is not needed

Only include the main dracut module and make sure that dependencies
are properly managed.

7 months agotest(DMSQUASH): combine test steps without loosing test coverage
Jo Zzsi [Mon, 20 Jan 2025 03:51:50 +0000 (22:51 -0500)] 
test(DMSQUASH): combine test steps without loosing test coverage

Build initrd only once.

7 months agoci: move arm64 tests to the Daily Interation Tests
Jo Zzsi [Mon, 20 Jan 2025 02:40:04 +0000 (21:40 -0500)] 
ci: move arm64 tests to the Daily Interation Tests

Move arm64 tests to the Daily Interation Tests.

Enable all arm64 tests that are passing.

7 months agoci: remove leftover '-j' argument from mkfs.ext4
Jo Zzsi [Mon, 20 Jan 2025 02:27:21 +0000 (21:27 -0500)] 
ci: remove leftover '-j' argument from mkfs.ext4

As the projects transitioned over to ext4, passing `-j` is no
longer desired.

7 months agotest(DMSQUASH): add bash module instead of installing several shells
Jo Zzsi [Mon, 20 Jan 2025 02:11:52 +0000 (21:11 -0500)] 
test(DMSQUASH): add bash module instead of installing several shells

This change tells dracut that shell is already included.

7 months agotest(BASIC): silence steps
Jo Zzsi [Mon, 20 Jan 2025 01:43:15 +0000 (20:43 -0500)] 
test(BASIC): silence steps

Make the test more consistent with teh rest of the tests and
silence some additional test steps.

7 months agoci: adapt the test.sh script to the new container labeling
Jo Zzsi [Mon, 20 Jan 2025 01:28:06 +0000 (20:28 -0500)] 
ci: adapt the test.sh script to the new container labeling

Add architecture tag, see commit d8ff139 .

Document that the script now supports arm64.

7 months agoci: remove busybox from Fedora and Arch
Jo Zzsi [Mon, 20 Jan 2025 01:36:33 +0000 (20:36 -0500)] 
ci: remove busybox from Fedora and Arch

busybox compatibility is tested with the Alpine container.

Update documentation on the busybox version used on the CI.

7 months agoci: document which CI containers support arm64
Jo Zzsi [Mon, 20 Jan 2025 00:50:38 +0000 (19:50 -0500)] 
ci: document which CI containers support arm64

Document which CI containers support arm64.

7 months agoci: enable BASIC arm test for Void CI container
Jo Zzsi [Mon, 20 Jan 2025 00:06:03 +0000 (19:06 -0500)] 
ci: enable BASIC arm test for Void CI container

Enable BASIC arm test for Void CI container.

7 months agoci: teach the CI where to find the openSUSE arm64 kernel
Jo Zzsi [Sun, 19 Jan 2025 23:35:39 +0000 (18:35 -0500)] 
ci: teach the CI where to find the openSUSE arm64 kernel

On openSUSE kernel seems to be called /boot/Image-6.12.9-1-vanilla.

Also enable building thr Void arm container.

7 months agoci: enable BASIC test on arm64
Jo Zzsi [Sun, 19 Jan 2025 22:47:55 +0000 (17:47 -0500)] 
ci: enable BASIC test on arm64

Switch the test on arm from test GETARG to test BASIC,
which actually validates in the generated initrd works.

The test only pass without systemd in the initrd, so omit initrd for now.

7 months agotest(BASIC): further simplify BASIC test
Jo Zzsi [Sun, 19 Jan 2025 21:54:26 +0000 (16:54 -0500)] 
test(BASIC): further simplify BASIC test

BASIC test should be as basic as possible.

Only test ext4 and. Eliminate invoking qemu to create rootfs.

7 months agoci: install more qemu packages
Jo Zzsi [Sat, 18 Jan 2025 02:18:41 +0000 (21:18 -0500)] 
ci: install more qemu packages

Install more qemu packages in the hope of enabling more
tests for arm64.

7 months agofix(iscsi): attempt iSCSI login before all interfaces are up
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.

Signed-off-by: Martin Wilck <mwilck@suse.com>
7 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>
7 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.

7 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

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

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

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

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

7 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

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

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

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

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

7 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

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

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

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

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

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.