]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
18 months agoRevert "mkosi: Sanitizer improvements" 33101/head
Daan De Meyer [Thu, 30 May 2024 12:50:21 +0000 (14:50 +0200)] 
Revert "mkosi: Sanitizer improvements"

This reverts commit aef13ad0294b403993e19b424b26535fb65749f4.

18 months agoRevert "ci: Build with sanitizers in mkosi"
Daan De Meyer [Thu, 30 May 2024 12:50:10 +0000 (14:50 +0200)] 
Revert "ci: Build with sanitizers in mkosi"

This reverts commit 639403f9a86869984b155edda2521741950f5417.

18 months agoMerge pull request #32866 from DaanDeMeyer/sanitizers
Daan De Meyer [Thu, 30 May 2024 12:49:13 +0000 (14:49 +0200)] 
Merge pull request #32866 from DaanDeMeyer/sanitizers

mkosi: Sanitizers

18 months agomkosi: Preserve environment when running integration tests with sudo
Daan De Meyer [Thu, 30 May 2024 10:41:34 +0000 (12:41 +0200)] 
mkosi: Preserve environment when running integration tests with sudo

Otherwise we won't detect we're running in Github Actions and will
show the wrong command to fetch the journal.

18 months agoMerge pull request #33090 from poettering/tpm12-efi-check
Daan De Meyer [Thu, 30 May 2024 11:32:41 +0000 (13:32 +0200)] 
Merge pull request #33090 from poettering/tpm12-efi-check

efi-api: tighten check for TPM2 systems

18 months agohwdb: add a vmbus id for HyperV Video device
Lain "Fearyncess" Yang [Thu, 30 May 2024 05:51:40 +0000 (13:51 +0800)] 
hwdb: add a vmbus id for HyperV Video device

18 months agoMerge pull request #33084 from DaanDeMeyer/cgroup-log
Daan De Meyer [Thu, 30 May 2024 10:49:37 +0000 (12:49 +0200)] 
Merge pull request #33084 from DaanDeMeyer/cgroup-log

cgroup-util: Don't try to open pidfd for pids from cgroup.threads

18 months agoci: Build with sanitizers in mkosi 32866/head
Daan De Meyer [Thu, 16 May 2024 15:20:24 +0000 (17:20 +0200)] 
ci: Build with sanitizers in mkosi

18 months agomkosi: Sanitizer improvements
Daan De Meyer [Thu, 16 May 2024 15:18:38 +0000 (17:18 +0200)] 
mkosi: Sanitizer improvements

- Let's set the environment on the kernel command line so it applies
to initrd and main system.
- Let's add the necessary wrappers that are also added in test-functions.
Unlike test-functions we don't use gcc/clang to get the library path as
that requires installing gcc/clang in the initrd.
- Let's drop the hack to get journald writing to the console and have
it write to kmsg instead. We'll get the output either way.
- Stop removing libstdc++ and sanitizer libraries from Arch Linux
initrds and other images as it's required by the sanitizer libraries.
- Add a workaround for specifying extra meson options for opensuse
- Add a leak sanitizer suppression file as a workaround for a false
positive leak in verify_selinuxmnt() in libselinux. We do a soname match
because the stacktrace can't be properly symbolized on Debian.

18 months agotest-network: Add dirs_exist_ok=True to cp_r() 33091/head
Daan De Meyer [Tue, 28 May 2024 11:08:23 +0000 (13:08 +0200)] 
test-network: Add dirs_exist_ok=True to cp_r()

Let's not fail if directories already exist in cp_r().

18 months agotest-execute: Load systemd-asan-env environment file if available
Daan De Meyer [Mon, 27 May 2024 11:34:40 +0000 (13:34 +0200)] 
test-execute: Load systemd-asan-env environment file if available

When DynamicUser= is enabled, we need LD_PRELOAD to be configured
correctly as the tests will load systemd's nss module which will complain
when built with sanitizers if the sanitizer libraries were not loaded
first.

18 months agotest-execute: Skip system call filter tests when sanitizers are used
Daan De Meyer [Mon, 27 May 2024 11:33:51 +0000 (13:33 +0200)] 
test-execute: Skip system call filter tests when sanitizers are used

