]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
5 days agobuild(deps): bump github/codeql-action from 3.30.5 to 4.31.2
dependabot[bot] [Sat, 1 Nov 2025 22:05:15 +0000 (22:05 +0000)] 
build(deps): bump github/codeql-action from 3.30.5 to 4.31.2

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

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

Signed-off-by: dependabot[bot] <support@github.com>
9 days agoPTY forward fixes
Daan De Meyer [Tue, 28 Oct 2025 14:02:55 +0000 (15:02 +0100)] 
PTY forward fixes

--title= and the actual title were passed as two separate arguments.
Fix by using --title instead of --title=.

Also only pass arguments if a background or title are provided
respectively.

Also do some general cleanups.

Follow up for 8fe5df44005ce0f8c704f2839a44d988fb7d1ebb

10 days agosandbox: Drop all capabilities that don't make sense in userns
Daan De Meyer [Sat, 25 Oct 2025 21:10:16 +0000 (23:10 +0200)] 
sandbox: Drop all capabilities that don't make sense in userns

When unsharing a user namespace, we get a full set of capabilities,
of which a ton don't make sense to keep. Why drop them? Because it's
possible that other tools check if they have the required capabilities
to run, like systing now checking if it is invoked with CAP_BPF. If
we don't drop CAP_BPF, systing will think it's able to attach BPF
programs even though in reality it can't as CAP_BPF in a user namespace
doesn't actually allow you to attach BPF programs.

While we're at it, let's be a bit more thorough with the capability
logic and make sure we modify all capability sets to only contain the
capabilities we want to keep.

11 days agoRespect SYSTEMD_TINT_BACKGROUND and SYSTEMD_ADJUST_TERMINAL_TITLE
Quentin Deslandes [Sun, 26 Oct 2025 10:53:40 +0000 (11:53 +0100)] 
Respect SYSTEMD_TINT_BACKGROUND and SYSTEMD_ADJUST_TERMINAL_TITLE

When mkosi creates a new console with systemd-pty-forward, it sets a
custom (dark) color, which might not play nice depending on your
terminal theme. Environment variables SYSTEMD_TINT_BACKGROUND and
SYSTEMD_ADJUST_TERMINAL_TITLE allow the user the customize this behaviour, but
they were ignored until a recent change in systemd (c.f. 9c3359f).

Modify mkosi behaviour to respect SYSTEMD_TINT_BACKGROUND and
SYSTEMD_ADJUST_TERMINAL_TITLE when calling systemd-pty-forward.

2 weeks agolog: Drop konsole hack
Daan De Meyer [Fri, 24 Oct 2025 10:29:44 +0000 (12:29 +0200)] 
log: Drop konsole hack

You have to configure
"Menu->Settings->Configure Konsole... ->General->"Show window title on the titlebar"
and then konsole will show the window title as expected, so drop the
hack.

2 weeks agoClarify that mkosi.images is not picked up in mkosi.conf.d
Daan De Meyer [Fri, 24 Oct 2025 08:22:34 +0000 (10:22 +0200)] 
Clarify that mkosi.images is not picked up in mkosi.conf.d

Fixes #3978

2 weeks agovmspawn: Support BindUser=
Daan De Meyer [Wed, 22 Oct 2025 18:07:21 +0000 (20:07 +0200)] 
vmspawn: Support BindUser=

https://github.com/systemd/systemd/pull/38410 was merged so let's
add support for BindUser= to vmspawn.

2 weeks agoMerge pull request #3973 from behrmann/ansi2
Jörg Behrmann [Thu, 23 Oct 2025 10:42:46 +0000 (12:42 +0200)] 
Merge pull request #3973 from behrmann/ansi2

Fix and refactor console escape codes

2 weeks agomkosi-vm: Enable universe repository for ubuntu in mkosi-vm
Daan De Meyer [Thu, 23 Oct 2025 06:25:23 +0000 (08:25 +0200)] 
mkosi-vm: Enable universe repository for ubuntu in mkosi-vm

dbus-broker, systemd-boot and various other packages installed by
mkosi-vm come from the universe repository, so let's enable it for
the mkosi-vm config.

2 weeks agolog: factor ANSI escape code magic into a class 3973/head
Jörg Behrmann [Wed, 22 Oct 2025 12:01:56 +0000 (14:01 +0200)] 
log: factor ANSI escape code magic into a class

Co-Authored-By: j <j@cgl.sh>
2 weeks agolog: make OSC escape sequences valid
Jörg Behrmann [Wed, 22 Oct 2025 11:53:56 +0000 (13:53 +0200)] 
log: make OSC escape sequences valid

