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

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

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

13 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 :-)

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

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

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

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

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

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

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

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

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

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

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

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

13 months agoci: do not log how sysroot is constructed
Jo Zzsi [Sun, 17 Nov 2024 14:49:47 +0000 (09:49 -0500)] 
ci: do not log how sysroot is constructed

It is confusing to see dracut invoked 3 times for each use-case for
the uninitiated. Only log for the dracut invocation that is under test.

13 months agoci(alpine): add util-linux-login for sulogin
Jo Zzsi [Sun, 17 Nov 2024 14:32:02 +0000 (09:32 -0500)] 
ci(alpine): add util-linux-login for sulogin

This is required to test emergency shell.

13 months agotest(STORAGE): add subtests for rd.auto=0
Jo Zzsi [Sun, 17 Nov 2024 12:49:56 +0000 (07:49 -0500)] 
test(STORAGE): add subtests for rd.auto=0

Now TEST 22 is a subtest of this test and can be removed.

13 months agotest(STORAGE): add subtests for degraded RAID
Jo Zzsi [Sat, 16 Nov 2024 20:20:04 +0000 (15:20 -0500)] 
test(STORAGE): add subtests for degraded RAID

Switch to RAID-1 from RAID-0 to be able to degrade the RAID.

13 months agotest(STORAGE): add test for LVM-THIN
Jo Zzsi [Sat, 16 Nov 2024 15:01:01 +0000 (10:01 -0500)] 
test(STORAGE): add test for LVM-THIN

Now TEST 25 is a subtest of this test and can be removed.

13 months agotest(STORAGE): add subtest for encrypted root on LVM
Jo Zzsi [Thu, 14 Nov 2024 22:48:19 +0000 (17:48 -0500)] 
test(STORAGE): add subtest for encrypted root on LVM

Now TEST 21 is a subtest of this test and can be removed.

13 months agotest: include debug module in server only when debugging
Benjamin Drung [Fri, 15 Nov 2024 22:26:29 +0000 (23:26 +0100)] 
test: include debug module in server only when debugging

Including the `debug` module in the server's dracut image is not needed
for the normal test case run. Only include it when the user sets
`SERVER_DEBUG` to debug the test case.

