]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
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.

6 months agoaction: Only install package managers and debian-keyring
Daan De Meyer [Tue, 21 Jan 2025 21:41:06 +0000 (22:41 +0100)] 
action: Only install package managers and debian-keyring

Instead, let's recommend users to use the default tools tree to get
their dependencies which is generally recommended as it reduces their
dependencies on what's installed on the host system.

6 months agocentos: Install erofs-utils in tools tree
Daan De Meyer [Tue, 21 Jan 2025 17:41:08 +0000 (18:41 +0100)] 
centos: Install erofs-utils in tools tree

6 months agomkosi-tools: Install systemd-ukify on Azure, CentOS and Fedora
Daan De Meyer [Tue, 21 Jan 2025 16:41:27 +0000 (17:41 +0100)] 
mkosi-tools: Install systemd-ukify on Azure, CentOS and Fedora

systemd-ukify is not architecture dependant anymore so let's always
install it. It's also packaged in CentOS Stream and Azure Linux so
let's install it there as well.

6 months agomkosi-tools: Fix architecture condition
Daan De Meyer [Tue, 21 Jan 2025 16:40:30 +0000 (17:40 +0100)] 
mkosi-tools: Fix architecture condition

We need to match the architecture of the tools tree we're building,
not the host architecture. In practice these will always be the same
so this doesn't actually change behavior.

6 months agoMake mkosi available inside mkosi sandbox via zipapp
Daan De Meyer [Wed, 22 Jan 2025 11:32:35 +0000 (12:32 +0100)] 
Make mkosi available inside mkosi sandbox via zipapp

Currently, mkosi has to be installed outside of /usr when using a
tools tree with mkosi sandbox to make it available inside mkosi
sandbox. Let's remove this restriction by packaging up the host's
mkosi as a zipapp and making the zipapp available in the sandbox.

6 months agoRemove mkosi.types to avoid conflict with standard library types.py
Daan De Meyer [Wed, 22 Jan 2025 11:27:52 +0000 (12:27 +0100)] 
Remove mkosi.types to avoid conflict with standard library types.py

The process related stuff is moved to run.py and the rest is moved
to util.py

6 months agoSpecial case tools image in keyring_cache() and metadata_cache()
Daan De Meyer [Wed, 22 Jan 2025 11:15:42 +0000 (12:15 +0100)] 
Special case tools image in keyring_cache() and metadata_cache()

Similar to cache_tree_paths(), give the metadata and keyring cache
for the default tools tree a custom name to avoid conflicts with the
other image caches.

6 months agoMove keyring_cache() and metadata_cache() next to cache_tree_paths()
Daan De Meyer [Wed, 22 Jan 2025 11:13:13 +0000 (12:13 +0100)] 
Move keyring_cache() and metadata_cache() next to cache_tree_paths()

6 months agoMake Register= a feature
Daan De Meyer [Wed, 22 Jan 2025 09:54:55 +0000 (10:54 +0100)] 
Make Register= a feature

By default, we want to register if machined is available and not
otherwise so let's make Register= a feature that defaults to "auto".

6 months agoRework crypto-policies again
Daan De Meyer [Tue, 21 Jan 2025 21:21:38 +0000 (22:21 +0100)] 
Rework crypto-policies again

Currently, we only write our own rpm-sequoia crypto policy if one
isn't provided by the tools tree. However, the centos stream 10 crypto
policy is restrictive enough that we can't build older centos releases
or opensuse images with it.

To fix this, let's switch things around again and go back to copying
the crypto policy from the tools tree into the sandbox tree and modifying
the rpm-sequoia policy to fit our needs. For mkosi sandbox, we do reuse
the crypto policies from the tools tree unmodified.

Note that we copy from /usr/share/crypto-policies/DEFAULT instead of
/etc/crypto-policies, as when using mkosi sandbox, we get
/etc/crypto-policies from the host which is full of symlink's to the host's
/usr, even if the tools tree might not be using crypto policies at all.

We also rename finalize_crypto_mounts() to finalize_certificate_mounts()
as it only handles certificates now.

6 months agoappease spellchecker
Daan De Meyer [Tue, 21 Jan 2025 21:33:45 +0000 (22:33 +0100)] 
appease spellchecker

6 months agoUse Initrds= for qemu direct kernel boot as a fallback
Daan De Meyer [Tue, 21 Jan 2025 15:03:28 +0000 (16:03 +0100)] 
Use Initrds= for qemu direct kernel boot as a fallback

Fixes #3180

6 months agodocs: Make more clear that the SHA256SUMS is prefixed with the output
Daan De Meyer [Tue, 21 Jan 2025 15:08:51 +0000 (16:08 +0100)] 
docs: Make more clear that the SHA256SUMS is prefixed with the output

Fixes #3027

6 months agoMerge pull request #3397 from DaanDeMeyer/signed
Daan De Meyer [Tue, 21 Jan 2025 15:05:44 +0000 (16:05 +0100)] 
Merge pull request #3397 from DaanDeMeyer/signed

Add support for pre-signed Bootloader variants without shim

6 months agoParse mkosi.profiles in included configuration
Daan De Meyer [Tue, 21 Jan 2025 14:35:19 +0000 (15:35 +0100)] 
Parse mkosi.profiles in included configuration

