]> git.ipfire.org Git - thirdparty/mkosi.git/log
thirdparty/mkosi.git
13 months agoTwo small cleanups suggests by pylint 2789/head
Zbigniew Jędrzejewski-Szmek [Sun, 16 Jun 2024 12:08:13 +0000 (14:08 +0200)] 
Two small cleanups suggests by pylint

13 months agokernel-install: drop final NamedTuple use
Zbigniew Jędrzejewski-Szmek [Sat, 15 Jun 2024 20:17:14 +0000 (22:17 +0200)] 
kernel-install: drop final NamedTuple use

13 months agotests: make Config a normal dataclass
Zbigniew Jędrzejewski-Szmek [Sat, 15 Jun 2024 20:15:15 +0000 (22:15 +0200)] 
tests: make Config a normal dataclass

13 months agoqemu: drop another NamedTuple use
Zbigniew Jędrzejewski-Szmek [Sat, 15 Jun 2024 20:08:50 +0000 (22:08 +0200)] 
qemu: drop another NamedTuple use

13 months agoinstaller/arch: make Repository a normal dataclass
Zbigniew Jędrzejewski-Szmek [Sat, 15 Jun 2024 20:05:55 +0000 (22:05 +0200)] 
installer/arch: make Repository a normal dataclass

13 months agosandbox: drop another NamedTuple use
Zbigniew Jędrzejewski-Szmek [Sat, 15 Jun 2024 20:02:47 +0000 (22:02 +0200)] 
sandbox: drop another NamedTuple use

13 months agoinstaller/apt: make Repository a normal dataclass
Zbigniew Jędrzejewski-Szmek [Sat, 15 Jun 2024 19:56:15 +0000 (21:56 +0200)] 
installer/apt: make Repository a normal dataclass

NamedTuple is an outdated solution… Make a normal dataclass to
match other places. Dataclasses also have nicer string representation.

Also let's not make the class nested. This doesn't matter terribly here,
but it makes the code unusual. Rename the type to "AptRepository"
to match RpmRepository.

13 months agoinstaller/rpm: make RpmRepository a dataclass
Zbigniew Jędrzejewski-Szmek [Sat, 15 Jun 2024 19:57:49 +0000 (21:57 +0200)] 
installer/rpm: make RpmRepository a dataclass

Dataclasses are the more modern approach, with better string representation and
less hacks. A NamedTuple is also a tuple, which is rather surprising when we
don't use that.

13 months agoSkip directories when generating checksums
Michael Ferrari [Sat, 22 Jun 2024 09:38:23 +0000 (11:38 +0200)] 
Skip directories when generating checksums

It is possible that some directory is created by the user in
`mkosi.postoutput`, so just make sure to skip those as they can't be
hashed.

Also remove the check for directory output type as auxiliary files may
be created that should be hashed.

13 months agoDon't rename vmlinux to vmlinuz when copying from /boot to /usr
Daan De Meyer [Mon, 24 Jun 2024 08:30:42 +0000 (10:30 +0200)] 
Don't rename vmlinux to vmlinuz when copying from /boot to /usr

We only want to rename vmlinux to vmlinuz when copying to the output
directory. In the image itself we can keep using the same name.

Follow up for 6972f9efba5c8472d990be3783b7e7dbf76e109e

13 months agomkosi-tools: Install distribution-gpg-keys in Arch Linux default tools tree
Daan De Meyer [Mon, 24 Jun 2024 08:59:07 +0000 (10:59 +0200)] 
mkosi-tools: Install distribution-gpg-keys in Arch Linux default tools tree

It was recently packaged in the extra repository.

13 months agoMerge pull request #2799 from DaanDeMeyer/tmp
Daan De Meyer [Mon, 24 Jun 2024 08:16:27 +0000 (10:16 +0200)] 
Merge pull request #2799 from DaanDeMeyer/tmp

Various sandbox fixes

13 months agoMake /var/tmp optional for sandbox 2799/head
Daan De Meyer [Sun, 23 Jun 2024 12:28:41 +0000 (14:28 +0200)] 
Make /var/tmp optional for sandbox

Let's only create a custom /var/tmp directory for some commands instead
of all of them.

