]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
18 months agotest: add a brief comment for the chattr check 32957/head
Frantisek Sumsal [Tue, 21 May 2024 13:08:07 +0000 (15:08 +0200)] 
test: add a brief comment for the chattr check

Addresses: https://github.com/systemd/systemd/pull/32907#discussion_r1605919598

18 months agotest: make TEST-65-ANALYZE happy when built with gcov
Frantisek Sumsal [Tue, 21 May 2024 13:04:22 +0000 (15:04 +0200)] 
test: make TEST-65-ANALYZE happy when built with gcov

systemd-analyze runs the generators in a sandbox, which makes gcov
unhappy since it can't update its counters. Let's "silence" gcov in this
particular case by telling it to look for gcov note files in /tmp (where
shouldn't be any, so gcov won't try to update any counters).

18 months agoMerge pull request #32869 from keszybz/dbus-release-session
Zbigniew Jędrzejewski-Szmek [Tue, 21 May 2024 07:01:17 +0000 (09:01 +0200)] 
Merge pull request #32869 from keszybz/dbus-release-session

Allow pam stack to call ReleaseSession

18 months agoMerge pull request #32942 from yuwata/test-journal-sync-more
Luca Boccassi [Mon, 20 May 2024 20:55:54 +0000 (22:55 +0200)] 
Merge pull request #32942 from yuwata/test-journal-sync-more

test: sync journal before read

18 months agotest: extend timeout for DHCP/NDisc tests
Yu Watanabe [Mon, 20 May 2024 16:44:42 +0000 (01:44 +0900)] 
test: extend timeout for DHCP/NDisc tests

Fixes https://github.com/systemd/systemd/pull/32932#issuecomment-2120424121.

18 months agobtrfs-util: check current offset before read
Yu Watanabe [Mon, 20 May 2024 16:34:34 +0000 (01:34 +0900)] 
btrfs-util: check current offset before read

Fixes #32936.

18 months agologind: make ReleaseSession "unprivileged" and allow closing of own session 32869/head
Zbigniew Jędrzejewski-Szmek [Thu, 16 May 2024 15:06:24 +0000 (17:06 +0200)] 
logind: make ReleaseSession "unprivileged" and allow closing of own session

Fixes https://github.com/systemd/systemd/issues/28514.

Quoting https://github.com/systemd/systemd/issues/28514#issuecomment-1831781486:
> Whenever PAM is enabled for a service, we set up the PAM session and then
> fork off a process whose only job is to eventually close the PAM session when
> the service dies. That services we run with service privileges, both to
> minimize attack surface and because we want to use PR_SET_DEATHSIG to be get
> a notification via signal whenever the main process dies. But that only works
> if we have the same credentials as that main process.
>
> Now, if pam_systemd runs inside the PAM stack (which it normally does) it's
> session close hook will ask logind to synchronously end the session via a bus
> call. Currently that call is not accessible to unprivileged clients. And
> that's the part we need to relax: allow users to end their own sessions.

The check is implemented in a way that allows the kill if the sender is in
the target session.

I found 'sudo systemctl --user -M "zbyszek@" is-system-running' to
be a convenient reproducer.

Before:
May 16 16:25:26 x1c systemd[1]: run-u24754.service: Deactivated successfully.
May 16 16:25:26 x1c dbus-broker[1489]: A security policy denied :1.24757 to send method call /org/freedesktop/login1:org.freedesktop.login1.Manager.ReleaseSession to org.freedesktop.login1.
May 16 16:25:26 x1c (sd-pam)[3036470]: pam_systemd(login:session): Failed to release session: Access denied
May 16 16:25:26 x1c systemd[1]: Stopping session-114.scope...
May 16 16:25:26 x1c systemd[1]: session-114.scope: Deactivated successfully.
May 16 16:25:26 x1c systemd[1]: Stopped session-114.scope.
May 16 16:25:26 x1c systemd[1]: session-c151.scope: Deactivated successfully.
May 16 16:25:26 x1c systemd-logind[1513]: Session c151 logged out. Waiting for processes to exit.
May 16 16:25:26 x1c systemd-logind[1513]: Removed session c151.
After:
May 16 17:02:15 x1c systemd[1]: run-u24770.service: Deactivated successfully.
May 16 17:02:15 x1c systemd[1]: Stopping session-115.scope...
May 16 17:02:15 x1c systemd[1]: session-c153.scope: Deactivated successfully.
May 16 17:02:15 x1c systemd[1]: session-115.scope: Deactivated successfully.
May 16 17:02:15 x1c systemd[1]: Stopped session-115.scope.
May 16 17:02:15 x1c systemd-logind[1513]: Session c153 logged out. Waiting for processes to exit.
May 16 17:02:15 x1c systemd-logind[1513]: Removed session c153.

Edit: this seems to also fix https://github.com/systemd/systemd/issues/8598.
It seems that with the call to ReleaseSession, we wait for the pam session
close hooks to finish. I inserted a 'sleep(10)' after the call to ReleaseSession
in pam_systemd, and things block on that, nothing is killed prematurely.

18 months agologind: group policy entries by interface
Zbigniew Jędrzejewski-Szmek [Thu, 16 May 2024 15:57:28 +0000 (17:57 +0200)] 
logind: group policy entries by interface

