]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
12 months agoNudge kernel-install towards using the BLS layout 2924/head
Daan De Meyer [Mon, 29 Jul 2024 15:06:06 +0000 (17:06 +0200)] 
Nudge kernel-install towards using the BLS layout

12 months agoSet up proper environment variables for kernel-install
Daan De Meyer [Mon, 29 Jul 2024 13:38:49 +0000 (15:38 +0200)] 
Set up proper environment variables for kernel-install

If we're not explicitly disabling kernel-install during package
manager invocations, let's set up the environment to make it do the
right thing instead.

12 months agoSet $BOOT_ROOT when invoking kernel-install
Daan De Meyer [Mon, 29 Jul 2024 13:58:26 +0000 (15:58 +0200)] 
Set $BOOT_ROOT when invoking kernel-install

Instead of setting $SYSTEMD_XBOOTLDR_PATH and $SYSTEMD_ESP_PATH, let's
just set $BOOT_ROOT which does the same thing.

12 months agoBump version to 25~devel
Daan De Meyer [Mon, 29 Jul 2024 17:09:40 +0000 (19:09 +0200)] 
Bump version to 25~devel

12 months agoRelease 24.2 v24.2
Daan De Meyer [Mon, 29 Jul 2024 17:09:39 +0000 (19:09 +0200)] 
Release 24.2

12 months agoLook for $USER for the username before reading /etc/passwd
Daan De Meyer [Mon, 29 Jul 2024 15:47:47 +0000 (17:47 +0200)] 
Look for $USER for the username before reading /etc/passwd

Let's take $USER into account if set before reading /etc/passwd
for the username. This gives a way out for environments where the
uid of the user does not have an entry in /etc/passwd.

12 months agoBump version to 25~devel
Daan De Meyer [Mon, 29 Jul 2024 15:33:19 +0000 (17:33 +0200)] 
Bump version to 25~devel

12 months agoRelease 24.1
Daan De Meyer [Mon, 29 Jul 2024 15:33:18 +0000 (17:33 +0200)] 
Release 24.1

12 months agoMake do-a-release.sh handle point releases properly
Daan De Meyer [Mon, 29 Jul 2024 15:30:53 +0000 (17:30 +0200)] 
Make do-a-release.sh handle point releases properly

12 months agoHandle failure to detect the distribution in test_parse_config()
Daan De Meyer [Mon, 29 Jul 2024 10:26:51 +0000 (12:26 +0200)] 
Handle failure to detect the distribution in test_parse_config()

If /usr/lib/os-release isn't available, we can't detect the current
distribution, so let's make sure we handle that scenario as well by
checking for Distribution.custom instead of None.

Fixes #2921

12 months agoHandle dangling symlinks in rmtree() and run_clean()
Daan De Meyer [Mon, 29 Jul 2024 10:14:43 +0000 (12:14 +0200)] 
Handle dangling symlinks in rmtree() and run_clean()

12 months agoAdd missing __init__.py to mkosi/initrd/resources
Daan De Meyer [Mon, 29 Jul 2024 09:43:32 +0000 (11:43 +0200)] 
Add missing __init__.py to mkosi/initrd/resources

12 months agoAdd some documentation on how to implement a new distribution
Daan De Meyer [Mon, 29 Jul 2024 08:19:07 +0000 (10:19 +0200)] 
Add some documentation on how to implement a new distribution

12 months agocompletion: fix bash completion script
Jörg Behrmann [Sat, 27 Jul 2024 20:18:37 +0000 (22:18 +0200)] 
completion: fix bash completion script

Template the options definitions directly into the completion function, since
for some weird scoping reasons even though the script is read fine and when
running a shell with set -x one can see e.g. _mkosi_options being assigned the
proper values, the completion function still uses '' for
"${_mkosi_options[*]}".

This wasn't caught during development because the script works fine when
sourced.

12 months agoBump version to 25~devel
Daan De Meyer [Fri, 26 Jul 2024 16:05:39 +0000 (18:05 +0200)] 
Bump version to 25~devel

12 months agoRelease 24 v24
Daan De Meyer [Fri, 26 Jul 2024 16:05:36 +0000 (18:05 +0200)] 
Release 24

12 months agoUpdate NEWS
Daan De Meyer [Fri, 26 Jul 2024 15:13:07 +0000 (17:13 +0200)] 
Update NEWS

