]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
12 hours agomkosi-tools: Drop systemd-boot-efi package main
DaanDeMeyer [Mon, 11 Aug 2025 13:26:50 +0000 (15:26 +0200)] 
mkosi-tools: Drop systemd-boot-efi package

There's no need to install systemd-boot, systemd-stub, ... in the
tools tree as these are picked up from inside the image so let's stop
installing systemd-boot-efi in the tools tree.

Follow up for 9a0d8a8906695a35011ecfd81b36fe82c1577488

13 hours agoAdd debug logging for version reported by systemd tools
DaanDeMeyer [Mon, 11 Aug 2025 13:13:47 +0000 (15:13 +0200)] 
Add debug logging for version reported by systemd tools

13 hours agomkosi-tools: move systemd-boot package to conf file matching older releases
Luca Boccassi [Sat, 9 Aug 2025 14:05:48 +0000 (15:05 +0100)] 
mkosi-tools: move systemd-boot package to conf file matching older releases

Since debian 13/ubuntu 25.04 the tools needed at build time
(bootctl) are in the systemd-boot-tools package, so there's
no need to pull in the systemd-boot package in the tools image,
since it is an integration point that sets up the local ESP and
so on

4 days agoREADME: clarify that companion tools can also be enabled from the git repo
Antonio Alvarez Feijoo [Thu, 7 Aug 2025 13:27:03 +0000 (15:27 +0200)] 
README: clarify that companion tools can also be enabled from the git repo

4 days agoDrop microsecond resolution for datetime.now()
Alberto Planas [Wed, 6 Aug 2025 10:58:55 +0000 (12:58 +0200)] 
Drop microsecond resolution for datetime.now()

The RPM INSTALLTIME attribute is an integer represetantion of the
installation time of the package, and datetime.now is a date
representation of a float timestamp.  This can produce some rounding
errors is powerful build servers.

For example, if the variable `_init_timestamp` has a value XXXXX.1 but
in the same sub-second the package gets installed, the registered
installation time will be the integer representation (XXXXX), making the
comparison done for exclusion of the package to be `True`.

This patch will remove the microsecond granularity of the datetime,
converting the timestamp on its integer representation, instead of the
default float one.  The comparison is still done in the datetime data
type.

Signed-off-by: Alberto Planas <aplanas@suse.com>
5 days agomkosi-initrd: install raid rule with 70 prefix
Jake Helmert [Tue, 5 Aug 2025 20:31:58 +0000 (13:31 -0700)] 
mkosi-initrd: install raid rule with 70 prefix

This aligns better with other common MD device rules installed from
mdadm/multipath/etc.

Closes: #3836
Signed-off-by: Jake Helmert <jhelmert@pacificbiosciences.com>
5 days agoci: give a hint about possible fixes for failing reuse lints
Jörg Behrmann [Tue, 5 Aug 2025 21:28:05 +0000 (23:28 +0200)] 
ci: give a hint about possible fixes for failing reuse lints

9 days agobuild(deps): bump github/codeql-action from 3.29.2 to 3.29.5
dependabot[bot] [Fri, 1 Aug 2025 22:09:15 +0000 (22:09 +0000)] 
build(deps): bump github/codeql-action from 3.29.2 to 3.29.5

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.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/181d5eefc20863364f96762470ba6f862bdef56b...51f77329afa6477de8c49fc9c7046c15b9a4e79d)

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

Signed-off-by: dependabot[bot] <support@github.com>
10 days agomkosi-initrd: move udev rules files for dm and md
Yu Watanabe [Fri, 1 Aug 2025 09:13:24 +0000 (18:13 +0900)] 
mkosi-initrd: move udev rules files for dm and md

10-mkosi-initrd-dm.rules is used not only by LVM, but generic DM
devices. Hence, it must be in the base image.

10-mkosi-initrd-md.rules is used by MD raid, hence it must be in the
raid profile.

Follow-ups for b8bda09866bd64d99157010b4566c9872bb844b6 and
686f57d7f91f1c71bb10a69474e1ca795287bc71.
Fixes https://github.com/systemd/systemd/issues/36162.

13 days agomkosi-vm: Drop tpm_tis change
DaanDeMeyer [Tue, 29 Jul 2025 18:39:56 +0000 (20:39 +0200)] 
mkosi-vm: Drop tpm_tis change

Follow up for 07c24a7d42b20d4fde14e6b0bf4b1d77ac299d13

Setting this for mkosi-vm means only tpm_tis is included and nothing
else is included which is bogus so revert the change.

13 days agoshim: fix log message of installed binary
Jörg Behrmann [Mon, 28 Jul 2025 21:08:57 +0000 (23:08 +0200)] 
shim: fix log message of installed binary

