]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
23 hours agoMerge pull request #4090 from DaanDeMeyer/proc main
Jörg Behrmann [Wed, 24 Dec 2025 13:31:04 +0000 (14:31 +0100)] 
Merge pull request #4090 from DaanDeMeyer/proc

sandbox: Drop --proc

25 hours agoFix --debug-shell 4090/head
DaanDeMeyer [Wed, 24 Dec 2025 10:53:57 +0000 (11:53 +0100)] 
Fix --debug-shell

While we're at it, let's save ourselves from having to reason about
Python's capture rules for nested functions by moving _preexec() out
of spawn() and passing in arguments via functools.partial().

26 hours agosandbox: Drop --proc
DaanDeMeyer [Wed, 24 Dec 2025 10:35:32 +0000 (11:35 +0100)] 
sandbox: Drop --proc

This is trivially replaced with --bind /proc $DST, so let's drop the
separate option. Maybe in the future we'll add --proc back but have it
actually mount a new procfs instance.

26 hours agoMerge pull request #4089 from DaanDeMeyer/sandbox
Daan De Meyer [Wed, 24 Dec 2025 10:15:35 +0000 (11:15 +0100)] 
Merge pull request #4089 from DaanDeMeyer/sandbox

Various fixes

26 hours agorun: Remove hack to keep packed file descriptors intact 4089/head
DaanDeMeyer [Wed, 24 Dec 2025 08:35:39 +0000 (09:35 +0100)] 
run: Remove hack to keep packed file descriptors intact

Now that we execute execvp() in the preexec function and therefore
skip python's close file descriptors logic, we don't need our hack
anymore to tell python the right file descriptors to close so let's
drop it.

26 hours agomkosi-tools: Install libmicrohttpd explicitly on Arch
DaanDeMeyer [Wed, 24 Dec 2025 08:31:34 +0000 (09:31 +0100)] 
mkosi-tools: Install libmicrohttpd explicitly on Arch

It was made an optional dependency of the systemd package.

26 hours agosandbox: Refactor mount_rbind()
DaanDeMeyer [Wed, 24 Dec 2025 08:14:13 +0000 (09:14 +0100)] 
sandbox: Refactor mount_rbind()

Let's split out separate functions for the mount API syscalls.

28 hours agoRemove unneeded lambdas
DaanDeMeyer [Tue, 23 Dec 2025 19:58:15 +0000 (20:58 +0100)] 
Remove unneeded lambdas

40 hours agoMerge pull request #4086 from DaanDeMeyer/fix
Daan De Meyer [Tue, 23 Dec 2025 20:12:35 +0000 (21:12 +0100)] 
Merge pull request #4086 from DaanDeMeyer/fix

run: Call execvpe() from preexec function

40 hours agorun: Call execvpe() from preexec function 4086/head
DaanDeMeyer [Tue, 23 Dec 2025 16:17:01 +0000 (17:17 +0100)] 
run: Call execvpe() from preexec function

Python does its own executable lookup in $PATH before executing the preexec function, and
hence before we have set up the sandbox which influences the lookup results. To get around
that, let's call execvpe() ourselves inside the preexec() function, and not give Python the
chance to do it itself. This ensures we can do the proper executable lookup after setting
up the sandbox. If we can't find the executable, do nothing, and let Python do its own
search logic so it can return a proper error, which we cannot do from the preexec function.
Note that by doing this we also skip Python closing all open file descriptors except the
ones specified by the user in pass_fds, but since Python opens all file descriptors with
O_CLOEXEC anyway, we'll assume we're good and don't need to close open file descriptors
explicitly.

42 hours agoMerge pull request #4087 from behrmann/morelint
Daan De Meyer [Tue, 23 Dec 2025 18:27:31 +0000 (19:27 +0100)] 
Merge pull request #4087 from behrmann/morelint

More linters

43 hours agolinter: enable flake8-bugbear 4087/head
Jörg Behrmann [Tue, 23 Dec 2025 16:05:37 +0000 (17:05 +0100)] 
linter: enable flake8-bugbear

43 hours agorun: use nosandbox for default sandbox arguments
Jörg Behrmann [Tue, 23 Dec 2025 16:25:17 +0000 (17:25 +0100)] 
run: use nosandbox for default sandbox arguments

