]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
14 months agoPass arguments that look like env variables as env to systemd-nspawn 2724/head
Daan De Meyer [Tue, 28 May 2024 13:21:55 +0000 (15:21 +0200)] 
Pass arguments that look like env variables as env to systemd-nspawn

The kernel passes unknown parameters as environment variables to pid1.
Let's do the same for systemd-nspawn. Of course we don't know what is
known and unknown so let's take advantage of the fact that kernel cmdline
arguments are (usually) lower case and environment variables are (usually)
upper case and use that to determine whether to pass something as an argument
or an environment variable.

14 months agoOnly call become_root() if we need a full uid map
Daan De Meyer [Tue, 28 May 2024 12:51:32 +0000 (14:51 +0200)] 
Only call become_root() if we need a full uid map

If we only need to map the current user to root, bubblewrap will do
that for us and we don't need to call become_root() after forking.

14 months agoFix scope_env()
Daan De Meyer [Tue, 28 May 2024 12:37:59 +0000 (14:37 +0200)] 
Fix scope_env()

DBUS_SYSTEM_ADDRESS isn't always set so make sure to check for the
canonical location of the system bus socket as well.

14 months agoFix typo
Daan De Meyer [Tue, 28 May 2024 12:37:52 +0000 (14:37 +0200)] 
Fix typo

14 months agosandbox: check if bwrap is installed
Zbigniew Jędrzejewski-Szmek [Wed, 22 May 2024 12:24:12 +0000 (14:24 +0200)] 
sandbox: check if bwrap is installed

bwrap is used for many many different things, so I just added a blanket
check that requires is to be always required if use any of the verbs that
call check_tools().

Fixes https://github.com/systemd/mkosi/issues/2719.

14 months agoadd dashes to temporary directories for readability
Jörg Behrmann [Wed, 22 May 2024 13:45:52 +0000 (15:45 +0200)] 
add dashes to temporary directories for readability

14 months agoClamp mtimes instead of always resetting them
Zbigniew Jędrzejewski-Szmek [Wed, 22 May 2024 13:16:14 +0000 (15:16 +0200)] 
Clamp mtimes instead of always resetting them

Closes https://github.com/systemd/mkosi/issues/2635.

14 months agomkosi-initrd: Don't remove sanitizer libraries from initrd
Daan De Meyer [Fri, 17 May 2024 11:32:54 +0000 (13:32 +0200)] 
mkosi-initrd: Don't remove sanitizer libraries from initrd

Let's not unconditionally remove sanitizer libraries and their
dependencies from the initrd as it turns out running software with
sanitizers in the initrd isn't that far fetched.

15 months agoMake Environment= match without value check if given key is in env
Daan De Meyer [Thu, 16 May 2024 14:53:36 +0000 (16:53 +0200)] 
Make Environment= match without value check if given key is in env

15 months agoPass WITH_NETWORK to build and finalize scripts
Jörg Behrmann [Thu, 16 May 2024 12:55:58 +0000 (14:55 +0200)] 
Pass WITH_NETWORK to build and finalize scripts

15 months agoAdd -I shorthand for --include
Daan De Meyer [Wed, 15 May 2024 19:14:07 +0000 (21:14 +0200)] 
Add -I shorthand for --include

15 months agoPrefer `config.image` over `config.image_id`
Michael Ferrari [Wed, 15 May 2024 08:02:18 +0000 (10:02 +0200)] 
Prefer `config.image` over `config.image_id`

When using `mkosi.images` it makes more sense to use the `image` name,
as that is what identifies the different images.

15 months agoAlways refresh repository metadata if CacheOnly=never
Daan De Meyer [Wed, 15 May 2024 05:39:21 +0000 (07:39 +0200)] 
Always refresh repository metadata if CacheOnly=never

Fixes #2707

15 months agoDon't die when images already exist
Jörg Behrmann [Tue, 14 May 2024 13:20:35 +0000 (15:20 +0200)] 
Don't die when images already exist