Followup to 10e50f8c55a56fc4260e171239b5fbdbde1b433d

13 days agomkosi-initrd/vm: ensure TPM2 core modules are installed in the initrd
Luca Boccassi [Mon, 28 Jul 2025 23:40:26 +0000 (00:40 +0100)] 
mkosi-initrd/vm: ensure TPM2 core modules are installed in the initrd

On arm64 the tpm_tis modules are not built-in, so /dev/tpmrm0 does
not show up in the initrd and it times out, and unlocking using
the tpm doesn't work.
Ensure the modules are included in the initrd if they are not
built in.

Jul 28 23:19:45 localhost systemd[1]: Expecting device dev-tpmrm0.device - /dev/tpmrm0...
Jul 28 23:19:48 localhost (udev-worker)[212]: ctx=0xaaab038cd650 path=/lib/modules/6.12.33+deb13-cloud-arm64/kernel/drivers/char/tpm/tpm_tis_core.ko.xz error=No such file or directory
Jul 28 23:19:49 localhost (udev-worker)[210]: ctx=0xaaab038cd650 path=/lib/modules/6.12.33+deb13-cloud-arm64/kernel/drivers/char/tpm/tpm_tis_core.ko.xz error=No such file or directory
Jul 28 23:21:11 localhost systemd[1]: dev-tpmrm0.device: Job dev-tpmrm0.device/start timed out.

https://oracle.github.io/kconfigs/?config=UTS_RELEASE&config=TCG_TIS&config=TCG_TIS_CORE

2 weeks agoFirmwareVariables: allow generating during image build
Luca Boccassi [Sat, 19 Jul 2025 23:20:53 +0000 (00:20 +0100)] 
FirmwareVariables: allow generating during image build

The build immediately fails if FirmwareVariables=%O/somefile is used, as
the config parser won't be able to find it, so it is not possible to
generate it during the image build itself (e.g: mkosi.postoutput)
in order to add generated keys to MOK. Set required=False.

2 weeks agoenv: export $EFI_ARCHITECTURE in hook scripts on EFI arches
Luca Boccassi [Mon, 28 Jul 2025 11:12:29 +0000 (12:12 +0100)] 
env: export $EFI_ARCHITECTURE in hook scripts on EFI arches

Saves from having to do the translations manually a bunch of times

2 weeks agomkosi-tools: ukify moved to systemd-ukify in openSUSE
Antonio Alvarez Feijoo [Mon, 28 Jul 2025 12:52:10 +0000 (14:52 +0200)] 
mkosi-tools: ukify moved to systemd-ukify in openSUSE

Since https://build.opensuse.org/request/show/1294979

2 weeks agoMerge pull request #3826 from bluca/mok_install
Jörg Behrmann [Mon, 28 Jul 2025 13:38:45 +0000 (15:38 +0200)] 
Merge pull request #3826 from bluca/mok_install

shim: ensure binaries do not get installed to ESP with .signed suffix

2 weeks agoshim: ensure binaries do not get installed to ESP with .signed suffix 3826/head
Luca Boccassi [Sun, 27 Jul 2025 18:28:06 +0000 (19:28 +0100)] 
shim: ensure binaries do not get installed to ESP with .signed suffix

Binaries in the ESP need to be .efi, not .efi.signed,
so truncate the filename if the source has it (like MOK
in Debian).

2 weeks agoFix new linter warning
Luca Boccassi [Sun, 27 Jul 2025 18:33:08 +0000 (19:33 +0100)] 
Fix new linter warning

2 weeks agoensure builds with cache over device boundaries
Deniz Adrian [Wed, 23 Jul 2025 20:04:53 +0000 (22:04 +0200)] 
ensure builds with cache over device boundaries

when running mkosi with the default cache dir/XDG_CACHE_HOME on a
different device than the mkosi working directory, mkosi falls back to
trying to copy the cache using `copy_tree` from tree.py.

the cache contains symlinks which are pointing to files on the host:

e.g. `mkosi.cache/debian...cache/usr/bin/mt -> /etc/alternatives/mt`

`os.listxattr()` defaults to `follow_symlinks=True`, which leads to
`FileNotFoundError`s if the files don't exist on the host, which stops
the build.

this patch ignores symlinks, but feels like a workaround, as our
assumption would be that such absolute links should not be traversed
outside the chroot in the first place.

Co-authored-by: ZauberNerd <zaubernerd@zaubernerd.de>
2 weeks agoChange UnifiedKernelImages to enum and accept signed/unsigned
Luca Boccassi [Thu, 17 Jul 2025 01:16:18 +0000 (02:16 +0100)] 
Change UnifiedKernelImages to enum and accept signed/unsigned