This also adds nosandbox as an immutable function for bugbear to silence B008
[1].

[1] https://docs.astral.sh/ruff/rules/function-call-in-default-argument/

43 hours agoClear environment in scopedenv before recreating it
Jörg Behrmann [Tue, 23 Dec 2025 16:17:57 +0000 (17:17 +0100)] 
Clear environment in scopedenv before recreating it

This fixes B003 [1].

[1] https://docs.astral.sh/ruff/rules/assignment-to-os-environ/

43 hours agoDon't name unused variable in find_unused_vsock_cid
Jörg Behrmann [Tue, 23 Dec 2025 16:16:38 +0000 (17:16 +0100)] 
Don't name unused variable in find_unused_vsock_cid

This fixes B007 [1].

[1] https://docs.astral.sh/ruff/rules/unused-loop-control-variable/

43 hours agoClobber original ValueError when GIT_CONFIG_COUNT fails to parse.
Jörg Behrmann [Tue, 23 Dec 2025 16:15:28 +0000 (17:15 +0100)] 
Clobber original ValueError when GIT_CONFIG_COUNT fails to parse.

This fixes B904 [1]. The original error is safe to discard, since we give a
proper error message to act on the error.

[1] https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/

43 hours agoFix: capturing of loop variable for systemd-dissect call
Jörg Behrmann [Tue, 23 Dec 2025 16:12:40 +0000 (17:12 +0100)] 
Fix: capturing of loop variable for systemd-dissect call

This fixes B023 [1]. Before only the last loop value would be captured.

[1] https://docs.astral.sh/ruff/rules/function-uses-loop-variable/

44 hours agolinter: take all W lints from pycodestyle
Jörg Behrmann [Tue, 23 Dec 2025 15:50:13 +0000 (16:50 +0100)] 
linter: take all W lints from pycodestyle

This doesn't add any new warnings, so it seems okay to add.

44 hours agorun: Pass cmd instead of cmdline
DaanDeMeyer [Tue, 23 Dec 2025 16:16:37 +0000 (17:16 +0100)] 
run: Pass cmd instead of cmdline

cmd is already stringified.

44 hours agolinter: reformat ruff's linter.select table
Jörg Behrmann [Tue, 23 Dec 2025 15:49:18 +0000 (16:49 +0100)] 
linter: reformat ruff's linter.select table

2 days agoConfigure pyright included files
DaanDeMeyer [Mon, 22 Dec 2025 19:33:08 +0000 (20:33 +0100)] 
Configure pyright included files

Let's configure the files on which pyright should run to avoid long
startup times where it tries to check every single file in the workspace
directory.

2 days agoqemu: Register with systemd-machined in user session
Daan De Meyer [Mon, 22 Dec 2025 13:54:52 +0000 (14:54 +0100)] 
qemu: Register with systemd-machined in user session

Now that machine registration works unprivileged
since systemd v259, let's switch to unconditionally
registering machines with the user session
systemd-machined instance.

This breaks compat but the previous implementation
arguably wasn't useful or used, since registration
would only be done when running as root or if the
Register= feature was explicitly enabled. And if
not running as root, you'd have to authenticate
every time when booting the image to register it
which is arguably too annoying that anyone actually
bothered with it.

As vmspawn doesn't yet support registering with the
user machined instance, we stop registering vmspawn
machines for now. https://github.com/systemd/systemd/pull/40185
will add support for user machined regisration to
vmspawn.

For nspawn we stick with system machined registration
for now.

4 days agoCreate package cache dir before invoking pacman
Sebastian Wiesner [Sun, 21 Dec 2025 06:48:47 +0000 (07:48 +0100)] 
Create package cache dir before invoking pacman

Fixes #4081, works around upstream issue, see
https://gitlab.archlinux.org/pacman/pacman/-/issues/292

4 days agoMerge pull request #4080 from DaanDeMeyer/reflink
Jörg Behrmann [Sat, 20 Dec 2025 19:06:12 +0000 (20:06 +0100)] 
Merge pull request #4080 from DaanDeMeyer/reflink

util: Add reflink file-copying helpers