We already check whether outputs exist when looping over all image configs and
skip the build if the output exists. This way one can just "mkosi build" after
adding a new image and the missing ones will be built.

15 months agoMerge pull request #2708 from DaanDeMeyer/workspace
Jörg Behrmann [Tue, 14 May 2024 11:21:56 +0000 (13:21 +0200)] 
Merge pull request #2708 from DaanDeMeyer/workspace

Two workspace fixes

15 months agoSet BuildSources= for default initrd and default tools tree. 2708/head
Daan De Meyer [Tue, 14 May 2024 10:37:49 +0000 (12:37 +0200)] 
Set BuildSources= for default initrd and default tools tree.

This allows these to be built from any working directory, including
'/'.

Fixes #2705.

15 months agoDrop check for workspace directory relative to cwd
Daan De Meyer [Tue, 14 May 2024 10:36:38 +0000 (12:36 +0200)] 
Drop check for workspace directory relative to cwd

The current working directory check is only relevant if the current
working directory is used as a build source, which means it's also
handled by the second check so let's drop it.

15 months agoqemu: Use different ID for scsi PCI device
Daan De Meyer [Mon, 13 May 2024 11:41:01 +0000 (13:41 +0200)] 
qemu: Use different ID for scsi PCI device

Let's make sure we don't conflict with stuff added by users.

15 months agoAdd optional file ID for qemu drives
Daan De Meyer [Sun, 12 May 2024 14:01:06 +0000 (16:01 +0200)] 
Add optional file ID for qemu drives

For testing multipath in systemd's integration tests, we need multiple
qemu drives backed by the same file. Let's allow specifying an additional
file ID to make this possible with QemuDrive=.

15 months agoSet $QEMU_ARCHITECTURE for configure scripts
Daan De Meyer [Sun, 12 May 2024 09:54:18 +0000 (11:54 +0200)] 
Set $QEMU_ARCHITECTURE for configure scripts

Allows trivial access to the qemu binary that mkosi will use to run
qemu.

15 months agoMerge pull request #2699 from DaanDeMeyer/depmod
Daan De Meyer [Fri, 10 May 2024 12:12:30 +0000 (14:12 +0200)] 
Merge pull request #2699 from DaanDeMeyer/depmod

Chroot for depmod and modinfo

15 months agoci: Drop arch tools + centos image exclude
Daan De Meyer [Fri, 10 May 2024 11:21:22 +0000 (13:21 +0200)] 
ci: Drop arch tools + centos image exclude

Arch got a new version of rpm so let's see if the SIGPIPE bug has
been fixed.

15 months agoChroot for depmod and modinfo 2699/head
Daan De Meyer [Fri, 10 May 2024 10:55:23 +0000 (12:55 +0200)] 
Chroot for depmod and modinfo

modinfo cannot always work with output from newer or different depmod.

Specifically, this fixes the case where modinfo sch_fq_codel fails with
"module not found" on CentOS Stream 9 images built from Fedora 40. When
depmod from Fedora 40 is used, modinfo in the image fails with "module
not found". When depmod from inside the image is used, modinfo succeeds
as expected.

We'd rather not do this but in this case there's no other option.

15 months agoAdd extra argument to SandboxProtocol
Daan De Meyer [Fri, 10 May 2024 10:55:03 +0000 (12:55 +0200)] 
Add extra argument to SandboxProtocol

15 months agoMake /work related stuff of chroot_cmd() optional
Daan De Meyer [Fri, 10 May 2024 10:54:29 +0000 (12:54 +0200)] 
Make /work related stuff of chroot_cmd() optional

15 months agoMerge pull request #2698 from DaanDeMeyer/configure
Daan De Meyer [Fri, 10 May 2024 10:36:40 +0000 (12:36 +0200)] 
Merge pull request #2698 from DaanDeMeyer/configure

Only run configure scripts for verbs that need a build

