]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
22 months agoMount over /etc/passwd when building an image and running build script 1923/head
Daan De Meyer [Mon, 25 Sep 2023 11:57:29 +0000 (13:57 +0200)] 
Mount over /etc/passwd when building an image and running build script

Various tools parse /etc/passwd, so let's make sure it contains the
expected lines when building an image. Also, when running the build
script, mount over /etc/passwd in the image as various build tools
will also query the current user in /etc/passwd (e.g. the kernel's
build script runs "whoami"). Also add a root entry to the /etc/passwd
we generate so both the user running mkosi and root are covered.

22 months agoMake sure we always clean up /work
Daan De Meyer [Mon, 25 Sep 2023 11:54:46 +0000 (13:54 +0200)] 
Make sure we always clean up /work

Currently we only clean up /work if the build script succeeds.
However, we have to always clean up /work since we don't make a
copy of the build overlay so let's make sure we do that by using
a trap instead of only cleaning up if a script succeeds.

Let's also make sure that we don't fail if /work already exists and
make sure that if gets the right permissions, even if it already
exists.

22 months agoMerge pull request #1919 from DaanDeMeyer/uid
Daan De Meyer [Mon, 25 Sep 2023 09:21:21 +0000 (11:21 +0200)] 
Merge pull request #1919 from DaanDeMeyer/uid

Set MKOSI_UID and MKOSI_GID when running scripts

22 months agoSet MKOSI_UID and MKOSI_GID when running scripts 1919/head
Daan De Meyer [Mon, 25 Sep 2023 08:40:46 +0000 (10:40 +0200)] 
Set MKOSI_UID and MKOSI_GID when running scripts

These point to the UID/GID of the user running mkosi and can be used
to run commands as that user in scripts by using setpriv.

22 months agoCreate /work with relaxed permissions
Daan De Meyer [Mon, 25 Sep 2023 08:39:42 +0000 (10:39 +0200)] 
Create /work with relaxed permissions

We want to allow all users to access /work, so let's create it with
relaxed permissions. Let's also make sure we clean up the /work
directory after bwrap exits, so that whatever we do in bwrap doesn't
affect the cleanup of /work.

22 months agoRemove unused read_only argument from mount_overlay()
Daan De Meyer [Mon, 25 Sep 2023 08:25:46 +0000 (10:25 +0200)] 
Remove unused read_only argument from mount_overlay()

22 months agoRename $SCRIPT to $CHROOT_SCRIPT
Daan De Meyer [Mon, 25 Sep 2023 07:48:09 +0000 (09:48 +0200)] 
Rename $SCRIPT to $CHROOT_SCRIPT

This refers to a path in the chroot so let's make sure the naming
is consistent. We keep the old name as well for now to keep backwards
compat.

23 months agoMerge pull request #1917 from DaanDeMeyer/virtiofs
Daan De Meyer [Fri, 22 Sep 2023 15:13:26 +0000 (17:13 +0200)] 
Merge pull request #1917 from DaanDeMeyer/virtiofs

Two virtiofs improvements

23 months agoSkip UKI generation if the sd-stub is not installed 1917/head
Daan De Meyer [Fri, 22 Sep 2023 11:03:29 +0000 (13:03 +0200)] 
Skip UKI generation if the sd-stub is not installed

We don't fail if the stub is not installed and a bootable image is
explicitly requested as this is handled later on already in build_uki().

23 months agoDon't skip UKI generation when building a directory image
Daan De Meyer [Fri, 22 Sep 2023 11:01:51 +0000 (13:01 +0200)] 
Don't skip UKI generation when building a directory image

When building a cpio/UKI image, it doesn't generally make sense to
generate a UKI to put inside the cpio/UKI. This isn't entirely true
for directory images though, it could be that the directory image
is intended to be packed up as some kind of disk image later, so
let's not skip UKI generation automatically when building a directory
image.

23 months agoMake sure we put two slashes in autologin dropins
Daan De Meyer [Thu, 21 Sep 2023 14:49:48 +0000 (16:49 +0200)] 
Make sure we put two slashes in autologin dropins

By moving these into the python file we accidentally got rid of one
slash, let's add it back.

23 months agoRevert "ci: enable jammy-proposed-updates to test new libzypp"
Luca Boccassi [Thu, 21 Sep 2023 12:32:20 +0000 (13:32 +0100)] 
Revert "ci: enable jammy-proposed-updates to test new libzypp"

libzypp is now released in the updates repo, so no need to use
proposed-updates anymore

This reverts commit b6167c2047facda41aa73bd37907ba012e5c5e8a.

23 months agoMerge pull request #1913 from DaanDeMeyer/virtiofs-root
Daan De Meyer [Thu, 21 Sep 2023 11:36:39 +0000 (13:36 +0200)] 
Merge pull request #1913 from DaanDeMeyer/virtiofs-root