We only create a custom /var/tmp for systemd-repart and scripts as other
commands shouldn't have need for a separate /var/tmp that's stored on disk.

Fixes #2792

13 months agoFix sandbox in run_postoutput_scripts()
Daan De Meyer [Sun, 23 Jun 2024 12:18:21 +0000 (14:18 +0200)] 
Fix sandbox in run_postoutput_scripts()

13 months agoRename vartmp to vartmpdir
Daan De Meyer [Sun, 23 Jun 2024 12:10:11 +0000 (14:10 +0200)] 
Rename vartmp to vartmpdir

13 months agoMake sure /tmp, /var/tmp and /dev/shm permissions are correct in sandbox
Daan De Meyer [Sun, 23 Jun 2024 12:07:56 +0000 (14:07 +0200)] 
Make sure /tmp, /var/tmp and /dev/shm permissions are correct in sandbox

13 months agoStop mounting tmpfs to /tmp in sandbox
Daan De Meyer [Sun, 23 Jun 2024 12:07:01 +0000 (14:07 +0200)] 
Stop mounting tmpfs to /tmp in sandbox

/ is already a tmpfs in the sandbox, so there's no real point in
mounting a tmpfs to /tmp.

13 months agoMerge pull request #2798 from DaanDeMeyer/fix
Daan De Meyer [Mon, 24 Jun 2024 08:14:18 +0000 (10:14 +0200)] 
Merge pull request #2798 from DaanDeMeyer/fix

Skip vmlinuz in /boot without matching dir in /usr/lib/modules

13 months agoSimplify logic 2798/head
Daan De Meyer [Sun, 23 Jun 2024 15:21:28 +0000 (17:21 +0200)] 
Simplify logic

13 months agoSkip vmlinuz in /boot without matching dir in /usr/lib/modules
Daan De Meyer [Sun, 23 Jun 2024 11:41:25 +0000 (13:41 +0200)] 
Skip vmlinuz in /boot without matching dir in /usr/lib/modules

Fixes #2796

13 months agomkosi-initrd: replace long-time deprecated $tempnode with $devnode
Antonio Alvarez Feijoo [Thu, 20 Jun 2024 12:22:40 +0000 (14:22 +0200)] 
mkosi-initrd: replace long-time deprecated $tempnode with $devnode

14 months agoqemu/vmspawn: check for an uncompressed kernel too
Luca Boccassi [Sun, 16 Jun 2024 22:34:02 +0000 (23:34 +0100)] 
qemu/vmspawn: check for an uncompressed kernel too

On some architecture/distributions (eg: ppc64el and riscv64 on Debian/Ubuntu)
the kernel is shipped uncompressed, as vmlinux. If vmlinuz cannot be found,
try looking for vmlinux.

14 months agoMerge pull request #2787 from DaanDeMeyer/fix
Daan De Meyer [Sun, 16 Jun 2024 08:24:20 +0000 (10:24 +0200)] 
Merge pull request #2787 from DaanDeMeyer/fix

chdir into /proc for determining default Config

14 months agochdir into /proc for determining default Config 2787/head
Daan De Meyer [Sat, 15 Jun 2024 19:40:06 +0000 (21:40 +0200)] 
chdir into /proc for determining default Config

There are users that run mkosi from / so let's use /proc instead.

Fixes #2786

14 months agoExtend hint for workspace directory and build sources
Daan De Meyer [Sat, 15 Jun 2024 19:39:44 +0000 (21:39 +0200)] 
Extend hint for workspace directory and build sources

14 months agocentos: Support building centos stream 10 default images
Daan De Meyer [Thu, 13 Jun 2024 21:44:28 +0000 (23:44 +0200)] 
centos: Support building centos stream 10 default images

Stream 10 does not have EPEL yet so we make those few packages Fedora
only for now.

14 months agocentos: Fix GPG key search logic
Daan De Meyer [Thu, 13 Jun 2024 20:46:42 +0000 (22:46 +0200)] 
centos: Fix GPG key search logic

Let's only look for the release key of the release we're building for
and add support for searching for the SHA256 key which is used by centos
stream 10.

We can't use the symlinked names because those don't exist on centos.org/keys.