15 months agoOnly run configure scripts for verbs that need a build 2698/head
Daan De Meyer [Fri, 10 May 2024 09:27:50 +0000 (11:27 +0200)] 
Only run configure scripts for verbs that need a build

In systemd, we want to use configure scripts to determine whether
qemu was built with support for specific devices and skip running
a test if it wasn't, or otherwise add the device to the qemu arguments.

To make this work, we need to run the configure scripts with the
default tools tree available if one is configured.

Let's change the behavior of configure scripts to only run for verbs
that need a build and run them after building the default tools tree
so that they can be run with the tools tree mounted.

15 months agoSurround --force with quotes
Daan De Meyer [Fri, 10 May 2024 10:04:36 +0000 (12:04 +0200)] 
Surround --force with quotes

15 months agoFix typo
Daan De Meyer [Fri, 10 May 2024 10:03:58 +0000 (12:03 +0200)] 
Fix typo

15 months agoopensuse: Install dnf5 in OpenSUSE tools tree
Daan De Meyer [Thu, 9 May 2024 09:14:13 +0000 (11:14 +0200)] 
opensuse: Install dnf5 in OpenSUSE tools tree

15 months agoOnly use a single default tools tree per build
Daan De Meyer [Wed, 8 May 2024 12:41:06 +0000 (14:41 +0200)] 
Only use a single default tools tree per build

Currently, if multiple images are defined, each with a default tools
tree, if they use the same distribution, all the various ToolsTreeXXX=
settings for the later images will be ignored since we'll only build
one tools tree.

Also, if any of the images set Incremental=no, we will remove the default
tools tree outputs even if Incremental=yes is enabled for other images.

To keep ourselves sane, let's avoid dealing with multiple defaults tools
trees and only look at the last image to figure out whether we should
build a default tools tree and what to put in it.

15 months agoapt: Allow release info change
Renjaya Raga Zenta [Wed, 8 May 2024 02:45:04 +0000 (09:45 +0700)] 
apt: Allow release info change

Allow the update command to continue downloading data from a repository which changed its information of the release contained in the repository indicating e.g a new major release. APT will fail at the update command for such repositories until the change is confirmed to ensure the user is prepared for the change.

15 months agoDrop workaround
Daan De Meyer [Tue, 7 May 2024 18:46:47 +0000 (20:46 +0200)] 
Drop workaround

15 months agoCheck if modules.builtin exists before reading it
Daan De Meyer [Tue, 7 May 2024 17:16:17 +0000 (19:16 +0200)] 
Check if modules.builtin exists before reading it

15 months agodoc: move [Match] and [Config] section further down
Jörg Behrmann [Tue, 7 May 2024 15:24:52 +0000 (17:24 +0200)] 
doc: move [Match] and [Config] section further down

Both topics are more advanced and since the entries in the [Match] section have
the same names as the the things they match, they are the first hit when
searching the document.

15 months agoTighten rpm glob
Daan De Meyer [Tue, 7 May 2024 08:28:37 +0000 (10:28 +0200)] 
Tighten rpm glob

rpm's are compressed on the inside, not on the outside, so "*.rpm"
is sufficient and we don't need the trailing '*'.

15 months agoBe more conservative in what we copy from package directories
Daan De Meyer [Mon, 6 May 2024 15:11:21 +0000 (17:11 +0200)] 
Be more conservative in what we copy from package directories

Let's make sure we only copy packages from package directories so
that PackageDirectories= can be pointed at a directory containing
more than just packages without copying everything.

15 months agoAllow booting ESP images in vmspawn
Daan De Meyer [Mon, 6 May 2024 15:17:25 +0000 (17:17 +0200)] 
Allow booting ESP images in vmspawn

15 months agoMerge pull request #2685 from DaanDeMeyer/selinux
Jörg Behrmann [Mon, 6 May 2024 14:53:15 +0000 (16:53 +0200)] 
Merge pull request #2685 from DaanDeMeyer/selinux