With custom firmware we enroll our keys in db, so local UKIs can be
built and there's no need to fail the build. Many distributions
ship signed bootloaders, but they still don't ship UKIs.
Add an enum and a parser (to keep backward compat), and if set to
unsigned build locally instead of failing when the bootloader is
signed.

3 weeks agoMerge pull request #3815 from DaanDeMeyer/man
Daan De Meyer [Fri, 18 Jul 2025 11:27:32 +0000 (13:27 +0200)] 
Merge pull request #3815 from DaanDeMeyer/man

3 weeks agoman: Clarify that apparmor needs resolved path to mkosi 3815/head
DaanDeMeyer [Fri, 18 Jul 2025 08:26:40 +0000 (10:26 +0200)] 
man: Clarify that apparmor needs resolved path to mkosi

3 weeks agoVarious man page fixes
DaanDeMeyer [Fri, 18 Jul 2025 08:16:37 +0000 (10:16 +0200)] 
Various man page fixes

3 weeks agomkosi-vm: install systemd-boot-efi-signed where available
Luca Boccassi [Thu, 17 Jul 2025 23:08:26 +0000 (00:08 +0100)] 
mkosi-vm: install systemd-boot-efi-signed where available

Needed for Bootloader=systemd-boot-signed

3 weeks agoMerge pull request #3813 from behrmann/ruff2
Jörg Behrmann [Thu, 17 Jul 2025 12:32:33 +0000 (14:32 +0200)] 
Merge pull request #3813 from behrmann/ruff2

Change ruff check and ruff format order

3 weeks agoci: switch ruff check output format to github 3813/head
Jörg Behrmann [Thu, 17 Jul 2025 12:25:21 +0000 (14:25 +0200)] 
ci: switch ruff check output format to github

3 weeks agoci: switch order of ruff check and ruff format
Jörg Behrmann [Thu, 17 Jul 2025 12:24:56 +0000 (14:24 +0200)] 
ci: switch order of ruff check and ruff format

3 weeks agoopensuse: Install OpenSUSE-release if another release package is not installed
DaanDeMeyer [Thu, 17 Jul 2025 10:42:37 +0000 (12:42 +0200)] 
opensuse: Install OpenSUSE-release if another release package is not installed

Fixes #3782

3 weeks agoqemu: Disable hpet for x86 VMs
DaanDeMeyer [Thu, 17 Jul 2025 09:09:28 +0000 (11:09 +0200)] 
qemu: Disable hpet for x86 VMs

hpet is an emulated clocksource that is generally discouraged in favor
of kvm-clock or tsc for virtual machines. While mkosi's virtual machines
already use kvm-clock, leaving hpet enabled causes qemu on the host to
consume a non-trivial amount of cpu, so let's disable the hpet feature since
we're not making use of it anyway.

3 weeks agomkosi-tools: install systemd-boot-tools for bootctl
Luca Boccassi [Thu, 17 Jul 2025 01:43:02 +0000 (02:43 +0100)] 
mkosi-tools: install systemd-boot-tools for bootctl

3 weeks agoMerge pull request #3805 from bluca/arm_ppc
Luca Boccassi [Wed, 16 Jul 2025 08:33:56 +0000 (09:33 +0100)] 
Merge pull request #3805 from bluca/arm_ppc

ci: add couple more arm64 builds, add ppc64le builds

3 weeks agoci: add fedora/debian ppc64le build jobs 3805/head
Luca Boccassi [Tue, 15 Jul 2025 14:17:12 +0000 (15:17 +0100)] 
ci: add fedora/debian ppc64le build jobs

Lower rate limit, and cannot run integration tests as there's no KVM so
it's too slow, so add just two builds to ensure build regressions
don't happen

3 weeks agoci: add arm64 build jobs to cover fedora/suse/ubuntu as well
Luca Boccassi [Tue, 15 Jul 2025 14:23:21 +0000 (15:23 +0100)] 
ci: add arm64 build jobs to cover fedora/suse/ubuntu as well

Packages are different enough, so cover them all to ensure images
can be built

3 weeks agoMerge pull request #3803 from bluca/uefi_fixes
Luca Boccassi [Tue, 15 Jul 2025 17:57:31 +0000 (18:57 +0100)] 
Merge pull request #3803 from bluca/uefi_fixes

More non-uefi config fixlets

3 weeks agoman: remove duplicate 'the' in FirmwareVariables description
Jelle van der Waa [Tue, 15 Jul 2025 13:06:32 +0000 (15:06 +0200)] 
man: remove duplicate 'the' in FirmwareVariables description