System call filtering is incompatible with sanitizers so let's skip
these tests when we're built with sanitizers.

18 months agotest-execute: Skip test_exec_mount_apivfs() when running with sanitizers
Daan De Meyer [Thu, 30 May 2024 08:22:51 +0000 (10:22 +0200)] 
test-execute: Skip test_exec_mount_apivfs() when running with sanitizers

The test fails when running under sanitizers due to missing sanitizer
libraries. For now, let's skip the test until we can make the necessary
changes to run it under sanitizers.

18 months agoTEST-02-UNITTESTS: Pass asan environment to units if it is available
Daan De Meyer [Mon, 27 May 2024 17:40:35 +0000 (19:40 +0200)] 
TEST-02-UNITTESTS: Pass asan environment to units if it is available

Some tests (e.g. test-udev.py) might trigger one of our NSS modules
which means LD_PRELOAD has to be configured properly.

18 months agoTEST-79-MEMPRESS: Load systemd-asan-env if available
Daan De Meyer [Mon, 27 May 2024 11:38:51 +0000 (13:38 +0200)] 
TEST-79-MEMPRESS: Load systemd-asan-env if available

Required since we run with DynamicUser=1.

18 months agoTEST-36-NUMAPOLICY: Skip when running with sanitizers
Daan De Meyer [Mon, 27 May 2024 08:23:38 +0000 (10:23 +0200)] 
TEST-36-NUMAPOLICY: Skip when running with sanitizers

The test does not work under sanitizers as strace is used. Until the
test is fixed to not use strace let's skip it when running with
sanitizers.

18 months agoblockdev-util: update comment for blockdev_partscan_enabled
Mike Yuan [Thu, 30 May 2024 07:26:44 +0000 (15:26 +0800)] 
blockdev-util: update comment for blockdev_partscan_enabled

Follow-up for aa6fe772e1886cdf759954bc2a4742e818ec84c5

Also, the 'partscan' sysattr has been backported to v6.6.

18 months agocgroup-util: Don't try to open pidfd for pids from cgroup.threads 33084/head
Daan De Meyer [Wed, 29 May 2024 20:03:38 +0000 (22:03 +0200)] 
cgroup-util: Don't try to open pidfd for pids from cgroup.threads

Opening pidfds for non thread group leaders only works from 6.9 onwards with PIDFD_THREAD. On
older kernels or without PIDFD_THREAD pidfd_open() fails with EINVAL. Since we might read non
thread group leader IDs from cgroup.threads, we introduce and set CGROUP_NO_PIDFD to avoid
trying open pidfd's for them and instead use the pid as is.

18 months agoman: mention that IPMasquerade= and IPv6SendRA= implies IPv4Forwarding=/IPv6Forwarding=
Yu Watanabe [Thu, 30 May 2024 03:44:07 +0000 (12:44 +0900)] 
man: mention that IPMasquerade= and IPv6SendRA= implies IPv4Forwarding=/IPv6Forwarding=

It has been mentioned in IPv4Forwarding= and IPv6Forwarding=,
but let's also explain in the settings who imply these settings.

Follow-up for 3976c430927e1bfefa0413f80ebac84ab9a64350 and
485f5148b3a3e5ebc7e14acef78494a98435c4b9.

18 months agopcrlock: tweak error messages when we are not looking at a TPM2 event log 33090/head
Lennart Poettering [Thu, 30 May 2024 08:12:12 +0000 (10:12 +0200)] 
pcrlock: tweak error messages when we are not looking at a TPM2 event log

If we are looking at a TPM1.2 event log the first log record will not be
the "EfiSpecIdEvent" but something else. Let's improve the log messages
about this, and say explicitly that this is likely not a TPM2.0 event
log.

18 months agoefi-api: check /sys/class/tpm/tpm0/tpm_version_major, too
Lennart Poettering [Thu, 30 May 2024 08:02:36 +0000 (10:02 +0200)] 
efi-api: check /sys/class/tpm/tpm0/tpm_version_major, too

