Commit Graph
83268 Commits
Author SHA1 Message Date
Luca Boccassi 0fa09581b7 Fix build with older python/glibc/bpf and add CI job to cover it (#38500) 2025-08-06 16:08:18 +01:00
Yu Watanabe 0dc0bf4caf profile: replace default bash prompt with more informative one
The default bash PS1 provides mostly no information.
Let's replace it.

Before:
```
[watanabe@thinkpad-x280:~] $ run0
🦸 bash-5.2# echo $PS1
🦸 \s-\v\$
```

After:
```
[watanabe@thinkpad-x280:~] $ run0
🦸 [root@thinkpad-x280 watanabe]# echo $PS1
🦸 [\u@\h \W]\$
```

Fixes #38494.
2025-08-06 14:24:19 +01:00
Luca Boccassi ea2beb6591 user-runtime-dir: two fixlets for setting disk quota (#38496)
Fixes #38493.
2025-08-06 14:23:41 +01:00
Luca Boccassi 4f49a6f572 ci: add build job on Ubuntu Jammy with Python 3.7
In order to avoid regressions with glibc < 2.39 and Python 3.7
2025-08-06 14:09:33 +01:00
Luca Boccassi 0d333ed8e3 test: fix repeated runs of test-oomd-util by clearing test cgroup
If the test is ran multiple times in a row, without an ephemeral
scope (eg: non-booted nspawn), then subsequent runs will fail as
the test cgroup is not cleared so the previous xattrs are still
present. Trim the test cgroup before and after the test.

Follow-up for 61ff7397d0
2025-08-06 14:09:33 +01:00
Luca Boccassi 14cb1fba91 test: fix assert when running test-cgroup in container
When running in nspawn and thus from the namespaced root cgroup:

Paths for test:
//test-a
//test-b
src/test/test-cgroup.c:77: Assertion failed: Expected "path == test_b", got "/test-b != //test-b"

Use path_simplify() in the test like the code does, so that the results
always match
2025-08-06 14:09:33 +01:00
Luca Boccassi 64a4f3110a test-bpf-token: fix build with libbpf < 0.6
../s/src/test/test-bpf-token.c: In function ‘intro’:
../s/src/test/test-bpf-token.c:10:5: error: "__LIBBPF_CURRENT_VERSION_GEQ" is not defined, evaluates to 0 [-Werror=undef]
   10 | #if __LIBBPF_CURRENT_VERSION_GEQ(1, 5)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
../s/src/test/test-bpf-token.c:10:33: error: missing binary operator before token "("
   10 | #if __LIBBPF_CURRENT_VERSION_GEQ(1, 5)

Follow-up for ea9826eb94
2025-08-06 14:09:33 +01:00
Luca Boccassi 7108a882b3 network: fix build with libbpf < 0.7
bpf_loop() and bpf_strncmp(), used by sysctl-monitor, were introduced
in libbpf 0.7, so skip the module if using an older version

Follow-up for 6d9ef22acd
2025-08-06 13:33:21 +01:00
Luca Boccassi 3ec74b96b7 seccomp: fix build with glibc < 2.39
../src/shared/seccomp-util.c: In function ‘seccomp_restrict_sxid’:
../src/shared/seccomp-util.c:2228:25: error: ‘__NR_fchmodat2’ undeclared (first use in this function); did you mean ‘fchmodat2’?
 2228 |                         __NR_fchmodat2,
      |                         ^~~~~~~~~~~~~~
      |                         fchmodat2

The override/sys/syscalls.h needs to be included before the seccomp
headers, otherwise the internal seccomp preprocessor machinery will
not see the local definitions, so the local ifdef will be true but
the seccomp own definitions will be empty
2025-08-06 12:41:03 +01:00
Luca Boccassi 2793d6acf0 meson: fix compatibility with Python 3.7
[8/2759] Generating src/basic/filesystem-sets.c with a custom command (wrapped by meson to capture output)
FAILED: src/basic/filesystem-sets.c
/mnt/work/.local/bin/meson --internal exe --capture src/basic/filesystem-sets.c -- /mnt/work/src/systemd/upstream-fork/main/src/basic/filesystem-sets.py fs-type-to-string filesystem-sets fs-in-group
--- stderr ---
Traceback (most recent call last):
  File "/mnt/work/src/systemd/upstream-fork/main/src/basic/filesystem-sets.py", line 372, in <module>
    generate_fs_in_group()
  File "/mnt/work/src/systemd/upstream-fork/main/src/basic/filesystem-sets.py", line 311, in generate_fs_in_group
    start=[])))
