]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
23 months agoREADME: also link to the repart talk 1900/head
Zbigniew Jędrzejewski-Szmek [Fri, 15 Sep 2023 15:26:03 +0000 (17:26 +0200)] 
README: also link to the repart talk

They mostly make sense together.

23 months agoFix synopsis in --help output
Zbigniew Jędrzejewski-Szmek [Mon, 11 Sep 2023 09:09:10 +0000 (11:09 +0200)] 
Fix synopsis in --help output

Indentation should be two spaces to match what argparse uses for all the help
options.

build does not take parameters anymore.

23 months agoBetter log message for --output
Zbigniew Jędrzejewski-Szmek [Mon, 11 Sep 2023 09:04:19 +0000 (11:04 +0200)] 
Better log message for --output

207af68047ce22777b06878b7efe77491a7c4108 broke backwards-compat. mkosi-initrd
used a call like this:
  mkosi --default /usr/lib/mkosi-initrd/fedora.mkosi --finalize-script=/usr/lib/mkosi-initrd/mkosi.finalize --image-version=6.5.0-0.rc7.20230821gitf7757129e3de.50.fc39.x86_64 --environment=KERNEL_VERSION=6.5.0-0.rc7.20230821gitf7757129e3de.50.fc39.x86_64 -o /tmp/kernel-install.staging.JEzApD/initrd
which is now refused with:
  /tmp/initrd is not a valid filename
which is not very clear, because "/tmp/initrd" is an OK filename.

Let's make the error message very clear about what is wrong.

23 months agoREADME: date references and add the newest talk
Joerg Behrmann [Fri, 15 Sep 2023 07:14:47 +0000 (09:14 +0200)] 
README: date references and add the newest talk

23 months agoMerge pull request #1898 from behrmann/community
Daan De Meyer [Wed, 13 Sep 2023 21:21:41 +0000 (23:21 +0200)] 
Merge pull request #1898 from behrmann/community

README: add a place to chat

23 months agoREADME: add a place to chat 1898/head
Joerg Behrmann [Wed, 13 Sep 2023 21:19:53 +0000 (23:19 +0200)] 
README: add a place to chat

23 months agoMerge pull request #1893 from behrmann/misctools
Daan De Meyer [Mon, 11 Sep 2023 16:17:08 +0000 (18:17 +0200)] 
Merge pull request #1893 from behrmann/misctools

Fixes for tools trees

23 months agotools: add ToolsTreePackages= 1893/head
Joerg Behrmann [Mon, 11 Sep 2023 13:03:33 +0000 (15:03 +0200)] 
tools: add ToolsTreePackages=

Since we are defaulting to testing for Debian tools trees, we will always fight
testing being occasionally broken, e.g. when packages disappear because their
newer versions can't transition from unstable.

ToolsTreePackages= adds the ability to keep using a default tools tree, but add
custom packages on top.

23 months agotools: remove dnf from the Debian tools tree packages
Joerg Behrmann [Mon, 11 Sep 2023 12:06:33 +0000 (14:06 +0200)] 
tools: remove dnf from the Debian tools tree packages

The package is currently not available in testing.

23 months agotools: use the same mirror as for other presets
Joerg Behrmann [Mon, 11 Sep 2023 12:06:20 +0000 (14:06 +0200)] 
tools: use the same mirror as for other presets

23 months agoAdd presets to summary
Daan De Meyer [Sat, 9 Sep 2023 15:03:10 +0000 (17:03 +0200)] 
Add presets to summary

23 months agoMerge pull request #1889 from DaanDeMeyer/efi
Jörg Behrmann [Sat, 9 Sep 2023 13:01:26 +0000 (15:01 +0200)] 
Merge pull request #1889 from DaanDeMeyer/efi

Don't do EFI stuff if on unsupported architecture

23 months agoAdd SystemdVersion= match 1889/head
Daan De Meyer [Sat, 9 Sep 2023 10:12:44 +0000 (12:12 +0200)] 
Add SystemdVersion= match

This matches against the systemd version on the host. This is
useful for conditionally using a tools tree if the systemd version
on the host is too old.

