]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 months agoprocess-util: slightly update comment in freeze() 35975/head
Lennart Poettering [Wed, 15 Jan 2025 16:24:14 +0000 (17:24 +0100)] 
process-util: slightly update comment in freeze()

9 months agoprocess-util: port pid_from_same_root_fs() to pidref, and port three places over...
Lennart Poettering [Mon, 13 Jan 2025 10:09:49 +0000 (11:09 +0100)] 
process-util: port pid_from_same_root_fs() to pidref, and port three places over to it

9 months agotest-process-util: don't run rest of test suite in forked off child
Lennart Poettering [Mon, 13 Jan 2025 10:10:09 +0000 (11:10 +0100)] 
test-process-util: don't run rest of test suite in forked off child

We left the test suite running in the child after forking off a
temporary child for testing. That's bad. fix it.

9 months agoprocess-util: introduce new FORK_FREEZE flag for safe_fork()
Lennart Poettering [Mon, 13 Jan 2025 10:04:19 +0000 (11:04 +0100)] 
process-util: introduce new FORK_FREEZE flag for safe_fork()

Often we want to fork off a process that just hangs until we kill it,
let's add a simple flag to create one of this type, and use it at
various places.

9 months agopidref: various shortcuts to pidref_equal()
Lennart Poettering [Mon, 13 Jan 2025 10:06:27 +0000 (11:06 +0100)] 
pidref: various shortcuts to pidref_equal()

This adds some shortcuts to pidref_equal(), so that we don't have to
query the pidfs id if there's no need.