TypeError: sum() takes no keyword arguments
2025-08-06 12:40:27 +01:00
novenary 98f5d7f33a hwdb: set touchpad resolution for ThinkPad T14 Gen2a 2025-08-06 17:37:25 +09:00
Yu Watanabe 6d30c40d6c user-runtime-dir: fix logged quota size
'v' is a number of blocks, rather than bytes.
2025-08-06 12:54:26 +09:00
Yu Watanabe ef7698f7aa user-runtime-dir: skip setting quota if not requested
Fixes the following spurious warning:

systemd-user-runtime-dir[865]: Failed to set disk quota limit to '15.9P' on /tmp for UID 991, ignoring: Numerical result out of range

Fixes #38493.
2025-08-06 12:54:23 +09:00
Luca Boccassi 2af77abb1c test: ensure printf builtin buffers and does a single write when piping into socat
Should hopefully solve this:

[  111.084463] systemd[1]: testservice-50k.service: Got notification message from PID 2651: RELOADING=1
[  111.085980] systemd[1]: testservice-50k.service: Got notification message from PID 2651: MONOTONIC_USEC=111072508

ie, pid1 receives RELOADING=1 and MONOTONIC_USEC= in different messages instead
of a single one, and reload-notify breaks

Follow-up for 3998b30a04

Fixes https://github.com/systemd/systemd/issues/37626
2025-08-06 00:21:22 +01:00
Luca Boccassi bebaaddd41 meson: update version numbers for v258~rc2 2025-08-05 17:16:07 +01:00
Luca Boccassi de55aba27b NEWS: update date 2025-08-05 17:14:48 +01:00
Luca Boccassi 6768470dd1 NEWS: update list of contributors 2025-08-05 17:14:48 +01:00
Yu Watanabe 24c2c8e12a NEWS: fix typo 2025-08-06 01:12:12 +09:00
Abderrahim Kitouni 83c1e8ff5f updatectl: allow interactive authorization 2025-08-05 17:03:20 +01:00
Luca Boccassi 9cd3e63014 stub: also pickup global .raw sysexts, like per-UKI ones
It is extremely confusing to use different filenames for different
locations, so pick up the same images for both per-UKI and global
extensions

Follow-up for 9f7e3820e9
2025-08-05 17:06:15 +02:00
Yu Watanabe 3d4977a12b TEST-64-UDEV-STORAGE: mdadm --zero-superblock seems to not support symlink
On CentOS 9:
```
TEST-64-UDEV-STORAGE.sh[522]: + mdadm -v --zero-superblock --force /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm0 ...
TEST-64-UDEV-STORAGE.sh[1014]: mdadm: Unrecognised md component device - /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm4
```

This also adds `udevadm settle` before clearing superblocks for safety.

Follow-up for 5ad6fe9850.
2025-08-05 12:19:54 +01:00
Yu WatanabeandDeli Zhang 406d8cb029 udev/spawn: continue to read stdout even if the result buffer is full
Previously, when the stdout of a spawned process (e.g. dmi_memory_id) is
truncated, the event source was not re-enabled, that will cause the process
to remain in a write-blocked state if the stdout buffer is full, and the
process will time out:
```
Spawned process 'dmi_memory_id' [1116] timed out after 2min 59s, killing.
Process 'dmi_memory_id' terminated by signal KILL.
```

The solution is to continue enabling the event source so that on_spawn_io()
can continue reading the stdout buffer. When the result buffer is full, the
local `buf` variable will be used to drain remaining stdout.