Related: #3787

3 weeks agoconf: pull in shim-signed only on amd64/arm64 on debian/ubuntu/kali 3803/head
Luca Boccassi [Tue, 15 Jul 2025 13:11:05 +0000 (14:11 +0100)] 
conf: pull in shim-signed only on amd64/arm64 on debian/ubuntu/kali

shim-signed only exists on amd64/arm64, not on other architectures,
not even uefi ones

3 weeks agomkosi-vm: only install systemd-boot on uefi on debian/ubuntu/kali
Luca Boccassi [Tue, 15 Jul 2025 13:20:11 +0000 (14:20 +0100)] 
mkosi-vm: only install systemd-boot on uefi on debian/ubuntu/kali

3 weeks agomkosi-vm: do not install bootloaders on non-UEFI arches
Luca Boccassi [Thu, 3 Jul 2025 12:50:12 +0000 (13:50 +0100)] 
mkosi-vm: do not install bootloaders on non-UEFI arches

‣ Cannot make image bootable on UEFI on ppc64-le architecture

Can still boot with direct kernel booting on qemu, so disable
for now

4 weeks agoMerge pull request #3796 from bluca/arm
Luca Boccassi [Sat, 12 Jul 2025 10:25:02 +0000 (11:25 +0100)] 
Merge pull request #3796 from bluca/arm

Fixes for arm64 images, add CI job

4 weeks agoci: add one arm64 job 3796/head
Luca Boccassi [Sat, 5 Jul 2025 13:39:02 +0000 (14:39 +0100)] 
ci: add one arm64 job

4 weeks agoci: do not run integration tests if there's no KVM
Luca Boccassi [Sat, 5 Jul 2025 13:39:25 +0000 (14:39 +0100)] 
ci: do not run integration tests if there's no KVM

Without KVM tests are too slow and timeout after an hour

4 weeks agomkosi-vm: install cloud kernel for debian/arm64 builds
Luca Boccassi [Sat, 5 Jul 2025 11:47:06 +0000 (12:47 +0100)] 
mkosi-vm: install cloud kernel for debian/arm64 builds

The non-cloud arm64 kernel does not enable some configs
that are needed for the qemu runs, like generic TPM support

4 weeks agoqemu: fix booting aarch64 with TPM2
Luca Boccassi [Fri, 4 Jul 2025 23:29:37 +0000 (00:29 +0100)] 
qemu: fix booting aarch64 with TPM2

EDK2 nowadays does provide secureboot for arm. Not only that, TPM2 support is
only enabled in builds that enable secure boot, probably because it's all
part of the TCG modules.

Default to uefi_secure_boot on arm too, like x86.

Also do not pass qemu x86-only configuration options that break booting
arm.

4 weeks agoqemu: do not pass -cpu max,pcid=off unless it's for x86_64
Luca Boccassi [Fri, 4 Jul 2025 18:48:13 +0000 (19:48 +0100)] 
qemu: do not pass -cpu max,pcid=off unless it's for x86_64

qemu-system-aarch64: can't apply global max-arm-cpu.pcid=off: Property 'max-arm-cpu.pcid' not found

4 weeks agoMerge pull request #3766 from aafeijoo-suse/initrd-profiles-network-nfs
Jörg Behrmann [Fri, 11 Jul 2025 04:48:25 +0000 (06:48 +0200)] 
Merge pull request #3766 from aafeijoo-suse/initrd-profiles-network-nfs

Add "nfs" (and "network") initrd profiles

4 weeks agoAdd "nfs" initrd profile 3766/head
Antonio Alvarez Feijoo [Thu, 10 Jul 2025 12:29:54 +0000 (14:29 +0200)] 
Add "nfs" initrd profile

nfs-utils-2.8.4 will provide its own nfsroot-generator [1] to allow mounting the
real rootfs via NFSv4, so this initrd profile will enable this feature.

[1] http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=ed86ea08dadafbac948c6a45629a6f3282a77233

4 weeks agoAdd "network" initrd profile
Antonio Alvarez Feijoo [Thu, 10 Jul 2025 12:48:42 +0000 (14:48 +0200)] 
Add "network" initrd profile

This profile provides networking in the initrd using systemd-networkd.

4 weeks agomkosi-initrd: install procps
Antonio Alvarez Feijoo [Thu, 10 Jul 2025 12:26:15 +0000 (14:26 +0200)] 
mkosi-initrd: install procps

This package contains some useful system utilities: sysctl, pidof, free, top...

