]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
2 years agoDocument QemuCdrom= 1790/head
Daan De Meyer [Sun, 13 Aug 2023 22:14:54 +0000 (00:14 +0200)] 
Document QemuCdrom=

2 years agoFix typo
Daan De Meyer [Sun, 13 Aug 2023 22:13:26 +0000 (00:13 +0200)] 
Fix typo

2 years agoMake sure we Clean up cd-rom image after qemu exits
Daan De Meyer [Sun, 13 Aug 2023 20:30:03 +0000 (22:30 +0200)] 
Make sure we Clean up cd-rom image after qemu exits

2 years agoFix gray ansi color definition
Daan De Meyer [Sun, 13 Aug 2023 20:22:23 +0000 (22:22 +0200)] 
Fix gray ansi color definition

We weren't actually getting gray output with the previous definition.
Let's steal the one from systemd to make it work.

2 years agoImport full modules instead of individual members
Daan De Meyer [Sun, 13 Aug 2023 18:30:03 +0000 (20:30 +0200)] 
Import full modules instead of individual members

Let's lean more towards importing full modules except for a few
exceptions like typing and Path from pathlib.

2 years agoRework make_image_output()
Daan De Meyer [Sun, 13 Aug 2023 17:40:01 +0000 (19:40 +0200)] 
Rework make_image_output()

Instead of returning a tuple containing all the bits we're interested
in, let's just return a typed version of the repart json output and
calculate what we need based on that in install_unified_kernel(). We
also move the split paths logic into make_image().

2 years agoIntroduce build_initrd() and build_kernel_modules_initrd()
Daan De Meyer [Sun, 13 Aug 2023 14:40:48 +0000 (16:40 +0200)] 
Introduce build_initrd() and build_kernel_modules_initrd()

2 years agoLog systemd-repart json output at debug level
Daan De Meyer [Sun, 13 Aug 2023 13:54:37 +0000 (15:54 +0200)] 
Log systemd-repart json output at debug level

2 years agoUse copy.deepcopy() to copy os.environ
Daan De Meyer [Sat, 12 Aug 2023 20:57:41 +0000 (22:57 +0200)] 
Use copy.deepcopy() to copy os.environ

Otherwise any changes we make to os.environ propagate into our
shallow copy.

2 years agoAdd QemuCdrom= option
Daan De Meyer [Sat, 12 Aug 2023 12:41:52 +0000 (14:41 +0200)] 
Add QemuCdrom= option

This attaches the image as a CD-ROM instead of a hard drive to the
virtual machine.

2 years agoset Dir::Etc option on apt based distros
Malte Poll [Sat, 12 Aug 2023 11:34:08 +0000 (13:34 +0200)] 
set Dir::Etc option on apt based distros

2 years agoPass through stdin when we call systemd-repart with --image=
Daan De Meyer [Fri, 11 Aug 2023 10:11:22 +0000 (12:11 +0200)] 
Pass through stdin when we call systemd-repart with --image=

When mounting an image, systemd's dissect logic might prompt for
verity/encryption passphrases. Let's make sure the user can enter
those if needed.

2 years agoMake sure we use python-pefile from the tools tree
Daan De Meyer [Thu, 10 Aug 2023 16:44:18 +0000 (18:44 +0200)] 
Make sure we use python-pefile from the tools tree

2 years agoMake sure we load pefile early
Daan De Meyer [Thu, 10 Aug 2023 14:59:03 +0000 (16:59 +0200)] 
Make sure we load pefile early

Otherwise we'll run into trouble later if we're using a tools tree.

2 years agoRelease 15.1 v15.1
Luca Boccassi [Thu, 10 Aug 2023 12:08:05 +0000 (13:08 +0100)] 
Release 15.1

2 years agoUpdate NEWS
Daan De Meyer [Thu, 10 Aug 2023 11:57:09 +0000 (13:57 +0200)] 
Update NEWS

2 years agoMerge pull request #1781 from keszybz/man-page-prep
Daan De Meyer [Thu, 10 Aug 2023 11:52:59 +0000 (13:52 +0200)] 
Merge pull request #1781 from keszybz/man-page-prep