4 days agoCache hwdb step 4080/head
Daan De Meyer [Fri, 19 Dec 2025 20:02:30 +0000 (21:02 +0100)] 
Cache hwdb step

Running hwdb takes roughly a second and is
unlikely to ever rely on files added by extra
trees or such, so let's cache the step instead of
re-running it every single time.

4 days agotree-wide: Migrate some uses of copy_tree() to copyfile()
Daan De Meyer [Fri, 19 Dec 2025 20:00:04 +0000 (21:00 +0100)] 
tree-wide: Migrate some uses of copy_tree() to copyfile()

4 days agoutil: Add reflink file-copying helpers
Daan De Meyer [Fri, 19 Dec 2025 19:53:09 +0000 (20:53 +0100)] 
util: Add reflink file-copying helpers

shutil.copyfile() doesn't do reflinks internally,
so let's add our own helpers which do.

5 days agodistribution: do not default to release=VERSION_ID for openSUSE Tumbleweed
Antonio Alvarez Feijoo [Fri, 19 Dec 2025 11:14:11 +0000 (12:14 +0100)] 
distribution: do not default to release=VERSION_ID for openSUSE Tumbleweed

`config_default_release()` calls `detect_distribution()` to get the default
release if it's not set, which picks the value from os-release's `VERSION_ID`.
In openSUSE Tumbleweed this property has the snapshot number. Since
`mkosi-initrd` does not set `Release=` via config, mkosi thinks that it's Leap
and fails:

```
$ mkosi-initrd
‣ Validating certificates and keys
‣ Building main image
‣  Copying in sandbox trees…
‣  Installing openSUSE
Warning: Enforced setting: $releasever=20251217
Loading repository data...
Reading installed packages...
'Leap-release' not found in package names. Trying capabilities.
No provider of 'Leap-release' found.
‣ "zypper --installroot=/buildroot --cache-dir=/var/cache/zypp --non-interactive --no-refresh --releasever=20251217 --no-gpg-checks install --download in-advance --no-recommends --force-resolution filesystem Leap-release" returned non-zero exit code 104.
‣ "mkosi --force --directory= --format=cpio --output=initrd --output-directory=/tmp/tmpcvx9let7 --extra-tree=/usr/lib/modules/6.17.0-2-default:/usr/lib/modules/6.17.0-2-default --extra-tree=/usr/lib/firmware:/usr/lib/firmware '--remove-files=/usr/lib/firmware/*-ucode' --build-sources= --include=mkosi-initrd --kernel-modules=host --extra-tree=/usr/lib/modules/6.17.0-1-default/updates/hdaps.ko:/usr/lib/modules/6.17.0-1-default/updates/hdaps.ko --extra-tree=/usr/lib/modules/6.17.0-1-default/updates/thinkpad_ec.ko:/usr/lib/modules/6.17.0-1-default/updates/thinkpad_ec.ko --extra-tree=/usr/lib/modules/6.17.0-1-default/updates/tp_smapi.ko:/usr/lib/modules/6.17.0-1-default/updates/tp_smapi.ko --package-cache-dir=/var --cache-only=metadata --output-mode=600 --include /usr/lib/mkosi-initrd --include /etc/mkosi-initrd --sandbox-tree=/tmp/tmp0tjr7mwr --extra-tree=/etc/vconsole.conf:/etc/vconsole.conf" returned non-zero exit code 104.
```

Fixes 0b701c690ddcf3543bc1a698a1977ea390dbfd36

5 days agosandbox: Add close context manager
Daan De Meyer [Fri, 19 Dec 2025 19:50:00 +0000 (20:50 +0100)] 
sandbox: Add close context manager

6 days agoWrap build_microcode_initrd in complete_step
Laurence Kiln [Thu, 18 Dec 2025 17:00:18 +0000 (19:00 +0200)] 
Wrap build_microcode_initrd in complete_step

6 days agoFix typo in manpage
Laurence Kiln [Thu, 18 Dec 2025 16:52:24 +0000 (18:52 +0200)] 
Fix typo in manpage

7 days agomkosi-addon: drop Output=addon, addon.py already has a default
Luca Boccassi [Wed, 17 Dec 2025 20:38:46 +0000 (20:38 +0000)] 
mkosi-addon: drop Output=addon, addon.py already has a default

