]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
6 months agoAdd "defer" setting for Verity 3466/head
Daan De Meyer [Mon, 3 Feb 2025 16:22:30 +0000 (17:22 +0100)] 
Add "defer" setting for Verity

This defers the creation of the verity-sig partition which is useful
when doing offline signing.

6 months ago Support unsigned verity backed extension/portable images
Martin Hundebøll [Tue, 28 Jan 2025 20:35:26 +0000 (21:35 +0100)] 
 Support unsigned verity backed extension/portable images

Building an unsigned extension image with verity hashes provides data
integrity without needing a certificate on the target machine.

Note that systemd-dissect and systemd-sysext doesn't automatically
use the verity data has partition for validation. Both tools enables
validation if the user.verity.roothash xattr is set for the image.
For systemd-dissect, one can use the --root-hash option to enable the
validation.

The root hash can be obtained by concatenating the partition uuid's for
the root and the root-verity partitions.

6 months agoDocumentation fix
Daan De Meyer [Tue, 4 Feb 2025 10:16:01 +0000 (11:16 +0100)] 
Documentation fix

6 months agoarch: Bump initrd size
Daan De Meyer [Tue, 4 Feb 2025 11:18:52 +0000 (12:18 +0100)] 
arch: Bump initrd size

6 months agoDrop two unneeded calls to umask()
Daan De Meyer [Tue, 4 Feb 2025 09:57:04 +0000 (10:57 +0100)] 
Drop two unneeded calls to umask()

Both these commands write temporary files to the workspace which
are not written to the image, so no need to care about the umask.

6 months agocompletion: complete paths after verb for zsh
Jörg Behrmann [Mon, 3 Feb 2025 11:57:05 +0000 (12:57 +0100)] 
completion: complete paths after verb for zsh

6 months agocompletion: complete paths after verb for bash
Jörg Behrmann [Mon, 3 Feb 2025 14:22:19 +0000 (15:22 +0100)] 
completion: complete paths after verb for bash

6 months agoDrop debug message about not including firmware
Daan De Meyer [Tue, 4 Feb 2025 09:44:16 +0000 (10:44 +0100)] 
Drop debug message about not including firmware

Too noisy in CI, especially on Arch where we install all firmware
so let's drop it.

6 months agomkosi-initrd: Add extra kernel modules
Daan De Meyer [Mon, 3 Feb 2025 14:29:58 +0000 (15:29 +0100)] 
mkosi-initrd: Add extra kernel modules

All this stuff gets loaded by udev on my laptop, isn't huge, and
doesn't pull in any firmware, so let's add these to the list of
kernel modules.

6 months agocompletion: complete paths after verb for fish
Jörg Behrmann [Mon, 3 Feb 2025 09:19:44 +0000 (10:19 +0100)] 
completion: complete paths after verb for fish

6 months agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Sat, 1 Feb 2025 22:14:45 +0000 (22:14 +0000)] 
build(deps): bump redhat-plumbers-in-action/differential-shellcheck

Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.4.0 to 5.5.1.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/cc6721c45a8800cc666de45493545a07a638d121...5fa026e4797665181a0f7c6fa4a73c09348ae78c)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
6 months agobuild(deps): bump github/codeql-action from 3.28.0 to 3.28.8
dependabot[bot] [Sat, 1 Feb 2025 22:14:43 +0000 (22:14 +0000)] 
build(deps): bump github/codeql-action from 3.28.0 to 3.28.8

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.0 to 3.28.8.
- [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/48ab28a6f5dbc2a99bf1e0131198dd8f1df78169...dd746615b3b9d728a6a37ca2045b68ca76d4841a)

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

Signed-off-by: dependabot[bot] <support@github.com>
6 months agoBump version to 26~devel
Daan De Meyer [Fri, 31 Jan 2025 09:32:22 +0000 (10:32 +0100)] 
Bump version to 26~devel

6 months agoRelease 25.3 v25.3
Daan De Meyer [Fri, 31 Jan 2025 09:32:20 +0000 (10:32 +0100)] 
Release 25.3

6 months agoMerge pull request #3455 from labichn/universal-secure-boot
Daan De Meyer [Thu, 30 Jan 2025 17:04:21 +0000 (18:04 +0100)] 
Merge pull request #3455 from labichn/universal-secure-boot

Make secure boot keys/crts/source config universal