12 months agomkosi-initrd: Always add virtio_mmio to initramfs
Daan De Meyer [Fri, 26 Jul 2024 11:56:12 +0000 (13:56 +0200)] 
mkosi-initrd: Always add virtio_mmio to initramfs

12 months agomkosi-initrd: Sort module list
Daan De Meyer [Fri, 26 Jul 2024 11:55:48 +0000 (13:55 +0200)] 
mkosi-initrd: Sort module list

12 months agoFix typo
Daan De Meyer [Fri, 26 Jul 2024 11:07:50 +0000 (13:07 +0200)] 
Fix typo

12 months agoDocumentation update
Eugeny Shcheglov [Fri, 26 Jul 2024 10:33:40 +0000 (13:33 +0300)] 
Documentation update

Add IMAGE_ID and IMAGE_VERSION to the available variables list

12 months agoMerge pull request #2910 from DaanDeMeyer/qemu
Daan De Meyer [Thu, 25 Jul 2024 09:08:23 +0000 (11:08 +0200)] 
Merge pull request #2910 from DaanDeMeyer/qemu

Look up qemu and virt-fw-vars in extra search paths

12 months agoLook up qemu and virt-fw-vars in extra search paths 2910/head
Daan De Meyer [Thu, 25 Jul 2024 05:41:21 +0000 (07:41 +0200)] 
Look up qemu and virt-fw-vars in extra search paths

Because qemu uses OVMF firmware descriptions from /usr, we look
those up in the same root that we'll be invoking qemu from. Because
virt-fw-vars operates on the same files, we also invoke it in the
same root that we find qemu in.

12 months agoRemove noisy debug logging
Daan De Meyer [Thu, 25 Jul 2024 08:31:38 +0000 (10:31 +0200)] 
Remove noisy debug logging

There could potentially be a huge amount of modules and firmware
which makes these log messages very noisy. Let's drop them to make
debug logs less annoying to parse.

12 months agoAssign return code before calling sys.excepthook()
Daan De Meyer [Thu, 25 Jul 2024 07:15:13 +0000 (09:15 +0200)] 
Assign return code before calling sys.excepthook()

It seems sys.excepthook() can raise its own exception? I'm not entirely
sure what's going on, but as a safety measure, let's assign the correct
return code before we invoke sys.excepthook() so that we always exit with
the right returncode.

12 months agoMerge pull request #2779 from behrmann/completion
Zbigniew Jędrzejewski-Szmek [Wed, 24 Jul 2024 20:26:33 +0000 (22:26 +0200)] 
Merge pull request #2779 from behrmann/completion

Shell completion

12 months agoMerge pull request #2908 from DaanDeMeyer/kmod
Jörg Behrmann [Wed, 24 Jul 2024 16:47:26 +0000 (18:47 +0200)] 
Merge pull request #2908 from DaanDeMeyer/kmod

Various kernel modules improvements

12 months agoDon't clean tools tree unless at least -f is specified 2908/head
Daan De Meyer [Wed, 24 Jul 2024 15:27:26 +0000 (17:27 +0200)] 
Don't clean tools tree unless at least -f is specified

Otherwise if we run mkosi qemu and the cache is out of date we
remove the tools tree which we shouldn't do.

12 months agoAlways add all nls modules to the initramfs
Daan De Meyer [Wed, 24 Jul 2024 14:24:05 +0000 (16:24 +0200)] 
Always add all nls modules to the initramfs

Potentially required for mounting FAT filesystems so let's make sure
these are included.

12 months agoOnly include default kernel modules in default image
Daan De Meyer [Wed, 24 Jul 2024 13:47:10 +0000 (15:47 +0200)] 
Only include default kernel modules in default image

Let's add some coverage for the default modules list by enabling it
for the default image.

12 months agocompletion: forward define (hash) arrays for bash completion 2779/head
Jörg Behrmann [Wed, 24 Jul 2024 14:29:16 +0000 (16:29 +0200)] 
completion: forward define (hash) arrays for bash completion

12 months agoAlways add raid modules to the initrd
Daan De Meyer [Wed, 24 Jul 2024 13:44:20 +0000 (15:44 +0200)] 
Always add raid modules to the initrd

