]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
17 months agoFilter and sort all mounts in sandbox_cmd() 2511/head
Daan De Meyer [Fri, 15 Mar 2024 10:57:14 +0000 (11:57 +0100)] 
Filter and sort all mounts in sandbox_cmd()

We don't want users of sandbox_cmd() to have to care about mount
ordering. Currently, if mounts with a more general destination are
ordered after mounts with a more specific destination, the earlier
mount is hidden by the later mount. By sorting by destination, we
avoid this issue.

17 months agoIntroduce Mount named tuple to pass mounts to sandbox_cmd()
Daan De Meyer [Fri, 15 Mar 2024 08:59:04 +0000 (09:59 +0100)] 
Introduce Mount named tuple to pass mounts to sandbox_cmd()

No change in behavior, but this will allow us to post-process mounts
in sandbox_cmd() in later commits.

17 months agoMerge pull request #2510 from DaanDeMeyer/microcode
Jörg Behrmann [Fri, 15 Mar 2024 09:03:48 +0000 (10:03 +0100)] 
Merge pull request #2510 from DaanDeMeyer/microcode

Microcode improvements

17 months agoBuild microcode initrd for ESP and UKI images in save_uki_components() 2510/head
Daan De Meyer [Fri, 15 Mar 2024 07:41:55 +0000 (08:41 +0100)] 
Build microcode initrd for ESP and UKI images in save_uki_components()

Otherwise the necessary files might have already been removed from
the rootfs.

17 months agoDon't remove microcode files in process_kernel_modules()
Daan De Meyer [Fri, 15 Mar 2024 07:39:21 +0000 (08:39 +0100)] 
Don't remove microcode files in process_kernel_modules()

These are somewhat special so let's not remove them in
process_kernel_modules().

17 months agokmod: Simplify
Daan De Meyer [Fri, 15 Mar 2024 07:40:58 +0000 (08:40 +0100)] 
kmod: Simplify

Both m and fw are already absolute paths to within the root.

17 months agoMerge pull request #2508 from CodethinkLabs/richardmaw/shared-build-machine-fixes
Jörg Behrmann [Thu, 14 Mar 2024 17:07:55 +0000 (18:07 +0100)] 
Merge pull request #2508 from CodethinkLabs/richardmaw/shared-build-machine-fixes

Misc fixes for running mkosi as root on a shared build machines

17 months agoRestore all of a user's groups when running sync 2508/head
Richard Maw [Wed, 13 Mar 2024 17:30:34 +0000 (17:30 +0000)] 
Restore all of a user's groups when running sync

Shared development hardware often has storage partitioned up by project
groups, with the root of the shared storage owned by root:project.

Since this group isn't the primary group of the user
using setgroups and restoring groups to just the user's primary gid
will mean that it does not have this project group gid
and so won't be able to see the contents of this shared directory.

Using getgrouplist to get all of the groups from the user database
allows these additional groups to be set.

17 months agoReorder ExtraSearchPaths mounts before options
Richard Maw [Wed, 13 Mar 2024 17:17:39 +0000 (17:17 +0000)] 
Reorder ExtraSearchPaths mounts before options

When not running in a tools tree the extra search paths are
read-only bind-mounted into the sandbox.

Files are initially created in the workspace tree but then moved
into the output directory after they are complete.

If the directories are on different devices the rename syscall
falls back to a copy then delete.

It is not unusual to have a single build output directory
and you might potentially want your mkosi output directory in there.

If you are adding ExtraSearchPaths to use just-built executables
then this probably points to your `build/` directory.

If search paths are bind-mounted in read-only after the copy command's
sandboxing options, then this generates a command-line with options:
`--bind build/mkosi.output build/mkosi.output ... --bind-ro build build`
which means that the output directory is not writable.

Ordering the sandbox's own mount arguments before the command's options
should ensure the read-only search paths mount doesn't inferfere with
the command's writable bind-mounts.