18 months agotest: sync journal before read 32942/head
Yu Watanabe [Mon, 20 May 2024 16:54:35 +0000 (01:54 +0900)] 
test: sync journal before read

Similar to recent commits, e.g. f961f0e47c2caf9af735a22e7f23210e746d0c8b.

Fixes #32926.

18 months agotest: call journalctl --sync just before reading journals
Yu Watanabe [Mon, 20 May 2024 16:53:02 +0000 (01:53 +0900)] 
test: call journalctl --sync just before reading journals

Otherwise, journal entries comes during sleep may not be read.

Follow-up for c22a112883a46e302dae587b809c459647363ceb.

18 months agoanalyze: do not print timestamps before "start of userspace"
Zbigniew Jędrzejewski-Szmek [Mon, 20 May 2024 13:10:32 +0000 (15:10 +0200)] 
analyze: do not print timestamps before "start of userspace"

We have the following timestamp status:

  $ systemctl show systemd-fsck-root.service | grep InactiveExitTimestamp
  InactiveExitTimestamp=Thu 2023-11-02 12:27:24 CET
  InactiveExitTimestampMonotonic=15143158

  $ systemctl show | grep UserspaceTimestamp
  UserspaceTimestamp=Thu 2023-11-02 12:27:25 CET
  UserspaceTimestampMonotonic=15804273

i.e. UserspaceTimestamp is before InactiveExit of systemd-fsck-root.service.
This is fine, but on display, we'd subtract those values and print a huge
negative value bogusly:

  $ build/systemd-analyze critical-chain systemd-remount-fs.service
  The time when unit became active or started is printed after the "@" character.
  The time the unit took to start is printed after the "+" character.

  systemd-remount-fs.service +137ms
  └─systemd-fsck-root.service @584542y 2w 2d 20h 1min 48.890s +45ms
    └─systemd-journald.socket
      └─system.slice
        └─-.slice

In fact, list_dependencies_print() already had a branch where the check that
'times->activating > boot->userspace_time', but it didn't cover all cases. So
make it cover both branches, and also change to '>=', since it's fine if
something happened with the same timestamp.

With the patch:

  $ build/systemd-analyze critical-chain systemd-remount-fs.service
  The time when unit became active or started is printed after the "@" character.
  The time the unit took to start is printed after the "+" character.

  systemd-remount-fs.service +42ms
  └─systemd-fsck-root.service
    └─systemd-journald.socket
      └─system.slice
        └─-.slice

Fixes https://github.com/systemd/systemd/issues/17191.

18 months agoMerge pull request #32934 from bluca/logind_regression_main
Luca Boccassi [Mon, 20 May 2024 15:50:26 +0000 (17:50 +0200)] 
Merge pull request #32934 from bluca/logind_regression_main

logind: do not fail creating a session when request is not from a unit

18 months agotest: wait for partition device rather than the whole disk
Yu Watanabe [Mon, 20 May 2024 09:47:39 +0000 (18:47 +0900)] 
test: wait for partition device rather than the whole disk

Fixes #32931.

18 months agoMerge pull request #32927 from yuwata/test-network-netdevsim
Luca Boccassi [Mon, 20 May 2024 13:03:53 +0000 (15:03 +0200)] 
Merge pull request #32927 from yuwata/test-network-netdevsim

test-network: workaround for netdevsim bug

18 months agologind: do not fail creating a session when request is not from a unit 32934/head
Luca Boccassi [Mon, 20 May 2024 12:12:03 +0000 (13:12 +0100)] 
logind: do not fail creating a session when request is not from a unit

When running inside an LXC container the 'su' process will not be part of
any unit or slice.

manager_get_user_by_pid() which was used until v255 (included) does not fail
if it cannot find a unit/slice, but simply returns 'not found'. Do the same
in manager_get_session_by_pidref().

This was not detected as Semaphore CI does not reboot the testbed before
the logind test, so the session is started by the old logind from the base
distro, instead of the one being tested.

Follow-up for 8494f562c8963d8a936b0598e23eab277ff29374
Follow-up for 5099a50d4398e190387d204f5df81cc176bd33e2

Fixes https://github.com/systemd/systemd/issues/32929

18 months agologind: add one more debug log
Luca Boccassi [Mon, 20 May 2024 12:08:56 +0000 (13:08 +0100)] 
logind: add one more debug log

Helped track down issue with session tracking

18 months agosemaphore: use variable for Salsa repo URL
Luca Boccassi [Mon, 20 May 2024 12:08:26 +0000 (13:08 +0100)] 
semaphore: use variable for Salsa repo URL

Makes it easier to switch for debuggin

18 months agoman: fix grammar for Name= option in systemd.link
drewbug [Mon, 20 May 2024 10:11:22 +0000 (06:11 -0400)] 
man: fix grammar for Name= option in systemd.link

18 months agotest: install more kernel modules for Fedora image 32927/head
Yu Watanabe [Sun, 19 May 2024 20:38:24 +0000 (05:38 +0900)] 
test: install more kernel modules for Fedora image

Otherwise, several tests for networkd are skipped.

Follow-up for #32666.

18 months agotest-network: also set custom altternative name for netdevsim interface
Yu Watanabe [Mon, 20 May 2024 00:53:26 +0000 (09:53 +0900)] 
test-network: also set custom altternative name for netdevsim interface