4 weeks agomkosi-tools: make sure p11-kit dir exists when configuring module
Clayton Craft [Sun, 6 Jul 2025 07:44:15 +0000 (00:44 -0700)] 
mkosi-tools: make sure p11-kit dir exists when configuring module

Fixes this failure, since I guess the dir may not exist:

‣  Running prepare script /tmp/tmphh1uwz2a/resources/mkosi-tools/mkosi.prepare…
/work/prepare: line 4: /buildroot/usr/share/p11-kit/modules/opensc.module: No such file or directory

5 weeks agomkosi-tools: Explicitly install p11-kit
DaanDeMeyer [Mon, 7 Jul 2025 10:04:26 +0000 (12:04 +0200)] 
mkosi-tools: Explicitly install p11-kit

5 weeks agoMerge pull request #3797 from DaanDeMeyer/remove-packages-optimization
Daan De Meyer [Sat, 5 Jul 2025 22:18:22 +0000 (00:18 +0200)] 
Merge pull request #3797 from DaanDeMeyer/remove-packages-optimization

5 weeks agoDo not try to install packages that are listed in RemovePackages= 3797/head
DaanDeMeyer [Sat, 5 Jul 2025 14:09:38 +0000 (16:09 +0200)] 
Do not try to install packages that are listed in RemovePackages=

This allows using RemovePackages= in mkosi.local.conf to prevent
certain packages listed in the regular configuration from being
installed in the first place.

We also add RemovePackages= to the cache manifest because it now
affects the cached images.

5 weeks agopacman: Don't fail if packages to remove aren't installed
DaanDeMeyer [Sat, 5 Jul 2025 19:08:32 +0000 (21:08 +0200)] 
pacman: Don't fail if packages to remove aren't installed

We already do this for other package managers, let's do it for pacman
as well.

5 weeks agoMerge pull request #3793 from bluca/ppc_s390_build
Luca Boccassi [Sat, 5 Jul 2025 13:36:40 +0000 (14:36 +0100)] 
Merge pull request #3793 from bluca/ppc_s390_build

Make ppc64le/s390x buildable

5 weeks agoopensuse: pull in grep/gzip/xz explicitly to avoid busybox in main image 3793/head
Luca Boccassi [Fri, 4 Jul 2025 13:36:12 +0000 (14:36 +0100)] 
opensuse: pull in grep/gzip/xz explicitly to avoid busybox in main image

Problem: 1: the installed busybox-xz-1.37.0-34.1.noarch conflicts with 'xz' provided by the to be installed xz-5.8.1-1.1.aarch64
 Solution 1: deinstallation of busybox-xz-1.37.0-34.1.noarch
 Solution 2: do not install xz-5.8.1-1.1.aarch64

5 weeks agogha: do not fail if kvm/vhost are not available
Luca Boccassi [Wed, 2 Jul 2025 18:14:48 +0000 (19:14 +0100)] 
gha: do not fail if kvm/vhost are not available

On ppc64le/s390x runners there's no kvm/vhost

5 weeks agoMove efi-specific packages to efi-specific config files
Luca Boccassi [Wed, 2 Jul 2025 20:23:49 +0000 (21:23 +0100)] 
Move efi-specific packages to efi-specific config files

5 weeks agoopensuse: add ppc64le/s390x definitions
Luca Boccassi [Wed, 2 Jul 2025 21:45:28 +0000 (22:45 +0100)] 
opensuse: add ppc64le/s390x definitions

The repository URLs are a bit weird and do not match 1:1 with architecture
names

5 weeks agoSupport matching against architectures with uefi support
DaanDeMeyer [Sat, 5 Jul 2025 07:49:18 +0000 (09:49 +0200)] 
Support matching against architectures with uefi support

5 weeks agoRename sandbox verb to box
DaanDeMeyer [Fri, 4 Jul 2025 18:38:35 +0000 (20:38 +0200)] 
Rename sandbox verb to box

It's both shorter, and doesn't give the wrong impression that this
is about security sandboxing, so let's rename the sandbox name to
just box. Keep the old name as well of course for compat.

5 weeks agoFix /var/tmp directory cleanup
DaanDeMeyer [Thu, 3 Jul 2025 11:45:22 +0000 (13:45 +0200)] 
Fix /var/tmp directory cleanup

Currently, if /work does not exist, we go into the exception handler which
doesn't do anything if the errno is ENOENT, even though we still need to
remove the parent directory.

5 weeks agobuild(deps): bump github/codeql-action from 3.28.18 to 3.29.2
dependabot[bot] [Tue, 1 Jul 2025 22:38:22 +0000 (22:38 +0000)] 
build(deps): bump github/codeql-action from 3.28.18 to 3.29.2

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.18 to 3.29.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/ff0a06e83cb2de871e5a09832bc6a81e7276941f...181d5eefc20863364f96762470ba6f862bdef56b)

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

