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

16 months agoAdd ProxyExclude= setting
Daan De Meyer [Sat, 13 Apr 2024 17:15:56 +0000 (19:15 +0200)] 
Add ProxyExclude= setting

Allow configuring hostnames which should not go through the proxy.

16 months agoAdd Cacheonly.never and rename Cacheonly.none to Cacheonly.auto
Daan De Meyer [Sat, 13 Apr 2024 16:03:41 +0000 (18:03 +0200)] 
Add Cacheonly.never and rename Cacheonly.none to Cacheonly.auto

When set to "never", we'll always sync repository metadata.

16 months agoMake sure we use the enum members to generate values()
Daan De Meyer [Sat, 13 Apr 2024 16:02:06 +0000 (18:02 +0200)] 
Make sure we use the enum members to generate values()

Otherwise if we add backwards compat members they won't be taken
into account.

16 months agoDon't use strings in compression enum
Daan De Meyer [Sat, 13 Apr 2024 16:01:50 +0000 (18:01 +0200)] 
Don't use strings in compression enum

16 months agoCentralize vmlinuz fixup logic
Daan De Meyer [Sat, 13 Apr 2024 14:40:45 +0000 (16:40 +0200)] 
Centralize vmlinuz fixup logic

Let's run this logic for all distributions, and also run it after
running postinst scripts, to deal with kernel packages that are
installed in a postinst script.

16 months agoAdd ToolsTreeCertificates= option
Daan De Meyer [Sat, 13 Apr 2024 14:18:03 +0000 (16:18 +0200)] 
Add ToolsTreeCertificates= option

When building an image using internal repositories, often various
internal certificates are required to be able to access these. These
are of course not going to be available in any default tools tree, so
let's add an option to use certificates and keys from the host with a
tools tree.

16 months agoUpdate NEWS
Daan De Meyer [Fri, 12 Apr 2024 07:50:56 +0000 (09:50 +0200)] 
Update NEWS

16 months agoStop installing createrepo-c on Debian Testing
Daan De Meyer [Sat, 13 Apr 2024 11:37:25 +0000 (13:37 +0200)] 
Stop installing createrepo-c on Debian Testing

createrepo-c was removed from Debian testing, see
https://tracker.debian.org/pkg/createrepo-c.

16 months agoDrop /etc/makepkg.conf logic from pacman mounts
Daan De Meyer [Sat, 13 Apr 2024 11:35:27 +0000 (13:35 +0200)] 
Drop /etc/makepkg.conf logic from pacman mounts

makepkg is always invoked in the image itself to build a package,
so there's no point in mounting over the makepkg.conf from the tools
tree into the sandbox.

16 months agoAdd comment to re-enable pacman-package-manager and makepkg when back in testing
Daan De Meyer [Sat, 13 Apr 2024 11:34:07 +0000 (13:34 +0200)] 
Add comment to re-enable pacman-package-manager and makepkg when back in testing

16 months agoOptionally return the inner pid from spawn()
Daan De Meyer [Fri, 12 Apr 2024 14:21:27 +0000 (16:21 +0200)] 
Optionally return the inner pid from spawn()

bubblewrap does not support forwarding signals yet,
see https://github.com/containers/bubblewrap/pull/586. As a workaround,
we need to make sure we send our signals to the inner process. To
make this work, we create a pipe, pass it through to the subprocess,
and prefix with a bash command that writes its pid to the pipe before
exec-ing the actual command.

The other thing we get from this is that we can register the inner pid
as a scope which makes the systemctl status output for the scopes we
create a lot more useful.

16 months agoMake sandbox_cmd() return a context manager
Daan De Meyer [Sat, 13 Apr 2024 08:50:58 +0000 (10:50 +0200)] 
Make sandbox_cmd() return a context manager

This allows us to get rid of the shell hack to create and clean up
a subdirectory of /var/tmp. To avoid having to change every callsite
to use with(), we pass in a context manager directly into run() and
spawn().

Because we don't return a list anymore from sandbox_cmd(), we add an
extra "extra" argument to allow appending extra commands to the sandbox.

16 months agoMove foreground argument
Daan De Meyer [Sat, 13 Apr 2024 08:46:44 +0000 (10:46 +0200)] 
Move foreground argument

Make sure the argument list has the same order as spawn().

16 months agoIntroduce success_exit_status argument for run() and spawn()
Daan De Meyer [Sat, 13 Apr 2024 08:45:48 +0000 (10:45 +0200)] 
Introduce success_exit_status argument for run() and spawn()

16 months agoMake sure systemd-journal-remote runs in background
Daan De Meyer [Fri, 12 Apr 2024 12:53:56 +0000 (14:53 +0200)] 
Make sure systemd-journal-remote runs in background

