]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
19 months agotreewide: fix a few typos in NEWS, docs, comments, and log messages
Dmitry V. Levin [Sat, 27 Apr 2024 08:00:00 +0000 (08:00 +0000)] 
treewide: fix a few typos in NEWS, docs, comments, and log messages

19 months agoFix spelling errors found by Lintian
Luca Boccassi [Fri, 26 Apr 2024 15:58:00 +0000 (16:58 +0100)] 
Fix spelling errors found by Lintian

19 months agounits: add Before=shutdown.target to systemd-networkd-persistent-storage.service
Luca Boccassi [Fri, 26 Apr 2024 17:43:01 +0000 (18:43 +0100)] 
units: add Before=shutdown.target to systemd-networkd-persistent-storage.service

It's ordered with networkd, but just in case. Lintian complains:

W: systemd: systemd-service-file-shutdown-problems [usr/lib/systemd/system/systemd-networkd-persistent-storage.service]

Follow-up for 91676b645886382328c261efd5e83490d16e75cf

19 months agoMerge pull request #32510 from arthurzam/bash-v256
Luca Boccassi [Fri, 26 Apr 2024 20:16:09 +0000 (22:16 +0200)] 
Merge pull request #32510 from arthurzam/bash-v256

shell-completions: add bash completion for run0 & systemd-vpick

19 months agoMerge pull request #32439 from CodethinkLabs/simple-mkosi-integration-tests
Daan De Meyer [Fri, 26 Apr 2024 18:48:00 +0000 (20:48 +0200)] 
Merge pull request #32439 from CodethinkLabs/simple-mkosi-integration-tests

Enable some simple mkosi integration tests

19 months agoMerge pull request #32504 from bluca/test_failure
Luca Boccassi [Fri, 26 Apr 2024 17:55:24 +0000 (19:55 +0200)] 
Merge pull request #32504 from bluca/test_failure

test: do not fail if mknod() fails in a build system

19 months agoMerge pull request #32505 from mrc0mmand/fix-build-without-importd
Luca Boccassi [Fri, 26 Apr 2024 17:35:35 +0000 (19:35 +0200)] 
Merge pull request #32505 from mrc0mmand/fix-build-without-importd

import: skip the whole subdir when building with -Dimportd=false

19 months agotest/meson.build: Add some runnable integration tests 32439/head
Richard Maw [Thu, 18 Apr 2024 09:39:00 +0000 (10:39 +0100)] 
test/meson.build: Add some runnable integration tests

19 months agoTEST-81-GENERATORS: Clean /proc/cmdline of unusual mounts
Richard Maw [Sat, 24 Feb 2024 18:13:59 +0000 (18:13 +0000)] 
TEST-81-GENERATORS: Clean /proc/cmdline of unusual mounts

19 months agoTEST-36-NUMAPOLICY: Bump PID1 strace time to 3 seconds
Richard Maw [Fri, 26 Apr 2024 11:54:34 +0000 (12:54 +0100)] 
TEST-36-NUMAPOLICY: Bump PID1 strace time to 3 seconds

CI can be slow and only waiting 1 second makes it flaky there.

19 months agoTEST-26-SYSTEMCTL: Create /etc/init.d if needed
Richard Maw [Wed, 24 Apr 2024 13:44:27 +0000 (14:44 +0100)] 
TEST-26-SYSTEMCTL: Create /etc/init.d if needed

OpenSUSE doesn't disable sysv compat but also may not have anything in
/etc/init.d.

19 months agoTEST-25-IMPORT: Skip if importctl not installed
Richard Maw [Wed, 24 Apr 2024 11:16:37 +0000 (12:16 +0100)] 
TEST-25-IMPORT: Skip if importctl not installed

machinectl import-* was split out into importctl
which is a separately configurable component to machinectl
and might not always be available.

19 months agoTEST-19-CGROUP: Skip on opensuse
Richard Maw [Thu, 25 Apr 2024 11:18:57 +0000 (12:18 +0100)] 
TEST-19-CGROUP: Skip on opensuse

OpenSUSE images seem to be unhappy with either how they are built
or what they are being asked to do.

The listed device-mapper failure is just one of the strange errors,
I have also seen it fail to propagate cgroup properties into new cgroups
that were previously guaranteed to exist.

19 months agoTEST-17-UDEV: Skip credentials test if service not loaded
Richard Maw [Tue, 23 Apr 2024 21:30:24 +0000 (22:30 +0100)] 
TEST-17-UDEV: Skip credentials test if service not loaded

It does not appear to exist on OpenSUSE yet.

