Daan De Meyer [Thu, 13 Jun 2024 20:46:42 +0000 (22:46 +0200)]
centos: Fix GPG key search logic
Let's only look for the release key of the release we're building for
and add support for searching for the SHA256 key which is used by centos
stream 10.
We can't use the symlinked names because those don't exist on centos.org/keys.
Daan De Meyer [Thu, 13 Jun 2024 19:38:39 +0000 (21:38 +0200)]
centos: Change local rpm GPG key location
Let's look for the one suffixed with the release number. This doesn't
change behavior for c9s as this is a symlink to the file we looked for
previously but will fix our behavior for c10s which uses a different key.
Michael Ferrari [Sun, 9 Jun 2024 10:34:38 +0000 (12:34 +0200)]
Set default output name for `mkosi-tools`
This should allow one to invoke `mkosi --directory "" --include mkosi-tools`
in the project root to create a tools tree that is automatically
detected and used in subsequent invocations.
Daan De Meyer [Fri, 7 Jun 2024 18:01:59 +0000 (20:01 +0200)]
action: Disable apparmor completely
These are ephemeral CI machines with full root access without password,
there's really no point in running apparmor in the first place so instead
of trying to work around broken apparmor policies, just disable apparmor
completely.
Daan De Meyer [Thu, 6 Jun 2024 13:35:07 +0000 (15:35 +0200)]
mkosi-initrd: Include more modules
- systemd logs an error if x_tables.ko is missing so let's include it.
- For cryptsetup, let's make sure we include all crypto modules so it
always has everything it needs
Daan De Meyer [Wed, 5 Jun 2024 07:59:34 +0000 (09:59 +0200)]
opensuse: Add glibc-gconv-modules-extra to default tools tree
This package was split off from glibc but mtools does not yet have
a required dependency on it (see
https://bugzilla.opensuse.org/show_bug.cgi?id=1225982) so for now
let's install it ourselves.
Daan De Meyer [Wed, 5 Jun 2024 07:15:50 +0000 (09:15 +0200)]
Make sure we don't fail when there is no sdmagic section in sd-stub
The sdmagic section in sd-stub was only introduced in systemd 250.
Since Ubuntu Jammy ships systemd 249, let's make sure we gracefully
handle the scenario where we can't find the sdmagic section.
Daan De Meyer [Wed, 5 Jun 2024 07:29:50 +0000 (09:29 +0200)]
dnf: Enable versionlock plugin by default
Let's allow users to make use of the versionlock plugin by enabling
it by default. To make sure it doesn't fail, we write a noop
configuration that makes the plugin do nothing at all which users
can then override using PackageManagerTrees=.
Michael Ferrari [Tue, 4 Jun 2024 11:26:00 +0000 (13:26 +0200)]
Add `UnifiedKernelImageFormat=` with specifiers
This can be used to control the name to use for the UKI during image
generation. Special `&` specifiers can be used to include kernel
specific information in the filename.
This is useful for the `systemd-sysupdate` case, as you can set this to
`%i_%v` to use a format that can be parse by its configuration. The
current format used includes both a roothash as well as the kernel
version which both can't be matched by sysupdate.
Daan De Meyer [Sun, 2 Jun 2024 09:37:16 +0000 (11:37 +0200)]
Have coredumpctl and journalctl operate on forwarded journal if available
If ForwardJournal= is configured, have coredumpctl and journalctl operate
on it instead of on the image itself. While this doesn't handle the edge
case where the journal is forwarded but the coredumps are stored in the image,
let's assume that users that enable ForwardJournal= will also configure coredumps
to be stored in the journal.
With this option on, builds that have an existing cache directory will
generally fail. Fedora doesn't keep old packages on mirrors, and metadata
refers to specific package versions, so stale metadata will cause dnf to fail.
This fixes mkosi test image builds in systemd for me.
Jörg Behrmann [Tue, 28 May 2024 15:08:01 +0000 (17:08 +0200)]
doc: change X in tables to checkmark
We already have two different X in there, X and x, which are hard to tell
apart, and since we want to say something positive, let's make it a checkmark.
Jörg Behrmann [Wed, 15 May 2024 07:36:01 +0000 (09:36 +0200)]
doc: remove "mkosi." prefix from environment variable table
pandoc has a weird algorithm to define the width of tables in markdown. The
width cannot be specified absolutely, but is made relative to the text width by
how many dashes are in the horizontal line under the header in each
column. This can lead to spurious word breaks even on wide displays where the
whole table would fit. Removing the prefix should somewhat ameliorate the
problem until a better solution is found.
Daan De Meyer [Tue, 28 May 2024 13:21:55 +0000 (15:21 +0200)]
Pass arguments that look like env variables as env to systemd-nspawn
The kernel passes unknown parameters as environment variables to pid1.
Let's do the same for systemd-nspawn. Of course we don't know what is
known and unknown so let's take advantage of the fact that kernel cmdline
arguments are (usually) lower case and environment variables are (usually)
upper case and use that to determine whether to pass something as an argument
or an environment variable.
bwrap is used for many many different things, so I just added a blanket
check that requires is to be always required if use any of the verbs that
call check_tools().
Daan De Meyer [Fri, 17 May 2024 11:32:54 +0000 (13:32 +0200)]
mkosi-initrd: Don't remove sanitizer libraries from initrd
Let's not unconditionally remove sanitizer libraries and their
dependencies from the initrd as it turns out running software with
sanitizers in the initrd isn't that far fetched.
Jörg Behrmann [Tue, 14 May 2024 13:20:35 +0000 (15:20 +0200)]
Don't die when images already exist
We already check whether outputs exist when looping over all image configs and
skip the build if the output exists. This way one can just "mkosi build" after
adding a new image and the missing ones will be built.
Daan De Meyer [Tue, 14 May 2024 10:36:38 +0000 (12:36 +0200)]
Drop check for workspace directory relative to cwd
The current working directory check is only relevant if the current
working directory is used as a build source, which means it's also
handled by the second check so let's drop it.
Daan De Meyer [Sun, 12 May 2024 14:01:06 +0000 (16:01 +0200)]
Add optional file ID for qemu drives
For testing multipath in systemd's integration tests, we need multiple
qemu drives backed by the same file. Let's allow specifying an additional
file ID to make this possible with QemuDrive=.
Daan De Meyer [Fri, 10 May 2024 10:55:23 +0000 (12:55 +0200)]
Chroot for depmod and modinfo
modinfo cannot always work with output from newer or different depmod.
Specifically, this fixes the case where modinfo sch_fq_codel fails with
"module not found" on CentOS Stream 9 images built from Fedora 40. When
depmod from Fedora 40 is used, modinfo in the image fails with "module
not found". When depmod from inside the image is used, modinfo succeeds
as expected.
We'd rather not do this but in this case there's no other option.