Commit Graph

83094 Commits

Author SHA1 Message Date
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
Temuri Doghonadze
7f72277877 po: Translated using Weblate (Georgian)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Temuri Doghonadze <temuri.doghonadze@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ka/
Translation: systemd/main
2025-07-25 01:28:35 +09:00
Américo Monteiro
01bb233195 po: Translated using Weblate (Portuguese)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Américo Monteiro <a_monteiro@gmx.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pt/
Translation: systemd/main
2025-07-25 01:28:35 +09:00
Piotr Drąg
25c3bbec93 po: Translated using Weblate (Polish)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Piotr Drąg <piotrdrag@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pl/
Translation: systemd/main
2025-07-25 01:28:35 +09:00
Léane GRASSER
2f186c9dcc po: Translated using Weblate (French)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2025-07-25 01:28:35 +09:00
Luca Boccassi
c1fb58cc48 vmspawn: add machine types for m68k/sparc64 and default to 'none' if unknown
Qemu has a 'none' machine that can be used for very basic booting
on weird arches, just default to that unless otherwise specified
2025-07-24 17:11:14 +01:00
Luca Boccassi
50095c51fc tpm2-clear: build only if bootloader/openssl are enabled
The tpm2-clear units are only installed if tpm/bootloader/ssl are
enabled. The tpm2-setup binary/units are built and installed only
if tpm/bootloader/ssl are enabled.
Do the same for the tpm2-clear binary to keep it consistent.
2025-07-24 17:10:17 +01:00
Mike Yuan
c8895f5b0f TEST-07-PID1: add test case for #38320 2025-07-24 16:35:45 +02:00
Yu Watanabe
8f1a452e4a test: various cleanups for TEST-04-JOURNAL.journal-reload.sh
- rename to TEST-04-JOURNAL.reload.sh,
- use trap to call cleanup(),
- use systemd-run to write journals, to make each journal entries to be
  distinguished by the service name,
- greatly simplifies verify_journals(),
- drop unnecessary calls of sleep command, etc, etc.

Follow-ups for df5b3426f6.
Hopefully fixes #38287.
2025-07-24 23:27:21 +09:00
Mike Yuan
39a8029f4e core/dbus-manager: validate unit type before calling into service-specific methods
Fixes #38320
2025-07-24 16:08:45 +02:00
Mike Yuan
5c94f12fa6 core/dbus-manager: don't ever try to dump fdstore for units not properly loaded 2025-07-24 16:07:28 +02:00
Yu Watanabe
8cfffab0e5 journal: clear cached journal storage space before vacuum journals
Otherwise, the cached storage space may be calculated based on the old
journald.conf settings.

Follow-up for 922d037f34 and
df5b3426f6.
2025-07-24 21:18:16 +09:00
Yu Watanabe
7532bc8718 TEST-04-JOURNAL: use bash to make builtin echo command used
When non-builtin echo command is used, then the command may exit before
journald find the source of the stream, and the log filtering may not be
applied.

Hopefully fixes #37143.
2025-07-24 20:55:10 +09:00
Yu Watanabe
052e2cfbb8 TEST-07-PID: journalctl -u may not work for short living processes
Hopefully fixes #37818.
2025-07-24 20:55:10 +09:00
Yu Watanabe
a532879c65 test: drop executable flag from prefix-shell.service 2025-07-24 20:55:10 +09:00
Yaping Li
603916702d test-memstream-util.c: Migrate to new assertion macros
We recently added a new set of assertion macros such as ASSERT_GE, ASSERT_OK, ASSERT_EQ, ... which show not
only the expression that failed but also the values of the arguments of the expression. Let's use them.
2025-07-24 20:45:35 +09:00
Luca Boccassi
486fa5ece6 LICENSES/README: update file paths after moves
Follow-up for 1a60b97524
2025-07-24 20:44:19 +09:00
Luca Boccassi
28eec22f2f Fix typos found by Lintian 2025-07-24 11:38:47 +02:00
Zbigniew Jędrzejewski-Szmek
56631ac8df udev: downgrade ENOMEDIUM warnings
I noticed similar warnings in many VM boots:
  fedora (udev-worker)[475]: sr0: Failed to open device node: No medium found