OSC escape sequences ("ESC ]" aka "\033]") need to be terminated with a string
terminator code ST ("\033\").

Commit f26cb341 introduced some OSC escape sequences that resulted in all mkosi
output being hidden when using the Kitty terminal:
https://github.com/kovidgoyal/kitty/issues/9139

Fixes: f26cb341
Co-Authored-By: j <j@cgl.sh>
2 weeks agoMerge pull request #3971 from DaanDeMeyer/drop-scratch
Daan De Meyer [Wed, 22 Oct 2025 11:05:01 +0000 (13:05 +0200)] 
Merge pull request #3971 from DaanDeMeyer/drop-scratch

2 weeks agoWarn on unknown settings instead of failing 3971/head
Daan De Meyer [Wed, 22 Oct 2025 06:45:18 +0000 (08:45 +0200)] 
Warn on unknown settings instead of failing

This makes it easier to adopt new settings or keep compat with older
versions of mkosi.

2 weeks agovmspawn: Use --grow-image
Daan De Meyer [Tue, 21 Oct 2025 11:50:04 +0000 (13:50 +0200)] 
vmspawn: Use --grow-image

2 weeks agoDrop support for CDROM=
Daan De Meyer [Tue, 21 Oct 2025 11:33:10 +0000 (13:33 +0200)] 
Drop support for CDROM=

We want to align on systemd-vmspawn in the future, and it's very
unlikely it'll ever support this option, so let's drop support for
it since it's very niche and not useful except for testing systemd-repart
ISO stuff.

2 weeks agoRemove support for RuntimeScratch=
Daan De Meyer [Tue, 21 Oct 2025 11:27:29 +0000 (13:27 +0200)] 
Remove support for RuntimeScratch=

systemd-vmspawn solves the problem solved by RuntimeScratch= by
resizing the entire image instead. Let's align with vmspawn and drop
RuntimeScratch= and require users to use RuntimeSize= instead.

2 weeks agoarch: Switch to the newly established fastly mirror
Christian Heusel [Mon, 20 Oct 2025 12:09:12 +0000 (14:09 +0200)] 
arch: Switch to the newly established fastly mirror

Since we can expect quite good caching results for CI-type setups it
might make sense to use this new mirror as a default for mkosi.

Signed-off-by: Christian Heusel <christian@heusel.eu>
2 weeks agoMatch compressed pacman packages too
Martin Hundebøll [Mon, 20 Oct 2025 07:24:23 +0000 (09:24 +0200)] 
Match compressed pacman packages too

Arch packages can be compressed using various codecs, in which case the
package filename is suffixed with the compression method (e.g. .zst for
zstandard compression). Make sure to find such compressed packages in
the volatile package directory exposed to the build script as
$PACKAGEDIR, so they are installable using VolatilePackages=.

Fixes: 71ffced0 ("Rework PACKAGE_GLOBS to be a PackageManager classmethod")
2 weeks agoPrevent using Overlay=yes with Format=portable
Daan De Meyer [Fri, 17 Oct 2025 10:59:34 +0000 (12:59 +0200)] 
Prevent using Overlay=yes with Format=portable

Portable services cannot be extension images so let's error out early
if anyone tries to do that.

Fixes #3927

3 weeks agoMake sure apt sources are installed when BaseTrees= is in the mix
Daan De Meyer [Thu, 16 Oct 2025 12:52:37 +0000 (14:52 +0200)] 
Make sure apt sources are installed when BaseTrees= is in the mix

Let's make sure to install apt sources every time we install the apt
package, even if BaseTrees= or volatile packages or such are in the mix.

To make this work we unfortunately have to reintroduce install_packages().

While we're at it, make sure the installed apt sources don't use the
configured mirror or snapshot. We only install a default set of sources
and for anything custom users should install their own sources.

3 weeks agoMerge pull request #3965 from DaanDeMeyer/simplify-distribution
Daan De Meyer [Fri, 17 Oct 2025 08:57:37 +0000 (10:57 +0200)] 
Merge pull request #3965 from DaanDeMeyer/simplify-distribution

Simplify implementation of distribution installers

3 weeks agoRename mkosi.distributions to mkosi.distribution 3965/head
Daan De Meyer [Fri, 17 Oct 2025 07:41:05 +0000 (09:41 +0200)] 
Rename mkosi.distributions to mkosi.distribution

We have mkosi.installer, not mkosi.installers, so to keep things
consistent let's use mkosi.distribution instead of
mkosi.distributions.

3 weeks agoSimplify implementation of distribution installers
Daan De Meyer [Fri, 17 Oct 2025 07:36:46 +0000 (09:36 +0200)] 
Simplify implementation of distribution installers

- Use __init_subclass__() to automatically have distribution
  installers register themselves with the DistributionInstaller class
  on import
- Remove duplicated methods from Distribution that only forward to the
  corresponding DistributionInstaller and instead have callers access
  the Installer class directly. Make it a property to make this less
  verbose

3 weeks agotest: add unit tests for parents_below() utility function
DaanDeMeyer [Sun, 5 Oct 2025 20:46:01 +0000 (22:46 +0200)] 
test: add unit tests for parents_below() utility function

3 weeks agoDon't print newlines in stash_terminal_title()
Daan De Meyer [Thu, 16 Oct 2025 14:37:00 +0000 (16:37 +0200)] 
Don't print newlines in stash_terminal_title()

3 weeks agoMerge pull request #3962 from DaanDeMeyer/seccomp-fixes
Daan De Meyer [Thu, 16 Oct 2025 13:48:40 +0000 (15:48 +0200)] 
Merge pull request #3962 from DaanDeMeyer/seccomp-fixes

3 weeks agoDon't print newline after ansi sequences
Daan De Meyer [Thu, 16 Oct 2025 11:25:44 +0000 (13:25 +0200)] 
Don't print newline after ansi sequences

3 weeks agoLook for .sdmagic before we consider a PE binary a UKI/addon
Daan De Meyer [Wed, 15 Oct 2025 19:39:02 +0000 (21:39 +0200)] 
Look for .sdmagic before we consider a PE binary a UKI/addon

In ubuntu devel they started using the stubble bootloader for their
kernel images which includes a .linux and a .osrel section which means
it identifies as a UKI so we skip it. Let's additionally look for
.sdmagic as a workaround to fix this for now.

To implement this we can't make use of bootctl kernel-identify anymore
so we reimplement the logic ourselves with pefile. While we're at it,
we move KernelType to bootloader.py as it makes more sense to live there
than in qemu.py.

3 weeks agosandbox: Only load seccomp policy once 3962/head
Daan De Meyer [Fri, 10 Oct 2025 14:05:33 +0000 (16:05 +0200)] 
sandbox: Only load seccomp policy once

3 weeks agosandbox: Add error handling for libseccomp
Daan De Meyer [Thu, 9 Oct 2025 18:23:39 +0000 (20:23 +0200)] 
sandbox: Add error handling for libseccomp

3 weeks agoTreat /opt the same as /usr for the sandbox
Daan De Meyer [Thu, 16 Oct 2025 09:39:39 +0000 (11:39 +0200)] 
Treat /opt the same as /usr for the sandbox

In rare cases, distributions install stuff to /opt as well so let's
make sure we pick up /opt from the tools tree in the same way as we
pick up /usr.

3 weeks agoRework PACKAGE_GLOBS to be a PackageManager classmethod
Daan De Meyer [Wed, 15 Oct 2025 19:35:12 +0000 (21:35 +0200)] 
Rework PACKAGE_GLOBS to be a PackageManager classmethod

3 weeks agoVarious SPDX and whitespace fixes
Daan De Meyer [Wed, 15 Oct 2025 19:39:02 +0000 (21:39 +0200)] 
Various SPDX and whitespace fixes

3 weeks agoDon't fix up vmlinuz locations if not required
Daan De Meyer [Wed, 15 Oct 2025 13:03:50 +0000 (15:03 +0200)] 
Don't fix up vmlinuz locations if not required

If we already have a kernel image for every directory in
/usr/lib/modules then there's no need to do anything.

Fixes #3949

3 weeks agoReduce amount of packages in default image
Daan De Meyer [Sun, 28 Sep 2025 20:01:00 +0000 (22:01 +0200)] 
Reduce amount of packages in default image

Let's introduce some profiles and remove unused packages to reduce
the size of the default image.

Both building the rpm and running mkosi inside the default image are
only rarely useful and shouldn't slow down image builds by default,
so we move both of these operations into their own profiles.

We drop the fish,zsh shells from the default image and also drop
qemu-user-static.

We also clean up a little inside mkosi-vm, getting rid of duplicated
packages across the main and per distro configs.

3 weeks agoAdd support for assert sections
Daan De Meyer [Wed, 15 Oct 2025 10:32:13 +0000 (12:32 +0200)] 
Add support for assert sections

Often you only want to support a single distribution. Adding a
[Match] section to mkosi.conf will be very confusing for users as
they will end up with an empty image. By using [Assert], they'll get
a clear error that what they're doing is not supported.

3 weeks agoubuntu: Switch to devel as the default release
Daan De Meyer [Wed, 15 Oct 2025 10:58:40 +0000 (12:58 +0200)] 
ubuntu: Switch to devel as the default release

Same reasoning as for the other distros, devel will always point to
something recent, whereas hardcoding stable release names will get out
of date very soon.

3 weeks agoImprove logging when we can not extract kernel version from filename
Daan De Meyer [Wed, 15 Oct 2025 07:55:49 +0000 (09:55 +0200)] 
Improve logging when we can not extract kernel version from filename

3 weeks agoDo not build default initrd if Initrds= is specified
Daan De Meyer [Wed, 15 Oct 2025 08:03:46 +0000 (10:03 +0200)] 
Do not build default initrd if Initrds= is specified

Fixes https://github.com/systemd/systemd/issues/39309

Also update the documentation of Initrds= to match the new behavior
since 30956dc4bbd27c50b03f3bb14b1591c2a993eae2.

3 weeks agoDon't unconditionally sync when PackageCacheDirectory=/var
Daan De Meyer [Thu, 9 Oct 2025 06:50:44 +0000 (08:50 +0200)] 
Don't unconditionally sync when PackageCacheDirectory=/var

If PackageCacheDirectory=/var and a cache directory is not configured
(like in mkosi-initrd), then we'd always sync repository metadata,
regardless of the value of CacheOnly=. Let's fix that by disallowing
CacheOnly=metadata|always if a cache directory is not configured and
only syncing if CacheOnly=never|auto, regardless if a cache directory
is configured or not.

Fixes #3946

4 weeks agoREADME: add link to OBS docs for mkosi builds
Luca Boccassi [Wed, 8 Oct 2025 14:12:40 +0000 (15:12 +0100)] 
README: add link to OBS docs for mkosi builds

4 weeks agocompletion: add reuse ignore comments
Jörg Behrmann [Wed, 8 Oct 2025 14:31:05 +0000 (16:31 +0200)] 
completion: add reuse ignore comments

Otherwise reuse will pick up this license as license for the file and complain
about the extra whitespace.

4 weeks agoMake sure not all subimages depend on default-initrd subimage
DaanDeMeyer [Sun, 5 Oct 2025 12:57:13 +0000 (14:57 +0200)] 
Make sure not all subimages depend on default-initrd subimage

Subimages should only depend on the default initrd if they need one.

4 weeks agomkosi-tools: systemd-boot-tools is now available for all arches
Luca Boccassi [Sun, 5 Oct 2025 13:53:26 +0000 (14:53 +0100)] 
mkosi-tools: systemd-boot-tools is now available for all arches

4 weeks agoaction: make it work when used as a submodule
Davide Cavalca [Sat, 4 Oct 2025 16:26:26 +0000 (18:26 +0200)] 
action: make it work when used as a submodule

5 weeks agoconfig: serialize dataclass instances in our JSONEncoder
Jörg Behrmann [Mon, 29 Sep 2025 08:55:12 +0000 (10:55 +0200)] 
config: serialize dataclass instances in our JSONEncoder

During config parsing we have partial dictionaries of our config, that are not
our Config object, but that we need to serialize as well. These may contain
dataclass instances such as ConfigTree objects on which the default encoder
chokes.

Fixes: #3924
5 weeks agolog: set terminal window title in complete_step while mkosi runs
Jörg Behrmann [Thu, 2 Oct 2025 08:01:36 +0000 (10:01 +0200)] 
log: set terminal window title in complete_step while mkosi runs

5 weeks agoMake sure inherited settings are applied for the default initrd
Daan De Meyer [Thu, 2 Oct 2025 12:08:29 +0000 (14:08 +0200)] 
Make sure inherited settings are applied for the default initrd

5 weeks agoFix typo
Daan De Meyer [Thu, 2 Oct 2025 08:07:11 +0000 (10:07 +0200)] 
Fix typo

5 weeks agobuild(deps): bump github/codeql-action from 3.29.7 to 3.30.5
dependabot[bot] [Wed, 1 Oct 2025 22:05:47 +0000 (22:05 +0000)] 
build(deps): bump github/codeql-action from 3.29.7 to 3.30.5

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.7 to 3.30.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/51f77329afa6477de8c49fc9c7046c15b9a4e79d...3599b3baa15b485a2e49ef411a7a4bb2452e7f93)

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