19 months agotest: modernize test-dirent-util 32504/head
Luca Boccassi [Fri, 26 Apr 2024 16:09:04 +0000 (17:09 +0100)] 
test: modernize test-dirent-util

Follow-up for 6a57d86bf9d7f8d6f5d339f57665dfb2e1d191c5

19 months agotest: do not fail if mknod() fails in a build system
Luca Boccassi [Fri, 26 Apr 2024 12:30:31 +0000 (13:30 +0100)] 
test: do not fail if mknod() fails in a build system

mknod fails in a Salsa container when building Debian packages, skip the check

Follow-up for 6a57d86bf9d7f8d6f5d339f57665dfb2e1d191c5

19 months agoshell-completion: add bash-completion for systemd-vpick command 32510/head
Arthur Zamarin [Fri, 26 Apr 2024 10:29:47 +0000 (13:29 +0300)] 
shell-completion: add bash-completion for systemd-vpick command

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
19 months agoshell-completion: add bash-completion for run0 command
Arthur Zamarin [Fri, 26 Apr 2024 10:15:55 +0000 (13:15 +0300)] 
shell-completion: add bash-completion for run0 command

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
19 months agoshell-completions: install new completions which were forgotten
Arthur Zamarin [Fri, 26 Apr 2024 15:43:38 +0000 (18:43 +0300)] 
shell-completions: install new completions which were forgotten

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
19 months agoimport: skip the whole subdir when building with -Dimportd=false 32505/head
Frantisek Sumsal [Fri, 26 Apr 2024 15:07:39 +0000 (17:07 +0200)] 
import: skip the whole subdir when building with -Dimportd=false

Resolves: #32501

19 months agomountfsd: drop explicit dependencies for systemd-mountwork
Frantisek Sumsal [Fri, 26 Apr 2024 15:06:06 +0000 (17:06 +0200)] 
mountfsd: drop explicit dependencies for systemd-mountwork

As the executables are automagically linked against libshared.

19 months agotest: mountnfsd -> mountfsd
Frantisek Sumsal [Fri, 26 Apr 2024 14:53:43 +0000 (16:53 +0200)] 
test: mountnfsd -> mountfsd

I keep accidentally writing mountnfsd instead of mountfsd, and a couple
of instances managed to get into the repo.

19 months agomkosi: use generic ubuntu kernel for udev and nvme tests
Richard Maw [Tue, 23 Apr 2024 15:36:15 +0000 (16:36 +0100)] 
mkosi: use generic ubuntu kernel for udev and nvme tests

TEST-17-UDEV expects to find scsi_debug and TEST-84-STORAGETM expects to
find nvmet-tcp.

This isn't ideal as it adds firmware, microcode and other drivers to the
initramfs, but there's no linux-modules-extra virtual package
to just include the extra modules.

19 months agomkosi: Use default opensuse kernel for tests
Richard Maw [Tue, 23 Apr 2024 20:39:04 +0000 (21:39 +0100)] 
mkosi: Use default opensuse kernel for tests

The kvmsmall kernel lacks important modules like the dummy network
device which TEST-17-UDEV requires very early on.

19 months agotest: Disable network by default in mkosi tests
Richard Maw [Thu, 25 Apr 2024 09:00:15 +0000 (10:00 +0100)] 
test: Disable network by default in mkosi tests

19 months agoMerge pull request #32499 from mrc0mmand/docs-fix-method-name
Luca Boccassi [Fri, 26 Apr 2024 14:47:25 +0000 (16:47 +0200)] 
Merge pull request #32499 from mrc0mmand/docs-fix-method-name

docs: drop invalid links & fix method name

19 months agoMerge pull request #32498 from DaanDeMeyer/mkosi
Luca Boccassi [Fri, 26 Apr 2024 14:44:19 +0000 (16:44 +0200)] 
Merge pull request #32498 from DaanDeMeyer/mkosi

mkosi: Set CleanPackageMetadata=yes for minimal-base

19 months agosd-daemon: Replace SO_LINGER with shutdown() + recv() 32498/head
Daan De Meyer [Fri, 26 Apr 2024 13:02:56 +0000 (15:02 +0200)] 
sd-daemon: Replace SO_LINGER with shutdown() + recv()

Let's shutdown the write end and wait for EOF from the other side
before continuing to make sure that the receiver has received all
data we sent on the socket.

19 months agodocs: PrepareForSuspend() is not a valid signal name 32499/head
Frantisek Sumsal [Fri, 26 Apr 2024 12:27:03 +0000 (14:27 +0200)] 
docs: PrepareForSuspend() is not a valid signal name

