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

2 years agoGet rid of scandir_recursive() and find_files()
Daan De Meyer [Sat, 5 Aug 2023 16:55:10 +0000 (18:55 +0200)] 
Get rid of scandir_recursive() and find_files()

- Use rglob() from pathlib instead of scandir_recursive()
- Use absolute paths when dealing with kernel modules instead of
relative paths. Only make the paths relative in make_cpio()

2 years agoMerge pull request #1742 from DaanDeMeyer/ci
Daan De Meyer [Sat, 5 Aug 2023 19:06:46 +0000 (21:06 +0200)] 
Merge pull request #1742 from DaanDeMeyer/ci

CI fixes

2 years agoMerge pull request #1740 from DaanDeMeyer/check-root
Daan De Meyer [Sat, 5 Aug 2023 19:06:19 +0000 (21:06 +0200)] 
Merge pull request #1740 from DaanDeMeyer/check-root

Get rid of check_root() function

2 years agoMachine name fixes
Daan De Meyer [Sat, 5 Aug 2023 15:49:07 +0000 (17:49 +0200)] 
Machine name fixes

- Prefer the image id or preset name over the output name
- Make sure the machine name doesn't contain underscores as those
  are not allowed.

2 years agoci: Drop arch geo mirror debug step 1742/head
Daan De Meyer [Sat, 5 Aug 2023 18:02:47 +0000 (20:02 +0200)] 
ci: Drop arch geo mirror debug step

2 years agoci: Share configs between centos, alma and rocky
Daan De Meyer [Sat, 5 Aug 2023 18:02:30 +0000 (20:02 +0200)] 
ci: Share configs between centos, alma and rocky

2 years agoRemove unused argument from certificate_common_name() 1740/head
Daan De Meyer [Sat, 5 Aug 2023 16:26:44 +0000 (18:26 +0200)] 
Remove unused argument from certificate_common_name()

2 years agoMove one_zero() to util.py
Daan De Meyer [Sat, 5 Aug 2023 16:22:27 +0000 (18:22 +0200)] 
Move one_zero() to util.py

2 years agoGet rid of check_root() function
Daan De Meyer [Sat, 5 Aug 2023 16:20:42 +0000 (18:20 +0200)] 
Get rid of check_root() function

Only has one call site so let's just inline it.

2 years agoMerge pull request #1736 from DaanDeMeyer/tar
Daan De Meyer [Sat, 5 Aug 2023 14:34:50 +0000 (16:34 +0200)] 
Merge pull request #1736 from DaanDeMeyer/tar

Rework tar archive handling

2 years agoRework tar archive handling 1736/head
Daan De Meyer [Sat, 5 Aug 2023 14:12:43 +0000 (16:12 +0200)] 
Rework tar archive handling

- Instead of relying on shutil.unpack_archive(), let's always use tar
- Introduce archive_tree() and extract_tree() to abstract tar archives
- Make sure tar always uses the user/group information from the root dir
- Enable all features
- Make sure tar doesn't overwrite directory permissions

2 years agoRemove TarStripSelinuxContext=
Daan De Meyer [Sat, 5 Aug 2023 13:49:54 +0000 (15:49 +0200)] 
Remove TarStripSelinuxContext=

We now generate images with correct selinux labels. If selinux labels
are not needed, they can simply be excluded when extracting the archive,
but let's always include them when generating the archive and then users
can choose what to do with the labels when extracting.

2 years agoAlign table
Daan De Meyer [Sat, 5 Aug 2023 14:21:47 +0000 (16:21 +0200)] 
Align table

2 years agoMove summary() to config.py
Daan De Meyer [Sat, 5 Aug 2023 13:05:06 +0000 (15:05 +0200)] 
Move summary() to config.py

Also removes check_script_input() and its usages since we already
check scripts during config parsing.

2 years agoMake sure we mount cache and workspace writable when running package managers
Daan De Meyer [Sat, 5 Aug 2023 11:04:12 +0000 (13:04 +0200)] 
Make sure we mount cache and workspace writable when running package managers

2 years agoDon't log stacktraces for non-zero exits from ssh, qemu or systemd-nspawn
Daan De Meyer [Fri, 4 Aug 2023 14:38:05 +0000 (16:38 +0200)] 
Don't log stacktraces for non-zero exits from ssh, qemu or systemd-nspawn