16 months agoOnly run systemd-journal-remote as owner of target dir if running as root
Daan De Meyer [Fri, 12 Apr 2024 09:31:51 +0000 (11:31 +0200)] 
Only run systemd-journal-remote as owner of target dir if running as root

If we're not running as root, we're not allowed to run as a different
user than ourselves, so don't try to do so.

16 months agoAllocate scope for systemd-journal-remote as well
Daan De Meyer [Fri, 12 Apr 2024 07:56:34 +0000 (09:56 +0200)] 
Allocate scope for systemd-journal-remote as well

16 months agoDon't fail if we can't register machine
Daan De Meyer [Fri, 12 Apr 2024 07:50:22 +0000 (09:50 +0200)] 
Don't fail if we can't register machine

systemd-machined might not be running.

16 months agoqemu: Escape commas in kernel command line SMBIOS value
Daan De Meyer [Thu, 11 Apr 2024 20:05:22 +0000 (22:05 +0200)] 
qemu: Escape commas in kernel command line SMBIOS value

Commas in the command line have to be escaped by doubling them, so
let's do that.

16 months agoStop installing dpkg-dev explicitly in tools trees
Daan De Meyer [Thu, 11 Apr 2024 14:47:17 +0000 (16:47 +0200)] 
Stop installing dpkg-dev explicitly in tools trees

apt will pull in dpkg as a dependency. dpkg-dev specifically only
includes stuff required to build packages, which you generally only
want to install in the image itself as the dpkg build tooling does
not support operating on a chroot.

This gets rid of perl in tools trees as dpkg-dev depends on a bunch
of perl scripts but dpkg doesn't.

16 months agoqemu: Enable discard/trim processing in qemu
Daan De Meyer [Thu, 11 Apr 2024 13:18:10 +0000 (15:18 +0200)] 
qemu: Enable discard/trim processing in qemu

16 months agoqemu: Enable free page reporting
Daan De Meyer [Thu, 11 Apr 2024 13:14:15 +0000 (15:14 +0200)] 
qemu: Enable free page reporting

See https://github.com/systemd/systemd/pull/32227/

16 months agoqemu: Make sure qemu/VM exit status take priority
Daan De Meyer [Thu, 11 Apr 2024 08:11:51 +0000 (10:11 +0200)] 
qemu: Make sure qemu/VM exit status take priority

In spawn(), if an exception is raised by the context manager block,
we'll let it take priority over any exception we raise in spawn()
itself. Let's make use of this to make sure the qemu/VM exit code
always takes priority by raising the CalledProcessError from within
the qemu spawn() block.

We also let any qemu error take precedence over any EXIT_STATUS error.

16 months agoMerge pull request #2620 from DaanDeMeyer/chdir
Jörg Behrmann [Wed, 10 Apr 2024 20:45:05 +0000 (22:45 +0200)] 
Merge pull request #2620 from DaanDeMeyer/chdir

Various --append and other fixes

16 months agoOnly do path logic in config_parse_dict() if value is not empty 2620/head
Daan De Meyer [Wed, 10 Apr 2024 18:56:16 +0000 (20:56 +0200)] 
Only do path logic in config_parse_dict() if value is not empty

16 months agoFix credential file parsing falling through to empty values
Richard Maw [Wed, 10 Apr 2024 14:07:40 +0000 (15:07 +0100)] 
Fix credential file parsing falling through to empty values

16 months agoOnly parse arguments again if append was specified
Daan De Meyer [Wed, 10 Apr 2024 18:51:06 +0000 (20:51 +0200)] 
Only parse arguments again if append was specified

Otherwise we won't parse any arguments anyway.

16 months agoReset append ns field value when parsing arguments again
Daan De Meyer [Wed, 10 Apr 2024 18:50:25 +0000 (20:50 +0200)] 
Reset append ns field value when parsing arguments again

16 months agoMake sure we don't chdir() again when parsing arguments again
Daan De Meyer [Wed, 10 Apr 2024 18:46:39 +0000 (20:46 +0200)] 
Make sure we don't chdir() again when parsing arguments again

When we parse arguments again for --append, let's make sure we don't
chdir() again as this breaks when using relative paths for --directory

16 months agoDelete everything in output directory that we're going to replace
Daan De Meyer [Wed, 10 Apr 2024 16:33:03 +0000 (18:33 +0200)] 
Delete everything in output directory that we're going to replace

16 months agodocs: Clarify RuntimeSize=
Daan De Meyer [Wed, 10 Apr 2024 12:07:35 +0000 (14:07 +0200)] 
docs: Clarify RuntimeSize=

