]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
7 months agoBeef up DNS resolution a little 3321/head
Daan De Meyer [Fri, 3 Jan 2025 23:22:55 +0000 (00:22 +0100)] 
Beef up DNS resolution a little

Let's write a basic nsswitch.conf that makes use of libnss-resolve
and bind mount the systemd-resolved socket into the sandbox if
available.

7 months agoAdd missing sandbox for rmtree()
Daan De Meyer [Fri, 3 Jan 2025 23:44:59 +0000 (00:44 +0100)] 
Add missing sandbox for rmtree()

7 months agoAdd --console=interactive|read-only support for qemu vmm
Daan De Meyer [Fri, 3 Jan 2025 20:56:01 +0000 (21:56 +0100)] 
Add --console=interactive|read-only support for qemu vmm

7 months agoDon't try to remove cache entries of custom distro default initrd
Daan De Meyer [Fri, 3 Jan 2025 20:10:25 +0000 (21:10 +0100)] 
Don't try to remove cache entries of custom distro default initrd

7 months agoKeep more entries from $PATH in the sandbox
Daan De Meyer [Fri, 3 Jan 2025 19:59:09 +0000 (20:59 +0100)] 
Keep more entries from $PATH in the sandbox

In the relaxed sandbox, we want to run executables frome everywhere
that isn't /usr. We make the implicit assumption that anything from
outside /usr doesn't depend (heavily) on what's in /usr and if it does
and a tools tree is used it should match the host sufficiently.

7 months agoUpdate comment
Daan De Meyer [Fri, 3 Jan 2025 19:32:22 +0000 (20:32 +0100)] 
Update comment

7 months agoMerge pull request #3314 from DaanDeMeyer/centos
Daan De Meyer [Fri, 3 Jan 2025 18:30:51 +0000 (19:30 +0100)] 
Merge pull request #3314 from DaanDeMeyer/centos

Centos tools tree fixes

7 months agoInstall btrfs-progs in CentOS Stream EPEL tools tree 3314/head
Daan De Meyer [Fri, 3 Jan 2025 13:39:28 +0000 (14:39 +0100)] 
Install btrfs-progs in CentOS Stream EPEL tools tree

7 months agoman: fix remaining mention of mkosi.pkgmngr
Jörg Behrmann [Fri, 3 Jan 2025 18:04:45 +0000 (19:04 +0100)] 
man: fix remaining mention of mkosi.pkgmngr

7 months agoMake CentOS Stream 10 + EPEL tools tree work
Daan De Meyer [Fri, 3 Jan 2025 13:37:30 +0000 (14:37 +0100)] 
Make CentOS Stream 10 + EPEL tools tree work

Let's not try to install packages not available in EPEL 10.

7 months agoTools fixes
Daan De Meyer [Fri, 3 Jan 2025 13:36:18 +0000 (14:36 +0100)] 
Tools fixes

7 months agoMerge pull request #3311 from DaanDeMeyer/cdrom
Daan De Meyer [Fri, 3 Jan 2025 07:54:27 +0000 (08:54 +0100)] 
Merge pull request #3311 from DaanDeMeyer/cdrom

Make CDROM an upper case option

7 months agoRename vsock config settings 3311/head
Daan De Meyer [Thu, 2 Jan 2025 13:21:41 +0000 (14:21 +0100)] 
Rename vsock config settings

Let's use the same names used by systemd.

7 months agoMake CDROM an upper case option
Daan De Meyer [Thu, 2 Jan 2025 11:39:05 +0000 (12:39 +0100)] 
Make CDROM an upper case option

It's an abbrevation so let's make it upper case similar to TPM and
KVM.

7 months agobuild(deps): bump github/codeql-action from 3.27.5 to 3.28.0
dependabot[bot] [Wed, 1 Jan 2025 22:20:18 +0000 (22:20 +0000)] 
build(deps): bump github/codeql-action from 3.27.5 to 3.28.0

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.5 to 3.28.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f09c1c0a94de965c15400f5634aa42fac8fb8f88...48ab28a6f5dbc2a99bf1e0131198dd8f1df78169)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
7 months agoParse profiles in subimages as well
Daan De Meyer [Mon, 30 Dec 2024 16:10:53 +0000 (17:10 +0100)] 
Parse profiles in subimages as well