Add script to prepare man pages, retitle release commits

2 years agoRetitle release commits to "Release vNN" 1781/head
Zbigniew Jędrzejewski-Szmek [Thu, 10 Aug 2023 11:30:16 +0000 (13:30 +0200)] 
Retitle release commits to "Release vNN"

I think this is just nicer and stands out more in the git log.

2 years agoAdd helper to build the man page
Zbigniew Jędrzejewski-Szmek [Thu, 10 Aug 2023 11:29:44 +0000 (13:29 +0200)] 
Add helper to build the man page

2 years agoDon't use capsh to figure out capabilities
Daan De Meyer [Thu, 10 Aug 2023 11:19:44 +0000 (13:19 +0200)] 
Don't use capsh to figure out capabilities

2 years agoMerge pull request #1779 from DaanDeMeyer/tmpfs
Daan De Meyer [Thu, 10 Aug 2023 11:11:21 +0000 (13:11 +0200)] 
Merge pull request #1779 from DaanDeMeyer/tmpfs

Make sure the private tmpfs in bwrap() doesn't hide workspace

2 years agoOnly unshare network namespace if we have CAP_NET_ADMIN 1779/head
Daan De Meyer [Thu, 10 Aug 2023 10:47:13 +0000 (12:47 +0200)] 
Only unshare network namespace if we have CAP_NET_ADMIN

2 years agoMake sure the private tmpfs in bwrap() doesn't hide workspace
Daan De Meyer [Thu, 10 Aug 2023 10:31:22 +0000 (12:31 +0200)] 
Make sure the private tmpfs in bwrap() doesn't hide workspace

The workspace might be in /tmp so we need to make sure we mount it
first before we mount the workspace so that the workspace is on top
of the private tmpfs.

2 years agoMerge pull request #1778 from DaanDeMeyer/all-packages
Jörg Behrmann [Thu, 10 Aug 2023 10:22:20 +0000 (12:22 +0200)] 
Merge pull request #1778 from DaanDeMeyer/all-packages

List all subpackages in pyproject.toml

2 years agoRemove unused package-data globs 1778/head
Daan De Meyer [Thu, 10 Aug 2023 10:09:16 +0000 (12:09 +0200)] 
Remove unused package-data globs

2 years agoAlso add mkosi.1 to package-data
Daan De Meyer [Thu, 10 Aug 2023 10:05:40 +0000 (12:05 +0200)] 
Also add mkosi.1 to package-data

2 years agoAdd mkosi.md to package-data
Daan De Meyer [Thu, 10 Aug 2023 09:57:03 +0000 (11:57 +0200)] 
Add mkosi.md to package-data

2 years agoDon't try to tun timedatectl or ssh-add if not available
Daan De Meyer [Thu, 10 Aug 2023 09:54:25 +0000 (11:54 +0200)] 
Don't try to tun timedatectl or ssh-add if not available

2 years agoList all subpackages in pyproject.toml
Daan De Meyer [Thu, 10 Aug 2023 09:40:52 +0000 (11:40 +0200)] 
List all subpackages in pyproject.toml

2 years agoBump version numbers for v15 v15
Luca Boccassi [Thu, 10 Aug 2023 08:46:24 +0000 (09:46 +0100)] 
Bump version numbers for v15

2 years agoRemove .git-blame-ignore-revs file
Daan De Meyer [Thu, 10 Aug 2023 08:24:52 +0000 (10:24 +0200)] 
Remove .git-blame-ignore-revs file

This has outlived its usefulness, there's no need to ignore the black
commit anymore when doing a git blame due to its age.

2 years agoUpdate do-a-release.sh script
Daan De Meyer [Thu, 10 Aug 2023 08:17:00 +0000 (10:17 +0200)] 
Update do-a-release.sh script

2 years agoReorder fields of MkosiConfig to match summary() and MkosiConfigSettings
Daan De Meyer [Thu, 10 Aug 2023 07:51:22 +0000 (09:51 +0200)] 
Reorder fields of MkosiConfig to match summary() and MkosiConfigSettings