Signed-off-by: dependabot[bot] <support@github.com>
5 weeks agobuild(deps): bump actions/checkout from 4.2.2 to 5.0.0
dependabot[bot] [Wed, 1 Oct 2025 22:05:51 +0000 (22:05 +0000)] 
build(deps): bump actions/checkout from 4.2.2 to 5.0.0

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.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/11bd71901bbe5b1630ceea73d27597364c9af683...08c6903cd8c0fde910a37f88322edcfb5dd907a8)

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

Signed-off-by: dependabot[bot] <support@github.com>
5 weeks agopostmarketos: implement is_kernel_package
Clayton Craft [Mon, 29 Sep 2025 17:57:04 +0000 (10:57 -0700)] 
postmarketos: implement is_kernel_package

There are many many kernel packages in pmOS+Alpine and the pkg names
don't follow any specific pattern that sets them apart from some other
non-kernel packages, so the implementation tries to exclude known
pkgs that are not kernels and assume anything that doesn't match these
package names/patterns are kernel packages.

5 weeks agopostmarketos: provide missing i386-vars.fd
Clayton Craft [Mon, 29 Sep 2025 16:18:44 +0000 (09:18 -0700)] 
postmarketos: provide missing i386-vars.fd

qemu on x86_64 seems to want this thing, and on Alpine it's in the
qemu-systemd-i386 pkg.

