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

6 months agomypy: enable scripts_are_modules
Daan De Meyer [Mon, 20 Jan 2025 09:00:30 +0000 (10:00 +0100)] 
mypy: enable scripts_are_modules

Otherwise mypy errors on type checking multiple kernel-install
scripts in kernel-install/.

6 months agoMerge pull request #3386 from DaanDeMeyer/addon-initrd-empty
Daan De Meyer [Mon, 20 Jan 2025 07:23:36 +0000 (08:23 +0100)] 
Merge pull request #3386 from DaanDeMeyer/addon-initrd-empty

addon: Don't add initrd section if buildroot is empty

6 months agoRun modinfo from the tools tree when building a standalone extension image
Daan De Meyer [Sun, 19 Jan 2025 22:22:22 +0000 (23:22 +0100)] 
Run modinfo from the tools tree when building a standalone extension image

If we're building a standalone extension image, modinfo won't be
installed in the image buildroot, so run modinfo from the host
instead.

6 months agoPass in Context to functions in kmod.py
Daan De Meyer [Sun, 19 Jan 2025 22:10:14 +0000 (23:10 +0100)] 
Pass in Context to functions in kmod.py

Preparation for the next commit.

6 months agoImprove formatting of filter_kernel_modules()
Daan De Meyer [Sun, 19 Jan 2025 22:04:44 +0000 (23:04 +0100)] 
Improve formatting of filter_kernel_modules()

6 months agoaddon: Don't add initrd section if buildroot is empty 3386/head
Daan De Meyer [Sun, 19 Jan 2025 22:32:54 +0000 (23:32 +0100)] 
addon: Don't add initrd section if buildroot is empty

6 months agoDon't remove root directory when removing empty directories
Daan De Meyer [Sun, 19 Jan 2025 22:42:33 +0000 (23:42 +0100)] 
Don't remove root directory when removing empty directories

6 months agoci: Make kernel-install script checks more generic
Daan De Meyer [Sun, 19 Jan 2025 21:22:49 +0000 (22:22 +0100)] 
ci: Make kernel-install script checks more generic

Let's check all .install scripts in the kernel-install directory.

6 months agoMake sure addon initrds are compressed as well
Daan De Meyer [Sun, 19 Jan 2025 20:20:30 +0000 (21:20 +0100)] 
Make sure addon initrds are compressed as well

6 months agoInverse output format check for run_shell()
Daan De Meyer [Sun, 19 Jan 2025 19:50:36 +0000 (20:50 +0100)] 
Inverse output format check for run_shell()

6 months agoMake use of use_outer_compression() more
Daan De Meyer [Sun, 19 Jan 2025 19:45:18 +0000 (20:45 +0100)] 
Make use of use_outer_compression() more

6 months agoRemove empty directories from extension images
Daan De Meyer [Sun, 19 Jan 2025 19:02:42 +0000 (20:02 +0100)] 
Remove empty directories from extension images

6 months agoDon't check for populated OS root if Format == none
Daan De Meyer [Sun, 19 Jan 2025 19:11:20 +0000 (20:11 +0100)] 
Don't check for populated OS root if Format == none

Let's skip checking if the OS root is populated if Format == none
so that Format=none and Distribution=custom can be used to execute
arbitrary code in a build script without actually building an image.

6 months agoAllow adding kernel modules in extension images
Daan De Meyer [Sun, 19 Jan 2025 19:34:31 +0000 (20:34 +0100)] 
Allow adding kernel modules in extension images

When building standalone extension images (without Overlay=yes),
let's process kernel modules but not run depmod. depmod produces a
single monolithic file which means we can't extend it from an
extension image without overriding the base file.

6 months agoMerge pull request #3378 from DaanDeMeyer/addon
Daan De Meyer [Sun, 19 Jan 2025 17:42:03 +0000 (18:42 +0100)] 
Merge pull request #3378 from DaanDeMeyer/addon

