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

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 agoChange user to invoking user for syncing
Daan De Meyer [Mon, 4 Mar 2024 21:17:33 +0000 (22:17 +0100)] 
Change user to invoking user for syncing

We want to make sure all repository metadata that we cache in the
user's cache directory is owned by the invoking user. Let's achieve
that by running the sync stuff in a fork and dropping privileges if
we're running as root.

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 agoconfig: be more specific why a value is rejected in error message
Zbigniew Jędrzejewski-Szmek [Sat, 2 Mar 2024 10:47:43 +0000 (11:47 +0100)] 
config: be more specific why a value is rejected in error message

17 months agoutil: gather three small utility functions together
Zbigniew Jędrzejewski-Szmek [Sat, 2 Mar 2024 10:38:49 +0000 (11:38 +0100)] 
util: gather three small utility functions together

Esp. the two math-related ones can be considered related.

17 months agoRemove sync() method from distribution implementations
Daan De Meyer [Sat, 2 Mar 2024 10:55:10 +0000 (11:55 +0100)] 
Remove sync() method from distribution implementations

Instead, let's just use the method on the package manager object
directly.

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