19 months agodocs: drop invalid links
Frantisek Sumsal [Fri, 26 Apr 2024 12:45:52 +0000 (14:45 +0200)] 
docs: drop invalid links

19 months agoTEST-50-DISSECT: Don't log image contents to console
Daan De Meyer [Fri, 26 Apr 2024 11:51:49 +0000 (13:51 +0200)] 
TEST-50-DISSECT: Don't log image contents to console

These can contain quite a few files, so let's not write every single
file and directory straight to the console to speed things up.

19 months agomkosi: Set CleanPackageMetadata=yes for minimal-base
Daan De Meyer [Fri, 26 Apr 2024 11:46:45 +0000 (13:46 +0200)] 
mkosi: Set CleanPackageMetadata=yes for minimal-base

We don't want to install any more packages in derived images so let's
not store repository metadata in the image to make it smaller.

19 months agomkosi: Update to latest
Daan De Meyer [Fri, 26 Apr 2024 11:11:37 +0000 (13:11 +0200)] 
mkosi: Update to latest

19 months agoNEWS: add back deprecation notices that have not been implemented yet
Luca Boccassi [Fri, 26 Apr 2024 09:43:46 +0000 (10:43 +0100)] 
NEWS: add back deprecation notices that have not been implemented yet

19 months agoMerge pull request #32494 from arthurzam/bash-importctl
Luca Boccassi [Fri, 26 Apr 2024 09:33:37 +0000 (11:33 +0200)] 
Merge pull request #32494 from arthurzam/bash-importctl

shell completion: add bash completion for importctl & fix machinectl

19 months agoshell completion: fix machinectl import-{tar,raw} 32494/head
Arthur Zamarin [Fri, 26 Apr 2024 09:10:26 +0000 (12:10 +0300)] 
shell completion: fix machinectl import-{tar,raw}

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
19 months agoshell completion: add bash completion for importctl
Arthur Zamarin [Fri, 26 Apr 2024 08:59:58 +0000 (11:59 +0300)] 
shell completion: add bash completion for importctl

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
19 months agopo: Translated using Weblate (Korean)
김인수 [Fri, 26 Apr 2024 08:36:03 +0000 (10:36 +0200)] 
po: Translated using Weblate (Korean)

Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ko/
Translation: systemd/main

19 months agoMerge pull request #32490 from YHNdnzj/namespace-cleanup
Daan De Meyer [Fri, 26 Apr 2024 06:29:32 +0000 (08:29 +0200)] 
Merge pull request #32490 from YHNdnzj/namespace-cleanup

core: trivial cleanups for setup_namespace

19 months agocore/exec-invoke: use FOREACH_ARRAY more, drop unnecessary initialization 32490/head
Mike Yuan [Sun, 21 Apr 2024 16:03:53 +0000 (00:03 +0800)] 
core/exec-invoke: use FOREACH_ARRAY more, drop unnecessary initialization
for some fields

19 months agocore/namespace: check error first, add missing assertion
Mike Yuan [Sun, 21 Apr 2024 15:32:01 +0000 (23:32 +0800)] 
core/namespace: check error first, add missing assertion

19 months agomount-setup: fix typo
Mike Yuan [Sat, 20 Apr 2024 19:09:22 +0000 (03:09 +0800)] 
mount-setup: fix typo

19 months agoNEWS: finalize for v256~rc1 v256-rc1
Luca Boccassi [Thu, 25 Apr 2024 21:30:35 +0000 (22:30 +0100)] 
NEWS: finalize for v256~rc1

19 months agoMerge pull request #32488 from bluca/chores
Luca Boccassi [Thu, 25 Apr 2024 23:59:36 +0000 (01:59 +0200)] 
Merge pull request #32488 from bluca/chores

Chores for 256~rc1

19 months agosd-radv: remove unnecessary check
Luca Boccassi [Thu, 25 Apr 2024 15:18:08 +0000 (16:18 +0100)] 
sd-radv: remove unnecessary check

in6_addr_prefix_intersect() returns a bool, so the check < 0 is
dead code. Flagged by codeql.

Follow-up for c7c56724a5d7cc2b6b0d9d5f95b1055811014843

19 months agomeson: update version numbers for 256~rc1 32488/head
Luca Boccassi [Thu, 25 Apr 2024 21:26:08 +0000 (22:26 +0100)] 
meson: update version numbers for 256~rc1

19 months agoUpdate hwdb
Luca Boccassi [Thu, 25 Apr 2024 21:23:52 +0000 (22:23 +0100)] 
Update hwdb