Raid needs to be set up from the initrd so let's make sure the
modules required to do that are always available.

12 months agoAlways dm-multipath to the initrd
Daan De Meyer [Wed, 24 Jul 2024 13:43:52 +0000 (15:43 +0200)] 
Always dm-multipath to the initrd

Required for doing multipath so let's always add it to the initrd.

12 months agoAdd all crypto modules to the initramfs
Daan De Meyer [Wed, 24 Jul 2024 13:42:51 +0000 (15:42 +0200)] 
Add all crypto modules to the initramfs

There's various crypto directories all across the kernel modules
tree. Let's make sure we include all of them so that everything
required to do crypto is always available from the initrd.

12 months agoHandle softdep module dependencies properly
Daan De Meyer [Wed, 24 Jul 2024 13:41:15 +0000 (15:41 +0200)] 
Handle softdep module dependencies properly

The softdep lines are formatted a little differently and can contain
pre: and post: so we need to make sure we handle all those cases.

12 months agokernel-install: Only build UKI if we're configured as the UKI generator
Daan De Meyer [Wed, 24 Jul 2024 14:16:13 +0000 (16:16 +0200)] 
kernel-install: Only build UKI if we're configured as the UKI generator

12 months agoDon't copy /var/lib/pacman/local when copying repository metadata
Daan De Meyer [Wed, 24 Jul 2024 10:48:42 +0000 (12:48 +0200)] 
Don't copy /var/lib/pacman/local when copying repository metadata

/var/lib/pacman/local contains the local database of installed packages.
When using "--package-cache-dir /var", we'd end up copying the local
database of the host which means pacman thinks packages are already
installed in the image even though they aren't.

Fix this by not copying /var/lib/pacman/local.

Fixes #2904

12 months agoFix typo
Daan De Meyer [Wed, 24 Jul 2024 12:20:52 +0000 (14:20 +0200)] 
Fix typo

12 months agoaction: Dump the current clock source
Daan De Meyer [Tue, 23 Jul 2024 16:20:33 +0000 (18:20 +0200)] 
action: Dump the current clock source

This can have a non-trivial performance impact so let's dump the
clock source as extra debugging information.

12 months agoIf the image is nocow, make the ephemeral copy nocow as well
Daan De Meyer [Tue, 23 Jul 2024 20:36:55 +0000 (22:36 +0200)] 
If the image is nocow, make the ephemeral copy nocow as well

On btrfs, VM images are generally recommended to be made nocow as
cow (copy-on-write) and random writes don't play well together. Let's
take this into account in copy_ephemeral() and make the ephemeral
copy nocow as well if the source is nocow.

12 months agoMove needs_clean() check out of run_clean()
Daan De Meyer [Tue, 23 Jul 2024 13:11:08 +0000 (15:11 +0200)] 
Move needs_clean() check out of run_clean()

12 months agoDrop uid/gid from cache manifest
Daan De Meyer [Tue, 23 Jul 2024 20:59:22 +0000 (22:59 +0200)] 
Drop uid/gid from cache manifest

This does not work as we call have_cache() to determine whether
we need to clean the tools tree or not and when running as root to
boot after building an image the UID/GID will differ and the tools
tree will incorrectly be considered out of date.

Let's move the UID/GID check out of have_cache() and into reuse_cache()
instead. reuse_cache() always runs after we've already potentially
unshared the user namespace and become root, so checking the owner of
the cache directory against the current UID should be a valid check
there.

12 months agoMake sure mkosi works in the initramfs
Daan De Meyer [Mon, 22 Jul 2024 13:19:16 +0000 (15:19 +0200)] 
Make sure mkosi works in the initramfs

bubblewrap uses pivot_root() which doesn't work in the initramfs as
pivot_root() requires / to be a mountpoint which is not the case in
the initramfs. So, to make sure mkosi works from within the initramfs,
let's make / a mountpoint by recursively bind-mounting / (the directory)
to another location and then switching root into the bind mount directory.

12 months agoOnly pass --expand-environment=no if we have systemd-run 254 or newer
Daan De Meyer [Mon, 22 Jul 2024 18:11:35 +0000 (20:11 +0200)] 
Only pass --expand-environment=no if we have systemd-run 254 or newer

--expand-environment= was introduced in systemd v254.