Let's parse from mkosi.profiles in subimages as well. We'll still insist
that the profiles used are set in the main image though. To make this work
we have to remove the check to see if a profile exists or not, since it might
not exist in every mkosi.profiles/ directory that we parse. At the same time
we remove the restriction that profiles are set before we parse mkosi.conf.d/
since this isn't really useful anymore now that we parse profiles last and not
first anymore. This allows us to get rid of the concept of immutable settings.

Fixes #3307

7 months agoRename various [Runtime] options and rename mkosi qemu to mkosi vm
Daan De Meyer [Fri, 27 Dec 2024 11:07:56 +0000 (12:07 +0100)] 
Rename various [Runtime] options and rename mkosi qemu to mkosi vm

- Let's get rid of the "Qemu" prefix for runtime options as they apply
  both to the qemu and vmspawn verbs.
- Let's rename QemuGui= to Console= and make it take all the options
  that are accepted by vmspawn's --console= option.
- Let's rename the various runtime options to the corresponding vmspawn
  option where applicable.
- Let's rename mkosi qemu to mkosi vm as well while we're at it.

7 months agoAdd option to control whether to register with machined
Luca Boccassi [Thu, 26 Dec 2024 15:05:45 +0000 (15:05 +0000)] 
Add option to control whether to register with machined

On an ephemeral test runner it is useless churn to register the
guest, and can trigger nasty bugs like the one where machined
kills the user session. Add a config knob, enabled by default,
so that it can be disabled where it's not useful.

This also allows running nspawn where machined is not available,
as currently it just fails since the default is that it tries to
register and fails if it can't.

7 months agoDrop support for pesign secure boot signtool
Daan De Meyer [Mon, 23 Dec 2024 09:19:56 +0000 (10:19 +0100)] 
Drop support for pesign secure boot signtool

sbsigntools is packaged in EPEL now and in the future we're looking
to standardize solely on systemd-sbsign so let's already drop support
for pesign which was only really useful on CentOS Stream because it
didn't have sbsigntools which it does have now.

7 months agoAlways check tools for build at the same place
Daan De Meyer [Sun, 22 Dec 2024 23:02:00 +0000 (00:02 +0100)] 
Always check tools for build at the same place

Let's only check non-build verb tools early and check build verb
tools at the same place regardless of whether the verb is build or
not to keep things more consistent.

As a side effect this allows building tools from source to do the
build in sync scripts which is done in
https://github.com/davide125/arcadeos/blob/main/mkosi.sync.

7 months agoMerge pull request #3298 from DaanDeMeyer/exec
Daan De Meyer [Sun, 22 Dec 2024 22:51:04 +0000 (23:51 +0100)] 
Merge pull request #3298 from DaanDeMeyer/exec

Wait until sandbox exec()'s specified command before continuing

7 months agoburn: Fail if no arguments are provided
Daan De Meyer [Fri, 20 Dec 2024 14:12:06 +0000 (15:12 +0100)] 
burn: Fail if no arguments are provided

If no arguments are provided systemd-repart will operate on the
device backing the rootfs which in the case of burn we definitely
don't want to do most of the time so let's fail unless a device is
explicitly provided.

7 months agoWait until sandbox exec()'s specified command before continuing 3298/head
Daan De Meyer [Sun, 22 Dec 2024 11:47:06 +0000 (12:47 +0100)] 
Wait until sandbox exec()'s specified command before continuing

Let's wait in spawn() until all setup logic has completed before
continuing if a sandbox is used. When using spawn() without run(),
this helps us fail early if the setup logic fails instead of later
on if we're not checking the result of the spawn() command immediately
afterwards.

As a side effect, this also acts as a synchronization point when using
systemd-run --scope where when spawn() returns, we can be 100% sure that
the scope has been created, which is important when calling RegisterMachine
from systemd-machined which does the wrong thing if the scope for the specified
machine does not yet exist and ends up killing the parent unit (often the user
session) instead of just the virtual machine.