addon.py already passes mkosi-local.addon.efi by default if nothing
else is given, so it's not necessary to override it here. And it makes
it impossible to give custom names via Output= in your own config.

7 days agosandbox: return raw error code from the kernel and friends on failure
Yu Watanabe [Wed, 17 Dec 2025 16:44:42 +0000 (01:44 +0900)] 
sandbox: return raw error code from the kernel and friends on failure

When a system error occurs, the libseccomp returns -ECANCELED and
hides the original error code. That makes harder to debug the failure.
Let's make libseccomp propagate the original error code.

7 days agoconfig: replace deprecated sandbox verb with box in help message
Yu Watanabe [Wed, 17 Dec 2025 19:43:44 +0000 (04:43 +0900)] 
config: replace deprecated sandbox verb with box in help message

Follow-up for f1eab5a783bd3f5f0fb6a1d3dd60e9517cfae353.

7 days agoMerge pull request #4061 from LaurenceKiln/measure_steps
Daan De Meyer [Wed, 17 Dec 2025 18:53:36 +0000 (19:53 +0100)] 
Merge pull request #4061 from LaurenceKiln/measure_steps

7 days agoMigrate log_step to complete_step in places 4061/head
Laurence Kiln [Wed, 17 Dec 2025 18:15:22 +0000 (20:15 +0200)] 
Migrate log_step to complete_step in places

7 days agoReport duration of complete_step with --debug
Laurence Kiln [Wed, 17 Dec 2025 18:01:50 +0000 (20:01 +0200)] 
Report duration of complete_step with --debug

7 days agosandbox: fix wrong errno passed to OSError()
Yu Watanabe [Wed, 17 Dec 2025 16:25:58 +0000 (01:25 +0900)] 
sandbox: fix wrong errno passed to OSError()

7 days agoverity: do not copy signing cert in addons/portables/extensions
Luca Boccassi [Wed, 17 Dec 2025 16:03:39 +0000 (16:03 +0000)] 
verity: do not copy signing cert in addons/portables/extensions

It makes no sense to include these in portables or addons
or extensions, it's for the rootfs so pid1 can use it

Follow-up for 4bdb47b6dafec4f258a2dca446d67ee662dbedd4

7 days agoBump version to 27~devel
Daan De Meyer [Wed, 17 Dec 2025 15:45:04 +0000 (16:45 +0100)] 
Bump version to 27~devel

7 days agoRelease 26 v26
Daan De Meyer [Wed, 17 Dec 2025 15:45:02 +0000 (16:45 +0100)] 
Release 26

8 days agoAdjust logging messages for kmod/fw resolution
Laurence Kiln [Mon, 8 Dec 2025 14:33:20 +0000 (16:33 +0200)] 
Adjust logging messages for kmod/fw resolution

8 days agoRevert "Do not try to install packages that are listed in RemovePackages="
Daan De Meyer [Tue, 16 Dec 2025 14:44:30 +0000 (15:44 +0100)] 
Revert "Do not try to install packages that are listed in RemovePackages="

This reverts commit b3d6e69d8e01e0fcaf8409935ebe8ebf95d546c3.

Fixes #3911

8 days agoportable: Make sure mountpoints exist in the image
Daan De Meyer [Tue, 16 Dec 2025 15:43:37 +0000 (16:43 +0100)] 
portable: Make sure mountpoints exist in the image

Fixes #4012

8 days agoinitrd: Inherit keymap, timezone, hostname and rootpw by default
Daan De Meyer [Tue, 16 Dec 2025 13:54:47 +0000 (14:54 +0100)] 
initrd: Inherit keymap, timezone, hostname and rootpw by default

Fixes #3951

8 days agopacman: Make sure hookdir exists
Daan De Meyer [Tue, 16 Dec 2025 12:33:56 +0000 (13:33 +0100)] 
pacman: Make sure hookdir exists

Workaround for regression in pacman 7.1.

9 days agomake_image: log systemd-repart *.conf files at the --debug level
Marc Herbert [Tue, 11 Nov 2025 00:12:49 +0000 (16:12 -0800)] 
make_image: log systemd-repart *.conf files at the --debug level