Fixes:
    ‣ + /usr/bin/qemu-system-x86_64 --version
    ...
    ‣ Using 60-edk2-x86_64.json firmware description
    ‣ Firmware variables file mkosi.tools/usr/share/qemu/edk2-i386-vars.fd does not exist

5 weeks agoMerge pull request #3922 from DaanDeMeyer/initrd
Daan De Meyer [Sun, 28 Sep 2025 19:59:48 +0000 (21:59 +0200)] 
Merge pull request #3922 from DaanDeMeyer/initrd

Treat default initrd as a regular subimage

5 weeks agoDo not relabel files when building extension image
Daan De Meyer [Sun, 28 Sep 2025 18:40:00 +0000 (20:40 +0200)] 
Do not relabel files when building extension image

We disable relabelling for the main image, let's make sure we disable
it for the extension images we build as well.

5 weeks agoTreat default initrd as a regular subimage 3922/head
Daan De Meyer [Sat, 27 Sep 2025 20:58:04 +0000 (22:58 +0200)] 
Treat default initrd as a regular subimage

Currently, because we build the default initrd as a substep of building
a regular image, we have lots of special cased logic for it and we still
propagate settings manually from the regular image to its default initrd.

Let's streamline this by treating the default initrd as a regular image.
The only complication about making this change is that we used to build
the default initrd on demand only if a kernel was actually installed into
the image. Because we have to make the decision of whether to build the
default initrd or not way earlier now, we can't check if kernels were
installed into the image or not. Instead, we check if any known kernel
packages are listed to be installed which should be a decent enough
heuristic.