Due to the bug in kernel 6.9 caused by
https://github.com/torvalds/linux/commit/8debcf5832c3e8a6baaea27c75ad8a6ba5077beb,
the net_id udev builtin does not work for netdevsim interface.
So, eni99np1 cannot be used with kernel 6.9 anymore.

Workaround for #32910.

18 months agotest-network: split out setup_netdevsim()
Yu Watanabe [Sun, 19 May 2024 19:29:55 +0000 (04:29 +0900)] 
test-network: split out setup_netdevsim()

18 months agoMerge pull request #32915 from yuwata/machine-id-setup
Luca Boccassi [Sun, 19 May 2024 22:16:16 +0000 (00:16 +0200)] 
Merge pull request #32915 from yuwata/machine-id-setup

machine-id-setup: acquire machine ID from /run/machine-id if possible

18 months agotest: sync journal before starting test
Yu Watanabe [Sun, 19 May 2024 17:34:17 +0000 (02:34 +0900)] 
test: sync journal before starting test

Follow-up for c22a112883a46e302dae587b809c459647363ceb.

Hopefully fixes #32712.

18 months agoMerge pull request #32907 from yuwata/image-fix
Luca Boccassi [Sun, 19 May 2024 19:10:40 +0000 (21:10 +0200)] 
Merge pull request #32907 from yuwata/image-fix

several fixes for os image handling

18 months agomachine-id-setup: acquire machine ID from /run/machine-id if possible 32915/head
Yu Watanabe [Sun, 19 May 2024 00:14:27 +0000 (09:14 +0900)] 
machine-id-setup: acquire machine ID from /run/machine-id if possible

If machine ID is previously stored at /run/machine-id, then let's reuse
it. This is important on switching root and /etc/machine-id was previously
a mount point.

Fixes #32908.

18 months agomachine-id-setup: use empty_or_root()
Yu Watanabe [Sat, 18 May 2024 23:46:43 +0000 (08:46 +0900)] 
machine-id-setup: use empty_or_root()

18 months agomachine: fix use-after-free in Rename() DBus method 32907/head
Yu Watanabe [Fri, 17 May 2024 21:14:50 +0000 (06:14 +0900)] 
machine: fix use-after-free in Rename() DBus method

Fixes a bug introduced by 1ddb263d21099ae42195c2bc382bdf72a7f24f82.

Note, this requires the previous two commits, and cannot backport without them.

Note, before the previous commit, the use-after-free could be triggered
only by Rename() DBus method, and could not by RenameImage(), as we did not
cache Image object when RenameImage() method is called. And machinectl
always uses RenameImage(). Hence, the issue could be triggered only when
Rename() DBus method is explicitly called by e.g. busctl.

With the previous commit, the Image object passed to the function is
always cached. Hence, the issue could be triggered even with machinectl
command, and this fix is important.

18 months agomachine: also acquire Image object from cache when a dbus method in the main interfac...
Yu Watanabe [Fri, 17 May 2024 20:33:48 +0000 (05:33 +0900)] 
machine: also acquire Image object from cache when a dbus method in the main interface is called

Previously, Image objects were only cached when reading properties or
methods in the org.freedesktop.machine1.Image interface are called.

This makes that, when a method in the main interface (org.freedesktop.machine1)
for an image is called, also acquire the Image object from the cache,
and if not cached, create Image object and put into the cache, like we
do for org.freedesktop.machine1.Image.

Otherwise, if some properties of an image are updated by methods in the main
interface, e.g. MarkImageReadOnly(), the changes do not applied to the cached
Image object, and subsequent read of proerties through the interface for the
image, e.g. ReadOnly property, may provide outdated values.

Follow-up for 1ddb263d21099ae42195c2bc382bdf72a7f24f82.

Fixes #32888.

18 months agomachine: split out manager_acquire_image() from image_object_find()
Yu Watanabe [Fri, 17 May 2024 20:31:16 +0000 (05:31 +0900)] 
machine: split out manager_acquire_image() from image_object_find()

Preparation for the next commit. No functional change.

18 months agodiscover-image: also update Image.limit in image_set_limit()
Yu Watanabe [Fri, 17 May 2024 20:46:24 +0000 (05:46 +0900)] 
discover-image: also update Image.limit in image_set_limit()

Same as the previous commit, but for SetLimit DBus method vs Limit
property and friends.

18 months agodiscover-image: update Image.read_only flag in image_read_only()
Yu Watanabe [Fri, 17 May 2024 20:10:42 +0000 (05:10 +0900)] 
discover-image: update Image.read_only flag in image_read_only()

Otherwise, ReadOnly DBus property in org.freedesktop.machine1.Image or
org.freedesktop.portable1.Image will not be updated by MarkReadOnly DBus
method.

18 months agoMerge pull request #32917 from YHNdnzj/ptyfwd-cleanup
Luca Boccassi [Sun, 19 May 2024 12:44:54 +0000 (14:44 +0200)] 
Merge pull request #32917 from YHNdnzj/ptyfwd-cleanup

ptyfwd: a few fixes/cleanups