23 months agoDrop unused class
Daan De Meyer [Sat, 9 Sep 2023 10:01:16 +0000 (12:01 +0200)] 
Drop unused class

23 months agoAllow matching on output format
Daan De Meyer [Fri, 8 Sep 2023 19:10:48 +0000 (21:10 +0200)] 
Allow matching on output format

23 months agoMake --preset into a configuration option
Daan De Meyer [Fri, 8 Sep 2023 19:00:29 +0000 (21:00 +0200)] 
Make --preset into a configuration option

Let's allow specifying Presets= in global configuration files to
specify which presets to build.

23 months agoSupport booting uki images with direct linux boot
Daan De Meyer [Fri, 8 Sep 2023 18:48:22 +0000 (20:48 +0200)] 
Support booting uki images with direct linux boot

No reason to disallow this since we have the necessary parts available.

23 months agoDon't do EFI stuff if on unsupported architecture
Daan De Meyer [Fri, 8 Sep 2023 13:03:06 +0000 (15:03 +0200)] 
Don't do EFI stuff if on unsupported architecture

23 months agoFix --help
Daan De Meyer [Fri, 8 Sep 2023 11:04:12 +0000 (13:04 +0200)] 
Fix --help

We need to only execute --help once we have the full parser otherwise
it won't show all settings.

23 months agomkosi: be clearer what "uki" output format means
Lennart Poettering [Fri, 8 Sep 2023 08:15:40 +0000 (10:15 +0200)] 
mkosi: be clearer what "uki" output format means

As per:

https://github.com/systemd/mkosi/pull/1881#issuecomment-1711261723

23 months agoDrop Arch workaround
Daan De Meyer [Thu, 7 Sep 2023 19:31:06 +0000 (21:31 +0200)] 
Drop Arch workaround

archlinux-keyring should have been updated so this issue should be
fixed now.

23 months agoRelease 16 v16
Luca Boccassi [Thu, 7 Sep 2023 17:54:40 +0000 (18:54 +0100)] 
Release 16

23 months agoMerge pull request #1882 from DaanDeMeyer/news
Jörg Behrmann [Thu, 7 Sep 2023 17:46:37 +0000 (19:46 +0200)] 
Merge pull request #1882 from DaanDeMeyer/news

Rename "direct" firmware option to "linux"

23 months agoRename "direct" firmware option to "linux" 1882/head
Daan De Meyer [Thu, 7 Sep 2023 17:27:00 +0000 (19:27 +0200)] 
Rename "direct" firmware option to "linux"

"linux" seems like a better name rather than "direct" since we're
using Linux itself as the firmware here in a sense.

23 months agoUpdate NEWS
Daan De Meyer [Thu, 7 Sep 2023 17:21:51 +0000 (19:21 +0200)] 
Update NEWS

23 months agoMerge pull request #1881 from DaanDeMeyer/uki
Daan De Meyer [Thu, 7 Sep 2023 17:14:26 +0000 (19:14 +0200)] 
Merge pull request #1881 from DaanDeMeyer/uki

Support building unified kernel images

23 months agoci: Test cpio and uki boots in qemu 1881/head
Daan De Meyer [Thu, 7 Sep 2023 15:26:06 +0000 (17:26 +0200)] 
ci: Test cpio and uki boots in qemu

23 months agoqemu: Improve error message
Daan De Meyer [Thu, 7 Sep 2023 15:00:01 +0000 (17:00 +0200)] 
qemu: Improve error message

23 months agoqemu: Add some sanity checks
Daan De Meyer [Thu, 7 Sep 2023 14:56:28 +0000 (16:56 +0200)] 
qemu: Add some sanity checks

23 months agoSupport building unified kernel images
Daan De Meyer [Thu, 7 Sep 2023 14:25:47 +0000 (16:25 +0200)] 
Support building unified kernel images

All the necessary pieces for this already exists, so let's add this
as an additional output format.

23 months agoTake --directory into account for relative paths specified on the CLI
Daan De Meyer [Thu, 7 Sep 2023 14:28:37 +0000 (16:28 +0200)] 
Take --directory into account for relative paths specified on the CLI

Fixes #1879