12 months agoRevert "Force user namespace in bubblewrap if we're not running as root"
Daan De Meyer [Mon, 22 Jul 2024 15:31:42 +0000 (17:31 +0200)] 
Revert "Force user namespace in bubblewrap if we're not running as root"

This reverts commit 01ac080103f2bc61ecc23334b00334e421eebb8a.

We can't check the current uid in sandbox_cmd() as it might still
change, for example in start_virtiofsd() where before we run bwrap
we might run become_root_cmd() to become root.

12 months agoMake make_cpio() take a list of files relative to the root directory
Daan De Meyer [Sun, 21 Jul 2024 21:07:01 +0000 (23:07 +0200)] 
Make make_cpio() take a list of files relative to the root directory

We operate on absolute paths all the time in kmod.py only for them to
be made relative to the root directory just before they are passed to
cpio. Let's save on the amount of allocations by always operating on
paths relative to the root directory.

Because rglob() doesn't support returning paths relative to the given
directory, we chdir() into the root directory before globbing instead.

12 months agoIgnore symlinks in /boot when fixing up kernel images
Daan De Meyer [Mon, 22 Jul 2024 08:49:59 +0000 (10:49 +0200)] 
Ignore symlinks in /boot when fixing up kernel images

12 months agoci: call shellcheck on the bash script
Zbigniew Jędrzejewski-Szmek [Sun, 21 Jul 2024 09:48:03 +0000 (11:48 +0200)] 
ci: call shellcheck on the bash script

Sadly, shellcheck does not support zsh [1], and it's not even possible
to evaluate the script with zsh because it fails with:
  _arguments:comparguments:327: can only be called from completion function
So the zsh script shall not be checked.

[1] https://github.com/koalaman/shellcheck/issues/809

12 months agocompletions: apply suggestions from shellcheck
Zbigniew Jędrzejewski-Szmek [Sun, 21 Jul 2024 09:21:49 +0000 (11:21 +0200)] 
completions: apply suggestions from shellcheck

readarray is used to create arrays. The one clear advantage is that we don't need to
override $IFS. Together with the change to not assign an unused variable, this
removes shellcheck warnings.

Nevertheless, shellcheck would still warn about the file because it doesn't
know about the variables that are in the part that is generated dynamically.

Also, move more content to the static resource file. The order of declarations
doesn't matter, so it's fine if the variables are defined below the functions.

Also, adjust the formatting in the bash resource to follow the usual style
with 'if something; then' on one line.

12 months agorefactor: move CompGen to config and stop parsing config
Zbigniew Jędrzejewski-Szmek [Sat, 20 Jul 2024 16:03:16 +0000 (18:03 +0200)] 
refactor: move CompGen to config and stop parsing config

Both changes requested in review.
The output generator for bash,fish,zsh is unchanged.

Also do minor whitespace and style adjustments as requested in review.

12 months agocompletion: make it a verb and factor it out into a separate file
Jörg Behrmann [Mon, 15 Jul 2024 17:55:58 +0000 (19:55 +0200)] 
completion: make it a verb and factor it out into a separate file

12 months agonews: add completion
Jörg Behrmann [Sat, 13 Jul 2024 11:57:55 +0000 (13:57 +0200)] 
news: add completion

12 months agoconfig: add missing help string
Zbigniew Jędrzejewski-Szmek [Fri, 28 Jun 2024 08:54:38 +0000 (10:54 +0200)] 
config: add missing help string

Follow-up for c036450ca6aa82f57765731240242a8ea77f31cc.

12 months agocompletion: add zsh
Jörg Behrmann [Sun, 16 Jun 2024 13:11:14 +0000 (15:11 +0200)] 
completion: add zsh

This completion of verbs is based on _timedatectl in systemd repo.
Completion for short options doesn't work. It also doesn't work for
timedatectl, so this needs to be fixed in both places.

Co-authored-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
12 months agocompletion: add fish
Jörg Behrmann [Wed, 12 Jun 2024 13:35:46 +0000 (15:35 +0200)] 
completion: add fish

12 months agoShow doc format options in help
Jörg Behrmann [Wed, 19 Jun 2024 16:55:58 +0000 (18:55 +0200)] 
Show doc format options in help

