]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
17 months agoOnly remove kernel modules when not generating a cached image 2459/head
Daan De Meyer [Tue, 5 Mar 2024 07:52:41 +0000 (08:52 +0100)] 
Only remove kernel modules when not generating a cached image

This allows KernelModulesExclude= to be modified without having to
rebuild the cached image every time.

Fixes #2458

17 months agoSkip process_kernel_modules if exclude is set
Daan De Meyer [Tue, 5 Mar 2024 07:51:39 +0000 (08:51 +0100)] 
Skip process_kernel_modules if exclude is set

include doesn't have any effect if exclude is not set so only check
exclude.

17 months agorename force argument of run_depmod to cache
Daan De Meyer [Tue, 5 Mar 2024 07:51:14 +0000 (08:51 +0100)] 
rename force argument of run_depmod to cache

Preparation for next commits

17 months agoMerge pull request #2373 from bluca/engine
Daan De Meyer [Mon, 4 Mar 2024 19:50:54 +0000 (20:50 +0100)] 
Merge pull request #2373 from bluca/engine

Add support for signing with OpenSSL Engines

17 months agomeasure: add support for signing PCR sections with engine/provider 2373/head
Luca Boccassi [Sun, 11 Feb 2024 00:33:24 +0000 (00:33 +0000)] 
measure: add support for signing PCR sections with engine/provider

17 months agoverity: add support for signing with an hardware token
Luca Boccassi [Sat, 10 Feb 2024 19:28:29 +0000 (19:28 +0000)] 
verity: add support for signing with an hardware token

Needs sd-repart v256 with --signing-engine parameter

Co-authored-by: Daan De Meyer <daan.j.demeyer@gmail.com>
17 months agoSecureBoot: add support for signing with an hardware token
Luca Boccassi [Sat, 10 Feb 2024 12:27:11 +0000 (12:27 +0000)] 
SecureBoot: add support for signing with an hardware token

Use ukify/sbsigntools native support for engines/providers

Co-authored-by: Daan De Meyer <daan.j.demeyer@gmail.com>
17 months agorun: set HOME to '/' if not set
Luca Boccassi [Sat, 10 Feb 2024 18:42:01 +0000 (18:42 +0000)] 
run: set HOME to '/' if not set

Avoids warnings when running pkcs11 tools

17 months agoDon't mount pkgmngr/ when installing trees
Daan De Meyer [Mon, 4 Mar 2024 09:15:09 +0000 (10:15 +0100)] 
Don't mount pkgmngr/ when installing trees

If we're copying from the host's /etc, the mounts get very weird as
we end up mounting over the directory we're copying from. Let's avoid
the weirdness by using the Config sandbox instead of the Context sandbox
which means we don't mount anything from the pkgmngr directory.

Fixes #2429

17 months agodoc: add missing environment variables for sync scripts
Jörg Behrmann [Mon, 4 Mar 2024 08:46:13 +0000 (09:46 +0100)] 
doc: add missing environment variables for sync scripts