2 years agoMerge pull request #1731 from DaanDeMeyer/opensuse-distribution-release
Daan De Meyer [Fri, 4 Aug 2023 12:03:10 +0000 (14:03 +0200)] 
Merge pull request #1731 from DaanDeMeyer/opensuse-distribution-release

opensuse: Install distribution-release by default

2 years agoApply all configuration after running the postinst script 1731/head
Daan De Meyer [Fri, 4 Aug 2023 11:28:26 +0000 (13:28 +0200)] 
Apply all configuration after running the postinst script

Let's put all the functions writing dropins together and run them
after running the postinst script.

2 years agoInstall boot loader after running postinst script
Daan De Meyer [Fri, 4 Aug 2023 11:27:25 +0000 (13:27 +0200)] 
Install boot loader after running postinst script

The boot loader package might be installed by the postinst script so let's
account for that and only do the boot loader stuff after running the
postinst script.

2 years agoMake sure the parent directory where ukify will write the UKI exists
Daan De Meyer [Fri, 4 Aug 2023 11:25:44 +0000 (13:25 +0200)] 
Make sure the parent directory where ukify will write the UKI exists

Otherwise we get an exception from ukify.

2 years agoAdd some extra environment variables for scripts
Daan De Meyer [Fri, 4 Aug 2023 10:26:30 +0000 (12:26 +0200)] 
Add some extra environment variables for scripts

When running a command with mkosi-chroot, one often wants to refer
to paths under $SRCDIR, $OUTPUTDIR, ... inside the chroot. The issue
is that variable expansion happens before mkosi-chroot is called and
has a chance to modify them to point to the locations inside the chroot.

To allow easily referring to the locations inside the chroot, let's
add variants of the directory environment variables prefixed with
"CHROOT_" containing the location of the paths inside the chroot.

2 years agoFix typo
Daan De Meyer [Fri, 4 Aug 2023 09:49:36 +0000 (11:49 +0200)] 
Fix typo

2 years agoopensuse: Install distribution-release by default
Daan De Meyer [Fri, 4 Aug 2023 09:10:56 +0000 (11:10 +0200)] 
opensuse: Install distribution-release by default

This is the package providing /usr/lib/os-release so let's make
sure it's installed by default.

2 years agoUse a dash in the workspace directory prefix
Daan De Meyer [Fri, 4 Aug 2023 08:35:04 +0000 (10:35 +0200)] 
Use a dash in the workspace directory prefix

We used to use a dash here as well so let's keep existing gitignore's
working by keeping that in place.

2 years agoMake sure package managers are always configured
Daan De Meyer [Thu, 3 Aug 2023 15:50:23 +0000 (17:50 +0200)] 
Make sure package managers are always configured

Currently, when using cached images, setup_dnf() and friends won't
be called when a cached image is used. Yet it's now entirely possible
that dnf might be called to install extra packages in the postinstall
script, so we always need the package managers to be configured
properly. Let's make sure we do that by introducing a new setup()
method that is always called.

2 years agoFix shellcheck warning in mkosi-chroot examples
Daan De Meyer [Thu, 3 Aug 2023 13:42:28 +0000 (15:42 +0200)] 
Fix shellcheck warning in mkosi-chroot examples

2 years agoMerge pull request #1701 from DaanDeMeyer/scripts-host
Daan De Meyer [Thu, 3 Aug 2023 13:29:48 +0000 (15:29 +0200)] 
Merge pull request #1701 from DaanDeMeyer/scripts-host

Run scripts on the host by default

2 years agoRun scripts on the host by default 1701/head
Daan De Meyer [Wed, 26 Jul 2023 14:33:57 +0000 (16:33 +0200)] 
Run scripts on the host by default

Scripts currently run chrooted in the image. This is not great because
it means the tool you want to run from a script has to be installed in
the image, even if it has --root support to run from outside the image.

Specifically, to install extra packages from a script, you currently
have to install the package manager inside the image itself. Even then,
it might be completely different than the package manager on the host
(both in version and in build options), possibly leading to all kinds
of weird issues.

To allow users to install extra packages from scripts, we now default
to running scripts on the host. Additionally, to make life easy for
users, we provide a set of scripts in the PATH for the package managers
we support that call them with the necessary options to install packages
in the same way mkosi installs packages into the root directory. This
means all that users have to do is "dnf install xxx" from the script to
install a new package into the root directory.