Another regression is that the default initrd won't have access to any
packages built as part of the main image build anymore. We used to rely
on this in systemd but now we build the systemd packages in a separate
build subimage and those will still be available to the default initrd
image build.

We have to stop using Bootable=yes in a few tests as using it now means
the resources folder has to be available and we don't propagate it
during tests.

5 weeks agoconfig: Reduce indentation
Daan De Meyer [Sat, 27 Sep 2025 20:08:51 +0000 (22:08 +0200)] 
config: Reduce indentation

5 weeks agoBump various systemd version checks to 258
Daan De Meyer [Sat, 27 Sep 2025 18:19:28 +0000 (20:19 +0200)] 
Bump various systemd version checks to 258

5 weeks agoMerge pull request #3918 from DaanDeMeyer/postmarketos-fixes
Jörg Behrmann [Sat, 27 Sep 2025 14:15:44 +0000 (16:15 +0200)] 
Merge pull request #3918 from DaanDeMeyer/postmarketos-fixes

Postmarketos fixes

5 weeks agoapk: Always operate on package cache directory 3918/head
Daan De Meyer [Fri, 26 Sep 2025 13:46:22 +0000 (15:46 +0200)] 
apk: Always operate on package cache directory

apk does not use any subdirectories under /var/cache/apk to store
packages, which means that our usual tricks to mount package cache
directories from the package cache directory and repository metadata
from the metadata cache directory into the expected locations don't work.

There might be a way to get this to work with overlayfs but this would
be a very complex change. Instead, let's just disable repository metadata
caching for apk and always use the package cache directory for everything.

5 weeks agoStop doing shared repository metadata completely
Daan De Meyer [Fri, 26 Sep 2025 20:04:28 +0000 (22:04 +0200)] 
Stop doing shared repository metadata completely

Let's simplify things by always caching repository metadata per image
instead of sharing repository metadata for some scenarios. We already
stopped sharing repository metadata for pacman and zypper due to these
package managers not being able to handle this use case. For dnf and apt,
while they can handle the use case, the repository metadata isn't so big
that sharing it across multiple mkosi projects saves a lot.

On the other hand, we can drastically reduce complexity by not sharing
repository metadata and reduce the number of copies as well. Instead of
always copying repository metadata to a temporary directory, we now have
package managers read it directly from the metadata cache directory if one
is configured and a temporary directory otherwise. This avoids having to copy
the repository metadata around completely which means we can remove
copy_repository_metadata() completely.