18 months agotest: sync journal before read
Yu Watanabe [Sat, 18 May 2024 22:12:48 +0000 (07:12 +0900)] 
test: sync journal before read

Workaround for #32834 and #32890.

18 months agorun: pass the pty slave fd to transient service 32917/head
Mike Yuan [Sun, 19 May 2024 01:07:21 +0000 (09:07 +0800)] 
run: pass the pty slave fd to transient service

The rationale is similar to 40e1f4ea7458a0a80eaf1ef356e52bfe0835412e.

Currently, we only pass TTYPath=/dev/pts/... to
the transient service spawned by systemd-run.
This is a bit problematic though, when ExecStartPre=
or ExecStopPost= is used. Since when these control
processes get to run, the main process is not yet
started/has already exited, hence the slave suffers
from the same vhangup problem as the mentioned commit.

By passing the slave fd in, the service manager will
hold the fd open as long as the service is alive.

Fixes #32916

18 months agorun: do not log "Error on PTY forwarding logic" when disconnected due to user operation
Mike Yuan [Sun, 19 May 2024 00:53:07 +0000 (08:53 +0800)] 
run: do not log "Error on PTY forwarding logic" when disconnected due to user operation

18 months agovmspawn: use openpt_allocate where appropriate
Mike Yuan [Sat, 18 May 2024 23:59:24 +0000 (07:59 +0800)] 
vmspawn: use openpt_allocate where appropriate

18 months agoptyfwd: trivial coding style and log cleanups
Mike Yuan [Sun, 19 May 2024 01:16:56 +0000 (09:16 +0800)] 
ptyfwd: trivial coding style and log cleanups

18 months agoMerge pull request #32914 from yuwata/test-64-storage
Luca Boccassi [Sun, 19 May 2024 00:50:36 +0000 (02:50 +0200)] 
Merge pull request #32914 from yuwata/test-64-storage

test: several follow-ups for TEST-64-STORAGE

18 months agotest: wipe filesystem before moving to the next test case 32914/head
Yu Watanabe [Sat, 18 May 2024 20:10:28 +0000 (05:10 +0900)] 
test: wipe filesystem before moving to the next test case

18 months agotest: install modinfo to test image
Yu Watanabe [Sat, 18 May 2024 19:54:25 +0000 (04:54 +0900)] 
test: install modinfo to test image

Follow-up for 6c2d47d6d3ad25ffd7527c7f4de31457ee1b25d8.

Fixes the following unexpected skip:
```
[    6.163670] TEST-64-UDEV-STORAGE.sh[596]: + modinfo btrfs
[    6.164102] TEST-64-UDEV-STORAGE.sh[726]: /usr/lib/systemd/tests/testdata/units/TEST-64-UDEV-STORAGE.sh: line 726: modinfo: command not found
[    6.164683] TEST-64-UDEV-STORAGE.sh[727]: + echo 'This test requires the btrfs kernel module but it is not installed, skipping the test'
[    6.165069] TEST-64-UDEV-STORAGE.sh[728]: + tee --append /skipped
[    6.166801] TEST-64-UDEV-STORAGE.sh[728]: This test requires the btrfs kernel module but it is not installed, skipping the test
[    6.167177] TEST-64-UDEV-STORAGE.sh[596]: + exit 77
```

18 months agoMerge pull request #32902 from yuwata/emergency-action-fixes
Yu Watanabe [Sat, 18 May 2024 07:32:36 +0000 (16:32 +0900)] 
Merge pull request #32902 from yuwata/emergency-action-fixes

several fixes for emergency actions and document update

18 months agoMerge pull request #32909 from arthurzam/bash-v256
Yu Watanabe [Sat, 18 May 2024 07:30:03 +0000 (16:30 +0900)] 
Merge pull request #32909 from arthurzam/bash-v256

shell-completion: add more missing args for bash

18 months agoshell-completion: add systemd-vmspawn to meson.build 32909/head
Arthur Zamarin [Sat, 18 May 2024 06:38:53 +0000 (09:38 +0300)] 
shell-completion: add systemd-vmspawn to meson.build

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
18 months agoshell-completion: add missing args to bash systemd-nspawn
Arthur Zamarin [Sat, 18 May 2024 06:34:38 +0000 (09:34 +0300)] 
shell-completion: add missing args to bash systemd-nspawn

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
18 months agoshell-completion: add missing args to bash systemd-run
Arthur Zamarin [Sat, 18 May 2024 06:34:38 +0000 (09:34 +0300)] 
shell-completion: add missing args to bash systemd-run

Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
18 months agoinstall-file: make fs_make_very_read_only() static
Yu Watanabe [Fri, 17 May 2024 18:31:37 +0000 (03:31 +0900)] 
install-file: make fs_make_very_read_only() static

18 months agoman: refer FailureAction= and SuccessAction= for explaining allowed values in JobTime... 32902/head
Yu Watanabe [Fri, 17 May 2024 17:11:34 +0000 (02:11 +0900)] 
man: refer FailureAction= and SuccessAction= for explaining allowed values in JobTimeoutAction=

The allowed values are explained in FailureAction= and SuccessAction=,
rather than StartLimitAction=.

18 months agocore: refuse invalid emergency actions for SuccessAction= and friends in user service...
Yu Watanabe [Fri, 17 May 2024 17:07:34 +0000 (02:07 +0900)] 
core: refuse invalid emergency actions for SuccessAction= and friends in user service manager