Because some tools do not have a --root option and to provide an easy
migration for users that depend on scripts running in the image, we
also put a script "mkosi-chroot" in the PATH which uses bubblewrap to chroot
into the image as we did before. Users can keep their old scripts working
by simply adding the following to the top of their script:

```
if [ "$container" != "mkosi" ]; then
    exec mkosi-chroot $SCRIPT "$@"
fi
```

When running scripts on the host, no APIVFS directories are mounted into
the image. When using the "mkosi-chroot" and package manager scripts, the APIVFS
directories are automatically mounted before executing the corresponding
command. The apivfs_cmd() function is introduced to make implementing this
easier.

Additionally, we now always consider the current working directory a
BuildSources= directory. BuildSources= is now used to declare additional
source directories. The current working directory can always be overmounted
with another directory by simply specifying a source directory in BuildSources=
without a target directory.

To allow scripts running on the host to find the image, we set the
BUILDROOT variable for all scripts.

To prevent scripts on the host from messing with the host system when mkosi
is running as root, we extend the sandboxing to cover many more directories
which are all mounted read-only while a script is executing.

This change also allows scripts to be written in python or other scripting
languages without having to install python into the image itself.

2 years agoSort packages for every distribution
Daan De Meyer [Thu, 3 Aug 2023 11:28:12 +0000 (13:28 +0200)] 
Sort packages for every distribution

2 years agoFix rename bug in finalize_staging()
Daan De Meyer [Thu, 3 Aug 2023 08:20:32 +0000 (10:20 +0200)] 
Fix rename bug in finalize_staging()

2 years agoMerge pull request #1725 from DaanDeMeyer/stdin
Daan De Meyer [Wed, 2 Aug 2023 13:20:04 +0000 (15:20 +0200)] 
Merge pull request #1725 from DaanDeMeyer/stdin

Give scripts access to sys.stdin

2 years agocentos: Fix extras source repo id 1725/head
Daan De Meyer [Wed, 2 Aug 2023 13:04:19 +0000 (15:04 +0200)] 
centos: Fix extras source repo id

2 years agoGive scripts access to sys.stdin
Daan De Meyer [Wed, 2 Aug 2023 12:54:51 +0000 (14:54 +0200)] 
Give scripts access to sys.stdin

It's very useful to be able to put "bash" in a script to get a shell,
so let's support that.

2 years agoMake sure outputs are always prefixed with the output name
Daan De Meyer [Wed, 2 Aug 2023 11:20:38 +0000 (13:20 +0200)] 
Make sure outputs are always prefixed with the output name

Our output unlinking logic currently works based off the name of
the output. Everything that is prefixed with the output name is
removed. We need to fix that properly, but for now, let's make sure
that all outputs that we generate are prefixed with the name of the
output.

2 years agoMerge pull request #1723 from DaanDeMeyer/stuff
Daan De Meyer [Wed, 2 Aug 2023 11:15:16 +0000 (13:15 +0200)] 
Merge pull request #1723 from DaanDeMeyer/stuff

Stuff

2 years agoMove run_build_script() next to the other script functions 1723/head
Daan De Meyer [Wed, 2 Aug 2023 08:42:32 +0000 (10:42 +0200)] 
Move run_build_script() next to the other script functions

2 years agoUse explicit "build" verb when calling ukify
Daan De Meyer [Wed, 2 Aug 2023 08:34:22 +0000 (10:34 +0200)] 
Use explicit "build" verb when calling ukify

2 years agoIntroduce StrEnum and Use enum.auto() everywhere
Daan De Meyer [Wed, 2 Aug 2023 08:32:58 +0000 (10:32 +0200)] 
Introduce StrEnum and Use enum.auto() everywhere

2 years agorun: Fix escaping bug
Daan De Meyer [Tue, 1 Aug 2023 06:29:16 +0000 (08:29 +0200)] 
run: Fix escaping bug

2 years agoinstaller: Return list[PathString] instead of list[str]
Daan De Meyer [Mon, 31 Jul 2023 19:55:50 +0000 (21:55 +0200)] 
installer: Return list[PathString] instead of list[str]

2 years agoMerge pull request #1722 from DaanDeMeyer/fix
Daan De Meyer [Tue, 1 Aug 2023 21:12:28 +0000 (23:12 +0200)] 
Merge pull request #1722 from DaanDeMeyer/fix

More comprehensive tmpfile fix

