]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 months agotreewide: correct argument comments for sd_event_add_time 37712/head
Jelle van der Waa [Wed, 4 Jun 2025 09:24:21 +0000 (11:24 +0200)] 
treewide: correct argument comments for sd_event_add_time

5 months agotreewide: correct argument comments for sd_netlink_call
Jelle van der Waa [Wed, 4 Jun 2025 09:15:52 +0000 (11:15 +0200)] 
treewide: correct argument comments for sd_netlink_call

5 months agotreewide: correct argument comment to 'ret' where applicable
Jelle van der Waa [Tue, 3 Jun 2025 13:58:24 +0000 (15:58 +0200)] 
treewide: correct argument comment to 'ret' where applicable

For functions with one return argument prefer 'ret' as argument comment.

5 months agoask-password-api: correct argument comment
Jelle van der Waa [Tue, 3 Jun 2025 13:37:30 +0000 (15:37 +0200)] 
ask-password-api: correct argument comment

5 months agorepart: correct argument comment
Jelle van der Waa [Tue, 3 Jun 2025 13:32:49 +0000 (15:32 +0200)] 
repart: correct argument comment

5 months agonsresourced: correct argument comments
Jelle van der Waa [Tue, 3 Jun 2025 12:07:21 +0000 (14:07 +0200)] 
nsresourced: correct argument comments

5 months agosd-varlink: correct argument comment
Jelle van der Waa [Tue, 3 Jun 2025 12:01:13 +0000 (14:01 +0200)] 
sd-varlink: correct argument comment

5 months agohomectl: rename 'emphasize_current' -> 'emphasize_current_password'
Jelle van der Waa [Tue, 3 Jun 2025 11:40:39 +0000 (13:40 +0200)] 
homectl: rename 'emphasize_current' -> 'emphasize_current_password'

Other functions in this file use the same parameter naming.

5 months agogenerator: rename 'password' -> 'key_file'
Jelle van der Waa [Tue, 3 Jun 2025 09:14:22 +0000 (11:14 +0200)] 
generator: rename 'password' -> 'key_file'

Makes the header declaration and implementation consistent.

5 months agocgroup-util: rename 'fsfd' -> 'cgroups_fd'
Jelle van der Waa [Tue, 3 Jun 2025 08:49:17 +0000 (10:49 +0200)] 
cgroup-util: rename 'fsfd' -> 'cgroups_fd'

Makes the header and implementation consistent.

5 months agoman/pcrlock: fix typo
Yu Watanabe [Wed, 4 Jun 2025 04:12:42 +0000 (13:12 +0900)] 
man/pcrlock: fix typo

Follow-up for ccd2bf48b2d736e335f217d5621a817aa1b6beeb.

5 months agouserdbctl: Label dynamic greeter users
Adrian Vovk [Fri, 30 May 2025 18:27:29 +0000 (14:27 -0400)] 
userdbctl: Label dynamic greeter users

5 months agodoc: fix integration tests guide reference
Emmanuel Ferdman [Mon, 2 Jun 2025 19:19:26 +0000 (12:19 -0700)] 
doc: fix integration tests guide reference