6 months agoUpdate docs for universal secure boot/verity/pcr creds/sources 3455/head
Nick Labich [Thu, 30 Jan 2025 16:06:38 +0000 (11:06 -0500)] 
Update docs for universal secure boot/verity/pcr creds/sources

6 months agoMerge pull request #3451 from DaanDeMeyer/overlay
Jörg Behrmann [Thu, 30 Jan 2025 15:07:47 +0000 (16:07 +0100)] 
Merge pull request #3451 from DaanDeMeyer/overlay

Fix condition when removing duplicate files from the overlay

6 months agoSkip files outside of known paths for extension outputs 3451/head
Daan De Meyer [Thu, 30 Jan 2025 14:24:22 +0000 (15:24 +0100)] 
Skip files outside of known paths for extension outputs

6 months agoUse directory in user's home as output directory if possible
Daan De Meyer [Thu, 30 Jan 2025 12:38:03 +0000 (13:38 +0100)] 
Use directory in user's home as output directory if possible

Otherwise, if the user's home is on a separate partition, we have to
do a very expensive copy to /var/tmp.

6 months agoFix condition when removing duplicate files from the overlay
Daan De Meyer [Wed, 29 Jan 2025 20:37:02 +0000 (21:37 +0100)] 
Fix condition when removing duplicate files from the overlay

6 months agoCalculate PE section size correctly
Daan De Meyer [Wed, 29 Jan 2025 13:38:34 +0000 (14:38 +0100)] 
Calculate PE section size correctly

6 months agoconfig: add mkosi-addon
Luca Boccassi [Wed, 29 Jan 2025 12:42:02 +0000 (12:42 +0000)] 
config: add mkosi-addon

Otherwise it fails:

$ mkosi --include=mkosi-addon
‣ mkosi-addon does not exist

6 months agoMerge pull request #3446 from DaanDeMeyer/have-cache
Jörg Behrmann [Wed, 29 Jan 2025 12:47:50 +0000 (13:47 +0100)] 
Merge pull request #3446 from DaanDeMeyer/have-cache

Various cache fixes

6 months agoDon't call have_cache() in reuse_cache() 3446/head
Daan De Meyer [Tue, 28 Jan 2025 19:47:30 +0000 (20:47 +0100)] 
Don't call have_cache() in reuse_cache()

By the time reuse_cache() is called, we've already cleaned up old
cached images if needed, so just check if they still exist and reuse
them if they do.

6 months agoMake sure previous cache entries are gone in save_cache()
Daan De Meyer [Tue, 28 Jan 2025 19:47:16 +0000 (20:47 +0100)] 
Make sure previous cache entries are gone in save_cache()

6 months agoReplace check_uid with a "tools" image check in have_cache()
Daan De Meyer [Tue, 28 Jan 2025 19:18:36 +0000 (20:18 +0100)] 
Replace check_uid with a "tools" image check in have_cache()

We have access to the config object in have_cache() and this argument
is specifically intended to be used whenever we pass the default tools
tree to have_cache(), so let's just do the check based on config.image
in have_cache() itself.

6 months agoTreat terminal as dumb if either stdout or stderr is not a tty
Daan De Meyer [Tue, 28 Jan 2025 20:09:11 +0000 (21:09 +0100)] 
Treat terminal as dumb if either stdout or stderr is not a tty

Fixes #3445

6 months agoMake secure boot keys/crts/source config universal
Nick Labich [Tue, 28 Jan 2025 20:54:35 +0000 (15:54 -0500)] 
Make secure boot keys/crts/source config universal

6 months agoFix verity signature check in case keys are configured
Martin Hundebøll [Mon, 27 Jan 2025 14:45:01 +0000 (15:45 +0100)] 
Fix verity signature check in case keys are configured

The repart json output includes the architecture in the partiton type
string, so the same must be included when checking for a verity
signature partition.

Example repart output:
{
    "type": "usr-x86-64-verity-sig",
    "label": "image_20250127144324_verity_sig",
    "uuid": "ae4819c0-d8e8-4c11-a140-af81d63db968",
    "partno": 1,
    "file": "/home/mheb/git/os/mkosi.repart/10-usr-verity-sig.conf",
    "node": "/work/var/cache/mkosi/mkosi-workspace-igi4aky0/staging/image_20250127144324.raw2",
    "offset": 537919488,
    "old_size": 16384,
    "raw_size": 16384,
    "old_padding": 0,
    "raw_padding": 0,
    "activity": "unchanged",
    "roothash": "TBD",
    "split_path": "/work/var/cache/mkosi/mkosi-workspace-igi4aky0/staging/image_20250127144324.usr-x86-64-verity-sig.ae4819c0d8e84c11a140af81d63db968.raw"
}