Add kernel command line to addon

6 months agoAdd kernel command line to addon 3378/head
Daan De Meyer [Sun, 19 Jan 2025 16:58:05 +0000 (17:58 +0100)] 
Add kernel command line to addon

Let's allow adding making more than just initrd addons.

6 months agoRename initrd-addon to addon
Daan De Meyer [Sun, 19 Jan 2025 16:57:50 +0000 (17:57 +0100)] 
Rename initrd-addon to addon

6 months agoAdd ToolsTreeRelease= match
Daan De Meyer [Fri, 17 Jan 2025 15:46:40 +0000 (16:46 +0100)] 
Add ToolsTreeRelease= match

6 months agoUpdate NEWS
Daan De Meyer [Fri, 17 Jan 2025 11:31:07 +0000 (12:31 +0100)] 
Update NEWS

6 months agoMerge pull request #3373 from DaanDeMeyer/centos
Daan De Meyer [Fri, 17 Jan 2025 14:11:39 +0000 (15:11 +0100)] 
Merge pull request #3373 from DaanDeMeyer/centos

centos: epel-next does not exist anymore since CentOS Stream 10

6 months agocentos: epel-next does not exist anymore since CentOS Stream 10 3373/head
Daan De Meyer [Fri, 17 Jan 2025 13:05:26 +0000 (14:05 +0100)] 
centos: epel-next does not exist anymore since CentOS Stream 10

Detailed in https://discussion.fedoraproject.org/t/epel-10-proposal/44304.

6 months agocentos: Bump default image to CentOS Stream 10 as well
Daan De Meyer [Fri, 17 Jan 2025 13:05:08 +0000 (14:05 +0100)] 
centos: Bump default image to CentOS Stream 10 as well

6 months agoaction: Fix up $PATH as a workaround
Daan De Meyer [Fri, 17 Jan 2025 13:10:50 +0000 (14:10 +0100)] 
action: Fix up $PATH as a workaround

Can be removed once https://github.com/actions/runner-images/issues/11414
is addressed.

6 months agoMerge pull request #3371 from DaanDeMeyer/cache
Jörg Behrmann [Fri, 17 Jan 2025 10:30:06 +0000 (11:30 +0100)] 
Merge pull request #3371 from DaanDeMeyer/cache

Cache package manager in cache manifest again

6 months agoAdd package manager back to the cache manifest 3371/head
Daan De Meyer [Thu, 16 Jan 2025 23:07:07 +0000 (00:07 +0100)] 
Add package manager back to the cache manifest

As detailed in the previous commit, it's important to cache the
package manager used in the cache manifest. If we don't, we'll end
up reusing the wrong metadata cache which won't have any metadata in
it for the new package manager.

6 months agoRebuild default tools tree before cleaning up other images
Daan De Meyer [Thu, 16 Jan 2025 23:02:52 +0000 (00:02 +0100)] 
Rebuild default tools tree before cleaning up other images

It turns out we have to put the used package manager in the cache
manifest as the metadata cache needs to be refreshed if the package
manager used changes, otherwise the metadata cache will be reused but
the new package manager won't actually be able to find any metadata
since the metadata cache contains metadata for another package manager.

To avoid running into all the problems we had previously trying to do
this, we have to make sure that the default tools tree is always available
whenever we run have_cache() on a (non-default tools tree) image, so that
the package manager we decide to use to build the image is always the same.

To achieve that, we make sure to rebuild the tools tree before doing checks
and cleaning up other images when doing a regular build. This means whenever
we call have_cache() the default tools tree will be available if it is used.

6 months agoImprove cache manifest mismatch logging message
Daan De Meyer [Thu, 16 Jan 2025 23:01:56 +0000 (00:01 +0100)] 
Improve cache manifest mismatch logging message

6 months agofedora: Use a lower repository metadata expire time for rawhide
Daan De Meyer [Thu, 16 Jan 2025 21:42:23 +0000 (22:42 +0100)] 
fedora: Use a lower repository metadata expire time for rawhide