19 months agoNEWS: update contributors list
Luca Boccassi [Thu, 25 Apr 2024 21:21:51 +0000 (22:21 +0100)] 
NEWS: update contributors list

19 months agovarlink: make errors returned by verify_unix_socket() systematic
Lennart Poettering [Thu, 25 Apr 2024 15:23:24 +0000 (17:23 +0200)] 
varlink: make errors returned by verify_unix_socket() systematic

Previously, if we encountered a non-socket fd we'd return ENOTSOCK the
first time, but the subsequent times we'd return ENOMEDIUM, due to
caching. Let's make sure we return the same errors all the the time.

19 months agoMerge pull request #32445 from DaanDeMeyer/mkosi-images
Daan De Meyer [Thu, 25 Apr 2024 19:59:23 +0000 (21:59 +0200)] 
Merge pull request #32445 from DaanDeMeyer/mkosi-images

mkosi: Build minimal images and enable related integration tests

19 months agosd-daemon: Set SO_LINGER on AF_VSOCK notify socket fds
Daan De Meyer [Thu, 25 Apr 2024 17:35:07 +0000 (19:35 +0200)] 
sd-daemon: Set SO_LINGER on AF_VSOCK notify socket fds

We're still seeing problems in mkosi CI where we lose notify messages
sent over vsock from virtual machines because the virtual machine shuts
down before the socket buffers are flushed.

Let's try setting SO_LINGER on vsock sockets so that the kernel waits
until the buffers are flushed when we close the file descriptor.

To make sure it works, let's get rid of our previous workaround that
sends EXIT_STATUS earlier to reduce the chance of it not arriving.
This way, if it doesn't work, we'll notice it immediately due to CI
failures.

19 months agoMerge pull request #32484 from DaanDeMeyer/mkosi-ci
Daan De Meyer [Thu, 25 Apr 2024 19:13:09 +0000 (21:13 +0200)] 
Merge pull request #32484 from DaanDeMeyer/mkosi-ci

Two mkosi CI improvements

19 months agomkosi: Build minimal images and enable related integration tests 32445/head
Daan De Meyer [Wed, 24 Apr 2024 19:21:34 +0000 (21:21 +0200)] 
mkosi: Build minimal images and enable related integration tests

This commit adds definitions to build the minimal_0 and minimal_1
images with mkosi and includes them into the system image. We also
move the building of the various app-xxx and similar images that are
extremely minimal into the tests itself by moving the related logic
from install_verity_minimal() into a new function
install_extension_images() in util.sh. Because the mkosi /usr is
read-only, we now place the extension images in /tmp instead of
/usr/share.

Co-authored-by: Richard Maw <richard.maw@codethink.co.uk>
Co-authored-by: sam-leonard-ct <sam.leonard@codethink.co.uk>
19 months agomkosi: Only keep failed test journals and other logs for 7 days 32484/head
Daan De Meyer [Thu, 25 Apr 2024 17:52:10 +0000 (19:52 +0200)] 
mkosi: Only keep failed test journals and other logs for 7 days

The default retention of 90 days seems a bit long, so drop it to 7
days.

19 months agomkosi: Only archive outputs in systemd and systemd-stable repositories
Daan De Meyer [Thu, 25 Apr 2024 17:50:38 +0000 (19:50 +0200)] 
mkosi: Only archive outputs in systemd and systemd-stable repositories

Private forks would very quickly reach their quota or spend lots of
money trying to archive all these artifacts, so let's make sure it
only happens on our own repositories.

19 months agoTEST-50-DISSECT: Make sure logging sockets are mounted into images
Daan De Meyer [Thu, 25 Apr 2024 14:58:44 +0000 (16:58 +0200)] 
TEST-50-DISSECT: Make sure logging sockets are mounted into images

Otherwise we lose valuable logging from systemd-executor when things
go wrong since it can only log to the journal and not to the console
in these cases.

19 months agoMerge pull request #32475 from bluca/skip
Luca Boccassi [Thu, 25 Apr 2024 16:48:57 +0000 (18:48 +0200)] 
Merge pull request #32475 from bluca/skip

test: skip testsuite-50.mountnfsd if kernel/polkit are too old

19 months agoFix _do_log conditions in log_exec_* macros
Łukasz Stelmach [Thu, 25 Apr 2024 14:10:49 +0000 (16:10 +0200)] 
Fix _do_log conditions in log_exec_* macros

