]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agotest: add testcase for subcgroup killing 38102/head
Lennart Poettering [Mon, 30 Jun 2025 12:54:36 +0000 (14:54 +0200)] 
test: add testcase for subcgroup killing

4 months agosystemctl: add --kill-subgroup= switch for killing subcgroup
Lennart Poettering [Mon, 30 Jun 2025 12:54:12 +0000 (14:54 +0200)] 
systemctl: add --kill-subgroup= switch for killing subcgroup

4 months agopid1: add ability to kill processes in a subgroup of a unit
Lennart Poettering [Mon, 19 May 2025 15:38:26 +0000 (17:38 +0200)] 
pid1: add ability to kill processes in a subgroup of a unit

This is useful for things like machined, where the system machined wants
to manage a machine owned by the user somewhere down the tree.

4 months agopid1: properly report if we managed to kill a process by cgroup
Lennart Poettering [Mon, 30 Jun 2025 12:53:30 +0000 (14:53 +0200)] 
pid1: properly report if we managed to kill a process by cgroup

4 months agocore: add quota support for State, Cache, and Log exec directories (#35892)
Yu Watanabe [Tue, 8 Jul 2025 00:18:20 +0000 (09:18 +0900)] 
core: add quota support for State, Cache, and Log exec directories (#35892)

Based on https://github.com/systemd/systemd/issues/7820, this adds support for
quota enforcement to State, Cache, and Log exec directories.
* Add new directives, StateDirectoryQuota=, CacheDirectoryQuota=, and
  LogDirectoryQuota=, to define quotas as percentages (hard limits for
  blocks and inodes) or absolute values (hard limits for blocks only).
* Add new directives, StateDirectoryQuotaAccounting=,
  CacheDirectoryQuotaAccounting= and LogDirectoryQuotaAccounting= to keep
  track of storage quotas but not enforce them (effectively just assigning
  a project ID to defined exec directories).

Example:
```
StateDirectory=quotadir
StateDirectoryQuota=1%

Jan 06 22:55:46 abeltran: Storage quotas set for /var/lib/private/quotadir. Block limit = 2639404, inode limit = 671088

root@abeltran:/var/lib/private# lsattr -pR
3153000189 --------------e----P-- ./quotadir

root@abeltran:/var/lib/private# repquota  -P /datadrive
*** Report for project quotas on device /dev/sdc1
Block grace time: 7days; Inode grace time: 7days
                        Block limits                File limits
Project         used    soft    hard  grace    used  soft  hard  grace
----------------------------------------------------------------------
#0        --  213200       0       0           4086     0     0
#3153000189 -- 2639404       0 2639404              2     0 671088
```

4 months agobootspec: fix string table naming for BootEntryType/BootEntrySource (#38106)
Yu Watanabe [Tue, 8 Jul 2025 00:11:30 +0000 (09:11 +0900)] 
bootspec: fix string table naming for BootEntryType/BootEntrySource (#38106)

This was all very confusing and not matching our coding style
recommendations. Let's fix that.

Prompted by #37897, which really should make use of BootEntryType, but
we better clean it up first.

4 months agoman: also use title case in systemd.service(5)
Lennart Poettering [Mon, 7 Jul 2025 16:11:03 +0000 (18:11 +0200)] 
man: also use title case in systemd.service(5)

Follow-up for: 172dd81e92198d4903a52001e20f0da7f0b9d8b2

4 months agocore/cgroup: prepare for removal of tracking/bookkeeping logic specific to cgroup...
Yu Watanabe [Mon, 7 Jul 2025 23:37:01 +0000 (08:37 +0900)] 
core/cgroup: prepare for removal of tracking/bookkeeping logic specific to cgroup v1 (#38099)

4 months agotest: add test for quotas on Exec directories 35892/head
Andres Beltran [Mon, 16 Jun 2025 23:44:35 +0000 (23:44 +0000)] 
test: add test for quotas on Exec directories

4 months agoAdd quota support for systemctl
Andres Beltran [Tue, 1 Jul 2025 17:41:31 +0000 (17:41 +0000)] 
Add quota support for systemctl

4 months agoAdd quota support for DBus
Andres Beltran [Tue, 1 Jul 2025 17:40:47 +0000 (17:40 +0000)] 
Add quota support for DBus

4 months agocore: add quota support for State, Cache, and Log exec directories
Andres Beltran [Tue, 1 Jul 2025 17:37:48 +0000 (17:37 +0000)] 
core: add quota support for State, Cache, and Log exec directories

4 months agoshared: add exec-directory-util.ch
Andres Beltran [Tue, 1 Jul 2025 17:24:56 +0000 (17:24 +0000)] 
shared: add exec-directory-util.ch

4 months agoquota-util: add methods to read and set project IDs
Andres Beltran [Mon, 16 Jun 2025 23:39:25 +0000 (23:39 +0000)] 
quota-util: add methods to read and set project IDs

4 months agochattr-util: add helpers to read and set project IDs
Andres Beltran [Mon, 16 Jun 2025 23:38:25 +0000 (23:38 +0000)] 
chattr-util: add helpers to read and set project IDs

4 months agobootspec: boot_entry_source_to_json_string() to boot_entry_source_to_string() 38106/head
Lennart Poettering [Mon, 7 Jul 2025 16:26:59 +0000 (18:26 +0200)] 
bootspec: boot_entry_source_to_json_string() to boot_entry_source_to_string()

As with the previous changes for BootEntryType, let's also clean up the
naming for BootEntrySource.

4 months agobootspec: rename boot_entry_source_to_string() to boot_entry_source_description_to_st...
Lennart Poettering [Mon, 7 Jul 2025 16:25:22 +0000 (18:25 +0200)] 
bootspec: rename boot_entry_source_to_string() to boot_entry_source_description_to_string()

Similar to the previous changes, let's make clear this string table
contains *descriptive*, i.e. meaningful human-readable strings.

4 months agobootspec: rename BootEntryType values
Lennart Poettering [Mon, 7 Jul 2025 16:10:13 +0000 (18:10 +0200)] 
bootspec: rename BootEntryType values

So we exposed different names for the entry types in JSON than we named
our enum values. Which is very confusing. Let's unify that. Given that
the JSON fields are externally visible let's stick to that naming, even
though I think "unified" and "conf" would have been more descriptive.

This ensures we follow our usual logic that the enum identifiers and the
strings they map to use the same naming.

4 months agobootspec: include 'UKI' in descriptive name for type #2
Lennart Poettering [Mon, 7 Jul 2025 13:54:17 +0000 (15:54 +0200)] 
bootspec: include 'UKI' in descriptive name for type #2

I am pretty sure that "UKI" is the best known name for type #2 boot
loader spec entries, hence we really should put it in the name.

4 months agobootspec: rename boot_entry_type_to_string() to boot_entry_type_description_to_string()
Lennart Poettering [Mon, 7 Jul 2025 13:52:17 +0000 (15:52 +0200)] 
bootspec: rename boot_entry_type_to_string() to boot_entry_type_description_to_string()

This helper does not translate BootEntryType to a string matching the
enum's value names, but instead returns a human readable descriptive
string. Let's make it clearer what this, by including "description" in
the name.

4 months agoTODO: add future deprecation of DefaultMemoryMin/Low= 38099/head
Mike Yuan [Sun, 6 Jul 2025 10:41:29 +0000 (12:41 +0200)] 
TODO: add future deprecation of DefaultMemoryMin/Low=

4 months agocore/cgroup: unit_realize_cgroup_now_disable() is NOP for non-slice units
Mike Yuan [Sat, 5 Jul 2025 23:24:29 +0000 (01:24 +0200)] 
core/cgroup: unit_realize_cgroup_now_disable() is NOP for non-slice units

4 months agocore/cgroup: make unit_get_ancestor_disable_mask() static
Mike Yuan [Sat, 5 Jul 2025 22:18:40 +0000 (00:18 +0200)] 
core/cgroup: make unit_get_ancestor_disable_mask() static

4 months agocore/cgroup: tweak unit_invalidate_cgroup_bpf() a bit
Mike Yuan [Tue, 27 May 2025 23:02:04 +0000 (01:02 +0200)] 
core/cgroup: tweak unit_invalidate_cgroup_bpf() a bit

- Rename to unit_invalidate_cgroup_bpf_firewall() to make it clear
  that this is about CGROUP_CONTROLLER_BPF_FIREWALL only
- Report whether things changed in unit_invalidate_cgroup()
  to avoid duplicate checks

4 months agocore/cgroup: dial down "controller" noise
Mike Yuan [Sun, 6 Jul 2025 00:04:10 +0000 (02:04 +0200)] 
core/cgroup: dial down "controller" noise

Add some missing assertions while at it.

4 months agocore/cgroup: workaround for kernel < 5.4 is now irrelevant
Mike Yuan [Sat, 5 Jul 2025 23:57:51 +0000 (01:57 +0200)] 
core/cgroup: workaround for kernel < 5.4 is now irrelevant

4 months agocore/cgroup: remove any reference to cgv1 controllers
Mike Yuan [Sat, 5 Jul 2025 21:50:48 +0000 (23:50 +0200)] 
core/cgroup: remove any reference to cgv1 controllers

4 months agocore/cgroup: regroup functions
Mike Yuan [Sat, 5 Jul 2025 23:54:45 +0000 (01:54 +0200)] 
core/cgroup: regroup functions

4 months agocore/cgroup: drop unneeded cast
Mike Yuan [Sat, 5 Jul 2025 23:46:59 +0000 (01:46 +0200)] 
core/cgroup: drop unneeded cast

4 months agocore/cgroup: introduce cgroup_context_has_device_policy() helper
Mike Yuan [Sat, 5 Jul 2025 21:47:06 +0000 (23:47 +0200)] 
core/cgroup: introduce cgroup_context_has_device_policy() helper

4 months agocore/cgroup: drop dangling cgroup_context_copy() prototype
Mike Yuan [Sat, 5 Jul 2025 21:39:46 +0000 (23:39 +0200)] 
core/cgroup: drop dangling cgroup_context_copy() prototype

Follow-up for 8c35e8a9d2b0c26453108d51873991af7ec7dfe1

4 months agocore/cgroup: constify CGROUP_TASKS_MAX_UNSET
Mike Yuan [Sat, 5 Jul 2025 21:27:54 +0000 (23:27 +0200)] 
core/cgroup: constify CGROUP_TASKS_MAX_UNSET

4 months agoman/supported-controllers: refresh list
Mike Yuan [Sun, 6 Jul 2025 00:40:13 +0000 (02:40 +0200)] 
man/supported-controllers: refresh list

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.