Co-authored-by: Deli Zhang <deli.zhang@cloud.com>
2025-08-05 10:37:02 +02:00
ButterflyOfFire 1cca606c55 po: Translated using Weblate (Kabyle)
Currently translated at 4.5% (12 of 264 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main
2025-08-05 11:46:17 +09:00
Luca Boccassi 56d362a2df Chores for RC2 (#38473) 2025-08-04 18:09:40 +01:00
Luca Boccassi 8d6cbacbb9 NEWS: update date 2025-08-04 12:26:54 +01:00
Luca Boccassi f5f4a2159b NEWS: update contributors list 2025-08-04 12:26:54 +01:00
Luca Boccassi d245d261ac NEWS: note new items since RC1 2025-08-04 12:26:54 +01:00
Luca Boccassi ff08fca8df hwdb: update autosuspend rules
ninja -C build update-hwdb-autosuspend
2025-08-04 12:26:54 +01:00
Luca Boccassi 8a379827dc hwdb: update
ninja -C build update-hwdb
2025-08-04 12:26:54 +01:00
Yu Watanabe 948b186f46 test-dns-question: use ASSERT_OK_POSITIVE/ZERO() rather than ASSERT_TRUE/FALSE()
Similar to 100a98960a.

E.g. dns_question_contains_key() may return negative errno, hence we
should not use ASSERT_TRUE/FALSE() for the function.

This also has bunch of cleanups:
- call functions in ASSERT_NOT_NULL(),
- add short comments for constant function arguments,
- merge several test cases,
- use memstream, rather than temporal files.

Fixes CID#1619185.
2025-08-04 11:35:03 +01:00
Yu Watanabe 2cc743db4f test: include unistd.h for _exit() used in ASSERT_SIGNAL()
Similar to c56e251d3f.
2025-08-04 10:38:54 +01:00
Yu Watanabe f9711c771a man: fix typo 2025-08-04 05:30:16 +09:00
Yu Watanabe 100a98960a test-dns-answer: fix misuse of ASSERT_TRUE/FALSE()
E.g. dns_answer_match_key() may return negative errno, hence we should
use ASSERT_OK_POSITIVE/ZERO().

This also has bunch of cleanups:
- call functions in ASSERT_NOT_NULL(),
- add short comments for constant function arguments,
- merge several test cases,
- use memstream, rather than temporal files.
2025-08-02 11:02:31 +01:00
dependabot[bot] ca6c192f9c build(deps): bump github/codeql-action from 3.29.2 to 3.29.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.5.
- [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/181d5eefc20863364f96762470ba6f862bdef56b...51f77329afa6477de8c49fc9c7046c15b9a4e79d)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 18:41:41 +01:00
dependabot[bot] e4b2b65f22 build(deps): bump meson from 1.8.2 to 1.8.3 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.8.2...1.8.3)

---
updated-dependencies:
- dependency-name: meson
  dependency-version: 1.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 18:12:00 +01:00
dependabot[bot] 67f213567a build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/f49aabe0b5af0936a0987cfb85d86b75731b0186...05b42c624433fc40578a4040d5cf5e36ddca8cde)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-01 18:11:08 +01:00
Michal Sekletar dcf42d1ee2 sd-bus/bus-track: use install_callback in sd_bus_track_add_name()
Previously we didn't provide any install_callback to
sd_bus_add_match_async() so in case AddMatch() method call timed out we
destroyed the bus connection. This seems overly aggressive and simply
updating the sd_bus_track object accordingly should be enough.

Follow-up for 37ce3fd2b7.

Fixes #32381
2025-08-01 18:09:44 +01:00
Christian Hesse d05a077f16 bpf-dlopen: degrade log_level to LOG_DEBUG in initrd
That's what it used to behave before
4d2b9abbe1.
2025-08-02 02:02:33 +09:00
Yu Watanabe 1afcf37a73 mkosi: update mkosi commit reference to 655baf24474a6f0732ec1b82a71c2f6fe4eeeb49
* 655baf2447 mkosi-initrd: move udev rules files for dm and md
* dec7c3e754 mkosi-vm: Drop tpm_tis change
* 021e3af926 shim: fix log message of installed binary
* 07c24a7d42 mkosi-initrd/vm: ensure TPM2 core modules are installed in the initrd
2025-08-01 16:12:58 +01:00
Graham Clinch 9753ab34cd Correct order for implied time & date specifications.
The text now reads as:
[if] time specification is omitted, 00:00:00 is implied
[if] date specification is omitted, *-*-* is implied
2025-08-01 12:43:44 +01:00
Fabian Vogt f305c8f4a7 virt: Actually use DMI detection on RISC-V as well
When booting Linux with ACPI in QEMU, the device tree is not used and
the DT based detection will not work. DMI values are accurate though
and indicate QEMU.

While detect_vm_dmi_vendor() was enabled for RISC-V in a previous commit,
it missed detect_vm_dmi(), so it was never actually used. Fix that.