To avoid introducing a requirement on Incremental=yes to have cached repository
metadata, we simply always create a repository metadata (and keyring) cache if
a cache directory is configured. The usage of repository metadata and keyring
caching is now fully independent of Incremental=. Only CacheOnly= will affect
whether we sync repository metadata or use the already cached repository metadata.

When cleaning, we stop cleaning repository metadata and keyring caches with -ff
and move this to -fff. Additionally, we stop making -fff clean up the package cache
as I doubt users will ever want to clean up the shared package cache with mkosi clean
and are mostly interested in cleaning up their project directory of mkosi files.

5 weeks agoapk: Drop uninmplemented keyring() method
Daan De Meyer [Fri, 26 Sep 2025 19:48:08 +0000 (21:48 +0200)] 
apk: Drop uninmplemented keyring() method

5 weeks agopreset: drop systemd-networkd-wait-online.service
Luca Boccassi [Fri, 26 Sep 2025 17:12:08 +0000 (18:12 +0100)] 
preset: drop systemd-networkd-wait-online.service

networkd already enables it via Also= and in some cases
we want to disable it, so drop it

5 weeks agomkosi-initrd: install systemd-container in network profile
Luca Boccassi [Fri, 26 Sep 2025 14:38:31 +0000 (15:38 +0100)] 
mkosi-initrd: install systemd-container in network profile

In fedora/suse/debian/ubuntu systemd-importd is in this package,
which is used to pull the remote DDI in the netboot case

5 weeks agomkosi-initrd: add 89-ethernet.network for network profile
Luca Boccassi [Fri, 26 Sep 2025 11:46:40 +0000 (12:46 +0100)] 
mkosi-initrd: add 89-ethernet.network for network profile

networkd ships with no configuration enabled, so we need to symlink
one in for it to do anything

5 weeks agopostmarketos: Install full util-linux package in initrds
Daan De Meyer [Fri, 26 Sep 2025 08:53:32 +0000 (10:53 +0200)] 
postmarketos: Install full util-linux package in initrds

Otherwise we get busybox mount instead of util-linux mount and systemd
only supports util-linux mount.

5 weeks agoapk: Download packages before installing
Daan De Meyer [Fri, 26 Sep 2025 08:45:17 +0000 (10:45 +0200)] 
apk: Download packages before installing

We do this for all other package managers, let's make apk consistent
and do it there as well.

6 weeks agomkosi-initrd: Install libseccomp explicitly
Daan De Meyer [Wed, 24 Sep 2025 14:03:06 +0000 (16:03 +0200)] 
mkosi-initrd: Install libseccomp explicitly

It might become a Recommends of systemd in the future in distribution
packages but we should make sure it is available in the initrd regardless.

6 weeks agoMerge pull request #3913 from DaanDeMeyer/postmarketos-fixes
Daan De Meyer [Thu, 25 Sep 2025 08:06:39 +0000 (10:06 +0200)] 
Merge pull request #3913 from DaanDeMeyer/postmarketos-fixes

Various postmarketos fixes

6 weeks agoMerge pull request #3914 from behrmann/relocale
Daan De Meyer [Wed, 24 Sep 2025 14:00:40 +0000 (16:00 +0200)] 
Merge pull request #3914 from behrmann/relocale

6 weeks agoutil: widen allowed characters in read_env_file 3914/head
Jörg Behrmann [Wed, 24 Sep 2025 10:07:00 +0000 (12:07 +0200)] 
util: widen allowed characters in read_env_file

Currently we only read uppercase variables starting with a letter, but shell
variables only restriction is not starting with a number, so lowercase names
and names starting with an underscore are allowed.

6 weeks agoAdd ASCII flag to regexes using backslash character classes
Jörg Behrmann [Wed, 24 Sep 2025 10:04:03 +0000 (12:04 +0200)] 
Add ASCII flag to regexes using backslash character classes

By default Python regexes like strings are unicode meaning that they match
anything unicode consides, e.g. a number in the case of \d, which is more than
the usually expected [0-9]. Tighten this in the places where these classes are
used for better readability.

Also reorder the character classes for KERNEL_VERSION_PATTERN and the
systemd-stub version to be the same order for clarity and escape the dash in
the latter, since the need to escape a dash in a character range is position
dependent.

6 weeks agoCompile kernel version regex pattern
Jörg Behrmann [Wed, 24 Sep 2025 09:43:45 +0000 (11:43 +0200)] 
Compile kernel version regex pattern