As discussed in #3948, systemd-repart *.conf files have default values
which is convenient until this fails with some dreaded "disk full" error
- then it becomes very mysterious. To considerably speed up the
investigation about what exactly is full, show the configuration files
in use when using --debug.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
(cherry picked from commit 7040a6add12c8f8c1c8393d5e35c747ee2876472)
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
9 days agoMerge pull request #4062 from DaanDeMeyer/sandbox-debug
Daan De Meyer [Tue, 16 Dec 2025 10:11:29 +0000 (11:11 +0100)] 
Merge pull request #4062 from DaanDeMeyer/sandbox-debug

9 days agosandbox: Don't make overlay an absolute path if tmpfs 4062/head
Daan De Meyer [Tue, 16 Dec 2025 08:13:55 +0000 (09:13 +0100)] 
sandbox: Don't make overlay an absolute path if tmpfs

Fixes #4039

9 days agosandbox: Add better error reporting for overlayfs
Daan De Meyer [Mon, 15 Dec 2025 20:24:15 +0000 (21:24 +0100)] 
sandbox: Add better error reporting for overlayfs

Let's do some basic checks up front so we catch
trivial errors ourselves instead of having to
debug obscure errors we get back from the kernel
when calling mount().

9 days agorun: Increase string limit for strace when debugging sandbox
Daan De Meyer [Mon, 15 Dec 2025 20:03:46 +0000 (21:03 +0100)] 
run: Increase string limit for strace when debugging sandbox

9 days agoRing the terminal bell after the last image has been built
Jörg Behrmann [Fri, 24 Oct 2025 16:39:48 +0000 (18:39 +0200)] 
Ring the terminal bell after the last image has been built

9 days agoAdd glob in default initrd to exclude some exotic drivers
Laurence Kiln [Sat, 6 Dec 2025 18:34:58 +0000 (20:34 +0200)] 
Add glob in default initrd to exclude some exotic drivers

9 days agoAllow KernelModules= globs to also match relative to modules root dir
Laurence Kiln [Mon, 8 Dec 2025 11:00:55 +0000 (13:00 +0200)] 
Allow KernelModules= globs to also match relative to modules root dir

9 days agozypper: add --force-resolution flag
LevitatingBusinessMan (Rein Fernhout) [Fri, 12 Dec 2025 23:55:54 +0000 (00:55 +0100)] 
zypper: add --force-resolution flag

12 days agokmod: Only add fully resolved fw path if it exists
Daan De Meyer [Fri, 12 Dec 2025 11:21:21 +0000 (12:21 +0100)] 
kmod: Only add fully resolved fw path if it exists

The symlinks in /usr/lib/firmware might be
dangling and we shouldn't try to add the target of
a dangling symlink to the list of firmware as cpio
will error out later because it can't find the
file or directory.

Replaces #4053

13 days agoMerge pull request #4050 from DaanDeMeyer/sandbox-preexec
Daan De Meyer [Fri, 12 Dec 2025 09:05:21 +0000 (10:05 +0100)] 
Merge pull request #4050 from DaanDeMeyer/sandbox-preexec

13 days agoAdd details to KernelModulesInitrd= doc
Laurence Kiln [Wed, 10 Dec 2025 16:05:27 +0000 (18:05 +0200)] 
Add details to KernelModulesInitrd= doc

13 days agoFix SplitArtifacts=repart-definitions for addons
Daan De Meyer [Wed, 10 Dec 2025 18:41:28 +0000 (19:41 +0100)] 
Fix SplitArtifacts=repart-definitions for addons

is_extension_or_portable_image() includes addon images, which should
be skipped in copy_repart_definitions(), so list the formats individually
instead.

Follow up for 1acab18874433b504b080dcf8753826c8b0d5bd9

13 days agoAdd log_step call in build_kernel_modules_initrd
Laurence Kiln [Wed, 10 Dec 2025 17:44:19 +0000 (19:44 +0200)] 
Add log_step call in build_kernel_modules_initrd

2 weeks agorun: Set up sandbox with a preexec function 4050/head
Daan De Meyer [Tue, 9 Dec 2025 22:11:25 +0000 (23:11 +0100)] 
run: Set up sandbox with a preexec function