Fixes: #2455
17 months agoremove grub2 package on s390x fedora (#2432)
Yan Song Liu [Mon, 4 Mar 2024 08:51:59 +0000 (16:51 +0800)] 
remove grub2 package on s390x fedora (#2432)

17 months agoOnly enable sha256 PCR bank for swtpm
Daan De Meyer [Sat, 2 Mar 2024 10:38:45 +0000 (11:38 +0100)] 
Only enable sha256 PCR bank for swtpm

Mimicks the same change in systemd-vmspawn
(https://github.com/systemd/systemd/commit/519bad6c2c23d3c2dc9558878becb485f3ae9057)

17 months agoSet default to "user" for RuntimeNetwork=
Daan De Meyer [Sun, 3 Mar 2024 13:16:31 +0000 (14:16 +0100)] 
Set default to "user" for RuntimeNetwork=

17 months agoAdd RuntimeNetwork= setting
Daan De Meyer [Sun, 3 Mar 2024 10:07:58 +0000 (11:07 +0100)] 
Add RuntimeNetwork= setting

Let's allow configuring exactly what networking is set up when booting
the image.

17 months agoUpdate tools tree packages docs
Daan De Meyer [Sat, 2 Mar 2024 15:48:44 +0000 (16:48 +0100)] 
Update tools tree packages docs

17 months agoInstall attr and jq in default tools trees
Daan De Meyer [Sat, 2 Mar 2024 15:00:15 +0000 (16:00 +0100)] 
Install attr and jq in default tools trees

17 months agoMerge pull request #2447 from DaanDeMeyer/tools
Daan De Meyer [Sat, 2 Mar 2024 14:47:45 +0000 (15:47 +0100)] 
Merge pull request #2447 from DaanDeMeyer/tools

Add ToolsTreeRepositories= and ToolsTreePackageManagerTrees=

17 months agoDon't try to copy UKI if we don't want EFI
Daan De Meyer [Sat, 2 Mar 2024 11:23:05 +0000 (12:23 +0100)] 
Don't try to copy UKI if we don't want EFI

Fixes #2442

17 months agoAdd ToolsTreeRepositories= and ToolsTreePackageManagerTrees= 2447/head
Daan De Meyer [Sat, 2 Mar 2024 13:29:54 +0000 (14:29 +0100)] 
Add ToolsTreeRepositories= and ToolsTreePackageManagerTrees=

Fixes #2430

17 months agoGet rid of line_join_tree_list()
Daan De Meyer [Sat, 2 Mar 2024 13:26:29 +0000 (14:26 +0100)] 
Get rid of line_join_tree_list()

17 months agoNormalize kernel module names everywhere
Daan De Meyer [Sat, 2 Mar 2024 13:07:35 +0000 (14:07 +0100)] 
Normalize kernel module names everywhere

Fixes #2443

17 months agomailmap: use a single spelling for Jörg's and Neal's contributions
Zbigniew Jędrzejewski-Szmek [Fri, 1 Mar 2024 10:58:54 +0000 (11:58 +0100)] 
mailmap: use a single spelling for Jörg's and Neal's contributions

17 months agoSet DISTRIBUTION= and RELEASE= when invoking scripts
Daan De Meyer [Fri, 23 Feb 2024 15:27:50 +0000 (16:27 +0100)] 
Set DISTRIBUTION= and RELEASE= when invoking scripts

Until now once could simply source /etc/os-release to figure this
out but this is not possible in sync scripts, so add two new env
variables to expose the distribution and release config options.

17 months agoUse --keep-directory-symlink from cp 9.5 onwards
Daan De Meyer [Fri, 23 Feb 2024 10:48:11 +0000 (11:48 +0100)] 
Use --keep-directory-symlink from cp 9.5 onwards

--keep-directory-symlink instructs cp to not fail when trying to
copy a directory onto a symlink but to follow the symlink instead.

The patch to introduce it was merged into coreutils and will be
available from coreutils 9.5 onwards.

--copy-contents has to be added as well to make
--keep-directory-symlink work. --copy-contents is generally harmless
for our use cases and won't change anything.

We also make sure gpg creates its sockets in /run instead of the
gpg homedir so they don't become part of the image. gpg automatically
uses /run if /run/user/uid exists so we create /run/user/0 to satisfy
that check.

Fixes #2168

17 months agoLimit ephemeral filename length
Daan De Meyer [Fri, 23 Feb 2024 11:08:56 +0000 (12:08 +0100)] 
Limit ephemeral filename length

17 months agoStop using /etc/crypto-policies from host or tools tree
Daan De Meyer [Fri, 23 Feb 2024 11:34:50 +0000 (12:34 +0100)] 
Stop using /etc/crypto-policies from host or tools tree

Instead we provide our policy for rpm-sequoia that generally follows
the sequoia default policy except SHA1 is allowed as various distributions
still use SHA1 in their GPG keys.

17 months agoRelax version check for systemd-vmspawn
Daan De Meyer [Fri, 23 Feb 2024 09:44:18 +0000 (10:44 +0100)] 
Relax version check for systemd-vmspawn

Let's allow development versions of v256 as well.

17 months agoAdd missing license tag
Daan De Meyer [Fri, 23 Feb 2024 07:49:54 +0000 (08:49 +0100)] 
Add missing license tag

17 months agoAdd git to default tools tree
Daan De Meyer [Thu, 22 Feb 2024 20:47:40 +0000 (21:47 +0100)] 
Add git to default tools tree

17 months agoGet rid of cast
Daan De Meyer [Thu, 22 Feb 2024 19:36:12 +0000 (20:36 +0100)] 
Get rid of cast

17 months agoReuse existing scripts for mkosi-install
Daan De Meyer [Thu, 22 Feb 2024 17:23:35 +0000 (18:23 +0100)] 
Reuse existing scripts for mkosi-install

Otherwise we'll expand the full command line twice, once as part
of the mkosi-install script, in which apt-get is expanded again.

17 months agoAdd crypto mounts when running sync scripts
Daan De Meyer [Thu, 22 Feb 2024 14:12:44 +0000 (15:12 +0100)] 
Add crypto mounts when running sync scripts

Internet access happens here so the certificates must be made
available.

17 months agoMerge pull request #2418 from DaanDeMeyer/sync
Daan De Meyer [Thu, 22 Feb 2024 13:24:21 +0000 (14:24 +0100)] 
Merge pull request #2418 from DaanDeMeyer/sync

Add support for sync scripts

17 months agoAdd support for sync scripts 2418/head
Daan De Meyer [Thu, 22 Feb 2024 09:16:22 +0000 (10:16 +0100)] 
Add support for sync scripts

Sync scripts allow updating various sources automatically before
doing a build.

17 months agoOnly do st_uid check in have_cache() if we're root
Daan De Meyer [Thu, 22 Feb 2024 09:11:24 +0000 (10:11 +0100)] 
Only do st_uid check in have_cache() if we're root

If we're not root then the check doesn't make any sense so skip it.

17 months agoMove repository metadata syncing out of run_build
Daan De Meyer [Thu, 22 Feb 2024 08:38:33 +0000 (09:38 +0100)] 
Move repository metadata syncing out of run_build

Let's do this in a separate run_sync that doesn't run in the user
namespace in preparation for adding sync scripts.

17 months agoMake sure we're root in the sandbox when invoking pacman
Daan De Meyer [Thu, 22 Feb 2024 10:48:16 +0000 (11:48 +0100)] 
Make sure we're root in the sandbox when invoking pacman

17 months agoOnly mount ephemeral build sources for package managers when running as root
Daan De Meyer [Thu, 22 Feb 2024 07:47:52 +0000 (08:47 +0100)] 
Only mount ephemeral build sources for package managers when running as root

If we're not running as root, we won't have permissions to do the overlay
mount. Hopefully bubblewrap will eventually get overlayfs support which would
make this possible.

17 months agoRename finalize_ephemeral_source_mounts and add ephemeral arguments
Daan De Meyer [Thu, 22 Feb 2024 07:28:59 +0000 (08:28 +0100)] 
Rename finalize_ephemeral_source_mounts and add ephemeral arguments

Let's make it configurable whether we make sources ephemeral or not.

17 months agoWrite a default /etc/passwd to the package manager tree
Daan De Meyer [Wed, 21 Feb 2024 17:47:33 +0000 (18:47 +0100)] 
Write a default /etc/passwd to the package manager tree

Tools like git and ssh need to be able to resolve a user so let's
make sure we write a passwd file containing information on the
invoking user and root.

We also move creation of the /var/log directory into
install_package_manager_trees().

17 months agoSandbox permission fixes
Daan De Meyer [Wed, 21 Feb 2024 17:49:11 +0000 (18:49 +0100)] 
Sandbox permission fixes

17 months agoAdd vmspawn verb
Sam Leonard [Tue, 31 Oct 2023 15:43:32 +0000 (15:43 +0000)] 
Add vmspawn verb

17 months agoVarious scripts fixes
Daan De Meyer [Wed, 21 Feb 2024 17:42:12 +0000 (18:42 +0100)] 
Various scripts fixes

- Lazy evaluate  mkosi-as-caller so it uses the right uid as the
  uid/gid of INVOKING_USER change after become_root()
- Mount the host scripts to /scripts so we don't run into permission
  errors when trying to use the scripts with mkosi-as-caller
- Don't add the package manager scripts by default
- Don't remove /scripts from PATH in a script if the name of the
  script does not have the same name as a tool in PATH so that one
  script can call another

17 months agoMerge pull request #2417 from DaanDeMeyer/fix-kernel-install
Jörg Behrmann [Thu, 22 Feb 2024 08:56:36 +0000 (09:56 +0100)] 
Merge pull request #2417 from DaanDeMeyer/fix-kernel-install

Fix kernel install

17 months agoInstall mkosi-initrd as well when building from source 2417/head
Daan De Meyer [Thu, 22 Feb 2024 07:19:36 +0000 (08:19 +0100)] 
Install mkosi-initrd as well when building from source

mkosi-initrd is now a subpackage so let's make sure we install it
when building the rpm from source.

17 months agokernel-install: Make entry_dir and kernel_image optional arguments
Daan De Meyer [Thu, 22 Feb 2024 07:18:36 +0000 (08:18 +0100)] 
kernel-install: Make entry_dir and kernel_image optional arguments

entry_dir isn't provided to the 'remove' command so let's make it
optional so we don't fail on 'remove'.

Fixes #2416.

17 months agoubuntu: Use ubuntu itself as the default tools tree distribution
Daan De Meyer [Tue, 20 Feb 2024 13:40:59 +0000 (14:40 +0100)] 
ubuntu: Use ubuntu itself as the default tools tree distribution

Now that we default to noble which has all the necessary tools, let's
use ubuntu itself as the default tools tree distribution for ubuntu.

17 months agoSkip configuration in current directory when parsing builtin configs
Daan De Meyer [Tue, 20 Feb 2024 11:09:43 +0000 (12:09 +0100)] 
Skip configuration in current directory when parsing builtin configs

Fixes #2407

17 months agoMake sure some basic scripting tools are installed in the tools tree
Daan De Meyer [Tue, 20 Feb 2024 09:43:00 +0000 (10:43 +0100)] 
Make sure some basic scripting tools are installed in the tools tree

17 months agoMerge pull request #2409 from keszybz/two-fixlets
Daan De Meyer [Tue, 20 Feb 2024 09:44:12 +0000 (10:44 +0100)] 
Merge pull request #2409 from keszybz/two-fixlets

Two fixlets

17 months agoFix gzip command invocation 2409/head
Septatrix [Tue, 20 Feb 2024 08:51:54 +0000 (09:51 +0100)] 
Fix gzip command invocation

17 months agoFix variable reference
Septatrix [Mon, 12 Feb 2024 23:24:51 +0000 (00:24 +0100)] 
Fix variable reference

17 months agoAdd missing sandbox for invocation of repo-add
Daan De Meyer [Mon, 19 Feb 2024 22:52:51 +0000 (23:52 +0100)] 
Add missing sandbox for invocation of repo-add

18 months agoInstall libarchive-tools in Debian/Ubuntu tools tree
Daan De Meyer [Mon, 19 Feb 2024 16:22:46 +0000 (17:22 +0100)] 
Install libarchive-tools in Debian/Ubuntu tools tree

makepkg needs bsdtar but is missing a dependency on libarchive-tools
on Debian/Ubuntu so install it manually as a workaround.

18 months agoMerge pull request #2402 from DaanDeMeyer/copy-uki
Daan De Meyer [Mon, 19 Feb 2024 15:36:44 +0000 (16:36 +0100)] 
Merge pull request #2402 from DaanDeMeyer/copy-uki

Decouple UKI copying from UKI building

18 months agocentos: Fix condition for using /usr/lib/sysimage/rpm with hyperscale 2402/head
Daan De Meyer [Mon, 19 Feb 2024 13:00:34 +0000 (14:00 +0100)] 
centos: Fix condition for using /usr/lib/sysimage/rpm with hyperscale

18 months agoGive CentOS SIG repositories a higher priority
Daan De Meyer [Mon, 19 Feb 2024 12:31:55 +0000 (13:31 +0100)] 
Give CentOS SIG repositories a higher priority

CentOS SIGs often ship rebuilds of existing packages which can get
out of date when CentOS 9 Stream ships a newer version. Let's make
sure that the SIG rebuild is still installed by giving all SIG
repositories a priority of 50.

18 months agoMove interactive shell logic for mkosi-chroot into chroot_cmd()
Daan De Meyer [Mon, 19 Feb 2024 09:22:29 +0000 (10:22 +0100)] 
Move interactive shell logic for mkosi-chroot into chroot_cmd()

Currently the logic applies to all scripts which does the wrong thing
except for mkosi-chroot.

18 months agomkosi-initrd: Sort package list
Daan De Meyer [Mon, 19 Feb 2024 08:42:46 +0000 (09:42 +0100)] 
mkosi-initrd: Sort package list

18 months agoubuntu: Switch default release to noble
Daan De Meyer [Sun, 18 Feb 2024 21:11:38 +0000 (22:11 +0100)] 
ubuntu: Switch default release to noble

lunar is EOL. Mantic is broken because systemd-gpt-auto-generator
is missing. We can either change the default back to Jammy or move
forward to Noble. Let's go for the second option as Noble will
release in about two months.

18 months agoREADME: fix path
Zbigniew Jędrzejewski-Szmek [Mon, 19 Feb 2024 13:45:00 +0000 (14:45 +0100)] 
README: fix path

18 months agoDecouple UKI copying from UKI building
Daan De Meyer [Sun, 18 Feb 2024 19:20:38 +0000 (20:20 +0100)] 
Decouple UKI copying from UKI building

Let's make sure that even if we don't build any UKIs, we still copy
out any existing ones.

18 months agoMerge pull request #2401 from DaanDeMeyer/bash
Daan De Meyer [Sun, 18 Feb 2024 17:50:55 +0000 (18:50 +0100)] 
Merge pull request #2401 from DaanDeMeyer/bash

Various fixes

18 months agoci: Drop excludes for debian from CI 2401/head
Daan De Meyer [Sun, 18 Feb 2024 15:11:29 +0000 (16:11 +0100)] 
ci: Drop excludes for debian from CI

rpm in Debian was updated to 4.18.2 which has the needed fix.

18 months agoMake sure to include the /usr/lib/firmware directory
Daan De Meyer [Sun, 18 Feb 2024 14:48:59 +0000 (15:48 +0100)] 
Make sure to include the /usr/lib/firmware directory

When creating a cpio, all parent directories have to be included
separately as well. We already did this properly for the parent
directories of the kernel modules directory but not yet for
/usr/lib/firmware which this commit fixes.

Fixes #2399

18 months agoCheck if source cache directory exists before mounting it
Daan De Meyer [Sun, 18 Feb 2024 14:19:54 +0000 (15:19 +0100)] 
Check if source cache directory exists before mounting it

Fixes #2397

18 months agoStart bash in the debug shell
Daan De Meyer [Sun, 18 Feb 2024 14:04:36 +0000 (15:04 +0100)] 
Start bash in the debug shell

Otherwise on Debian dash is started which is useless as an interactive
debug shell.

18 months agoHave systemd-repart generate fstab and crypttab if requested
Daan De Meyer [Tue, 26 Dec 2023 15:35:49 +0000 (16:35 +0100)] 
Have systemd-repart generate fstab and crypttab if requested

If systemd-repart is new enough, let's specify --generate-fstab= and
--generate-crypttab= so that these files are automatically generated
and included in the disk image if the corresponding new settings are
used in any partition definition files.

We also make sure systemd-repart always uses the same seed by
generating the random seed ourselves instead of leaving it up to
systemd-repart.

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

18 months agoMerge pull request #2398 from keszybz/fedora-rawhide-key-kerfuffle
Jörg Behrmann [Fri, 16 Feb 2024 19:24:55 +0000 (20:24 +0100)] 
Merge pull request #2398 from keszybz/fedora-rawhide-key-kerfuffle

Fedora rawhide key kerfuffle workaround

18 months agorpm: use Path.as_uri() in one more place 2398/head
Zbigniew Jędrzejewski-Szmek [Fri, 16 Feb 2024 17:10:45 +0000 (18:10 +0100)] 
rpm: use Path.as_uri() in one more place

18 months agofedora: for rawhide, also load key for FN+1 just in case
Zbigniew Jędrzejewski-Szmek [Fri, 16 Feb 2024 16:21:43 +0000 (17:21 +0100)] 
fedora: for rawhide, also load key for FN+1 just in case

See the commit for explanation. This fixes a problem where during
each Fedora upgrades, the local key for rawhide points to e.g. F40,
but Fedora has already branched and rawhide is actually F41.

We may specify an additional key, that will be used a future version,
but that doesn't really matter, we assume all keys as equally good.

18 months agofedora: also look for secondary GPG keys
Zbigniew Jędrzejewski-Szmek [Fri, 16 Feb 2024 16:07:04 +0000 (17:07 +0100)] 
fedora: also look for secondary GPG keys

Older Fedora versions distributed and used those. No recent
versions do that, but I think they are still generated "just in case".
So let's check for them, in case Fedora decides to use them
again, and so that checking for the very old versions works too.

18 months agoAdd missing x86 file
Daan De Meyer [Fri, 16 Feb 2024 10:58:51 +0000 (11:58 +0100)] 
Add missing x86 file

This file was accidentally not included in a previous commit.

18 months agoMerge pull request #2394 from DaanDeMeyer/manifest
Jörg Behrmann [Fri, 16 Feb 2024 09:38:32 +0000 (10:38 +0100)] 
Merge pull request #2394 from DaanDeMeyer/manifest

Manifest improvements

18 months agoManifest improvements 2394/head
Daan De Meyer [Thu, 15 Feb 2024 09:01:07 +0000 (10:01 +0100)] 
Manifest improvements

- Pass in Context instead of Config
- Fix the sandbox for all the executed commands
- Move complete_step() into record_packages()
- Fix writing of changelog

Fixes #2392

18 months agoIntroduce is_x86_variant() and is_arm_variant()
Daan De Meyer [Fri, 16 Feb 2024 08:43:02 +0000 (09:43 +0100)] 
Introduce is_x86_variant() and is_arm_variant()

Let's make sure we always check for both the 64-bit and the 32-bit
variant where it makes sense to do so. Also make sure the Debian
default image can be built for x86.

18 months agoFix apt scripts
Daan De Meyer [Thu, 15 Feb 2024 21:47:36 +0000 (22:47 +0100)] 
Fix apt scripts

18 months agoInstall jq in default image
Daan De Meyer [Thu, 15 Feb 2024 19:09:34 +0000 (20:09 +0100)] 
Install jq in default image

18 months agoFix formatting
Daan De Meyer [Thu, 15 Feb 2024 18:59:09 +0000 (19:59 +0100)] 
Fix formatting

18 months agoConfigure rpm dbpath using rpm macro
Daan De Meyer [Thu, 15 Feb 2024 18:52:59 +0000 (19:52 +0100)] 
Configure rpm dbpath using rpm macro

Let's get rid of all our cruft for fixing up the rpmdb location
after running rpm by simply making sure it gets written to the right
location in the first place.

18 months agoAdd stdout parameter to package manager invoke() functions
Daan De Meyer [Thu, 15 Feb 2024 10:28:42 +0000 (11:28 +0100)] 
Add stdout parameter to package manager invoke() functions

Let's allow getting the output when we invoke the package managers.

18 months agoapt: Set Dir::Etc and Dir::Log to absolute paths as well
Daan De Meyer [Thu, 15 Feb 2024 10:27:57 +0000 (11:27 +0100)] 
apt: Set Dir::Etc and Dir::Log to absolute paths as well

This allows "Dir" to be overridden which is needed in a later commit.

18 months agoPass in a single arguments parameter to invoke() methods
Daan De Meyer [Thu, 15 Feb 2024 09:57:29 +0000 (10:57 +0100)] 
Pass in a single arguments parameter to invoke() methods

Instead of passing in packages and options separately, let's just
have a single arguments parameter.

18 months agoMake apivfs argument of invoke() false by default
Daan De Meyer [Thu, 15 Feb 2024 09:48:26 +0000 (10:48 +0100)] 
Make apivfs argument of invoke() false by default

Let's not implicitly mount an apivfs every time we mount a package
manager but make this opt-in instead.

18 months agoMake package manager invoke() methods return the result
Daan De Meyer [Thu, 15 Feb 2024 09:43:48 +0000 (10:43 +0100)] 
Make package manager invoke() methods return the result

We also move the rpm database fixup call to the install() method
of the distribution so we don't try to do it every time we invoke
the package manager as it only needs to be done once.

18 months agoAdd mkosi-reinstall
Daan De Meyer [Thu, 15 Feb 2024 14:16:24 +0000 (15:16 +0100)] 
Add mkosi-reinstall

18 months agoOnly install amd-ucode-firmware on x86-64
Daan De Meyer [Thu, 15 Feb 2024 07:43:46 +0000 (08:43 +0100)] 
Only install amd-ucode-firmware on x86-64

Fixes #2391

18 months agoUse a private file for the newuidmap/newgidmap locking dance
Daan De Meyer [Wed, 14 Feb 2024 15:51:26 +0000 (16:51 +0100)] 
Use a private file for the newuidmap/newgidmap locking dance

Using a publicly accessible file such as /etc/subuid means that other
applications can interrupt mkosi's operation by taking the lock
themselves, so let's lock a private temporary file instead which only
mkosi's user can lock.

18 months agoAdd used package manager to cache manifest
Daan De Meyer [Wed, 14 Feb 2024 08:53:45 +0000 (09:53 +0100)] 
Add used package manager to cache manifest

If the package manager changes, the cache is invalid as the
repository metadata directories change as well, so let's invalidate
the cache when that happens.

18 months agodocs: Make "Building rpms from source" non-dnf specific
Daan De Meyer [Tue, 13 Feb 2024 20:24:42 +0000 (21:24 +0100)] 
docs: Make "Building rpms from source" non-dnf specific

Let's make the doc non-dnf specific by not relying on dnf builddep
and using mkosi-install to install packages. This allows using the
same logic for opensuse images.

We also simplify things by only installing --buildrequires since
trying to cache --requires from the rpm spec isn't very useful as
most of the --requires dependencies are automatically generated and
won't be listed by rpmspec --requires in the first place.

18 months agoMerge pull request #2385 from DaanDeMeyer/focal
Jörg Behrmann [Tue, 13 Feb 2024 16:34:52 +0000 (17:34 +0100)] 
Merge pull request #2385 from DaanDeMeyer/focal

Various apt based distribution fixes

18 months agoAdd Ubuntu Focal support to default image 2385/head
Daan De Meyer [Tue, 13 Feb 2024 15:06:31 +0000 (16:06 +0100)] 
Add Ubuntu Focal support to default image

We install fewer packages that are not available on Focal and make
sure to configure repart to disable an ext4 default feature that
isn't supported by the Jammy and Focal kernels.

18 months agoCompression improvements for apt distributions
Daan De Meyer [Tue, 13 Feb 2024 15:05:04 +0000 (16:05 +0100)] 
Compression improvements for apt distributions

Focal's kernel does not support zstd compression so let's make sure
we use xz there, just like we do for CentOS 8 Stream.

In Debian testing and sid, kernel modules are compressed now so let's
stop compressing the kernel modules initrd on those releases.

18 months agoFail early with a clear error if keyring does not exist
Daan De Meyer [Tue, 13 Feb 2024 11:26:46 +0000 (12:26 +0100)] 
Fail early with a clear error if keyring does not exist

We also introduce listify() and apply it to all repositories()
functions to make them return lists instead of generators to avoid
tripping up on the fact that generators can only be iterated once.

18 months agoMerge pull request #2381 from DaanDeMeyer/fixes
Jörg Behrmann [Mon, 12 Feb 2024 19:23:32 +0000 (20:23 +0100)] 
Merge pull request #2381 from DaanDeMeyer/fixes

Fixes

18 months agoExpand specifiers in match values as well 2381/head
Daan De Meyer [Mon, 12 Feb 2024 18:34:48 +0000 (19:34 +0100)] 
Expand specifiers in match values as well

Fixes #2379

18 months agoAdd QEMU kernel to summary
Daan De Meyer [Mon, 12 Feb 2024 18:34:33 +0000 (19:34 +0100)] 
Add QEMU kernel to summary

18 months agoMerge pull request #2377 from DaanDeMeyer/sandbox
Daan De Meyer [Mon, 12 Feb 2024 11:42:13 +0000 (12:42 +0100)] 
Merge pull request #2377 from DaanDeMeyer/sandbox

tree-wide: Introduce SandboxProtocol

18 months agoAdd mkosi-install, mkosi-upgrade and mkosi-remove scripts 2377/head
Daan De Meyer [Sun, 11 Feb 2024 22:05:36 +0000 (23:05 +0100)] 
Add mkosi-install, mkosi-upgrade and mkosi-remove scripts

These are primarily useful to provide a common way to install
packages from scripts for opensuse which might be built with either
zypper or dnf.

18 months agoMount makepkg.conf from tools tree as fallback
Daan De Meyer [Sun, 11 Feb 2024 17:11:31 +0000 (18:11 +0100)] 
Mount makepkg.conf from tools tree as fallback

If no makepkg.conf is provided by the user, mount it from the tools
tree as makepkg will fail with an error if no makepkg.conf is
available.