Pass --selinux-relabel to default initrd configuration

15 months agoPass --selinux-relabel to default initrd configuration 2685/head
Daan De Meyer [Mon, 6 May 2024 13:59:50 +0000 (15:59 +0200)] 
Pass --selinux-relabel to default initrd configuration

15 months agoAllow "enabled" and "disabled" for features
Daan De Meyer [Mon, 6 May 2024 14:12:04 +0000 (16:12 +0200)] 
Allow "enabled" and "disabled" for features

15 months agoDon't use scopes for virtiofs when using older unshare
Daan De Meyer [Mon, 6 May 2024 07:05:40 +0000 (09:05 +0200)] 
Don't use scopes for virtiofs when using older unshare

unshare 2.37 is still shipped in Ubuntu Jammy and CentOS Stream 9
which doesn't have --map-users= and --map-groups=. In this case, let's
not use scopes for virtiofsd to make sure that booting using virtiofsd
still works.

Also add a missing preexec_fn to become root if we're not using a scope.

To make this work we have to move all the logic to decide whether we use
a scope or not outside of run() as we need to conditionalize other arguments
we provide to run() based on whether we use a scope or not.

15 months agoRevert "Use become_root_cmd() in copy_ephemeral()"
Daan De Meyer [Sun, 5 May 2024 21:44:03 +0000 (23:44 +0200)] 
Revert "Use become_root_cmd() in copy_ephemeral()"

This reverts commit 0e3b85fec7c5bbabf0430fab088a3f2e8615afb4.

--map-users= and --map-groups= were added in util-linux 2.38 but
Ubuntu 22.04 and CentOS Stream 9 only ships util-linux 2.37 so
let's at least make sure --ephemeral keeps working on those
distributions.

15 months agoFix optional enum deserialization
Daan De Meyer [Sun, 5 May 2024 21:17:20 +0000 (23:17 +0200)] 
Fix optional enum deserialization

15 months agoMerge pull request #2680 from DaanDeMeyer/properties
Daan De Meyer [Sat, 4 May 2024 12:58:21 +0000 (14:58 +0200)] 
Merge pull request #2680 from DaanDeMeyer/properties

Add UnitProperties= setting

15 months agoAdd UnitProperties= setting 2680/head
Daan De Meyer [Fri, 3 May 2024 22:04:57 +0000 (00:04 +0200)] 
Add UnitProperties= setting

This allows configuring properties on the scopes spawned by
systemd-nspawn or systemd-run.

15 months agoUse become_root_cmd() in copy_ephemeral()
Daan De Meyer [Fri, 3 May 2024 22:44:57 +0000 (00:44 +0200)] 
Use become_root_cmd() in copy_ephemeral()

15 months agoqemu: Use systemd-run to allocate scopes
Daan De Meyer [Fri, 3 May 2024 21:33:58 +0000 (23:33 +0200)] 
qemu: Use systemd-run to allocate scopes

This doesn't drastically change behavior, but will open the way for
adding a RuntimeProperties= setting to allow configuring various
properties of the scope unit.

Since allocating a scope with systemd-run involves communicating with
a daemon running on the host, there's no point in running it from the
sandbox so we run it from the host instead.

Because systemd-run needs to run as the uid that started mkosi, we can't
use preexec_fn anymore to allocate the user namespace for virtiofsd.
Instead, we reimplement what become_root() does on top of unshare and
chain execute into that which then itself chain executes virtiofsd.

15 months agoMerge pull request #2679 from DaanDeMeyer/cache
Daan De Meyer [Fri, 3 May 2024 15:23:18 +0000 (17:23 +0200)] 
Merge pull request #2679 from DaanDeMeyer/cache

qemu: Configure caching properly

15 months agoqemu: Use io_uring async I/O backend 2679/head
Daan De Meyer [Fri, 3 May 2024 14:50:08 +0000 (16:50 +0200)] 
qemu: Use io_uring async I/O backend