Support booting directory images in qemu

23 months agoPass split initrd as -initrd if it exists with directory image 1913/head
Daan De Meyer [Thu, 21 Sep 2023 09:25:56 +0000 (11:25 +0200)] 
Pass split initrd as -initrd if it exists with directory image

When we're booting a directory image, direct boot only works if the
kernel has the virtiofs driver builtin. Since this is not the case
for distribution kernels, let's make sure we pass the initrd to qemu
as well if one exists so that booting straight into a virtiofs can
also work with distro kernels provided an initrd is available.

23 months agoInsist on UKI when booting in UEFI firmware mode
Daan De Meyer [Thu, 21 Sep 2023 09:25:12 +0000 (11:25 +0200)] 
Insist on UKI when booting in UEFI firmware mode

When UEFI is requested, let's insist on booting a UKI instead of a
regular kernel image.

23 months agoUse root as tag name for virtiofs root
Daan De Meyer [Thu, 21 Sep 2023 09:23:26 +0000 (11:23 +0200)] 
Use root as tag name for virtiofs root

/dev/root makes systemd generate a device unit that will never appear
when using an initrd. Using root avoids that from happening.

23 months agoSupport booting directory images in qemu
Daan De Meyer [Wed, 20 Sep 2023 21:33:21 +0000 (23:33 +0200)] 
Support booting directory images in qemu

Using virtiofsd, we can boot straight into a virtiofs instance of
a directory image. This does require the virtiofsd instance to run
as (fake) root so we can't switch to the user running mkosi anymore
when running unprivileged but that shouldn't be a problem.

This also only works with kernels that have the virtiofs driver
builtin which I don't think is the case in any major distros yet.

23 months agoqemu: Make sure virtiofsd sock name is unique
Daan De Meyer [Wed, 20 Sep 2023 21:30:11 +0000 (23:30 +0200)] 
qemu: Make sure virtiofsd sock name is unique

We use the socket name as the tag for the virtiofs so it has to be
unique. We keep it within 36 bytes though as that's the max tag size.

23 months agoqemu: Make sure the memfd size matches the machine memory size
Daan De Meyer [Wed, 20 Sep 2023 21:29:18 +0000 (23:29 +0200)] 
qemu: Make sure the memfd size matches the machine memory size

This is required by qemu so let's make sure it's always satisfied.

23 months agoNetworking improvements
Daan De Meyer [Wed, 20 Sep 2023 21:03:56 +0000 (23:03 +0200)] 
Networking improvements

- ip= is also parsed by the kernel and can cause significant boot
  delays. We can avoid these delays by passing ip=none as the final
  value which doesn't affect network-generator but does disable the
  kernel auto-probing.
- Pull in network.target instead of network-online.target. This
  makes sure that systemd-networkd is started without introducing
  boot delays because we're waiting for an IP address to appear.

23 months agoAdd virtiofsd to default tools tree packages
Daan De Meyer [Wed, 20 Sep 2023 17:46:14 +0000 (19:46 +0200)] 
Add virtiofsd to default tools tree packages

23 months agoMerge pull request #1910 from DaanDeMeyer/virtiofs
Jörg Behrmann [Wed, 20 Sep 2023 15:23:01 +0000 (17:23 +0200)] 
Merge pull request #1910 from DaanDeMeyer/virtiofs

Add support for runtime trees

23 months agoAdd support for runtime trees 1910/head
Daan De Meyer [Wed, 20 Sep 2023 09:39:09 +0000 (11:39 +0200)] 
Add support for runtime trees

Let's allow mounting various directories into containers/VMs that
we run using a new RuntimeTrees= option. For containers, we use
nspawn's --bind option. For VMs, we use virtiofs along with the
virtiofsd project.

23 months agoFix typing errors
Daan De Meyer [Wed, 20 Sep 2023 13:55:16 +0000 (15:55 +0200)] 
Fix typing errors

23 months agoMerge pull request #1896 from behrmann/ruff
Daan De Meyer [Wed, 20 Sep 2023 08:01:26 +0000 (10:01 +0200)] 
Merge pull request #1896 from behrmann/ruff

Add ruff config to `pyprojects.toml` and address its warnings

23 months agoCheck if /init and /etc/initrd-release are symlinks
Malte Poll [Tue, 19 Sep 2023 13:14:35 +0000 (15:14 +0200)] 
Check if /init and /etc/initrd-release are symlinks

If /init in the image is a symlink to a file that doesn't exist on the host,
.exists() will return False.

Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
23 months agoRelease 17.1 v17.1
Luca Boccassi [Tue, 19 Sep 2023 12:27:11 +0000 (13:27 +0100)] 
Release 17.1