7 months agoMove adding "--" to spawn()
Daan De Meyer [Sun, 22 Dec 2024 20:03:40 +0000 (21:03 +0100)] 
Move adding "--" to spawn()

7 months agoMove preexec() out of spawn()
Daan De Meyer [Sun, 22 Dec 2024 20:21:46 +0000 (21:21 +0100)] 
Move preexec() out of spawn()

Let's make use of functools.partial() to apply the arguments so we
can pass the function to subprocess.Popen().

7 months agoMerge pull request #3296 from DaanDeMeyer/kmod
Jörg Behrmann [Sun, 22 Dec 2024 13:44:37 +0000 (14:44 +0100)] 
Merge pull request #3296 from DaanDeMeyer/kmod

mkosi-initrd: Two fixes

7 months agomkosi-initrd: Match both intel_vsec.ko and intel-vsec.ko 3296/head
Daan De Meyer [Sat, 21 Dec 2024 20:20:05 +0000 (21:20 +0100)] 
mkosi-initrd: Match both intel_vsec.ko and intel-vsec.ko

It seems that in 6.13 it went from intel_vsec.ko to intel-vsec.ko.

7 months agomkosi-initrd: Add virtio_dma_buf kernel module
Daan De Meyer [Sat, 21 Dec 2024 20:19:51 +0000 (21:19 +0100)] 
mkosi-initrd: Add virtio_dma_buf kernel module

7 months agoDon't spawn a shell in sandbox if no command is provided
Daan De Meyer [Fri, 20 Dec 2024 14:10:31 +0000 (15:10 +0100)] 
Don't spawn a shell in sandbox if no command is provided

We need https://github.com/systemd/systemd/issues/35000 to make this
not confusing. Currently there's zero feedback that a user is in a sandbox
shell.

7 months agoPass -cpu host when using KVM
Daan De Meyer [Fri, 20 Dec 2024 12:32:35 +0000 (13:32 +0100)] 
Pass -cpu host when using KVM

Turns out it is not the default, so pass it explicitly when using
KVM.

7 months agoMerge pull request #3291 from DaanDeMeyer/sandbox
Daan De Meyer [Fri, 20 Dec 2024 12:32:11 +0000 (13:32 +0100)] 
Merge pull request #3291 from DaanDeMeyer/sandbox

sandbox: Make sure we use pacman keyring and crypto policies from tools tree

7 months agoRun ssh and ssh-keygen as fake root 3291/head
Daan De Meyer [Fri, 20 Dec 2024 11:35:06 +0000 (12:35 +0100)] 
Run ssh and ssh-keygen as fake root

We can't always resolve the current user in the sandbox which ssh
insists on being able to do so let's become root which is always
resolvable.

7 months agoUse sandbox in finalize_credentials()
Daan De Meyer [Fri, 20 Dec 2024 11:17:47 +0000 (12:17 +0100)] 
Use sandbox in finalize_credentials()

7 months agosandbox: Make sure we use pacman keyring and crypto policies from tools tree
Daan De Meyer [Fri, 20 Dec 2024 10:39:37 +0000 (11:39 +0100)] 
sandbox: Make sure we use pacman keyring and crypto policies from tools tree

If ToolsTreeCertificates=yes, we still need to make sure we use the
crypto policies and pacman keyring from the tools tree if one is used.

7 months agoDon't use ExtraSearchPaths= when building default tools tree
Daan De Meyer [Fri, 20 Dec 2024 10:20:54 +0000 (11:20 +0100)] 
Don't use ExtraSearchPaths= when building default tools tree

Since eba43f034c5c19a478249ba50fc1b97faffda75c, we always run binaries
from ExtraSearchPaths= within the tools tree if one is used. This generally
implies the binaries have to be built against the tools tree to be able to
run within it. This means that the binaries won't necessarily work when
executed on the host, which is the case when building the default tools tree.

To avoid failures when building the default tools tree and using ExtraSearchPaths=,
don't use binaries from ExtraSearchPaths= when building the default tools tree.

7 months agoLower log level of messages about cache entries not existing
Daan De Meyer [Fri, 20 Dec 2024 10:02:59 +0000 (11:02 +0100)] 
Lower log level of messages about cache entries not existing