13 months agoci: address yamllint warnings and errors
Benjamin Drung [Fri, 15 Nov 2024 23:32:33 +0000 (00:32 +0100)] 
ci: address 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}}}"  .
```

13 months agochore: add missing document start to all YAML files
Benjamin Drung [Fri, 15 Nov 2024 21:44:41 +0000 (22:44 +0100)] 
chore: add missing document start to all YAML files

yamllint warns about missing document start "---".

13 months agoci(debian): use zstd as compression
Benjamin Drung [Fri, 15 Nov 2024 22:34:56 +0000 (23:34 +0100)] 
ci(debian): use zstd as compression

Ubuntu recommends zstd as default compressor. So use this compression
in the CI as well.

13 months agotest(FULL-SYSTEMD): make systemd-pcrphase module optional
Benjamin Drung [Fri, 15 Nov 2024 20:42:21 +0000 (21:42 +0100)] 
test(FULL-SYSTEMD): make systemd-pcrphase module optional

TEST-04-FULL-SYSTEMD fails on s390x:

```
dracut[E]: Module 'systemd-pcrphase' cannot be installed.
```

systemd ships `systemd-pcrphase.service` only on amd64, arm64, armhf,
riscv64 on Ubuntu and Debian. So make `systemd-pcrphase` an optional
modules in the test.

Fixes #958

13 months agoci(fedora): add ignition
Jo Zzsi [Fri, 15 Nov 2024 16:38:05 +0000 (11:38 -0500)] 
ci(fedora): add ignition

Ignition is a utility used to manipulate systems during the initramfs.
This includes partitioning disks, formatting partitions, writing files
(regular files, systemd units, etc.), and configuring users. On first
boot, Ignition reads its configuration from a source of truth (remote
URL, network metadata service, hypervisor bridge, etc.) and applies
the configuration.

This is an important out-of tree dracut module that
the upstream project should not regress.

13 months agotest(FULL-SYSTEMD): introduce optional_modules variable
Benjamin Drung [Fri, 15 Nov 2024 14:40:17 +0000 (15:40 +0100)] 
test(FULL-SYSTEMD): introduce optional_modules variable

Unfold the test_dracut call by constructing a optional_modules variable.
This makes the code longer, but easier to read.

13 months agotest(RAID-DEG): workaround of omitting network is no longer needed
Jo Zzsi [Fri, 15 Nov 2024 13:58:24 +0000 (08:58 -0500)] 
test(RAID-DEG): workaround of omitting network is no longer needed

13 months agotest(FULL-SYSTEMD): make some systemd modules optional
Jo Zzsi [Fri, 15 Nov 2024 13:35:29 +0000 (08:35 -0500)] 
test(FULL-SYSTEMD): make some systemd modules optional

This PR will unskip test for Ubuntu on the "PR CI".

13 months agofix(dracut-init): add compatibility with Debian/Ubuntu for libdirs detection
Jo Zzsi [Wed, 13 Nov 2024 11:44:39 +0000 (06:44 -0500)] 
fix(dracut-init): add compatibility with Debian/Ubuntu for libdirs detection

Make sure if /lib/ is included in libdirs when needed.

This change is required for multipath dracut module to work properly
on Debian/Ubuntu based distributions.

13 months agofix(fips-crypto-policies): improve check for module inclusion
Jo Zzsi [Thu, 14 Nov 2024 12:22:47 +0000 (07:22 -0500)] 
fix(fips-crypto-policies): improve check for module inclusion

Checking files under /etc in non-hostonly (generic mode) is
not recommended. Test files under /usr instead.

13 months agotest: replace qemu nic model e1000 by virtio
Benjamin Drung [Fri, 15 Nov 2024 10:59:44 +0000 (11:59 +0100)] 
test: replace qemu nic model e1000 by virtio

TEST-72-NBD fails on s390x with:

```
qemu-system-s390x: warning: hub port hub0port0 has no peer
qemu-system-s390x: warning: hub 0 with no nics
qemu-system-s390x: warning: netdev hub0port0 has no peer
qemu-system-s390x: warning: requested NIC (#net046, model e1000) was not created (not supported by this machine?)
```

The test uses the e1000 model, but s390x does not have it:

```
$ qemu-system-s390x -nic model=help
Available NIC models:
virtio
```

So replace the e1000 model by virtio, which is supported by most
architectures.

Fixes #953

13 months agodocs: warn against the usage of -m, -o, -d
Jo Zzsi [Wed, 13 Nov 2024 15:25:36 +0000 (10:25 -0500)] 
docs: warn against the usage of -m, -o, -d

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

13 months agofix(dracut-functions.sh): check_kernel_module go one dir further up
Nowa Ammerlaan [Thu, 14 Nov 2024 18:03:50 +0000 (19:03 +0100)] 
fix(dracut-functions.sh): check_kernel_module go one dir further up

Since $drivers_dir contains the $kernel as well we have to go up one level more.

13 months agotest(RAID): optionally encrypted LVM PV
Jo Zzsi [Thu, 14 Nov 2024 13:39:21 +0000 (08:39 -0500)] 
test(RAID): optionally encrypted LVM PV

Replace TEST-20 with TEST-24 and remove TEST-24.

13 months agotest(BASIC): enable testing in fips mode
Jo Zzsi [Thu, 14 Nov 2024 11:38:47 +0000 (06:38 -0500)] 
test(BASIC): enable testing in fips mode

This test will enable fips mode on Fedora CI.

13 months agoci(fedora): enable the container to test fips
Jo Zzsi [Wed, 13 Nov 2024 19:50:04 +0000 (14:50 -0500)] 
ci(fedora): enable the container to test fips

13 months agoci: increase GitHub Action timeout to 20 min
Jo Zzsi [Wed, 13 Nov 2024 15:30:48 +0000 (10:30 -0500)] 
ci: increase GitHub Action timeout to 20 min

Sadly, the timeout includes not only the time it takes to
run the test, but also the time it takes to allocate a machine on
GitHub to run the job, which is unpredicatable.

Increase the timeout to account for this new information.

13 months agotest: decrease default VM memory size to 1 GiB
Benjamin Drung [Wed, 13 Nov 2024 11:59:38 +0000 (12:59 +0100)] 
test: decrease default VM memory size to 1 GiB

Commit a0442b777820("test: increase VM memory size to pass test 40 on
more VMs") increased the VM memory from 1 to 2 GiB for TEST-72-NBD,
because the test ran out of memory on Arch and openSUSE.

Running the tests on armhf fails with:

```
qemu-system-armhf: at most 2047 MB RAM can be simulated
```

Decrease the default memory back to 1 GiB. Dracut should work on systems
and VMs with not much memory.

13 months agoci: combine Debian/Ubuntu into the same dockerfile
Jo Zzsi [Sun, 3 Nov 2024 12:29:40 +0000 (07:29 -0500)] 
ci: combine Debian/Ubuntu into the same dockerfile

This PR does not change the test covergae or the number of CI
containers. It simply combines the dockerfile to easy maitenance
and remove duplicated code.

13 months agochore: resolve remaining shellcheck for SC2155
Benjamin Drung [Wed, 13 Nov 2024 00:33:17 +0000 (01:33 +0100)] 
chore: resolve remaining shellcheck for SC2155

13 months agochore: remove unnecessary shellcheck disable for SC2031
Laszlo Gombos [Sat, 25 Feb 2023 00:55:08 +0000 (00:55 +0000)] 
chore: remove unnecessary shellcheck disable for SC2031

13 months agochore: remove unnecessary shellcheck disable for SC2030
Laszlo Gombos [Sat, 25 Feb 2023 00:53:43 +0000 (00:53 +0000)] 
chore: remove unnecessary shellcheck disable for SC2030

13 months agochore: remove unnecessary shellcheck disable for SC1004
Laszlo Gombos [Sat, 25 Feb 2023 00:40:21 +0000 (00:40 +0000)] 
chore: remove unnecessary shellcheck disable for SC1004

13 months agochore: resolve shellcheck for SC3037
Laszlo Gombos [Sat, 25 Feb 2023 00:36:28 +0000 (00:36 +0000)] 
chore: resolve shellcheck for SC3037

13 months agochore: resolve shellcheck for SC2155
Laszlo Gombos [Sat, 25 Feb 2023 00:28:44 +0000 (00:28 +0000)] 
chore: resolve shellcheck for SC2155

13 months agochore: resolve shellcheck for SC2153
Laszlo Gombos [Sat, 25 Feb 2023 00:24:20 +0000 (00:24 +0000)] 
chore: resolve shellcheck for SC2153

13 months agochore: resolve shellcheck for SC2219
Laszlo Gombos [Sat, 25 Feb 2023 00:02:18 +0000 (00:02 +0000)] 
chore: resolve shellcheck for SC2219

13 months agochore: resolve shellcheck for SC2116
Laszlo Gombos [Fri, 24 Feb 2023 22:24:23 +0000 (22:24 +0000)] 
chore: resolve shellcheck for SC2116

13 months agotest(RAID): add support for mdadm in addition to btrfs/zfs
Jo Zzsi [Tue, 12 Nov 2024 22:28:16 +0000 (17:28 -0500)] 
test(RAID): add support for mdadm in addition to btrfs/zfs

13 months agochore(deps): bump softprops/action-gh-release from 2.0.9 to 2.1.0
dependabot[bot] [Tue, 12 Nov 2024 20:46:56 +0000 (20:46 +0000)] 
chore(deps): bump softprops/action-gh-release from 2.0.9 to 2.1.0

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.0.9 to 2.1.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.0.9...v2.1.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>
13 months agofeat(dmsquash-live): add support for rd.live.overlay.nouserconfirmprompt
George Mileka [Thu, 25 Jan 2024 23:06:13 +0000 (15:06 -0800)] 
feat(dmsquash-live): add support for rd.live.overlay.nouserconfirmprompt

Dracut allows the creation of a LiveOS using a read-only squashfs and
a read-write overlay on top.

If the read-write overlay is backed by a ramdisk, Dracut halts and prompts
the user to confirm whether to continue or not.

This interaction during the boot process is not desired in all cases.

This change introduces a new flag (rd.live.overlay.nouserconfirmprompt)
that when defined, it suppresses the prompt and allows the boot process
to continue to completion without user interation.

There is no impact to existing configurations and their associated behavior.
The new behavior only takes effect only when the new switch is explicitly
defined by the image build as a kernel parameter.

13 months agotest(FULL-SYSTEMD): skip test on debian:stable for now
Jo Zzsi [Tue, 12 Nov 2024 17:40:33 +0000 (12:40 -0500)] 
test(FULL-SYSTEMD): skip test on debian:stable for now

This should make the Daily Integration test to finally fully green.

13 months agotest(RAID): add support for zfs RAID in addition to btrfs RAID
Jo Zzsi [Tue, 12 Nov 2024 13:27:26 +0000 (08:27 -0500)] 
test(RAID): add support for zfs RAID in addition to btrfs RAID

Switch to RAID 0 to speed up test and simplify it.

13 months agoci: switch from musl:openrc to glibc:openrc
Jo Zzsi [Tue, 12 Nov 2024 12:08:12 +0000 (07:08 -0500)] 
ci: switch from musl:openrc to glibc:openrc

The goal is to test some common non-systemd configuration.
glibc:openrc is probably a better option for this goal, and
GitHub Action (node) fails to run tests on the Gentoo based musl container.

13 months agoci: use the corect new gentoo container label
Jo Zzsi [Tue, 12 Nov 2024 03:25:43 +0000 (22:25 -0500)] 
ci: use the corect new gentoo container label

13 months agochore: use command instead of type consistently
Jo Zzsi [Mon, 11 Nov 2024 13:32:25 +0000 (08:32 -0500)] 
chore: use command instead of type consistently

13 months agoci: bring back musl/openrc option for Gentoo
Jo Zzsi [Sun, 10 Nov 2024 18:53:01 +0000 (13:53 -0500)] 
ci: bring back musl/openrc option for Gentoo

13 months agotest(BTRFSRAID): make the test more reliable
Jo Zzsi [Sun, 10 Nov 2024 13:54:10 +0000 (08:54 -0500)] 
test(BTRFSRAID): make the test more reliable

Currently the test sometimes fails with the following error message:

Dependency failed for systemd-fsck…m Check on /dev/disk/by-label/root.

13 months agofix: check if xx-lib.sh is needed before executing
Jo Zzsi [Sun, 10 Nov 2024 13:31:03 +0000 (08:31 -0500)] 
fix: check if xx-lib.sh is needed before executing

13 months agofix(dracut): rework timeout for devices added via --mount and --add-device
Antonio Alvarez Feijoo [Mon, 4 Nov 2024 12:31:13 +0000 (13:31 +0100)] 
fix(dracut): rework timeout for devices added via --mount and --add-device

Currently, dracut adds a systemd dropin that sets an infinite timeout _only_ for
the underlying persistent devices of each host device that must be active in the
initrd. E.g.:

```
localhost:~ # dracut -f --stdlog 3 --install "/mnt" --mount "/dev/sda1 /mnt btrfs rw,relatime"
localhost:~ # lsinitrd | grep timeout.conf
-rw-r--r--   2 root     root            0 Oct 28 14:21 etc/systemd/system/dev-disk-by\x2duuid-0d1b24c2\x2df112\x2d48ef\x2d8442\x2d1001cffc92f0.device.d/timeout.conf
localhost:~ # ls -l /dev/disk/by-uuid/0d1b24c2-f112-48ef-8442-1001cffc92f0
lrwxrwxrwx 1 root root 10 Oct 28 11:43 /dev/disk/by-uuid/0d1b24c2-f112-48ef-8442-1001cffc92f0 -> ../../sda1
```

It can be verified in the emergency shell:

```
sh-5.2# systemctl show --property JobRunningTimeoutUSec /dev/disk/by-uuid/0d1b24c2-f112-48ef-8442-1001cffc92f0
JobRunningTimeoutUSec=infinity
sh-5.2# systemctl show --property JobRunningTimeoutUSec /dev/sda1
JobRunningTimeoutUSec=1min 30s
```

This can cause a problem if a user application expects to mount /dev/sda1 in the
initrd (that's why it was explicitly added `--mount "/dev/sda1 ..."`), but for
some reason the link is not created within 1min 30s.

13 months agotest: fix typo
Jo Zzsi [Sun, 10 Nov 2024 13:15:49 +0000 (08:15 -0500)] 
test: fix typo

13 months agotest(IMSM): remove unused file
Jo Zzsi [Sun, 10 Nov 2024 12:06:18 +0000 (07:06 -0500)] 
test(IMSM): remove unused file

13 months agotest(BTRFSRAID): remove unused code
Jo Zzsi [Sun, 10 Nov 2024 12:18:33 +0000 (07:18 -0500)] 
test(BTRFSRAID): remove unused code

13 months agoci: add gentoo:slim to Daily Integration Tests
Jo Zzsi [Sun, 10 Nov 2024 12:10:56 +0000 (07:10 -0500)] 
ci: add gentoo:slim to Daily Integration Tests

13 months agofix: check if dracut-lib.sh is needed before executing
Jo Zzsi [Sun, 10 Nov 2024 11:44:39 +0000 (06:44 -0500)] 
fix: check if dracut-lib.sh is needed before executing

13 months agotest: improve precondition checking
Jo Zzsi [Sun, 10 Nov 2024 11:34:24 +0000 (06:34 -0500)] 
test: improve precondition checking

These changes allow gentoo:slim CI container to not fail.

13 months agoci: add gentoo:slim
Jo Zzsi [Sun, 10 Nov 2024 01:52:17 +0000 (20:52 -0500)] 
ci: add gentoo:slim

13 months agotest(FULL-SYSTEMD): fail if mkinitcpio installs more services that dracut
Jo Zzsi [Sun, 10 Nov 2024 00:14:51 +0000 (19:14 -0500)] 
test(FULL-SYSTEMD): fail if mkinitcpio installs more services that dracut