If the ceck for the ACPI TPM2 table did not work we currently check if
the EFI TPM table exists to check if the firmware supports TPM2.
Specifically we check if
/sys/kernel/security/tpm0/binary_bios_measurements exists. But that's
not enough, since that also exists on TPM1.2 systems. Hence, let's also
check /sys/class/tpm/tpm0/tpm_version_major which should exist under
similar conditions and tells us the kernel's idea of the TPM version in
use.

I originally intended to read the signature of the
/sys/kernel/security/tpm0/binary_bios_measurements contents for this,
but this is not ideal since that file has tight access mode, and our TPM
availability check would thus not work anymore if invoked unpriv.

Follow-up for 4b3391158197e9158cc754e56bbeaf94e2fd8395

Fixes: #33077
18 months agoTEST-02-UNITTESTS: Fix exit code checks
Daan De Meyer [Sun, 26 May 2024 16:22:54 +0000 (18:22 +0200)] 
TEST-02-UNITTESTS: Fix exit code checks

18 months agoTEST-05-RLIMITS: Bump memory limits
Daan De Meyer [Sun, 26 May 2024 14:28:21 +0000 (16:28 +0200)] 
TEST-05-RLIMITS: Bump memory limits

When running with sanitizers we need more memory otherwise the unit
gets OOM killed.

18 months agomkosi: Stop installing dbus-broker on OpenSUSE
Daan De Meyer [Tue, 28 May 2024 08:14:07 +0000 (10:14 +0200)] 
mkosi: Stop installing dbus-broker on OpenSUSE

dbus-broker and dbus-daemon have not been made interchangable on
OpenSUSE so we currently end up with dbus-broker used for the system
bus and dbus-daemon for the session bus. Let's stick to dbus-daemon
on OpenSUSE until they switch to dbus-broker.

18 months agomkosi: Install bpftrace
Daan De Meyer [Mon, 27 May 2024 17:22:11 +0000 (19:22 +0200)] 
mkosi: Install bpftrace

18 months agoMerge pull request #33079 from poettering/watchdog-no-disarm
Luca Boccassi [Wed, 29 May 2024 20:18:08 +0000 (22:18 +0200)] 
Merge pull request #33079 from poettering/watchdog-no-disarm

watchdog: don't disarm on shutdown

18 months agoMerge pull request #33072 from poettering/generator-fixes
Luca Boccassi [Wed, 29 May 2024 20:17:13 +0000 (22:17 +0200)] 
Merge pull request #33072 from poettering/generator-fixes

various fixes to generator execution

18 months agobasic: Add debug logging for pidref_set_pid()
Daan De Meyer [Wed, 29 May 2024 19:04:13 +0000 (21:04 +0200)] 
basic: Add debug logging for pidref_set_pid()

18 months agocgroup-util: Add debug logging for cg_kill_recursive()
Daan De Meyer [Wed, 29 May 2024 17:48:19 +0000 (19:48 +0200)] 
cgroup-util: Add debug logging for cg_kill_recursive()

18 months agomain: add comment explaining parameter to watchdog_close 33079/head
Lennart Poettering [Wed, 29 May 2024 15:41:42 +0000 (17:41 +0200)] 
main: add comment explaining parameter to watchdog_close

18 months agoshutdown: explicitly close watchdog with disarm=false before we destroy watchdog...
Lennart Poettering [Wed, 29 May 2024 15:40:28 +0000 (17:40 +0200)] 
shutdown: explicitly close watchdog with disarm=false before we destroy watchdog resources

Otherwise we'll close the device disarming it as side-effect of
watchdog_free_device(), which is not intended. Hence, let's close the fd
first explicitly leaving it armed.

Fixes: #33075
18 months agowatchdog: reset last ping timestamp when opening watchdog
Lennart Poettering [Wed, 29 May 2024 15:38:36 +0000 (17:38 +0200)] 
watchdog: reset last ping timestamp when opening watchdog

When we open a watchdog fresh we have never pinged it, hence reset the
ping timestamp explicitly, so that it is not only reset the first time
we open the device, but all times.

18 months agowatchdog: normalize how we name watchdog related calls
Lennart Poettering [Wed, 29 May 2024 15:37:58 +0000 (17:37 +0200)] 
watchdog: normalize how we name watchdog related calls