14 months agocentos: Change local rpm GPG key location
Daan De Meyer [Thu, 13 Jun 2024 19:38:39 +0000 (21:38 +0200)] 
centos: Change local rpm GPG key location

Let's look for the one suffixed with the release number. This doesn't
change behavior for c9s as this is a symlink to the file we looked for
previously but will fix our behavior for c10s which uses a different key.

14 months agodocs: update Output= info
Cornelius Hoffmann [Thu, 13 Jun 2024 19:47:13 +0000 (21:47 +0200)] 
docs: update Output= info
From the release notes of v23:

> Image names from mkosi.images/ are now preferred over the specified
> image ID when determining the output filename to use for an image.

14 months agoAdd nosuid,noexec and nodev where appropriate when remounting
Daan De Meyer [Thu, 13 Jun 2024 18:30:31 +0000 (20:30 +0200)] 
Add nosuid,noexec and nodev where appropriate when remounting

If not we get permission errors if the host mount uses nosuid,noexec
or nodev.

Fixes #2776

14 months agoBump version to 24~devel
Daan De Meyer [Thu, 13 Jun 2024 18:12:52 +0000 (20:12 +0200)] 
Bump version to 24~devel

14 months agomkosi.md: fix typo
Luca Boccassi [Wed, 12 Jun 2024 10:54:27 +0000 (11:54 +0100)] 
mkosi.md: fix typo

14 months agoRelease 23.1 v23.1
Luca Boccassi [Wed, 12 Jun 2024 10:01:47 +0000 (11:01 +0100)] 
Release 23.1

14 months agoBump version to 24~devel
Daan De Meyer [Wed, 12 Jun 2024 08:53:19 +0000 (10:53 +0200)] 
Bump version to 24~devel

14 months agoRelease 23
Daan De Meyer [Wed, 12 Jun 2024 08:53:18 +0000 (10:53 +0200)] 
Release 23

14 months agoAdd dpkg and dpkg-query scripts
Daan De Meyer [Mon, 10 Jun 2024 12:37:12 +0000 (14:37 +0200)] 
Add dpkg and dpkg-query scripts

14 months agoAdd `mkosi.postoutput` scripts
Michael Ferrari [Sun, 9 Jun 2024 08:23:11 +0000 (10:23 +0200)] 
Add `mkosi.postoutput` scripts

14 months agoSet default output name for `mkosi-tools`
Michael Ferrari [Sun, 9 Jun 2024 10:34:38 +0000 (12:34 +0200)] 
Set default output name for `mkosi-tools`

This should allow one to invoke `mkosi --directory "" --include mkosi-tools`
in the project root to create a tools tree that is automatically
detected and used in subsequent invocations.

14 months agoSet stdout/stderr of not found process to empty string instead of None
Daan De Meyer [Sun, 9 Jun 2024 15:54:23 +0000 (17:54 +0200)] 
Set stdout/stderr of not found process to empty string instead of None

14 months agoRemove some dead code
Daan De Meyer [Sat, 8 Jun 2024 20:19:12 +0000 (22:19 +0200)] 
Remove some dead code

14 months agoaction: Use aa-teardown to disable apparmor
Daan De Meyer [Sat, 8 Jun 2024 10:16:31 +0000 (12:16 +0200)] 
action: Use aa-teardown to disable apparmor

systemctl stop apparmor doesn't seem to be sufficient, aa-teardown
on the other hand seems to do the trick.

14 months agoFix missing mount in `mkosi.clean`
Michael Ferrari [Fri, 7 Jun 2024 21:24:45 +0000 (23:24 +0200)] 
Fix missing mount in `mkosi.clean`

14 months agoaction: Also uninstall apparmor
Daan De Meyer [Fri, 7 Jun 2024 19:26:50 +0000 (21:26 +0200)] 
action: Also uninstall apparmor

14 months agoaction: Disable apparmor completely
Daan De Meyer [Fri, 7 Jun 2024 18:01:59 +0000 (20:01 +0200)] 
action: Disable apparmor completely

These are ephemeral CI machines with full root access without password,
there's really no point in running apparmor in the first place so instead
of trying to work around broken apparmor policies, just disable apparmor
completely.

