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