6 weeks agoopensuse: repository non-oss-debug is invalid
val4oss [Wed, 24 Sep 2025 08:04:56 +0000 (10:04 +0200)] 
opensuse: repository non-oss-debug is invalid

* non-oss-debug is not a valid repository. Better to remove it, otherwise
  command like `zypper refresh` fails.

Signed-off-by: val4oss <val4oss@pm.me>
6 weeks agopostmarketos: Use sandbox everywhere in createrepo() 3913/head
Daan De Meyer [Wed, 24 Sep 2025 08:44:38 +0000 (10:44 +0200)] 
postmarketos: Use sandbox everywhere in createrepo()

Half of the commands in createrepo() are run without a sandbox at
the moment, let's fix that. This also contains various coding style
fixes.

6 weeks agopostmarketos: Coding style fixes
Daan De Meyer [Wed, 24 Sep 2025 08:44:08 +0000 (10:44 +0200)] 
postmarketos: Coding style fixes

Use similar variable names as we use elsewhere instead of the verbose
variable names that stick out like a sore thumb.

6 weeks agopostmarketos: Set up usrmerge in install() instead of setup()
Daan De Meyer [Wed, 24 Sep 2025 08:41:59 +0000 (10:41 +0200)] 
postmarketos: Set up usrmerge in install() instead of setup()

We try to not touch the rootfs directory in setup() at all, so set
up merged /usr in install() instead like we do for debian. Additionally,
we also make sync() does not touch the rootfs either by having it operate
on a temporary directory instead of the real rootfs.

6 weeks agopostmarketos: Don't make image BIOS bootable
Daan De Meyer [Wed, 24 Sep 2025 08:39:59 +0000 (10:39 +0200)] 
postmarketos: Don't make image BIOS bootable

grub cannot be installed on postmarketos yet so don't try to make
the default image bios bootable.

6 weeks agopostmarketos: Move more packages to mkosi-vm
Daan De Meyer [Wed, 24 Sep 2025 08:39:41 +0000 (10:39 +0200)] 
postmarketos: Move more packages to mkosi-vm

6 weeks agoMerge pull request #3781 from craftyguy/alpine-support
Daan De Meyer [Wed, 24 Sep 2025 07:33:33 +0000 (09:33 +0200)] 
Merge pull request #3781 from craftyguy/alpine-support

Add support for postmarketOS

6 weeks agoMerge pull request #3910 from gourryinverse/cxl_support
Daan De Meyer [Wed, 24 Sep 2025 07:26:17 +0000 (09:26 +0200)] 
Merge pull request #3910 from gourryinverse/cxl_support

Add cxl config option support

6 weeks agoAdd postmarketOS support 3781/head
Clayton Craft [Sun, 10 Mar 2024 15:31:06 +0000 (15:31 +0000)] 
Add postmarketOS support

Co-authored-by: Casey Connolly <kcxt@postmarketos.org>
Co-authored-by: Septatrix <24257556+Septatrix@users.noreply.github.com>
6 weeks agoconfig / qemu: add cxl config option 3910/head
Gregory Price [Tue, 23 Sep 2025 12:30:44 +0000 (08:30 -0400)] 
config / qemu: add cxl config option

Add machine `cxl=on` option for x86 and arm machines.

Signed-off-by: Gregory Price <gourry@gourry.net>
6 weeks agoconfig / qemu: support maxmem argument
Gregory Price [Tue, 23 Sep 2025 12:19:48 +0000 (08:19 -0400)] 
config / qemu: support maxmem argument

Add maxmem=X support for the `-m` option.  This is needed for
hotplug memory regions added at runtime by emulated CXL devices.

Signed-off-by: Gregory Price <gourry@gourry.net>
6 weeks agoDetect kernel ver from modules sub dir if unable to extract from filename
Clayton Craft [Wed, 4 Jun 2025 22:44:50 +0000 (15:44 -0700)] 
Detect kernel ver from modules sub dir if unable to extract from filename

postmarketOS doesn't include the kernel version in the filename of the
kernel image. It would be cleaner to update kernel packages to make a
symlink for the kernel under /usr/lib/modules/<ver>, but this would be
difficult to implement in postmarketOS where we ship something like >400
kernel packages for a huge array of different devices / kernel versions.

Currently Alpine/pmOS only support having 1 kernel / version installed
at one time, so this fails if, for some reason, multiple kernel dirs
are found since there's no way to determine which one maps to the kernel
binary mkosi is using.

6 weeks agomkosi-tools: move 'man' pkg from generic list to distro-specific lists
Clayton Craft [Wed, 4 Jun 2025 20:24:50 +0000 (13:24 -0700)] 
mkosi-tools: move 'man' pkg from generic list to distro-specific lists