23 months agoMerge pull request #1877 from DaanDeMeyer/disk-direct-boot
Jörg Behrmann [Thu, 7 Sep 2023 14:27:40 +0000 (16:27 +0200)] 
Merge pull request #1877 from DaanDeMeyer/disk-direct-boot

Support direct kernel booting a disk image

23 months agoSupport direct kernel booting a disk image 1877/head
Daan De Meyer [Thu, 7 Sep 2023 13:08:41 +0000 (15:08 +0200)] 
Support direct kernel booting a disk image

This requires two things:
1. We need to generate a split initrd again to pass to -initrd
2. We need to synthesize a root= argument as we can't rely on
gpt-auto-generator since we're not using EFI.

We move the partition and root= specific stuff to a new file
partition.py so we can access it from qemu.py as well.

We also introduce extract_pe_section() since we now use the logic
twice.

23 months agoFix split kernel image being written to state.root instead of state.staging
Daan De Meyer [Thu, 7 Sep 2023 13:01:12 +0000 (15:01 +0200)] 
Fix split kernel image being written to state.root instead of state.staging

23 months agoMerge pull request #1876 from DaanDeMeyer/firmware
Daan De Meyer [Thu, 7 Sep 2023 13:00:29 +0000 (15:00 +0200)] 
Merge pull request #1876 from DaanDeMeyer/firmware

Add QemuFirmware=auto

23 months agoAdd QemuFirmware=auto 1876/head
Daan De Meyer [Thu, 7 Sep 2023 11:56:44 +0000 (13:56 +0200)] 
Add QemuFirmware=auto

Let's introduce a new "auto" mode where we decide the firmware
based on whether we built a cpio image or a disk image. Let's also
use this as the new default.

23 months agoqemu: Rename fw variables to ovmf
Daan De Meyer [Thu, 7 Sep 2023 11:46:28 +0000 (13:46 +0200)] 
qemu: Rename fw variables to ovmf

These specifically indicate the ovmf firmware so let's make that
more clear.

23 months agoIf python3 version is too old, use python3.9 if it exists
Daan De Meyer [Thu, 7 Sep 2023 10:54:44 +0000 (12:54 +0200)] 
If python3 version is too old, use python3.9 if it exists

23 months agoMerge pull request #1874 from DaanDeMeyer/etc
Jörg Behrmann [Wed, 6 Sep 2023 16:31:48 +0000 (18:31 +0200)] 
Merge pull request #1874 from DaanDeMeyer/etc

Install ca-certificates in tools tree and make sure it's used

23 months agoInstall ca-certificates in tools tree and make sure it's used 1874/head
Daan De Meyer [Wed, 6 Sep 2023 13:11:19 +0000 (15:11 +0200)] 
Install ca-certificates in tools tree and make sure it's used

Too old ca-certificates on the host can cause package manager failures
when using a tools tree, so let's install ca-certificates into the
tools tree and make sure it is used.

23 months agoPass environment to initrd and tools tree builds
Daan De Meyer [Wed, 6 Sep 2023 14:33:07 +0000 (16:33 +0200)] 
Pass environment to initrd and tools tree builds

The environment might contain http_proxy and https_proxy which
need to be passed on to child builds to make things work correctly.

23 months agoRemove package manager generated hwdb from /etc
Daan De Meyer [Wed, 6 Sep 2023 11:57:58 +0000 (13:57 +0200)] 
Remove package manager generated hwdb from /etc

We generate the hwdb in /usr, so remove any existing one that is
leftover in /etc.

23 months agoIgnore ConnectionResetError in vsock notify handler
Daan De Meyer [Wed, 6 Sep 2023 09:58:57 +0000 (11:58 +0200)] 
Ignore ConnectionResetError in vsock notify handler

Let's handle this one gracefully but still debug log about it when
it happens.

23 months agoci: use https for OpenSUSE again
Luca Boccassi [Wed, 6 Sep 2023 11:00:39 +0000 (12:00 +0100)] 
ci: use https for OpenSUSE again

The CI is now running a version of libzypp that should improve the https
situation, let's test it for a while