Signed-off-by: dependabot[bot] <support@github.com>
5 weeks agoMerge pull request #3788 from DaanDeMeyer/opensc
Daan De Meyer [Wed, 2 Jul 2025 05:55:37 +0000 (07:55 +0200)] 
Merge pull request #3788 from DaanDeMeyer/opensc

5 weeks agotests: Skip test_tools() when in sandbox 3788/head
DaanDeMeyer [Tue, 1 Jul 2025 20:44:46 +0000 (22:44 +0200)] 
tests: Skip test_tools() when in sandbox

If we're running inside mkosi sandbox, we don't parse the default
tools tree configuration, which this test depends on, so skip it
when running in the sandbox.

5 weeks agoRevert "Make user provided command line take preference over roothash="
DaanDeMeyer [Tue, 1 Jul 2025 07:22:11 +0000 (09:22 +0200)] 
Revert "Make user provided command line take preference over roothash="

This reverts commit 5a15c7d31d097a11f83cfae664b0b7bb40100fc3.

5 weeks agomkosi-tools: Make sure opensc module is registered with p11-kit
DaanDeMeyer [Mon, 30 Jun 2025 21:38:01 +0000 (23:38 +0200)] 
mkosi-tools: Make sure opensc module is registered with p11-kit

Otherwise openssl will fail to load keys off a yubikey when using
pkcs11-provider. For more discussion and why this isn't the default
everywhere, see https://gitlab.archlinux.org/archlinux/packaging/packages/opensc/-/issues/2.

5 weeks agoresources: Make sure scripts are made executable in as_file()
DaanDeMeyer [Tue, 1 Jul 2025 20:03:00 +0000 (22:03 +0200)] 
resources: Make sure scripts are made executable in as_file()

We don't have access to permissions from the Traversables so we check
for a shebang in each file instead.

5 weeks agoas_file() backport improvements
DaanDeMeyer [Tue, 1 Jul 2025 19:42:12 +0000 (21:42 +0200)] 
as_file() backport improvements

- Simplify
- Fully type
- Move to mkosi.resources

We're going to extend it in the next commit, so no point in keeping
it the same as upstream anymore.

6 weeks agoMerge pull request #3783 from DaanDeMeyer/syntax-warning
Jörg Behrmann [Wed, 25 Jun 2025 13:39:07 +0000 (15:39 +0200)] 
Merge pull request #3783 from DaanDeMeyer/syntax-warning

Three fixes

6 weeks agoMake /etc/machine-id from host available in relaxed sandbox as well 3783/head
Daan De Meyer [Wed, 25 Jun 2025 12:04:58 +0000 (14:04 +0200)] 
Make /etc/machine-id from host available in relaxed sandbox as well

6 weeks agoMake sure various host files are added to every relaxed sandbox
Daan De Meyer [Wed, 25 Jun 2025 12:04:14 +0000 (14:04 +0200)] 
Make sure various host files are added to every relaxed sandbox

Let's not just make these available to mkosi sandbox, but to every
other relaxed sandbox we set up as well.

6 weeks agosandbox: Work around extra file descriptor opened by importing ctypes since python...
Daan De Meyer [Wed, 25 Jun 2025 10:47:56 +0000 (12:47 +0200)] 
sandbox: Work around extra file descriptor opened by importing ctypes since python 3.14

Since python 3.14, importing ctypes opens an extra file descriptor which is used to allocate libffi
closures which are in turn used by ctypes to pass python functions as C callback function pointers. We
don't use this functionality, yet the file descriptor is still opened and messes with the file descriptor
packing logic since the file descriptor to libffi will be passed as a packed file descriptor to the
executable we're invoking. To avoid that from happening, we close libffi's file descriptor after importing
ctypes.

See https://github.com/python/cpython/issues/135893.

6 weeks agosandbox: Fix typo
Daan De Meyer [Fri, 20 Jun 2025 15:25:37 +0000 (17:25 +0200)] 
sandbox: Fix typo

7 weeks agoMerge pull request #3780 from bluca/defer_compress
Luca Boccassi [Sun, 22 Jun 2025 09:45:34 +0000 (10:45 +0100)] 
Merge pull request #3780 from bluca/defer_compress

Fix combining compression and skipping partitions (for signing)

7 weeks agomkosi-obs: support splitting out and compressing partitions 3780/head
Luca Boccassi [Sat, 21 Jun 2025 16:54:48 +0000 (17:54 +0100)] 
mkosi-obs: support splitting out and compressing partitions