17 months agoMerge pull request #2507 from DaanDeMeyer/flock
Daan De Meyer [Thu, 14 Mar 2024 15:24:55 +0000 (16:24 +0100)] 
Merge pull request #2507 from DaanDeMeyer/flock

Be more careful about concurrent access to outputs

17 months agoIntroduce flock_or_die() and use it in various places 2507/head
Daan De Meyer [Thu, 14 Mar 2024 13:54:45 +0000 (14:54 +0100)] 
Introduce flock_or_die() and use it in various places

Let's avoid weird error cases caused by two instances of mkosi trying
to currently do stuff with the same output by taking a BSD lock when
trying to do something with the output.

17 months agoIntroduce lock_repository_metadata()
Daan De Meyer [Thu, 14 Mar 2024 13:30:25 +0000 (14:30 +0100)] 
Introduce lock_repository_metadata()

17 months agoAdd flags argument to flock()
Daan De Meyer [Thu, 14 Mar 2024 13:21:14 +0000 (14:21 +0100)] 
Add flags argument to flock()

17 months agoRelease 22 v22
Luca Boccassi [Thu, 14 Mar 2024 11:19:28 +0000 (11:19 +0000)] 
Release 22

17 months agoUpdate NEWS
Daan De Meyer [Thu, 14 Mar 2024 09:08:08 +0000 (10:08 +0100)] 
Update NEWS

17 months agoSet $PROFILE to the current profile
Daan De Meyer [Thu, 14 Mar 2024 08:40:58 +0000 (09:40 +0100)] 
Set $PROFILE to the current profile

17 months agoMerge pull request #2487 from behrmann/cisection
Daan De Meyer [Thu, 14 Mar 2024 08:35:20 +0000 (09:35 +0100)] 
Merge pull request #2487 from behrmann/cisection

ci: print group section lines for GitHub workflow

17 months agoci: print group section lines for GitHub workflow 2487/head
Jörg Behrmann [Tue, 12 Mar 2024 15:16:29 +0000 (16:16 +0100)] 
ci: print group section lines for GitHub workflow

Partially fixes: #2361

17 months agoarch: install dbus-broker and dbus-broker-units explicitly
Jörg Behrmann [Tue, 12 Mar 2024 16:56:27 +0000 (17:56 +0100)] 
arch: install dbus-broker and dbus-broker-units explicitly

dbus and dbus-units have been split in Arch recently. Currently everything
seems to be pulled in CI, let's see whether we can get this down to just
dbus-broker.

17 months agoci: Remove btrfs logic
Daan De Meyer [Thu, 14 Mar 2024 07:16:32 +0000 (08:16 +0100)] 
ci: Remove btrfs logic

Doesn't seem to noticeably speed things up.

17 months agoMerge pull request #2499 from DaanDeMeyer/async-rm
Daan De Meyer [Thu, 14 Mar 2024 07:11:15 +0000 (08:11 +0100)] 
Merge pull request #2499 from DaanDeMeyer/async-rm

ci: Free up disk space asynchronously

17 months agoci: Btrfs mount option tuning 2499/head
Daan De Meyer [Wed, 13 Mar 2024 22:51:11 +0000 (23:51 +0100)] 
ci: Btrfs mount option tuning

Let's choose the lowest compression level so as to not impact CPU
usage too much. Use noatime as it's generally a straight speed boost
and make sure some new btrfs features are enabled (should already
be enabled but never hurts to be sure).

17 months agoci: Free up disk space asynchronously
Daan De Meyer [Wed, 13 Mar 2024 22:10:51 +0000 (23:10 +0100)] 
ci: Free up disk space asynchronously

Free-ing up disk space can take up to 8 minutes so let's make sure
we do it asynchronously since we don't need the free space immediately.

17 months agoMerge pull request #2497 from DaanDeMeyer/btrfs
Daan De Meyer [Wed, 13 Mar 2024 22:46:19 +0000 (23:46 +0100)] 
Merge pull request #2497 from DaanDeMeyer/btrfs

Use btrfs in CI