23 months agoInline autologin resources
Daan De Meyer [Tue, 19 Sep 2023 11:59:14 +0000 (13:59 +0200)] 
Inline autologin resources

When using a packaged mkosi with its resources in /usr, using a
tools tree breaks setting up autologin as the resources can't be loaded
anymore after mounting the tools tree. Let's fix the problem by inlining
the resources so they're immediately loaded. This isn't a problem
for the mkosi.md resource as it is never loaded after mounting a
tools tree.

23 months agoRelease 17 v17
Luca Boccassi [Tue, 19 Sep 2023 10:28:23 +0000 (11:28 +0100)] 
Release 17

23 months agoMerge pull request #1900 from keszybz/help-and-readme
Daan De Meyer [Tue, 19 Sep 2023 10:23:59 +0000 (12:23 +0200)] 
Merge pull request #1900 from keszybz/help-and-readme

Help and readme tweaks

23 months agoMerge pull request #1907 from DaanDeMeyer/news
Daan De Meyer [Tue, 19 Sep 2023 10:22:52 +0000 (12:22 +0200)] 
Merge pull request #1907 from DaanDeMeyer/news

Update NEWS

23 months agotreewide: address ruff warnings 1896/head
Joerg Behrmann [Tue, 19 Sep 2023 08:42:02 +0000 (10:42 +0200)] 
treewide: address ruff warnings

23 months agobuild: add section to configure ruff
Joerg Behrmann [Tue, 19 Sep 2023 08:39:29 +0000 (10:39 +0200)] 
build: add section to configure ruff

ruff [1] is a new very fast linter that combines rules from many commonly used
linters like pyflakes, isort or pyupgrade.

This commit uses the rules from pycodestyle (enabeled by default), pyflakes,
isort and pyupgrade and reintroduces the 119 character line length limit that
was used in the past with black and flake8, but was lost when black was disabled.

[1] https://github.com/astral-sh/ruff

23 months agoUpdate NEWS 1907/head
Daan De Meyer [Tue, 19 Sep 2023 08:32:12 +0000 (10:32 +0200)] 
Update NEWS

23 months agodebian: Add back dnf to default tools tree packages
Daan De Meyer [Tue, 19 Sep 2023 09:49:38 +0000 (11:49 +0200)] 
debian: Add back dnf to default tools tree packages

dnf was fixed so it'll be added back to testing soon so let's add
it back to the default tools tree packages for debian.

23 months agoWarn when a setting is in the wrong section
Georges Discry [Fri, 15 Sep 2023 20:01:26 +0000 (22:01 +0200)] 
Warn when a setting is in the wrong section

Except for the `[Match]` section, a setting can be set in any of the
valid sections because the actual section is ignored. This fuzziness
works because each setting is used in only one section so there is not
conflict.

Instead of silently parsing such a file, a warning is now displayed with
a hint on how to fix it. In the future, this could become an error.

23 months agoMake sure the root directory is a regular directory if Overlay= is enabled
Daan De Meyer [Mon, 18 Sep 2023 12:08:07 +0000 (14:08 +0200)] 
Make sure the root directory is a regular directory if Overlay= is enabled

overlayfs combined with a btrfs subvolume as the upperdir results in
EXDEV when trying to access files from a lowerdir, so let's make sure
we use a regular directory when Overlay= is enabled.

Fixes #1904

23 months agoReuse host /tmp in bwrap()
Daan De Meyer [Mon, 18 Sep 2023 11:50:47 +0000 (13:50 +0200)] 
Reuse host /tmp in bwrap()

If we replace /tmp, we'll also make any directories located in /tmp
inaccessible, e.g. the workspace directory. Work around the problem
by reusing the host's /tmp.

Fixes #1894

23 months agoAlways set distribution in tests
Paul Meyer [Mon, 11 Sep 2023 15:59:29 +0000 (17:59 +0200)] 
Always set distribution in tests

This enables executing the tests on distributions that aren't
targeted by mkosi. Before, the tests would fail as the detected
distribution was None.

Co-authored-by: Malte Poll <mp@edgeless.systems>
23 months agoDon't imply multiple architectures can be specified
Daan De Meyer [Mon, 11 Sep 2023 18:52:18 +0000 (20:52 +0200)] 
Don't imply multiple architectures can be specified

Only one can be specified at a time, not multiple.

Fixes #1891

23 months agoPrecompute long options
Georges Discry [Fri, 15 Sep 2023 19:18:51 +0000 (21:18 +0200)] 
Precompute long options

Like the `name` attribute used for the INI files, precompute the `long`
attribute used by argparse when it is derived from a setting's `dest`.

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.