Need to recompress the verity-sig partition after creating it,
and deleting the non-compressed split out partitions that are
already present as compressed but that sd-repart re-creates
when doing the signature attach operation.

7 weeks agocompress: do not attempt to compress skipped partitions
Luca Boccassi [Sat, 21 Jun 2025 16:53:39 +0000 (17:53 +0100)] 
compress: do not attempt to compress skipped partitions

When doing offline verity signing, split partitions and compression are
enabled, we attempt to compress a non-existing partition (verity-sig)
which will be created only later.
Do not attempt to compress partitions that are marked to be skipped by
repart.

7 weeks agoDo not use return in finally
Daan De Meyer [Fri, 20 Jun 2025 13:54:34 +0000 (15:54 +0200)] 
Do not use return in finally

This triggers a syntax warning on recent versions of python.

7 weeks agoEnsure directories exist before running sync scripts
Daan De Meyer [Fri, 20 Jun 2025 08:46:12 +0000 (10:46 +0200)] 
Ensure directories exist before running sync scripts

run_sync_scripts() assumes the workspace directory exists but we only
create it later on at the moment. Let's create directories before running
sync scripts to fix this issue.

Replaces #3776

8 weeks agoMerge pull request #3749 from DaanDeMeyer/tools-etc
Daan De Meyer [Mon, 16 Jun 2025 15:44:32 +0000 (16:44 +0100)] 
Merge pull request #3749 from DaanDeMeyer/tools-etc

Bind mount /etc from tools tree into relaxed sandbox

8 weeks agomkosi-obs: also allow enrolling additional certs in KEK
Luca Boccassi [Sun, 15 Jun 2025 22:52:01 +0000 (23:52 +0100)] 
mkosi-obs: also allow enrolling additional certs in KEK

Same as db, useful to be able to get DBX updates

8 weeks agoinitrd: Copy /etc/pki/rpm-gpg into sandbox tree
Daan De Meyer [Sun, 15 Jun 2025 19:50:39 +0000 (20:50 +0100)] 
initrd: Copy /etc/pki/rpm-gpg into sandbox tree

Repos from /etc/yum.repos.d might be signed by keys from /etc/pki/rpm-gpg
so make sure we copy those into the sandbox tree as well.

Fixes #3767

8 weeks agoBind mount /etc from tools tree into relaxed sandbox 3749/head
Daan De Meyer [Thu, 29 May 2025 14:20:54 +0000 (16:20 +0200)] 
Bind mount /etc from tools tree into relaxed sandbox

Config from /etc often references stuff in /usr. Two examples I've
encountered are shell config from /etc/profile and dnf5 blowing up
when there's plugin configuration in /etc without the corresponding
plugin being installed.

To work around such issues, let's use /etc from the tools tree in the
relaxed sandbox instead of /etc from the host. This also saves the user
from having to create directories in their host's /etc to be able to use
mkosi sandbox.

2 months agoPartially revert "resources: add systemd-boot-efi"
Luca Boccassi [Sun, 8 Jun 2025 13:18:53 +0000 (14:18 +0100)] 
Partially revert "resources: add systemd-boot-efi"

systemd-boot-efi is only available for EFI architectures, but
we use mkosi to do the integration tests on all architectures,
so this commit breaks them:

5044s E: Package 'systemd-boot-efi' has no installation candidate

https://autopkgtest.ubuntu.com/results/autopkgtest-noble-upstream-systemd-ci-systemd-ci/noble/s390x/s/systemd-upstream/20250608_124726_4f883@/log.gz

This package should not be included in the initrd anyway, it's
only needed at build time, not inside the initrd

This reverts commit 9a0d8a8906695a35011ecfd81b36fe82c1577488.

2 months agotest: Make sure lvm doesn't try to modify /etc
Daan De Meyer [Thu, 5 Jun 2025 13:02:57 +0000 (15:02 +0200)] 
test: Make sure lvm doesn't try to modify /etc

2 months agoCheck that keys are both in context.cli and history
Daan De Meyer [Wed, 4 Jun 2025 14:18:37 +0000 (16:18 +0200)] 
Check that keys are both in context.cli and history

Otherwise we'll get a KeyError trying to access a key in the history
dict that isn't there.

Fixes #3747.

2 months agofix: Remove `erofs-utils` from initrd
Xavier Moffett [Fri, 30 May 2025 00:34:06 +0000 (20:34 -0400)] 
fix: Remove `erofs-utils` from initrd

No longer necessary, since fsck is no longer invoked by systemd for
read-only filesystems. This fixes a bug causing the initrd stage
of Ubuntu images to fail.

