]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 months agosysext: Support global sysext/confext 38113/head
Vitaly Kuznetsov [Mon, 7 Jul 2025 13:03:55 +0000 (15:03 +0200)] 
sysext: Support global sysext/confext

Load global sysext/confext from /.extra/global_{sysext,confext} which
systemd-stub puts there from ESP/loader/credentials/*.{sysext,confext}.raw.
Global extensions are handled the exact same way as per-UKI ones.

3 months agostub: Support global sysext/confext
Vitaly Kuznetsov [Mon, 7 Jul 2025 12:25:29 +0000 (14:25 +0200)] 
stub: Support global sysext/confext

Systemd-stub support loading addons, credentials, system and configuration
extensions from ESP and while addons and credentials can be both global and
per-UKI, sysext/confext are only per-UKI.

Add support for loading ESP/loader/credentials/*.{sysext,confext}.raw to
systemd-stub.

Note: for backwards compatibility reasons, per-UKI sysexts can also be
*.raw (not only *.sysext.raw) but as global extensions are new, there's
no need to bring this legacy there.

4 months agoman: improve Description= documentation (#38101)
Zbigniew Jędrzejewski-Szmek [Mon, 7 Jul 2025 09:56:09 +0000 (11:56 +0200)] 
man: improve Description= documentation (#38101)

Fixes: #36165
4 months agoman: improve Description= documentation 38101/head
Lennart Poettering [Mon, 7 Jul 2025 08:10:29 +0000 (10:10 +0200)] 
man: improve Description= documentation

This is an attempt to address the issues raised in #36165.

Fixes: #36165
4 months agotree-wide: "human readable" → "human-readable"
Lennart Poettering [Mon, 7 Jul 2025 07:48:42 +0000 (09:48 +0200)] 
tree-wide: "human readable" → "human-readable"

Apparently, the spelling with a hyphen is better style in the English
language.

Suggested by: #36165

4 months agobuild(deps): bump github/codeql-action from 3.28.18 to 3.29.2
dependabot[bot] [Tue, 1 Jul 2025 11:21:37 +0000 (11:21 +0000)] 
build(deps): bump github/codeql-action from 3.28.18 to 3.29.2

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.18 to 3.29.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/ff0a06e83cb2de871e5a09832bc6a81e7276941f...181d5eefc20863364f96762470ba6f862bdef56b)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
4 months agoUnify error messages for transient settings, fix handling of Ex variants (#38083)
Lennart Poettering [Mon, 7 Jul 2025 07:39:40 +0000 (09:39 +0200)] 
Unify error messages for transient settings, fix handling of Ex variants (#38083)

4 months agoExplicitly include more headers (#38100)
Daan De Meyer [Mon, 7 Jul 2025 06:26:46 +0000 (08:26 +0200)] 
Explicitly include more headers (#38100)

Continuation of 4f18ff2e29b8054f30b084abcabf5f689f4b340b.

4 months agotimesync,test: explicitly include sys/timex.h when struct timex is used 38100/head
Yu Watanabe [Mon, 7 Jul 2025 03:40:11 +0000 (12:40 +0900)] 
timesync,test: explicitly include sys/timex.h when struct timex is used

struct timex is defined by sys/timex.h -> bits/timex.h.
Glibc includes the header in time.h, but let's explicitly include it
when the struct is used.

Similar to 4f18ff2e29b8054f30b084abcabf5f689f4b340b, but for sys/timex.h.

4 months agotree-wide: include sys/stat.h where necessary
Yu Watanabe [Mon, 7 Jul 2025 02:40:42 +0000 (11:40 +0900)] 
tree-wide: include sys/stat.h where necessary

These source files uses symbols provided by sys/stat.h, e.g. struct stat,
S_IFREG, S_IFBLK, and so on. Let's explicitly include sys/stat.h where
necessary.

Glibc's fcntl.h includes bits/stat.h, which provides these symbols, so
these symbols can be used without explicitly including sys/stat.h. But,
based on the discussion in #37922, we should explicitly include relevant
headers, and should not rely on the indirect inclusion.

Similar to 4f18ff2e29b8054f30b084abcabf5f689f4b340b, but for sys/stat.h.

4 months agoTwo follow-ups for recent PRs (#38062)
Lennart Poettering [Sun, 6 Jul 2025 20:06:52 +0000 (22:06 +0200)] 
Two follow-ups for recent PRs (#38062)

4 months agosystemd-analyze: stop printing Ex transient settings 38083/head
Zbigniew Jędrzejewski-Szmek [Sat, 5 Jul 2025 11:01:18 +0000 (13:01 +0200)] 
systemd-analyze: stop printing Ex transient settings

The test will fail if we ever add one again in the future by mistake.

4 months agoshared/bus-unit-util: fix PrivateTmp=/PrivateUsers=/ProtectControlGroups= and Ex...
Zbigniew Jędrzejewski-Szmek [Sat, 5 Jul 2025 07:22:16 +0000 (09:22 +0200)] 
shared/bus-unit-util: fix PrivateTmp=/PrivateUsers=/ProtectControlGroups= and Ex variants

For some fields, we perform careful parsing and verification on the sender
side. For other fields, we accept any string or strv. I think that actually
this is fine: we should optimize for the correct case, i.e. the user runs a
command that is valid. The server must perform parsing in all cases, so doing
the verification on the sender side doesn't add value. When doing parsing
locally, in case of invalid or unsupported input, we would generate the error
message locally, so we would avoid the D-Bus call, but the message itself is
not better and from the user's point of view, the result is the same. And by
doing the parsing only on the server side, we deal better with the case where
the sender has an older version of the software. By not doing verification, we
implicitly "support" new values. And when the sender has a newer version that
supports additional fields, that does not help as long as the server uses an
older version. So in case of version mismatches, parsing on the server side is
as good or better.

Resolves https://github.com/systemd/systemd/issues/37174.

4 months agoshared/bus-unit-util: tweak bus_append_exec_command to use Ex prop only if necessary
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 17:32:51 +0000 (19:32 +0200)] 
shared/bus-unit-util: tweak bus_append_exec_command to use Ex prop only if necessary

This changes little in behaviour, the conceptual part is more important. The
non-Ex variant is the actual name on the command line, and we should use the
non-Ex D-Bus property too, if it works. This increases compatibility with old
versions. But the code was mostly doing the right thing. Even the tests tested
the right thing.

Follow-up for b3d593673c5b8b0b7d781fd26ab2062ca6e7dbdb and
898fc00e794d714e2f01409bef440d910c22502a.

The test is simplified by taking advantage of the fact that both names
on the commandline are supposed to behave identically.

Partially resolves https://github.com/systemd/systemd/issues/37174.

4 months agoshared/bus-unit-util: rework error messages for NFTSet=
Zbigniew Jędrzejewski-Szmek [Sat, 5 Jul 2025 11:26:07 +0000 (13:26 +0200)] 
shared/bus-unit-util: rework error messages for NFTSet=

Let's be nice to the user and print the exact reason why we won't accept
a setting.

4 months agoshared/bus-unit-util: rework error messages
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 15:18:16 +0000 (17:18 +0200)] 
shared/bus-unit-util: rework error messages

We generally want to have error messages with a fixed structure that convey the
important information, i.e. field name, error value, and the offending text for
options that take short values. (The text is not printed for strings encoded with
base64 and hexmem or for credentials.)

Let's use a helper that prints the message in a fixed format in the majority of
cases. In the few places where a custom message is useful, the helper is not
used. The helper:
- prints the field name, value, and error info,
- quotes the value,
- handles -ENOMEM, so we don't need to handle it separately everywhere.

When this code was originally written, parse functions would return -1
as error. Nowadays day all return a good errno, so it is fine if we print
the corresponding strerror.

4 months agoshared/bus-unit-util: tweak error handling in bus_append_exec_command
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 12:06:52 +0000 (14:06 +0200)] 
shared/bus-unit-util: tweak error handling in bus_append_exec_command

exec_command_flags_to_strv() should not fail, unless we screwed up, so assert
instead of returning an error. Also, no need to strdup constant _PATH_BSHELL;
drop that so that we can get rid of the oom error handling. Finally, rename
l → cmdline for clarity.

4 months agobasic/include: replace _Static_assert() with static_assert()
Yu Watanabe [Sun, 6 Jul 2025 02:33:58 +0000 (11:33 +0900)] 
basic/include: replace _Static_assert() with static_assert()

If one of the header is included in a C++ source file, then using
_Static_assert() triggers compile error for some reasons.
Let's use static_assert(), which can be used by both C and C++ code.

4 months agoci: add test timeout multiplier for ppc64le
Luca Boccassi [Sun, 6 Jul 2025 10:02:20 +0000 (11:02 +0100)] 
ci: add test timeout multiplier for ppc64le

The slow tests have timed out at least a couple of times,
so add a multiplier

1252/1633 systemd:libsystemd / test-sd-device      TIMEOUT 30.04s killed by signal 15 SIGTERM
1633/1633 systemd:libsystemd / test-journal-verify TIMEOUT 90.01s killed by signal 15 SIGTERM

Follow-up for 8a1d1341444aaf143108e0ca85741c779014d8b2

4 months agocore: rename ExecContext.ioprio_set -> .ioprio_is_set
Yu Watanabe [Sun, 6 Jul 2025 01:43:18 +0000 (10:43 +0900)] 
core: rename ExecContext.ioprio_set -> .ioprio_is_set

To make it not conflict with syscall ioprio_set().
This is important as we have
```
 #define ioprio_set missing_ioprio_set
```
in missing_syscall.h.

4 months agoanalyze: include unistd.h
Yu Watanabe [Sun, 6 Jul 2025 06:22:43 +0000 (15:22 +0900)] 
analyze: include unistd.h

The source file uses symbols e.g. execl(), execvp(), _exit(), and so on,
without including unistd.h.

Continuation of 4f18ff2e29b8054f30b084abcabf5f689f4b340b.

Follow-up for 9a08000d186396bc8bcb8fe057720417543c3bf0.

4 months agonamespace-util,nsresource: explicitly include sched.h
Yu Watanabe [Wed, 25 Jun 2025 16:03:26 +0000 (01:03 +0900)] 
namespace-util,nsresource: explicitly include sched.h

These source files uses symbols provided by sched.h, e.g.
setns(), unshare(), CLONE_NEWNS, and friends, but they do not explicitly
include sched.h. Currently, it is included indirectly via missing_syscall.h,
which is included by e.g. pidfd-util.h.
Let's explicitly include headers that provides symbols used in the code.

This is similar to 4f18ff2e29b8054f30b084abcabf5f689f4b340b, but for sched.h.

4 months agotree-wide: several cleanups for reading/writing /proc/sys/fs/nr_open
Yu Watanabe [Sat, 5 Jul 2025 07:42:41 +0000 (16:42 +0900)] 
tree-wide: several cleanups for reading/writing /proc/sys/fs/nr_open

- use unsigned for the return value of read_nr_open(), as it does not
  fail, and the kernel internally uses unsigned for the value,
- when bumping the value by PID1, let's start from the kernel's maximum
  value defined in fs/file.c. The maximum value should be mostly an API
  of the kernel, but may changed in a future, hence still try several
  times if we fail to bump the value.

Co-authored-by: Jared Baur <jaredbaur@fastmail.com>
Co-authored-by: John Rinehart <johnrichardrinehart@gmail.com>
4 months agoukify: fix parsing uname version with '+'
Luca Boccassi [Sat, 5 Jul 2025 20:10:01 +0000 (21:10 +0100)] 
ukify: fix parsing uname version with '+'

Debian started using '+' in the kernel uname version, which fails the
regex in ukify. Fix it.

4 months agocgroup-util: clean up skip_{slices,session,user_manager} (#38089)
Yu Watanabe [Sun, 6 Jul 2025 07:37:28 +0000 (16:37 +0900)] 
cgroup-util: clean up skip_{slices,session,user_manager} (#38089)

4 months agohwdb: fix typo in 70-maker-tools.hwdb, and add the file to meson.build (#38090)
Yu Watanabe [Sun, 6 Jul 2025 07:31:23 +0000 (16:31 +0900)] 
hwdb: fix typo in 70-maker-tools.hwdb, and add the file to meson.build (#38090)

4 months agomeson fixlets (#38086)
Yu Watanabe [Sun, 6 Jul 2025 07:27:31 +0000 (16:27 +0900)] 
meson fixlets (#38086)

Some fixes for issues found while doing a minimal aarch64 cross build

4 months agohwdb: fix typo in 70-maker-tools.hwdb 38090/head
AsciiWolf [Sat, 5 Jul 2025 21:44:08 +0000 (23:44 +0200)] 
hwdb: fix typo in 70-maker-tools.hwdb

4 months agohwdb: add 70-maker-tools.hwdb to meson.build
AsciiWolf [Sat, 5 Jul 2025 21:32:09 +0000 (23:32 +0200)] 
hwdb: add 70-maker-tools.hwdb to meson.build

The hwdb file was not added there in 3dcb56f5e0fe4d937a003bf89496a27b52c5c69e for some reason

4 months agocore/cgroup: drop outdated comment 38089/head
Mike Yuan [Thu, 5 Jun 2025 00:14:15 +0000 (02:14 +0200)] 
core/cgroup: drop outdated comment

4 months agocgroup-util: clean up skip_{slices,session,user_manager}
Mike Yuan [Tue, 27 May 2025 16:32:44 +0000 (18:32 +0200)] 
cgroup-util: clean up skip_{slices,session,user_manager}

Let's avoid obscure memcmp()s in skip_* and instead use
strndupa() to extract the bits we care and call usual
string routines on it.

4 months agostring-table: drop unneeded initialization
Mike Yuan [Tue, 27 May 2025 14:55:43 +0000 (16:55 +0200)] 
string-table: drop unneeded initialization

4 months agomeson: call qemu with -machine virt on aarch64 38086/head
Luca Boccassi [Sat, 5 Jul 2025 19:21:51 +0000 (20:21 +0100)] 
meson: call qemu with -machine virt on aarch64

'qemu-system-aarch64 -device help' fails when no machine is specified.
Use the 'virt' type which seems to be what everyone uses for VMs.

4 months agomeson: do not reference variable unless feature that defines it is enabled
Luca Boccassi [Sat, 5 Jul 2025 19:21:00 +0000 (20:21 +0100)] 
meson: do not reference variable unless feature that defines it is enabled

SYSTEMD_LANGUAGE_FALLBACK_MAP is used by the localed test, and
language_fallback_map is defined by the localed meson.
If the feature is disabled, the test is not built so the env var
is not needed, and the meson variable is not defined so the build
fails.

4 months agoanalyze: fix typo
Yu Watanabe [Sat, 5 Jul 2025 16:42:24 +0000 (01:42 +0900)] 
analyze: fix typo

Follow-up for 9a08000d186396bc8bcb8fe057720417543c3bf0.

4 months agoman/analyze: fix typo
Yu Watanabe [Sat, 5 Jul 2025 16:41:44 +0000 (01:41 +0900)] 
man/analyze: fix typo

Follow-up for a839c4b7b7b5ddfd2187d1c3975ed6a203d37f90.

4 months agoTODO: fix typo
Yu Watanabe [Sat, 5 Jul 2025 16:41:14 +0000 (01:41 +0900)] 
TODO: fix typo

4 months agocore/socket: fix typo
Yu Watanabe [Sat, 5 Jul 2025 16:38:10 +0000 (01:38 +0900)] 
core/socket: fix typo

Follow-up for 1b4ab5a209c4874e01cf9577c740b82567458b09.

4 months agoask-password-api: Add more debug logging
DaanDeMeyer [Sat, 5 Jul 2025 09:19:59 +0000 (11:19 +0200)] 
ask-password-api: Add more debug logging

4 months agomkosi: enable arm64 job and test fixlets (#38066)
Luca Boccassi [Sat, 5 Jul 2025 10:46:30 +0000 (11:46 +0100)] 
mkosi: enable arm64 job and test fixlets (#38066)

Enable nspawn job, as there's no nested kvm so VMs are too slow. Fix
some tests that fail in a VM anyway, might add a nightly job later that
runs them.

4 months agochase: introduce openat_opath_with_automount() helper 38062/head
Mike Yuan [Thu, 3 Jul 2025 20:40:15 +0000 (22:40 +0200)] 
chase: introduce openat_opath_with_automount() helper

Follow-up for c5de7b14ae2e08d267d8d75bc88934ac6aa7dcd6

chase() is arguably a hot path in our code, hence it deserves
some caching whether open_tree() is available. Moreover,
the manual set of r to -EPERM feels kinda ugly. Let's
instead extract this bit into its own function.

4 months agojournal-file: const and _pure_'ify journal_file_writable()
Mike Yuan [Thu, 3 Jul 2025 20:30:12 +0000 (22:30 +0200)] 
journal-file: const and _pure_'ify journal_file_writable()

Follow-up for 1543c2385c0a1afbdc59b50c8ecd132a0d60bbef

4 months agonetworkd-test: stop varlink socket before setting up runtime directories
Yu Watanabe [Sat, 5 Jul 2025 02:32:44 +0000 (11:32 +0900)] 
networkd-test: stop varlink socket before setting up runtime directories

Follow-up for b0ea79c5b5e056cd61eb518308aa5a992f6c313d.

4 months agoci: use -p and -f when creating dirs/removing files in mkosi job btrfs setup
Luca Boccassi [Fri, 4 Jul 2025 22:31:50 +0000 (23:31 +0100)] 
ci: use -p and -f when creating dirs/removing files in mkosi job btrfs setup

It failed at least once:

mkdir: cannot create directory ‘/mnt/mkosi’: File exists

4 months agoseccomp-util: allowlist open_tree() as part of @file-system
Lennart Poettering [Fri, 4 Jul 2025 08:16:56 +0000 (10:16 +0200)] 
seccomp-util: allowlist open_tree() as part of @file-system

Now that we make use of open_tree() in places we previously used
openat() with O_PATH, it makes sense to move it from @mount to
@file-system. Without the OPEN_TREE_CLONE flag open_tree() is after all
unprivileged.

Note that open_tree_attr() I left in @mount, since it's purpose is
really to set mount options when cloning, and that's clearly a mount
related thing, not so much something you could use unpriv.

Follow-up for: c5de7b14ae2e08d267d8d75bc88934ac6aa7dcd6

This addresses an issue tracked down by Antonio Feijoo: since the commit
that started to use open_tree() various apps started to crash because
they used seccomp filters and sd-device started to use open_tree()
internally.

4 months agoman: Fix typo
DaanDeMeyer [Fri, 4 Jul 2025 19:13:02 +0000 (21:13 +0200)] 
man: Fix typo

4 months agoSmall cleanups for tests (#38063)
Luca Boccassi [Fri, 4 Jul 2025 18:24:29 +0000 (19:24 +0100)] 
Small cleanups for tests (#38063)

4 months agomkosi: update debian commit reference to cc380fbc8af2e17165623d16630b7fc3ab4291d0
Luca Boccassi [Fri, 4 Jul 2025 16:12:24 +0000 (17:12 +0100)] 
mkosi: update debian commit reference to cc380fbc8af2e17165623d16630b7fc3ab4291d0

cc380fbc8a Install new files for upstream build
45f81ec53e Install new files for upstream build
105837d0ba Update changelog for 257.7-1 release
bb17074bfd systemd-boot: reduce harmless noise on cleanup
363898fe05 systemd-boot: remove fb too on removal

4 months agoman: Fix typo in name of sd_id128_to_uuid_string
Gabríel Arthúr Pétursson [Fri, 4 Jul 2025 16:42:50 +0000 (16:42 +0000)] 
man: Fix typo in name of sd_id128_to_uuid_string

4 months agomkosi: enable arm64 job 38066/head
Luca Boccassi [Fri, 4 Jul 2025 13:50:29 +0000 (14:50 +0100)] 
mkosi: enable arm64 job

There's no acceleration, so nested VMs are too slow, only enable
nspawn.

4 months agotest: /lib64 is not guaranteed to exist, do not try to copy it if not
Luca Boccassi [Fri, 4 Jul 2025 01:18:43 +0000 (02:18 +0100)] 
test: /lib64 is not guaranteed to exist, do not try to copy it if not

4 months agotest: bump machinectl timeouts from 10s to 30s
Luca Boccassi [Fri, 4 Jul 2025 00:25:26 +0000 (01:25 +0100)] 
test: bump machinectl timeouts from 10s to 30s

Nested arm64 VMs are very slow, bump the timeouts

4 months agotest: do not fail if scsi_debug module not available
Luca Boccassi [Fri, 4 Jul 2025 00:18:47 +0000 (01:18 +0100)] 
test: do not fail if scsi_debug module not available

On Debian it's only built on amd64 kernels, so skip test cases if it
cannot be loaded

4 months agopresets: Disable by default for initrd presets
DaanDeMeyer [Fri, 4 Jul 2025 08:28:17 +0000 (10:28 +0200)] 
presets: Disable by default for initrd presets

For initrd presets, we can change the default to disable services
by default instead of enabling by default without breaking compat
so let's do that as it makes much more sense as a default than
enabling everything by default.

4 months agosystemd-analyze: added the verb unit-shell to spawn and attach shell
ZIHCO [Fri, 13 Jun 2025 18:38:55 +0000 (19:38 +0100)] 
systemd-analyze: added the verb unit-shell to spawn and attach shell

4 months agoci: enable build/unit test jobs on ppc64le
Luca Boccassi [Fri, 4 Jul 2025 11:30:04 +0000 (12:30 +0100)] 
ci: enable build/unit test jobs on ppc64le

New workers we got from IBM can be used now. The GHA linter doesn't
recognize them yet, so add a local workaround until the change is
merged in the linter.

4 months agoshared/bus-unit-util: also send empty array for LogFilterPatterns=
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 10:07:13 +0000 (12:07 +0200)] 
shared/bus-unit-util: also send empty array for LogFilterPatterns=

Before, for empty input, we'd send an array with one item with an empty
pattern. Use the helper which sends an empty array instead.
bus_exec_context_set_transient_property() ignores items with an empty
pattern, so the result should be the same.

Request in review:
https://github.com/systemd/systemd/pull/37665#discussion_r2182375988.

4 months agotest-bus-unit-util: add a test that attempts to serialize all know transient settings
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jul 2025 16:52:26 +0000 (18:52 +0200)] 
test-bus-unit-util: add a test that attempts to serialize all know transient settings

The samples were partially generated using claude.ai. Those examples are
usually fairly boring. I tried to remove obvious repetitions and add some more
interesting examples, but certainly more edge cases could be added.

In some cases, we are quite lenient and do almost no verification on the sender
side.

4 months agoshared/bus-unit-util: check errors before other conditions
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 05:04:09 +0000 (07:04 +0200)] 
shared/bus-unit-util: check errors before other conditions

As requested in post-merge review in
https://github.com/systemd/systemd/pull/37665#discussion_r2183755909.

4 months agobasic/rlimit-util.c: drop duplicate checks 38063/head
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 08:48:14 +0000 (10:48 +0200)] 
basic/rlimit-util.c: drop duplicate checks

parse_sec() and parse_time() already handle "infinity".
TEST(rlimit_parse_format) covered the first case, also extend it to cover
the second case.

4 months agobasic/rlimit-util.c: align table
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jul 2025 08:47:32 +0000 (10:47 +0200)] 
basic/rlimit-util.c: align table

4 months agotest-dirent-util: remove strange whitespace
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jul 2025 15:23:08 +0000 (17:23 +0200)] 
test-dirent-util: remove strange whitespace

4 months agotests: use log_tests_skipped more, use shorter form
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jul 2025 15:22:45 +0000 (17:22 +0200)] 
tests: use log_tests_skipped more, use shorter form

Also change order to handle errors before 0 in one case.

4 months agossh-generator: generate /etc/issue.d/ with VSOCK ssh info data (#37819)
Lennart Poettering [Fri, 4 Jul 2025 08:45:45 +0000 (10:45 +0200)] 
ssh-generator: generate /etc/issue.d/ with VSOCK ssh info data (#37819)

ssh-generator: generate /etc/issue.d/ with VSOCK ssh info data

I find myself trying to log into a fresh ParticleOS VM started via
systemd-vmspawn all the time, but I don't know its CID. Let's show it on
the getty screen, to make it immediately visible.

4 months agoudev: gracefully handle ENODEV or friends in opening device node
Yu Watanabe [Thu, 3 Jul 2025 13:46:38 +0000 (22:46 +0900)] 
udev: gracefully handle ENODEV or friends in opening device node

Fixes #38033.

4 months agoci: enable arm64 runner for build/unit jobs
Luca Boccassi [Fri, 4 Jul 2025 00:54:02 +0000 (01:54 +0100)] 
ci: enable arm64 runner for build/unit jobs

Enable only a couple of jobs, to avoid running down capacity too much

4 months agoukify: when decompressing kernel before signing, call verify on decompressed file
Luca Boccassi [Fri, 4 Jul 2025 00:06:54 +0000 (01:06 +0100)] 
ukify: when decompressing kernel before signing, call verify on decompressed file

Otherwise it will fail as it's an archive, not a PE file:

Invalid DOS header magic
Can't open image /boot/vmlinuz.old
/boot/vmlinuz.old is compressed and cannot be loaded by UEFI, decompressing
+ sbverify --list /boot/vmlinuz.old
=========================== short test summary info ============================
FAILED ../src/ukify/test/test_ukify.py::test_efi_signing_sbsign[3650] - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.
FAILED ../src/ukify/test/test_ukify.py::test_efi_signing_sbsign[None] - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.
FAILED ../src/ukify/test/test_ukify.py::test_inspect - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.

Follow-up for 0dd03215f1e402092f6c6da213708045e445a9ed

4 months agoAdd systemd-analyze verb to list runtime unit properties (#37665)
Yu Watanabe [Fri, 4 Jul 2025 02:47:38 +0000 (11:47 +0900)] 
Add systemd-analyze verb to list runtime unit properties (#37665)

4 months agoci: restrict x86-only packages to x86 configs (#38056)
Luca Boccassi [Fri, 4 Jul 2025 00:26:22 +0000 (01:26 +0100)] 
ci: restrict x86-only packages to x86 configs (#38056)

Prepare the ground for non-x86 CI jobs. Still work in progress, but
these preparatory steps work and can be already included.

4 months agopcrlock: process components outside of location window properly
Lennart Poettering [Thu, 3 Jul 2025 11:50:46 +0000 (13:50 +0200)] 
pcrlock: process components outside of location window properly

So far, when we tried to match a component to eent log entries we
skipped those components if they were outside of our location window.
That however is too aggressive, since it means any components that are
already in the logs, but outside of the location window will be
considered unrecognized in the logs, and thus removed from the PCR
policy.

Change things around: always try to match up all components, regardless
if inside the location window or outside, but then make it non-fatal we
can't find a component outside of the location window.

Fixes: #36079
4 months agoci: also install llvm-<version> 38056/head
Luca Boccassi [Thu, 3 Jul 2025 21:58:25 +0000 (22:58 +0100)] 
ci: also install llvm-<version>

On some architectures that's not pulled in by default, it ships llvm-ar
which is needed by meson

4 months agoci: install packages available only on x86_64/arm64 on those arches only
Luca Boccassi [Thu, 3 Jul 2025 21:57:46 +0000 (22:57 +0100)] 
ci: install packages available only on x86_64/arm64 on those arches only

4 months agomkosi: libclang-rt-dev is not available on s390x
Luca Boccassi [Wed, 2 Jul 2025 23:40:51 +0000 (00:40 +0100)] 
mkosi: libclang-rt-dev is not available on s390x

Doesn't seem intentional, so use a regex for now:
https://bugs.debian.org/1108683

4 months agomkosi: move efi packages to conditional drop-in
Luca Boccassi [Wed, 2 Jul 2025 20:56:27 +0000 (21:56 +0100)] 
mkosi: move efi packages to conditional drop-in

4 months agomkosi: drop workaround for opensuse systemd-stub tmpfiles
Luca Boccassi [Wed, 2 Jul 2025 20:57:36 +0000 (21:57 +0100)] 
mkosi: drop workaround for opensuse systemd-stub tmpfiles

It was moved back to the main package

4 months agosd-event struct typedefs and comments (#37790)
Luca Boccassi [Thu, 3 Jul 2025 21:22:40 +0000 (22:22 +0100)] 
sd-event struct typedefs and comments (#37790)

4 months agochase: when chasing paths, trigger automounts
Lennart Poettering [Thu, 3 Jul 2025 09:49:44 +0000 (11:49 +0200)] 
chase: when chasing paths, trigger automounts

As it turns out open() with O_PATH does *not* trigger autofs, you get a
reference to the autofs inode, if not triggered.

But there's a way out: open_tree() (when specified without
OPEN_TREE_CLONE) is actually fully equivalent to open() with O_PATH –
with the exception of one thing: it *does* trigger automounts.

Thanks for Christian Brauner for pointing me to this and saving my day.

Fixes: #33155
4 months agoopenssl-util: allow to build with openssl without UI support (#38041)
Luca Boccassi [Thu, 3 Jul 2025 21:11:02 +0000 (22:11 +0100)] 
openssl-util: allow to build with openssl without UI support (#38041)

This makes it possible to build systemd with
-Dc_args='-DOPENSSL_NO_UI_CONSOLE=1'. Hopefully, now systemd can be
built with other openssl implementations, like BoringSSL, which deos not
support UIs.

Closes #38024.

4 months agofd-util: Move RAW_O_LARGEFILE and O_ACCMODE_STRICT definitions to fd-util.h (#38051)
Mike Yuan [Thu, 3 Jul 2025 20:27:39 +0000 (22:27 +0200)] 
fd-util: Move RAW_O_LARGEFILE and O_ACCMODE_STRICT definitions to fd-util.h (#38051)

4 months agotest-utf8: drop explicit setting of colors
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jul 2025 11:13:44 +0000 (13:13 +0200)] 
test-utf8: drop explicit setting of colors

It was added in 82208a9949ff96abfd41ea3dd969fa7501ee4686, but since
13ee93978479b80e980d8551c689a7087bf1817e, we enable colors by default.
I don't think this function is doing anything useful.

4 months agoshared/bus-unit-util: stop unsing strndupa 37665/head
Zbigniew Jędrzejewski-Szmek [Tue, 1 Jul 2025 07:51:00 +0000 (09:51 +0200)] 
shared/bus-unit-util: stop unsing strndupa

Those are user-controlled strings, so let's use heap allocations in the usual
fashion. (Though, with strndupa_safe, the allocations were bounded anyway, so
ultimately this doesn't matter.)

4 months agoshell-completions: add systemd-analyze transient-settings
Zbigniew Jędrzejewski-Szmek [Mon, 2 Jun 2025 18:42:54 +0000 (20:42 +0200)] 
shell-completions: add systemd-analyze transient-settings

The zsh completions only complete one type argument, even though multiple
args are allowed. But the same issue occurs with other completions, e.g.
for options. I don't know how to solve this.

4 months agodocs/TRANSIENT-SETTINGS: update lists
Zbigniew Jędrzejewski-Szmek [Mon, 2 Jun 2025 13:15:38 +0000 (15:15 +0200)] 
docs/TRANSIENT-SETTINGS: update lists

Those lists were partially wrong and partially outdated. We should generate
this document automatically, but let's revisit this topic after the conversion
to sphinx. For now, as a stop-gap solution, I generated the lists from
the new 'systemd-analyze transient-settings' command.

4 months agoanalyze: add transient-settings verb
Zbigniew Jędrzejewski-Szmek [Fri, 30 May 2025 10:15:13 +0000 (12:15 +0200)] 
analyze: add transient-settings verb

Related to https://github.com/systemd/systemd/pull/37641.

The name "transient settings" was used in docs/TRANSIENT-SETTINGS.md.
Using "setting" helps distinguish this from D-Bus "properties", which are
a much larger set, partially overlapping.

4 months agoshared/bus-unit-util: add bus_dump_transient_settings() helper
Zbigniew Jędrzejewski-Szmek [Thu, 29 May 2025 12:37:30 +0000 (14:37 +0200)] 
shared/bus-unit-util: add bus_dump_transient_settings() helper

bus_append_unit_property() and associated functions accept a long list of
properties. But the specific names are only available through code. But it is
useful to be able to know the specific list of properties that is supported, in
particular for shell completions. Thus, add a way to list the properties that
are supported by the code.

In the future we could also turn this into a test for the documentation. For
various reasons, the list of properties listed in the docs is a partially
overlapping set. E.g. for service type, the pull request
https://github.com/systemd/systemd/pull/37661 creates a list with 212 entries,
and this code generates 7 entries less and 184 more. I didn't check all the
differences, but in the few cases I did, the list generated here was actually
correctly supported by 'systemd-run -p'.

A smoke test is added.

4 months agoshared/bus-unit-util: convert to a table
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 17:29:51 +0000 (19:29 +0200)] 
shared/bus-unit-util: convert to a table

4 months agoshared/bus-unit-util: add helper for TimeoutSec=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 16:11:57 +0000 (18:11 +0200)] 
shared/bus-unit-util: add helper for TimeoutSec=

4 months agoshared/bus-unit-util: add define to shorten common append pattern
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 15:18:28 +0000 (17:18 +0200)] 
shared/bus-unit-util: add define to shorten common append pattern

4 months agoshared/bus-unit-util: add helper for AppArmorProfile=/SmackProcessLabel=
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:46:32 +0000 (16:46 +0200)] 
shared/bus-unit-util: add helper for AppArmorProfile=/SmackProcessLabel=

4 months agoshared/bus-unit-util: add helper for CPUQuotaPeriodSec=ManagedOOMMemoryPressureDurati...
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:44:01 +0000 (16:44 +0200)] 
shared/bus-unit-util: add helper for CPUQuotaPeriodSec=ManagedOOMMemoryPressureDurationSec=

4 months agoshared/bus-unit-util: add helper for unit deps
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:41:29 +0000 (16:41 +0200)] 
shared/bus-unit-util: add helper for unit deps

4 months agoshared/bus-unit-util: define helper for conditions and asserts
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:37:24 +0000 (16:37 +0200)] 
shared/bus-unit-util: define helper for conditions and asserts

The function has "try" in the name because it dynamically checks
if the field name matches.

4 months agoshared/bus-unit-util: define helper for SuccessActionExitStatus= and friend
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:23:31 +0000 (16:23 +0200)] 
shared/bus-unit-util: define helper for SuccessActionExitStatus= and friend

4 months agoshared/bus-unit-util: add helper for TimersCalendar property
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:16:04 +0000 (16:16 +0200)] 
shared/bus-unit-util: add helper for TimersCalendar property

4 months agoshared/bus-unit-util: add helper for TimersMonotonic property
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:14:44 +0000 (16:14 +0200)] 
shared/bus-unit-util: add helper for TimersMonotonic property

4 months agoshared/bus-unit-util: add helper for Listen property
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:13:03 +0000 (16:13 +0200)] 
shared/bus-unit-util: add helper for Listen property

4 months agoshared/bus-unit-util: use common helper for various strv properties
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:10:30 +0000 (16:10 +0200)] 
shared/bus-unit-util: use common helper for various strv properties

4 months agoshared/bus-unit-util: define helper for SuccessExitStatus= and friends
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:08:52 +0000 (16:08 +0200)] 
shared/bus-unit-util: define helper for SuccessExitStatus= and friends

4 months agoshared/bus-unit-util: define helper for Paths property
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 14:05:33 +0000 (16:05 +0200)] 
shared/bus-unit-util: define helper for Paths property

4 months agotest: drop ProtectHostnameEx, add one test for ProtectHostnameEx
Zbigniew Jędrzejewski-Szmek [Fri, 27 Jun 2025 11:38:29 +0000 (13:38 +0200)] 
test: drop ProtectHostnameEx, add one test for ProtectHostnameEx

This is a separate commit because the parent commit is supposed to be
backward compatible, i.e. the tests must pass with both the bogus ProtectHostnameEx
name and ProtectHostname.

A test is added for ProtectHostnameEx to verify that it is still accepted
for backward compat.