Let's put the "watchdog" always as prefix in the name, and not as suffix
or the middle. Just for reasons of naming hygiene

18 months agoMerge pull request #33062 from DaanDeMeyer/virtio-scsi
Daan De Meyer [Wed, 29 May 2024 14:27:07 +0000 (16:27 +0200)] 
Merge pull request #33062 from DaanDeMeyer/virtio-scsi

mkosi: Switch back to cloud/KVM kernel packages

18 months agomkosi: Switch back to cloud/KVM kernel packages 33062/head
Daan De Meyer [Tue, 28 May 2024 12:09:57 +0000 (14:09 +0200)] 
mkosi: Switch back to cloud/KVM kernel packages

Now that we don't need megasas2 anymore, let's switch back to the
KVM/cloud kernel images to save on image size, build times and boot
times.

18 months agotest: Use virtio-scsi for keydev drive
Daan De Meyer [Wed, 29 May 2024 12:19:17 +0000 (14:19 +0200)] 
test: Use virtio-scsi for keydev drive

Otherwise qemu defaults to ide for which the module isn't always
available (e.g. it's missing in the debian linux cloud images).

18 months agoTEST-64-UDEV-STORAGE: Replace megasas2 controller with virtio scsi controller
Daan De Meyer [Tue, 28 May 2024 12:08:18 +0000 (14:08 +0200)] 
TEST-64-UDEV-STORAGE: Replace megasas2 controller with virtio scsi controller

The virtio-scsi driver is available in the KVM/cloud kernel
packages provided by distributions whereas the megasas2 driver is
not. Let's switch to virtio-scsi so we can switch back to the KVM/cloud
kernel packages.

18 months agoMerge pull request #33065 from DaanDeMeyer/nspawn
Daan De Meyer [Wed, 29 May 2024 13:23:48 +0000 (15:23 +0200)] 
Merge pull request #33065 from DaanDeMeyer/nspawn

test: Run tests that don't need a vm in systemd-nspawn

18 months agoexec-util: make sure to close all fds for invoked generators 33072/head
Lennart Poettering [Wed, 29 May 2024 09:50:54 +0000 (11:50 +0200)] 
exec-util: make sure to close all fds for invoked generators

We should really have set O_CLOEXEC for all our fds, but better be safe
than sorry.

18 months agoexec-util: use the stdio array of safe_fork_full() where appropriate
Lennart Poettering [Wed, 29 May 2024 09:46:51 +0000 (11:46 +0200)] 
exec-util: use the stdio array of safe_fork_full() where appropriate

18 months agomkosi: Run integration tests as root 33065/head
Daan De Meyer [Tue, 28 May 2024 13:56:47 +0000 (15:56 +0200)] 
mkosi: Run integration tests as root

This allows running integration tests that support it in nspawn
instead of qemu. This both gives extra coverage and speeds things up.

18 months agotest: Run tests that don't need a vm in systemd-nspawn
Daan De Meyer [Tue, 28 May 2024 13:54:35 +0000 (15:54 +0200)] 
test: Run tests that don't need a vm in systemd-nspawn

If we're not running the test as root, stick to using a virtual
machine, as mkosi can't do rootless nspawn yet.

18 months agomkosi: Disable iscsi service and socket
Daan De Meyer [Wed, 29 May 2024 10:33:57 +0000 (12:33 +0200)] 
mkosi: Disable iscsi service and socket

We'll always start these on demand in integration tests that need
them. No need to start them by default.

18 months agomkosi: Switch from btrfs to ext4
Daan De Meyer [Tue, 28 May 2024 21:15:25 +0000 (23:15 +0200)] 
mkosi: Switch from btrfs to ext4

Mounting multiple btrfs filesystems with the same fsid only works
properly from kernel 6.7 onwards. Let's switch to ext4 for now which
does support this.

18 months agomkosi: update to latest
Daan De Meyer [Tue, 28 May 2024 13:56:13 +0000 (15:56 +0200)] 
mkosi: update to latest

18 months agogenerator-setup: use RET_GATHER()
Lennart Poettering [Wed, 29 May 2024 09:45:50 +0000 (11:45 +0200)] 
generator-setup: use RET_GATHER()

18 months agomkosi: Set EXTRA_CFLAGS on opensuse
Daan De Meyer [Wed, 29 May 2024 08:50:16 +0000 (10:50 +0200)] 
mkosi: Set EXTRA_CFLAGS on opensuse

The opensuse spec doesn't unconditionally set FORTIFY_SOURCE=2 anymore
so let's drop our workaround.

18 months agoMerge pull request #32562 from Werkov/test-cgroup-opensuse
Daan De Meyer [Wed, 29 May 2024 09:01:00 +0000 (11:01 +0200)] 
Merge pull request #32562 from Werkov/test-cgroup-opensuse

Revert "TEST-19-CGROUP: Skip on opensuse"

18 months agobpf: add helper to translate kernel error codes from libbpf
Luca Boccassi [Tue, 28 May 2024 17:59:24 +0000 (18:59 +0100)] 
bpf: add helper to translate kernel error codes from libbpf

libbpf returns error codes from the kernel unmodified, and we don't understand
them so non-fatal ones are handled as hard errors.
Add a translation helper, and start by translating 524 to EOPNOTSUPP, which is
returned when nsresourced tries to use LSM BPF hooks that are not
implemented on a given arch (in this case, arm64 is misssing trampolines).

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

18 months agotest-network: update comment about status of kernel regression
Yu Watanabe [Wed, 29 May 2024 00:07:48 +0000 (09:07 +0900)] 
test-network: update comment about status of kernel regression

18 months agoMerge pull request #33066 from YHNdnzj/logind-linger
Luca Boccassi [Tue, 28 May 2024 20:41:57 +0000 (22:41 +0200)] 
Merge pull request #33066 from YHNdnzj/logind-linger

logind-user: check linger file in user_wants_service_manager too

18 months agotmpfiles: improve warning message and use O_NOCTTY
Christian Göttsche [Mon, 27 May 2024 13:38:18 +0000 (15:38 +0200)] 
tmpfiles: improve warning message and use O_NOCTTY

Mention in the warning message for a failed open on a to be removed file
why systemd-tmpfiles tried to open it.

Also open the file with the O_NOCTTY flag, since it should never become
the controlling terminal.

18 months agologind-user: check linger file in user_wants_service_manager too 33066/head
Mike Yuan [Tue, 28 May 2024 16:43:06 +0000 (00:43 +0800)] 
logind-user: check linger file in user_wants_service_manager too

Follow-up for 5099a50d4398e190387d204f5df81cc176bd33e2

Fixes #33005

18 months agologind-user: add missing assertion for user_check_linger_file
Mike Yuan [Tue, 28 May 2024 16:42:07 +0000 (00:42 +0800)] 
logind-user: add missing assertion for user_check_linger_file

Also make the function take const User*

18 months agotest-network: tun/tap fd may be owned by tentative worker processes
Yu Watanabe [Tue, 28 May 2024 09:15:02 +0000 (18:15 +0900)] 
test-network: tun/tap fd may be owned by tentative worker processes

PID1 may invoke a helper process, e.g. sd-close, during the test.
So, processes other than networkd and PID1 may be shown.
```
testtap99: tap pi multi_queue vnet_hdr persist filter
        Attached to processes:systemd-network(2852)(sd-close)(2863)systemd(1)
```

Closes #33055.

18 months agoMerge pull request #33057 from poettering/partscan-no-part
Luca Boccassi [Tue, 28 May 2024 14:39:15 +0000 (16:39 +0200)] 
Merge pull request #33057 from poettering/partscan-no-part

blockdev-util: for partition block devices partition scanning is always off

18 months agoman: capsule support was added in v256
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 13:58:36 +0000 (15:58 +0200)] 
man: capsule support was added in v256