16 months agoAllow setting QemuSmp=0 to use all available CPUs
Daan De Meyer [Mon, 8 Apr 2024 20:32:06 +0000 (22:32 +0200)] 
Allow setting QemuSmp=0 to use all available CPUs

16 months agoIntroduce CACHE_UID/CACHE_GID for use in the cache manifest
Daan De Meyer [Tue, 9 Apr 2024 15:40:00 +0000 (17:40 +0200)] 
Introduce CACHE_UID/CACHE_GID for use in the cache manifest

The INVOKING_USER uid and gid are potentially modified in become_root(),
causing cache mismatches depending on whether have_cache() is called
inside or outside of the user namespace.

Let's instead introduce two new constants resolved at module load time
which won't change.

16 months agoMake sure we make all kinds of scripts executable
Daan De Meyer [Tue, 9 Apr 2024 14:29:04 +0000 (16:29 +0200)] 
Make sure we make all kinds of scripts executable

16 months agoDrop unnecessary make_executable() calls
Daan De Meyer [Tue, 9 Apr 2024 14:20:34 +0000 (16:20 +0200)] 
Drop unnecessary make_executable() calls

Use the builtin constants for --include= to include the default initrd
and tools tree so that parse_config() makes the scripts executable for
us instead of having to do it ourselves.

16 months agoMake sure /var/lib/dpkg/available exists when setting up apt
Daan De Meyer [Tue, 9 Apr 2024 10:43:21 +0000 (12:43 +0200)] 
Make sure /var/lib/dpkg/available exists when setting up apt

Fixes #2610

16 months agoStore invoking user uid/gid in cache manifest
Daan De Meyer [Mon, 8 Apr 2024 16:32:53 +0000 (18:32 +0200)] 
Store invoking user uid/gid in cache manifest

Much simpler than the complicated logic we have now.

16 months agoLog when we can't rename in move_tree()
Daan De Meyer [Mon, 8 Apr 2024 16:00:35 +0000 (18:00 +0200)] 
Log when we can't rename in move_tree()

Can help explain why mkosi is slower than it should be.

16 months agoopensuse: Don't install distribution-release by default
Daan De Meyer [Mon, 8 Apr 2024 11:40:35 +0000 (13:40 +0200)] 
opensuse: Don't install distribution-release by default

distribution-release is a virtual package that is satisfied by
multiple packages. By installing it by default in the first transaction
we can't override it anymore later. Let's fix the issue by not explicitly
installing distribution-release.

To make sure openSUSE-release is pulled in by default to satisfy
distribution-release, we install patterns-base-minimal_base which has
a Suggests dependency on openSUSE-release.

16 months agoFix --debug-shell
Daan De Meyer [Mon, 8 Apr 2024 11:22:05 +0000 (13:22 +0200)] 
Fix --debug-shell

16 months agoIntroduce --append argument
Daan De Meyer [Fri, 5 Apr 2024 19:01:56 +0000 (21:01 +0200)] 
Introduce --append argument

In systemd, we want to have a default set of kernel command line
arguments and override a few of them via the command line. Introduce
--append so that we can specify settings via the command line that
are parsed after all configuration have files have been parsed to
make this possible.

16 months agoMerge pull request #2601 from DaanDeMeyer/stuff
Daan De Meyer [Mon, 8 Apr 2024 09:57:51 +0000 (11:57 +0200)] 
Merge pull request #2601 from DaanDeMeyer/stuff

Various improvements

16 months agoAdd RuntimeBuildSources= setting 2601/head
Daan De Meyer [Sun, 7 Apr 2024 17:23:02 +0000 (19:23 +0200)] 
Add RuntimeBuildSources= setting

This setting mounts the build sources and build directory into a
booted container/virtual machine in the same location that they were
mounted to do the build.

This helps both with making gdb more useful in the container as the
sources will be available for use by gdb without having to do any
source directory mapping. It also helps with doing incremental builds
inside the container.

16 months agogithub: add missing label in bug report template
Jörg Behrmann [Mon, 8 Apr 2024 08:08:00 +0000 (10:08 +0200)] 
github: add missing label in bug report template

16 months agoMount RuntimeTrees= directory without target to /root/src
Daan De Meyer [Sun, 7 Apr 2024 13:58:33 +0000 (15:58 +0200)] 
Mount RuntimeTrees= directory without target to /root/src

Let's use the same behavior for RuntimeTrees= as we use with
BuildSources=.

16 months agoMake sure the build directory is owner by root (in the userns)
Daan De Meyer [Sun, 7 Apr 2024 13:56:21 +0000 (15:56 +0200)] 
Make sure the build directory is owner by root (in the userns)