5 months agocore/varlink: use forward.h at two more places (#37716)
Mike Yuan [Tue, 3 Jun 2025 21:11:17 +0000 (23:11 +0200)] 
core/varlink: use forward.h at two more places (#37716)

5 months agocore/varlink: use forward.h at two more places 37716/head
Yu Watanabe [Tue, 3 Jun 2025 19:57:29 +0000 (04:57 +0900)] 
core/varlink: use forward.h at two more places

5 months agocompress: avoid a bunch of div-by-zeroes
Lennart Poettering [Tue, 3 Jun 2025 14:26:17 +0000 (16:26 +0200)] 
compress: avoid a bunch of div-by-zeroes

Follow-up for #37706. Implements the same logic for all compression
algorithms we have.

5 months agotpm2: various smaller fixes, mostly about better error messages and support checking...
Lennart Poettering [Tue, 3 Jun 2025 16:26:36 +0000 (18:26 +0200)] 
tpm2: various smaller fixes, mostly about better error messages and support checking (#37690)

Fixes: #35187
Fixes: #36743
Fixes: #37607
5 months agotpm2-util: guarantee that verb_has_tpm2_generic() returns usable exit status 37690/head
Lennart Poettering [Tue, 3 Jun 2025 14:11:57 +0000 (16:11 +0200)] 
tpm2-util: guarantee that verb_has_tpm2_generic() returns usable exit status

5 months agotpm2-util: use BIT_FOREACH() more
Lennart Poettering [Tue, 3 Jun 2025 14:11:35 +0000 (16:11 +0200)] 
tpm2-util: use BIT_FOREACH() more

5 months agotpm2: add a clear error message for all errors that suggest a PCR violation
Lennart Poettering [Mon, 2 Jun 2025 11:13:17 +0000 (13:13 +0200)] 
tpm2: add a clear error message for all errors that suggest a PCR violation

Fixes: #35187
5 months agotpm2-util: add a brief summary of tpm2_unseal() return values in a comment
Lennart Poettering [Mon, 2 Jun 2025 11:13:59 +0000 (13:13 +0200)] 
tpm2-util: add a brief summary of tpm2_unseal() return values in a comment

5 months agotpm2-util: also generate recognizable error if PolicyAuthorizeNV fails
Lennart Poettering [Mon, 2 Jun 2025 11:12:28 +0000 (13:12 +0200)] 
tpm2-util: also generate recognizable error if PolicyAuthorizeNV fails

5 months agopcrlock: also refuse lacking SHA-256 support early when creating policy
Lennart Poettering [Mon, 2 Jun 2025 10:32:33 +0000 (12:32 +0200)] 
pcrlock: also refuse lacking SHA-256 support early when creating policy

This will fail eventually, but let's be explicit early here.

5 months agopcrlock: make error messages more useful if PCR state doesn't match policy during...
Lennart Poettering [Mon, 2 Jun 2025 10:23:51 +0000 (12:23 +0200)] 
pcrlock: make error messages more useful if PCR state doesn't match policy during PolicyOR

Fixes: #35187
5 months agomeasure: generate a more useful error in case SHA1 support is disabled by distro
Lennart Poettering [Mon, 2 Jun 2025 09:49:33 +0000 (11:49 +0200)] 
measure: generate a more useful error in case SHA1 support is disabled by distro

Fixes: #36743
5 months agopcrlock: add "is-supported" verb that checks if the local TPM supports the commands...
Lennart Poettering [Mon, 2 Jun 2025 09:20:52 +0000 (11:20 +0200)] 
pcrlock: add "is-supported" verb that checks if the local TPM supports the commands we need for pcrlock

systemd-pcrlock requires support for the PolicyAuthorizeNV command,
which is not implemented in the first TPM2 releases. We also strictly
require SHA-256 support. Hence add a tool for checking for both of
these.

This is a tighter version of "systemd-analyze has-tpm2", that checks for
the precise feature that systemd-pcrlock needs, on top of basic TPM2
functionality.

Fixes: #37607
5 months agotpm2-util: correct copy/pasted error message
Lennart Poettering [Mon, 2 Jun 2025 11:13:34 +0000 (13:13 +0200)] 
tpm2-util: correct copy/pasted error message

5 months agobus-unit-util: warn and ignore assignment of deprecated properties
Yu Watanabe [Fri, 30 May 2025 19:30:43 +0000 (04:30 +0900)] 
bus-unit-util: warn and ignore assignment of deprecated properties

With 5da476ac7728b91ad3a49c1b126b3559b4fbeed8, we refused to set the
properties, but this relaxes the behavior, and now commands warn and
ignore the assignment.

Also, assignment of CPUAccounting property is now warned and ignored,
which is deprecated by 29da53dde32a0097134f6c3ba5fb5220dd6e5423.

Prompted by https://github.com/systemd/systemd/pull/37665#discussion_r2115676993

5 months agorepart: if partition already exists, required size may not be multiple of grain size
Yu Watanabe [Fri, 18 Apr 2025 18:41:45 +0000 (03:41 +0900)] 
repart: if partition already exists, required size may not be multiple of grain size

See partition_min_size_with_padding().
Fixes #37178.

5 months agovmspawn: do not preserve access permissions and xattrs of template OVMF vars
Arian van Putten [Sun, 1 Jun 2025 10:02:55 +0000 (12:02 +0200)] 
vmspawn: do not preserve access permissions and xattrs of template OVMF vars

This makes vmspawn work when /usr/share/qemu/edk2-i386-vars.fd is on
disk with 0444 permissions as is the case on NixOS.

The nix package manager does not store any access permissions, ownership,
timestamps, or extended attributes in its package format to increase
reproducibility. The only meta-data that is stored is the executable bit.

Thus when unpacking a nix package, the executable bit is preserved, but no other
access permissions are preserved and all files in /nix/store end up as
read-only.

This causes the template OVMF vars file to have 0444 permissions. If we preserve
those permissions when copying the template file to /tmp that means QEMU can not
write to the file and fails.

So lets not preserve permissions and keep the 0600 permissions that are set by
default.

5 months agorepart: Add ratelimitting for progress updates
Daan De Meyer [Mon, 2 Jun 2025 14:34:59 +0000 (16:34 +0200)] 
repart: Add ratelimitting for progress updates

Same logic as in systemd-import, this is especially important when
systemd-repart is not run from a tty as currently we'll get something
like this:

```
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  98%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G  99%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
/var/tmp/.#repartc256fb6b9dc517af → /work/var/tmp/mkosi-workspace-2ek2c3n1/repart-definitions/10-root.conf 1.7G/1.7G 100%
```

5 months agorepart: Improve logging in resolve_copy_blocks_auto()
Daan De Meyer [Mon, 2 Jun 2025 14:02:58 +0000 (16:02 +0200)] 
repart: Improve logging in resolve_copy_blocks_auto()

5 months agoBugprone argument comment 8 (#37678)
Yu Watanabe [Tue, 3 Jun 2025 01:58:52 +0000 (10:58 +0900)] 
Bugprone argument comment 8 (#37678)

Follow up from https://github.com/systemd/systemd/pull/37556

5 months agotest: send monotonic timestamp rather than unix seconds for MONOTONIC_USEC= argument
Luca Boccassi [Mon, 2 Jun 2025 18:45:02 +0000 (19:45 +0100)] 
test: send monotonic timestamp rather than unix seconds for MONOTONIC_USEC= argument

Follow-up for 3998b30a040d1494918e11c78ef3eae72532bbca

5 months agocompress: prevent divide-by-zero when no data is read (#37706)
Alex [Tue, 3 Jun 2025 01:51:00 +0000 (21:51 -0400)] 
compress: prevent divide-by-zero when no data is read (#37706)

If the first call to `loop_read()` returns 0 (no input), `total_in`
remains 0, causing `total_out/total_in` to potential divide by zero.

We add a check before logging the compression ratio to skip the
percentage calculation when total_in is zero.

Co-authored-by: jinyaoguo <guo846@purdue.edu>
5 months agonetwork: fix a potential divide-by-zero (#37705)
Alex [Mon, 2 Jun 2025 22:47:49 +0000 (18:47 -0400)] 
network: fix a potential divide-by-zero (#37705)

In function `tc_init`, hz is parsed from the content of file
`"/proc/net/psched"` and can be 0.
In function `hierarchy_token_bucket_class_verify`, hz is directly used
as a divisor in
`htb->buffer = htb->rate / hz + htb->mtu;` without any check. This adds a check on hz before using it as a divisor.

Co-authored-by: jinyaoguo <guo846@purdue.edu>
5 months agoman/systemd-creds: fix documentation typo in systemd.exec.xml
Anton Ryzhov [Mon, 2 Jun 2025 22:20:30 +0000 (00:20 +0200)] 
man/systemd-creds: fix documentation typo in systemd.exec.xml

5 months agohwdb: fix touchpad for ASUS X1504ZA (#37696)
Michał Moczulski [Mon, 2 Jun 2025 20:12:07 +0000 (22:12 +0200)] 
hwdb: fix touchpad for ASUS X1504ZA (#37696)

Added udev rule generated by `libinput measure fuzz --fuzz=8`, which
fixes my touchpad.

5 months agoshared/install.h: rename 'flags' -> 'file_flags' 37678/head
Jelle van der Waa [Mon, 2 Jun 2025 15:55:53 +0000 (17:55 +0200)] 
shared/install.h: rename 'flags' -> 'file_flags'

Make it consistent with the implementation.

5 months agoio-util: rename 'nfds' -> 'n_fds'
Jelle van der Waa [Mon, 2 Jun 2025 15:42:08 +0000 (17:42 +0200)] 
io-util: rename 'nfds' -> 'n_fds'

5 months agouid-range: correct argument comment
Jelle van der Waa [Sun, 1 Jun 2025 08:18:38 +0000 (10:18 +0200)] 
uid-range: correct argument comment

5 months agosd-varlink: fix argument naming
Jelle van der Waa [Wed, 28 May 2025 18:57:33 +0000 (20:57 +0200)] 
sd-varlink: fix argument naming

5 months agosd-journal: rename sd_journal_get_monotonic_usec ret argument
Jelle van der Waa [Sun, 25 May 2025 17:53:24 +0000 (19:53 +0200)] 
sd-journal: rename sd_journal_get_monotonic_usec ret argument

Rename ret to ret_monotonic to distinguish from ret_boot_id and
according to existing argument comments.

5 months agomount-util: correct argument comment
Jelle van der Waa [Sun, 25 May 2025 17:46:47 +0000 (19:46 +0200)] 
mount-util: correct argument comment

5 months agonspawn: correct argument comments
Jelle van der Waa [Sun, 25 May 2025 17:45:37 +0000 (19:45 +0200)] 
nspawn: correct argument comments

5 months agoenv-util: rename 'n' -> 'length'
Jelle van der Waa [Sun, 25 May 2025 17:43:45 +0000 (19:43 +0200)] 
env-util: rename 'n' -> 'length'

5 months agonss-systemd/userdb drop-ins: various doc updates (#37693)
Lennart Poettering [Mon, 2 Jun 2025 15:02:20 +0000 (17:02 +0200)] 
nss-systemd/userdb drop-ins: various doc updates (#37693)

This mostly adds crosslinks from various bits and pieces of userdb docs
to each other, and adds some clarifications.

Fixes: #27208
5 months agoDeduplicate error string patterns (#37676)
Zbigniew Jędrzejewski-Szmek [Mon, 2 Jun 2025 13:34:17 +0000 (15:34 +0200)] 
Deduplicate error string patterns (#37676)

I wanted to see if moving moving out constant string arguments our of
error messages results in smaller binary sizes. Turns out it does, but
the savings are not consistent. Sometimes we get a few kB in a single
binary, sometimes there is no size change.

5 months agoman: emphasize that systemd-userdb-load-credentials.service doesn't do UID/GID allocation 37693/head
Lennart Poettering [Mon, 2 Jun 2025 13:15:33 +0000 (15:15 +0200)] 
man: emphasize that systemd-userdb-load-credentials.service doesn't do UID/GID allocation

5 months agoman: add reference from userdbctl man page to nss-systemd regarding user record drop-ins
Lennart Poettering [Mon, 2 Jun 2025 13:15:11 +0000 (15:15 +0200)] 
man: add reference from userdbctl man page to nss-systemd regarding user record drop-ins

5 months agoman: mention systemd-userdb-load-credentials.service when discussing /run/userdb...
Lennart Poettering [Mon, 2 Jun 2025 13:14:43 +0000 (15:14 +0200)] 
man: mention systemd-userdb-load-credentials.service when discussing /run/userdb/ drop-ins

5 months agorepart: fix generation of UUID= line for vfat in fstab entries (#37689)
Lennart Poettering [Mon, 2 Jun 2025 10:25:14 +0000 (12:25 +0200)] 
repart: fix generation of UUID= line for vfat in fstab entries (#37689)

Fixes: #36735
5 months agoDefine uid range for greeter
Adrian Vovk [Wed, 21 May 2025 21:32:03 +0000 (17:32 -0400)] 
Define uid range for greeter

In multi-seat scenarios, a display manager might need to start multiple
greeter sessions. But systemd allows at most one graphical session per
user. So, display managers now have a range of UIDs to dynamically
allocate users for their greeter sessions.

5 months agovarious: do not include file names directly in error messages 37676/head
Zbigniew Jędrzejewski-Szmek [Mon, 2 Jun 2025 08:30:34 +0000 (10:30 +0200)] 
various: do not include file names directly in error messages

git grep -l 'Failed to open /'|xargs sed -r -i 's|"Failed to open (/[^ ]+): %m"|"Failed to open %s: %m", "\1"|g'
git grep -l $'Failed to open \'/'|xargs sed -r -i $'s|"Failed to open \'(/[^ ]+)\': %m"|"Failed to open %s: %m", "\\1"|g'
git grep -l "Failed to open /"|xargs sed -r -i $'s|"Failed to open (/[^ ]+), ignoring: %m"|"Failed to open %s, ignoring: %m", "\\1"|g'
+ some manual fixups.

5 months agobuild(deps): bump github/codeql-action from 3.28.10 to 3.28.18
dependabot[bot] [Sun, 1 Jun 2025 09:12:40 +0000 (09:12 +0000)] 
build(deps): bump github/codeql-action from 3.28.10 to 3.28.18

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.28.10 to 3.28.18.
- [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/b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d...ff0a06e83cb2de871e5a09832bc6a81e7276941f)

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

Signed-off-by: dependabot[bot] <support@github.com>
5 months agoudevadm: allow to specify device by device ID (#37636)
Yu Watanabe [Mon, 2 Jun 2025 09:02:36 +0000 (18:02 +0900)] 
udevadm: allow to specify device by device ID (#37636)

5 months agorepart: set a useful access mode file for generated fstab files 37689/head
Lennart Poettering [Mon, 2 Jun 2025 08:12:33 +0000 (10:12 +0200)] 
repart: set a useful access mode file for generated fstab files

We create these as temporary files with 0600 access mode. Let's adjust
this before we install the files.

5 months agorepart: fix generation of UUID= line for vfat in fstab entries
Lennart Poettering [Mon, 2 Jun 2025 08:12:10 +0000 (10:12 +0200)] 
repart: fix generation of UUID= line for vfat in fstab entries

Fixes: #36735
5 months agobuild(deps): bump meson from 1.6.1 to 1.8.1 in /.github/workflows
dependabot[bot] [Sun, 1 Jun 2025 09:30:36 +0000 (09:30 +0000)] 
build(deps): bump meson from 1.6.1 to 1.8.1 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.6.1 to 1.8.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.6.1...1.8.1)

---
updated-dependencies:
- dependency-name: meson
  dependency-version: 1.8.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months agobuild(deps): bump super-linter/super-linter from 7.3.0 to 7.4.0
dependabot[bot] [Sun, 1 Jun 2025 09:12:31 +0000 (09:12 +0000)] 
build(deps): bump super-linter/super-linter from 7.3.0 to 7.4.0

Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 7.3.0 to 7.4.0.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/4e8a7c2bf106c4c766c816b35ec612638dc9b6b2...12150456a73e248bdc94d0794898f94e23127c88)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-version: 7.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
5 months agoUpdate TODO
Lennart Poettering [Mon, 2 Jun 2025 07:34:59 +0000 (09:34 +0200)] 
Update TODO

5 months agorepart: CopyBlocks=auto fix for verity-sig partitions (#37688)
Daan De Meyer [Mon, 2 Jun 2025 07:15:46 +0000 (09:15 +0200)] 
repart: CopyBlocks=auto fix for verity-sig partitions (#37688)

Alternative to: #37687

5 months agorepart: make CopyBlock=auto work for verity sig partitions 37688/head
Lennart Poettering [Mon, 2 Jun 2025 04:43:09 +0000 (06:43 +0200)] 
repart: make CopyBlock=auto work for verity sig partitions

Note that this doesn't care which partition set (A or B in an A/B
scenario) is actually newer, it just picks the first suitable, but
that's something we should look into later. For now, let's just make
verity sig partitions work the same way as verity partitions.

Fixes #34835

5 months agorepart: make use of blkid_partition_get_type_id128() more
Lennart Poettering [Mon, 2 Jun 2025 04:42:52 +0000 (06:42 +0200)] 
repart: make use of blkid_partition_get_type_id128() more

5 months agorepart: Apply verity-sig max size based on partition type
Daan De Meyer [Sun, 1 Jun 2025 18:24:47 +0000 (20:24 +0200)] 
repart: Apply verity-sig max size based on partition type

We already do this for partition_min_size(), let's do it for
partition_max_size() as well. This makes sure repart doesn't accidentally
try to grow verity sig partitions to larger sizes than the hardcoded
max size in systemd.

5 months agobootctl: fix unclosed quote in debug log
Joaquim Monteiro [Sat, 31 May 2025 18:56:28 +0000 (19:56 +0100)] 
bootctl: fix unclosed quote in debug log

5 months agomount-util: avoid unnecessary mount_setattr() call in make_fsmount()
Lennart Poettering [Sat, 31 May 2025 05:58:30 +0000 (07:58 +0200)] 
mount-util: avoid unnecessary mount_setattr() call in make_fsmount()

If .attr_set is zero (and .att_clr, .propagation too), then there's no
point in calling mount_setattr().

Fixes: #37062
Note that this optimization is not precisely load-bearing anymore, since
3cc23a2c2345eb188551565349c89ec1fa8f650f got merged which removes the
only caller of make_fsmount() that might trigger it. But it's worth
fixing generic code anyway, in case it gets used like this later again.

5 months agocore/smack-setup: use RET_NERRNO and RET_GATHER
Zbigniew Jędrzejewski-Szmek [Sat, 31 May 2025 14:36:43 +0000 (16:36 +0200)] 
core/smack-setup: use RET_NERRNO and RET_GATHER

5 months agocore/smack-setup: rework message to include full paths to files
Zbigniew Jędrzejewski-Szmek [Sat, 31 May 2025 14:03:55 +0000 (16:03 +0200)] 
core/smack-setup: rework message to include full paths to files

We'd print the filename, but not the full path. Error messages without
the full path are annoying to users since they might not know where the file
is located, esp. if the name is fairly generic, and it is harder to search
for the error message too.

Use a trailing slash to indicate when we're trying to open a directory.
Drop quotes from around paths which are static and known to contain no
whitespace.

5 months agocore: do not include names directly in error messages
Zbigniew Jędrzejewski-Szmek [Sat, 31 May 2025 13:28:35 +0000 (15:28 +0200)] 
core: do not include names directly in error messages

This allows some strings constants to be deduplicated.
libsystemd-core.so + systemd are about 2k smaller.

Also tweak some messages for consistency. We used 'exec' in one place and
'execute' in all other messages.

5 months agosd-device: do not include file name directly in error messages
Zbigniew Jędrzejewski-Szmek [Sat, 31 May 2025 13:18:37 +0000 (15:18 +0200)] 
sd-device: do not include file name directly in error messages

$ diff -u <(strings -n 10 build/libsystemd.so.0.40.0.0 | sort) <(strings -n 10 build/libsystemd.so.0.40.0 | sort)
--- /proc/self/fd/11    2025-05-31 15:17:16.968761963 +0200
+++ /proc/self/fd/12    2025-05-31 15:17:16.970159823 +0200
@@ -3860,11 +3860,6 @@
 Failed to fstat() journal file '%s', ignoring: %m
 Failed to fstat %s: %m
 Failed to get basic: %m
-Failed to get device "ACTION" property, ignoring: %m
-Failed to get device "DEVNUM" property, ignoring: %m
-Failed to get device "DISKSEQ" property, ignoring: %m
-Failed to get device "IFINDEX" property, ignoring: %m
-Failed to get device "SEQNUM" property, ignoring: %m
 Failed to get device "%s" property, ignoring: %m
 Failed to get inode number of pidfd for pid %i: %m
 Failed to get peer's socket address, ignoring: %m

$ ls -l build/libsystemd.so.0.40.0{,.0}
-rwxr-xr-x 1 zbyszek zbyszek 7631640 May 31 15:16 build/libsystemd.so.0.40.0
-rwxr-xr-x 1 zbyszek zbyszek 7635736 May 31 15:16 build/libsystemd.so.0.40.0.0

$ size build/libsystemd.so.0.40.0{,.0}
   text    data     bss     dec     hex filename
1241382   56185    3554 1301121  13da81 build/libsystemd.so.0.40.0
1241606   56185    3554 1301345  13db61 build/libsystemd.so.0.40.0.0

So the savings are ~4kB, which is more than I expected.

5 months agosleep: do not include file name directly in error messages
Zbigniew Jędrzejewski-Szmek [Sat, 31 May 2025 13:14:36 +0000 (15:14 +0200)] 
sleep: do not include file name directly in error messages

Here the .text section becomes smaller, but the file size doesn't change
(I guess some alignment issue). But is seems to be reasonable change to
anyway, we might get some savings in different compilations anyway.

Also improve two messages.

5 months agorandom-seed: do not include file name directly in error messages
Zbigniew Jędrzejewski-Szmek [Sat, 31 May 2025 11:43:32 +0000 (13:43 +0200)] 
random-seed: do not include file name directly in error messages

The path is fairly long and by embedding it in the message, we get a longer
data section in our binary. By using %s, we can make the template strings
shorter, deduplicating bytes in our binary. Those are error messages, i.e. by
definition they are only used very rarely, so it's completely fine if printf
does a bit more work when generating the message.

$ strings build/systemd-random-seed.0 | rg '/var/lib/systemd/random-seed'
/var/lib/systemd/random-seed
Failed to open /var/lib/systemd/random-seed for writing: %m
Failed to open /var/lib/systemd/random-seed for reading: %m
Failed to open /var/lib/systemd/random-seed: %m
Failed to stat() seed file /var/lib/systemd/random-seed: %m
Failed to read seed from /var/lib/systemd/random-seed: %m
Seed file /var/lib/systemd/random-seed not yet initialized, proceeding.

$ strings build/systemd-random-seed | rg '/var/lib/systemd/random-seed'
/var/lib/systemd/random-seed

$ ls -l build/systemd-random-seed{,.0}
-rwxr-xr-x 1 zbyszek zbyszek 68872 May 31 13:39 build/systemd-random-seed.0
-rwxr-xr-x 1 zbyszek zbyszek 64912 May 31 13:45 build/systemd-random-seed
That's a ~6% smaller binary!

5 months agotree-wide: only use .si_pid field in siginfo_t, if .si_code indicates that's safe
Lennart Poettering [Thu, 29 May 2025 06:22:07 +0000 (08:22 +0200)] 
tree-wide: only use .si_pid field in siginfo_t, if .si_code indicates that's safe

Fixes: #37498
5 months agobootctl: do not print slash more than once
Yu Watanabe [Sat, 31 May 2025 01:24:17 +0000 (10:24 +0900)] 
bootctl: do not print slash more than once

When bootctl is called by an unprivileged user, then previously we got
```
Failed to read "/boot/EFI/systemd": Permission denied
Failed to open '/boot//loader/loader.conf': Permission denied
```
Now, with this patch, we get
```
Failed to read "/boot/EFI/systemd": Permission denied
Failed to open '/boot/loader/loader.conf': Permission denied
```

5 months agoportable,sysext: match extension OS ID also against host ID_LIKE
Christian Glombek [Thu, 29 May 2025 14:53:19 +0000 (16:53 +0200)] 
portable,sysext: match extension OS ID also against host ID_LIKE

5 months agotest: wait for coredump to appear before parsing
Luca Boccassi [Fri, 30 May 2025 21:08:39 +0000 (22:08 +0100)] 
test: wait for coredump to appear before parsing

A new core was added to the test, but the loop counter was not increased
to wait for it, so the test races against systemd-coredump's processing.

This failed at least once in debci:

8015s [   32.227813] TEST-87-AUX-UTILS-VM.sh[1038]: + coredumpctl info COREDUMP_TIMESTAMP=1679509902000000
8015s [   32.228684] TEST-87-AUX-UTILS-VM.sh[1723]: No coredumps found.

Follow-up for 0c49e0049b7665bb7769a13ef346fef92e1ad4d6

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

5 months agoterminal-util: fix typo
Yu Watanabe [Fri, 30 May 2025 19:42:59 +0000 (04:42 +0900)] 
terminal-util: fix typo

Follow-up for 5321b957b4027be66873eac730d4ce141021e368.

5 months agodocs: add man page for sd_device_enumerator_get_device_first() and friends
Shubhendra Kushwaha [Sun, 25 May 2025 15:17:31 +0000 (20:47 +0530)] 
docs: add man page for sd_device_enumerator_get_device_first() and friends

For #20929.

5 months agocore/cgroup: update comment
Yu Watanabe [Fri, 30 May 2025 19:14:58 +0000 (04:14 +0900)] 
core/cgroup: update comment

We do not have SetProperty() method, but SetProperties().

5 months agocore/transaction: restart dependency loop when a new dependency is added (#37465)
Yu Watanabe [Fri, 30 May 2025 19:01:06 +0000 (04:01 +0900)] 
core/transaction: restart dependency loop when a new dependency is added (#37465)

Fixes #36031.

5 months agoTODO: drop entry about removal of unnecessary INTERFACE_OLD check in udevadm trigger
Yu Watanabe [Fri, 30 May 2025 18:44:51 +0000 (03:44 +0900)] 
TODO: drop entry about removal of unnecessary INTERFACE_OLD check in udevadm trigger

Done by fde9f2bc4857b4d34cdb89f93c52c10f7bcf90de.

5 months agodocs: small improvements for html man pages menu selector (#37663)
Luca Boccassi [Fri, 30 May 2025 11:33:48 +0000 (12:33 +0100)] 
docs: small improvements for html man pages menu selector (#37663)

Result is already live at
https://www.freedesktop.org/software/systemd/man

5 months agosync-docs: add '(latest stable)' next to the latest version in the menu 37663/head
Luca Boccassi [Fri, 30 May 2025 01:03:08 +0000 (02:03 +0100)] 
sync-docs: add '(latest stable)' next to the latest version in the menu

Add visual indicator of what is the latest version in the
version menu

5 months agosync-docs: fix selection menu when opening 'latest' man
Luca Boccassi [Fri, 30 May 2025 01:02:01 +0000 (02:02 +0100)] 
sync-docs: fix selection menu when opening 'latest' man

'devel' will always sort first, so the highest version is the second
entry, not the first one

5 months agosync-docs: fix syntax warning
Luca Boccassi [Fri, 30 May 2025 00:59:15 +0000 (01:59 +0100)] 
sync-docs: fix syntax warning

sync-docs.py:94: SyntaxWarning: invalid escape sequence '\d'
  m = re.match("v?(\d+).*", tag)

5 months agocore/exec-invoke: rework $TERM fallback logic (#37647)
Zbigniew Jędrzejewski-Szmek [Fri, 30 May 2025 10:39:51 +0000 (12:39 +0200)] 
core/exec-invoke: rework $TERM fallback logic (#37647)

Inspired by https://github.com/systemd/systemd/pull/37538, see a
detailed rationale in
https://github.com/systemd/systemd/pull/37538#discussion_r2110229075.

5 months agochore: fix editorconfig pattern and add setting for zsh
Eisuke Kawashima [Thu, 29 May 2025 22:37:26 +0000 (07:37 +0900)] 
chore: fix editorconfig pattern and add setting for zsh

5 months agoNEWS: fix typos
Jörg Behrmann [Thu, 29 May 2025 18:30:11 +0000 (20:30 +0200)] 
NEWS: fix typos

5 months agocore/exec-invoke: skip query of /dev/console $TERM if we're child of pid1 37647/head
Mike Yuan [Thu, 29 May 2025 00:16:13 +0000 (02:16 +0200)] 
core/exec-invoke: skip query of /dev/console $TERM if we're child of pid1

5 months agocore/exec-invoke: propagate $COLORTERM and $NO_COLOR from pid1 as well
Mike Yuan [Wed, 28 May 2025 18:40:33 +0000 (20:40 +0200)] 
core/exec-invoke: propagate $COLORTERM and $NO_COLOR from pid1 as well

Follow-up for 19aff5f775386a34224f710b88457c1e6bdf0e2f

5 months agocore/exec-invoke: rework where to apply $TERM fallback logic
Mike Yuan [Wed, 28 May 2025 18:24:59 +0000 (20:24 +0200)] 
core/exec-invoke: rework where to apply $TERM fallback logic

Follow-up for 728dbaeffb3e72872253c50ca5d1c100cc532634
and ad6ca4a6129fa0fb8e8c800d05cf2c7ed5d0bcbf

This is inspired by #37538, see the discussion in
https://github.com/systemd/systemd/pull/37538#discussion_r2110229075.

If the user already specifies $TERM (which is actually
quite common if you look at run0), we'd needlessly invoke
the "fallback" logic and
a) possibly issue a DCS query whose result we end up simply
   discarding in strv_env_merge()
b) set $COLORTERM to "truecolor" unconditionally, whereas
   the explicit $TERM value might intend to disable the color output

To address this, the logic of setting fallback $TERM and friends
has been split out of build_environment(), and we'd call into it
only after all envvars have been collected.

5 months agocore: strv_env_clean() modifies in-place, no need to set buf to itself
Mike Yuan [Wed, 28 May 2025 19:05:53 +0000 (21:05 +0200)] 
core: strv_env_clean() modifies in-place, no need to set buf to itself

5 months agoenv-util: add missing assertions
Mike Yuan [Wed, 28 May 2025 18:47:50 +0000 (20:47 +0200)] 
env-util: add missing assertions

5 months agoenv-util: modernize *_is_valid()
Mike Yuan [Wed, 28 May 2025 17:57:01 +0000 (19:57 +0200)] 
env-util: modernize *_is_valid()

5 months agoUse DCS sequence to query terminal name and set $TERM automatically (#37538)
Mike Yuan [Thu, 29 May 2025 19:01:01 +0000 (21:01 +0200)] 
Use DCS sequence to query terminal name and set $TERM automatically (#37538)

This code seems to work quickly and nicely for a bunch of modern
terminals. Setting $TERM automatically removes an common annoyance for
users. This code will not work for all terminal emulators, but by adding
it in systemd we'll entice maintainers of those terminals to add support
for the sequences. For the terminals that don't support the sequence, we
get a bit of a slowdown of `< 1 ms`, which seems hardly noticeable. The
user can always set TERM explicitly to avoid this if upgrading to a
newer terminal emulator is not possible.

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

5 months agopo: Translated using Weblate (Georgian)
Temuri Doghonadze [Thu, 29 May 2025 16:48:14 +0000 (16:48 +0000)] 
po: Translated using Weblate (Georgian)

Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main

5 months agobasic/terminal-util: drop now-unused default_term_for_tty 37538/head
Zbigniew Jędrzejewski-Szmek [Tue, 27 May 2025 16:12:00 +0000 (18:12 +0200)] 
basic/terminal-util: drop now-unused default_term_for_tty

5 months agocore: use terminal DCS sequence to set $TERM
Zbigniew Jędrzejewski-Szmek [Tue, 20 May 2025 17:02:31 +0000 (19:02 +0200)] 
core: use terminal DCS sequence to set $TERM

query_term_for_tty() is used in two places: in fixup_environment(),
which affects PID1 itself, and in build_environment(), which affects
spawned services. There is obviously some cost to the extra call,
but I think it's worthwhile to do it. When $TERM is set incorrectly,
basic output works OK, but then there are various annoying corner
cases. In particular, we get the support for color (or lack of it)
wrong, and when output is garbled, users are annoyed. Things like
text editors are almost certain to behave incorrectly. Testing in
test-terminal-util indicates that the time required to make a successful
query is on the order of a dozen microseconds, and an unsuccessful
query costs as much as our timeout, i.e. currently 1/3 ms. I think
this is an acceptable tradeoff.

No caching is used, because fixup_environment() is only called once,
and the other place in build_environment(), only affects services
which are connected to a tty, which is only a handful of services,
and often only started in special circumstances.

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

5 months agobasic/terminal-util: add a heuristic check whether terminfo file exists
Zbigniew Jędrzejewski-Szmek [Mon, 19 May 2025 13:50:42 +0000 (15:50 +0200)] 
basic/terminal-util: add a heuristic check whether terminfo file exists