Let's mimick Fedora's own rawhide repository configuration and use
a metadata expire time of 6h when building rawhide images so that
we don't end up keeping stale repository metadata around for too
long which will result in dnf being unable to find certain packages
as they will have been replaced by a newer version in rawhide already.

6 months agoBump Arch initrd size again ...
Daan De Meyer [Thu, 16 Jan 2025 21:47:09 +0000 (22:47 +0100)] 
Bump Arch initrd size again ...

Seems like Arch is gaining a lot of weight lately in it's core
packages.

6 months agoMerge pull request #3368 from DaanDeMeyer/epel
Daan De Meyer [Thu, 16 Jan 2025 21:39:17 +0000 (22:39 +0100)] 
Merge pull request #3368 from DaanDeMeyer/epel

Various CentOS Stream improvements

6 months agocentos: Enable EPEL for c10s tools tree as well 3368/head
Daan De Meyer [Thu, 16 Jan 2025 13:53:16 +0000 (14:53 +0100)] 
centos: Enable EPEL for c10s tools tree as well

Now that EPEL exists for c10s, let's enable it for the c10s tools
tree as EPEL has distribution-gpg-keys which is crucial to be able
to use c10s as a tools tree.

6 months agoLook for the CentOS Stream official GPG in /etc/pki/rpm-gpg as well
Daan De Meyer [Thu, 16 Jan 2025 14:31:10 +0000 (15:31 +0100)] 
Look for the CentOS Stream official GPG in /etc/pki/rpm-gpg as well

Turns out the key names in /etc/pki/rpm-gpg are slightly different
so let's update the logic to search properly for both.

6 months agoOnly use a fallback in find_rpm_gpgkey() if one is defined
Daan De Meyer [Thu, 16 Jan 2025 14:30:54 +0000 (15:30 +0100)] 
Only use a fallback in find_rpm_gpgkey() if one is defined

6 months agoImprove find_rpm_gpgkey() declaration formatting
Daan De Meyer [Thu, 16 Jan 2025 14:30:37 +0000 (15:30 +0100)] 
Improve find_rpm_gpgkey() declaration formatting

6 months agoFix type of second overload of find_rpm_gpgkey()
Daan De Meyer [Thu, 16 Jan 2025 14:29:44 +0000 (15:29 +0100)] 
Fix type of second overload of find_rpm_gpgkey()

The return type is optional when we get any boolean that's not a
literal True, so widen the type to bool to fix that.

6 months agoaction: Stop populating pacman keyring
Daan De Meyer [Thu, 16 Jan 2025 09:30:19 +0000 (10:30 +0100)] 
action: Stop populating pacman keyring

Not required anymore now that mkosi does this itself.

6 months agoMerge pull request #3366 from DaanDeMeyer/keyring
Daan De Meyer [Thu, 16 Jan 2025 09:28:07 +0000 (10:28 +0100)] 
Merge pull request #3366 from DaanDeMeyer/keyring

Add a keyring cache and use it for Arch Linux

6 months agoAdd a keyring cache and use it for Arch Linux 3366/head
Daan De Meyer [Wed, 15 Jan 2025 22:07:07 +0000 (23:07 +0100)] 
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.

6 months agosandbox: Use dict to store bind mounts instead of set
Daan De Meyer [Wed, 15 Jan 2025 21:59:59 +0000 (22:59 +0100)] 
sandbox: Use dict to store bind mounts instead of set

dict guarantee iteration in insertion order, set does not which matters
in this specific case.

6 months agoIntroduce support for overriding system's DeviceTree
Bjorn Andersson [Thu, 29 Feb 2024 15:00:13 +0000 (16:00 +0100)] 
Introduce support for overriding system's DeviceTree