Especially, soft-reboot is not supported by user service manager.

Fixes a bug in 13ffc60749df0ca7c76cfcac317b41a05679b364 and
3cf848f6cd2151ccff89073bffb102f966d64ced.

18 months agoman: mention soft-reboot in bootup(7)
Yu Watanabe [Fri, 17 May 2024 17:33:13 +0000 (02:33 +0900)] 
man: mention soft-reboot in bootup(7)

18 months agounits: add JobTimeoutAction= to exit.target and friends
Yu Watanabe [Fri, 17 May 2024 16:26:14 +0000 (01:26 +0900)] 
units: add JobTimeoutAction= to exit.target and friends

For consistency with other targets, e.g. poweroff.target or
reboot.target.

18 months agoman/soft-reboot: order surviving services before shutdown.target
Mike Yuan [Fri, 17 May 2024 13:07:17 +0000 (21:07 +0800)] 
man/soft-reboot: order surviving services before shutdown.target

Prompted by #32895

Rather than ordering with each power operation targets,
ordering against shutdown.target which is a valid
synchronization point. This has no effect if soft-reboot
is being performed.

18 months agoman: add note about selinux to rc-local
Zbigniew Jędrzejewski-Szmek [Fri, 17 May 2024 12:31:16 +0000 (14:31 +0200)] 
man: add note about selinux to rc-local

This feature is deprecated, but if users use it, they are likely to be
tripped up by the wrong selinux context, so add a note.

https://discussion.fedoraproject.org/t/systemd-rc-local-service-doesnt-work-on-fedora-40-until-selinux-contexts-are-set-on-rc-local-script

18 months agocore/execute: do not use format str for log_object_internal
Mike Yuan [Fri, 17 May 2024 09:35:43 +0000 (17:35 +0800)] 
core/execute: do not use format str for log_object_internal

This reverts part of 210ca71cb5d9f41df3b23eef28d6742bd90a0362.

Another fallout from that commit...

Fixes #32877

18 months agomountpoint-util: Deal with kernel API breakage in "norecovery" mount option
Daan De Meyer [Fri, 17 May 2024 08:46:12 +0000 (10:46 +0200)] 
mountpoint-util: Deal with kernel API breakage in "norecovery" mount option

"norecovery" was deprecated for btrfs in
https://github.com/torvalds/linux/commit/74ef00185eb864252156022ff129b01549504175
and removed in
https://github.com/torvalds/linux/commit/a1912f712188291f9d7d434fba155461f1ebef66.

Let's drop our assumption that btrfs supports "norecovery" and first query for the
new name of the option followed by querying for the old name.

18 months agotest: wait for underlying .device unit being active before invoking systemd-mount
Yu Watanabe [Fri, 17 May 2024 06:04:31 +0000 (15:04 +0900)] 
test: wait for underlying .device unit being active before invoking systemd-mount

Fixes following failure:
===
May 17 04:12:04 TEST-74-AUX-UTILS.sh[2684]: + systemd-mount --owner=testuser /dev/loop0 /tmp/tmp.DVQdo2ou53/mnt
(snip)
May 17 04:15:04 systemd[1]: dev-loop0.device: Job dev-loop0.device/start timed out.
May 17 04:15:04 systemd[1]: dev-loop0.device: Job 5812 dev-loop0.device/start finished, result=timeout
May 17 04:15:04 systemd[1]: Timed out waiting for device dev-loop0.device - /dev/loop0.
May 17 04:15:04 systemd[1]: tmp-tmp.DVQdo2ou53-mnt.mount: Job 5804 tmp-tmp.DVQdo2ou53-mnt.mount/start finished, result=dependency
May 17 04:15:04 systemd[1]: Dependency failed for tmp-tmp.DVQdo2ou53-mnt.mount - /tmp/tmp.DVQdo2ou53/mnt.
May 17 04:15:04 systemd[1]: tmp-tmp.DVQdo2ou53-mnt.mount: Job tmp-tmp.DVQdo2ou53-mnt.mount/start failed with result 'dependency'.
May 17 04:15:04 systemd[1]: systemd-fsck@dev-loop0.service: Job 5805 systemd-fsck@dev-loop0.service/start finished, result=dependency
May 17 04:15:04 systemd[1]: Dependency failed for systemd-fsck@dev-loop0.service - File System Check on /dev/loop0.
May 17 04:15:04 systemd[1]: systemd-fsck@dev-loop0.service: Job systemd-fsck@dev-loop0.service/start failed with result 'dependency'.
May 17 04:15:04 systemd[1]: dev-loop0.device: Job dev-loop0.device/start failed with result 'timeout'.
(snip)
May 17 04:15:04 systemd-mount[2856]: A dependency job for tmp-tmp.DVQdo2ou53-mnt.mount failed. See 'journalctl -xe' for details.

18 months agotest: dynamically generate list of test cases
Yu Watanabe [Fri, 17 May 2024 01:04:37 +0000 (10:04 +0900)] 
test: dynamically generate list of test cases

Follow-up for #32666.

18 months agotest: wait for sessions being closed
Yu Watanabe [Fri, 17 May 2024 05:00:12 +0000 (14:00 +0900)] 
test: wait for sessions being closed