23 months agoFollow up for 5462f5e31c4223a001c2ed5aa8d44177fb8454fc
Daan De Meyer [Wed, 6 Sep 2023 09:31:26 +0000 (11:31 +0200)] 
Follow up for 5462f5e31c4223a001c2ed5aa8d44177fb8454fc

The value can't be None anymore so remove redundant check.

23 months agoMerge pull request #1869 from DaanDeMeyer/reset
Jörg Behrmann [Wed, 6 Sep 2023 09:23:43 +0000 (11:23 +0200)] 
Merge pull request #1869 from DaanDeMeyer/reset

Make the empty string reset settings to their default value

23 months agoMake the empty string reset settings to their default value 1869/head
Daan De Meyer [Wed, 6 Sep 2023 07:14:10 +0000 (09:14 +0200)] 
Make the empty string reset settings to their default value

If the empty string is assigned, we should make sure the setting
is assigned its default value so let's make sure we return None in
that case after all

We also simplify the match callbacks to not take optional values
anymore. If the value is set to None, then we automatically fail
the match.

23 months agoUse array destructuring more
Daan De Meyer [Wed, 6 Sep 2023 08:45:22 +0000 (10:45 +0200)] 
Use array destructuring more

23 months agoUpdate NEWS
Daan De Meyer [Tue, 5 Sep 2023 13:47:33 +0000 (15:47 +0200)] 
Update NEWS

23 months agoDo not run modinfo on builtin modules
Daan De Meyer [Tue, 5 Sep 2023 12:58:05 +0000 (14:58 +0200)] 
Do not run modinfo on builtin modules

This causes issues on CentOS Stream 8 with errors about not being
able to find builtin modules.

Aside from the issues, running modinfo on builtin modules also does
not make a lot of sense. We run modinfo to fetch module and firmware
dependencies, but a builtin module that has non-builtin module
dependencies is not really valuable because the dependent module has
to be loaded from disk then. The same goes for firmware dependencies.

23 months agoCheck for None explicitly more when parsing config
Daan De Meyer [Tue, 5 Sep 2023 11:08:59 +0000 (13:08 +0200)] 
Check for None explicitly more when parsing config

Empty values are now possible, so let's explicitly check for None
when determining if we should return the default value.

23 months agoUse yes_no() in one more place
Daan De Meyer [Mon, 4 Sep 2023 12:56:23 +0000 (14:56 +0200)] 
Use yes_no() in one more place

23 months agoMerge pull request #1858 from DaanDeMeyer/tools
Daan De Meyer [Mon, 4 Sep 2023 12:40:29 +0000 (14:40 +0200)] 
Merge pull request #1858 from DaanDeMeyer/tools

Allow using a default tools tree

23 months agoAdd missing Preset section to parse_ini() call
Daan De Meyer [Mon, 4 Sep 2023 11:57:45 +0000 (13:57 +0200)] 
Add missing Preset section to parse_ini() call

23 months agoAllow using a default tools tree 1858/head
Daan De Meyer [Sun, 3 Sep 2023 11:55:00 +0000 (13:55 +0200)] 
Allow using a default tools tree

Instead of requiring users to always set up a tools tree preset, let's
allow specifying "default" as the tools tree to have mkosi build a default
tools tree itself. This default tools tree includes all the software that
might be necessary to build an image (excluding software that might be
required by various user scripts).

For distributions that do not have a rolling release variant, we use the
closest matching distribution. e.g. for CentOS, we use Fedora and for
Ubuntu we use Debian.

23 months agoDrop absolute= argument from parse_path
Daan De Meyer [Mon, 4 Sep 2023 09:35:10 +0000 (11:35 +0200)] 
Drop absolute= argument from parse_path

resolve does more or less the same thing already, so let's drop
absolute=

23 months agoDrop unnecessary long= for ToolsTree=
Daan De Meyer [Mon, 4 Sep 2023 09:16:00 +0000 (11:16 +0200)] 
Drop unnecessary long= for ToolsTree=

23 months agoUse logging more
Daan De Meyer [Sun, 3 Sep 2023 12:29:57 +0000 (14:29 +0200)] 
Use logging more

23 months agoOnly pass extra tools to ukify when not using tools tree
Daan De Meyer [Sun, 3 Sep 2023 11:54:01 +0000 (13:54 +0200)] 
Only pass extra tools to ukify when not using tools tree