17 months agoci: Do all work on a btrfs filesystem 2497/head
Daan De Meyer [Wed, 13 Mar 2024 16:20:19 +0000 (17:20 +0100)] 
ci: Do all work on a btrfs filesystem

Let's make sure we take advantage of our COW and subvolume support
in CI by doing all work in a btrfs filesystem. Additionally enable
compression and user subvolume deletes on the btrfs filesystem to
speed things up even more.

17 months agoAlways create directories as invoking user if not invoked as root
Daan De Meyer [Wed, 13 Mar 2024 21:05:24 +0000 (22:05 +0100)] 
Always create directories as invoking user if not invoked as root

We don't want to leak the subuids into the system, so make sure any
directories created by INVOKING_USER.mkdir() are always created as
the invoking user if we're not invoked as root.

17 months agoFix double whitespace
Daan De Meyer [Wed, 13 Mar 2024 16:19:55 +0000 (17:19 +0100)] 
Fix double whitespace

17 months agoOptimize rmtree() for btrfs subvolumes
Daan De Meyer [Wed, 13 Mar 2024 16:18:50 +0000 (17:18 +0100)] 
Optimize rmtree() for btrfs subvolumes

Try "btrfs subvolume delete" on subvolumes and fall back to a regular
delete since it will fail for unprivileged users without the
user_subvol_rm_allowed mount option.

17 months agoOptimize is_subvolume()
Daan De Meyer [Wed, 13 Mar 2024 16:18:16 +0000 (17:18 +0100)] 
Optimize is_subvolume()

Try the condition that doesn't need a subprocess to run first.

17 months agoUse KVM when running an x86 image on x86_64
Daan De Meyer [Wed, 13 Mar 2024 14:34:36 +0000 (15:34 +0100)] 
Use KVM when running an x86 image on x86_64

17 months agoci: Enable KVM
Daan De Meyer [Wed, 13 Mar 2024 13:16:17 +0000 (14:16 +0100)] 
ci: Enable KVM

Since https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/,
it seems that KVM has started working, so let's make sure we take
advantage of it to speed up CI.

17 months agoMerge pull request #2492 from DaanDeMeyer/timeout
Daan De Meyer [Wed, 13 Mar 2024 13:04:23 +0000 (14:04 +0100)] 
Merge pull request #2492 from DaanDeMeyer/timeout

Extend timeout of systemd-machine-id-commit.service to 90s

17 months agoRun sync scripts in strict sandbox again
Daan De Meyer [Wed, 13 Mar 2024 08:43:08 +0000 (09:43 +0100)] 
Run sync scripts in strict sandbox again

We can't use a relaxed sandbox as we need to be able to mount the
directories containing certificates and keys from the tools tree
(finalize_crypto_mounts()) which will fail with permission errors
in a relaxed sandbox if the required mountpoints do not already
exist in the host filesystem.

So let's switch back to a strict sandbox, except that we now always
run as root in the strict sandbox so the overlay mount for /usr from
the package manager tree won't fail anymore.

Partial revert of 9dd49ad22944bdb90a748d5b35d138ed1ce0ae2a

17 months agoExtend timeout of systemd-machine-id-commit.service to 90s 2492/head
Daan De Meyer [Wed, 13 Mar 2024 12:07:42 +0000 (13:07 +0100)] 
Extend timeout of systemd-machine-id-commit.service to 90s

Should hopefully reduce the number of CI failures.
See https://github.com/systemd/systemd/pull/31750

17 months agoRemove mkosi.extra from .gitignore
Daan De Meyer [Wed, 13 Mar 2024 12:06:56 +0000 (13:06 +0100)] 
Remove mkosi.extra from .gitignore

It's way to complicated to include files in an excluded directory so
let's simply not exclude it.

17 months agoFix typing error
Daan De Meyer [Wed, 13 Mar 2024 10:45:16 +0000 (11:45 +0100)] 
Fix typing error

We drop the special logic for TERM since we do **env later which
will make sure any value for TERM from env overrides the default
value we pick.