There's no need to initialize a new python interpreter every single
time we need a sandbox when we can use the one we already have by
setting up the sandbox with a preexec_fn. A preexec_fn executes before
execve(), so we can reuse the same python interpreter we're already
running in instead of having to spawn a new one.

If we're debugging the sandbox or running a setup command, we stick to
the old approach of invoking a separate python interpreter.

2 weeks agoMove setup argument to run() instead of sandbox_cmd()
Daan De Meyer [Tue, 9 Dec 2025 21:54:03 +0000 (22:54 +0100)] 
Move setup argument to run() instead of sandbox_cmd()

It's a bit up in the air whether this belongs in sandbox_cmd() or
spawn() but let's move it to spawn since it shouldn't be impossible
to have a setup command without having sandbox.

2 weeks agoUse proper constants for ansi colors
Daan De Meyer [Tue, 9 Dec 2025 21:30:04 +0000 (22:30 +0100)] 
Use proper constants for ansi colors

I was playing around with mypyc again and it did not like class
attributes like the Style ones. While mypyc ended up not working for
other reasons, let's switch to something it is happy with which is just
regular constants named identically to how they're named in systemd. It's
arguably not uglier than the Style namespace class.

2 weeks agomkosi-obs: add SplitArtifacts=repart-definitions and use it
Luca Boccassi [Tue, 9 Dec 2025 12:56:24 +0000 (12:56 +0000)] 
mkosi-obs: add SplitArtifacts=repart-definitions and use it

Allows signing portable/sysext/confext images

2 weeks agoCopy repart definitions to staging directory
Daan De Meyer [Tue, 9 Dec 2025 14:48:18 +0000 (15:48 +0100)] 
Copy repart definitions to staging directory

We should always use the staging directory while the image is being
built, at the end everything is moved to the output directory.

2 weeks agoMerge pull request #4042 from DaanDeMeyer/vmspawn
Daan De Meyer [Tue, 9 Dec 2025 13:18:05 +0000 (14:18 +0100)] 
Merge pull request #4042 from DaanDeMeyer/vmspawn

Two vmspawn improvements

2 weeks agoAdd SplitArtifacts=repart-definitions
Daan De Meyer [Tue, 9 Dec 2025 11:59:35 +0000 (12:59 +0100)] 
Add SplitArtifacts=repart-definitions

For use in mkosi-obs

2 weeks agoMerge pull request #4036 from bluca/mkosi_obs_fixes
Daan De Meyer [Tue, 9 Dec 2025 11:37:24 +0000 (12:37 +0100)] 
Merge pull request #4036 from bluca/mkosi_obs_fixes

2 weeks agomkosi-obs: prepare EFI authvars only if there is at least an ESP 4036/head
Luca Boccassi [Sun, 7 Dec 2025 23:41:39 +0000 (23:41 +0000)] 
mkosi-obs: prepare EFI authvars only if there is at least an ESP

No point otherwise, a DDI might be a portable image with no ESP

2 weeks agomkosi-obs: 'offset' in sd-repart's json might be empty string rather than null
Luca Boccassi [Sun, 7 Dec 2025 23:38:51 +0000 (23:38 +0000)] 
mkosi-obs: 'offset' in sd-repart's json might be empty string rather than null

[   67s] ++ systemd-repart --json=short /work/out/nest-octopus_5.2.raw
[   67s] ++ jq -r '.[] | select(.type == "esp") | .offset'
[   67s] No machine ID set, using randomized partition UUIDs.
[   67s] No changes.
[   67s] + offset=
[   67s] + '[' '' = null ']'

2 weeks agonspawn/vmspawn: Add --bind-user-group=wheel 4042/head
Daan De Meyer [Thu, 30 Oct 2025 22:35:07 +0000 (23:35 +0100)] 
nspawn/vmspawn: Add --bind-user-group=wheel

We want bound users to be able to elevate privileges inside the
container.

2 weeks agovmspawn: Only set --grow-image= if RuntimeSize= is specified
Daan De Meyer [Thu, 30 Oct 2025 22:32:17 +0000 (23:32 +0100)] 
vmspawn: Only set --grow-image= if RuntimeSize= is specified