15 months agoqemu: Configure caching properly
Daan De Meyer [Fri, 3 May 2024 14:24:50 +0000 (16:24 +0200)] 
qemu: Configure caching properly

For the scratch device, we can use unsafe caching as it's thrown
away immediately after the machine shuts down. For the root disk,
we can use unsafe caching only if --ephemeral is enabled.

15 months agodebian: Reinstall various packages again
Daan De Meyer [Fri, 3 May 2024 10:33:09 +0000 (12:33 +0200)] 
debian: Reinstall various packages again

These packages have been added back to testing so let's install them
again.

15 months agoqemu: Allow adding a TPM without using UEFI
Daan De Meyer [Fri, 3 May 2024 08:21:45 +0000 (10:21 +0200)] 
qemu: Allow adding a TPM without using UEFI

Let's instead just default to not using a TPM when not using UEFI.

15 months agoBump actions/checkout from 4.1.2 to 4.1.4
dependabot[bot] [Wed, 1 May 2024 22:26:36 +0000 (22:26 +0000)] 
Bump actions/checkout from 4.1.2 to 4.1.4

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/9bb56186c3b09b4f86b1c65136769dd318469633...0ad4b8fadaa221de15dcec353f45205ec38ea70b)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
15 months agoBump github/codeql-action from 3.24.9 to 3.25.3
dependabot[bot] [Wed, 1 May 2024 22:26:43 +0000 (22:26 +0000)] 
Bump github/codeql-action from 3.24.9 to 3.25.3

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.9 to 3.25.3.
- [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/1b1aada464948af03b950897e5eb522f92603cc2...d39d31e687223d841ef683f52467bd88e9b21c14)

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

Signed-off-by: dependabot[bot] <support@github.com>
15 months agoDo not mount home to sandbox if it's /
Cornelius Hoffmann [Tue, 30 Apr 2024 15:56:21 +0000 (17:56 +0200)] 
Do not mount home to sandbox if it's /

The default home directory for system users created with sysusers.d is /.
Which will automatically be mounted inside sync scripts, causing a lot of
headaches, since we're essentially trying to run on the host then.
E.g. /proxy.cacert cannot be created.

15 months agoMerge pull request #2671 from DaanDeMeyer/fix
Jörg Behrmann [Tue, 30 Apr 2024 14:40:46 +0000 (16:40 +0200)] 
Merge pull request #2671 from DaanDeMeyer/fix

Various fixes

15 months agovmspawn: Run with sandbox 2671/head
Daan De Meyer [Tue, 30 Apr 2024 13:32:11 +0000 (15:32 +0200)] 
vmspawn: Run with sandbox

Now that we can look up binaries in --extra-search-paths=, we can run
vmspawn with a sandbox as well.

15 months agovmspawn: Have vmspawn look for firmware itself
Daan De Meyer [Tue, 30 Apr 2024 13:30:29 +0000 (15:30 +0200)] 
vmspawn: Have vmspawn look for firmware itself

vmspawn was recently fixed to look for firmware itself properly so
let's have it do its own lookup again.

15 months agoDon't look in --extra-search-paths for qemu and virt-fw-vars
Daan De Meyer [Tue, 30 Apr 2024 13:27:01 +0000 (15:27 +0200)] 
Don't look in --extra-search-paths for qemu and virt-fw-vars

These take as input a file that might be in or out of the tools tree.
Because find_ovmf_firmware() will return a file in the tools tree
regardless of whether virt-fw-vars and qemu will be executed on the
host or not, let's disable the --extra-search-paths= integration for
these two for now.

15 months agoDon't look for firmware in /etc/qemu/firmware if we're using a tools tree
Daan De Meyer [Tue, 30 Apr 2024 13:25:34 +0000 (15:25 +0200)] 
Don't look for firmware in /etc/qemu/firmware if we're using a tools tree

