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

16 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.

16 months agoMake check argument apply to whether the command exists
Daan De Meyer [Mon, 15 Apr 2024 10:39:57 +0000 (12:39 +0200)] 
Make check argument apply to whether the command exists

Let's not fail hard when check=False and the command is not found.
This will allow us to avoid having to pass the tools tree path around
in various places.

16 months agoDrop support for BSD tar/cpio
Daan De Meyer [Mon, 15 Apr 2024 09:53:13 +0000 (11:53 +0200)] 
Drop support for BSD tar/cpio

Let's drop this compat kludge for OpenMandriva. No other distro
does this and we should just assume gnu tar/cpio as the official
API of the tar/cpio binaries.

16 months agoMake tools a boolean argument
Daan De Meyer [Mon, 15 Apr 2024 09:22:15 +0000 (11:22 +0200)] 
Make tools a boolean argument

16 months agoUpdate NEWS
Jörg Behrmann [Mon, 15 Apr 2024 07:42:26 +0000 (09:42 +0200)] 
Update NEWS

16 months agoRemove output symlink target as well when cleaning
Daan De Meyer [Sun, 14 Apr 2024 21:27:19 +0000 (23:27 +0200)] 
Remove output symlink target as well when cleaning

16 months agoSwitch to reprepro for generating local apt repositories
Daan De Meyer [Sun, 14 Apr 2024 20:27:13 +0000 (22:27 +0200)] 
Switch to reprepro for generating local apt repositories

We don't install dpkg-dev in tools trees anymore to avoid pulling
in perl, which means we don't have access to dpkg-scanpackages in
tools trees anymore.

Instead of adding back dpkg-dev, let's instead switch to reprepro
for generating our local apt repository. It's written in C, packaged
everywhere and has hardly any dependencies.

16 months agoMake mkosi.packages a non-default path setting
Daan De Meyer [Mon, 15 Apr 2024 06:00:35 +0000 (08:00 +0200)] 
Make mkosi.packages a non-default path setting

If the setting is configured in the config file as well, we want it
to append to mkosi.packages, not override it.

16 months agoAdd `mkosi.packages/` for `PackageDirectories=`
Michael Ferrari [Sun, 14 Apr 2024 22:30:47 +0000 (00:30 +0200)] 
Add `mkosi.packages/` for `PackageDirectories=`

16 months agoMerge pull request #2628 from DaanDeMeyer/news
Daan De Meyer [Sun, 14 Apr 2024 17:50:52 +0000 (19:50 +0200)] 
Merge pull request #2628 from DaanDeMeyer/news

Update NEWS

16 months agoStart using ~devel versions 2628/head
Daan De Meyer [Sun, 14 Apr 2024 17:24:32 +0000 (19:24 +0200)] 
Start using ~devel versions

Same as systemd. While in development we suffix with ~devel. Also
update the do-a-release script to add a second commit to switch back
to ~devel when we do a release.

We keep the old version in pyproject.toml because suffixing with
~devel conflicts with PEP 440 and python tools complain about that.

16 months agoUpdate NEWS
Daan De Meyer [Sun, 14 Apr 2024 17:03:24 +0000 (19:03 +0200)] 
Update NEWS

16 months agoMerge pull request #2627 from DaanDeMeyer/metavar
Daan De Meyer [Sun, 14 Apr 2024 16:49:42 +0000 (18:49 +0200)] 
Merge pull request #2627 from DaanDeMeyer/metavar

Various fixes

16 months agoFix formatting 2627/head
Daan De Meyer [Sun, 14 Apr 2024 15:14:03 +0000 (17:14 +0200)] 
Fix formatting

We don't put whitespace between function keyword arguments and their
values.

16 months agoAdd VolatilePackages= and InitrdVolatilePackages= settings
Daan De Meyer [Sun, 14 Apr 2024 14:40:56 +0000 (16:40 +0200)] 
Add VolatilePackages= and InitrdVolatilePackages= settings

Let's allow configuring packages which should be installed after
running build scripts and which are not cached. This is useful for
installing packages which are built in a build script or which change
often and shouldn't invalidate the cache.

16 months agoPrefer choices over metavar where applicable
Daan De Meyer [Sun, 14 Apr 2024 14:04:39 +0000 (16:04 +0200)] 
Prefer choices over metavar where applicable

If metavar is set, the choices aren't shown in the help output, so
whenever we're parsing an enum, prefer choices over setting a metavar.

16 months agoMerge pull request #2625 from DaanDeMeyer/news
Daan De Meyer [Sun, 14 Apr 2024 13:48:26 +0000 (15:48 +0200)] 
Merge pull request #2625 from DaanDeMeyer/news

Various fixes

16 months agomkosi-initrd: Remove all vmlinux images as well 2625/head
Daan De Meyer [Sun, 14 Apr 2024 06:54:22 +0000 (08:54 +0200)] 
mkosi-initrd: Remove all vmlinux images as well

16 months agoReuse tools tree on incremental builds
Daan De Meyer [Sat, 13 Apr 2024 19:42:44 +0000 (21:42 +0200)] 
Reuse tools tree on incremental builds

Every part of the default tools tree is cached. Thus, we can check
if the cache is out of date on incremental builds and if it isn't,
just reuse the previous tools tree instead of doing unnecessary work.

16 months agoOnly force repository metadata refresh if -ff was specified
Daan De Meyer [Sat, 13 Apr 2024 18:59:43 +0000 (20:59 +0200)] 
Only force repository metadata refresh if -ff was specified

Let's make sure we use the default metadata expiration checks unless
-ff was specified. Apt doesn't support anything like this so we don't
change anything there.

16 months agoRemove 'v' prefix from systemd tool versions
Daan De Meyer [Sat, 13 Apr 2024 18:31:32 +0000 (20:31 +0200)] 
Remove 'v' prefix from systemd tool versions

Some older systemd versions still have a 'v' prefix in them, let's
make sure we take that into account.

16 months agoLog bootctl version when it's out of date
Daan De Meyer [Sat, 13 Apr 2024 18:28:55 +0000 (20:28 +0200)] 
Log bootctl version when it's out of date

16 months agoDisable SELinux relabeling for tools tree
Daan De Meyer [Sat, 13 Apr 2024 18:23:33 +0000 (20:23 +0200)] 
Disable SELinux relabeling for tools tree

policycoreutils in centos pulls in the policy as a dependency, so
we end up doing the relabel. Let's make sure we don't by explicitly
disabling it.