17 months agoMerge pull request #2478 from DaanDeMeyer/shim
Daan De Meyer [Wed, 13 Mar 2024 10:27:33 +0000 (11:27 +0100)] 
Merge pull request #2478 from DaanDeMeyer/shim

Boot improvements

17 months agoRework QemuFirmware= 2478/head
Daan De Meyer [Mon, 11 Mar 2024 13:57:58 +0000 (14:57 +0100)] 
Rework QemuFirmware=

- Use the qemu official firmware descriptions to look up OVMF
  firmware instead of having our own homegrown logic.
- Add QemuFirmware=uefi-secure-boot to explicitly look for firmware
  with secure boot support
- Add QemuFirmwareVariables=microsoft to use OVMF variables with
  Microsoft keys enrolled
- Add QemuFirmwareVariables=custom to enroll the certificate from
  SecureBootCertificate= into the OVMF variables

This commit also contains the changes from a second commit that
was accidentally rebased into this one:

Only use already signed binaries when ShimBootloader=signed

When we're using signed shim, we need to make sure we use already
signed bootloaders, kernel images and UKIs. Anything we sign ourselves
will cause security violations in shim.

17 months agoDon't log sandbox for every command
Daan De Meyer [Tue, 12 Mar 2024 21:29:56 +0000 (21:29 +0000)] 
Don't log sandbox for every command

This is excessively verbose. Let's instead log only the command
we're executing but still log the full sandbox if a command fails.

17 months agoPass custom environment to other verbs as well
Daan De Meyer [Wed, 13 Mar 2024 10:08:49 +0000 (11:08 +0100)] 
Pass custom environment to other verbs as well

Let's use both the host environment and the custom env variables,
and let the custom env variables override the host ones.

17 months agoCheck for TERM=unknown and set TERM=dumb if not on tty
Daan De Meyer [Tue, 12 Mar 2024 20:05:50 +0000 (20:05 +0000)] 
Check for TERM=unknown and set TERM=dumb if not on tty

in CI, TERM is set to "unknown" so let's check for that and translate
it to "dumb" if we're not on a tty which systemd checks for when it
decides whether to enable logging or not. Also set TERM itself on
the kernel command line which is another thing parsed by systemd to check
whether to log colors or not. Finally, make sure we set "TERM" correctly
in our own environment that is passed to scripts

17 months agoUse sandbox for cp --version
Daan De Meyer [Tue, 12 Mar 2024 19:41:47 +0000 (19:41 +0000)] 
Use sandbox for cp --version

So that we detect the correct version.

17 months agoSimplify chroot_cmd()
Daan De Meyer [Tue, 12 Mar 2024 18:14:11 +0000 (18:14 +0000)] 
Simplify chroot_cmd()

17 months agoReduce number of mounts in rmtree()
Daan De Meyer [Tue, 12 Mar 2024 17:45:25 +0000 (17:45 +0000)] 
Reduce number of mounts in rmtree()

Make sure we mount each parent directory only once.

17 months agoDrop --verbose from grub tools if --debug is specified
Daan De Meyer [Tue, 12 Mar 2024 17:15:28 +0000 (17:15 +0000)] 
Drop --verbose from grub tools if --debug is specified

This makes grub tools incredibly noisy so let's drop it given
this has been working smoothly for a while now.

17 months agoStop setting SYSTEMD_LOG_LEVEL=debug when --debug is specified
Daan De Meyer [Tue, 12 Mar 2024 16:42:41 +0000 (16:42 +0000)] 
Stop setting SYSTEMD_LOG_LEVEL=debug when --debug is specified

This is generally too noisy (tmpfiles, sysusers and presets especially).
Let's not imply it when using --debug.

17 months agoDisable SELinux relabeling by default for default image
Daan De Meyer [Tue, 12 Mar 2024 16:41:51 +0000 (16:41 +0000)] 
Disable SELinux relabeling by default for default image

Sometimes selinux-policy gets pulled in as a dependency, causing
SELinux relabels even though we don't care about SELinux at all in
the general case, so let's by default not relabel anything.

