]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
18 months agoUse context.package_cache_dir in one more place 2338/head
Daan De Meyer [Wed, 31 Jan 2024 15:59:47 +0000 (16:59 +0100)] 
Use context.package_cache_dir in one more place

18 months agoAdd example usage of QemuDrives= to the man page
Daan De Meyer [Wed, 31 Jan 2024 15:23:06 +0000 (16:23 +0100)] 
Add example usage of QemuDrives= to the man page

18 months agoRename copy_package_manager_state() to copy_repository_metadata()
Daan De Meyer [Wed, 31 Jan 2024 15:15:35 +0000 (16:15 +0100)] 
Rename copy_package_manager_state() to copy_repository_metadata()

This matches better with sync_repository_metadata().

18 months agoFix execution workflow section
Daan De Meyer [Wed, 31 Jan 2024 15:14:31 +0000 (16:14 +0100)] 
Fix execution workflow section

18 months agoFix typo
Daan De Meyer [Wed, 31 Jan 2024 15:11:07 +0000 (16:11 +0100)] 
Fix typo

18 months agoDon't copy repository metadata when reusing a cached image
Daan De Meyer [Wed, 31 Jan 2024 15:09:56 +0000 (16:09 +0100)] 
Don't copy repository metadata when reusing a cached image

When reusing a cache we reuse the snapshot from the cache and there's
no need to copy repository metadata.

While we're at it, also remove the outdated comment.

18 months agoOnly copy repository metadata snapshot if /mkosi is empty
Daan De Meyer [Wed, 31 Jan 2024 15:08:33 +0000 (16:08 +0100)] 
Only copy repository metadata snapshot if /mkosi is empty

Otherwise we might be building using a base tree and there's no
need to copy anything.

18 months agoFix custom distribution builds
Daan De Meyer [Wed, 31 Jan 2024 14:59:05 +0000 (15:59 +0100)] 
Fix custom distribution builds

18 months agoMerge pull request #2336 from DaanDeMeyer/cache
Jörg Behrmann [Wed, 31 Jan 2024 14:50:19 +0000 (15:50 +0100)] 
Merge pull request #2336 from DaanDeMeyer/cache

Rework package manager caching

18 months agoImplement CacheOnly=metadata 2336/head
Daan De Meyer [Wed, 31 Jan 2024 13:13:37 +0000 (14:13 +0100)] 
Implement CacheOnly=metadata

We make CacheOnly= take an enum but keep backwards compat with the
boolean argument as well.

CacheOnly=metadata means we'll download packages but we won't sync
repository metadata. We also enable this in the kernel-install so that
our built initrds use exactly the same package versions as the host
system.