2 years agoMerge pull request #1679 from behrmann/helpverb
Daan De Meyer [Wed, 9 Aug 2023 16:13:28 +0000 (18:13 +0200)] 
Merge pull request #1679 from behrmann/helpverb

Make docs available via the help verb.

2 years agoadd --doc-format option for choosing the output of the documentation verb 1679/head
Joerg Behrmann [Wed, 9 Aug 2023 13:48:47 +0000 (15:48 +0200)] 
add --doc-format option for choosing the output of the documentation verb

2 years agoadd NEWS entry for documentation verb.
Joerg Behrmann [Tue, 8 Aug 2023 11:16:31 +0000 (13:16 +0200)] 
add NEWS entry for documentation verb.

2 years agoadd symlink to docs in resources
Joerg Behrmann [Mon, 17 Jul 2023 13:36:18 +0000 (15:36 +0200)] 
add symlink to docs in resources

2 years agoaction: Don't install pandoc
Joerg Behrmann [Mon, 17 Jul 2023 13:50:58 +0000 (15:50 +0200)] 
action: Don't install pandoc

2 years agomake mkosi docs from resources available via the documentation verb
Joerg Behrmann [Mon, 17 Jul 2023 13:34:53 +0000 (15:34 +0200)] 
make mkosi docs from resources available via the documentation verb

This allows, especially when running different versions of mkosi, to always
have the right documentation on hand no matter how that version of mkosi was
installed.

2 years agomove mkosi.md to mkosi/resources
Joerg Behrmann [Mon, 17 Jul 2023 13:34:12 +0000 (15:34 +0200)] 
move mkosi.md to mkosi/resources

2 years agoReplace dd with pefile's get_data() method
Daan De Meyer [Wed, 9 Aug 2023 12:24:07 +0000 (14:24 +0200)] 
Replace dd with pefile's get_data() method

2 years agoci: Add job to check that we can still generate the man page
Daan De Meyer [Wed, 9 Aug 2023 14:50:01 +0000 (16:50 +0200)] 
ci: Add job to check that we can still generate the man page

2 years agoIntroduce preset dependencies
Daan De Meyer [Tue, 8 Aug 2023 13:57:14 +0000 (15:57 +0200)] 
Introduce preset dependencies

Instead of building presets in alphanumerical order, let's introduce
a proper concept of dependencies. Dependencies are configured with
the new "Dependencies=" option in the new "[Preset]" section. All
presets configured with "Dependencies=" are built before the current
preset.

We drop the alphanumerical preset in favor of explicit dependencies.

2 years agoSet agetty autologin credentials by default
Daan De Meyer [Wed, 9 Aug 2023 09:49:49 +0000 (11:49 +0200)] 
Set agetty autologin credentials by default

Eventually we'll replace --autologin with these but for now let's
set both.

2 years agoMake sure we output signed kernel instead of unsigned kernel
Daan De Meyer [Wed, 9 Aug 2023 07:44:01 +0000 (09:44 +0200)] 
Make sure we output signed kernel instead of unsigned kernel

Fixes #1589

2 years agoPrefer gcpio over cpio
Daan De Meyer [Wed, 9 Aug 2023 08:01:46 +0000 (10:01 +0200)] 
Prefer gcpio over cpio

Fixes #1201

2 years agoSet GPGTTY when calling gpg
Daan De Meyer [Wed, 9 Aug 2023 07:53:07 +0000 (09:53 +0200)] 
Set GPGTTY when calling gpg

Fixes #351

2 years agoDon't reverse list option values found in the same option
Daan De Meyer [Wed, 9 Aug 2023 06:48:29 +0000 (08:48 +0200)] 
Don't reverse list option values found in the same option

Items from earlier settings should take precedence over items from
later settings, but that doesn't mean we should reverse items found
in the same setting.

Fixes #1707

2 years agoTouch /usr/lib/clock-epoch during the build
Daan De Meyer [Wed, 9 Aug 2023 06:43:35 +0000 (08:43 +0200)] 
Touch /usr/lib/clock-epoch during the build