This is unlikely to work properly since the description in /etc/qemu/firmware
will assume the host's /usr is in place and not the tools tree's /usr.

15 months agoselinux: Fix using setfiles from tools tree
Richard Maw [Mon, 29 Apr 2024 16:28:37 +0000 (17:28 +0100)] 
selinux: Fix using setfiles from tools tree

After the change to support tools from ExtraSearchPaths or the ToolsTree
the sandbox needs the found file path to be passed in.

The setfiles command needed to relabel trees was missed in this change.

15 months agomkosi-initrd: Drop some RemoveFiles= from Arch config
Daan De Meyer [Sun, 28 Apr 2024 13:23:58 +0000 (15:23 +0200)] 
mkosi-initrd: Drop some RemoveFiles= from Arch config

These are now handles by WithDocs=no.

15 months agoExclude `/usr/share/gtk-doc/*` with `WithDocs=no`
Michael Ferrari [Sat, 27 Apr 2024 05:50:44 +0000 (07:50 +0200)] 
Exclude `/usr/share/gtk-doc/*` with `WithDocs=no`

15 months agoMention repart artifacts in clean script section
Nils K [Fri, 26 Apr 2024 19:38:02 +0000 (21:38 +0200)] 
Mention repart artifacts in clean script section

15 months agoman: fix typo
Jörg Behrmann [Fri, 26 Apr 2024 15:00:02 +0000 (17:00 +0200)] 
man: fix typo

15 months agofedora: Bump default release to 40
Daan De Meyer [Fri, 26 Apr 2024 10:38:32 +0000 (12:38 +0200)] 
fedora: Bump default release to 40

15 months agopacman: Drop unnecessary exclude
Daan De Meyer [Fri, 26 Apr 2024 06:25:58 +0000 (08:25 +0200)] 
pacman: Drop unnecessary exclude

15 months agoMerge pull request #2661 from DaanDeMeyer/fix
Daan De Meyer [Fri, 26 Apr 2024 09:07:31 +0000 (11:07 +0200)] 
Merge pull request #2661 from DaanDeMeyer/fix

qemu: Always how many notify messages we received

15 months agopacman: Implement support for WithDocs=
Daan De Meyer [Fri, 26 Apr 2024 06:25:58 +0000 (08:25 +0200)] 
pacman: Implement support for WithDocs=

Same list as we use for apt, using pacman's NoExtract= option.

15 months agoAdd missing newline 2661/head
Daan De Meyer [Fri, 26 Apr 2024 08:39:30 +0000 (10:39 +0200)] 
Add missing newline

15 months agoRemove unneeded exist_ok from install_dir.mkdir()
Daan De Meyer [Fri, 26 Apr 2024 08:38:54 +0000 (10:38 +0200)] 
Remove unneeded exist_ok from install_dir.mkdir()

This cannot be provided by users anymore and is always created in
the workspace so it will never exist already.

15 months agoqemu: Always how many notify messages we received
Daan De Meyer [Thu, 25 Apr 2024 18:57:11 +0000 (20:57 +0200)] 
qemu: Always how many notify messages we received

15 months agoClarify BuildSourcesEphemeral=
Daan De Meyer [Thu, 25 Apr 2024 11:00:54 +0000 (13:00 +0200)] 
Clarify BuildSourcesEphemeral=

Fixes #2656

15 months agoDrop redundant ukify lookup
Daan De Meyer [Wed, 24 Apr 2024 20:39:26 +0000 (22:39 +0200)] 
Drop redundant ukify lookup

15 months agoci: remove packages.microsoft.com
Luca Boccassi [Wed, 24 Apr 2024 14:43:23 +0000 (15:43 +0100)] 
ci: remove packages.microsoft.com

It is not needed, it publishes things like dotnet, and it is often
broken, so just remove the sources

15 months agoCall ukify with --ucode if supported
Tobias Fleig [Tue, 26 Mar 2024 12:46:00 +0000 (05:46 -0700)] 
Call ukify with --ucode if supported