The build directory will (unless mkosi-as-caller is used) contain
files owned by root (in the userns). To make sure the correct uidmap
is used when using this directory in RuntimeTrees=, let's make sure
the directory is owned by root (in the userns).

16 months agoRemove uidmap argument from start_virtiofsd()
Daan De Meyer [Sun, 7 Apr 2024 13:55:26 +0000 (15:55 +0200)] 
Remove uidmap argument from start_virtiofsd()

Instead, automatically infer whether it's required or not based on
the owner of the directory we're passing in.

Also make whether we do selinux or not an explicit argument, and do
the same for the name used for the virtiofsd scope.

16 months agoReplace git script with environment variables
Daan De Meyer [Sun, 7 Apr 2024 13:54:07 +0000 (15:54 +0200)] 
Replace git script with environment variables

git allows setting config values via environment variables, let's
use that instead of our git script.

16 months agoRemove unnecessary colons from docs
Daan De Meyer [Sun, 7 Apr 2024 18:23:12 +0000 (20:23 +0200)] 
Remove unnecessary colons from docs

16 months agogithub: add issue template
Jörg Behrmann [Sat, 6 Apr 2024 18:27:28 +0000 (20:27 +0200)] 
github: add issue template

16 months agoMerge pull request #2351 from septatrix/feature/oci-output-format
Daan De Meyer [Fri, 5 Apr 2024 13:28:39 +0000 (15:28 +0200)] 
Merge pull request #2351 from septatrix/feature/oci-output-format

Add support for oci-dir output (fixes #1865)

16 months agoImplement creation of OCI images 2351/head
Septatrix [Wed, 27 Mar 2024 19:44:55 +0000 (20:44 +0100)] 
Implement creation of OCI images

16 months agoMount image root directory to /buildroot when running modinfo
Daan De Meyer [Fri, 5 Apr 2024 08:07:16 +0000 (10:07 +0200)] 
Mount image root directory to /buildroot when running modinfo

16 months agoMerge pull request #2593 from DaanDeMeyer/tools
Daan De Meyer [Fri, 5 Apr 2024 08:12:29 +0000 (10:12 +0200)] 
Merge pull request #2593 from DaanDeMeyer/tools

Check in spawn() whether the command we're trying to run is available

16 months agoTranslate paths to SELinux policy files to /buildroot
Joakim Nohlgård [Fri, 5 Apr 2024 07:07:26 +0000 (07:07 +0000)] 
Translate paths to SELinux policy files to /buildroot

The setfiles call was broken by 62cee058cb116684294831c4cab20924dde93e45
because the binary policy and file context files were still using the
host path in the run arguments.

Fixes the error `Error opening
/home/user/.cache/mkosi/mkosi-workspaceb5nodee6/root/etc/selinux/targeted/policy/policy.33:
No such file or directory`

16 months agoCheck in spawn() whether the command we're trying to run is available 2593/head
Daan De Meyer [Thu, 4 Apr 2024 18:29:15 +0000 (20:29 +0200)] 
Check in spawn() whether the command we're trying to run is available

Currently, if we try to run a command within a sandbox, we fail with
an unclear error if the program is not installed. This is because our
FileNotFoundError exception handler is never triggered as the program
we run via subprocess is almost always "sh" or "bwrap". Let's make sure
we also check for the actual program we're going to run in the sandbox
and show a clear error if it's not available.

16 months agoMove gpg set-priv setup command to sandbox
Daan De Meyer [Thu, 4 Apr 2024 18:28:58 +0000 (20:28 +0200)] 
Move gpg set-priv setup command to sandbox

16 months agoMove grub-bios-setup shell setup command to sandbox
Daan De Meyer [Thu, 4 Apr 2024 18:28:34 +0000 (20:28 +0200)] 
Move grub-bios-setup shell setup command to sandbox

16 months agoPass environment the usual way when we're invoking the package manager
Daan De Meyer [Thu, 4 Apr 2024 18:22:24 +0000 (20:22 +0200)] 
Pass environment the usual way when we're invoking the package manager

Let's only use "env" in the package manager scripts we make available
when running user scripts. If we're invoking the package manager ourselves,
pass the environment in the usual way.

16 months agoAdd check for depmod
Daan De Meyer [Thu, 4 Apr 2024 18:10:24 +0000 (20:10 +0200)] 
Add check for depmod

Fixes #2584

16 months agoMake sure we always sort when iterating over config files in a dir
Daan De Meyer [Thu, 4 Apr 2024 11:35:10 +0000 (13:35 +0200)] 
Make sure we always sort when iterating over config files in a dir

16 months agoAdd missing sandbox
Daan De Meyer [Thu, 4 Apr 2024 10:06:15 +0000 (12:06 +0200)] 
Add missing sandbox