]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Add a keyring cache and use it for Arch Linux 3366/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 15 Jan 2025 22:07:07 +0000 (23:07 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 16 Jan 2025 09:23:45 +0000 (10:23 +0100)
commitbbd04569611c50e1f68070390e1a1b57db8a2a92
tree46d2f61f84283ab02a9a982ea519ca5230dfc5a8
parente9bcd196ecdb159765a43ce67e5898a8f3ed91f0
Add a keyring cache and use it for Arch Linux

Currently, the Arch keyring from the host or tools tree is always
used directly without any option to modify it (except by modifying
it directly on the host or in the tools tree). We also don't support
RepositoryKeyFetch= for the Arch Linux keyring and it's one of the
sources of annoying mounts outside of /usr which complicates
"mkosi sandbox".

Let's improve the situation by switching to our own pacman keyring
instead of using the one from the tools tree or host. Instead, we'll
only use /usr/share/pacman/keyrings from the host or tools tree to
populate the keyring we maintain ourselves. Users can extend the
keyring created by mkosi with their own keys via sandbox trees. If
RepositoryKeyFetch= is enabled, we'll download the archlinux-keyring
package and extract the keyring from there into the sandbox.

The keyring cache is maintained together with the repository metadata
cache. The only difference is that sync_repository_metadata() will
update the global package cache whereas the keyring directory is always
maintained per cache directory instead of globally.

We take the opportunity to stop using Michel's kernel-utils ppa with a
more recent archlinux-keyring package in favor of enabling
RepositoryKeyFetch= by default for Arch builds on Ubuntu.
15 files changed:
action.yaml
mkosi.conf.d/20-ubuntu/mkosi.conf.d/20-jammy.conf [deleted file]
mkosi.conf.d/20-ubuntu/mkosi.sandbox/etc/apt/sources.list.d/kernel-utils.sources [deleted file]
mkosi.prepare.chroot [deleted file]
mkosi/__init__.py
mkosi/archive.py
mkosi/config.py
mkosi/context.py
mkosi/distributions/__init__.py
mkosi/distributions/arch.py
mkosi/installer/__init__.py
mkosi/installer/pacman.py
mkosi/mounts.py
mkosi/resources/man/mkosi.1.md
mkosi/resources/mkosi-tools/mkosi.prepare.chroot [deleted file]