This is the companion change to https://github.com/systemd/systemd/pull/31872.

If both systemd-stub and ukify are version `256~devel` or greater, mkosi
will put the microcode initrd in the new `.ucode` UKI section by using
the `--ucode` flag in ukify. Otherwise it will put the microcode initrd
as first regular initrd (same as before).

15 months agoSupport SplitArtifacts= for extension images
Daan De Meyer [Tue, 23 Apr 2024 12:49:19 +0000 (14:49 +0200)] 
Support SplitArtifacts= for extension images

15 months agomkosi-tools: Add qemu-img to Fedora tools tree
Daan De Meyer [Tue, 23 Apr 2024 11:18:57 +0000 (13:18 +0200)] 
mkosi-tools: Add qemu-img to Fedora tools tree

Required by virt-fw-vars but not explicitly declared as a dependency
yet.

See https://bugzilla.redhat.com/show_bug.cgi?id=2276629

15 months agoAvoid TOCTOU issue in start_journal_remote()
Daan De Meyer [Tue, 23 Apr 2024 08:19:38 +0000 (10:19 +0200)] 
Avoid TOCTOU issue in start_journal_remote()

15 months agoMake sure "mkosi -C build" works
Daan De Meyer [Tue, 23 Apr 2024 07:48:07 +0000 (09:48 +0200)] 
Make sure "mkosi -C build" works

In systemd we want to (optionally) make sure all mkosi output is
written to the meson build directory. To make this work, we want to
write a mkosi.conf to the meson build directory so that developers
can do "mkosi -C build". Currently this doesn't work because "build"
is interpreted as a verb. Let's make sure that doesn't happen.

We need a better solution for this hack but for now this is the best
I can come up with.

15 months agoapt: Pick up ddeb packages as well
Daan De Meyer [Tue, 23 Apr 2024 07:08:53 +0000 (09:08 +0200)] 
apt: Pick up ddeb packages as well

Ubuntu spits out .ddeb extensions for debug packages, so let's make
sure we take that into account.

15 months agoDon't build the image automatically for boot/qemu verbs without --force
Daan De Meyer [Mon, 22 Apr 2024 12:37:30 +0000 (14:37 +0200)] 
Don't build the image automatically for boot/qemu verbs without --force

Let's insist on --force to build the image if boot/qemu are used to
give users an easy way to insist that an image has already been built
when booting it.

15 months agoMerge pull request #2647 from DaanDeMeyer/basesystem
Zbigniew Jędrzejewski-Szmek [Mon, 22 Apr 2024 07:04:33 +0000 (09:04 +0200)] 
Merge pull request #2647 from DaanDeMeyer/basesystem

fedora: Install basesystem package instead of filesystem

15 months agocentos: Drop glibc-minimal-langpack workaround 2647/head
Daan De Meyer [Sun, 21 Apr 2024 18:40:40 +0000 (20:40 +0200)] 
centos: Drop glibc-minimal-langpack workaround

This workaround was in place for CentOS 8 Stream, for which support
will be dropped in May, so let's drop the workaround already.

15 months agofedora: Install basesystem package instead of filesystem
Daan De Meyer [Sun, 21 Apr 2024 18:20:58 +0000 (20:20 +0200)] 
fedora: Install basesystem package instead of filesystem

basesystem pulls in filesystem and setup. The latter defines some
common groups and directories that are expected to be available
on every system.

Fedora/CentOS also define basesystem as a package that's expected
to be installed everywhere, so let's make sure our images satisfy
that requirement.

15 months agoMerge pull request #2646 from DaanDeMeyer/journal-remote
Daan De Meyer [Sun, 21 Apr 2024 10:04:03 +0000 (12:04 +0200)] 
Merge pull request #2646 from DaanDeMeyer/journal-remote

Configure journal-remote limits properly