7 months agoUse "tools" as the cache key for the default tools tree
Daan De Meyer [Fri, 20 Dec 2024 08:56:48 +0000 (09:56 +0100)] 
Use "tools" as the cache key for the default tools tree

Currently we still use "distribution~release~architecture", which
breaks checking if the cache is out of date, since we'll always check
against the cache of the currently configured tools tree distribution,
even if we used a different tools tree distribution to build the tools
tree. Let's fix this by using the same cache key for all default tools
trees.

This shouldn't introduce any performance regression as users are not
expected to change the default tools tree distribution all the time
unlike the target image distribution.

7 months agoRun binaries from ExtraSearchPaths= within tools tree
Daan De Meyer [Thu, 19 Dec 2024 11:35:47 +0000 (12:35 +0100)] 
Run binaries from ExtraSearchPaths= within tools tree

Until now, there was always the implicit assumption that any paths
configured with ExtraSearchPaths= contained binaries built against
the host's /usr. With that assumption, it made sense to execute binaries
found in these paths outside of the tools tree as otherwise you might
end up with missing or out of date libraries if these are not available
within the tools tree.

However, with the introduction of "mkosi sandbox", what I want to do
in systemd is to have contributors build systemd within the sandbox and
then use those binaries in mkosi to build the image. This means that the
build directory configured with ExtrasSearchPaths= suddenly contains
binaries built against the tools tree's /usr (if one is configured) instead
of the host's /usr.

Given this new use case, let's get rid of the logic to not use the tools
tree for binaries in ExtraSearchPaths=, instead, users of ExtraSearchPaths=
using a tools tree will have to make sure to use a tools tree that mostly
matches their host's /usr.

7 months agoMake --debug-workspace work even if mkosi doesn't fail
Daan De Meyer [Thu, 19 Dec 2024 15:30:18 +0000 (16:30 +0100)] 
Make --debug-workspace work even if mkosi doesn't fail

Fixes #3283

7 months agoDrop PEAddons=
Daan De Meyer [Wed, 18 Dec 2024 13:00:49 +0000 (14:00 +0100)] 
Drop PEAddons=

Putting these inside the image isn't very useful except for the very
specific use case of being able to skip copying the addon when copying
the ESP to another disk to implement a "live" installer mode. For all
other use cases, PE addons are either supposed to be generated locally
or optionally downloaded alongside the image. For these use cases it
makes much more sense to output the addons alongside the image, but not
in it.

But if it makes more sense to output the addons alongside the image, then
it becomes unclear whether this is something that should be implemented inside
mkosi in the first place. Until we figure whether this makes sense and how
to implement it, let's remove the functionality.

Addons can still be added to the image or generated alongside it by running
ukify in a postinst script. The secure boot signing options will have to be
passed manually but this isn't an unsolvable problem.

7 months agoMerge pull request #3285 from DaanDeMeyer/settings
Jörg Behrmann [Thu, 19 Dec 2024 11:48:06 +0000 (12:48 +0100)] 
Merge pull request #3285 from DaanDeMeyer/settings

Move more settings from [Host] to [Build]

7 months agoRecommend symlinking to ~/.local/bin
Daan De Meyer [Thu, 19 Dec 2024 09:33:00 +0000 (10:33 +0100)] 
Recommend symlinking to ~/.local/bin

When using mkosi sandbox with a tools tree, /usr is replaced which
means the symlink is gone which prevents running mkosi from within
mkosi so let's recommend ~/.local/bin instead.

7 months agoRename [Host] section to [Runtime] section 3285/head
Daan De Meyer [Thu, 19 Dec 2024 10:09:36 +0000 (11:09 +0100)] 
Rename [Host] section to [Runtime] section

[Host] is not a very descriptive name for the settings in this section.
As all these settings affect the behavior of mkosi shell, mkosi qemu,
mkosi boot or mkosi vmspawn, let's rename the section to [Runtime]. We
make sure to still parse [Host] as well to keep backwards compat.

7 months agoMove more settings from [Host] to [Build]
Daan De Meyer [Thu, 19 Dec 2024 09:57:03 +0000 (10:57 +0100)] 
Move more settings from [Host] to [Build]