While we're at it we rename the internal variable to cacheonly instead
of cache_only (to match dnf's --cacheonly option). We keep the user
facing stuff the same to not break backwards compat.

We also make all of our enum functions take StrEnum as argument instead
of the generic enum.Enum.

18 months agokernel-install: Prefer dnf over dnf5
Daan De Meyer [Wed, 31 Jan 2024 13:11:53 +0000 (14:11 +0100)] 
kernel-install: Prefer dnf over dnf5

18 months agoRework package manager caching
Daan De Meyer [Tue, 30 Jan 2024 13:50:42 +0000 (14:50 +0100)] 
Rework package manager caching

Currently, CacheDirectory= is used for all caching, both incremental
images and package manager cache. While this works great for incremental
images, there's a few issues with using CacheDirectory= for all package
manager caching:

- By default we don't do any caching, this has to be explicitly
  configured by setting CacheDirectory=mkosi.cache or telling users
  to manually create mkosi.cache. This means new users might be frustrated
  by their image builds downloading everything again on subsequent builds.

- By doing package manager caches per individual mkosi project, we
  unnecessarily download multiple copies of the same repo metadata and
  packages.

- When using incremental images, if the post-install or finalize scripts
  install extra packages, these packages can trigger repository metadata
  updates, which will result in the image being built from two repository
  metadata snapshots, one from when the incremental image was built, the
  other from the new packages installed using the refreshed repository
  metadata. Even if the scripts don't trigger repository metadata updates
  themselves, because the cache is shared, the repository metadata could
  already have been updated during another image build.

- When using base trees, any images using the base tree might trigger a
  repository metadata update as well, resulting in the same issue, where
  the image is built from multiple different snapshots of the repository
  metadata.

To fix the first two issues, we introduce a new setting PackageCacheDirectory=
and make its default either a system or per user cache directory depending
on how mkosi is invoked. This makes sure we cache by default and use a shared
package manager cache directory so that we do not unnecessarily download duplicate
copies of repository metadata and packages

To fix the two remaining issues, we need to make sure we only sync repository
metadata once for each image. We opt to do this at the start of each image build
and configure the package manager commands to not do any metadata syncing by
default. To make sure the repository metadata snapshot stays available for
extension images and for incremental images, we copy the repository metadata from
the shared cache into the image itself at /mkosi/cache/<subdir>. This makes sure
that even if the repository metadata in the shared cache is refreshed by another
image build it won't remove the old snapshot for incremental builds or images
intended to be used as base trees.

To make sure the actual packages downloaded during the image build are still
written into the shared package cache, in finalize_package_manager_mounts(), we
bind mounts the relevant directories from the shared package cache instead of
from /mkosi/cache/<subdir> in the image to make sure that other image builds can
take advantage of the downloaded packages.

The /mkosi/ directory is removed from the image at the end of each image build
before packaging up the result unless we're building a directory or tar image
and CleanPackageMetadata= is explicitly disabled.

The initial sync we do at the start of each image build operates on the shared
package cache directory so that repository metadata is only refreshed once and
can be reused by other image builds.

Because package managers now prevent automatic syncing by default, we have to
rework the local package repositories slightly to make sure the local package
repository is still synced whenever it is updated. We get rid of the localrepo()
functions and opt to again write the repo definitions for the local package
repository inline to keep things simple and localized.

To avoid pacman from writing packages from the local package repository to the
shared package cache directory, we configure the local repository itself as an
additional read-only cache directory, which makes sure that pacman will read cached
packages from this directory but won't write any new packages to this directory.

For zypper we disable "keeppackages" for the local package repository to prevent
those packages from getting cached.

For dnf, we don't mount in any directory from the shared package cache for the
mkosi-packages repository to make sure it stays local to the image.

Apt doesn't support any mechanism that allows us to prevent packages from the
local repository from getting cached so we allow these to be written to the
shared package cache.

We also take the opportunity to rename the mkosi-packages repo to the mkosi repo,
and rename the accompanying config files as well;

Because pacman does not employ any sort of cache key for its repository metadata,
when using the default shared package cache directory, we use a subdirectory based
on the distribution, release and architecture that we're building for to prevent
any possible conflicts in the cache directory when different pacman based distributions
use the same repo identifiers.

To avoid issues when two instances of mkosi operate on the same package cache directory,
we take an advisory BSD lock on the cache subdirectory that we're going to sync or copy.

When building the default initrd, we make sure it uses the same repository snapshot
as the associated image.

18 months agoIntroduce PackageManager interface
Daan De Meyer [Tue, 30 Jan 2024 14:29:18 +0000 (15:29 +0100)] 
Introduce PackageManager interface

Let's start introducing a common interface for package manager
implementations. This will allow us to slowly get rid of the
functions where we do logic for each package manager because we
don't know the one that's being used. For example we add scripts
for each package manager right now which we can get rid of with a
package manager interface.

This also allows for more intuitive naming of package manager functions,
instead of invoke_dnf() we can now write Dnf.invoke().

18 months agoFix mkosi clean
Daan De Meyer [Wed, 31 Jan 2024 11:40:32 +0000 (12:40 +0100)] 
Fix mkosi clean

18 months agoHave all tree functions return the destination path
Daan De Meyer [Wed, 31 Jan 2024 07:32:40 +0000 (08:32 +0100)] 
Have all tree functions return the destination path

18 months agoRename build_initrd() to build_default_initrd()
Daan De Meyer [Tue, 30 Jan 2024 21:06:54 +0000 (22:06 +0100)] 
Rename build_initrd() to build_default_initrd()

18 months agoIntroduce want_initrd()
Daan De Meyer [Tue, 30 Jan 2024 21:05:34 +0000 (22:05 +0100)] 
Introduce want_initrd()

18 months agoDebug log in flock()
Daan De Meyer [Tue, 30 Jan 2024 20:41:54 +0000 (21:41 +0100)] 
Debug log in flock()

18 months agoWrite early apt config instead of /etc in package manager tree
Daan De Meyer [Tue, 30 Jan 2024 20:18:46 +0000 (21:18 +0100)] 
Write early apt config instead of /etc in package manager tree

This saves us from having to mount it separately as it will be mounted
as part of mounting the package manager tree.

18 months agoRemove command argument from invoke_apt()
Daan De Meyer [Tue, 30 Jan 2024 18:53:45 +0000 (19:53 +0100)] 
Remove command argument from invoke_apt()

This is always "apt-get" so let's remove the argument.

Also rename "command" and "verb" arguments for other other invoke()
functions to "operation" to be consistent in our naming.

18 months agoSimplify arch repositories() function a bit
Daan De Meyer [Tue, 30 Jan 2024 18:06:28 +0000 (19:06 +0100)] 
Simplify arch repositories() function a bit

18 months agoAdd newline between zypper repo definitions
Daan De Meyer [Tue, 30 Jan 2024 16:01:29 +0000 (17:01 +0100)] 
Add newline between zypper repo definitions

18 months agoEnsure opensuse repo id is unique
Daan De Meyer [Tue, 30 Jan 2024 15:58:01 +0000 (16:58 +0100)] 
Ensure opensuse repo id is unique

The repo ID is used as a cache key so let's make sure it is unique
based on the used url, similar to how dnf does it.

18 months agoStop using file provides in mkosi-initrd
Daan De Meyer [Tue, 30 Jan 2024 15:35:43 +0000 (16:35 +0100)] 
Stop using file provides in mkosi-initrd

These require extra metadata to be downloaded by dnf so let's instead
refer to the packages by name.

18 months agoMake options= argument for invoke_zypper() keyword-only
Daan De Meyer [Tue, 30 Jan 2024 14:37:39 +0000 (15:37 +0100)] 
Make options= argument for invoke_zypper() keyword-only

18 months agoDisable filelists on Fedora
Daan De Meyer [Tue, 30 Jan 2024 14:34:33 +0000 (15:34 +0100)] 
Disable filelists on Fedora

This was accidentally removed in a previous commit.

18 months agoSimplify clean_package_manager_metadata()
Daan De Meyer [Tue, 30 Jan 2024 14:03:00 +0000 (15:03 +0100)] 
Simplify clean_package_manager_metadata()

18 months agoUse find_rpm_gpgkey() for OpenSUSE Tumbleweed rpm keys
Daan De Meyer [Tue, 30 Jan 2024 13:49:14 +0000 (14:49 +0100)] 
Use find_rpm_gpgkey() for OpenSUSE Tumbleweed rpm keys

There's no direct url to configure for these so we modify
find_rpm_gpgkey() so that we don't pass in a url anymore.

18 months agoIntroduce INVOKING_USER.mkdir()
Daan De Meyer [Tue, 30 Jan 2024 13:43:12 +0000 (14:43 +0100)] 
Introduce INVOKING_USER.mkdir()

This function creates a directory as the appropriate user depending
on where the directory is being created.

18 months agoRemove outdated comment
Daan De Meyer [Tue, 30 Jan 2024 13:41:47 +0000 (14:41 +0100)] 
Remove outdated comment

We don't mount tools anymore at the start of the build. Mounting
them is done as part of setting the sandbox.

18 months agoInstall local packages later
Daan De Meyer [Tue, 30 Jan 2024 13:40:28 +0000 (14:40 +0100)] 
Install local packages later

Let's set these up after we've configured the package manager so
that any necessary directories exist.

18 months agoCheck if we can write to the cache directory before using it as the workspace
Daan De Meyer [Wed, 31 Jan 2024 10:17:32 +0000 (11:17 +0100)] 
Check if we can write to the cache directory before using it as the workspace

18 months agoSimplify cache directory calculation
Daan De Meyer [Tue, 30 Jan 2024 13:38:32 +0000 (14:38 +0100)] 
Simplify cache directory calculation

18 months agoMove Context creation out of build_image()
Daan De Meyer [Tue, 30 Jan 2024 13:27:35 +0000 (14:27 +0100)] 
Move Context creation out of build_image()

This allows us to reduce the indentation level of build_image().

18 months agoAdd missing log message about local repository
Daan De Meyer [Tue, 30 Jan 2024 13:24:55 +0000 (14:24 +0100)] 
Add missing log message about local repository

18 months agoIntroduce have_cache()
Daan De Meyer [Tue, 30 Jan 2024 13:24:17 +0000 (14:24 +0100)] 
Introduce have_cache()

Let's split of the logic to check whether we have a cached image
from reuse_cache().

18 months agoAdd missing license header
Daan De Meyer [Tue, 30 Jan 2024 13:23:25 +0000 (14:23 +0100)] 
Add missing license header

18 months agoClean package manager metadata on initrd-style output formats
Daan De Meyer [Tue, 30 Jan 2024 13:22:32 +0000 (14:22 +0100)] 
Clean package manager metadata on initrd-style output formats

Let's keep the size of these manageable by always removing package
manager metadata.

18 months agoDebugging improvements
Daan De Meyer [Tue, 30 Jan 2024 13:19:24 +0000 (14:19 +0100)] 
Debugging improvements

Make sure /var/log from the sandbox is persisted so we can access logs
more easily. Also enable dnf debug logging if ARG_DEBUG is set.

18 months agoRevert "Use shared package cache directory by default"
Daan De Meyer [Sat, 27 Jan 2024 15:54:44 +0000 (16:54 +0100)] 
Revert "Use shared package cache directory by default"

At least pacman isn't ready just yet for cache sharing, so let's
temporarily revert this commit. We'll reintroduce it in a later
PR.

This reverts commit 98a29486b68b0aee05eefb49e129433634d4446b.

18 months agoMerge pull request #2333 from DaanDeMeyer/fix
Jörg Behrmann [Sat, 27 Jan 2024 15:41:24 +0000 (16:41 +0100)] 
Merge pull request #2333 from DaanDeMeyer/fix

Introduce want_local_repo()

18 months agoUse shared package cache directory by default 2333/head
Daan De Meyer [Fri, 26 Jan 2024 22:05:06 +0000 (23:05 +0100)] 
Use shared package cache directory by default

Instead of having a separate package cache for each mkosi project,
let's default to having a shared package cache directory that can
also be configured separately from the incremental cache directory.

18 months agoAdd back missing call to createrepo()
Daan De Meyer [Fri, 26 Jan 2024 22:01:36 +0000 (23:01 +0100)] 
Add back missing call to createrepo()

18 months agoDrop Gentoo support
Daan De Meyer [Fri, 26 Jan 2024 21:50:11 +0000 (22:50 +0100)] 
Drop Gentoo support

Gentoo has completely stopped working and nobody has stepped up to
maintain it. It also keeps hindering refactoring so let's remove the
gentoo support so the upcoming work is easier.

18 months agoMove user related stuff to user.py
Daan De Meyer [Fri, 26 Jan 2024 20:30:50 +0000 (21:30 +0100)] 
Move user related stuff to user.py

18 months agoRework find_grub_binary()
Daan De Meyer [Fri, 26 Jan 2024 16:24:16 +0000 (17:24 +0100)] 
Rework find_grub_binary()

Instead of replacing grub with grub2, let's simply pass the binary
name without grub into the function.

18 months agoIntroduce want_local_repo()
Daan De Meyer [Fri, 26 Jan 2024 16:21:11 +0000 (17:21 +0100)] 
Introduce want_local_repo()

18 months agoMerge pull request #2331 from DaanDeMeyer/upgrade
Daan De Meyer [Fri, 26 Jan 2024 16:18:56 +0000 (17:18 +0100)] 
Merge pull request #2331 from DaanDeMeyer/upgrade

Run distribution upgrade automatically in some scenarios

18 months agoHave mageia and openmandriva inherit from Fedora 2331/head
Daan De Meyer [Fri, 26 Jan 2024 14:41:39 +0000 (15:41 +0100)] 
Have mageia and openmandriva inherit from Fedora

These are similar enough to Fedora so let's have them inherit from
Fedora.

18 months agoRework local repository
Daan De Meyer [Fri, 26 Jan 2024 12:21:23 +0000 (13:21 +0100)] 
Rework local repository

Let's have each createrepo function return the repository to use to
access the local packages and let's call this function from the setup()
functions of each distribution.

18 months agoUse generators for all repository methods
Daan De Meyer [Fri, 26 Jan 2024 14:18:45 +0000 (15:18 +0100)] 
Use generators for all repository methods

Let's use generators and a repositories() method everywhere to make
things consistent.

18 months agoapt: Switch to deb822 format
Daan De Meyer [Fri, 26 Jan 2024 12:09:07 +0000 (13:09 +0100)] 
apt: Switch to deb822 format

18 months agopacman: Make sure we pass packages to repo-add in right order
Daan De Meyer [Fri, 26 Jan 2024 10:50:37 +0000 (11:50 +0100)] 
pacman: Make sure we pass packages to repo-add in right order

According to https://wiki.archlinux.org/title/pacman/Tips_and_tricks,
the newest version has to be added last, so let's make sure we sort
the paths we pass to repo-add.

18 months agoMake sure we remove cached default initrd entries if needed
Daan De Meyer [Fri, 26 Jan 2024 10:50:02 +0000 (11:50 +0100)] 
Make sure we remove cached default initrd entries if needed

18 months agoCreate CNAME
Daan De Meyer [Fri, 26 Jan 2024 08:42:53 +0000 (09:42 +0100)] 
Create CNAME

18 months agoDelete CNAME
Daan De Meyer [Fri, 26 Jan 2024 08:41:39 +0000 (09:41 +0100)] 
Delete CNAME

18 months agoCreate CNAME
Daan De Meyer [Fri, 26 Jan 2024 07:56:04 +0000 (08:56 +0100)] 
Create CNAME

18 months agoMerge pull request #2324 from neighbourhoodie/github-page-website
Daan De Meyer [Fri, 26 Jan 2024 07:52:53 +0000 (08:52 +0100)] 
Merge pull request #2324 from neighbourhoodie/github-page-website

Add GitHub Page website from docs

18 months agoAdd CompressLevel= setting
Daan De Meyer [Thu, 25 Jan 2024 09:35:09 +0000 (10:35 +0100)] 
Add CompressLevel= setting

Let's allow configuring the compression level.

18 months agoman: Add a note on reserved prefixes
Joerg Behrmann [Wed, 24 Jan 2024 16:08:15 +0000 (17:08 +0100)] 
man: Add a note on reserved prefixes

18 months agoMerge pull request #2326 from DaanDeMeyer/news
Jörg Behrmann [Wed, 24 Jan 2024 16:34:21 +0000 (17:34 +0100)] 
Merge pull request #2326 from DaanDeMeyer/news

Update NEWS.md

18 months agoUpdate kernel-install plugin installation instructions 2326/head
Daan De Meyer [Wed, 24 Jan 2024 16:04:35 +0000 (17:04 +0100)] 
Update kernel-install plugin installation instructions

18 months agoUpdate NEWS.md
Daan De Meyer [Wed, 24 Jan 2024 15:52:17 +0000 (16:52 +0100)] 
Update NEWS.md

18 months agoWebsite: Rename Categories and change order 2324/head
hulkoba [Wed, 24 Jan 2024 13:25:10 +0000 (14:25 +0100)] 
Website: Rename Categories and change order

18 months agoUpdate link to mkosi introduction blog post
Daan De Meyer [Wed, 24 Jan 2024 12:21:27 +0000 (13:21 +0100)] 
Update link to mkosi introduction blog post

Let's stop linking the old blog from 2017 and link the newer one
that was just published instead. The old one isn't really useful
as it uses tons of features that have been removed since.

18 months agoMerge pull request #2310 from behrmann/hostonlyucode
Daan De Meyer [Wed, 24 Jan 2024 12:15:55 +0000 (13:15 +0100)] 
Merge pull request #2310 from behrmann/hostonlyucode

Add MicrocodeHost= option

18 months agoAdd GitHub Page website from docs
hulkoba [Wed, 24 Jan 2024 11:51:03 +0000 (12:51 +0100)] 
Add GitHub Page website from docs

18 months agoMerge pull request #2323 from DaanDeMeyer/tmp
Daan De Meyer [Wed, 24 Jan 2024 10:56:24 +0000 (11:56 +0100)] 
Merge pull request #2323 from DaanDeMeyer/tmp

Use a subdirectory of TMPDIR as the sandbox's /var/tmp

18 months agokernel-install: Use CPU detection to find host-specific microcode 2310/head
Joerg Behrmann [Tue, 23 Jan 2024 15:48:44 +0000 (16:48 +0100)] 
kernel-install: Use CPU detection to find host-specific microcode

18 months agoAdd MicrocodeHost option
Joerg Behrmann [Fri, 19 Jan 2024 16:09:11 +0000 (17:09 +0100)] 
Add MicrocodeHost option

18 months agoOnly build microcode when on x86_64
Joerg Behrmann [Tue, 23 Jan 2024 15:36:12 +0000 (16:36 +0100)] 
Only build microcode when on x86_64

18 months agoUse a subdirectory of TMPDIR as the sandbox's /var/tmp 2323/head
Daan De Meyer [Wed, 24 Jan 2024 09:00:38 +0000 (10:00 +0100)] 
Use a subdirectory of TMPDIR as the sandbox's /var/tmp

Let's take TMPDIR into account instead of always using /var/tmp. We
also make sure we override TMPDIR to /var/tmp in the sandbox.

18 months agoMerge pull request #2322 from DaanDeMeyer/useradd
Daan De Meyer [Wed, 24 Jan 2024 09:06:24 +0000 (10:06 +0100)] 
Merge pull request #2322 from DaanDeMeyer/useradd

Add FAQ entry on how to add regular users to image

18 months agoAdd FAQ entry on how to add regular users to image 2322/head
Daan De Meyer [Wed, 24 Jan 2024 07:52:55 +0000 (08:52 +0100)] 
Add FAQ entry on how to add regular users to image

Fixes #2320

18 months agoFix FAQ indentation
Daan De Meyer [Wed, 24 Jan 2024 09:05:47 +0000 (10:05 +0100)] 
Fix FAQ indentation

18 months agoUse a subdirectory of the workspace as TMPDIR
Daan De Meyer [Wed, 24 Jan 2024 08:58:26 +0000 (09:58 +0100)] 
Use a subdirectory of the workspace as TMPDIR

Let's properly distinguish temporary files from workspace files by
putting the temporary files in a subdirectory of the workspace.

18 months agoUse compression extension
Renjaya Raga Zenta [Wed, 24 Jan 2024 07:05:45 +0000 (14:05 +0700)] 
Use compression extension

When `SplitArtifacts=yes` and `CompressOutput=zstd`, the file extensions should be `.zst` instead of `.zstd`.

Follow up for: 9f9426ac70bbefffa657ce4d92022231b524b870

18 months agoFix MinimumVersion= check
Daan De Meyer [Tue, 23 Jan 2024 22:49:16 +0000 (23:49 +0100)] 
Fix MinimumVersion= check

18 months agoAdd markdown contents for "A re-introduction to mkosi" blog post
Daan De Meyer [Wed, 10 Jan 2024 10:15:07 +0000 (11:15 +0100)] 
Add markdown contents for "A re-introduction to mkosi" blog post

Let's keep this in the repo so it can be reviewed and so we can update
it later if needed.

18 months agoman: `--debug-shell=` -> `--debug-shell`
Winterhuman [Tue, 23 Jan 2024 12:51:55 +0000 (12:51 +0000)] 
man: `--debug-shell=` -> `--debug-shell`

`--debug-shell` refuses to take an argument, so the equal sign is misleading (aka. `--debug-shell=yes` errors out), so let's remove it from the `man` page.

18 months agoMerge pull request #2316 from DaanDeMeyer/ssh
Daan De Meyer [Tue, 23 Jan 2024 12:32:40 +0000 (13:32 +0100)] 
Merge pull request #2316 from DaanDeMeyer/ssh

Don't use a tools tree for verbs that don't need a build

18 months agoOnly use tools trees for verbs that need a build 2316/head
Daan De Meyer [Mon, 22 Jan 2024 19:51:00 +0000 (20:51 +0100)] 
Only use tools trees for verbs that need a build

Currently we try to use a tools tree that isn't there for verbs
that don't need a build. Let's instead opt to not use one altogether
since building an entire image just to run ssh is kind of overkill.

18 months agoDon't require a build for journalctl and coredumctl
Daan De Meyer [Mon, 22 Jan 2024 19:50:28 +0000 (20:50 +0100)] 
Don't require a build for journalctl and coredumctl

These only make sense after we've booted the image, so requiring a
build is kind of backwards.

18 months agoMerge pull request #2313 from DaanDeMeyer/resources
Daan De Meyer [Tue, 23 Jan 2024 10:49:45 +0000 (11:49 +0100)] 
Merge pull request #2313 from DaanDeMeyer/resources

Allow including builtin configs

18 months agoMerge pull request #2317 from keszybz/pythonesque-tweaks
Daan De Meyer [Tue, 23 Jan 2024 10:25:44 +0000 (11:25 +0100)] 
Merge pull request #2317 from keszybz/pythonesque-tweaks

Minor cleanups to code

18 months agokernel-install: Use builtin mkosi-initrd configuration 2313/head
Daan De Meyer [Mon, 22 Jan 2024 14:21:01 +0000 (15:21 +0100)] 
kernel-install: Use builtin mkosi-initrd configuration

18 months agoAllow including builtin configs
Daan De Meyer [Mon, 22 Jan 2024 14:17:01 +0000 (15:17 +0100)] 
Allow including builtin configs

Let's make it possible to include builtin configurations using
e.g. Include=mkosi-initrd. This allows building the default initrd
or default tools tree independently whereas currently these can only
be built as part of another image.

18 months agoRename inner parse_config() to parse_config_one()
Daan De Meyer [Mon, 22 Jan 2024 13:58:41 +0000 (14:58 +0100)] 
Rename inner parse_config() to parse_config_one()

Let's not use the same function name for the inner and outer function.

18 months agoExtract mkosi.resources once
Daan De Meyer [Mon, 22 Jan 2024 13:23:16 +0000 (14:23 +0100)] 
Extract mkosi.resources once

Instead of extracting individual files and directories when we need
them, let's extract the resources once and pass the extracted path
around so that we don't have to deal with context managers every time
we want to use resources.

18 months agoExtract full resources instead of specific paths
Daan De Meyer [Mon, 22 Jan 2024 12:57:35 +0000 (13:57 +0100)] 
Extract full resources instead of specific paths

18 months agoDrop unnecessary parentheses around conditionals 2317/head
Zbigniew Jędrzejewski-Szmek [Tue, 23 Jan 2024 09:39:48 +0000 (10:39 +0100)] 
Drop unnecessary parentheses around conditionals

18 months agoDrop unneeded inner function
Zbigniew Jędrzejewski-Szmek [Mon, 22 Jan 2024 09:45:32 +0000 (10:45 +0100)] 
Drop unneeded inner function

The result should be exactly the same.

One of the loops was using inverted logic (continue-if-not-else-yield instead
of yield-if), so invert that for consistency.

18 months agosandbox: Deal correctly with unmerged-usr
Daan De Meyer [Mon, 22 Jan 2024 15:05:07 +0000 (16:05 +0100)] 
sandbox: Deal correctly with unmerged-usr

If /bin and such are directories instead of symlinks, bind mount
them in to the sandbox.

Fixes #2314

18 months agoRelease 20.2 v20.2
Luca Boccassi [Mon, 22 Jan 2024 12:17:22 +0000 (12:17 +0000)] 
Release 20.2

18 months agoUpdate NEWS
Daan De Meyer [Mon, 22 Jan 2024 11:43:41 +0000 (12:43 +0100)] 
Update NEWS

18 months agoUse an r-string for regexp
Zbigniew Jędrzejewski-Szmek [Mon, 22 Jan 2024 09:41:41 +0000 (10:41 +0100)] 
Use an r-string for regexp

I think we should do so everywhere to avoid double escaping,
even if here the string is the same length in both cases.

19 months agoImplement RepositoryKeyCheck= for apt
Daan De Meyer [Fri, 19 Jan 2024 11:21:47 +0000 (12:21 +0100)] 
Implement RepositoryKeyCheck= for apt

19 months agoUpdate NEWS
Daan De Meyer [Fri, 19 Jan 2024 08:39:51 +0000 (09:39 +0100)] 
Update NEWS

19 months agoHandle builds that run from directories with less than two parent dirs
Daan De Meyer [Thu, 18 Jan 2024 19:40:20 +0000 (20:40 +0100)] 
Handle builds that run from directories with less than two parent dirs

Fixes #2302

19 months agoMerge pull request #2301 from DaanDeMeyer/depmod
Jörg Behrmann [Thu, 18 Jan 2024 11:17:29 +0000 (12:17 +0100)] 
Merge pull request #2301 from DaanDeMeyer/depmod

Improve check for whether we have to rerun depmod