This particular one is from src/udev/udev-builtin-uaccess.c:125, but I think the
same principle should be used in all places: if we are ignoring errors that the
device has been removed, we should also ignore ENOMEDIUM.
2025-07-24 10:42:50 +02:00
Zbigniew Jędrzejewski-Szmek
b0ca060e05 core/socket: shorten/reword message about restarted sockets
log_unit_warning() already prints the full unit name, so we don't need to say
that it is a socket unit. And in technical messages articles like "the" are
generally skipped to make the messages shorter. Use simpler tense and simpler
wording.

Example from log: fedora.local systemd[1]: systemd-initctl.socket: Socket unit
        configuration has changed while unit has been running, no open socket file
        descriptor left. The socket unit is not functional until restarted.
This is just too wordy and says "socket" four times.
2025-07-24 10:29:23 +02:00
Zbigniew Jędrzejewski-Szmek
91085f308f NEWS: add description for DHCPv6 SIP feature
Also move the description of IPv4DuplicateAddressDetectionTimeoutSec=
to the section about systemd-networkd. The change of the timeout doesn't
have to be described as "incompatible". It's more of a bugfix, the previous
timeout was just strangely large and hopefully nobody relied on this detail
of implementation.

Also, reword to say that MPLSRouting= just controls enablement, nothing more.
2025-07-24 09:01:12 +02:00
Zbigniew Jędrzejewski-Szmek
806efaf223 NEWS: some typos and whitespace fixes 2025-07-24 09:00:57 +02:00
Yaping Li
741444797f test-unit-serialize.c: Migrate to new assertion macros
We recently added a new set of assertion macros such as ASSERT_GE, ASSERT_OK, ASSERT_EQ, ... which show not
only the expression that failed but also the values of the arguments of the expression. Let's use them.
2025-07-24 07:27:58 +09:00
Cosima Neidahl
f950919251 meson: Detect ELF ABI version for bpf build on ppc64 (#38307)
On 64-bit POWER, there are multiple versions of the ELF ABI in use.

- little-endian powerpc64 is ELFv2
- big-endian powerpc64 is
  - ELFv2 when using musl
  - either ELFv1 or ELFv2 when using glibc

Previously, the BPF build was hard-coding `-D_CALL_ELF=2`, which is
ELFv2. This makes the build fail on ELFv1, similarly to the original
issue that necessitated the addition of this flag on powerpc64le.

To fix this:

1. Use ELFv1 as the default (when `_CALL_ELF` is not defined, this is
the assumption that should be made about the ABI version).
2. Check if the C compiler has `_CALL_ELF` defined, and if it does,
override the default with that.
That's technically not the *correct* compiler in this situation, but I'm
unsure how to get a compiler object for the BPF one from Meson to do the
`*_define('_CALL_ELF')` checks with, and they *should* both be targeting
the same ABI version anyway.
3. Add the ABI version to the `_CALL_ELF` definition for the BPF
compiler flags.

This makes a BPF-enabled build succeed on powerpc64 w/ ELFv1 glibc.
2025-07-24 05:42:13 +09:00
Yu Watanabe
349d1240a0 po: update Japanese translations 2025-07-24 03:02:57 +09:00
Weblate
a4fdb84205 po: Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/
Translation: systemd/main
2025-07-24 03:00:42 +09:00
Yu Watanabe
2a860e8a8d Revert "po: update Japanese translations"
This reverts commit 59af98ab20.

The commit conflicts with Weblate's one. Tentatively revert the commit to
resolve the conflict.
2025-07-24 02:58:07 +09:00
Yu Watanabe
59af98ab20 po: update Japanese translations 2025-07-24 02:29:57 +09:00