The version info added directly to --capsule. If we add the
same switch in other places in the future, we will have to move
this.

Closes https://github.com/systemd/systemd/issues/33048.

18 months agoMerge pull request #33063 from keszybz/wiki-links
Luca Boccassi [Tue, 28 May 2024 14:21:45 +0000 (16:21 +0200)] 
Merge pull request #33063 from keszybz/wiki-links

Update wiki links

18 months agoMerge pull request #33008 from fbuihuu/optionally-link-ssh-dropins
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 14:02:40 +0000 (16:02 +0200)] 
Merge pull request #33008 from fbuihuu/optionally-link-ssh-dropins

Optionally link ssh dropins

18 months agotest: lock device when sfdisk or mkfs
Yu Watanabe [Tue, 28 May 2024 07:35:32 +0000 (16:35 +0900)] 
test: lock device when sfdisk or mkfs

Or, trigger devices after the command incase the device is dm or md.

Fixes #33056.

18 months agosocket-util: use GREEDY_REALLOC_APPEND where appropriate
Mike Yuan [Tue, 28 May 2024 02:41:37 +0000 (10:41 +0800)] 
socket-util: use GREEDY_REALLOC_APPEND where appropriate

Also, previously GREEDY_REALLOC was used improperly,
causing the fds_array to be leaked when realloc() fails.