We'll handle the reproducible builds part of this together with all
the other changes for reproducible builds.

Fixes #1218

2 years agoRun finalize script after selinux relabel
Daan De Meyer [Tue, 8 Aug 2023 12:53:05 +0000 (14:53 +0200)] 
Run finalize script after selinux relabel

Let's make the finalize script true to its name and run it as the
final operation before we start packaging things up.

2 years agoMerge pull request #1763 from DaanDeMeyer/udev
Daan De Meyer [Tue, 8 Aug 2023 12:33:12 +0000 (14:33 +0200)] 
Merge pull request #1763 from DaanDeMeyer/udev

Install udev instead of systemd-udev

2 years agoMake sure we install udev in the initrd 1763/head
Daan De Meyer [Tue, 8 Aug 2023 12:17:24 +0000 (14:17 +0200)] 
Make sure we install udev in the initrd

Follow up for 7bb87d7d011162f503b842b02bbe9e157cb6f116

2 years agoInstall extra packages for centos/alma/rocky to fix CI failure
Daan De Meyer [Tue, 8 Aug 2023 11:38:39 +0000 (13:38 +0200)] 
Install extra packages for centos/alma/rocky to fix CI failure

This increases the size of the generated image a bit which makes
sure repart calculates a minimal partition size for the XFS
filesystem so that populating the partition doesn't run out of space.

2 years agoInstall udev instead of systemd-udev
Daan De Meyer [Tue, 8 Aug 2023 10:18:14 +0000 (12:18 +0200)] 
Install udev instead of systemd-udev

Installing systemd-udev means running into
https://bugzilla.redhat.com/show_bug.cgi?id=2183279 so let's install
udev which avoids that issue.

2 years agoMark gentoo as experimental and unsupported
Daan De Meyer [Tue, 8 Aug 2023 11:17:45 +0000 (13:17 +0200)] 
Mark gentoo as experimental and unsupported

Gentoo issues won't be actively looked at by the core maintainers and
there's no guarantee that gentoo PRs will get reviewed or not (or they
might just be merged without review). Gentoo specific hacks outside of
gentoo.py will generally not be accepted.

- We also drop all gentoo specific modifications outside of gentoo.py
- We also stop running CI for gentoo

Conditions for dropping the experimental status of gentoo:

- No more stage 3 tarball required to build a gentoo image. Either we only
do binary packages or gentoo images can be built from directly from an immutable
host system or tools tree with portage and compiler tools installed
- Proper division of systemd components into subpackages so that we can build
a gentoo initrd with systemd installed but without pulling in ukify and python
- An official and up-to-date binary package repository that allows gentoo CI
to complete in a similar amount of time as the other distributions

2 years agoMerge pull request #1754 from DaanDeMeyer/preset-docs
Jörg Behrmann [Tue, 8 Aug 2023 11:32:57 +0000 (13:32 +0200)] 
Merge pull request #1754 from DaanDeMeyer/preset-docs

Document presets

2 years agoRemove setup.py and use setuptools build backend in pyproject.toml
Joerg Behrmann [Fri, 30 Jun 2023 12:30:36 +0000 (14:30 +0200)] 
Remove setup.py and use setuptools build backend in pyproject.toml

Also remove setup.cfg, since we don't use flake8 and everything else can be
handled by pyproject.toml

2 years agoFix BuildSources= and BuildDirectory= docs 1754/head
Daan De Meyer [Tue, 8 Aug 2023 09:13:45 +0000 (11:13 +0200)] 
Fix BuildSources= and BuildDirectory= docs

2 years agoDocument presets
Daan De Meyer [Tue, 8 Aug 2023 09:06:00 +0000 (11:06 +0200)] 
Document presets

Also skip files in mkosi.presets that do not have the .conf suffix.

2 years agogentoo: swith to llvm (clang)
Paymon MARANDI [Wed, 19 Jul 2023 16:20:21 +0000 (12:20 -0400)] 
gentoo: swith to llvm (clang)