If a session in closing state, the user state will be in online.

Fixes #32698.

18 months agoMerge pull request #32875 from yuwata/network-route-wireguard
Daan De Meyer [Fri, 17 May 2024 07:10:33 +0000 (09:10 +0200)] 
Merge pull request #32875 from yuwata/network-route-wireguard

network/route: fix unexpected removal of routes for wireguard

18 months agotest: wait for partition device being processed by udevd
Yu Watanabe [Fri, 17 May 2024 05:21:44 +0000 (14:21 +0900)] 
test: wait for partition device being processed by udevd

Fixes #32697.

18 months agotest: wait for slice unit being (de)activated
Yu Watanabe [Fri, 17 May 2024 04:25:25 +0000 (13:25 +0900)] 
test: wait for slice unit being (de)activated

Fixes #32731.

18 months agoMerge pull request #32885 from yuwata/test-do-not-fill-journal
Daan De Meyer [Fri, 17 May 2024 06:54:24 +0000 (08:54 +0200)] 
Merge pull request #32885 from yuwata/test-do-not-fill-journal

test: do not fill journal with garbage

18 months agoMerge pull request #32880 from yuwata/unit-soft-reboot
Mike Yuan [Fri, 17 May 2024 06:06:44 +0000 (14:06 +0800)] 
Merge pull request #32880 from yuwata/unit-soft-reboot

units: do not soft-reboot before soft-reboot.target reached

18 months agotest: sync journal before reading journal
Yu Watanabe [Fri, 17 May 2024 04:03:44 +0000 (13:03 +0900)] 
test: sync journal before reading journal

Otherwise, expected lines may not be processed or not sync()ed to disk.

Fixes #32712.

18 months agotest: wait for partition processed by udevd
Yu Watanabe [Fri, 17 May 2024 01:12:25 +0000 (10:12 +0900)] 
test: wait for partition processed by udevd

Fixes #32695.

18 months agohwdb: Enable JP-IK LEAP W502's touchpad toggle key
Jian-Hong Pan [Fri, 17 May 2024 03:32:30 +0000 (11:32 +0800)] 
hwdb: Enable JP-IK LEAP W502's touchpad toggle key

The laptop JP-IK LEAP W502 has touchpad toggle key (Fn+F9), but it does
not work. Because, the scancode maps to a wrong key code:

Event: time 1715846095.224900, type 4 (EV_MSC), code 4 (MSC_SCAN), value 9d
Event: time 1715846095.224900, type 1 (EV_KEY), code 97 (KEY_RIGHTCTRL), value 1
Event: time 1715846095.224900, -------------- SYN_REPORT ------------
Event: time 1715846095.230985, type 4 (EV_MSC), code 4 (MSC_SCAN), value db
Event: time 1715846095.230985, type 1 (EV_KEY), code 125 (KEY_LEFTMETA), value 1
Event: time 1715846095.230985, -------------- SYN_REPORT ------------
Event: time 1715846095.232903, type 4 (EV_MSC), code 4 (MSC_SCAN), value 76
Event: time 1715846095.232903, type 1 (EV_KEY), code 85 (KEY_ZENKAKUHANKAKU), value 1
Event: time 1715846095.232903, -------------- SYN_REPORT ------------

Map the scancode 76 to KEY_F21 to enable the touchpad toggle key.

18 months agotest: do not fill journal with diff 32885/head
Yu Watanabe [Fri, 17 May 2024 05:15:51 +0000 (14:15 +0900)] 
test: do not fill journal with diff

18 months agotest: do not fill journal with "wait"
Yu Watanabe [Fri, 17 May 2024 05:14:00 +0000 (14:14 +0900)] 
test: do not fill journal with "wait"

18 months agounits: do not soft-reboot before soft-reboot.target reached 32880/head
Yu Watanabe [Fri, 17 May 2024 02:38:16 +0000 (11:38 +0900)] 
units: do not soft-reboot before soft-reboot.target reached

Otherwise, at the time systemd-soft-reboot.service succeeds,
services which has Conflicts= and Before=soft-reboot.target may
not be stopped yet, and may be SIGKILLed.

Especially, systemd-journald.service has the dependencies, thus
journal may be corrupted. See #32223.

Follow-up for 13ffc60749df0ca7c76cfcac317b41a05679b364.

Fixes #32834.

18 months agounits: drop dependencies of soft-reboot.target from systemd-journald@.service
Yu Watanabe [Fri, 17 May 2024 02:50:44 +0000 (11:50 +0900)] 
units: drop dependencies of soft-reboot.target from systemd-journald@.service

The service deos not have DefaultDependencies=no. Hence it has dependencies
of shutdown.target, and dependencies of soft-reboot.target are not
necessary.

Follow-up for f89985ca494b79b2beed47e1f10d46ef2d59ce3e.

18 months agotest-network: use different destination from gateway 32875/head
Yu Watanabe [Fri, 17 May 2024 00:28:46 +0000 (09:28 +0900)] 
test-network: use different destination from gateway

Previously, one of the test route has the same address in destination
and gateway. Even it is a test case, that's super spurious. Let's use a
different address.