18 months agomachined: downgrade warning if we cannot drop ref to systemd unit if disconnected...
Lennart Poettering [Mon, 27 May 2024 17:06:08 +0000 (19:06 +0200)] 
machined: downgrade warning if we cannot drop ref to systemd unit if disconnected from bus

if machined exits while a machine is still running, we'll issue the
UnrefUnit() call on the unit. This quite likely will fail if during
shutdown the bus connection is already down. But that's no reason to
warn at all, since the ref count will implicitly be dropped if our side
disappears from the bus. Hence, downgrade to LOG_DEBUG in case of
connection problems.

18 months agoMerge pull request #33052 from yuwata/missing-loop
Luca Boccassi [Tue, 28 May 2024 13:01:00 +0000 (15:01 +0200)] 
Merge pull request #33052 from yuwata/missing-loop

Fixlets for missing_loop.h

18 months agoREADME: update link for backports 33063/head
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 12:45:08 +0000 (14:45 +0200)] 
README: update link for backports

18 months agovarious: update links to usr-merge
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 12:43:50 +0000 (14:43 +0200)] 
various: update links to usr-merge

18 months agodocs: drop link to obsolete multiseat page
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 12:40:54 +0000 (14:40 +0200)] 
docs: drop link to obsolete multiseat page

We link to the man page which replaced this historical document right above,
so just drop the whole paragraph.

18 months agoman: update links to "API File Systems"
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 12:38:22 +0000 (14:38 +0200)] 
man: update links to "API File Systems"

18 months agovarious: update links to more wiki pages
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 12:37:23 +0000 (14:37 +0200)] 
various: update links to more wiki pages

18 months agoman: update links to "Inhibitor Locks"
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 11:04:09 +0000 (13:04 +0200)] 
man: update links to "Inhibitor Locks"

18 months agoman: update links to "Compatibility with SysV"
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 11:02:25 +0000 (13:02 +0200)] 
man: update links to "Compatibility with SysV"

18 months agoman: update links to "New Control Group Interfaces"
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 10:42:18 +0000 (12:42 +0200)] 
man: update links to "New Control Group Interfaces"

18 months agoman: update links to catalog docs
Zbigniew Jędrzejewski-Szmek [Tue, 28 May 2024 10:40:30 +0000 (12:40 +0200)] 
man: update links to catalog docs

18 months agodocs/CONTRIBUTING.md: Fix links in CONTRIBUTING
Mathias Lang [Thu, 25 Apr 2024 10:38:09 +0000 (12:38 +0200)] 
docs/CONTRIBUTING.md: Fix links in CONTRIBUTING

Get them to point to the rendered version, instead of
letting Github thinks they are absolute links in the
repository. The rendered version is much more user-friendly.

18 months agotest: add superficial test for partscan test 33057/head
Lennart Poettering [Tue, 28 May 2024 08:01:24 +0000 (10:01 +0200)] 
test: add superficial test for partscan test

18 months agoblockdev-util: partition block devices never have partition scanning enabled
Lennart Poettering [Tue, 28 May 2024 08:01:10 +0000 (10:01 +0200)] 
blockdev-util: partition block devices never have partition scanning enabled