Let's move ExtraSearchPaths= and all the proxy settings to [Build]
as they also affect the build.

7 months agoImprove summary output a bit
Daan De Meyer [Tue, 17 Dec 2024 11:36:59 +0000 (12:36 +0100)] 
Improve summary output a bit

Let's skip a few sections for subimages as these will always be identical
to the main image anyways.

7 months agoMerge pull request #3280 from DaanDeMeyer/addon
Daan De Meyer [Tue, 17 Dec 2024 12:09:30 +0000 (13:09 +0100)] 
Merge pull request #3280 from DaanDeMeyer/addon

Add initrd-addon output format

7 months agoAdd initrd-addon output format 3280/head
Daan De Meyer [Tue, 17 Dec 2024 08:46:24 +0000 (09:46 +0100)] 
Add initrd-addon output format

Similar to how we can produce sysext and confext extensions, let's also
support building initrd addons.

7 months agoImprove formatting
Daan De Meyer [Tue, 17 Dec 2024 08:13:55 +0000 (09:13 +0100)] 
Improve formatting

7 months agoRefactor extension image helper methods
Daan De Meyer [Tue, 17 Dec 2024 08:09:16 +0000 (09:09 +0100)] 
Refactor extension image helper methods

Let's have two helper methods, is_extension_image() and
is_extension_or_portable_image(). The first is for true extensions,
that are overlayed on top of an existing system, whereas the second
one includes portable images, which are standalone and not overlayed
on top of an existing system.

8 months agoman: Improve style of KernelModulesInitrd
mm [Sat, 14 Dec 2024 21:42:31 +0000 (22:42 +0100)] 
man: Improve style of KernelModulesInitrd

8 months agoFix `SplitArtifacts=` to not split extra artifacts
Michael Ferrari [Fri, 13 Dec 2024 22:05:09 +0000 (23:05 +0100)] 
Fix `SplitArtifacts=` to not split extra artifacts

Fixes: https://github.com/systemd/mkosi/issues/3276
8 months agoMerge pull request #3275 from DaanDeMeyer/pacman-priority
Daan De Meyer [Fri, 13 Dec 2024 13:56:17 +0000 (13:56 +0000)] 
Merge pull request #3275 from DaanDeMeyer/pacman-priority

pacman: Make sure repositories from dropins take priority

8 months agopacman: Make sure repositories from dropins take priority 3275/head
Daan De Meyer [Fri, 13 Dec 2024 11:58:16 +0000 (12:58 +0100)] 
pacman: Make sure repositories from dropins take priority

When multiple repositories ship the same package, the repository
defined first in the pacman config file takes priority. Let's make
sure user defined repositories take priority over the ones defined
in mkosi by moving the Include= statement up a little in the config
file.

8 months agosandbox: Show better error on missing mountpoints
Daan De Meyer [Fri, 13 Dec 2024 13:24:36 +0000 (14:24 +0100)] 
sandbox: Show better error on missing mountpoints

Currently, if a crypto mountpoint does not exist, we fail with a
PermissionError exception. Let's show a better error and guide users
to what they can do to prevent this from happening. Also fix the action
to create all the necessary mountpoints upfront.

8 months agoMerge pull request #3274 from DaanDeMeyer/incremental
Jörg Behrmann [Fri, 13 Dec 2024 11:29:54 +0000 (12:29 +0100)] 
Merge pull request #3274 from DaanDeMeyer/incremental

tests: Build with --incremental=strict

8 months agotests: Build with --incremental=strict 3274/head
Daan De Meyer [Fri, 13 Dec 2024 09:20:40 +0000 (09:20 +0000)] 
tests: Build with --incremental=strict

Let's require cached images to be present before running the
integration tests. This makes sure the tests only need to build the
output that they're testing and it also opens up the road for running
tests in parallel in the future.

8 months agoRemove package manager from cache manifest
Daan De Meyer [Fri, 13 Dec 2024 10:23:39 +0000 (10:23 +0000)] 
Remove package manager from cache manifest

We don't always have the tools tree available yet when generating the
cache manifest which can lead to cache manifest mismatches depending on
whether the tools tree is available or not. Since the package manager field
depends on whether the tools tree is available or not (dnf or dnf5, dnf or zypper),
let's remove it from the cache manifest.