6 months agomkosi-sandbox: Improve formatting of error messages
Daan De Meyer [Tue, 28 Jan 2025 14:29:31 +0000 (15:29 +0100)] 
mkosi-sandbox: Improve formatting of error messages

6 months agoMove want_uki() check out of build_uki_profiles()
Daan De Meyer [Tue, 28 Jan 2025 12:37:54 +0000 (13:37 +0100)] 
Move want_uki() check out of build_uki_profiles()

Otherwise the function is skipped in make_uki() even though it should
never be skipped in that case if there are UKI profiles defined.

6 months agomkosi-initrd: handle PermissionError when reading /etc/crypttab
Antonio Alvarez Feijoo [Tue, 28 Jan 2025 07:25:13 +0000 (08:25 +0100)] 
mkosi-initrd: handle PermissionError when reading /etc/crypttab

Usually /etc/crypttab has 600 permissions, so display a warning to non-root
users rather than unhandling a PermissionError exception.

6 months agoMerge pull request #3436 from DaanDeMeyer/tools
Daan De Meyer [Mon, 27 Jan 2025 18:44:04 +0000 (19:44 +0100)] 
Merge pull request #3436 from DaanDeMeyer/tools

Tools tree improvements

6 months agomkosi-tools: Drop fish and zsh 3436/head
Daan De Meyer [Mon, 27 Jan 2025 14:05:45 +0000 (15:05 +0100)] 
mkosi-tools: Drop fish and zsh

These are a bit too exquisite to have in the default tools tree and
we don't start a shell in mkosi-sandbox by default anymore, so let's
stick to just having bash in the default tools tree.

6 months agomkosi-tools: Stop installing dnf on Azure,OpenSUSE,Fedora
Daan De Meyer [Mon, 27 Jan 2025 14:00:01 +0000 (15:00 +0100)] 
mkosi-tools: Stop installing dnf on Azure,OpenSUSE,Fedora

Let's stop installing dnf on in tools trees of these distributions
and only install dnf5.

Simplify the documentation of installed dnf packages while we're at it.

6 months agozypper: pass --releasever option
Antonio Alvarez Feijoo [Mon, 27 Jan 2025 13:30:31 +0000 (14:30 +0100)] 
zypper: pass --releasever option

zypper allows to use the `$releasever` variable in repo URLs (see zypper(8) man
page). When mkosi uses zypper repos from the host instead of the default ones,
this variable needs to be replaced with the host's `VERSION_ID`, otherwise repo
URLs are incomplete.

6 months agoLog command line for abnormal signals
Daan De Meyer [Mon, 27 Jan 2025 10:10:13 +0000 (11:10 +0100)] 
Log command line for abnormal signals

If we're not killed by SIGINT or SIGTERM, let's log the command line
as in this scenario it's very likely the process we were running crashed
with SIGABRT or SIGSEGV.

6 months agoopensuse: fix package name: btrfs-progs -> btrfsprogs
Antonio Alvarez Feijoo [Mon, 27 Jan 2025 09:20:17 +0000 (10:20 +0100)] 
opensuse: fix package name: btrfs-progs -> btrfsprogs

This error was not visible enough because zypper can find it anyway:

```
'btrfs-progs' not found in package names. Trying capabilities.
```

6 months agoMerge pull request #3429 from DaanDeMeyer/match
Jörg Behrmann [Sat, 25 Jan 2025 23:00:05 +0000 (00:00 +0100)] 
Merge pull request #3429 from DaanDeMeyer/match

Check if list matches are empty if empty string is matched against

6 months agomkosi-initrd: Add two more modules
Daan De Meyer [Sat, 25 Jan 2025 21:28:21 +0000 (22:28 +0100)] 
mkosi-initrd: Add two more modules

Three more generic modules that are needed in the initrd.