12 months agoAdd completion argument to print out completion scripts
Jörg Behrmann [Wed, 19 Jun 2024 16:55:01 +0000 (18:55 +0200)] 
Add completion argument to print out completion scripts

First iteration for bash only.

12 months agoconfig: stop passing static value
Zbigniew Jędrzejewski-Szmek [Sun, 21 Jul 2024 10:34:06 +0000 (12:34 +0200)] 
config: stop passing static value

ConfigAction used to be a dynamically generated class, but fortunately
it's not anymore, so we can simplify this.

12 months agoRemove argcomplete
Jörg Behrmann [Tue, 23 Apr 2024 10:32:58 +0000 (12:32 +0200)] 
Remove argcomplete

12 months agoMerge pull request #2891 from DaanDeMeyer/local-packages
Jörg Behrmann [Mon, 22 Jul 2024 08:58:40 +0000 (10:58 +0200)] 
Merge pull request #2891 from DaanDeMeyer/local-packages

Recommend PackageDirectories= to install local packages

12 months agoAdd configuration parsing rework to NEWS 2891/head
Daan De Meyer [Mon, 22 Jul 2024 08:01:41 +0000 (10:01 +0200)] 
Add configuration parsing rework to NEWS

12 months agoStop mounting build sources when running package managers
Daan De Meyer [Mon, 22 Jul 2024 05:46:13 +0000 (07:46 +0200)] 
Stop mounting build sources when running package managers

We now have PackageDirectories= to make local packages available
for installation so let's stop mounting build sources when running
package managers and tell users to use PackageDirectories= instead.

12 months agoRecommend PackageDirectories= to install local packages
Daan De Meyer [Mon, 22 Jul 2024 05:44:25 +0000 (07:44 +0200)] 
Recommend PackageDirectories= to install local packages

apt-get requires absolute paths to be specified and doesn't work
with relative paths. Let's instead recommend PackageDirectories=
which we know works the same for all distributions.

12 months agoMerge pull request #2888 from DaanDeMeyer/userns
Jörg Behrmann [Sun, 21 Jul 2024 20:51:29 +0000 (22:51 +0200)] 
Merge pull request #2888 from DaanDeMeyer/userns

Two sandboxing fixlets

12 months agoUse setresuid() and setresgid() 2888/head
Daan De Meyer [Sun, 21 Jul 2024 20:08:44 +0000 (22:08 +0200)] 
Use setresuid() and setresgid()

If we're invoked with sudo let's make sure we leak less of the fact
that we're invoked as root into the environment when running sync
scripts.

12 months agoForce user namespace in bubblewrap if we're not running as root
Daan De Meyer [Sun, 21 Jul 2024 20:07:32 +0000 (22:07 +0200)] 
Force user namespace in bubblewrap if we're not running as root

Depending on whether bwrap is installed setuid or not it might try
to not create a user namespace. Let's explicitly tell it to create
one if we're not invoking it as root to make sure one is always
created.

12 months agoAllow multilib and multilib-testing repositories for arch distribution
Guillaume [Sun, 21 Jul 2024 13:29:17 +0000 (09:29 -0400)] 
Allow multilib and multilib-testing repositories for arch distribution

12 months agoMerge pull request #2885 from DaanDeMeyer/tools
Jörg Behrmann [Sat, 20 Jul 2024 18:42:58 +0000 (20:42 +0200)] 
Merge pull request #2885 from DaanDeMeyer/tools

Choose default tools tree distribution based on host distribution

12 months agoChoose default tools tree distribution based on host distribution 2885/head
Daan De Meyer [Fri, 19 Jul 2024 08:51:57 +0000 (10:51 +0200)] 
Choose default tools tree distribution based on host distribution

Let's choose the default tools tree distribution based on the host
distribution instead of the target distribution. Why? When building
a Fedora image from Ubuntu, It's much more likely that apt-get will
be installed to build a Debian tools tree rather than requiring dnf
to be installed to build a Fedora tools tree.

12 months agoFix typing error with newer mypy
Daan De Meyer [Sat, 20 Jul 2024 13:53:12 +0000 (15:53 +0200)] 
Fix typing error with newer mypy

Python does not have block scoped variables which messes up typing
if you use the same variable name in 2 unrelated blocks so let's
rename this one to make mypy happy.