8 months agoci: Don't build tools tree as root
Daan De Meyer [Fri, 13 Dec 2024 09:51:33 +0000 (09:51 +0000)] 
ci: Don't build tools tree as root

8 months agoBuild incremental by default
Daan De Meyer [Fri, 13 Dec 2024 09:20:28 +0000 (09:20 +0000)] 
Build incremental by default

8 months agoUse host model cpu
Matteo Croce [Thu, 12 Dec 2024 16:47:44 +0000 (17:47 +0100)] 
Use host model cpu

mkosi currently calls qemu with `-cpu max`. This enables all features
supported by the accelerator, which could be less than the ones
supported by the host.

Switch to the default `-cpu host` and keep max only when using binary
translation.

8 months agoRework crypto-policies handling slightly
Daan De Meyer [Thu, 12 Dec 2024 10:08:36 +0000 (10:08 +0000)] 
Rework crypto-policies handling slightly

Let's bind mount from the tools tree if it provides crypto policies
and only write our own for rpm-sequoia if the tools tree doesn't provide
its own crypto policies.

8 months agoDon't do proxy mounts in relaxed sandbox
Daan De Meyer [Wed, 11 Dec 2024 21:21:32 +0000 (21:21 +0000)] 
Don't do proxy mounts in relaxed sandbox

These aren't required in a relaxed sandbox.

8 months agodocs: Add note about SandboxTrees= to SkeletonTrees=
Daan De Meyer [Wed, 11 Dec 2024 16:16:46 +0000 (16:16 +0000)] 
docs: Add note about SandboxTrees= to SkeletonTrees=

8 months agosandbox: Spit out some info when initial unshare gets EPERM
Brendan Jackman [Sun, 8 Dec 2024 12:03:57 +0000 (13:03 +0100)] 
sandbox: Spit out some info when initial unshare gets EPERM

To try and minimise the pain of this issue
(https://github.com/systemd/mkosi/issues/3265), dump some info that might help
users resolve it.

I had a quick look around expecting to find a document from Red Hat discussing
this topic much like the Ubuntu one I've linked here, but I didn't find it.
Hopefully if it exists someone else can add it later.

I'm doing this via a direct write to stderr because of the comment at the top of
sandbox.py saying to avoid imports. If this is highly undesirable it looks like
log.log_notice would  be the right choice here (then you don't need the
annoying ANSI codes).

8 months agomkosi-initrd: remove dpkg in newer ubuntu/debian releases
Luca Boccassi [Sat, 7 Dec 2024 00:33:32 +0000 (00:33 +0000)] 
mkosi-initrd: remove dpkg in newer ubuntu/debian releases

8 months agomkosi-initrd: also take input from /etc/kernel/cmdline
Luca Boccassi [Sun, 8 Dec 2024 13:55:25 +0000 (13:55 +0000)] 
mkosi-initrd: also take input from /etc/kernel/cmdline

Other kernel-install plugins (for Type 1) already take /etc/kernel/cmdline
into account when generating the local cmdline entry, so do the same
in mkosi-initrd for the UKI

8 months agofedora: Bump default release to 41
Daan De Meyer [Fri, 6 Dec 2024 15:03:56 +0000 (16:03 +0100)] 
fedora: Bump default release to 41

8 months agoarch: Bump initrd size
Daan De Meyer [Fri, 6 Dec 2024 17:14:52 +0000 (18:14 +0100)] 
arch: Bump initrd size

Fixes CI.

8 months agoOnly validate keys and certificates that are configured
Daan De Meyer [Fri, 6 Dec 2024 15:10:34 +0000 (16:10 +0100)] 
Only validate keys and certificates that are configured

Otherwise we'll fail later on if they are not configured and are
required so let's only validate them if they actually are configured.

8 months agoman: cover both systemd-dissect and portablectl in FAQ
Jörg Behrmann [Fri, 6 Dec 2024 16:21:06 +0000 (17:21 +0100)] 
man: cover both systemd-dissect and portablectl in FAQ

8 months agoman: add an FAQ entry about PORTABLE_PREFIXES=
Jörg Behrmann [Fri, 6 Dec 2024 15:22:02 +0000 (16:22 +0100)] 
man: add an FAQ entry about PORTABLE_PREFIXES=

8 months agoDefine virt as default QEMU machine for riscv64
Akihiko Odaki [Thu, 5 Dec 2024 04:51:21 +0000 (13:51 +0900)] 
Define virt as default QEMU machine for riscv64

The documentation says:
> It is the recommended board type if you simply want to run a guest
> such as Linux and do not care about reproducing the idiosyncrasies and
> limitations of a particular bit of real-world hardware.
https://qemu.readthedocs.io/en/v9.1.0/system/riscv/virt.html

8 months agoBump github/codeql-action from 3.27.0 to 3.27.5
dependabot[bot] [Sun, 1 Dec 2024 22:53:28 +0000 (22:53 +0000)] 
Bump github/codeql-action from 3.27.0 to 3.27.5

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.0 to 3.27.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/662472033e021d55d94146f66f6058822b0b39fd...f09c1c0a94de965c15400f5634aa42fac8fb8f88)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
8 months agoMerge pull request #3254 from behrmann/minordistributionsfixes
Jörg Behrmann [Mon, 2 Dec 2024 10:25:32 +0000 (11:25 +0100)] 
Merge pull request #3254 from behrmann/minordistributionsfixes