The expression for calculation of the _do_log values in the log_exec_*
macros need to be the same as the unit_log_level_test() function, used
to calculate _do_log in unit.h. The only difference between execute.h
and unit.h is the lack of the Unit structure.

Fixes: b646fc324a ("core: ensure execute/spawn functions can work without Unit object")
Fixes: 210ca71cb5 ("core/execute: clean up log_exec_full_errno and friends")
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
19 months agoMerge pull request #32477 from DaanDeMeyer/fixes
Daan De Meyer [Thu, 25 Apr 2024 16:24:09 +0000 (18:24 +0200)] 
Merge pull request #32477 from DaanDeMeyer/fixes

Various fixes

19 months agoMerge pull request #32474 from poettering/varlink-no-pidfd
Luca Boccassi [Thu, 25 Apr 2024 15:27:18 +0000 (17:27 +0200)] 
Merge pull request #32474 from poettering/varlink-no-pidfd

varlink: tweak fallback for SO_PEERPIDFD on old kernels

19 months agoMerge pull request #32467 from yuwata/network-radv-cleanup
Luca Boccassi [Thu, 25 Apr 2024 15:10:27 +0000 (17:10 +0200)] 
Merge pull request #32467 from yuwata/network-radv-cleanup

undefined

19 months agobuild(deps): bump pkg/debian from `733ac7c` to `4b1f868`
dependabot[bot] [Thu, 25 Apr 2024 09:45:55 +0000 (09:45 +0000)] 
build(deps): bump pkg/debian from `733ac7c` to `4b1f868`

Bumps pkg/debian from `733ac7c` to `4b1f868`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
19 months agocryptsetup-tokens: fix pin asserts
Antonio Alvarez Feijoo [Thu, 25 Apr 2024 10:14:25 +0000 (12:14 +0200)] 
cryptsetup-tokens: fix pin asserts

If a user only presses ENTER when the PIN is requested (without actually typing
the PIN), an assertion is reached and no other unlock method is requested.

```
sh-5.2# systemctl status systemd-cryptsetup@cr_root
× systemd-cryptsetup@cr_root.service - Cryptography Setup for cr_root
     Loaded: loaded (/etc/crypttab; generated)
    Drop-In: /etc/systemd/system/systemd-cryptsetup@.service.d
             └─pcr-signature.conf
     Active: failed (Result: core-dump) since Thu 2024-04-25 08:44:30 UTC; 10min ago
       Docs: man:crypttab(5)
             man:systemd-cryptsetup-generator(8)
             man:systemd-cryptsetup@.service(8)
    Process: 559 ExecStartPre=/usr/bin/pcr-signature.sh (code=exited, status=0/SUCCESS)
    Process: 604 ExecStart=/usr/bin/systemd-cryptsetup attach cr_root /dev/disk/by-uuid/a8cbd937-6975-4e61-9120-ce5c03138700 none x-initrd.attach,tpm2-device=auto (code=dumped, signal=ABRT)
   Main PID: 604 (code=dumped, signal=ABRT)
        CPU: 19ms

Apr 25 08:44:29 localhost systemd[1]: Starting Cryptography Setup for cr_root...
Apr 25 08:44:30 localhost systemd-cryptsetup[604]: Assertion '!pin || pin_size > 0' failed at src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c:60, function cryptsetup_token_open_pin(). Aborting.
Apr 25 08:44:30 localhost systemd[1]: systemd-cryptsetup@cr_root.service: Main process exited, code=dumped, status=6/ABRT
Apr 25 08:44:30 localhost systemd[1]: systemd-cryptsetup@cr_root.service: Failed with result 'core-dump'.
Apr 25 08:44:30 localhost systemd[1]: Failed to start Cryptography Setup for cr_root.
```

In this case, `cryptsetup_token_open_pin()` receives an empty (non-NULL) `pin`
with `pin_size` equals to 0.

```
🔐 Please enter LUKS2 token PIN:

Breakpoint 3, cryptsetup_token_open_pin (cd=0x5555555744c0, token=0, pin=0x5555555b3cc0 "", pin_size=0, ret_password=0x7fffffffd380,
    ret_password_len=0x7fffffffd378, usrptr=0x0) at ../src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c:42
42                 void *usrptr /* plugin defined parameter passed to crypt_activate_by_token*() API */) {
(gdb) continue
Assertion '!pin || pin_size > 0' failed at src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c:60, function cryptsetup_token_open_pin(). Aborting.
```

19 months agotree-wide: Use log_setup() everywhere 32477/head
Daan De Meyer [Thu, 25 Apr 2024 12:09:09 +0000 (14:09 +0200)] 
tree-wide: Use log_setup() everywhere