17 months agoStreamline test logging
Daan De Meyer [Tue, 12 Mar 2024 16:12:06 +0000 (16:12 +0000)] 
Streamline test logging

Let's get rid of the status messages in favor of logging the journal
itself to the console. Let's also make sure we get info messages on
the console from the journal. Finally, make the kernel log at INFO
level instead of the default WARNING.

17 months agoSkip UKI/ESP/CPIO format boot for all distributions
Daan De Meyer [Tue, 12 Mar 2024 08:32:26 +0000 (09:32 +0100)] 
Skip UKI/ESP/CPIO format boot for all distributions

We need to write a separate test with a minimal image for these as
these images have to fit into memory.

17 months agoCatch ENODEV as well when checking if a device is available
Daan De Meyer [Tue, 12 Mar 2024 11:19:31 +0000 (12:19 +0100)] 
Catch ENODEV as well when checking if a device is available

This triggers on kernel updates on Arch without rebooting first so
let's make sure we handle it as well.

17 months agoUse --close with flock and drop --no-fork
Daan De Meyer [Tue, 12 Mar 2024 08:38:29 +0000 (09:38 +0100)] 
Use --close with flock and drop --no-fork

Let's make sure only flock holds the lock and it's not inherited by
the child process it spawns. This fixes an SELinux denial on some
systems.

17 months agoDon't remount /usr read-only if the output dir is inside of it
Daan De Meyer [Mon, 11 Mar 2024 22:39:08 +0000 (23:39 +0100)] 
Don't remount /usr read-only if the output dir is inside of it

Because some build systems use output directories in /usr, let's only remount
/usr read-only if the output directory is not relative to it.

17 months agoFix --local-mirror mounting
Daan De Meyer [Mon, 11 Mar 2024 21:37:14 +0000 (22:37 +0100)] 
Fix --local-mirror mounting

This can be specified as a URI, let's make sure we handle that
properly.

17 months agoOnly mount /etc/resolv.conf if it actually exists
Daan De Meyer [Mon, 11 Mar 2024 18:53:46 +0000 (19:53 +0100)] 
Only mount /etc/resolv.conf if it actually exists

17 months agoHandle symlink explicitly in finalize_staging()
Daan De Meyer [Mon, 11 Mar 2024 16:33:57 +0000 (17:33 +0100)] 
Handle symlink explicitly in finalize_staging()

move_tree() doesn't handle symlinks so add some special casing for
the symlink we create in the staging directory.

Fixes #2479

17 months agoMerge pull request #2477 from DaanDeMeyer/fix
Daan De Meyer [Mon, 11 Mar 2024 15:52:08 +0000 (16:52 +0100)] 
Merge pull request #2477 from DaanDeMeyer/fix

Run sync scripts in relaxed sandbox without package manager trees

17 months agoRun sync scripts in relaxed sandbox without package manager trees 2477/head
Daan De Meyer [Mon, 11 Mar 2024 11:22:09 +0000 (12:22 +0100)] 
Run sync scripts in relaxed sandbox without package manager trees

Sync scripts run as the invoking user in the sandbox, which means
that they're not able to mount an overlayfs over /usr in the sandbox
to overlay extra files from package manager trees.

To circumvent the issue, let's run sync scripts in a relaxed sandbox
without package manager trees, which shouldn't be crucial to have
when running sync scripts.

17 months agoAlways run as root in Context sandbox
Daan De Meyer [Mon, 11 Mar 2024 11:18:01 +0000 (12:18 +0100)] 
Always run as root in Context sandbox

If there's files in /usr in the package manager tree, we need to
be running as root to mount an overlayfs on top of /usr so make
sure we are always root in the Context sandbox.

17 months agoMerge pull request #2476 from DaanDeMeyer/grub
Daan De Meyer [Mon, 11 Mar 2024 10:46:36 +0000 (11:46 +0100)] 
Merge pull request #2476 from DaanDeMeyer/grub

Add grub for EFI support