- mxm-wmi is a standard for switchable laptop graphics
- usb-storage is obviously for USB storage devices
- partport (https://docs.kernel.org/admin-guide/parport.html)
  seems generic enough that we should include it in the initrd.

6 months agotest_config: Reduce the number of tests 3429/head
Daan De Meyer [Sat, 25 Jan 2025 17:49:20 +0000 (18:49 +0100)] 
test_config: Reduce the number of tests

Let's not run unnecessary tests that don't give any meaningful extra
coverage.

6 months agoCheck if list matches are empty if empty string is matched against
Daan De Meyer [Sat, 25 Jan 2025 17:17:53 +0000 (18:17 +0100)] 
Check if list matches are empty if empty string is matched against

If we do something like

```
[Match]
Profiles=

...
```

It should succeed if the list of profiles is empty, so let's implement that.

6 months agoThe dpkg architecture name for loongarch64 is loong64
Luca Boccassi [Sat, 25 Jan 2025 10:45:17 +0000 (10:45 +0000)] 
The dpkg architecture name for loongarch64 is loong64

Because otherwise it was too loong

6 months agoUse shutil.copy() to copy ovmf variables
Daan De Meyer [Sat, 25 Jan 2025 08:51:59 +0000 (09:51 +0100)] 
Use shutil.copy() to copy ovmf variables

shutil.copy2() isn't required here, we only care about the contents,
not the metadata of the file.

6 months agoUse become_root_cmd() when running systemd-repart in run_shell() as well
Daan De Meyer [Fri, 24 Jan 2025 19:12:24 +0000 (20:12 +0100)] 
Use become_root_cmd() when running systemd-repart in run_shell() as well

systemd-repart's --image switch requires root privileges as well, so
let's use become_root_cmd() there as well.

6 months agoBump version to 26~devel
Daan De Meyer [Fri, 24 Jan 2025 14:27:06 +0000 (15:27 +0100)] 
Bump version to 26~devel

6 months agoRelease 25.2 v25.2
Daan De Meyer [Fri, 24 Jan 2025 14:27:05 +0000 (15:27 +0100)] 
Release 25.2

6 months agoUse all threads when relabelling files with setfiles
Daan De Meyer [Fri, 24 Jan 2025 13:25:27 +0000 (14:25 +0100)] 
Use all threads when relabelling files with setfiles

6 months agoMerge pull request #3423 from DaanDeMeyer/profile
Daan De Meyer [Fri, 24 Jan 2025 13:12:06 +0000 (14:12 +0100)] 
Merge pull request #3423 from DaanDeMeyer/profile

Only parse profiles from subimages and includes if those are dirs

6 months agoOnly parse profiles from subimages and includes if those are dirs 3423/head
Daan De Meyer [Fri, 24 Jan 2025 11:43:23 +0000 (12:43 +0100)] 
Only parse profiles from subimages and includes if those are dirs

6 months agoMake sure all config paths are absolute
Daan De Meyer [Fri, 24 Jan 2025 12:04:45 +0000 (13:04 +0100)] 
Make sure all config paths are absolute

With all the chdir() we do while parsing configuration, let's make
sure our config paths are absolute so that they don't suddenly
change meaning when we chdir().

6 months agoBump version to 26~devel
Daan De Meyer [Fri, 24 Jan 2025 09:05:35 +0000 (10:05 +0100)] 
Bump version to 26~devel

6 months agoRelease 25.1 v25.1
Daan De Meyer [Fri, 24 Jan 2025 09:05:32 +0000 (10:05 +0100)] 
Release 25.1

6 months agoFix accessing "name" field in busctl json output
Daan De Meyer [Fri, 24 Jan 2025 08:57:54 +0000 (09:57 +0100)] 
Fix accessing "name" field in busctl json output

Co-Authored-By: Nick Labich <nick@labich.org>
6 months agoMerge pull request #3420 from DaanDeMeyer/sandbox
Jörg Behrmann [Fri, 24 Jan 2025 09:00:28 +0000 (10:00 +0100)] 
Merge pull request #3420 from DaanDeMeyer/sandbox

Use resource_path() to access files in our own module

6 months agoUse resource_path() to access files in our own module 3420/head
Daan De Meyer [Thu, 23 Jan 2025 20:19:38 +0000 (21:19 +0100)] 
Use resource_path() to access files in our own module

__file__ doesn't work if mkosi is packaged up as a zipapp, let's
use resource_path() which is specifically intended to solve this
problem and works regardless of whether we're in a zipapp or not.

6 months agoRemove unused variable
Daan De Meyer [Fri, 24 Jan 2025 08:24:32 +0000 (09:24 +0100)] 
Remove unused variable

6 months agoBump initrd sizes
Daan De Meyer [Fri, 24 Jan 2025 08:22:58 +0000 (09:22 +0100)] 
Bump initrd sizes

We should add a more automated way to figure out why the size
increased but for now let's bump the sizes.

6 months agoDo not check uid in have_cache() for default tools tree
Daan De Meyer [Thu, 23 Jan 2025 17:02:28 +0000 (18:02 +0100)] 
Do not check uid in have_cache() for default tools tree

If the tools tree has a cache, it's complete, we're not going to
modify it anymore, and it doesn't matter whether the files in it
are owned by root or an unprivileged user, we'll be able to execute
binaries from it regardless, so let's not check the ownership when
we invoke have_cache() on it.

6 months agoAdd fallback to sudo if run0 is not available
Daan De Meyer [Thu, 23 Jan 2025 16:59:37 +0000 (17:59 +0100)] 
Add fallback to sudo if run0 is not available

6 months agosandbox: Show better error on ENOSYS
Daan De Meyer [Thu, 23 Jan 2025 16:46:52 +0000 (17:46 +0100)] 
sandbox: Show better error on ENOSYS

6 months agoman: document kernel baseline for mkosi
Jörg Behrmann [Thu, 23 Jan 2025 15:53:29 +0000 (16:53 +0100)] 
man: document kernel baseline for mkosi

6 months agoCreate zipapp for mkosi sandbox like we do in generate-zipapp.sh
Daan De Meyer [Thu, 23 Jan 2025 14:27:48 +0000 (15:27 +0100)] 
Create zipapp for mkosi sandbox like we do in generate-zipapp.sh

Otherwise we run into ModuleNotFoundError trying to run a zipapp
created from a packaged version of mkosi. This is the same
workaround that's already used in generate-zipapp.sh.

6 months agonews: fix typo detected by Lintian
Luca Boccassi [Thu, 23 Jan 2025 14:18:06 +0000 (14:18 +0000)] 
news: fix typo detected by Lintian

mkosi: typo-in-manual-page "allows to" "allows one to" [usr/share/man/man7/mkosi.news.7.gz:111]

6 months agoRemove depmod check in check_tools()
Daan De Meyer [Thu, 23 Jan 2025 13:14:43 +0000 (14:14 +0100)] 
Remove depmod check in check_tools()

We run depmod inside the image now, so drop the check for it in
check_tools().

6 months agoBump version to 26~devel
Daan De Meyer [Thu, 23 Jan 2025 12:35:44 +0000 (13:35 +0100)] 
Bump version to 26~devel

6 months agoRelease 25 v25
Daan De Meyer [Thu, 23 Jan 2025 12:35:42 +0000 (13:35 +0100)] 
Release 25

6 months agoReplace all 257~devel versions with 257
Daan De Meyer [Thu, 23 Jan 2025 12:07:31 +0000 (13:07 +0100)] 
Replace all 257~devel versions with 257

6 months agoMerge pull request #3411 from DaanDeMeyer/news
Daan De Meyer [Thu, 23 Jan 2025 12:03:49 +0000 (13:03 +0100)] 
Merge pull request #3411 from DaanDeMeyer/news

Update NEWS

6 months agoUpdate NEWS 3411/head
Daan De Meyer [Thu, 23 Jan 2025 11:55:51 +0000 (12:55 +0100)] 
Update NEWS

6 months agodocs: Remove outdated paragraph
Daan De Meyer [Thu, 23 Jan 2025 11:53:15 +0000 (12:53 +0100)] 
docs: Remove outdated paragraph

ToolsTree= is now just a regular universal setting so no need to
document it as being special in the ToolsTree= documentation.

6 months agoMerge pull request #3409 from DaanDeMeyer/tools
Daan De Meyer [Thu, 23 Jan 2025 11:50:29 +0000 (12:50 +0100)] 
Merge pull request #3409 from DaanDeMeyer/tools

Various tools tree fixes

6 months agoAdd mkosi.pkgcache
Jörg Behrmann [Thu, 23 Jan 2025 10:01:40 +0000 (11:01 +0100)] 
Add mkosi.pkgcache

6 months agoRemove unneeded assert
Daan De Meyer [Thu, 23 Jan 2025 11:16:57 +0000 (12:16 +0100)] 
Remove unneeded assert

6 months agoAdd option to save the BuildSourcesEphemeral overlay.
Jörg Behrmann [Wed, 8 Jan 2025 15:14:33 +0000 (16:14 +0100)] 
Add option to save the BuildSourcesEphemeral overlay.

6 months agomkosi-tools: Fix docs 3409/head
Daan De Meyer [Thu, 23 Jan 2025 10:10:26 +0000 (11:10 +0100)] 
mkosi-tools: Fix docs

6 months agomkosi-tools: Install virt-firmware on Debian/Kali/Ubuntu/OpenSUSE
Daan De Meyer [Thu, 23 Jan 2025 10:20:47 +0000 (11:20 +0100)] 
mkosi-tools: Install virt-firmware on Debian/Kali/Ubuntu/OpenSUSE

6 months agomkosi-tools: Install pkcs11-provider on CentOS Stream 10
Daan De Meyer [Thu, 23 Jan 2025 10:16:17 +0000 (11:16 +0100)] 
mkosi-tools: Install pkcs11-provider on CentOS Stream 10

6 months agomkosi-tools: Move linux-perf package definition into shared logic
Daan De Meyer [Thu, 23 Jan 2025 10:02:59 +0000 (11:02 +0100)] 
mkosi-tools: Move linux-perf package definition into shared logic

6 months agoUpdate NEWS
Daan De Meyer [Thu, 23 Jan 2025 10:00:36 +0000 (11:00 +0100)] 
Update NEWS

6 months agoSimplify crypto-policies copying
Daan De Meyer [Thu, 23 Jan 2025 08:12:14 +0000 (09:12 +0100)] 
Simplify crypto-policies copying

To make matters even more interesting, aside from a bunch of .txt
files in /usr/share/crypto-policies/DEFAULT, there's also the same
files in /usr/share/crypto-policies/back-ends/DEFAULT, but they do
have the .config extension there, so lets simplify the logic by
copying from that location.

6 months agoAdd support for FirmwareVariables=microsoft-mok
Daan De Meyer [Wed, 22 Jan 2025 16:11:56 +0000 (17:11 +0100)] 
Add support for FirmwareVariables=microsoft-mok

This new setting will use firmware variables with enrolled microsoft
keys and extend them with the required MOK variables to trust the
user's secure boot key/certificate.

Co-authored-by: Luca Boccassi <luca.boccassi@gmail.com>
6 months agotests: don't fail directory CI if lvm2-monitor.service fails
Jörg Behrmann [Tue, 21 Jan 2025 14:57:19 +0000 (15:57 +0100)] 
tests: don't fail directory CI if lvm2-monitor.service fails

This service sometimes fails in CI for the arch:directory combination, e.g.

2025-01-21T12:07:33.4370559Z [   14.125731] mkosi-check-and-shutdown.sh[419]: + systemctl --failed --no-legend
2025-01-21T12:07:33.4380022Z [   14.126655] mkosi-check-and-shutdown.sh[420]: + tee /failed-services
2025-01-21T12:07:33.4714973Z [   14.160448] mkosi-check-and-shutdown.sh[420]: ● lvm2-monitor.service not-found failed failed lvm2-monitor.service
2025-01-21T12:07:33.4751355Z [   14.164135] mkosi-check-and-shutdown.sh[418]: + [[ ! -s /failed-services ]]

This is the first time this appears in the partcular boot's logs and we always
ignore it and carry on. Let's sidestep checking whether it is this particular
error by masking the unit.

A possible reason might be that it gets pulled in by udev if a test using LVM
runs first.

6 months agoMerge pull request #3403 from DaanDeMeyer/fixes
Daan De Meyer [Wed, 22 Jan 2025 17:14:28 +0000 (18:14 +0100)] 
Merge pull request #3403 from DaanDeMeyer/fixes

Various fixes

6 months agoDon't insist on pre-signed EFI binaries when ShimBootloader == signed 3403/head
Daan De Meyer [Wed, 22 Jan 2025 16:07:09 +0000 (17:07 +0100)] 
Don't insist on pre-signed EFI binaries when ShimBootloader == signed

The whole point of shim is that you can use a presigned shim with
locally signed EFI binaries if the local key is enrolled in MOK, so
don't insist on presigned EFI binaries when a signed shim is requested.

Instead the new "signed" variants of the Bootloader= option can be used
to still force installation of presigned EFI binaries.

6 months agoFix copying of crypto policies from tools tree
Daan De Meyer [Wed, 22 Jan 2025 16:06:16 +0000 (17:06 +0100)] 
Fix copying of crypto policies from tools tree

These files should have the .config extension in /etc/crypto-policies,
but they have the .txt extension in /usr/share/crypto-policies.

6 months agoSimplify finalize_firmware_variables() a little
Daan De Meyer [Wed, 22 Jan 2025 15:54:28 +0000 (16:54 +0100)] 
Simplify finalize_firmware_variables() a little

6 months agoRemove unused argument from finalize_firmware_variables()
Daan De Meyer [Wed, 22 Jan 2025 15:35:02 +0000 (16:35 +0100)] 
Remove unused argument from finalize_firmware_variables()

6 months agoMerge pull request #3402 from DaanDeMeyer/ci
Daan De Meyer [Wed, 22 Jan 2025 14:43:34 +0000 (15:43 +0100)] 
Merge pull request #3402 from DaanDeMeyer/ci

CI fixes

6 months agoci: Use mkosi sandbox to run the integration tests 3402/head
Daan De Meyer [Tue, 21 Jan 2025 19:21:03 +0000 (20:21 +0100)] 
ci: Use mkosi sandbox to run the integration tests

Using mkosi sandbox allows all the tools for the test logic themselves
to be executed from the tools tree as well.

6 months agotests: Setup logging properly
Daan De Meyer [Wed, 22 Jan 2025 09:14:09 +0000 (10:14 +0100)] 
tests: Setup logging properly

6 months agotests: Always pass process environment to mkosi
Daan De Meyer [Wed, 22 Jan 2025 08:58:00 +0000 (09:58 +0100)] 
tests: Always pass process environment to mkosi

Let's not override the entire environment when we need some extra
environment variables.

6 months agotests: Do not register test containers/vms with systemd-machined
Daan De Meyer [Wed, 22 Jan 2025 07:13:27 +0000 (08:13 +0100)] 
tests: Do not register test containers/vms with systemd-machined

6 months agotests: Remove privilege dropping for image builds
Daan De Meyer [Tue, 21 Jan 2025 22:33:37 +0000 (23:33 +0100)] 
tests: Remove privilege dropping for image builds

This just does not work reliably at all. We change uid/gid but keep
all the environment variables which is just a recipe for issues. Let's
enforce running everything as root if one wants to run the tests that
require root privileges.

6 months agoMove uid check back to have_cache()
Daan De Meyer [Tue, 21 Jan 2025 22:47:57 +0000 (23:47 +0100)] 
Move uid check back to have_cache()

We moved this to reuse_cache() before the introduction of mkosi-sandbox
because we would change uids during execution. Now that we don't do that
anymore, we can move the check back to have_cache().

6 months agoci: Centralize package installation in unit-tests job
Daan De Meyer [Wed, 22 Jan 2025 10:08:39 +0000 (11:08 +0100)] 
ci: Centralize package installation in unit-tests job

Also get rid of the microsoft-prod.list hack by just not running
apt-get update anymore which avoids the need to remove the microsoft
repositories.

6 months agoci: Move grub2 for opensuse to mkosi tools tree packages
Daan De Meyer [Tue, 21 Jan 2025 19:13:36 +0000 (20:13 +0100)] 
ci: Move grub2 for opensuse to mkosi tools tree packages

6 months agoci: Add centos tools tree CI
Daan De Meyer [Tue, 21 Jan 2025 15:37:35 +0000 (16:37 +0100)] 
ci: Add centos tools tree CI

6 months agoci: Re-enable Arch with ubuntu tools build
Daan De Meyer [Tue, 21 Jan 2025 15:38:03 +0000 (16:38 +0100)] 
ci: Re-enable Arch with ubuntu tools build

Now that we'll fetch a recent keyring, we can re-enable this specific
combo

6 months agotests: Skip booting from directory in user namespace with single user
Daan De Meyer [Tue, 21 Jan 2025 19:18:15 +0000 (20:18 +0100)] 
tests: Skip booting from directory in user namespace with single user

We need newuidmap/newgidmap to be able to boot from a directory which
can't ever work in a user namespace with a single user so skip the
test in that case.