12 months agoMake ParseContext a regular class
Daan De Meyer [Fri, 19 Jul 2024 08:51:57 +0000 (10:51 +0200)] 
Make ParseContext a regular class

Let's simplify the config parsing implementation by making ParseContext
a regular class instead of a singleton. Additionally, we make ConfigAction
a global class and slightly change the behavior of --include= on the command
line by parsing all given includes after parsing all the other command line
arguments.

13 months agoMerge pull request #2882 from DaanDeMeyer/glob
Jörg Behrmann [Thu, 18 Jul 2024 19:52:13 +0000 (21:52 +0200)] 
Merge pull request #2882 from DaanDeMeyer/glob

Use PACKAGE_GLOBS in one more place

13 months agoTighten package globs 2882/head
Daan De Meyer [Thu, 18 Jul 2024 18:42:11 +0000 (20:42 +0200)] 
Tighten package globs

Debs don't do compression suffixes. Udebs aren't really used except
for stuff to do with the debian installer so ignore those as well.

13 months agoUse PACKAGE_GLOBS in one more place
Daan De Meyer [Thu, 18 Jul 2024 18:39:39 +0000 (20:39 +0200)] 
Use PACKAGE_GLOBS in one more place

13 months agoOnly pass kernel command line to ukify if there is one
Daan De Meyer [Thu, 18 Jul 2024 14:50:09 +0000 (16:50 +0200)] 
Only pass kernel command line to ukify if there is one

If we don't have any kernel command line arguments, don't pass
--cmdline to ukify.

Turns out systemd-stub will hang on boot when .cmdline contains only
a null terminator so with this change we avoid that from happening.

13 months agoDon't fail if kernel-install is not installed
Daan De Meyer [Thu, 18 Jul 2024 08:24:27 +0000 (10:24 +0200)] 
Don't fail if kernel-install is not installed

13 months agoInstall rpmautospec on Fedora and CentOS Stream 9 with EPEL
Daan De Meyer [Wed, 17 Jul 2024 14:58:57 +0000 (16:58 +0200)] 
Install rpmautospec on Fedora and CentOS Stream 9 with EPEL

Required for building some rpms so let's make sure these are installed.

13 months agoMerge pull request #2878 from DaanDeMeyer/stuff
Daan De Meyer [Wed, 17 Jul 2024 13:03:23 +0000 (15:03 +0200)] 
Merge pull request #2878 from DaanDeMeyer/stuff

Various small improvements

13 months agoAdd a repart partition definition for the root partition into the default image 2878/head
Daan De Meyer [Wed, 17 Jul 2024 10:42:04 +0000 (12:42 +0200)] 
Add a repart partition definition for the root partition into the default image

This makes sure the partition is grown on boot to fill the disk, which
is required for RuntimeSize= to work properly.

13 months agoOnly remount various directories if invoked as root
Daan De Meyer [Wed, 17 Jul 2024 10:41:25 +0000 (12:41 +0200)] 
Only remount various directories if invoked as root

If we weren't invoked as root we aren't allowed to write to any of
these anyway so no need to remount them read-only.

13 months agoSort one package list
Daan De Meyer [Wed, 17 Jul 2024 10:41:10 +0000 (12:41 +0200)] 
Sort one package list

13 months agoAdd unprivileged user to default image
Daan De Meyer [Wed, 17 Jul 2024 10:40:14 +0000 (12:40 +0200)] 
Add unprivileged user to default image

Makes testing as an unprivileged user easier. We also install sudo
and polkit in the default image to make auth work.

13 months agoFail when trying to change universal settings in subimages
Daan De Meyer [Tue, 16 Jul 2024 09:48:04 +0000 (11:48 +0200)] 
Fail when trying to change universal settings in subimages

Let's error out when users try to configure universal settings in
subimages since these will always be overridden.

13 months agoMake sure we always update the local repository metadata
Daan De Meyer [Mon, 15 Jul 2024 12:56:04 +0000 (14:56 +0200)] 
Make sure we always update the local repository metadata

The latest release of dnf5 introduced a change in behavior causing us
to not always sync the local repository metadata. To mitigate this, let's
always specify --refresh or similar for all package managers when we sync
the local repository to make sure its metadata is updated.

13 months agoOnly create local repository if actually needed
Daan De Meyer [Mon, 15 Jul 2024 07:22:21 +0000 (09:22 +0200)] 
Only create local repository if actually needed