17 months agoAdd grub for EFI support 2476/head
Daan De Meyer [Sun, 10 Mar 2024 21:15:39 +0000 (22:15 +0100)] 
Add grub for EFI support

We also rework the grub setup to not copy the grub modules into the
ESP anymore. We do this as grub for EFI booted in secure boot mode
does not load any unsigned modules for security reasons so we opt
to include all necessary modules into the grub image itself.

17 months agoMake sign_efi_binary work on same input/output
Daan De Meyer [Sun, 10 Mar 2024 21:38:16 +0000 (22:38 +0100)] 
Make sign_efi_binary work on same input/output

17 months agoMerge pull request #2475 from DaanDeMeyer/uki
Daan De Meyer [Sun, 10 Mar 2024 21:05:15 +0000 (22:05 +0100)] 
Merge pull request #2475 from DaanDeMeyer/uki

Add UnifiedKernelImages=

17 months agoAdd UnifiedKernelImages= 2475/head
Daan De Meyer [Sun, 10 Mar 2024 15:45:32 +0000 (16:45 +0100)] 
Add UnifiedKernelImages=

Allows configuring whether we use UKIs or BLS Type 1 entries with
systemd-boot and grub on UEFI.

The BLS Type 1 logic we already had for grub on BIOS is made generic
and reused to implement this feature.

Partially fixes #2472.

17 months agoReturn output path from sign_efi_binary()
Daan De Meyer [Sun, 10 Mar 2024 15:43:30 +0000 (16:43 +0100)] 
Return output path from sign_efi_binary()

17 months agoRename various initrd files
Daan De Meyer [Sun, 10 Mar 2024 15:32:39 +0000 (16:32 +0100)] 
Rename various initrd files

Let's use consistent naming with ".initrd" as the extension for
initrds we create.

17 months agoSet $SYSTEMD_ESP_PATH and $SYSTEMD_XBOOTLDR_PATH when invoking kernel-install
Daan De Meyer [Sun, 10 Mar 2024 19:27:14 +0000 (20:27 +0100)] 
Set $SYSTEMD_ESP_PATH and $SYSTEMD_XBOOTLDR_PATH when invoking kernel-install

Just like bootctl, kernel-install looks at these environment variables
so let's make sure to set them for kernel-install as well.

17 months agoSet $SYSTEMD_XBOOTLDR_PATH when invoking bootctl install
Daan De Meyer [Sun, 10 Mar 2024 15:31:03 +0000 (16:31 +0100)] 
Set $SYSTEMD_XBOOTLDR_PATH when invoking bootctl install

This makes sure various directories are created in /boot instead
of /efi.

17 months agoAdd support for io.systemd.boot.kernel-cmdline-extra
Daan De Meyer [Sun, 10 Mar 2024 15:29:07 +0000 (16:29 +0100)] 
Add support for io.systemd.boot.kernel-cmdline-extra

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

17 months agoMake config available as a json file
Cornelius Hoffmann [Sat, 9 Mar 2024 12:27:57 +0000 (13:27 +0100)] 
Make config available as a json file

Allows to access cli arguments and profile settings without reparsing the
config in scripts

17 months agoDocument default KernelCommandLine
Cornelius Hoffmann [Sun, 10 Mar 2024 13:54:01 +0000 (14:54 +0100)] 
Document default KernelCommandLine

17 months agoFix cleaning of package cache directory
Daan De Meyer [Thu, 7 Mar 2024 21:00:48 +0000 (22:00 +0100)] 
Fix cleaning of package cache directory

17 months agoMerge pull request #2470 from DaanDeMeyer/initrd
Jörg Behrmann [Thu, 7 Mar 2024 14:01:06 +0000 (15:01 +0100)] 
Merge pull request #2470 from DaanDeMeyer/initrd

Make sure the default initrd cache is properly cleaned up by mkosi clean

17 months agoMake sure the default initrd cache is properly cleaned up by mkosi clean 2470/head
Daan De Meyer [Thu, 7 Mar 2024 13:10:25 +0000 (14:10 +0100)] 
Make sure the default initrd cache is properly cleaned up by mkosi clean