18 months agonetwork/route: fix unexpected removal of routes for wireguard
Yu Watanabe [Thu, 16 May 2024 21:40:40 +0000 (06:40 +0900)] 
network/route: fix unexpected removal of routes for wireguard

Fixes a bug introduced by 8d01e44c1f0e00b414d36bd1b46ecff548242208.

If a .netdev file for a wireguard interface requests to configure
routes for the interface, the routes were removed during configuring
another interface.

Fixes #32859.

18 months agorepart: remove duplicate word in --help
Zbigniew Jędrzejewski-Szmek [Sat, 11 May 2024 11:10:14 +0000 (13:10 +0200)] 
repart: remove duplicate word in --help

My bad; follow-up for 4955d2e36706bba9ba6595b0c5babb8f17f13465.

18 months agotest: Enable TEST-69-SHUTDOWN for mkosi
Daan De Meyer [Thu, 16 May 2024 10:28:51 +0000 (12:28 +0200)] 
test: Enable TEST-69-SHUTDOWN for mkosi

In mkosi, we run the test inside the VM instead of outside. To simplify
the implementation we drop the reboot part and only verify that we can
schedule and cancel shutdowns and that the wall messages are sent as
expected.

18 months agoRevert "CI: add manual workflow to publish pages to fix submodule issue"
Luca Boccassi [Thu, 16 May 2024 14:31:52 +0000 (15:31 +0100)] 
Revert "CI: add manual workflow to publish pages to fix submodule issue"

Nope, it's broken, never mind

This reverts commit b0f9c3c6483eadd630b0a6a4de23db761e8158c8.

18 months agoCI: add manual workflow to publish pages to fix submodule issue
Luca Boccassi [Thu, 16 May 2024 14:19:32 +0000 (15:19 +0100)] 
CI: add manual workflow to publish pages to fix submodule issue

Cloning the fedora/centos submodules fails because --depth 1 is used. Fork the actions workflow and use fetch-depth: 0 to disable it.

18 months agoMerge pull request #32863 from YHNdnzj/switch-root-followup
Luca Boccassi [Thu, 16 May 2024 13:53:18 +0000 (15:53 +0200)] 
Merge pull request #32863 from YHNdnzj/switch-root-followup

Two minor followups

18 months agoMerge pull request #32842 from DaanDeMeyer/cryptsetup
Daan De Meyer [Thu, 16 May 2024 13:50:55 +0000 (15:50 +0200)] 
Merge pull request #32842 from DaanDeMeyer/cryptsetup

test: Enable TEST-24-CRYPTSETUP for mkosi

18 months agotest: Enable TEST-24-CRYPTSETUP for mkosi 32842/head
Daan De Meyer [Wed, 15 May 2024 11:19:19 +0000 (13:19 +0200)] 
test: Enable TEST-24-CRYPTSETUP for mkosi

Encrypted /var is skipped because meson's limitations make per test
images not really feasible and we can't encrypt /var by default because
it slows down the image build too much.

Co-authored-by: Richard Maw <richard.maw@codethink.co.uk>
18 months agonetwork: configure a tun host0 interface in a container
Helmut Grohne [Wed, 15 May 2024 05:21:53 +0000 (07:21 +0200)] 
network: configure a tun host0 interface in a container

While containers often have their host0 network provided by veth when
the container runtime is privileged, unprivileged containers tend to
have their network provided via slirp4netns or pasta. These tools use a
tun interface rather than a veth interface and systemd should still set
configure such networks.

We should have different .network files for the veth and tun use cases
as there may arise a need to configure them differently.  We should not
rename 80-container-host0.network as that would cause existing drop-ins
to no longer apply.

Closes: #32095
Fixes: f139393dd20a ("network: use Kind= instead of Driver=")
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
18 months agotest: add coverate for Compress=yes config option
Luca Boccassi [Thu, 16 May 2024 10:03:42 +0000 (11:03 +0100)] 
test: add coverate for Compress=yes config option

Avoid regressions like https://github.com/systemd/systemd/issues/32856

Follow-up for 2ef7cdc4255883d1c50860661248c9db69a86aa1

18 months agomkosi: Update centos to latest
Daan De Meyer [Thu, 16 May 2024 10:14:17 +0000 (12:14 +0200)] 
mkosi: Update centos to latest

18 months agojournal-importer: Consider ECONNRESET as EOF
Daan De Meyer [Wed, 15 May 2024 19:40:12 +0000 (21:40 +0200)] 
journal-importer: Consider ECONNRESET as EOF

Otherwise we log a noisy error when we get ECONNRESET.

18 months agoswitch-root: update comment regarding dropped mounts 32863/head
Mike Yuan [Thu, 16 May 2024 11:15:11 +0000 (19:15 +0800)] 
switch-root: update comment regarding dropped mounts

Follow-up for 07c5c2ab8b80f75a1c89fc405db1ce1dfd08534b

18 months agofd-util: check and log error properly for fd_reopen_propagate_append_and_position
Mike Yuan [Thu, 16 May 2024 11:12:38 +0000 (19:12 +0800)] 
fd-util: check and log error properly for fd_reopen_propagate_append_and_position

Follow-up for b8e25bff386548f679902c6b797a5a8ff1542c8b