While experimenting with OS images on development boards where either
the bootloader doesn't load a Flattened DeviceTree Blob, or if one wants
to replace the one provided by the bootloader with a specific/new one
for development/experimentation/testing purposes, it's convenient to use
the OS-loaders ability to load a specific DeviceTree blob.

Add a new option to mkosi, to cause a specified DeviceTree blob to be
baked into the UKI, or copied into /boot and added to the systemd loader
entry.

As different distributions store the dtb files in different locations
the requested file is searched for in the locations spotted in Debian,
Fedora, Arch Linux packages (both from distro and kernel build system -
as these differs as well).

Resolves #2439
Based on initial effort by Manuel Traut.

Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
6 months agoAdd support for machined registration using varlink
Daan De Meyer [Wed, 15 Jan 2025 13:49:05 +0000 (14:49 +0100)] 
Add support for machined registration using varlink

6 months agoAdd missing parentheses to make sure we don't throw away scope for virtiofsd
Daan De Meyer [Wed, 15 Jan 2025 13:26:23 +0000 (14:26 +0100)] 
Add missing parentheses to make sure we don't throw away scope for virtiofsd

6 months agoMerge pull request #3363 from DaanDeMeyer/sandbox
Jörg Behrmann [Wed, 15 Jan 2025 18:32:46 +0000 (19:32 +0100)] 
Merge pull request #3363 from DaanDeMeyer/sandbox

sandbox: Make terminal background color cyan if on tty

6 months agosandbox: Don't allow nested mkosi sandbox invocations 3363/head
Daan De Meyer [Wed, 15 Jan 2025 11:06:53 +0000 (12:06 +0100)] 
sandbox: Don't allow nested mkosi sandbox invocations

Until a good usecase pops up it's probably best to disallow this since
when it happens it's most likely a user error rather than intended.

6 months agosandbox: Drop tools tree in run_verb() instead of when parsing config
Daan De Meyer [Wed, 15 Jan 2025 11:14:01 +0000 (12:14 +0100)] 
sandbox: Drop tools tree in run_verb() instead of when parsing config

Another change to make mkosi sandbox in and outside the sandbox identical.

6 months agosandbox: Make terminal background color cyan if on tty
Daan De Meyer [Wed, 15 Jan 2025 11:01:09 +0000 (12:01 +0100)] 
sandbox: Make terminal background color cyan if on tty

Let's make the sandbox more recognizable by turning the terminal
background cyan if on a tty.

6 months agoUse MKOSI_HOST_DISTRIBUTION in config_default_tools_tree_distribution()
Daan De Meyer [Wed, 15 Jan 2025 08:48:21 +0000 (09:48 +0100)] 
Use MKOSI_HOST_DISTRIBUTION in config_default_tools_tree_distribution()

It doesn't really matter since we won't use the tools tree in the
sandbox anyway but this reduces the diff between mkosi summary outside
and inside the sandbox.

6 months agocentos: Bump default release to 10
Daan De Meyer [Wed, 15 Jan 2025 08:49:31 +0000 (09:49 +0100)] 
centos: Bump default release to 10

6 months agoMake sure we use the same host distribution/release in sandbox
Daan De Meyer [Tue, 14 Jan 2025 14:32:20 +0000 (15:32 +0100)] 
Make sure we use the same host distribution/release in sandbox

If the distribution is not explicitly specified in the config file
and the host distribution does not match the tools tree distribution,
then currently mkosi -f sandbox mkosi -f and mkosi -f will build images
for different distributions.

Let's make sure these commands use the same default distribution by
communicating the host distribution and release to the sandbox via
environment variables and using them to determine the default values to
use if available.

6 months agoOnly add keylayouts to grub image on x86
Daan De Meyer [Tue, 14 Jan 2025 12:22:00 +0000 (13:22 +0100)] 
Only add keylayouts to grub image on x86

6 months agoUpdate NEWS
Daan De Meyer [Tue, 14 Jan 2025 11:57:54 +0000 (12:57 +0100)] 
Update NEWS