Follow up to 94cc136fbe, this moves the man pkg to distro-specific pkg
lists to support distros that use a different name for this package.

6 weeks agoci: add an s390x build job for additional coverage
Luca Boccassi [Wed, 16 Jul 2025 09:40:48 +0000 (10:40 +0100)] 
ci: add an s390x build job for additional coverage

7 weeks agomailmap: deduplicate Daan
Jörg Behrmann [Wed, 17 Sep 2025 14:08:59 +0000 (16:08 +0200)] 
mailmap: deduplicate Daan

7 weeks agoMerge pull request #3903 from DaanDeMeyer/fix
Jörg Behrmann [Mon, 15 Sep 2025 13:31:23 +0000 (15:31 +0200)] 
Merge pull request #3903 from DaanDeMeyer/fix

Fix if check in install_systemd_boot()

7 weeks agoRevert "ci: Disable PPC jobs temporarily"
Luca Boccassi [Fri, 12 Sep 2025 08:35:35 +0000 (09:35 +0100)] 
Revert "ci: Disable PPC jobs temporarily"

The issue with the ppc64el job cancelling other jobs has been resolved:
https://github.com/IBM/actionspz/issues/32#issuecomment-3291873411

This reverts commit e019d2d2a646c2ce391b365eb61d1bde7001010e.

7 weeks agoImprove error message 3903/head
Daan De Meyer [Mon, 15 Sep 2025 11:56:17 +0000 (13:56 +0200)] 
Improve error message

7 weeks agoFix if check in install_systemd_boot()
Daan De Meyer [Mon, 15 Sep 2025 11:55:42 +0000 (13:55 +0200)] 
Fix if check in install_systemd_boot()

A generator object always evaluates to True, we have to wrap it with
any() to check if it contains anything.

7 weeks agodnf: Always specify --best again
Daan De Meyer [Fri, 12 Sep 2025 21:28:10 +0000 (23:28 +0200)] 
dnf: Always specify --best again

dnf install will not upgrade packages unless --best is specified.
While this might also break downgrades, not upgrading is worse than
not downgrading, so let's specify --best unconditionally again so we
make sure we always upgrade if a newer version is available.

7 weeks agoMerge pull request #3899 from DaanDeMeyer/cloexec
Daan De Meyer [Fri, 12 Sep 2025 13:39:22 +0000 (15:39 +0200)] 
Merge pull request #3899 from DaanDeMeyer/cloexec

sandbox: Rework ctypes hack

7 weeks agoMerge pull request #3879 from DaanDeMeyer/bind-user
Daan De Meyer [Fri, 12 Sep 2025 12:43:01 +0000 (14:43 +0200)] 
Merge pull request #3879 from DaanDeMeyer/bind-user

8 weeks agosandbox: Rework ctypes hack 3899/head
Daan De Meyer [Fri, 12 Sep 2025 10:59:34 +0000 (12:59 +0200)] 
sandbox: Rework ctypes hack

Now that libffi marks the trampoline file descriptor opened by ctypes
as O_CLOEXEC, we can move file descriptor packing to the very end of
setting up the sandbox and close all file descriptors marked with
O_CLOEXEC already which will also close the libffi trampoline file
descriptor.

8 weeks agoReplace RuntimeHome= with BindUser= 3879/head
DaanDeMeyer [Mon, 25 Aug 2025 09:27:44 +0000 (11:27 +0200)] 
Replace RuntimeHome= with BindUser=

Let's replace our home grown RuntimeHome= option with BindUser= to
mimick systemd-nspawn's --bind-user= option. systemd-vmspawn will soon
learn to support --bind-user= as well and we'll enable the option for
it when that happens as well.

8 weeks agoPass credentials as files where applicable
Daan De Meyer [Sun, 23 Mar 2025 18:36:49 +0000 (19:36 +0100)] 
Pass credentials as files where applicable

- Credentials can be rather large, which leads to huge command lines
  if we pass them as a (encoded) string
- Credentials can be security sensitive, and passing them as a string
  makes it very easy to discover them via `ps` or similar.

Let's solve both issues by always passing credentials as files.

Fixes #3856

8 weeks agoAdd missing uidmap options for --bind= nspawn arguments
DaanDeMeyer [Mon, 25 Aug 2025 09:46:17 +0000 (11:46 +0200)] 
Add missing uidmap options for --bind= nspawn arguments

8 weeks agosandbox: Make all relative paths absolute during argparsing
Daan De Meyer [Fri, 12 Sep 2025 09:26:13 +0000 (11:26 +0200)] 
sandbox: Make all relative paths absolute during argparsing

We change the current working directory during processing in
mkosi-sandbox so let's make sure that we don't have any relative paths
leftover by that point that would become invalid.