Otherwise the default log target is the console and we won't use
the journal socket even if it is available.

19 months agomkosi: Make sure systemd-resolved is started on boot
Daan De Meyer [Thu, 25 Apr 2024 11:50:21 +0000 (13:50 +0200)] 
mkosi: Make sure systemd-resolved is started on boot

19 months agoportable: Don't fail if /etc/resolv.conf doesn't exist
Daan De Meyer [Thu, 25 Apr 2024 11:49:01 +0000 (13:49 +0200)] 
portable: Don't fail if /etc/resolv.conf doesn't exist

The portable profiles assume /etc/resolv.conf exists, which isn't
always the case. Let's mark the mounts as optional so we don't fail
to start the unit if /etc/resolv.conf doesn't exist.

19 months agotest: Skip meson integration tests if SYSTEMD_INTEGRATION_TESTS != 1
Daan De Meyer [Wed, 24 Apr 2024 19:18:27 +0000 (21:18 +0200)] 
test: Skip meson integration tests if SYSTEMD_INTEGRATION_TESTS != 1

We cannot mark a test suite as excluded by default in meson. Instead,
let's require that SYSTEMD_INTEGRATION_TESTS=1 and skip any integration
test if it's not set. This is effectively the same as excluding it by
default. If the integration-test option is enabled, we'll set the
environment variable by default, just like we do with SYSTEMD_SLOW_TESTS
and the slow-tests meson option.

19 months agomeson: Properly check dependencies of mkosi target
Daan De Meyer [Wed, 24 Apr 2024 19:17:06 +0000 (21:17 +0200)] 
meson: Properly check dependencies of mkosi target

Let's insist on mkosi being found if the integration-tests option
is enabled and let's only add dependencies on systemd-journal-remote
and systemd-measure if they're being built. Drop ukify from the list
as its part of public_programs.

19 months agomkosi: Add squashfs-tools
Daan De Meyer [Wed, 24 Apr 2024 16:32:49 +0000 (18:32 +0200)] 
mkosi: Add squashfs-tools

Required for various integration tests.

19 months agoMerge pull request #32441 from poettering/rework-handoff-timestamp
Lennart Poettering [Thu, 25 Apr 2024 13:19:17 +0000 (15:19 +0200)] 
Merge pull request #32441 from poettering/rework-handoff-timestamp

pid1: rework handoff timestamp

19 months agoupdate NEWS
Lennart Poettering [Thu, 25 Apr 2024 13:18:00 +0000 (15:18 +0200)] 
update NEWS

19 months agoMerge pull request #32476 from CodethinkLabs/meson-logs-ci
Daan De Meyer [Thu, 25 Apr 2024 13:09:34 +0000 (15:09 +0200)] 
Merge pull request #32476 from CodethinkLabs/meson-logs-ci

ci: Add the meson logs to failure log artifacts

19 months agotest: skip testsuite-50.mountnfsd if kernel/polkit are too old 32475/head
Luca Boccassi [Thu, 25 Apr 2024 10:57:09 +0000 (11:57 +0100)] 
test: skip testsuite-50.mountnfsd if kernel/polkit are too old

Need full support of pidfd to work, so skip the test if it's not
available

19 months agotest: use sd-analyze for kernel version check in TEST-62
Luca Boccassi [Thu, 25 Apr 2024 11:43:18 +0000 (12:43 +0100)] 
test: use sd-analyze for kernel version check in TEST-62

19 months agoci: Add the meson logs to failure log artifacts 32476/head
Richard Maw [Thu, 25 Apr 2024 11:08:59 +0000 (12:08 +0100)] 
ci: Add the meson logs to failure log artifacts

It is not a lot of use to add --debug to tests without it
since only the last 100 lines are printed to console.

19 months agoci: Update mkosi version
Richard Maw [Thu, 25 Apr 2024 12:01:52 +0000 (13:01 +0100)] 
ci: Update mkosi version

The change to add microcode support had a bug in ukify handling
that broke when it should have been picked up from ExtraSearchPaths.

19 months agoupdate TODO 32441/head
Lennart Poettering [Wed, 24 Apr 2024 09:22:31 +0000 (11:22 +0200)] 
update TODO

19 months agoexecute: make ExecStatus dump more useful by showing passed time
Lennart Poettering [Wed, 24 Apr 2024 10:01:14 +0000 (12:01 +0200)] 
execute: make ExecStatus dump more useful by showing passed time

Let's show the runtimes of our commands and preparations for them. It's
actually quite interesting, we sometimes are irritatingly slow with our
handoffs.