14 months agoMerge pull request #2765 from DaanDeMeyer/rawhide
Daan De Meyer [Fri, 7 Jun 2024 16:49:19 +0000 (18:49 +0200)] 
Merge pull request #2765 from DaanDeMeyer/rawhide

Build a Fedora rawhide image by default

14 months agoBuild a Fedora rawhide image by default 2765/head
Daan De Meyer [Fri, 7 Jun 2024 13:33:19 +0000 (15:33 +0200)] 
Build a Fedora rawhide image by default

Helps with catching issues more than Fedora 40 does.

14 months agotests: Make sure we set systemd.firstboot=no
Daan De Meyer [Fri, 7 Jun 2024 15:09:51 +0000 (17:09 +0200)] 
tests: Make sure we set systemd.firstboot=no

Otherwise the boot might get stuck on a prompt from systemd-firstboot.service
or systemd-homed-firstboot.service.

14 months agoaction: Disable and remove unix-chkpwd apparmor policy
Daan De Meyer [Fri, 7 Jun 2024 14:39:54 +0000 (16:39 +0200)] 
action: Disable and remove unix-chkpwd apparmor policy

The apparmor policy prevents Fedora Rawhide containers from booting
in systemd-nspawn. See https://gitlab.com/apparmor/apparmor/-/issues/402.

14 months agoInstall virtiofsd in debian/ubuntu tools trees
Daan De Meyer [Fri, 7 Jun 2024 12:42:55 +0000 (14:42 +0200)] 
Install virtiofsd in debian/ubuntu tools trees

14 months agoAdd dependencies verb
Daan De Meyer [Fri, 7 Jun 2024 12:00:13 +0000 (14:00 +0200)] 
Add dependencies verb

Fixes #2529

14 months agoMake --tools-tree the same as --tools-tree=default
Daan De Meyer [Thu, 6 Jun 2024 19:52:19 +0000 (21:52 +0200)] 
Make --tools-tree the same as --tools-tree=default

Saves on typing and makes it easier to use overall.

14 months agomkosi-initrd: Always add binfmt_misc, autofs and efivarfs modules
Daan De Meyer [Thu, 6 Jun 2024 14:42:43 +0000 (16:42 +0200)] 
mkosi-initrd: Always add binfmt_misc, autofs and efivarfs modules

14 months agomkosi-initrd: Always add virtio_pci
Daan De Meyer [Thu, 6 Jun 2024 13:48:29 +0000 (15:48 +0200)] 
mkosi-initrd: Always add virtio_pci

14 months agomkosi-initrd: Include more modules
Daan De Meyer [Thu, 6 Jun 2024 13:35:07 +0000 (15:35 +0200)] 
mkosi-initrd: Include more modules

- systemd logs an error if x_tables.ko is missing so let's include it.
- For cryptsetup, let's make sure we include all crypto modules so it
always has everything it needs

14 months agomkosi-initrd: Add more default kernel modules
Daan De Meyer [Thu, 6 Jun 2024 10:41:58 +0000 (12:41 +0200)] 
mkosi-initrd: Add more default kernel modules

More virtualization modules required to boot an opensuse image in
qemu (opensuse has much more modules compared to Fedora which has
more builtin).

14 months agoIntroduce "default" and "host" for kernel modules include settings
Daan De Meyer [Thu, 6 Jun 2024 09:43:25 +0000 (11:43 +0200)] 
Introduce "default" and "host" for kernel modules include settings

14 months agomkosi-initrd: Include various virtualization modules by default
Daan De Meyer [Wed, 5 Jun 2024 17:30:13 +0000 (19:30 +0200)] 
mkosi-initrd: Include various virtualization modules by default

Let's make sure our initrds include all necessary modules to boot
in a virtualized environment.

14 months agomkosi-initrd: Always include vsock
Daan De Meyer [Wed, 5 Jun 2024 16:55:14 +0000 (18:55 +0200)] 
mkosi-initrd: Always include vsock

14 months agoFix `UnifiedKernelImageFormat=` config name
Michael Ferrari [Wed, 5 Jun 2024 12:36:30 +0000 (14:36 +0200)] 
Fix `UnifiedKernelImageFormat=` config name

14 months agoUpdate NEWS
Daan De Meyer [Wed, 5 Jun 2024 10:26:17 +0000 (12:26 +0200)] 
Update NEWS