If we're using a tools tree, we don't want to use any binaries
specifed in extra search paths as they will very likely be incompatible
with the tools tree being used.

23 months agorun openssl with empty configuration file
Daan De Meyer [Sun, 3 Sep 2023 11:52:31 +0000 (13:52 +0200)] 
run openssl with empty configuration file

We generally don't want host configuration to influence the image build,
so let's make sure we override whatever distro shipped configuration file
with an empty one to avoid the host system interfering with the image build.

23 months agoStop installing makepkg in github action
Daan De Meyer [Sun, 3 Sep 2023 11:38:00 +0000 (13:38 +0200)] 
Stop installing makepkg in github action

23 months agoStop passing tools tree to default initrd build
Daan De Meyer [Sat, 2 Sep 2023 16:37:34 +0000 (18:37 +0200)] 
Stop passing tools tree to default initrd build

It's already mounted if needed so no need to pass it to the initrd
build.

23 months agoUse array destructuring more
Daan De Meyer [Sat, 2 Sep 2023 16:18:13 +0000 (18:18 +0200)] 
Use array destructuring more

23 months agoMake fedora 39 the default fedora release
Daan De Meyer [Sat, 2 Sep 2023 12:15:50 +0000 (14:15 +0200)] 
Make fedora 39 the default fedora release

Fedora 39 will release soon so let's go ahead and make it the new
default release.

23 months agoMove default release logic to per distribution installer class
Daan De Meyer [Sat, 2 Sep 2023 12:10:26 +0000 (14:10 +0200)] 
Move default release logic to per distribution installer class

23 months agoTemporarily disable keyring checking for Arch
Daan De Meyer [Mon, 4 Sep 2023 11:17:24 +0000 (13:17 +0200)] 
Temporarily disable keyring checking for Arch

Until the archlinux-keyring package is updated, let's disable
keyring checking for Arch.

23 months agoCI: pin CentOS 9 kernel to workaround panic on shutdown
Luca Boccassi [Sun, 3 Sep 2023 13:14:52 +0000 (14:14 +0100)] 
CI: pin CentOS 9 kernel to workaround panic on shutdown

Newer kernels are affected by a regression that causes a kernel panic
on shutdown, so pin them for now. Can be reverted once that problem is
fixed.

https://bugzilla.redhat.com/show_bug.cgi?id=2234390

23 months agoci: enable jammy-proposed-updates to test new libzypp
Luca Boccassi [Sat, 2 Sep 2023 11:35:46 +0000 (12:35 +0100)] 
ci: enable jammy-proposed-updates to test new libzypp

I got some patches backported to jammy to try and fix https issues,
enable proposed-updates so that it can be tested before moving to
the release stage

23 months agoMerge pull request #1855 from DaanDeMeyer/qemu-firmware
Daan De Meyer [Fri, 1 Sep 2023 14:29:40 +0000 (16:29 +0200)] 
Merge pull request #1855 from DaanDeMeyer/qemu-firmware

QemuFirmware= and QemuKernel=

23 months agoDon't run depmod unless needed 1855/head
Daan De Meyer [Fri, 1 Sep 2023 12:32:29 +0000 (14:32 +0200)] 
Don't run depmod unless needed

For distro kernels, depmod is already executed by the package
manager, so let's make sure we don't rerun it unless needed.

To make this work, we have to run depmod and modinfo from inside the
image, as running modinfo from the host on files generated by depmod
from the image can lead to all sorts of compatibility issues so we opt
to run both depmod and modinfo from inside the image.

23 months agoAdd QemuKernel= option
Daan De Meyer [Fri, 1 Sep 2023 12:51:15 +0000 (14:51 +0200)] 
Add QemuKernel= option

This allows specifying the kernel to use for direct kernel boot
via an explicit option instead of having to rely on the QemuArgs=
option.

23 months agoPrefer kernel specified via -kernel over kernel installed in the image
Daan De Meyer [Fri, 1 Sep 2023 12:42:51 +0000 (14:42 +0200)] 
Prefer kernel specified via -kernel over kernel installed in the image