2 years agoMore comprehensive tmpfile fix 1722/head
Daan De Meyer [Tue, 1 Aug 2023 20:30:05 +0000 (22:30 +0200)] 
More comprehensive tmpfile fix

2 years agoMerge pull request #1721 from DaanDeMeyer/fixes
Daan De Meyer [Tue, 1 Aug 2023 19:24:39 +0000 (21:24 +0200)] 
Merge pull request #1721 from DaanDeMeyer/fixes

Fixes

2 years agoOnly do a lazy umount when needed 1721/head
Daan De Meyer [Tue, 1 Aug 2023 16:45:37 +0000 (18:45 +0200)] 
Only do a lazy umount when needed

2 years agoMake sure the temporary directory is recalculated when we modify TMPDIR
Daan De Meyer [Tue, 1 Aug 2023 16:44:49 +0000 (18:44 +0200)] 
Make sure the temporary directory is recalculated when we modify TMPDIR

2 years agoMerge pull request #1719 from DaanDeMeyer/distro
Daan De Meyer [Mon, 31 Jul 2023 13:27:25 +0000 (15:27 +0200)] 
Merge pull request #1719 from DaanDeMeyer/distro

Distribution cleanups

2 years agoRework clean_package_manager_metadata() 1719/head
Daan De Meyer [Wed, 26 Jul 2023 21:14:23 +0000 (23:14 +0200)] 
Rework clean_package_manager_metadata()

2 years agoRework distributions
Daan De Meyer [Fri, 28 Jul 2023 10:10:19 +0000 (12:10 +0200)] 
Rework distributions

Let's make the following changes
- Instead of having an instance of the installer object stored in
  MkosiState, let's have an installer() method on the Distribution
  enum that returns the specific type implementing the distribution
- Let's move Distribution to mkosi.distributions
- Let's add a method to DistributionInstaller to return the package
  type instead of storing it directly in the Distribution enum
- Let's add methods to the Distribution enum that delegate to its
  installer type
- Use enum.auto() instead of specifying values directly.

2 years agoqemu: Remove debian specific workaround
Daan De Meyer [Mon, 31 Jul 2023 12:53:19 +0000 (14:53 +0200)] 
qemu: Remove debian specific workaround

This seems to not be required anymore so let's drop the workaround

2 years agoMerge pull request #1718 from DaanDeMeyer/builddep
Daan De Meyer [Mon, 31 Jul 2023 12:19:48 +0000 (14:19 +0200)] 
Merge pull request #1718 from DaanDeMeyer/builddep

Add source and debuginfo repositories

2 years agocentos: Add debuginfo and source repositories 1718/head
Daan De Meyer [Thu, 27 Jul 2023 12:53:49 +0000 (14:53 +0200)] 
centos: Add debuginfo and source repositories

2 years agodebian/ubuntu: Add source and debug repositories
Daan De Meyer [Thu, 27 Jul 2023 10:58:38 +0000 (12:58 +0200)] 
debian/ubuntu: Add source and debug repositories

These are not trivial to integrate into --repositories so we enable
them by default.

2 years agofedora: Add source and debuginfo repositories
Daan De Meyer [Wed, 26 Jul 2023 15:48:11 +0000 (17:48 +0200)] 
fedora: Add source and debuginfo repositories

2 years agodnf: Enable builddep plugin
Daan De Meyer [Wed, 26 Jul 2023 15:47:35 +0000 (17:47 +0200)] 
dnf: Enable builddep plugin

This one is actually useful and has to be invoked explicitly so
there's no harm in enabling it.

2 years agoapt: Make invoke_apt() and apt_cmd() slightly more generic
Daan De Meyer [Fri, 28 Jul 2023 09:31:58 +0000 (11:31 +0200)] 
apt: Make invoke_apt() and apt_cmd() slightly more generic

Let's allow passing in the apt command we want to execute.

2 years agoFix filelists on fedora
Daan De Meyer [Wed, 26 Jul 2023 14:12:58 +0000 (16:12 +0200)] 
Fix filelists on fedora

We should only download these on older Fedora's, not newer ones.

2 years agoSet KERNEL_INSTALL_BYPASS=1 in load_environment()
Daan De Meyer [Wed, 26 Jul 2023 13:54:14 +0000 (15:54 +0200)] 
Set KERNEL_INSTALL_BYPASS=1 in load_environment()