2 weeks agomkosi-obs: always include verity certificate
Luca Boccassi [Sun, 7 Dec 2025 22:42:30 +0000 (22:42 +0000)] 
mkosi-obs: always include verity certificate

Ensure it is included in images for verification

2 weeks agoRevert "Use Path.relative_to instead of Path.parts"
Luca Boccassi [Sun, 7 Dec 2025 20:50:41 +0000 (20:50 +0000)] 
Revert "Use Path.relative_to instead of Path.parts"

This reverts commit 5a476a92deca8ad54869e5d416217aa1bb137b25.

2 weeks agoaction: Use environment variables instead of inputs
Daan De Meyer [Sun, 7 Dec 2025 19:04:51 +0000 (20:04 +0100)] 
action: Use environment variables instead of inputs

Let's simplify and just use environment variables
instead of inputs. While we're at it, use
environment variables for everything since I don't
know which variables are broken in composite
actions and which are not (see linked github
actions bug).

2 weeks agoportable: support split roothash
Luca Boccassi [Sat, 6 Dec 2025 17:05:03 +0000 (17:05 +0000)] 
portable: support split roothash

Portable images are DDIs too, support writing a split roothash
as with OS images

2 weeks agoUse Path.relative_to instead of Path.parts
Laurence Kiln [Fri, 5 Dec 2025 21:31:32 +0000 (23:31 +0200)] 
Use Path.relative_to instead of Path.parts

2 weeks agoUpdate doc for mkosi ssh to mention sd v256 sshd-vsock
Laurence Kiln [Sat, 6 Dec 2025 14:11:09 +0000 (16:11 +0200)] 
Update doc for mkosi ssh to mention sd v256 sshd-vsock

2 weeks agoRewrite note on fw deps of kernel modules in manpage
Laurence Kiln [Sat, 6 Dec 2025 14:57:23 +0000 (16:57 +0200)] 
Rewrite note on fw deps of kernel modules in manpage

2 weeks agoAdd python3-pefile to fedora tools conf
Laurence Kiln [Fri, 5 Dec 2025 09:26:32 +0000 (11:26 +0200)] 
Add python3-pefile to fedora tools conf

python3-pefile is a dep of `system-ukify` which `mkosi` depends on,
so it gets installed indirectly by `dnf install  $(mkosi dependencies)`
runs. But mkosi depends on it directly, so make it an explicit dependency.

2 weeks agoFix truthy condition
Laurence Kiln [Fri, 5 Dec 2025 11:17:55 +0000 (13:17 +0200)] 
Fix truthy condition

2 weeks agoMerge pull request #4018 from DaanDeMeyer/btrfs-ioctl
Daan De Meyer [Thu, 4 Dec 2025 14:57:21 +0000 (15:57 +0100)] 
Merge pull request #4018 from DaanDeMeyer/btrfs-ioctl

3 weeks agotree: Use btrfs ioctls instead of btrfs tool 4018/head
Daan De Meyer [Wed, 3 Dec 2025 14:19:00 +0000 (15:19 +0100)] 
tree: Use btrfs ioctls instead of btrfs tool

The btrfs ioctls are trivial to use so let's avoid
the overhead of spawning sandboxes and processes
and just use the ioctls directly.

3 weeks agocode review
Laurence Kiln [Wed, 3 Dec 2025 18:04:18 +0000 (20:04 +0200)] 
code review

3 weeks agocode review
Laurence Kiln [Wed, 3 Dec 2025 15:54:40 +0000 (17:54 +0200)] 
code review

3 weeks agocode review
Laurence Kiln [Wed, 3 Dec 2025 13:10:02 +0000 (15:10 +0200)] 
code review

3 weeks agoDon't discard ordering of include/exclude entries in KernelModules=
Laurence Kiln [Mon, 1 Dec 2025 23:01:38 +0000 (01:01 +0200)] 
Don't discard ordering of include/exclude entries in KernelModules=

Since eecf8b3b5 `KernelModules=` supports both inclusion and exclusion
of kmods. When resolving kmod presets like "default" and "host"
(and perhaps others in the future) it's important to retain the
ordering of entries, so that the user can add a preset and then
subtract only specific modules from the working set.

`filter_kernel_modules` relies on this ordering to do its job.