Fixes #3174

6 months agoAdd support for pre-signed Bootloader variants without shim 3397/head
Daan De Meyer [Tue, 21 Jan 2025 11:58:28 +0000 (12:58 +0100)] 
Add support for pre-signed Bootloader variants without shim

Currently we only pick up pre-signed bootloader binaries if
ShimBootloader=signed is configured. Let's also add support for
installing pre-signed bootloader binaries without using shim.

6 months agoDrop out of date paragraph about not installing grub for EFI
Daan De Meyer [Tue, 21 Jan 2025 11:55:14 +0000 (12:55 +0100)] 
Drop out of date paragraph about not installing grub for EFI

6 months agoMerge pull request #3395 from DaanDeMeyer/addon
Daan De Meyer [Tue, 21 Jan 2025 11:22:15 +0000 (12:22 +0100)] 
Merge pull request #3395 from DaanDeMeyer/addon

kernel-install: Various fixes

6 months agomkosi-initrd: Simplify 3395/head
Daan De Meyer [Tue, 21 Jan 2025 09:26:19 +0000 (10:26 +0100)] 
mkosi-initrd: Simplify

kernel_image is not optional so get rid of the if check.

6 months agomkosi-initrd: Add extra logging to kernel-install plugin
Daan De Meyer [Tue, 21 Jan 2025 09:26:05 +0000 (10:26 +0100)] 
mkosi-initrd: Add extra logging to kernel-install plugin

6 months agomkosi-addon: Skip if provided kernel image is not a UKI
Daan De Meyer [Tue, 21 Jan 2025 09:13:49 +0000 (10:13 +0100)] 
mkosi-addon: Skip if provided kernel image is not a UKI

6 months agoReduce duplication between mkosi-initrd and mkosi-addon
Daan De Meyer [Tue, 21 Jan 2025 09:15:29 +0000 (10:15 +0100)] 
Reduce duplication between mkosi-initrd and mkosi-addon

6 months agoSimplify KernelInstallContext.parse() a little
Daan De Meyer [Tue, 21 Jan 2025 09:15:00 +0000 (10:15 +0100)] 
Simplify KernelInstallContext.parse() a little

6 months agoqemu: Look for /usr/libexec/qemu-kvm as well
Daan De Meyer [Tue, 21 Jan 2025 09:40:47 +0000 (10:40 +0100)] 
qemu: Look for /usr/libexec/qemu-kvm as well

On CentOS Stream, only /usr/libexec/qemu-kvm is available.

6 months agoSkip firmware descriptions without nvram-template
Daan De Meyer [Tue, 21 Jan 2025 08:37:48 +0000 (09:37 +0100)] 
Skip firmware descriptions without nvram-template

6 months agoMerge pull request #3393 from behrmann/addonfixups
Daan De Meyer [Mon, 20 Jan 2025 22:14:05 +0000 (23:14 +0100)] 
Merge pull request #3393 from behrmann/addonfixups

Addon fixups

6 months agoman: Move plugin sections under the kernel-install section 3393/head
Jörg Behrmann [Mon, 20 Jan 2025 16:32:22 +0000 (17:32 +0100)] 
man: Move plugin sections under the kernel-install section

6 months agoman: Generate mkosi-addon man page as well
Jörg Behrmann [Mon, 20 Jan 2025 16:31:57 +0000 (17:31 +0100)] 
man: Generate mkosi-addon man page as well

6 months agoAdd mkosi-addon and kernel-install plugin
Luca Boccassi [Fri, 6 Dec 2024 00:28:13 +0000 (00:28 +0000)] 
Add mkosi-addon and kernel-install plugin

Add new mkosi-addon and kernel-install plugin to build local
customizations into an EFI addon.

This allows us to move closer to the desired goal of having
universal UKIs, built by vendors, used together with locally
built enhancements.

6 months agoUse $HOME in current_home_dir() regardless of whether we're in it or not
Daan De Meyer [Mon, 20 Jan 2025 10:37:38 +0000 (11:37 +0100)] 
Use $HOME in current_home_dir() regardless of whether we're in it or not

If $HOME is set, let's always use it as a fallback if we're not running
from a home directory.

6 months agoEnforce that images with Overlay=yes only add files
Daan De Meyer [Mon, 20 Jan 2025 09:42:08 +0000 (10:42 +0100)] 
Enforce that images with Overlay=yes only add files

Any extension images built with Overlay=yes should never override
files in the base image, so let's add some enforcement to make
sure that's the case by automatically removing files that already
exist in the base image.

6 months agoRevert "action: Fix up $PATH as a workaround"
Daan De Meyer [Mon, 20 Jan 2025 11:30:29 +0000 (12:30 +0100)] 
Revert "action: Fix up $PATH as a workaround"

Issue was fixed in a new image.

This reverts commit 49832f6c2af0f7ef0a458d1e0795ad1854ecd863.

6 months agoUse os.walk() to remove empty directories
Daan De Meyer [Mon, 20 Jan 2025 07:25:14 +0000 (08:25 +0100)] 
Use os.walk() to remove empty directories