14 months agoMerge pull request #2450 from DaanDeMeyer/ndb
Daan De Meyer [Wed, 5 Jun 2024 10:25:29 +0000 (12:25 +0200)] 
Merge pull request #2450 from DaanDeMeyer/ndb

Two opensuse improvements

14 months agoGive local repositories a higher priority 2450/head
Daan De Meyer [Sat, 2 Mar 2024 18:39:44 +0000 (19:39 +0100)] 
Give local repositories a higher priority

14 months agoImplement Repositories= for zypper
Daan De Meyer [Sat, 2 Mar 2024 17:21:29 +0000 (18:21 +0100)] 
Implement Repositories= for zypper

14 months agoopensuse: Add glibc-gconv-modules-extra to default tools tree
Daan De Meyer [Wed, 5 Jun 2024 07:59:34 +0000 (09:59 +0200)] 
opensuse: Add glibc-gconv-modules-extra to default tools tree

This package was split off from glibc but mtools does not yet have
a required dependency on it (see
https://bugzilla.opensuse.org/show_bug.cgi?id=1225982) so for now
let's install it ourselves.

14 months agoMake sure we don't fail when there is no sdmagic section in sd-stub
Daan De Meyer [Wed, 5 Jun 2024 07:15:50 +0000 (09:15 +0200)] 
Make sure we don't fail when there is no sdmagic section in sd-stub

The sdmagic section in sd-stub was only introduced in systemd 250.
Since Ubuntu Jammy ships systemd 249, let's make sure we gracefully
handle the scenario where we can't find the sdmagic section.

14 months agodnf: Enable versionlock plugin by default
Daan De Meyer [Wed, 5 Jun 2024 07:29:50 +0000 (09:29 +0200)] 
dnf: Enable versionlock plugin by default

Let's allow users to make use of the versionlock plugin by enabling
it by default. To make sure it doesn't fail, we write a noop
configuration that makes the plugin do nothing at all which users
can then override using PackageManagerTrees=.

14 months agoMerge pull request #2733 from NekkoDroid/bootloader-entry-format
Daan De Meyer [Tue, 4 Jun 2024 13:40:38 +0000 (15:40 +0200)] 
Merge pull request #2733 from NekkoDroid/bootloader-entry-format

Add `UnifiedKernelImageFormat=` (attempt 2)

14 months agoAdd `UnifiedKernelImageFormat=` with specifiers 2733/head
Michael Ferrari [Tue, 4 Jun 2024 11:26:00 +0000 (13:26 +0200)] 
Add `UnifiedKernelImageFormat=` with specifiers

This can be used to control the name to use for the UKI during image
generation. Special `&` specifiers can be used to include kernel
specific information in the filename.

This is useful for the `systemd-sysupdate` case, as you can set this to
`%i_%v` to use a format that can be parse by its configuration. The
current format used includes both a roothash as well as the kernel
version which both can't be matched by sysupdate.

14 months agoUnify roothash handling for the UKI name
Michael Ferrari [Thu, 30 May 2024 14:26:25 +0000 (16:26 +0200)] 
Unify roothash handling for the UKI name

14 months agoAdd `UnifiedKernelImages=` to summary
Michael Ferrari [Tue, 4 Jun 2024 11:04:52 +0000 (13:04 +0200)] 
Add `UnifiedKernelImages=` to summary

14 months agoci: Switch to Ubuntu Noble
Daan De Meyer [Sun, 2 Jun 2024 16:09:55 +0000 (18:09 +0200)] 
ci: Switch to Ubuntu Noble

14 months agoSet --pretty=no in run_shell() when calling repart
Daan De Meyer [Sun, 2 Jun 2024 15:56:15 +0000 (17:56 +0200)] 
Set --pretty=no in run_shell() when calling repart

We do the same in apply_runtime_size() as it makes repart output a
lot less noisy.

14 months agoHave coredumpctl and journalctl operate on forwarded journal if available
Daan De Meyer [Sun, 2 Jun 2024 09:37:16 +0000 (11:37 +0200)] 
Have coredumpctl and journalctl operate on forwarded journal if available

If ForwardJournal= is configured, have coredumpctl and journalctl operate
on it instead of on the image itself. While this doesn't handle the edge
case where the journal is forwarded but the coredumps are stored in the image,
let's assume that users that enable ForwardJournal= will also configure coredumps
to be stored in the journal.

14 months agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Sat, 1 Jun 2024 22:44:27 +0000 (22:44 +0000)] 
build(deps): bump redhat-plumbers-in-action/differential-shellcheck

Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.1.1 to 5.3.0.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/c15070885a82a2c93db8a765d332c38c50dde8b3...60c9f2b924a9c5a2ddbb25e7b23e8e11b56faab9)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
14 months agobuild(deps): bump actions/checkout from 4.1.4 to 4.1.6
dependabot[bot] [Sat, 1 Jun 2024 22:44:30 +0000 (22:44 +0000)] 
build(deps): bump actions/checkout from 4.1.4 to 4.1.6

Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.4 to 4.1.6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/0ad4b8fadaa221de15dcec353f45205ec38ea70b...a5ac7e51b41094c92402da3b24376905380afc29)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
14 months agofedora: do not install dnf-3
Zbigniew Jędrzejewski-Szmek [Fri, 31 May 2024 12:09:21 +0000 (14:09 +0200)] 
fedora: do not install dnf-3