2 months agoMerge pull request #3759 from behrmann/cidebug
Daan De Meyer [Wed, 4 Jun 2025 14:45:16 +0000 (16:45 +0200)] 
Merge pull request #3759 from behrmann/cidebug

2 months agomkosi-initrd: Add atkbd and i8042 modules to the default initrd modules
Daan De Meyer [Sun, 1 Jun 2025 20:03:49 +0000 (22:03 +0200)] 
mkosi-initrd: Add atkbd and i8042 modules to the default initrd modules

Required to get my laptop keyboard working in an initrd with just
the default modules.

2 months agoGenerate initrds outside of umask context manager
Septatrix [Wed, 28 May 2025 17:08:31 +0000 (19:08 +0200)] 
Generate initrds outside of umask context manager

2 months agoci: Drop differential shellcheck
Daan De Meyer [Wed, 4 Jun 2025 14:04:33 +0000 (16:04 +0200)] 
ci: Drop differential shellcheck

We already run shellcheck on all scripts as part of the main CI job,
so we don't really get any benefit of a differential shellcheck as all
our code is already checked by shellcheck so let's just drop it.

2 months agobuild(deps): bump github/codeql-action from 3.28.16 to 3.28.18
dependabot[bot] [Sun, 1 Jun 2025 23:02:37 +0000 (23:02 +0000)] 
build(deps): bump github/codeql-action from 3.28.16 to 3.28.18

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.16 to 3.28.18.
- [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/28deaeda66b76a05916b6923827895f2b14ab387...ff0a06e83cb2de871e5a09832bc6a81e7276941f)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 months agoRevert to btrfs for fedora and openuse 3759/head
Jörg Behrmann [Wed, 4 Jun 2025 14:00:20 +0000 (16:00 +0200)] 
Revert to btrfs for fedora and openuse

This was accidentaly committed.

2 months agoresources: add systemd-boot-efi
Jörg Behrmann [Wed, 4 Jun 2025 09:04:26 +0000 (11:04 +0200)] 
resources: add systemd-boot-efi

Since
https://salsa.debian.org/systemd-team/systemd/-/commit/a4bdf87f03e06fe687f0bf7596af31d0f2ac80b1
systemd-boot is not pulled in automatically by systemd-boot anymore

2 months agoMerge pull request #3750 from DaanDeMeyer/tools-tree-profiles
Daan De Meyer [Wed, 4 Jun 2025 13:55:54 +0000 (15:55 +0200)] 
Merge pull request #3750 from DaanDeMeyer/tools-tree-profiles

mkosi-tools: Introduce debug and gui profiles to reduce the number of packages installed by default

2 months agomkosi-tools: Install udev in opensuse tools trees 3750/head
Daan De Meyer [Wed, 4 Jun 2025 13:03:47 +0000 (15:03 +0200)] 
mkosi-tools: Install udev in opensuse tools trees

Ships bootctl these days.

2 months agomkosi-tools: Switch to dnf5 on Arch Linux
Daan De Meyer [Thu, 29 May 2025 08:43:56 +0000 (10:43 +0200)] 
mkosi-tools: Switch to dnf5 on Arch Linux

2 months agomkosi-tools: Remove unnecessary directory
Daan De Meyer [Thu, 29 May 2025 08:42:16 +0000 (10:42 +0200)] 
mkosi-tools: Remove unnecessary directory

2 months agomkosi-tools: Introduce debug profile and move perf to it
Daan De Meyer [Thu, 29 May 2025 08:36:29 +0000 (10:36 +0200)] 
mkosi-tools: Introduce debug profile and move perf to it

perf pulls in a ton of dependencies (> 100 extra packages on Fedora).
Let's introduce a separate debug profile and move perf to it to avoid
everyone having to pull in all these packages for a tool they most likely
won't use.

Add gdb as well while we're at it.

2 months agomkosi-tools: Add new gui profile
Daan De Meyer [Thu, 29 May 2025 08:29:56 +0000 (10:29 +0200)] 
mkosi-tools: Add new gui profile

Let's not install all the tools required to run with a gui by default
into the tools tree, as this is more of a niche use case.

2 months agoci: Use ext4 temporarily
Daan De Meyer [Thu, 29 May 2025 18:01:16 +0000 (20:01 +0200)] 
ci: Use ext4 temporarily

The commit causing https://lore.kernel.org/linux-fsdevel/20250115185608.GA2223535@zen.localdomain/T/#u
got backported to the ubuntu stable kernel. While it has been reverted
upstream, the revert still hasn't reached the ubuntu stable kernel,
so let's use ext4 temporarily until that's the case.