3 weeks agoFix case where we don't check for box verb
Daan De Meyer [Wed, 3 Dec 2025 14:05:59 +0000 (15:05 +0100)] 
Fix case where we don't check for box verb

3 weeks agobuild(deps): bump github/codeql-action from 4.31.2 to 4.31.6
dependabot[bot] [Tue, 2 Dec 2025 18:54:02 +0000 (18:54 +0000)] 
build(deps): bump github/codeql-action from 4.31.2 to 4.31.6

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.2 to 4.31.6.
- [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/0499de31b99561a6d14a36a5f662c2a54f91beee...fe4161a26a8629af62121b670040955b330f9af2)

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

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks agobuild(deps): bump actions/checkout from 5.0.0 to 6.0.0
dependabot[bot] [Tue, 2 Dec 2025 01:58:29 +0000 (01:58 +0000)] 
build(deps): bump actions/checkout from 5.0.0 to 6.0.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/08c6903cd8c0fde910a37f88322edcfb5dd907a8...1af3b93b6815bc44a9784bd300feb67ff0d1eeb3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
3 weeks agoAdd zram and nfnetlink to default initrd
Laurence Kiln [Sat, 29 Nov 2025 14:28:20 +0000 (16:28 +0200)] 
Add zram and nfnetlink to default initrd

zram-generator has been on by default in fedora
since fc33 (2020) and runs during early boot.
If the zram module is missing, users are hit with a nasty
45s systemd timeout.

firewalld.service is also on by default and fails to start
without nfnetlink.

Let's make sure an image built with `KernelModules=default`,
which pulls in the default mkosi-initrd modules, brings up
a fedora system in a non-degraded state

Before:
52038188 fedora.initrd

After:
52105776 fedora.initrd

3 weeks agoverity: copy signing certificate to /usr/lib/verity.d/
Luca Boccassi [Sat, 29 Nov 2025 01:10:01 +0000 (01:10 +0000)] 
verity: copy signing certificate to /usr/lib/verity.d/

If a signing certificate for verity is specified copy it in the image
to /usr/lib/verity.d/ so that it can be used for userspace verification
when not using secure boot

3 weeks agoImprove manpage output using pandoc lua filter (#4005)
LaurenceKiln [Mon, 1 Dec 2025 21:34:43 +0000 (22:34 +0100)] 
Improve manpage output using pandoc lua filter (#4005)

* Improve manpage output using pandoc lua filter

3 weeks agoPass environment to systemd-sysusers invocation
bakhtin [Mon, 1 Dec 2025 15:11:39 +0000 (15:11 +0000)] 
Pass environment to systemd-sysusers invocation

Signed-off-by: bakhtin <a@bakhtin.net>
3 weeks agoMake Ruff check for dangling whitespace
Laurence Kiln [Sat, 29 Nov 2025 06:09:03 +0000 (08:09 +0200)] 
Make Ruff check for dangling whitespace

3 weeks agoqemu: Add missing sandbox
Daan De Meyer [Fri, 28 Nov 2025 17:58:45 +0000 (18:58 +0100)] 
qemu: Add missing sandbox

Follow up for 21675c4822b53db357108d1456006231cd889f60

3 weeks agoSsh=yes maps to Ssh=always, update the manpage
Laurence Kiln [Fri, 28 Nov 2025 06:10:39 +0000 (08:10 +0200)] 
Ssh=yes maps to Ssh=always, update the manpage

3 weeks agoWarn of mkosi's sshd lacking support in distros' SElinux policy
Laurence Kiln [Thu, 27 Nov 2025 19:20:38 +0000 (21:20 +0200)] 
Warn of mkosi's sshd lacking support in distros' SElinux policy

3 weeks agoManpage: Update supported output formats
Laurence Kiln [Fri, 28 Nov 2025 17:43:07 +0000 (19:43 +0200)] 
Manpage: Update supported output formats

3 weeks agoMerge pull request #4003 from bluca/arm_pi
Jörg Behrmann [Fri, 28 Nov 2025 13:28:55 +0000 (14:28 +0100)] 
Merge pull request #4003 from bluca/arm_pi

Fix cross-builds kmods config parsing and add a few modules for RPI to mkosi-initrd