This will pave the way for actual arch support and cross-compiling

Signed-off-by: Paymon MARANDI <darwinskernel@gmail.com>
2 years agoMerge pull request #1753 from DaanDeMeyer/resolv
Daan De Meyer [Mon, 7 Aug 2023 20:43:30 +0000 (22:43 +0200)] 
Merge pull request #1753 from DaanDeMeyer/resolv

Make sure options are always applied last in bwrap() and chroot_cmd()

2 years agoAdd ip=enp0s2:any to default kernel cmdline extra 1753/head
Daan De Meyer [Mon, 7 Aug 2023 19:25:17 +0000 (21:25 +0200)] 
Add ip=enp0s2:any to default kernel cmdline extra

When booting with --qemu-gui, the network interface is named
differently so let's account for that and configure networkd to
manage that interface as well.

2 years agoMake sure options are always applied last in bwrap() and chroot_cmd()
Daan De Meyer [Mon, 7 Aug 2023 18:03:44 +0000 (20:03 +0200)] 
Make sure options are always applied last in bwrap() and chroot_cmd()

That way, if the options remount anything read-only, we can be sure
it doesn't affect any of the operations set up in bwrap() and chroot_cmd()
themselves.

2 years agoMove network argument from chroot_cmd() to bwrap()
Daan De Meyer [Mon, 7 Aug 2023 15:02:43 +0000 (17:02 +0200)] 
Move network argument from chroot_cmd() to bwrap()

If we're not supposed to use the network, that should apply to the
script running on the host as well, so move the network argument
from chroot_cmd() to bwrap().

We just always mount resolv.conf into the image now. If the network
namespace is unshared, there's not much that can be done with the
info in there anyway.

2 years agoMerge finalize_source_mounts() and finalize_writable_mounts()
Daan De Meyer [Mon, 7 Aug 2023 11:48:59 +0000 (13:48 +0200)] 
Merge finalize_source_mounts() and finalize_writable_mounts()

We need to sort both lists so let's merge the two functions to make
that easier. Let's also make sure we remove any duplicates while we're
at it.

2 years agoMerge pull request #1750 from DaanDeMeyer/kvm-log
Daan De Meyer [Mon, 7 Aug 2023 11:24:24 +0000 (13:24 +0200)] 
Merge pull request #1750 from DaanDeMeyer/kvm-log

Add logging to qemu_check_kvm_support()

2 years agoRemove outdated comment 1750/head
Daan De Meyer [Mon, 7 Aug 2023 11:14:00 +0000 (13:14 +0200)] 
Remove outdated comment

2 years agoDon't drop privileges when running qemu and invoked as root
Daan De Meyer [Mon, 7 Aug 2023 10:53:32 +0000 (12:53 +0200)] 
Don't drop privileges when running qemu and invoked as root

Depending on the environment and what options are used, running qemu
might require root privileges. So if we're invoked as root and we're
going to run qemu, let's not drop privileges.

2 years agoAdd logging to qemu_check_kvm_support()
Daan De Meyer [Mon, 7 Aug 2023 10:13:37 +0000 (12:13 +0200)] 
Add logging to qemu_check_kvm_support()

2 years agoqemu: do not enable kvm when booting on non-native arch
Luca Boccassi [Mon, 7 Aug 2023 01:29:52 +0000 (02:29 +0100)] 
qemu: do not enable kvm when booting on non-native arch

kvm is only supported on the native architecture, so skip it
when booting a non-native one (eg: aarch64 on x86_64)

2 years agoMerge pull request #1747 from DaanDeMeyer/check-inputs
Daan De Meyer [Mon, 7 Aug 2023 08:45:31 +0000 (10:45 +0200)] 
Merge pull request #1747 from DaanDeMeyer/check-inputs

Rework check_inputs()

2 years agoDefault workspace directory to the current working directory 1747/head
Daan De Meyer [Sun, 6 Aug 2023 22:08:42 +0000 (00:08 +0200)] 
Default workspace directory to the current working directory

This was already the implicit assumption, let's make it explicit.