Signed-off-by: Fabian Vogt <fvogt@suse.de>
2025-08-01 12:04:22 +01:00
Yu Watanabe 7b20a5cbf3 TEST-13-NSPAWN: wait for a few seconds after markers found
Otherwise, the scope that the nspawn container belonging to may be
removed before the grandchild process of the machined exits and it may
be SIGKILLed.
```
[  100.829613] systemd-machined[678]: Successfully forked off '(sd-bindmnt)' as PID 2962.
[  100.833366] systemd-nspawn[2953]: Inner child finished, invoking payload.
[  100.836111] (sd-bindmnt)[2962]: Skipping PR_SET_MM, as we don't have privileges.
[  100.836401] (sd-bindmnt)[2962]: Successfully forked off '(sd-bindmnt-inner)' as PID 2964.
[  100.846498] (sd-bindmnt)[2962]: (sd-bindmnt-inner) terminated by signal KILL.
[  100.848846] systemd[1]: machine-TEST\x2d13\x2dNSPAWN.machinectl\x2dbind.7ye.scope: cgroup is empty
[  100.849303] systemd[1]: machine-TEST\x2d13\x2dNSPAWN.machinectl\x2dbind.7ye.scope: Deactivated successfully.
[  100.849317] systemd[1]: machine-TEST\x2d13\x2dNSPAWN.machinectl\x2dbind.7ye.scope: Changed running -> dead
[  100.849752] systemd[1]: machine-TEST\x2d13\x2dNSPAWN.machinectl\x2dbind.7ye.scope: Consumed 91ms CPU time, 1.3M memory peak.
[  100.850399] systemd-machined[678]: (sd-bindmnt) failed with exit status 1.
[  100.850414] systemd-machined[678]: Child failed.
[  100.854574] systemd-machined[678]: Failed to mount /tmp/marker-varlink on /tmp/marker-varlink in the namespace of machine 'TEST-13-NSPAWN.machinectl-bind.7ye': Protocol error
```

Hopefully fixes #38434.
2025-08-01 09:49:57 +01:00
Yu Watanabe dfc8de2c7d basic: do not use PROJECT_FILE in one more generated file
Fixes the following build warning:
```
In file included from ../../../home/runner/work/systemd/systemd/src/basic/assert-util.h:4,
                 from ../../../home/runner/work/systemd/systemd/src/basic/forward.h:17,
                 from ../../../home/runner/work/systemd/systemd/src/basic/filesystems.h:4,
                 from src/basic/filesystem-sets.c:2:
src/basic/filesystem-sets.c: In function ‘fs_in_group’:
../../../home/runner/work/systemd/systemd/src/fundamental/assert-fundamental.h:76:9: warning: array subscript 42 is above array bounds of ‘const char[28]’ [-Warray-bounds=]
   76 |         log_assert_failed_unreachable(PROJECT_FILE, __LINE__, __func__)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/basic/filesystem-sets.c:559:18: note: in expansion of macro ‘assert_not_reached’
  559 |         default: assert_not_reached();
      |                  ^~~~~~~~~~~~~~~~~~
```

Follow-up for aca4353ab2.
Similar to fc4a9c9ce6.
2025-08-01 09:49:23 +01:00
Luca Boccassi 24b27a0000 cg: get attribute for requested controller in cg_is_empty
This was changed SYSTEMD_CGROUP_CONTROLLER instead of the provided
parameter, which broke sd-cgls. Change it back.

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

Follow-up for c3f900770d
2025-08-01 08:02:57 +09:00
Luca Boccassi cb88cf9760 udev/node: fix issue in removing device node symlink (#38419)
Fixes #37823.
2025-07-31 23:20:05 +01:00
Luca Boccassi 8cc1748ddc journald: add debug logs around offlining/archiving/rotating/varlink operations
It is not easy to understand what happens to a journal file
even with debug logs enabled. Add more dbg messages around operations
started by users to make it possible to follow the flow of operations.
2025-08-01 05:42:51 +09:00
Luca Boccassi 090b23e051 test: run test-journal-append binary with info level logging
It is ran thousands of times so the logs are overwhelming otherwise
2025-08-01 05:42:51 +09:00
RocketDev 6428c0f480 hwdb: disable Asus ROG keyboards sending poweroff
Asus ROG keyboards seems to send power off key code when keyboard wake
up. Reserve the key codes could suppress this problem.

Devices added: ROG Falchion & ROG Scope

Based on the work by Jon Nettleton:
https://gist.github.com/jnettlet/afb20a048b8720f3b4eb8506d8b05643
2025-08-01 05:41:45 +09:00
Yu Watanabe c574e32fb9 hwdb: several cleanups
- drop trailing spaces,
- replace tabs with spaces,
- align comments.
2025-08-01 05:41:45 +09:00
Yu Watanabe fdb8600575 TEST-64-UDEV-STORAGE: add stress tests for creating/removing device node symlinks
For issue #37823.
2025-08-01 04:09:40 +09:00