Instead of doing the cleanup in build_default_initrd(), let's split off
finalize_default_initrd() so that we can clean up the cache in run_clean()
instead.

17 months agoUse lint.select in pyproject.toml
Daan De Meyer [Thu, 7 Mar 2024 13:09:33 +0000 (14:09 +0100)] 
Use lint.select in pyproject.toml

Fixes the following warning:

"""
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'select' -> 'lint.select'
"""

17 months agoMerge pull request #2469 from DaanDeMeyer/logging
Daan De Meyer [Thu, 7 Mar 2024 12:25:39 +0000 (13:25 +0100)] 
Merge pull request #2469 from DaanDeMeyer/logging

Two fixes

17 months agoDon't fix package manager metadata ownership after syncing metadata 2469/head
Daan De Meyer [Thu, 7 Mar 2024 11:35:27 +0000 (12:35 +0100)] 
Don't fix package manager metadata ownership after syncing metadata

Syncing metadata is now done as the invoking user, so there's no need
to fix ownership after syncing.

17 months agoOnly log once about syncing package manager metadata
Daan De Meyer [Thu, 7 Mar 2024 11:35:14 +0000 (12:35 +0100)] 
Only log once about syncing package manager metadata

17 months agoRelease 21 v21
Luca Boccassi [Thu, 7 Mar 2024 09:42:09 +0000 (09:42 +0000)] 
Release 21

17 months agoCopy existing crypto policies from the host into package manager tree
Daan De Meyer [Wed, 6 Mar 2024 19:53:11 +0000 (20:53 +0100)] 
Copy existing crypto policies from the host into package manager tree

apt on Fedora uses gnutls which requires
/etc/crypto-policies/back-ends/gnutls.config to work properly. Let's
copy the default crypto policies from the tools tree into the package
manager tree to make sure things keep working.

17 months agoMerge pull request #2465 from DaanDeMeyer/kmod
Jörg Behrmann [Wed, 6 Mar 2024 14:20:56 +0000 (15:20 +0100)] 
Merge pull request #2465 from DaanDeMeyer/kmod

Speed up kernel modules initrd generation if no excludes were specified

17 months agoCheck for bootctl before checking its version
Daan De Meyer [Wed, 6 Mar 2024 13:02:32 +0000 (14:02 +0100)] 
Check for bootctl before checking its version

Fixes #2466

17 months agoSpeed up kernel modules initrd generation if no excludes were specified 2465/head
Daan De Meyer [Wed, 6 Mar 2024 12:01:35 +0000 (13:01 +0100)] 
Speed up kernel modules initrd generation if no excludes were specified

If no excludes were specified, we can just glob all modules and firmware
without going via modinfo. We can only do this if no firmware was installed
as otherwise we end up copying firmware into the initrd that's not depended
on by any kernel modules.

17 months agoUse rglob() in one more place
Daan De Meyer [Wed, 6 Mar 2024 12:04:21 +0000 (13:04 +0100)] 
Use rglob() in one more place

17 months agoFix kernel_modules_include_host in summary
Daan De Meyer [Wed, 6 Mar 2024 12:02:58 +0000 (13:02 +0100)] 
Fix kernel_modules_include_host in summary

17 months agoclarify use of secure boot key for PCR signature
averdow [Tue, 5 Mar 2024 21:20:24 +0000 (15:20 -0600)] 
clarify use of secure boot key for PCR signature

17 months agoMake mkosi-check-and-shutdown log to console as well
Daan De Meyer [Tue, 5 Mar 2024 11:51:05 +0000 (12:51 +0100)] 
Make mkosi-check-and-shutdown log to console as well

Helps debugging CI failures

17 months agoMerge pull request #2463 from DaanDeMeyer/news
Daan De Meyer [Tue, 5 Mar 2024 13:37:12 +0000 (14:37 +0100)] 
Merge pull request #2463 from DaanDeMeyer/news

Update NEWS