18 months agope-binary: .initrd section is optional for UKI
Yu Watanabe [Wed, 15 May 2024 21:08:27 +0000 (06:08 +0900)] 
pe-binary: .initrd section is optional for UKI

.osrel is also optional, but sd-boot and bootctl requires it.
So, let's keep .osrel section at least now.

Fixes #32774.

18 months agoMerge pull request #32800 from YHNdnzj/preserve-cred-mounts
Zbigniew Jędrzejewski-Szmek [Thu, 16 May 2024 10:45:40 +0000 (12:45 +0200)] 
Merge pull request #32800 from YHNdnzj/preserve-cred-mounts

switch-root: preserve the whole cred mount tree (/run/credentials/)

18 months agoTEST-24-CRYPTSETUP: Store tokens in /usr
Daan De Meyer [Wed, 15 May 2024 12:00:51 +0000 (14:00 +0200)] 
TEST-24-CRYPTSETUP: Store tokens in /usr

We want to be able to boot with empty /var.

18 months agorepart: Improve error message
Daan De Meyer [Wed, 15 May 2024 14:21:45 +0000 (16:21 +0200)] 
repart: Improve error message

18 months agoMerge pull request #32857 from dtardon/drop-assert
Luca Boccassi [Thu, 16 May 2024 10:04:51 +0000 (12:04 +0200)] 
Merge pull request #32857 from dtardon/drop-assert

Drop invalid asserts

18 months agocore: Skip private /tmp for generators in manager test runs
Daan De Meyer [Wed, 15 May 2024 18:54:33 +0000 (20:54 +0200)] 
core: Skip private /tmp for generators in manager test runs

For manager test runs, the generator output paths are located in
/tmp, which means that if we mount a private /tmp for generators,
we lose all the generated units (actually the generators will just
fail because the directories don't exist, but if they did exist,
we'd still lose all the units).

Let's avoid the problem by skipping the private /tmp for manager
test runs. This also avoids any possible privilege issues with
mounting a private /tmp that might happen in this scenario.

18 months agojournald-server: drop another invalid assert() 32857/head
David Tardon [Thu, 16 May 2024 07:03:40 +0000 (09:03 +0200)] 
journald-server: drop another invalid assert()

config_parse_forward_to_socket() is not used for parsing unit files
either.

Follow-up-for: f31cff849d3db074d0d8157e4117d9b8372c03e8

18 months agojournald-server: drop invalid assert()
David Tardon [Thu, 16 May 2024 06:59:50 +0000 (08:59 +0200)] 
journald-server: drop invalid assert()

config_parse_compress() is not used for parsing unit files, hence unit
is always NULL.

Fixes #32856

Follow-up-for: 6813be2eba24a2f864d5d47326437dbff38cd675

18 months agoMerge pull request #32784 from YHNdnzj/release-version
Luca Boccassi [Wed, 15 May 2024 18:25:59 +0000 (20:25 +0200)] 
Merge pull request #32784 from YHNdnzj/release-version

docs/RELEASE: use meson.version for tags

18 months agohwdb.d/60-keyboard.hwdb: enable Clevo quirk for model V5x0TU
Michał Kopeć [Wed, 15 May 2024 15:33:39 +0000 (17:33 +0200)] 
hwdb.d/60-keyboard.hwdb: enable Clevo quirk for model V5x0TU

Enable the display switch function key quirk for a new model.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
18 months agosystemctl: fix "applying zero offset to null pointer" UBSan error
Yu Watanabe [Wed, 15 May 2024 15:45:06 +0000 (00:45 +0900)] 
systemctl: fix "applying zero offset to null pointer" UBSan error

Fixes #32837.

18 months agoTEST-82-SOFTREBOOT: test that creds for surviving units are carried over 32800/head
Mike Yuan [Tue, 14 May 2024 11:34:11 +0000 (19:34 +0800)] 
TEST-82-SOFTREBOOT: test that creds for surviving units are carried over

18 months agoswitch-root: preserve the whole cred mount tree (/run/credentials/)
Mike Yuan [Tue, 14 May 2024 09:03:00 +0000 (17:03 +0800)] 
switch-root: preserve the whole cred mount tree (/run/credentials/)

Currently, during soft-reboot, some services may survive,
but their associated credential mounts are dropped.
Let's instead preserve them, as discussed.

18 months agotest/test-rpm-macros.sh: add build directory to pkg-config search path
Radoslav Kolev [Tue, 14 May 2024 09:19:22 +0000 (12:19 +0300)] 
test/test-rpm-macros.sh: add build directory to pkg-config search path

If tests are run during build time, without an already installed
systemd they fail to resolve the sysusersdir and tpmfilesdir pkg-config variables.

18 months agoMerge pull request #32844 from YHNdnzj/mount-defaultdep-followup
Luca Boccassi [Wed, 15 May 2024 16:23:26 +0000 (18:23 +0200)] 
Merge pull request #32844 from YHNdnzj/mount-defaultdep-followup

core/mount: correctly set DefaultDependencies=no for mounts from mountinfo

18 months agoMerge pull request #32818 from keszybz/libsystemd-network-size-check
Luca Boccassi [Wed, 15 May 2024 15:33:22 +0000 (17:33 +0200)] 
Merge pull request #32818 from keszybz/libsystemd-network-size-check

Check packet size in libsystemd-network