18 months agotest: suppress logs generated by journal tests
Yu Watanabe [Tue, 28 May 2024 05:05:15 +0000 (14:05 +0900)] 
test: suppress logs generated by journal tests

Note, journal_file_dump() is only used by tests.

Closes #33035.

18 months agotest: wait for the kernel finishes to attach backing file to loop device
Yu Watanabe [Tue, 28 May 2024 02:51:48 +0000 (11:51 +0900)] 
test: wait for the kernel finishes to attach backing file to loop device

Fixes #32680.

18 months agomissing_loop.h: fix LOOP_SET_STATUS_SETTABLE_FLAGS 33052/head
Yu Watanabe [Tue, 28 May 2024 03:26:21 +0000 (12:26 +0900)] 
missing_loop.h: fix LOOP_SET_STATUS_SETTABLE_FLAGS

See https://github.com/torvalds/linux/blob/v6.10-rc1/include/uapi/linux/loop.h

Fixes a bug in b3fe33ff52ece458a5b990a4a68d59aef7cae10b.

18 months agomissing_loop: fix potential compile-time assertion
Yu Watanabe [Tue, 28 May 2024 03:25:26 +0000 (12:25 +0900)] 
missing_loop: fix potential compile-time assertion

Fixes a bug introduced by 4d6437d33c45c3d31497f2e3bd8d415f775546b8.

