Commit Graph

83121 Commits

Author SHA1 Message Date
Jesse Guo
f37c473fc5 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (264 of 264 strings)

po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 07:28:56 +09:00
Jesse Guo
7c23e3bc31 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (264 of 264 strings)

po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 04:39:40 +09:00
Jesse Guo
40e48f74be po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 99.6% (263 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 04:12:29 +09:00
Jesse Guo
fb3efa1ad1 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 99.2% (262 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 01:27:31 +09:00
Jesse Guo
0b22962be6 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 98.8% (261 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-07-27 00:22:34 +09:00
Yu Watanabe
3ea86aa673 TEST-64-UDEV-STORAGE: wait for partition devices being created before calling udevadm trigger
For some reasons, kernel or sfdisk once remove the created partitions
and recreated them. And if 'udevadm trigger' triggers devices currently
being removed, the udevd does not receive the triggered events, and the
command stuck.

```
[   33.150452] TEST-64-UDEV-STORAGE.sh[546]: + sfdisk --wipe=always /dev/md/mdmirpar
[   33.478336] systemd-udevd[442]: md127: Device is queued (SEQNUM=2163, ACTION=change)
[   33.480153] kernel:  md127: p1 p2 p3
[   33.483772] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2164, ACTION=add)
[   33.483914] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2165, ACTION=add)
[   33.484999] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2166, ACTION=add)
[   33.485564] systemd-udevd[442]: md127: Received inotify event of watch handle 164.
[   33.503016] TEST-64-UDEV-STORAGE.sh[546]: + SYSTEMD_LOG_LEVEL=debug
[   33.503016] TEST-64-UDEV-STORAGE.sh[546]: + timeout 30 udevadm trigger --settle --parent-match /dev/md/mdmirpar
[   33.485905] systemd-udevd[442]: Successfully forked off '(udev-synth)' as PID 3208.
[   33.486067] systemd-udevd[442]: md127: Removing watch handle 164.
[   33.489035] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2167, ACTION=remove)
[   33.489048] systemd-udevd[442]: Received inotify event about removal of watch handle 164.
[   33.489507] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2168, ACTION=remove)
[   33.496298] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2169, ACTION=remove)
[   33.500628] systemd-udevd[442]: md127: Device is queued (SEQNUM=2170, ACTION=change)
[   33.502355] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2171, ACTION=add)
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127: Triggered device with action 'change'.
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Triggered device with action 'change'.
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Triggered device with action 'change'.
[   33.512532] systemd-udevd[442]: md127: Device is queued (SEQNUM=2172, ACTION=change, UUID=a0b75692-08ad-428a-859b-9ef8772874d7)
[   33.512666] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2173, ACTION=change, UUID=4cd75a91-aa5b-4678-878c-0420b6c2e1e9)
[   33.512796] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2174, ACTION=add)
[   33.512910] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2175, ACTION=add)
[   33.531834] TEST-64-UDEV-STORAGE.sh[3211]: md127: Got uevent without UUID, ignoring: No such file or directory
[   33.553563] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.561262] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
[   33.562468] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
[   33.563143] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.564174] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.567614] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.597750] TEST-64-UDEV-STORAGE.sh[3211]: md127: Got uevent without UUID, ignoring: No such file or directory
[   33.623522] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.676268] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.686088] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
```

Let's wait for partition devices being actually created, and wait for
all queued events being processed. Then, call 'udevadm trigger'.
2025-07-26 11:20:16 +01:00
Luca Boccassi
b5a7f13a42 tree-wide: bunch of fixlets raised by coverity (#38341) 2025-07-26 11:10:00 +01:00
김인수
7157c7c4a5 po: Translated using Weblate (Korean)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ko/
Translation: systemd/main
2025-07-26 18:34:15 +09:00
Yu Watanabe
08cf7c70b9 fs-util: avoid overflow in MODE_TO_PTR() with MODE_INVALID
Note, currently MODE_TO_PTR() and PTR_TO_MODE() are only used in
src/udev/udev-rules.c .

Fixes CID#1548060.
2025-07-26 05:00:02 +09:00
Yu Watanabe
c119eb0edc install: skip later first_word() calls if one of earlier calls passes
Prompted by CID#1587764, that is false-positive.
2025-07-26 05:00:02 +09:00
Yu Watanabe
635894a493 fuzz-efi-string: add missing OOM check
Fixes CID#1610113 and CID#1610114.
2025-07-26 05:00:02 +09:00
Yu Watanabe
fa43d54b55 delta: add missing error check
Follow-up for 59829bb37a.
Fixes CID#1611425.
2025-07-26 05:00:02 +09:00
Yu Watanabe
2c3b3e2fd9 ordered-set: avoid overflow
Previously, ordered_set_put_strdupv() and friends returns the number of
pushed entries, but that is potentially larger than INT_MAX (of course,
realistically, OOM is triggered in that case).

No caller uses the number of the new entries. Let's return 1 when at
least one element is added.

Fixes CID#1611523.
2025-07-26 05:00:02 +09:00
Yu Watanabe
6ce3b1fa33 test: add explicit test cases for cpu_set_add() and cpu_set_add_range()
cpu_set_add_range() is used in parse_cpu_set(), hence already tested.
But it is better to test these functions explicitly.

For CID#1611787 and CID#1611788, that should be false-positive.
2025-07-26 05:00:02 +09:00
Yu Watanabe
d54f1e4329 cpu-set-util: check if cpu set is already allocated
Prompted by CID#1611789, CID#1611790, and CID#1611791.
2025-07-26 04:59:58 +09:00
Luca Boccassi
bcc73cafdb bootctl: automatically set --graceful when running in chroot
Installing stuff in a chroot should not fail because efivars are
not available. When running in a container touching efivars is
completely disabled, but there are some cases (recovery) where
it is needed to touch them in a chroot, so don't disable them but
avoid failing the run instead.
2025-07-25 20:44:03 +01:00
Luca Boccassi
a3eb0e99d3 cgroup-util: enforce alignment of f_handle
The change in 4d2e61211d
broke armv7 where uintptr_t is 4 bytes:

/* test_id */
Assertion '((uintptr_t) _p) % alignof(uint64_t) == 0' failed at src/basic/cgroup-util.c:108, function cg_get_cgroupid_at(). Aborting.

(gdb) p (uintptr_t)fh.file_handle.f_handle % _Alignof(uint64_t)
$9 = 4

Enforce that the structure is aligned as expected

Follow-up for 4d2e61211d
2025-07-25 20:42:23 +01:00
Yu Watanabe
04a99c48d2 cpu-set-util: fix identical ternary expression
Follow-up for fe3ada076e.
Fixes CID#1611792.
2025-07-26 03:44:49 +09:00
Yu Watanabe
1f4e9f6d60 core/exec-invoke: check size of read size
Even though we do not use the read data, it is better to check the size
to prevent something spurious going.

Fixes CID#1612155.
2025-07-26 03:44:49 +09:00
Yu Watanabe
4d13e4dcbb resolved: use usec_add() at one more place
Follow-up for 8458b7fb91.
Fixes CID#1612580.
2025-07-26 03:44:49 +09:00
Luca Boccassi
d6a70c1523 syscalls table: add sh (#38338) 2025-07-25 19:23:00 +01:00
Luca Boccassi
a50c687b01 syscalls-table: add sh and regenerated table 2025-07-25 17:17:28 +01:00
Luca Boccassi
481e2ceaed Meson: clean up "finding" of helper scripts (#38335)
Simplify meson definitions and use `files()` instead of `find_program()`
for internal scripts to make build logs cleaner.
2025-07-25 17:10:27 +01:00
Zbigniew Jędrzejewski-Szmek
5e405f612e meson: add instructions for adding new arch to syscall.h 2025-07-25 17:53:48 +02:00
Zbigniew Jędrzejewski-Szmek
4c4a63a876 meson: indent find_program() calls for readability 2025-07-25 14:04:17 +02:00
Zbigniew Jędrzejewski-Szmek
c5dcbd073e meson: use files() not find_program() for helper scripts
We went back and forth between 'prog.sh', files('prog.sh'), and
find_program('prog.sh'). We want to use files() or find_program() so that we
get a good error message if the file is missing. Behaviour of meson changed
over time, and in the past not all forms could be used in all places. For
example 0f4c4f3824 added find_program() in many
places to avoid repeated messages. But it seems that all recent meson versions
work fine with files().

find_program prints silly messages:
  Program tools/make-man-index.py found: YES
       (/home/zbyszek/src/systemd/tools/make-man-index.py)
  Program tools/meson-render-jinja2.py found: YES
       (/home/zbyszek/src/systemd/tools/meson-render-jinja2.py)
  ...
We know that those files will be found, they are part of the git checkout.
With files() this is gone and the meson output is easier to read.
2025-07-25 14:04:17 +02:00
Zbigniew Jędrzejewski-Szmek
8aedfd979f tools: make all .py program files executable
All those files are standalone programs that can be executed directly.
Some .py files were marked executable, others weren't, probably accidentally.
Mark them all as executable in preparation for subsequent changes.
2025-07-25 12:33:13 +02:00
Zbigniew Jędrzejewski-Szmek
0bf9bbecae tools: consistently use #!/usr/bin/env python3
It's ugly, but it's better to be consistently ugly.
2025-07-25 12:33:13 +02:00
Zbigniew Jędrzejewski-Szmek
0e371ebb12 man: consistently use #!/usr/bin/python
Some files were using that, others weren't. Since those are user-facing
docs, we should use the nice clean form, not the workaround for strange
systems that we use in other places.
2025-07-25 12:33:13 +02:00
Zbigniew Jędrzejewski-Szmek
0e031d5e0b meson: inline output file names
Before 7d247d3cb8, we needed the file name
twice. But now we only need it once, so no need to overcomplicate things
by defining a variable with a single use.

When a variable is used, it's also easier to make a mistake and e.g.
accidentally reuse the variable later.
2025-07-25 12:33:13 +02:00
Zbigniew Jędrzejewski-Szmek
92716a079f Logging fixlets (#38313) 2025-07-25 12:27:24 +02:00
Yu Watanabe
dda9eeb081 test-sd-device: filter out dm block devices at several more places
Follow-up for 911a52b769.

Fixes #38332.
2025-07-25 11:03:31 +01:00
Luca Boccassi
9263c6f57e test: modernize test-oomd-util (#38329) 2025-07-25 11:01:32 +01:00
Yu Watanabe
7bef072ca9 test: stop firewalld and friends to make them not disturb test-firewall-util
Hopefully fixes #35526.
2025-07-25 10:58:17 +01:00
Luca Boccassi
c8082ac09c test: wait for userspace mount options applied (#38327)
Hopefully fixes #32712.
2025-07-25 10:57:13 +01:00
Nick Labich
85e9805903 sysupdate: Prevent unnecessary failure when a transfer Path is not present
Fixes https://github.com/systemd/systemd/issues/38007
2025-07-25 10:53:48 +01:00
Yu Watanabe
c4ffd0a020 errno-list: fallback to use our errno name table
Some architecture specific errno may not be known by glibc.
Let's fallback to our table when strerrorname_np() returns NULL.

Fixes the following error in mips:
```
src/test/test-errno-list.c:14: Assertion failed: Expected "errno_to_name(i) == errno_names[i]", got "(null) != EINIT"
```

Follow-up for 03ccee1939.
2025-07-25 10:50:45 +01:00
Martin Srebotnjak
111e2a106c po: Translated using Weblate (Slovenian)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2025-07-25 09:20:26 +09:00
Yu Watanabe
b089f65676 test: modernize tests.c and tests.h
- use ASSERT_OK() and friends,
- use mkdtemp_malloc(),
- use pidref_safe_fork() and pidref_wait_for_terminate_and_check().
2025-07-25 09:10:25 +09:00
Yu Watanabe
468b10b188 test: modernize test-oomd-util
- use DEFINE_TEST_MAIN() macro,
- use ASSERT_OK() and friends,
- drop restriction that the test must run as root,
- replace sleep(2) with loop of shorter sleep and cg_is_empty(),
- applied several coding style cleanups.
2025-07-25 09:09:20 +09:00
Yu Watanabe
621998dd39 test: several fixlets for journal related failures (#38308)
Hopefully fixes #37818, #37143, #38287.
2025-07-25 08:03:08 +09:00
Luca Boccassi
0997a60aee core/dbus-manager: validate unit type before calling into service-specific methods (#38323)
Fixes #38320
2025-07-24 23:17:41 +01:00
Yu Watanabe
3f6e7ac27a TEST-10-MOUNT: wait for userspace mount options being loaded
When a device is mounted with userspace options such as _netdev, even when the mount event source is
triggered, only /proc/self/mountinfo may be updated, and /run/mount/utab may not be updated yet.
Hence, the mount unit may be created/updated without the userspace options. In that case, the mount
event source will be retriggered when /run/mount/utab is updated, and the mount unit will be updated
again with the userspace options. Typically, the window between the two calls is very short, but when
the mount event source is ratelimited after the first event, processing the second event may be delayed
about 1 secound. Hence, here we need to wait for a while.

By adding a debugging logs in mount_setup_unit(), the userspace mount is
not obtained in the first event, and the second event is delayed by the ratelimit.
```
[   20.023086] H TEST-10-MOUNT.sh[446]: + mount -t ext4 -o _netdev /dev/loop1p1 /tmp/deptest
[   20.026255] H kernel: EXT4-fs (loop1p1): mounted filesystem c1fa00ea-2ba8-46b2-9002-2ac997f4cda9 r/w with ordered data mode. Quota mode: none.
[   20.026537] H TEST-10-MOUNT.sh[446]: + timeout 10 bash -c 'until systemctl -q is-active tmp-deptest.mount; do sleep .1; done'
[   20.032293] H systemd[1]: tmp-deptest.mount: mount_setup_unit: proc: yes, netdev: no
[   20.035978] H systemd[1]: Unit blockdev@dev-loop1p1.target has alias blockdev@.target.
[   20.039765] H systemd[1]: tmp-deptest.mount: Changed dead -> mounted
[   20.046598] H systemd[1]: Event source 0x7c73093e05e0 (mount-monitor-dispatch) entered rate limit state.
```

Hopefully fixes #32712.
2025-07-25 04:54:42 +09:00
Yu Watanabe
1edc81aa13 TEST-10-MOUNT: make cleanup function run on error 2025-07-25 04:54:42 +09:00
Yu Watanabe
8002f0cf27 TEST-60-MOUNT-RATELIMIT: use reload to make new config applied 2025-07-25 04:54:42 +09:00
Yu Watanabe
62c3f42deb test: move testcase_dependencies() to TEST-10-MOUNT
TEST-60-MOUNT_RATELIMIT is run on nspawn by default, and currently run
on vm only on arch mkosi. Let's move the test case to new TEST-10-MOUNT,
which always run on vm.
2025-07-25 04:54:42 +09:00
Yu Watanabe
1227795362 integration-test: mention TEST_SAVE_JOURNAL in README 2025-07-25 04:54:42 +09:00
Yu Watanabe
8269396078 integration-test: show journalctl command for showing saved journal when TEST_SAVE_JOURNAL=1 2025-07-25 04:54:38 +09:00
Matteo Croce
afef98ecf8 NEWS: document BPF delegate options
Document the new BPF delegate options, AKA BPF tokens.
2025-07-25 03:06:36 +09:00
joo es
7ca0182fba po: Translated using Weblate (Arabic)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: joo es <jonnyse@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ar/
Translation: systemd/main
2025-07-25 01:28:35 +09:00