23 months agoGeneralize QemuBios to QemuFirmware
Daan De Meyer [Fri, 1 Sep 2023 12:33:09 +0000 (14:33 +0200)] 
Generalize QemuBios to QemuFirmware

We also add a third option "none", in which case we'll use direct
kernel boot.

23 months agoMerge pull request #1854 from DaanDeMeyer/empty-list
Jörg Behrmann [Fri, 1 Sep 2023 12:21:36 +0000 (14:21 +0200)] 
Merge pull request #1854 from DaanDeMeyer/empty-list

Replace ! operator for lists with empty string assignment

23 months agoMove test_parse_load_args.py tests into test_config.py 1854/head
Daan De Meyer [Fri, 1 Sep 2023 10:24:32 +0000 (12:24 +0200)] 
Move test_parse_load_args.py tests into test_config.py

23 months agoGet rid of textwrap in test_parse_load_args.py
Daan De Meyer [Fri, 1 Sep 2023 10:21:35 +0000 (12:21 +0200)] 
Get rid of textwrap in test_parse_load_args.py

parse_config() already dedents internally so no need to do it in
the tests.

23 months agoUse tmp_path in test_parse_load_args.py
Daan De Meyer [Fri, 1 Sep 2023 10:18:20 +0000 (12:18 +0200)] 
Use tmp_path in test_parse_load_args.py

23 months agoAdd config parsing test
Daan De Meyer [Fri, 1 Sep 2023 10:14:00 +0000 (12:14 +0200)] 
Add config parsing test

23 months agoDrop asyncio_mode from pyproject.toml
Daan De Meyer [Fri, 1 Sep 2023 09:58:33 +0000 (11:58 +0200)] 
Drop asyncio_mode from pyproject.toml

pytest complains this option is unknown so let's drop it.

23 months agoMake argv default to an empty tuple in parse_config()
Daan De Meyer [Fri, 1 Sep 2023 09:51:21 +0000 (11:51 +0200)] 
Make argv default to an empty tuple in parse_config()

Makes it easier to use parse_config() from tests.

23 months agoUse tmp_path fixture in test_parse_ini()
Daan De Meyer [Fri, 1 Sep 2023 09:43:57 +0000 (11:43 +0200)] 
Use tmp_path fixture in test_parse_ini()

23 months agoReplace MkosiConfigParser with parse_config()
Daan De Meyer [Fri, 1 Sep 2023 09:41:29 +0000 (11:41 +0200)] 
Replace MkosiConfigParser with parse_config()

The only reason that MkosiConfigParser is a class is to store the
lookup hashmaps required for configuration parsing. Yet we can
easily do that as well by just declaring the functions that need
those inline in a function. So let's simplify the configuration
parsing interface by replacing MkosiConfigParser with a function
parse_config().

23 months agoRevert "config: Test last assignment wins with defaults"
Daan De Meyer [Fri, 1 Sep 2023 09:32:54 +0000 (11:32 +0200)] 
Revert "config: Test last assignment wins with defaults"

This reverts commit 2fe014bc643dcc1442d0b057e20451f46345be9d.

23 months agoGet rid of cd_temp_dir()
Daan De Meyer [Fri, 1 Sep 2023 09:02:16 +0000 (11:02 +0200)] 
Get rid of cd_temp_dir()

Let's opt to just use the chdir() helper we have already instead.

23 months agoReplace `!` operator for lists with empty string assignment
Daan De Meyer [Fri, 1 Sep 2023 08:57:34 +0000 (10:57 +0200)] 
Replace `!` operator for lists with empty string assignment

Let's behave more like systemd and replace the `!` operator for
removing values from lists with assigning the empty string to remove
all values instead.

23 months agoSourceDateEpoch followups
Daan De Meyer [Fri, 1 Sep 2023 08:44:25 +0000 (10:44 +0200)] 
SourceDateEpoch followups

- Move normalize_mtime() a little close to where its used
- Put the --source-date-epoch argument on one line like the others

23 months agoMerge pull request #1845 from DaanDeMeyer/ini
Daan De Meyer [Fri, 1 Sep 2023 08:48:01 +0000 (10:48 +0200)] 
Merge pull request #1845 from DaanDeMeyer/ini