18 months agohwdb: Lenovo IdeaPad Z500 Touchpad Toggle (#33039)
Nicholas Little [Tue, 28 May 2024 00:56:53 +0000 (01:56 +0100)] 
hwdb: Lenovo IdeaPad Z500 Touchpad Toggle (#33039)

Map scancode f3 to KEY_F21.

18 months agocryptsetup: mention correct action in log message
Daniel Winzen [Mon, 27 May 2024 16:05:23 +0000 (18:05 +0200)] 
cryptsetup: mention correct action in log message

18 months agomeson: Run genkey command with --force
Daan De Meyer [Mon, 27 May 2024 14:26:25 +0000 (16:26 +0200)] 
meson: Run genkey command with --force

Sometimes meson decides to rerun the command even if the files already
exist. Let's run with --force so we don't fail if that's the case.

18 months agomeson: don't put a symlink pointing to '20-systemd-userdb.conf' in /etc in all cases 33008/head
Franck Bui [Fri, 24 May 2024 13:38:13 +0000 (15:38 +0200)] 
meson: don't put a symlink pointing to '20-systemd-userdb.conf' in /etc in all cases

It's only needed on distros where sshd doesn't support drop-ins in /usr, which
is not the case on SUSE.

18 months agomeson: don't put a symlink pointing to '20-systemd-ssh-proxy.conf' in /etc in all...
Franck Bui [Fri, 24 May 2024 12:11:54 +0000 (14:11 +0200)] 
meson: don't put a symlink pointing to '20-systemd-ssh-proxy.conf' in /etc in all cases

On distros like SUSE where ssh config dropins in /usr are supported, there's no
need for a symlink in /etc/ssh/ssh_config.d/ that points to the dropin
installed somewhere in /usr (that is not reachable by ssh).

18 months agoMerge pull request #33038 from DaanDeMeyer/mkosi
Daan De Meyer [Mon, 27 May 2024 14:12:24 +0000 (16:12 +0200)] 
Merge pull request #33038 from DaanDeMeyer/mkosi

Various integration test improvents

18 months agotest: fix iscsi TEST-64-UDEV-STORAGE on Debian
Chris Hofstaedtler [Mon, 27 May 2024 02:33:39 +0000 (03:33 +0100)] 
test: fix iscsi TEST-64-UDEV-STORAGE on Debian

18 months agotest: Extend meson + mkosi integration test docs 33038/head
Daan De Meyer [Mon, 27 May 2024 10:00:49 +0000 (12:00 +0200)] 
test: Extend meson + mkosi integration test docs

Let's also put the meson + mkosi docs first to nudge readers towards
it instead of the old fashioned way to run the integration tests.

18 months agoRewrite testsuite README in markdown
Daan De Meyer [Mon, 27 May 2024 09:27:32 +0000 (11:27 +0200)] 
Rewrite testsuite README in markdown

Let's use markdown here like we do for everything else as well.

18 months agoMerge pull request #33028 from yuwata/blockdev-util
Luca Boccassi [Mon, 27 May 2024 10:44:38 +0000 (12:44 +0200)] 
Merge pull request #33028 from yuwata/blockdev-util

blockdev-util: also check loop/partscan sysattr

18 months agomeson: Add genkey target
Daan De Meyer [Mon, 27 May 2024 09:24:43 +0000 (11:24 +0200)] 
meson: Add genkey target

Let's automatically generate keys instead of requiring developers to
do it manually.

18 months agomeson: Look up mkosi once
Daan De Meyer [Mon, 27 May 2024 09:15:02 +0000 (11:15 +0200)] 
meson: Look up mkosi once

18 months agoexecutor: check for all permission related errnos when setting up IPC namespace
Luca Boccassi [Mon, 27 May 2024 00:52:11 +0000 (01:52 +0100)] 
executor: check for all permission related errnos when setting up IPC namespace

Denials from AppArmor are raised as EACCES, so EPERM is not enough. Do
the same check as PrivateNetwork above.

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

Related to 06384eb3c5044f632f50304a0210a402460f1189

18 months agodocs: add note about URL where to find recent Ubuntu CI logs
Luca Boccassi [Thu, 23 May 2024 16:47:25 +0000 (17:47 +0100)] 
docs: add note about URL where to find recent Ubuntu CI logs

18 months agoMerge pull request #33013 from yuwata/journal-flush
Daan De Meyer [Mon, 27 May 2024 06:56:46 +0000 (08:56 +0200)] 
Merge pull request #33013 from yuwata/journal-flush

journal: several fixlets for flushing runtime journal

18 months agoman/run0: remove @ syntax for --machine=
Mike Yuan [Sun, 26 May 2024 19:23:37 +0000 (03:23 +0800)] 
man/run0: remove @ syntax for --machine=

For run0 (as opposed to systemd-run in general), connecting to
the system bus (of localhost or container) as a different user
than root and then trying to elevate privilege from that
makes little sense:
https://github.com/systemd/systemd/issues/32997#issuecomment-2127992973

The @ syntax is mostly useful when connecting to the user bus,
which is not a use case for run0. Hence, let's remove the example.
The syntax will be properly refused in #32999.

18 months agoman/run0: remove -M alias for --machine=
Mike Yuan [Thu, 23 May 2024 18:40:37 +0000 (02:40 +0800)] 
man/run0: remove -M alias for --machine=

run0 doesn't know about the former.

18 months agoMerge pull request #33016 from YHNdnzj/transient-working-dir
Yu Watanabe [Mon, 27 May 2024 00:40:26 +0000 (09:40 +0900)] 
Merge pull request #33016 from YHNdnzj/transient-working-dir

core: several cleanups/fixes for WorkingDirectory= handling

18 months agoblockdev-util: also check loop/partscan sysattr 33028/head
Yu Watanabe [Sun, 26 May 2024 21:01:05 +0000 (06:01 +0900)] 
blockdev-util: also check loop/partscan sysattr

With https://github.com/torvalds/linux/commit/b9684a71fca793213378dd410cd11675d973eaa1 (v5.19),
we cannot check partition scanning is enabled for a loopback block device
without checking the attribute.

18 months agoblockdev-util: also check newer value of GENHD_FL_NO_PART flag
Yu Watanabe [Mon, 27 May 2024 00:21:41 +0000 (09:21 +0900)] 
blockdev-util: also check newer value of GENHD_FL_NO_PART flag

With https://github.com/torvalds/linux/commit/430cc5d3ab4d0ba0bd011cfbb0035e46ba92920c,
the value of GENHD_FL_NO_PART, previously named as GENHD_FL_NO_PART_SCAN,
is changed from 0x0200 to 0x0004. So, we need to check both flags.

18 months agorun: also show a pretty string for main exit status, if any
Mike Yuan [Sun, 26 May 2024 02:33:59 +0000 (10:33 +0800)] 
run: also show a pretty string for main exit status, if any

This brings output on par with unit_log_process_exit().