9 months agotree-wide: drop support for kernels without pidfd_open() and pidfd_send_signal()...
Lennart Poettering [Thu, 16 Jan 2025 10:37:17 +0000 (11:37 +0100)] 
tree-wide: drop support for kernels without pidfd_open() and pidfd_send_signal() (#35971)

9 months agonamespace-util: don't reset UID/GIDs in namespace_enter() unless we enter a userns
Lennart Poettering [Wed, 15 Jan 2025 22:18:39 +0000 (23:18 +0100)] 
namespace-util: don't reset UID/GIDs in namespace_enter() unless we enter a userns

The reset of UID/GID only really makes sense if we enter a userns, hence
let#s restrict it to that.

9 months agoshared/bus-util: add missing `set.h` include
Jan Macku [Wed, 15 Jan 2025 14:06:46 +0000 (15:06 +0100)] 
shared/bus-util: add missing `set.h` include

```
In file included from ../src/shared/bus-get-properties.c:4:
../src/shared/bus-message-util.h:22:60: error: unknown type name ‘Set’
   22 | int bus_message_append_string_set(sd_bus_message *m, const Set *s);
      |                                                            ^~~
../src/shared/bus-get-properties.c: In function ‘bus_property_get_string_set’:
../src/shared/bus-get-properties.c:178:9: error: unknown type name ‘Set’
  178 |         Set **s = ASSERT_PTR(userdata);
      |         ^~~
```

follow-up to https://github.com/systemd/systemd/commit/91080bc9733b5b2478bfc0ed58f6a7ae5da7e639

9 months agoshell-completions: add systemctl sleep
Duncan Overbruck [Thu, 16 Jan 2025 02:51:52 +0000 (03:51 +0100)] 
shell-completions: add systemctl sleep

9 months agomeson: enable -Wzero-as-null-pointer-constant (#36028)
Lennart Poettering [Thu, 16 Jan 2025 06:48:21 +0000 (07:48 +0100)] 
meson: enable -Wzero-as-null-pointer-constant (#36028)

Support for C added in gcc 15:

https://github.com/gcc-mirror/gcc/commit/236c0829ee21a179c81b83f0d7f112ca23c47a4d

9 months agopid1: add GracefulOptions= setting to .mount units (#36023)
Lennart Poettering [Thu, 16 Jan 2025 06:47:08 +0000 (07:47 +0100)] 
pid1: add GracefulOptions= setting to .mount units (#36023)

This new setting can be used to specify mount options that shall only be
added to the mount option string if the kernel supports them.

This shall be used for adding "usrquota" to tmp.mount without breaking
compat, but is generally be useful.

9 months agomeson: enable -Wzero-as-null-pointer-constant 36028/head
Mike Yuan [Wed, 15 Jan 2025 17:41:51 +0000 (18:41 +0100)] 
meson: enable -Wzero-as-null-pointer-constant

Support for C added in gcc 15:
https://github.com/gcc-mirror/gcc/commit/236c0829ee21a179c81b83f0d7f112ca23c47a4d

9 months agotree-wide: remove unnecessary gcc >= 7 version check
Mike Yuan [Wed, 15 Jan 2025 18:16:06 +0000 (19:16 +0100)] 
tree-wide: remove unnecessary gcc >= 7 version check

Our baseline is gcc 8.4.

9 months agoRevert "OBS: build Fedora/Debian/Ubuntu x86_64 packages on PRs"
Luca Boccassi [Thu, 16 Jan 2025 00:42:23 +0000 (00:42 +0000)] 
Revert "OBS: build Fedora/Debian/Ubuntu x86_64 packages on PRs"

This does not work yet, as we configure multiple git sources,
and the workflow service gets confused. We need to update one
(the actual code repo) and leave the recipe repos intact, but
this is not supported right now.

This reverts commit 01f05f0087204914e489057baf12317815325956.

9 months agoOBS: build Fedora/Debian/Ubuntu x86_64 packages on PRs
Luca Boccassi [Wed, 15 Jan 2025 23:45:32 +0000 (23:45 +0000)] 
OBS: build Fedora/Debian/Ubuntu x86_64 packages on PRs

Start with a subset of what is built from main, can be expanded as
needed

9 months agolog: check isempty for object_field and extra_field
hanjinpeng [Tue, 14 Jan 2025 17:10:06 +0000 (01:10 +0800)] 
log: check isempty for object_field and extra_field

9 months agopty_open_peer() follow-up (#36027)
Lennart Poettering [Wed, 15 Jan 2025 20:05:59 +0000 (21:05 +0100)] 
pty_open_peer() follow-up (#36027)

9 months agopid1: add GracefulOptions= setting to .mount units 36023/head
Lennart Poettering [Tue, 14 Jan 2025 15:49:52 +0000 (16:49 +0100)] 
pid1: add GracefulOptions= setting to .mount units

This new setting can be used to specify mount options that shall only be
added to the mount option string if the kernel supports them.

This shall be used for adding "usrquota" to tmp.mount without breaking compat,
but is generally be useful.

9 months agopam-systemd: introduce "user-light" session type, and make "background-light" the...
Lennart Poettering [Wed, 15 Jan 2025 19:55:01 +0000 (20:55 +0100)] 
pam-systemd: introduce "user-light" session type, and make "background-light" the default for system users (#35987)

This implements one idea from #34988: default to "user-light" and
"background-light" for system users, so that the service manager is only
pulled in for sessions that likely need them, i.e. not cron jobs or ftp
logins.

This is a compat break to some degree, but I think a worthy one. I
updated the NEWS file to explain this.

9 months agorandom-util: fix compilation error
Yu Watanabe [Wed, 15 Jan 2025 16:29:04 +0000 (01:29 +0900)] 
random-util: fix compilation error

Fixes the following error:
```
../src/basic/random-util.c: In function "fallback_random_bytes":
../src/basic/random-util.c:45:26: error: initializer-string for array of "char" is too long [-Werror=unterminated-string-initialization]
   45 |                 .label = "systemd fallback random bytes v1",
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

9 months agouserdb: optionally parse numeric UIDs/GIDs where a username is expected
Lennart Poettering [Tue, 14 Jan 2025 17:28:27 +0000 (18:28 +0100)] 
userdb: optionally parse numeric UIDs/GIDs where a username is expected

Let's move this logic from userdbctl into generic code so that we can
use it elsewhere.

9 months agoanalyze: fix assignment of object_field
Yu Watanabe [Wed, 15 Jan 2025 15:13:19 +0000 (00:13 +0900)] 
analyze: fix assignment of object_field

Prompted by #36000.

9 months agocurl-util: use curl_getdate instead of implementing http spec
jane400 [Wed, 15 Jan 2025 00:24:20 +0000 (01:24 +0100)] 
curl-util: use curl_getdate instead of implementing http spec

Available since curl 7.1, which is less than the version required in
meson.build

https://curl.se/libcurl/c/curl_getdate.html

9 months agoterminal-util: drop unused open_terminal_in_namespace() 36027/head
Mike Yuan [Wed, 15 Jan 2025 16:34:11 +0000 (17:34 +0100)] 
terminal-util: drop unused open_terminal_in_namespace()

With our baseline including TIOCGPTPEER we now systematically
open pty peer through ioctl(), i.e. this sits unused
since 1d522f1a866f911980b5eaad87182bf58c58fa32. Kill it!

9 months agorun: with TIOCGPTPEER there's no longer need to acquire pty peer through IPC
Mike Yuan [Wed, 15 Jan 2025 16:27:25 +0000 (17:27 +0100)] 
run: with TIOCGPTPEER there's no longer need to acquire pty peer through IPC

9 months agorun: correct log level for pty_open_peer() error
Mike Yuan [Wed, 15 Jan 2025 16:21:54 +0000 (17:21 +0100)] 
run: correct log level for pty_open_peer() error

Everything around it logs loudly.

9 months agologind: improve log message we generate when a user logs in 35987/head
Lennart Poettering [Tue, 14 Jan 2025 11:10:49 +0000 (12:10 +0100)] 
logind: improve log message we generate when a user logs in

Mention the session type and class both in the human readable string and
in the structured log.

9 months agorun0: allow explicit control of service manager activation for run0 sessions
Lennart Poettering [Tue, 14 Jan 2025 10:50:52 +0000 (11:50 +0100)] 
run0: allow explicit control of service manager activation for run0 sessions

This adds a new --lightweight=yes/no switch which allows controlling
whether the invoked service will have the service manager around or not.

Moreover, this changes that if the target user is root it will now
support to the lightweight mode, i.e. run0 towards root will no longer
pull in the service manager (a real tty login via getty still will
though!).

My thinking here is that quickly raising privileges via run0 probably
shouldn't be considered a proper login but just something short lived,
temporary for a single command or similar.

9 months agorun: fire sd_notify("READY=1") when in service mode and the unit is properly started
Lennart Poettering [Tue, 14 Jan 2025 10:48:52 +0000 (11:48 +0100)] 
run: fire sd_notify("READY=1") when in service mode and the unit is properly started

Let's make sure systemd-run itself works nicely as a service that tells
the caller when it is ready.

Note that we don't fire the same message in scope mode, since in that
case want to leave sd_notify() handling to the invoked process.

9 months agologind: introduce "user-light" session class
Lennart Poettering [Fri, 10 Jan 2025 08:32:18 +0000 (09:32 +0100)] 
logind: introduce "user-light" session class

This new session class is to "user" what "background" is to
"background-light": it doesn't cause the per-user service manager to
start.

This new session class is now the default if no session class was
provided at session registration time and the following conditions hold:

1. The session is not graphical
2. The user is not a regular user (but not root)

Or in other words root and system users won't get a service manager
started automatically if they go through a PAM session as part of things
like cron or ftp. They will however still get one if they log in
graphically.

This changes behaviour a bit, but hopefully in OK was.

This also makes "background-light" for system users incl. root.

This addresses one of the ideas discussed in #34988.

9 months agologind: introduce macro for the last session class condition check
Lennart Poettering [Fri, 10 Jan 2025 08:39:05 +0000 (09:39 +0100)] 
logind: introduce macro for the last session class condition check

For all checks regarding the properties of sessoin classes we have
SESSION_CLASS_CAN_XYZ() style macros. Except for one. Convert that one
too.

9 months agopam-systemd: downgrade log message we handle gracefully to LOG_WARNING as per coding...
Lennart Poettering [Fri, 10 Jan 2025 10:34:58 +0000 (11:34 +0100)] 
pam-systemd: downgrade log message we handle gracefully to LOG_WARNING as per coding style

9 months agomkosi: disable multipathd by default
Yu Watanabe [Wed, 15 Jan 2025 11:34:30 +0000 (20:34 +0900)] 
mkosi: disable multipathd by default

Hopefully fixes #36008.

9 months agologind: register PAM sessions via Varlink instead of D-Bus (#35264)
Lennart Poettering [Wed, 15 Jan 2025 15:53:43 +0000 (16:53 +0100)] 
logind: register PAM sessions via Varlink instead of D-Bus (#35264)

This makes things a bit faster (because it cuts down a bit on
roundtrips) and prepares ground so that one day we can let logind run in
earlier boot already, making it a bit less special.

communication between logind and pid1 is still dbus only, hence there's
a lot of room for further improvement I guess.

9 months agoefivars: deal with uncommitted efi variables
wrvsrx [Sat, 7 Dec 2024 02:32:15 +0000 (10:32 +0800)] 
efivars: deal with uncommitted efi variables

Unfortunately kernel reports EOF if there's an inconsistency between efivarfs var list
and what's actually stored in firmware, c.f. #34304. A zero size env var is not allowed in
efi and hence the variable doesn't really exist in the backing store as long as it is zero
sized, and the kernel calls this "uncommitted". Hence we translate EOF back to ENOENT here,
as with kernel behavior before
https://github.com/torvalds/linux/commit/3fab70c165795431f00ddf9be8b84ddd07bd1f8f

If the kernel changes behaviour (to flush dentries on resume), we can drop
this at some point in the future. But note that the commit is 11
years old at this point so we'll need to deal with the current behaviour for
a long time.

Fix #34304.

9 months agomachine: introduce io.systemd.MachineImage.SetPoolLimit (#35953)
Lennart Poettering [Wed, 15 Jan 2025 15:52:24 +0000 (16:52 +0100)] 
machine: introduce io.systemd.MachineImage.SetPoolLimit (#35953)

This PR introduces io.systemd.MachineImage.SetPoolLimit method which is
alternative to DBus's SetPoolLimit.

This is last function for org.freedesktop.machine1 Dbus interface

9 months agonspawn: trivial scope reduction
Lennart Poettering [Wed, 15 Jan 2025 10:48:28 +0000 (11:48 +0100)] 
nspawn: trivial scope reduction

9 months agotools/fetch-distro: support the case where the sources are in a subdirectory
Antonio Alvarez Feijoo [Wed, 15 Jan 2025 11:01:22 +0000 (12:01 +0100)] 
tools/fetch-distro: support the case where the sources are in a subdirectory

If the GIT_SUBDIR environment variable is set, do not checkout the full sources
of the git repository, but perform a sparse checkout of the directory containing
the package. In this case, check only the commit history in this subdirectory.

9 months agoci: Stop archiving packages
Daan De Meyer [Wed, 15 Jan 2025 11:58:36 +0000 (12:58 +0100)] 
ci: Stop archiving packages

This takes up a lot of storage space and we're almost hitting the
limit so since nobody's actually using these and we just started
doing nightly builds in OBS, let's drop this and point people towards
OBS for nightly packages in the future.

9 months agoptyfwd: fix wrong userdata passed to PTY forwarding
Yu Watanabe [Wed, 15 Jan 2025 10:23:49 +0000 (19:23 +0900)] 
ptyfwd: fix wrong userdata passed to PTY forwarding

Fixes #35942.

9 months agostring-util: make strjoin() just a special case of strextend() (#36011)
Lennart Poettering [Wed, 15 Jan 2025 12:25:08 +0000 (13:25 +0100)] 
string-util: make strjoin() just a special case of strextend() (#36011)

This is split out of #36010, but makes a ton of sense on its own.

9 months agouser-record-show: use word 'show' not 'dump' for helper call
Lennart Poettering [Tue, 14 Jan 2025 14:48:00 +0000 (15:48 +0100)] 
user-record-show: use word 'show' not 'dump' for helper call

The key functions and the file itself use the word "to show" here, this
helper should really stick to that nomenclature.

9 months agomissing: add quotactl_fd() wrapper
Lennart Poettering [Fri, 10 Jan 2025 10:33:03 +0000 (11:33 +0100)] 
missing: add quotactl_fd() wrapper

9 months agobus-wait-for-jobs: fix table of service result codes (#35992)
Lennart Poettering [Wed, 15 Jan 2025 11:50:32 +0000 (12:50 +0100)] 
bus-wait-for-jobs: fix table of service result codes (#35992)

9 months agopam-systemd: talk to logind via varlink 35264/head
Lennart Poettering [Mon, 18 Nov 2024 10:25:20 +0000 (11:25 +0100)] 
pam-systemd: talk to logind via varlink

This makes sure we now use Varlink per default as transport for
allocating sessions.

This reduces the time it takes to do one run0 cycle by roughly ~10% on my
completely synthetic test setup (assuming the target user's service
manager is already started)

The D-Bus codepaths are kept in place for two reasons:
* To make upgrades easy
* If the user actually sets resource properties on the PAM session we
  fall back to the D-Bus codepaths, as we currently have no way to
  encode the scope properties in JSON, this is only supported for D-Bus
  serialization.

The latter should be revisited once it is possible to allocate a scope
unit from PID1 via varlink.

9 months agologind: add basic Varlink API
Lennart Poettering [Tue, 19 Nov 2024 21:21:47 +0000 (22:21 +0100)] 
logind: add basic Varlink API

For now this only covers CreateSession() and ReleaseSession(), i.e. the
two operations pam_systemd cares about.

9 months agomachine: tests for io.systemd.MachineImage.SetPoolLimit 35953/head
Ivan Kruglov [Thu, 9 Jan 2025 15:24:32 +0000 (16:24 +0100)] 
machine: tests for io.systemd.MachineImage.SetPoolLimit

9 months agomachine: introduce io.systemd.MachineImage.SetPoolLimit
Ivan Kruglov [Thu, 9 Jan 2025 15:02:19 +0000 (16:02 +0100)] 
machine: introduce io.systemd.MachineImage.SetPoolLimit

9 months agomachine: use image_set_pool_limit() in dbus
Ivan Kruglov [Fri, 10 Jan 2025 11:21:03 +0000 (12:21 +0100)] 
machine: use image_set_pool_limit() in dbus

9 months agoshared: image_set_pool_limit()
Ivan Kruglov [Fri, 10 Jan 2025 11:20:50 +0000 (12:20 +0100)] 
shared: image_set_pool_limit()

9 months agotest: Drop sandbox() from integration test wrapper (#36009)
Daan De Meyer [Wed, 15 Jan 2025 10:32:34 +0000 (11:32 +0100)] 
test: Drop sandbox() from integration test wrapper (#36009)

With the latest changes, this is not required anymore as mkosi sandbox
will set up the proper $PATH to make sure the executables from the build
directory are used.

9 months agostring-util: add a mechanism for strextend_with_separator() for specifying "ignore... 36011/head
Lennart Poettering [Wed, 15 Jan 2025 08:32:44 +0000 (09:32 +0100)] 
string-util: add a mechanism for strextend_with_separator() for specifying "ignore" arguments

in strv_new() we have STRV_IGNORE for skipping over an argument in the
argument list. Let's add the same to strextend_with_separator():

strextend_with_separator(&x, "foo", POINTER_MAX, "bar");

will result in "foobar" being appended to "x". (POINTER_MAX Which is
different from NULL, which terminates the argument list).

This is useful for ternary op situations.

(We should probably get rid of STRV_IGNORE and just use POINTER_MAX
everywhere directly, but that's for another time.)

9 months agostring-util: make strjoin() just a special case of strextend()
Lennart Poettering [Wed, 15 Jan 2025 08:31:35 +0000 (09:31 +0100)] 
string-util: make strjoin() just a special case of strextend()

The functions are very similar, let's make them the same. If the first
argument to strextend() is NULL instead of extending a string we'll
allocate a fresh one and return that.

9 months agoudev: several trivial fixlets (#36005)
Daan De Meyer [Wed, 15 Jan 2025 09:50:11 +0000 (10:50 +0100)] 
udev: several trivial fixlets (#36005)

split out of #35968.

9 months agomeson: add udev/hwdb build aliases
Luca Boccassi [Tue, 14 Jan 2025 23:22:04 +0000 (23:22 +0000)] 
meson: add udev/hwdb build aliases

Allows to do:

meson compile libudev udev hwdb
meson install --no-rebuild --tags libudev,udev,hwdb

9 months agoman: also fix documentation of start-limit-hit 35992/head
Lennart Poettering [Tue, 14 Jan 2025 13:04:52 +0000 (14:04 +0100)] 
man: also fix documentation of start-limit-hit

9 months agobus-wait-for-jobs: fix service result table
Lennart Poettering [Tue, 14 Jan 2025 12:56:58 +0000 (13:56 +0100)] 
bus-wait-for-jobs: fix service result table

We were missing one service result (oom-kill), and the ratelimit one is
called differently. Correct that so that we generate proper log messages
for these cases.

9 months agoterminal-util: drop support for pre-TIOCGPTPEER kernels
Lennart Poettering [Tue, 14 Jan 2025 11:05:05 +0000 (12:05 +0100)] 
terminal-util: drop support for pre-TIOCGPTPEER kernels

Our minimum baseline is now far beyond 4.13, hence let's drop these
fallback paths.

9 months agoupdate TODO
Lennart Poettering [Wed, 15 Jan 2025 09:37:11 +0000 (10:37 +0100)] 
update TODO

9 months agosysusers: emit audit events for user and group creation (#35957)
Zbigniew Jędrzejewski-Szmek [Wed, 15 Jan 2025 09:36:07 +0000 (10:36 +0100)] 
sysusers: emit audit events for user and group creation (#35957)

Background: Fedora/RHEL are switching to sysusers.d metadata for
creation of users and groups for system users defined by packages
(https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers).
Packages carry sysusers files. During package installation, rpm calls an
program to execute on this config. This program may either be
/usr/lib/rpm/sysusers.sh which calls useradd/groupadd, or
/usr/bin/systemd-sysusers. To match the functionality provided by
useradd/groupadd from the shadow-utils project, systemd-sysusers must
emit audit events so that it provides a drop-in replacement.

systemd-sysuers will emit audit events AUDIT_ADD_USER/AUDIT_ADD_GROUP
when adding users and groups. The operation "names" are copied from
shadow-utils, so the format of the events that is generated on success
should be identical. On failure, things are more complicated. We write
the whole file at once, once, so we first generate "success" messages
for each entry, then we try to write the files, and if things fail, we
generate failure messages to all entries that we failed to write.

9 months agocore: use shared audit-fd wrappers 35957/head
Zbigniew Jędrzejewski-Szmek [Tue, 14 Jan 2025 14:45:07 +0000 (15:45 +0100)] 
core: use shared audit-fd wrappers

Two funcs are renamed to avoid naming conflict with the common
helper.

9 months agosysusers: emit audit events for user and group creation
Zbigniew Jędrzejewski-Szmek [Fri, 10 Jan 2025 14:35:13 +0000 (15:35 +0100)] 
sysusers: emit audit events for user and group creation

Background: Fedora/RHEL are switching to sysusers.d metadata for creation of
users and groups for system users defined by packages
(https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers).
Packages carry sysusers files. During package installation, rpm calls an
program to execute on this config. This program may either be
/usr/lib/rpm/sysusers.sh which calls useradd/groupadd, or
/usr/bin/systemd-sysusers. To match the functionality provided by
useradd/groupadd from the shadow-utils project, systemd-sysusers must emit
audit events so that it provides a drop-in replacement.

systemd-sysuers will emit audit events AUDIT_ADD_USER/AUDIT_ADD_GROUP when
adding users and groups. The operation "names" are copied from shadow-utils in
Fedora (which has a patch to change them from the upstream version), so the
format of the events that is generated on success should be identical.

The helper code is shared between sysusers and utmp-wtmp. I changed the
audit_fd variable to be unconditional. This way we can avoid ugly iffdefery
every time the variable would be used. The cost is that 4 bytes of unused
storage might be present. This is negligible, and the compiler might even be
able to optimize that away if it inlines things.

9 months agotest: Drop sandbox() from integration test wrapper 36009/head
Daan De Meyer [Wed, 15 Jan 2025 09:21:33 +0000 (10:21 +0100)] 
test: Drop sandbox() from integration test wrapper

With the latest changes, this is not required anymore as mkosi sandbox
will set up the proper $PATH to make sure the executables from the build
directory are used.

9 months agomkosi: Update to latest
Daan De Meyer [Wed, 15 Jan 2025 09:21:12 +0000 (10:21 +0100)] 
mkosi: Update to latest

9 months agoFollow-ups for recent namespace PRs (#35923)
Yu Watanabe [Wed, 15 Jan 2025 05:10:21 +0000 (14:10 +0900)] 
Follow-ups for recent namespace PRs (#35923)

9 months agoconfidential-virt: add detection for aarch64 CCA
Jeremy Linton [Fri, 10 Jan 2025 03:24:07 +0000 (21:24 -0600)] 
confidential-virt: add detection for aarch64 CCA

The arm confidential compute architecture (CCA) provides a platform design for
confidential VMs running in a new realm context.

This can be detected by the existence of a platform device exported for the
arm-cca-guest driver, which provides attestation services via the realm
services interface (RSI) to the Realm Management Monitor (RMM).

Like the other methods systemd uses to detect Confidential VM's, checking
the sysfs entry suggests that this is a confidential VM and should only be
used for informative purposes, or to trigger further attestation.

Like the s390 detection logic, the sysfs path being checked is not labeled
as ABI, and may change in the future. It was chosen because its
directly tied to the kernel's detection of the realm service interface rather
to the Trusted Security Module (TSM) which is what is being triggered by the
device entry. The TSM module has a provider string of 'arm-cca-guest' which
could also be used, but that (IMHO) doesn't currently provide any additional
benefit except that it can fail of the module isn't loaded.

More information can be found here:
https://developer.arm.com/documentation/den0125/0300

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
9 months agoudev-rules: do not change maximum log level when running in test mode 36005/head
Yu Watanabe [Fri, 10 Jan 2025 21:07:55 +0000 (06:07 +0900)] 
udev-rules: do not change maximum log level when running in test mode

When udev rules are being tested, log level specified by SYSTEMD_LOG_LEVEL=
environment variable should be honored, and should not be overridden by
the rules.

9 months agoudev-rules: replace 'type *func()' -> 'type* func()'
Yu Watanabe [Fri, 10 Jan 2025 18:57:34 +0000 (03:57 +0900)] 
udev-rules: replace 'type *func()' -> 'type* func()'

9 months agoudevadm-test: add missing oom check
Yu Watanabe [Fri, 10 Jan 2025 20:27:44 +0000 (05:27 +0900)] 
udevadm-test: add missing oom check

9 months agoupdate TODO
Lennart Poettering [Tue, 14 Jan 2025 23:16:14 +0000 (00:16 +0100)] 
update TODO

9 months agoman: Clarify systemd-notify and sd_notify() PID documentation
Daan De Meyer [Tue, 14 Jan 2025 15:05:33 +0000 (16:05 +0100)] 
man: Clarify systemd-notify and sd_notify() PID documentation

Let's clarify more explicitly that privileged calls to
systemd-notify --pid= and sd_pid_notify() effectively override any
configured NotifyAccess=main|exec for a service.

9 months agomkosi: Install libxslt on CentOS/Fedora instead of xsltproc
Daan De Meyer [Tue, 14 Jan 2025 12:53:26 +0000 (13:53 +0100)] 
mkosi: Install libxslt on CentOS/Fedora instead of xsltproc

Same package, but xsltproc is a very recently introduced Provides
for libxslt, and isn't available on CentOS Stream 9, so let's install
the package directly instead.

9 months agoNEWS: mention mesg y/n
Lennart Poettering [Tue, 14 Jan 2025 09:03:24 +0000 (10:03 +0100)] 
NEWS: mention mesg y/n

9 months agodocs: fix markup (#35995)
Silvio Knizek [Tue, 14 Jan 2025 14:19:56 +0000 (15:19 +0100)] 
docs: fix markup (#35995)

9 months agooomd: support reloading configuration at runtime
Sea-Eun Lee [Mon, 18 Nov 2024 19:13:40 +0000 (19:13 +0000)] 
oomd: support reloading configuration at runtime

9 months agocore: serialize API bus id and validate before deserializing bus tracks, plus several...
Lennart Poettering [Tue, 14 Jan 2025 13:39:58 +0000 (14:39 +0100)] 
core: serialize API bus id and validate before deserializing bus tracks, plus several other bus util cleanups (#35970)

Follow-up for #35406

9 months agosysusers: some tweaks, mostly around chase() use (#35976)
Lennart Poettering [Tue, 14 Jan 2025 13:38:32 +0000 (14:38 +0100)] 
sysusers: some tweaks, mostly around chase() use (#35976)

9 months agoupdate TODO
Lennart Poettering [Tue, 14 Jan 2025 12:55:46 +0000 (13:55 +0100)] 
update TODO

9 months agoUpdate packaging specs (#35980)
Daan De Meyer [Tue, 14 Jan 2025 11:24:49 +0000 (12:24 +0100)] 
Update packaging specs (#35980)

9 months agofmf: Only move logs if corresponding directory exists
Daan De Meyer [Tue, 14 Jan 2025 10:41:17 +0000 (11:41 +0100)] 
fmf: Only move logs if corresponding directory exists

Otherwise find fails with an error.

9 months agodissect: Use COPY_MERGE
Daan De Meyer [Fri, 10 Jan 2025 14:53:59 +0000 (15:53 +0100)] 
dissect: Use COPY_MERGE

When copying a directory from or to an image, let's always merge
with existing directories instead of failing with "File Exists".

Fixes https://github.com/systemd/mkosi/issues/3342.

9 months agomkosi: update fedora commit reference 35980/head
Daan De Meyer [Mon, 13 Jan 2025 15:18:33 +0000 (16:18 +0100)] 
mkosi: update fedora commit reference

fd36e4c562 Rebuilt for the bin-sbin merge (2nd attempt)
cddeca136f Rebuilt for the bin-sbin merge (2nd attempt)
20cc578e59 Enable signing systemd-boot on OBS builds
b1bd57ecce Revert use of PrivateTmp=disconnected
30f50b1870 Drop patch numbers
1814bfe794 remove STI test
3a9c32b8a9 Version 257.2
4df2711a9f Add bcond for OBS-specific quirks
e570cd53df spec: drop trailing whitespace
c7379c9460 Replace 'udevadm hwdb' with systemd-hwdb
3386f5d704 Rename source .abignore file
fd860fd12d Drop a build dependency on a linter package: pytest-flakes
133ae30e33 Drop patches based on %upstream macro instead of patch number
e157552c6c Always build in release mode
fc47a92e4a Re-enable upstream behaviour of systemd-tmpfiles --purge
62abb21906 Version 257.1
35e6814ef4 Add patch for test-time-util
bd8339bf00 sysusers: support new ! line flag for creating fully locked accounts
c2f5f4a68a Version 257
31aaef8e17 Enable slow tests during build

9 months agomkosi: update arch commit reference
Daan De Meyer [Mon, 13 Jan 2025 15:11:07 +0000 (16:11 +0100)] 
mkosi: update arch commit reference

8160e63e52 Limit logic required for building locally
3a62443e41 OBS build: add support for xz and zst compression formats
9667464ad7 Get rid of _tag variable
73dc492b5e upgpkg: 257.2-2: rebuild with changes for service restart
6b7355b5bb do not restart any templated units
332718f955 exclude vmspawn units from restart as well
5a749a6716 exclude systemd-nspawn@* services from restart
8a10796f8b upgpkg: 257.2-1: new upstream release
16294a0b44 Add support for building from git in OBS
38b664eed4 upgpkg: 257.1-1: new upstream release
e26158dda9 upgpkg: 257-1: new upstream release
c984b75c3f restart services after upgrade...
27fae2c192 upgpkg: 256.9-1: new upstream release
1afdd08a60 upgpkg: 256.8-2: apply: shutdown: close DM block device before issuing DM_DEV_REMOVE ioctl

9 months agoci: Skip coverage workflow on forks
Daan De Meyer [Sat, 11 Jan 2025 09:52:26 +0000 (10:52 +0100)] 
ci: Skip coverage workflow on forks

Fixes #35964

9 months agolsm: improve logging about absence of lsm-bpf
Lennart Poettering [Mon, 13 Jan 2025 21:48:26 +0000 (22:48 +0100)] 
lsm: improve logging about absence of lsm-bpf

In containers securityfs is typically not mounted. Our lsm-bpf code
so far detected this situation and claimed the kernel was lacking
lsm-bpf support. Which isn't quite true though, it might very well
support it. This made boots of systemd in systemd-nspawn a bit ugly,
because of the misleading log message at boot.

Let's improve things, and make clearer what is going on.

9 months agotest: Only move journal file if we didn't just unlink it
Daan De Meyer [Tue, 14 Jan 2025 08:52:40 +0000 (09:52 +0100)] 
test: Only move journal file if we didn't just unlink it

9 months agocore/manager: restore bus track deserialization cleanup in manager_reload() 35970/head
Mike Yuan [Mon, 13 Jan 2025 16:30:51 +0000 (17:30 +0100)] 
core/manager: restore bus track deserialization cleanup in manager_reload()

There's zero explanation why it got (spuriously) removed in
8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98...

9 months agoupdate-done: remove spurious trailing whitespace from MESSAGE.
Aman Verma [Mon, 13 Jan 2025 18:03:58 +0000 (12:03 -0600)] 
update-done: remove spurious trailing whitespace from MESSAGE.

9 months agocore: serialize API bus id and validate before deserializing bus tracks
Mike Yuan [Mon, 13 Jan 2025 16:06:35 +0000 (17:06 +0100)] 
core: serialize API bus id and validate before deserializing bus tracks

9 months agobus-util: introduce bus_get_instance_id()
Mike Yuan [Mon, 13 Jan 2025 15:42:34 +0000 (16:42 +0100)] 
bus-util: introduce bus_get_instance_id()

9 months agocore/manager: drop duplicate bus track deserialization
Mike Yuan [Sat, 11 Jan 2025 17:38:49 +0000 (18:38 +0100)] 
core/manager: drop duplicate bus track deserialization

bus_init_api() now does this internally
(after 8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98).

9 months agocore/manager: use FOREACH_ARRAY at one more place
Mike Yuan [Mon, 13 Jan 2025 16:06:21 +0000 (17:06 +0100)] 
core/manager: use FOREACH_ARRAY at one more place

9 months agobus-util: do not reset the count returned by sd_bus_track_count_name()
Mike Yuan [Sat, 11 Jan 2025 15:26:55 +0000 (16:26 +0100)] 
bus-util: do not reset the count returned by sd_bus_track_count_name()

Follow-up for 8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98

While at it, turn the retval check for sd_bus_track_count_name()
into assertion, given we're working with already established tracks
(service_name_is_valid() should never yield false in this case).

Addresses https://github.com/systemd/systemd/pull/35406#discussion_r1912066774

9 months agoshared/serialize: introduce serialize_id128()
Mike Yuan [Mon, 13 Jan 2025 15:35:58 +0000 (16:35 +0100)] 
shared/serialize: introduce serialize_id128()

9 months agoshared/serialize: make input params const
Mike Yuan [Mon, 13 Jan 2025 15:35:13 +0000 (16:35 +0100)] 
shared/serialize: make input params const

9 months agoshared/bus-util: move string set append/get funcs to bus-message-util and bus-get...
Mike Yuan [Sat, 11 Jan 2025 17:04:37 +0000 (18:04 +0100)] 
shared/bus-util: move string set append/get funcs to bus-message-util and bus-get-properties, respectively

9 months agoshared/bus-util: move bus_message_hash_ops to bus-message-util
Mike Yuan [Sat, 11 Jan 2025 16:10:43 +0000 (17:10 +0100)] 
shared/bus-util: move bus_message_hash_ops to bus-message-util

9 months agoshared/bus-util: move bus_message_read_id128() to bus-message-util
Mike Yuan [Sat, 11 Jan 2025 15:52:05 +0000 (16:52 +0100)] 
shared/bus-util: move bus_message_read_id128() to bus-message-util

9 months agotmpfiles: move two commands to the right --help sections
Lennart Poettering [Fri, 10 Jan 2025 22:45:07 +0000 (23:45 +0100)] 
tmpfiles: move two commands to the right --help sections

9 months agosysusers: use chase_and_stat() where appropriate 35976/head
Lennart Poettering [Fri, 10 Jan 2025 22:50:41 +0000 (23:50 +0100)] 
sysusers: use chase_and_stat() where appropriate