Minor distribution fixes

8 months agodebian: use pretty name in error message 3254/head
Jörg Behrmann [Mon, 2 Dec 2024 09:42:29 +0000 (10:42 +0100)] 
debian: use pretty name in error message

This way the error message works better for downstreams.

8 months agouse Distribution.is_apt_distribution in detect_distribution
Jörg Behrmann [Mon, 2 Dec 2024 09:42:00 +0000 (10:42 +0100)] 
use Distribution.is_apt_distribution in detect_distribution

8 months agoOnly run systemd-keyutil if secure boot key and cert exist
Daan De Meyer [Sun, 1 Dec 2024 11:00:10 +0000 (12:00 +0100)] 
Only run systemd-keyutil if secure boot key and cert exist

8 months agosandbox: Bind mount on top of symlink if possible
Daan De Meyer [Fri, 29 Nov 2024 13:37:29 +0000 (14:37 +0100)] 
sandbox: Bind mount on top of symlink if possible

Instead of mounting on top of the resolved symlink, let's just mount
directly on top of the symlink if we can.

Fixes #3247

8 months agoaction: Fix symlink creation
Daan De Meyer [Fri, 29 Nov 2024 12:18:28 +0000 (13:18 +0100)] 
action: Fix symlink creation

8 months agodoc: make ToolsTreeDistribution default match easier to understand
Jörg Behrmann [Tue, 26 Nov 2024 14:35:59 +0000 (15:35 +0100)] 
doc: make ToolsTreeDistribution default match easier to understand

8 months agoMerge pull request #3243 from DaanDeMeyer/fix
Jörg Behrmann [Fri, 29 Nov 2024 10:40:36 +0000 (11:40 +0100)] 
Merge pull request #3243 from DaanDeMeyer/fix

Fix Partition split_path calculation

8 months agoImprove error message formatting a bit
Daan De Meyer [Fri, 29 Nov 2024 10:16:45 +0000 (11:16 +0100)] 
Improve error message formatting a bit

8 months agoOnly remove initrd cache entries
Daan De Meyer [Thu, 28 Nov 2024 15:46:52 +0000 (16:46 +0100)] 
Only remove initrd cache entries

Fixes #3237

8 months agoAdd strict incremental check for default initrd
Daan De Meyer [Thu, 28 Nov 2024 15:45:31 +0000 (16:45 +0100)] 
Add strict incremental check for default initrd

8 months agoaction: Install to $HOME/.local/bin as well 3243/head
Daan De Meyer [Fri, 29 Nov 2024 09:27:56 +0000 (10:27 +0100)] 
action: Install to $HOME/.local/bin as well

8 months agoSkip tools checks for build step if output format is none
Daan De Meyer [Fri, 29 Nov 2024 08:37:45 +0000 (09:37 +0100)] 
Skip tools checks for build step if output format is none