2 years agoMake sure we create an empty output file when using no output
Daan De Meyer [Sun, 6 Aug 2023 20:34:37 +0000 (22:34 +0200)] 
Make sure we create an empty output file when using no output

2 years agoAllocate workspace outside of MkosiState
Daan De Meyer [Sun, 6 Aug 2023 18:57:04 +0000 (20:57 +0200)] 
Allocate workspace outside of MkosiState

This way MkosiState doesn't need to be a context manager and we can
just use the workspace as a context manager directly.

2 years agoDon't resolve paths in two cases
Daan De Meyer [Sun, 6 Aug 2023 18:39:01 +0000 (20:39 +0200)] 
Don't resolve paths in two cases

- Target paths should not be resolved
- When checking paths for the paths logic, let's not resolve either
  and leave that to the parser implementation itself

2 years agoRework check_inputs()
Daan De Meyer [Sun, 6 Aug 2023 18:22:49 +0000 (20:22 +0200)] 
Rework check_inputs()

Let's just check for existence with exists() instead of relying on
exceptions. Also improve error checking and make sure we check
package manager trees as well.

2 years agoMerge pull request #1746 from DaanDeMeyer/tools
Daan De Meyer [Sun, 6 Aug 2023 18:04:34 +0000 (20:04 +0200)] 
Merge pull request #1746 from DaanDeMeyer/tools

Various cleanups

2 years agoDon't log about copying in the build tree if it is empty 1746/head
Daan De Meyer [Sun, 6 Aug 2023 17:52:24 +0000 (19:52 +0200)] 
Don't log about copying in the build tree if it is empty

2 years agoResolve symlinks in config paths by default
Daan De Meyer [Sun, 6 Aug 2023 17:51:37 +0000 (19:51 +0200)] 
Resolve symlinks in config paths by default

2 years agodebian: Don't log about extracting tar archives
Daan De Meyer [Sun, 6 Aug 2023 17:42:04 +0000 (19:42 +0200)] 
debian: Don't log about extracting tar archives

There's a lot of them so it becomes rather noisy.

2 years agoOnly set --no-target-directory for cp when src is a directory
Daan De Meyer [Sun, 6 Aug 2023 13:10:07 +0000 (15:10 +0200)] 
Only set --no-target-directory for cp when src is a directory

This makes sure that when src is a file and dst is a directory that
src is copied into dst.

2 years agoFix install_tree() file copy regression
Daan De Meyer [Sun, 6 Aug 2023 13:03:32 +0000 (15:03 +0200)] 
Fix install_tree() file copy regression

If a target is set and the source is a file, we used to copy the
file directory into the image. Let's restore that behavior.

2 years agoAlways use str as the type parameter for CompletedProcess
Daan De Meyer [Sun, 6 Aug 2023 12:25:52 +0000 (14:25 +0200)] 
Always use str as the type parameter for CompletedProcess

We always set text=True when calling subprocess.run(), so we know
that the type is going to be str, so let's encode that to get
better type checking from mypy.

2 years agoRemove unused TypeVar usages
Daan De Meyer [Sun, 6 Aug 2023 12:20:53 +0000 (14:20 +0200)] 
Remove unused TypeVar usages

2 years agoSplit out GenericVersion into its own module
Daan De Meyer [Sun, 6 Aug 2023 12:17:27 +0000 (14:17 +0200)] 
Split out GenericVersion into its own module

2 years agoRename mount_tools() to mount_usr()
Daan De Meyer [Sun, 6 Aug 2023 12:13:41 +0000 (14:13 +0200)] 
Rename mount_tools() to mount_usr()

And pass in the tree to use directly instead of the full config
object.

2 years agoMerge pull request #1745 from DaanDeMeyer/archive
Daan De Meyer [Sun, 6 Aug 2023 10:58:03 +0000 (12:58 +0200)] 
Merge pull request #1745 from DaanDeMeyer/archive

Split out more modules