19 months agoswap: hook up with handoff timestamps
Lennart Poettering [Wed, 24 Apr 2024 08:13:55 +0000 (10:13 +0200)] 
swap: hook up with handoff timestamps

19 months agomount: hook up with handoff timestamps
Lennart Poettering [Wed, 24 Apr 2024 08:13:39 +0000 (10:13 +0200)] 
mount: hook up with handoff timestamps

19 months agosocket: hookup handoff timestamps with processes forked off by socket units
Lennart Poettering [Wed, 24 Apr 2024 07:47:29 +0000 (09:47 +0200)] 
socket: hookup handoff timestamps with processes forked off by socket units

19 months agomanager: switch service unit type over to using new handoff timestamping logic
Lennart Poettering [Tue, 23 Apr 2024 21:27:23 +0000 (23:27 +0200)] 
manager: switch service unit type over to using new handoff timestamping logic

Also: rename Handover → Handoff. I think it makes it clearer that this
is not really about handing over any resources, but that the executor is
out off the game from that point on.

19 months agoexecute: send handoff timestamps from executor to service manager
Lennart Poettering [Tue, 23 Apr 2024 21:22:07 +0000 (23:22 +0200)] 
execute: send handoff timestamps from executor to service manager

This changes the executor to systematically send handoff timestamps to
the service manager if a socket for that is supplied. This drops the
code that did this via Type=exec messages, and reverts that part to the
old behaviour before 93cb78aee2cff8109a5a70128287732f03d7a062.

Benefits of this approach:

1. We can collect the handoff for any command we fork off, regardless
   if it's ExecStart= something else, regardless whether it's Type=exec,
   Type=simple or some any other service type, regardless of the unit
   type.

2. We collect both CLOCK_REALTIME and CLOCK_MONOTONIC, as we do for the
   other process timestamps.

3. It's entirely backwards compatible, as this doesn't change the
   protocol between service manager and executor, but just extends it.

19 months agomanager: add socket for receiving handoff timestamps from forked children
Lennart Poettering [Tue, 23 Apr 2024 21:17:49 +0000 (23:17 +0200)] 
manager: add socket for receiving handoff timestamps from forked children

This adds an AF_UNIX socket pair to the manager that we can collect
handoff timestamp messages on.

The idea is that forked off children send a datagram with a timestamp
and we use its sender PID to match it against the right forked off
process.

This part only implements the receiving side: a socket is created, and
listened on. Received datagrams are parsed, verified and then dispatched
to the interested units.

19 months agocore: fix assertions in manager_dispatch_user_lookup_fd()
Lennart Poettering [Thu, 25 Apr 2024 11:30:10 +0000 (13:30 +0200)] 
core: fix assertions in manager_dispatch_user_lookup_fd()

assert_se() should not be used here, these checks are paranoia only and
have no side-effect after all.

hence fix this to use assert(), or in fact ASSERT_PTR()

19 months agovarlink: fix varlink_get_peer_pidref() fallback 32474/head
Lennart Poettering [Thu, 25 Apr 2024 10:44:00 +0000 (12:44 +0200)] 
varlink: fix varlink_get_peer_pidref() fallback

let's properly handle old kernels that have no pidfd, and use regular
pids in that case, as intended originally.

19 months agoerrno-util: consider ENOPROTOOPT another "not supported"
Lennart Poettering [Thu, 25 Apr 2024 10:43:19 +0000 (12:43 +0200)] 
errno-util: consider ENOPROTOOPT another "not supported"

It's generated by not supported getsocktopt()/setsockopt() options, and
it's just another way for saying "not supported", hence treat it as
such.

19 months agorun/run: fix invocation ID handling
Yu Watanabe [Wed, 24 Apr 2024 05:58:07 +0000 (14:58 +0900)] 
run/run: fix invocation ID handling

Fixes a regression introduced by 8157cc0e3e33c97b406cc088cf001ca524154f64.

19 months agonetwork/radv: use sd_ndisc_prefix and friends to manage prefixes and so on 32467/head
Yu Watanabe [Tue, 23 Apr 2024 06:30:22 +0000 (15:30 +0900)] 
network/radv: use sd_ndisc_prefix and friends to manage prefixes and so on

No functional change, just refactoring.

19 months agonetwork/radv: rename pref64Prefix -> Prefix64
Yu Watanabe [Thu, 25 Apr 2024 00:41:26 +0000 (09:41 +0900)] 
network/radv: rename pref64Prefix -> Prefix64