13 months agoUse the same SPDX license identifier everywhere
Daan De Meyer [Mon, 15 Jul 2024 10:48:24 +0000 (12:48 +0200)] 
Use the same SPDX license identifier everywhere

13 months agoMerge pull request #2868 from DaanDeMeyer/packagedir
Jörg Behrmann [Sun, 14 Jul 2024 20:12:09 +0000 (22:12 +0200)] 
Merge pull request #2868 from DaanDeMeyer/packagedir

Two small improvements

13 months agoAdd DISTRIBUTION_ARCHITECTURE environment variable 2868/head
Daan De Meyer [Sun, 14 Jul 2024 14:51:53 +0000 (16:51 +0200)] 
Add DISTRIBUTION_ARCHITECTURE environment variable

13 months agoMake volatile packages available in local repository earlier 2867/head
Daan De Meyer [Sat, 13 Jul 2024 13:38:30 +0000 (15:38 +0200)] 
Make volatile packages available in local repository earlier

By making the volatile packages available earlier, we can query,
install and cache their dependencies in a prepare script.

13 months agoAdd --expand-environment+no to systemd-run command line
Daan De Meyer [Sat, 13 Jul 2024 06:56:34 +0000 (08:56 +0200)] 
Add --expand-environment+no to systemd-run command line

Otherwise systemd will try to expand environment variables in our
command instead of the shell.

13 months agoShare the package directory across all image builds
Daan De Meyer [Fri, 12 Jul 2024 15:07:22 +0000 (17:07 +0200)] 
Share the package directory across all image builds

This allows packages built by one image to easily be installed in
another image when using mkosi.images.

13 months agoMerge pull request #2864 from DaanDeMeyer/build
Daan De Meyer [Fri, 12 Jul 2024 13:21:20 +0000 (15:21 +0200)] 
Merge pull request #2864 from DaanDeMeyer/build

Various fixes to streamline using build scripts in subimages

13 months agoDrop per subimage build directory again 2864/head
Daan De Meyer [Fri, 12 Jul 2024 12:27:55 +0000 (14:27 +0200)] 
Drop per subimage build directory again

Let's leave this up to the individual subimage build scripts instead,
so that it's also possible for different subimages to share a build
directory if they want to do so.

13 months agoMark various settings as universal
Daan De Meyer [Fri, 12 Jul 2024 12:27:02 +0000 (14:27 +0200)] 
Mark various settings as universal

Let's make BuildSources=, BuildSourcesEphemeral=, WithTests= and
WithNetwork= universal so that packages can easily be built in a
subimage instead of in the main image build.

13 months agoIntroduce PassEnvironment=
Daan De Meyer [Fri, 12 Jul 2024 12:25:44 +0000 (14:25 +0200)] 
Introduce PassEnvironment=

We can't mark Environment= as a universal setting as only some environment
variables should be universal and others shouldn't be. So let's introduce
PassEnvironment= to mark specific environment variables as universal so that
they are passed to subimage builds.

13 months agoDrop --append documentation
Daan De Meyer [Fri, 12 Jul 2024 12:23:31 +0000 (14:23 +0200)] 
Drop --append documentation

13 months agoFix Images= and Dependencies= documentation
Daan De Meyer [Fri, 12 Jul 2024 12:23:07 +0000 (14:23 +0200)] 
Fix Images= and Dependencies= documentation

13 months agoFix spacing in documentation
Daan De Meyer [Fri, 12 Jul 2024 12:19:59 +0000 (14:19 +0200)] 
Fix spacing in documentation

13 months agoMake $BUILDDIR accessible to various scripts
Daan De Meyer [Fri, 12 Jul 2024 12:17:02 +0000 (14:17 +0200)] 
Make $BUILDDIR accessible to various scripts

Let's allow scripts to access the build directory so that outputs produced
by previous (sub)image builds can be accessed. Let's mount the build directory
read-only so that these scripts can't actually write to it.

13 months agoMerge pull request #2863 from DaanDeMeyer/apt
Daan De Meyer [Thu, 11 Jul 2024 11:55:25 +0000 (13:55 +0200)] 
Merge pull request #2863 from DaanDeMeyer/apt

Set RPM_FORCE_DEBIAN=1 for zypper and dnf