2 years agoMove run_ssh() to run_qemu() 1745/head
Daan De Meyer [Sun, 6 Aug 2023 10:17:22 +0000 (12:17 +0200)] 
Move run_ssh() to run_qemu()

The ssh verb only works when the machine is booted with qemu so they
belong together.

2 years agoDo not pass environment when doing selinux relabel
Daan De Meyer [Sun, 6 Aug 2023 10:07:50 +0000 (12:07 +0200)] 
Do not pass environment when doing selinux relabel

We don't do this for any of the other commands we run, let's not do
it for selinux either.

2 years agoMove kernel modules logic to kmod.py
Daan De Meyer [Sun, 6 Aug 2023 09:59:51 +0000 (11:59 +0200)] 
Move kernel modules logic to kmod.py

We also rework the logic a bit so we have one function
gen_required_kernel_modules() that is used for both trimming kernel
modules and for generating the kernel modules initrd.

2 years agoMerge pull request #1744 from DaanDeMeyer/stuff
Daan De Meyer [Sun, 6 Aug 2023 10:29:02 +0000 (12:29 +0200)] 
Merge pull request #1744 from DaanDeMeyer/stuff

Stuff

2 years agoIntroduce archive.py
Daan De Meyer [Sun, 6 Aug 2023 09:40:31 +0000 (11:40 +0200)] 
Introduce archive.py

Let's gather the cpio and tar functions in archive.py. We also get
rid of the make_tar(), make_initrd() and make_directory() output
functions and make sure we also mount the root's passwd and related
files when creating cpios.

2 years agoGet rid of final uses of joinpath()
Daan De Meyer [Sun, 6 Aug 2023 07:54:55 +0000 (09:54 +0200)] 
Get rid of final uses of joinpath()

We prefer using parentheses instead of joinpath() these days. This
commit gets rid of the remaining places where we're still using
joinpath().

2 years agoDocumentation and summary improvements 1744/head
Daan De Meyer [Sun, 6 Aug 2023 08:55:25 +0000 (10:55 +0200)] 
Documentation and summary improvements

- Reorder config items in the summary to put more related stuff together
- Add missing config items to the summary
- Move Ssh= option to Content as it modifies the image
- Move CacheOnly= option to Distribution
- Document Passphrase=
- Reorder documentation to match summary

2 years agoAdd some newlines to compare_versions()
Daan De Meyer [Sun, 6 Aug 2023 08:04:35 +0000 (10:04 +0200)] 
Add some newlines to compare_versions()

Let's make the method a little less claustrophobic by adding a few
newlines.

2 years agoInline find_image_version()
Daan De Meyer [Sun, 6 Aug 2023 08:01:49 +0000 (10:01 +0200)] 
Inline find_image_version()

Only has one call site, so let's inline the function.

2 years agoRemove unused absolute path conversion in load_config()
Daan De Meyer [Sun, 6 Aug 2023 07:58:42 +0000 (09:58 +0200)] 
Remove unused absolute path conversion in load_config()

We already convert these paths to absolute paths during config
parsing.

2 years agoMerge pull request #1738 from DaanDeMeyer/tree
Daan De Meyer [Sun, 6 Aug 2023 07:54:23 +0000 (09:54 +0200)] 
Merge pull request #1738 from DaanDeMeyer/tree

tree: Introduce install_tree()

2 years agoUse umask to control new file/directory permissions 1738/head
Daan De Meyer [Sat, 5 Aug 2023 15:14:08 +0000 (17:14 +0200)] 
Use umask to control new file/directory permissions

The primary reason to use umask is that python's mkdir() functions
and methods only apply the given mode to the final component of the
path, and not to its parent paths if parents=True is specified. Aside
from that, it's also just nicer to make sure the file/directory has
the right mode from the start instead of having to modify it later with
chmod().

We also clean up permissions in general, making sure we set umask
explicitly whenever we create a file or directory in state.root and
remove explicit permissions when we're not writing files in state.root.

2 years agotree: Introduce install_tree()
Daan De Meyer [Sat, 5 Aug 2023 14:40:00 +0000 (16:40 +0200)] 
tree: Introduce install_tree()