We get both dnf5 and dnf, which doesn't seem necessary.
Also, in F41 dnf is Provided by dnf5, so that'd install dnf5 anyway.

14 months agodnf: drop metadata_expire=never in metadata syncs
Zbigniew Jędrzejewski-Szmek [Fri, 31 May 2024 12:02:09 +0000 (14:02 +0200)] 
dnf: drop metadata_expire=never in metadata syncs

With this option on, builds that have an existing cache directory will
generally fail. Fedora doesn't keep old packages on mirrors, and metadata
refers to specific package versions, so stale metadata will cause dnf to fail.

This fixes mkosi test image builds in systemd for me.

14 months agofedora: use F40
Zbigniew Jędrzejewski-Szmek [Fri, 31 May 2024 11:48:48 +0000 (13:48 +0200)] 
fedora: use F40

14 months agoMerge pull request #2730 from DaanDeMeyer/fix
Daan De Meyer [Wed, 29 May 2024 12:10:08 +0000 (14:10 +0200)] 
Merge pull request #2730 from DaanDeMeyer/fix

Fix invoked_as_root initialization

14 months agoRelax permissions on systemd-journal-remote configuration 2730/head
Daan De Meyer [Wed, 29 May 2024 12:03:08 +0000 (14:03 +0200)] 
Relax permissions on systemd-journal-remote configuration

Let's make sure the systemd-journal-remote process we start can always
read the configuration, even if it's running as a less privileged user.

14 months agoFix invoked_as_root initialization
Daan De Meyer [Wed, 29 May 2024 11:17:25 +0000 (13:17 +0200)] 
Fix invoked_as_root initialization

14 months agoDrop unnecessary escaping
Daan De Meyer [Wed, 29 May 2024 09:26:53 +0000 (11:26 +0200)] 
Drop unnecessary escaping

14 months agoRemove support for CentOS Stream 8
Daan De Meyer [Tue, 28 May 2024 19:14:56 +0000 (21:14 +0200)] 
Remove support for CentOS Stream 8

Going EOL next week so let's drop support

14 months agoMerge pull request #2728 from DaanDeMeyer/fix
Daan De Meyer [Wed, 29 May 2024 09:17:46 +0000 (11:17 +0200)] 
Merge pull request #2728 from DaanDeMeyer/fix

Run systemd-journal-remote as correct user if scope is not available

14 months agoRun systemd-journal-remote as correct user if scope is not available 2728/head
Daan De Meyer [Wed, 29 May 2024 08:21:10 +0000 (10:21 +0200)] 
Run systemd-journal-remote as correct user if scope is not available

14 months agoAllow '+' in systemd-stub version
Daan De Meyer [Wed, 29 May 2024 08:20:22 +0000 (10:20 +0200)] 
Allow '+' in systemd-stub version

The suse version has a '+' in it.

14 months agoMerge pull request #2711 from behrmann/docimprov
Jörg Behrmann [Tue, 28 May 2024 16:08:18 +0000 (18:08 +0200)] 
Merge pull request #2711 from behrmann/docimprov