If we're only running things up until the build scripts we're not
going to be running any of the tools we check for so skip the checks
in that case.

8 months agoFix unified kernel image profiles check
Daan De Meyer [Fri, 29 Nov 2024 08:34:33 +0000 (09:34 +0100)] 
Fix unified kernel image profiles check

Turns out we already had this check, so remove the extra one we added
and fix the existing one.

8 months agoFix Partition split_path calculation
Daan De Meyer [Thu, 28 Nov 2024 21:43:03 +0000 (22:43 +0100)] 
Fix Partition split_path calculation

Now that we use workdir() in make_image(), we have to change the
Partition initializer to remove the path added by workdir() again
to get the proper path on the host.

Fixes #3242.

8 months agoImprove maybe_compress() formatting
Daan De Meyer [Thu, 28 Nov 2024 21:41:16 +0000 (22:41 +0100)] 
Improve maybe_compress() formatting

8 months agoDon't resolve deps if we're reusing previous config
Daan De Meyer [Thu, 28 Nov 2024 15:12:03 +0000 (16:12 +0100)] 
Don't resolve deps if we're reusing previous config

We ignore subimages if we're reusing the previous config so let's
make sure we ignore subimages as well after running configure scripts
if we're reusing previous config.

Fixes #3238

8 months agoRevert "Remove tools argument from finaiize_default_initrd()"
Daan De Meyer [Wed, 27 Nov 2024 18:52:27 +0000 (19:52 +0100)] 
Revert "Remove tools argument from finaiize_default_initrd()"

This reverts commit 75a22e52602f18f887a0bac82eaf84e5983941c1.

8 months agoMake sure ukify is recent enough to build UKI profiles
Daan De Meyer [Tue, 26 Nov 2024 15:34:14 +0000 (16:34 +0100)] 
Make sure ukify is recent enough to build UKI profiles

8 months agoMerge pull request #3233 from DaanDeMeyer/initrd
Daan De Meyer [Tue, 26 Nov 2024 15:38:03 +0000 (16:38 +0100)] 
Merge pull request #3233 from DaanDeMeyer/initrd

Various default initrd fixes

8 months agoRemove tools argument from finaiize_default_initrd() 3233/head
Daan De Meyer [Tue, 26 Nov 2024 14:52:32 +0000 (15:52 +0100)] 
Remove tools argument from finaiize_default_initrd()

Not required anymore since the tools tree isn't part of the cache
manifest anymore.

8 months agoRework default initrd cleanup
Daan De Meyer [Tue, 26 Nov 2024 14:48:38 +0000 (15:48 +0100)] 
Rework default initrd cleanup

Currently we only remove the default initrd image cache if the
main image cache is out-of-date and not if the initrd cache is
out-of-date.

Let's fix the problem by calling run_clean() separately on the default
initrd.

Fixes #3231

8 months agoFix metadata removal
Daan De Meyer [Tue, 26 Nov 2024 14:46:08 +0000 (15:46 +0100)] 
Fix metadata removal

8 months agoRemove --force from default initrd command line
Daan De Meyer [Tue, 26 Nov 2024 14:44:21 +0000 (15:44 +0100)] 
Remove --force from default initrd command line

We don't use the resulting Args instance so no point in passing
--force.

8 months agomkosi-initrd: Install btrfs-progs
Daan De Meyer [Sun, 24 Nov 2024 20:34:57 +0000 (21:34 +0100)] 
mkosi-initrd: Install btrfs-progs

Even if fsck.btrfs doesn't do anything particularly useful, given we
install the fs tools of all the other filesystems, let's install btrfs-progs
as well. This is also useful when using systemd-repart to create the
root filesystem on first boot.

8 months agoFix typo
Daan De Meyer [Sun, 24 Nov 2024 17:45:11 +0000 (18:45 +0100)] 
Fix typo

8 months agonspawn: Fix uidmap for build directory
Daan De Meyer [Sun, 24 Nov 2024 11:51:41 +0000 (12:51 +0100)] 
nspawn: Fix uidmap for build directory

The build directory is now owned by the running user as well so we
have to apply rootidmap just like we do with all the other mounts
already.