Also this made several coding style cleanups.

19 months agonetwork/route: use our definitions of route preference
Yu Watanabe [Tue, 23 Apr 2024 06:29:28 +0000 (15:29 +0900)] 
network/route: use our definitions of route preference

Including linux/icmpv6.h easily trigger conflicts when another header
includes netinet/icmp6.h. Let's drop the dependency and use our
definition of the same values.

19 months agoMerge pull request #32464 from YHNdnzj/journal-object-invocation-id
Yu Watanabe [Wed, 24 Apr 2024 21:40:45 +0000 (06:40 +0900)] 
Merge pull request #32464 from YHNdnzj/journal-object-invocation-id

journal: small fixes for OBJECT_SYSTEMD_INVOCATION_ID

19 months agosystemctl: list-jobs: interchange 'waiting for' and 'blocking' in output
Rasmus Villemoes [Wed, 24 Apr 2024 09:16:50 +0000 (11:16 +0200)] 
systemctl: list-jobs: interchange 'waiting for' and 'blocking' in output

The current output of 'systemctl list-jobs' with the --after and/or --before
switches seems backwards. With artificial units

# check-oil.service
[Unit]
Description=Check the oil level
Before=engine-ready.target

# fill-gas.service
[Unit]
Description=Fill the tank with gasoline
Before=engine-ready.target

# engine-ready.target
[Unit]
Description=The engine is ready

[Unit]
Description=Start the engine!
After=engine-ready.target
Wants=engine-ready.target

running 'systemctl list-jobs --before --after' produces

JOB UNIT                                              TYPE  STATE
93  check-oil.service                                 start running
└─      waiting for job 94 (engine-ready.target/start)   -     -
102 fill-gas.service                                  start running
└─      waiting for job 94 (engine-ready.target/start)   -     -
94  engine-ready.target                               start waiting
└─      waiting for job 111 (start-engine.service/start) -     -
└─      blocking job 93 (check-oil.service/start)        -     -
└─      blocking job 102 (fill-gas.service/start)        -     -
111 start-engine.service                              start waiting
└─      waiting for job 1 (multi-user.target/start)      -     -
└─      blocking job 94 (engine-ready.target/start)      -     -

Obviously, job 93 is not waiting for job 94, but rather blocking it.

19 months agoMerge pull request #32458 from poettering/manager_get_units_for_pidref
Luca Boccassi [Wed, 24 Apr 2024 19:28:52 +0000 (21:28 +0200)] 
Merge pull request #32458 from poettering/manager_get_units_for_pidref

core: split out manager_get_units_for_pidref() and use it at multiple places

19 months agomount,swap: include ExecStatus output in dump
Lennart Poettering [Wed, 24 Apr 2024 09:10:50 +0000 (11:10 +0200)] 
mount,swap: include ExecStatus output in dump

socket and service units output there ExecCommand/ExecStatus definitions
already, but this was missing in mount/swap. Fix that.

19 months agoMerge pull request #32465 from CodethinkLabs/mkosi-debug
Daan De Meyer [Wed, 24 Apr 2024 19:02:41 +0000 (21:02 +0200)] 
Merge pull request #32465 from CodethinkLabs/mkosi-debug

mkosi: Build images and run mkosi tests with --debug to aid debugging in CI

19 months agoMerge pull request #32461 from DaanDeMeyer/test-fixes
Daan De Meyer [Wed, 24 Apr 2024 17:30:53 +0000 (19:30 +0200)] 
Merge pull request #32461 from DaanDeMeyer/test-fixes

Various integration test fixes

19 months agoTEST-50-DISSECT: Skip mutable sysext tests on virtiofs 32461/head
Daan De Meyer [Tue, 23 Apr 2024 21:20:44 +0000 (23:20 +0200)] 
TEST-50-DISSECT: Skip mutable sysext tests on virtiofs

virtiofs cannot be used as the upper fs for overlayfs, so skip all
the sysext mutable tests that would try to use virtiofs as the
upper fs.

19 months agotest: Add --debug when running mkosi through integration-test-wrapper 32465/head
Richard Maw [Wed, 24 Apr 2024 17:27:07 +0000 (18:27 +0100)] 
test: Add --debug when running mkosi through integration-test-wrapper

19 months agoman/systemd.journal-fields: add missing OBJECT_SYSTEMD_INVOCATION_ID 32464/head
Mike Yuan [Wed, 24 Apr 2024 17:08:47 +0000 (01:08 +0800)] 
man/systemd.journal-fields: add missing OBJECT_SYSTEMD_INVOCATION_ID