Doc improvements

14 months agodoc: add a paragraph before the matcher table 2711/head
Jörg Behrmann [Tue, 28 May 2024 15:55:00 +0000 (17:55 +0200)] 
doc: add a paragraph before the matcher table

The table directly follows the definitions, which makes it difficult to tell
apart from the previous definition.

14 months agonspawn Environment variable passing fixes
Daan De Meyer [Tue, 28 May 2024 15:01:11 +0000 (17:01 +0200)] 
nspawn Environment variable passing fixes

- Translate '-' to '_'
- Ignore names with dot in them
- Pass lowercase as environment variable as well if it has a '=' in it

14 months agodoc: add missing language specification to code blocks
Jörg Behrmann [Tue, 28 May 2024 15:22:29 +0000 (17:22 +0200)] 
doc: add missing language specification to code blocks

14 months agodoc: change X in tables to checkmark
Jörg Behrmann [Tue, 28 May 2024 15:08:01 +0000 (17:08 +0200)] 
doc: change X in tables to checkmark

We already have two different X in there, X and x, which are hard to tell
apart, and since we want to say something positive, let's make it a checkmark.

14 months agodoc: change conf to ini for source blocks
Jörg Behrmann [Wed, 22 May 2024 13:40:21 +0000 (15:40 +0200)] 
doc: change conf to ini for source blocks

14 months agodoc: remove "mkosi." prefix from environment variable table
Jörg Behrmann [Wed, 15 May 2024 07:36:01 +0000 (09:36 +0200)] 
doc: remove "mkosi." prefix from environment variable table

pandoc has a weird algorithm to define the width of tables in markdown. The
width cannot be specified absolutely, but is made relative to the text width by
how many dashes are in the horizontal line under the header in each
column. This can lead to spurious word breaks even on wide displays where the
whole table would fit. Removing the prefix should somewhat ameliorate the
problem until a better solution is found.

14 months agodoc: center checkbox tables
Jörg Behrmann [Wed, 15 May 2024 07:35:33 +0000 (09:35 +0200)] 
doc: center checkbox tables

14 months agodoc: make standalone example bold
Jörg Behrmann [Wed, 15 May 2024 07:33:19 +0000 (09:33 +0200)] 
doc: make standalone example bold

14 months agodoc: fix rendering of definition lists
Jörg Behrmann [Wed, 15 May 2024 07:28:49 +0000 (09:28 +0200)] 
doc: fix rendering of definition lists

The way we formatted definitions

term
: paragraph1

: paragraph2

gets clobbered into single text blocks by pandoc. The thing it can actually
parse is

term
:   paragraph1

    paragraph2

This (mostly) whitespace-only change unclobbers the text.

14 months agoMerge pull request #2724 from DaanDeMeyer/fix
Daan De Meyer [Tue, 28 May 2024 13:53:21 +0000 (15:53 +0200)] 
Merge pull request #2724 from DaanDeMeyer/fix

Various fixes

14 months agoPass arguments that look like env variables as env to systemd-nspawn 2724/head
Daan De Meyer [Tue, 28 May 2024 13:21:55 +0000 (15:21 +0200)] 
Pass arguments that look like env variables as env to systemd-nspawn

The kernel passes unknown parameters as environment variables to pid1.
Let's do the same for systemd-nspawn. Of course we don't know what is
known and unknown so let's take advantage of the fact that kernel cmdline
arguments are (usually) lower case and environment variables are (usually)
upper case and use that to determine whether to pass something as an argument
or an environment variable.

14 months agoOnly call become_root() if we need a full uid map
Daan De Meyer [Tue, 28 May 2024 12:51:32 +0000 (14:51 +0200)] 
Only call become_root() if we need a full uid map

If we only need to map the current user to root, bubblewrap will do
that for us and we don't need to call become_root() after forking.

14 months agoFix scope_env()
Daan De Meyer [Tue, 28 May 2024 12:37:59 +0000 (14:37 +0200)] 
Fix scope_env()

DBUS_SYSTEM_ADDRESS isn't always set so make sure to check for the
canonical location of the system bus socket as well.