Rework ini file parsing

23 months agoRework ini file parsing 1845/head
Daan De Meyer [Mon, 28 Aug 2023 11:24:59 +0000 (13:24 +0200)] 
Rework ini file parsing

Python's configparser module is rather inadequate for our purposes.
Specifically, it's built around every setting only being specified once
in a config file and even though we got it to kind of parse more than
one of the same setting with our own custom dict type, there's a lot of
limitations involved. Specifically, assigning the empty value is
impossible with the current approach. To avoid all these issues, let's
introduce our own ini parser.

This also splits off the matching logic into a new method match_config()
and moves setting the debugging level just after we've parsed CLI options
so we get debug messages from the parser as well.

23 months agoRead paths after parsing configuration files
Daan De Meyer [Mon, 28 Aug 2023 09:35:23 +0000 (11:35 +0200)] 
Read paths after parsing configuration files

Let's first take into account the main configuration file before parsing
any configured paths. This allow the main configuration files to reset
any configured settings without resetting its own defaults configured via
paths.

23 months agoIgnore ssh configuration files when running ssh
Daan De Meyer [Thu, 31 Aug 2023 09:37:55 +0000 (11:37 +0200)] 
Ignore ssh configuration files when running ssh

When in a user namespace, the ssh config files from /etc/ will be
owned by nobody which makes ssh fail. Let's ignore these configuration
files when running ssh to avoid such failures.

Fixes #1848

23 months agoUse shlex.join in more places
Joerg Behrmann [Thu, 31 Aug 2023 07:53:13 +0000 (09:53 +0200)] 
Use shlex.join in more places

23 months agonormalize mtime
Paul Meyer [Fri, 25 Aug 2023 14:53:08 +0000 (16:53 +0200)] 
normalize mtime

If set, the time stamp from SOURCE_DATE_EPOCH is used to normalize
mtime of files. We also need to pass the environment trough when
mkosi is invoking itself.

Co-authored-by: Malte Poll <mp@edgeless.systems>
23 months agoDon't fail if tput commands fail
Daan De Meyer [Wed, 30 Aug 2023 10:05:37 +0000 (12:05 +0200)] 
Don't fail if tput commands fail

Let's consider these best effort, no need to fail mkosi if we can't
fix the terminal.

Fixes #1846

23 months agoconfig: Test last assignment wins with defaults
Michael A Cassaniti [Mon, 28 Aug 2023 01:19:28 +0000 (11:19 +1000)] 
config: Test last assignment wins with defaults

23 months agoMerge pull request #1844 from bcbnz/overlay-options
Jörg Behrmann [Tue, 29 Aug 2023 13:41:36 +0000 (15:41 +0200)] 
Merge pull request #1844 from bcbnz/overlay-options

Disable index and metacopy options of overlayfs

23 months agoMove mount options into original declaration. 1844/head
Blair Bonnett [Tue, 29 Aug 2023 13:22:19 +0000 (15:22 +0200)] 
Move mount options into original declaration.

23 months agoDisable index and metacopy options of overlayfs.
Blair Bonnett [Tue, 29 Aug 2023 12:43:52 +0000 (14:43 +0200)] 
Disable index and metacopy options of overlayfs.

If these are enabled (e.g., if the kernel enables them by default), the
mount will fail if the upper directory has been earlier used with a
different lower directory, such as with a build overlay that was
generated on top of a different temporary root.

Closes #1841.

23 months agoFix passwd check
Daan De Meyer [Tue, 29 Aug 2023 09:50:49 +0000 (11:50 +0200)] 
Fix passwd check

Fixes #1842

23 months agoMerge pull request #1836 from DaanDeMeyer/defaults
Daan De Meyer [Mon, 28 Aug 2023 08:52:39 +0000 (10:52 +0200)] 
Merge pull request #1836 from DaanDeMeyer/defaults

Support configuring default values for settings

23 months agoadd config setting seed to set systemd-repart --seed
Malte Poll [Fri, 25 Aug 2023 09:30:04 +0000 (11:30 +0200)] 
add config setting seed to set systemd-repart --seed

Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>