15 months agoAlways use TERM=dumb if not connected to a tty 2646/head
Daan De Meyer [Sun, 21 Apr 2024 09:20:09 +0000 (11:20 +0200)] 
Always use TERM=dumb if not connected to a tty

mkosi might be invoked from a terminal but redirected to a file, in
that case we should ignore $TERM from the environment, so let's make
sure we handle that properly.

15 months agoConfigure journal-remote limits properly
Daan De Meyer [Sat, 20 Apr 2024 20:33:01 +0000 (22:33 +0200)] 
Configure journal-remote limits properly

Let's make sure the limits are configured so we can always write at
least 4G of logs. We also enable compact mode again in all cases to
reduce the size used by journal files as for example Github Actions
machines aren't exactly swimming in free space.

(We pick 4G because that's the max journal file size when the compact
mode is used)

(We'll probably have to revisit this again at some point but for now
this should do the trick)

15 months agoqemu: give qemu a private copy of stdin, stdout and stderr
Jörg Behrmann [Fri, 19 Apr 2024 18:48:42 +0000 (20:48 +0200)] 
qemu: give qemu a private copy of stdin, stdout and stderr

15 months agoRemove vmspawn from --help
Daan De Meyer [Fri, 19 Apr 2024 11:19:10 +0000 (13:19 +0200)] 
Remove vmspawn from --help

It was replaced with VirtualMachineMonitor=

16 months agoMerge pull request #2639 from behrmann/artifactory
Daan De Meyer [Thu, 18 Apr 2024 09:19:18 +0000 (11:19 +0200)] 
Merge pull request #2639 from behrmann/artifactory

Add artifact directories

16 months agoAdd Environment= match
Daan De Meyer [Thu, 18 Apr 2024 08:10:25 +0000 (10:10 +0200)] 
Add Environment= match

16 months agoAdd artifacts directories to pass around build artifacts 2639/head
Jörg Behrmann [Wed, 17 Apr 2024 13:42:19 +0000 (15:42 +0200)] 
Add artifacts directories to pass around build artifacts

Also pick up microcode and initrds from the artifact directory

16 months agoDrop --cache=always for virtiofsd
Daan De Meyer [Wed, 17 Apr 2024 13:37:04 +0000 (15:37 +0200)] 
Drop --cache=always for virtiofsd

We want to support users writing to these directories from the host
so --cache=always is not an option as that assumes virtiofsd has
exclusive write access.

16 months agoman: add PACKAGEDIR to environment variable table
Jörg Behrmann [Wed, 17 Apr 2024 12:28:43 +0000 (14:28 +0200)] 
man: add PACKAGEDIR to environment variable table

16 months agoFix documentatio mkosi.md mispelling
Thales Antunes de Oliveira Barretto [Tue, 16 Apr 2024 20:16:57 +0000 (17:16 -0300)] 
Fix documentatio mkosi.md mispelling

Fixes mispelled 'thel.' to 'them.' in mkosi.md.

16 months agoSkip dict as well in cli settings check
Daan De Meyer [Tue, 16 Apr 2024 13:02:17 +0000 (15:02 +0200)] 
Skip dict as well in cli settings check

16 months agoMerge pull request #2634 from DaanDeMeyer/tools
Daan De Meyer [Mon, 15 Apr 2024 12:25:29 +0000 (14:25 +0200)] 
Merge pull request #2634 from DaanDeMeyer/tools

Allow using ExtraSearchPaths= with ToolsTree=

16 months agoAllow using ExtraSearchPaths= with ToolsTree= 2634/head
Daan De Meyer [Mon, 15 Apr 2024 11:13:17 +0000 (13:13 +0200)] 
Allow using ExtraSearchPaths= with ToolsTree=

If we find a binary in any path configured with ExtraSearchPaths=,
we prefer using it over the tools tree.

This commit also gets rid of all the find_binary() for "btrfs" in
tree.py and stops passing in the tools tree to those functions.
Instead, we rely on the new behavior of run() to not fail hard
when check=False and the btrfs binary is not found.