17 months agoDon't explicitly run sync scripts as invoking user anymore
Daan De Meyer [Tue, 5 Mar 2024 12:03:10 +0000 (13:03 +0100)] 
Don't explicitly run sync scripts as invoking user anymore

We now change user to the invoking user when running sync scripts so
there's no need to explicitly run sync scripts as the invoking user
anymore.

17 months agoUpdate NEWS 2463/head
Daan De Meyer [Tue, 5 Mar 2024 12:22:17 +0000 (13:22 +0100)] 
Update NEWS

17 months agoAdd systemd tooling version checks for OpenSSL engine settings
Daan De Meyer [Tue, 5 Mar 2024 12:33:46 +0000 (13:33 +0100)] 
Add systemd tooling version checks for OpenSSL engine settings

17 months agoMerge pull request #2451 from keszybz/string-strip-prefix-helper
Daan De Meyer [Tue, 5 Mar 2024 12:21:53 +0000 (13:21 +0100)] 
Merge pull request #2451 from keszybz/string-strip-prefix-helper

Add string strip prefix helper

17 months agoMerge pull request #2460 from DaanDeMeyer/clean
Daan De Meyer [Tue, 5 Mar 2024 11:56:01 +0000 (12:56 +0100)] 
Merge pull request #2460 from DaanDeMeyer/clean

Package manager metadata cleaning fixes

17 months agoAdd little helper that combines str.startswith and str.removeprefix 2451/head
Zbigniew Jędrzejewski-Szmek [Sat, 2 Mar 2024 11:01:54 +0000 (12:01 +0100)] 
Add little helper that combines str.startswith and str.removeprefix

This way we don't need to repeat the prefix string.

17 months agoInline always variable 2460/head
Daan De Meyer [Tue, 5 Mar 2024 11:00:26 +0000 (12:00 +0100)] 
Inline always variable

17 months agoPrefer to not clean package manager metadata when building directory or tar image
Daan De Meyer [Tue, 5 Mar 2024 10:40:12 +0000 (11:40 +0100)] 
Prefer to not clean package manager metadata when building directory or tar image

These output formats are often intended to be used as base trees on
which to build extension images so let's not remove package manager
metadata from these unless explicitly requested by the user.

17 months agoAlways copy repository metadata to workspace directory
Daan De Meyer [Tue, 5 Mar 2024 10:35:44 +0000 (11:35 +0100)] 
Always copy repository metadata to workspace directory

Even if the repository metadata is not removed in
clean_package_manager_metadata(), it might still be removed by
RemoveFiles= or in a finalize script later on, so let's be safe
rather than sorry and always copy the package manager metadata if
it's located inside the image root directory.

17 months agoDo not clean package manager metadata when building an overlay
Daan De Meyer [Tue, 5 Mar 2024 10:34:38 +0000 (11:34 +0100)] 
Do not clean package manager metadata when building an overlay

In this case the package manager metadata comes from the base tree
and we should not try to remove it in the overlayfs.

17 months agoMerge pull request #2444 from DaanDeMeyer/sync
Daan De Meyer [Tue, 5 Mar 2024 10:32:33 +0000 (11:32 +0100)] 
Merge pull request #2444 from DaanDeMeyer/sync

Change user to invoking user for syncing

17 months agoMerge pull request #2459 from DaanDeMeyer/kmod
Jörg Behrmann [Tue, 5 Mar 2024 09:36:42 +0000 (10:36 +0100)] 
Merge pull request #2459 from DaanDeMeyer/kmod

Only remove kernel modules when not generating a cached image

17 months agoMake sure unpacked resources can be accessed by the invoking user 2444/head
Daan De Meyer [Tue, 5 Mar 2024 09:16:39 +0000 (10:16 +0100)] 
Make sure unpacked resources can be accessed by the invoking user

Sometimes we run commands as the invoking user and these commands
should be able to access the resources. If the resources are unpacked
to a temporary directory, this directory will have mode 0700 so we
need to relax the permissions to make sure it can be accessed by the
invoking user.