Commit Graph
80130 Commits
Author SHA1 Message Date
Yu Watanabe 80ffdb8d54 udev-builtin: add missing UDEV_RELOAD_BUILTIN_FACTORY_RESET 2025-03-17 12:42:28 +09:00
Yu Watanabe f1ad44d688 udev-builtin: align builtins table 2025-03-17 12:42:28 +09:00
Y T 58b33eee41 po: Translated using Weblate (Japanese)
Currently translated at 100.0% (261 of 261 strings)

Co-authored-by: Y T <yi818670@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ja/
Translation: systemd/main
2025-03-17 12:30:36 +09:00
Yu Watanabe db2db8cc60 run: trivial followups (#36765) 2025-03-17 12:27:49 +09:00
Mike Yuan 2fb10b3cfb run: refuse --pty-late for Type=oneshot services
Such combination makes no sense, as by the time the start job
of the oneshot service finishes the main process has already
exited.

Addresses https://github.com/systemd/systemd/pull/36691#discussion_r1988116881
2025-03-17 01:37:29 +01:00
Mike Yuan 647ff4b65e run: void'ify sd_event_exit() call 2025-03-17 01:37:29 +01:00
Mike Yuan 99a7386a9e run: "trigger" consists of more than timer units 2025-03-17 01:37:29 +01:00
Yu Watanabe 369c232538 nspawn: introduce --cleanup option (#34776)
This is useful when the previous invocation is unexpectedly killed.

Otherwise, if systemd-nspawn is killed forcibly, then unix-export
directory is not cleared and unmounted, and the subsequent invocation
will fail. E.g.
```
[   18.895515] TEST-13-NSPAWN.sh[645]: + machinectl start long-running
[   18.945703] systemd-nspawn[1387]: Mount point '/run/systemd/nspawn/unix-export/long-running' exists already, refusing.
[   18.949236] systemd[1]: systemd-nspawn@long-running.service: Failed with result 'exit-code'.
[   18.949743] systemd[1]: Failed to start systemd-nspawn@long-running.service.
```
2025-03-17 06:53:46 +09:00
Jordan Petridis 8285c97b97 meson: Check for lxml before generating indicies
Followup to c0cc01de8a

The targets that create indicies have
`install : want_html and have_lxml` but some other
code like the `install_symlink` was not gated by
accident.

We ican put the whole loop behind have_lxml as its
required for all the indicies.
2025-03-17 06:51:52 +09:00
Mike Yuan cd1af37263 cgroup v1 preliminaries (#36622) 2025-03-16 20:27:48 +01:00
Mike Yuan 08395f86e1 man: remove libsystemd reference to legacy hierarchy 2025-03-16 18:02:08 +01:00
Mike Yuan b66fd12135 cgroup-util: drop is_cgroup_fs()
No need to bother with any cgroup v1 stuff anymore.
2025-03-16 18:02:08 +01:00
Mike Yuan 399791eaf0 core/taint: we know we're always running on cgv2 now 2025-03-16 18:02:07 +01:00
Mike Yuan 2b61489e5a core/main: refuse bootup with legacy cgroup hierarchy
First step towards a unified-only future (rework of internals
coming soon (TM))
2025-03-16 15:30:39 +01:00
Mike Yuan 8d538d3fbb cgroup-setup: drop hierarchy detection, always use v2 2025-03-16 15:30:39 +01:00
Mike Yuan 36dad381a2 mount-setup: remove cgroup v1 hierarchy mounting 2025-03-16 15:30:38 +01:00
Mike Yuan 4cfb89c7f6 semaphore-runner: disable cgroup setup in lxc
lxc tries to mount /sys/fs/cgroup/ following host hierarchy by default,
which is problematic for us since we want to unconditionally use
cgroup v2 in cgns. Disable it hence and let pid1 figure it out.
2025-03-16 15:30:38 +01:00
Mike Yuan 43a89307bf semaphore-runner: drop outdated comment 2025-03-16 15:22:13 +01:00
Mike Yuan 64db06c421 mount-setup: generalize cgroupfs_recursiveprot_supported() 2025-03-16 15:22:13 +01:00
Yu Watanabe f0d7613466 test-execute: use time event source rather than custom timeout check
Fixes CID#1593786.
2025-03-16 12:38:23 +00:00
Yu Watanabe 15a46a961f TEST-13-NSPAWN: re-enable KILL test 2025-03-16 11:03:32 +09:00
Yu Watanabe c06a630f0c nspawn: introduce --cleanup option to clear propagation and unix-export directories
This is useful when the previous invocation is unexpectedly killed.

Otherwise, if systemd-nspawn is killed forcibly, then unix-export
directory is not cleared and unmounted, and the subsequent invocation
will fail. E.g.
===
[   18.895515] TEST-13-NSPAWN.sh[645]: + machinectl start long-running
[   18.945703] systemd-nspawn[1387]: Mount point '/run/systemd/nspawn/unix-export/long-running' exists already, refusing.
[   18.949236] systemd[1]: systemd-nspawn@long-running.service: Failed with result 'exit-code'.
[   18.949743] systemd[1]: Failed to start systemd-nspawn@long-running.service.
===
2025-03-16 11:02:09 +09:00
Yu Watanabe 27cc77b746 Fix bootctl status to not print strange glyphs in logs (#36745) 2025-03-16 05:56:55 +09:00
Yu Watanabe 758dc1e370 network: fix unexpected removal of routes on restart even when KeepConfiguration=yes (#36756) 2025-03-15 23:19:49 +09:00
Zbigniew Jędrzejewski-Szmek 6012a52aba bootctl: do not print special glyphs to the log
The log line looked like this:
  bootctl[1457]: ! Mount point '/efi' which backs the random seed file is world accessible, which is a security hole! !
which doesn't look nice.

Also upgrade the message to error. This is something to fix.
2025-03-15 14:40:52 +01:00
Zbigniew Jędrzejewski-Szmek 75d51d77da basic/glyph-util: introduce optional_glyph() to wrap emoji_enabled() 2025-03-15 14:40:52 +01:00
Zbigniew Jędrzejewski-Szmek 1ae9b0cfa8 basic/glyph-util: rename "special glyph" to just "glyph"
Admittedly, some of our glyphs _are_ special, e.g. "O=" for SPECIAL_GLYPH_TOUCH ;)
But we don't need this in the name. The very long names make some invocations
very wordy, e.g. special_glyph(SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY).
Also, I want to add GLYPH_SPACE, which is not special at all.
2025-03-15 14:40:39 +01:00
Luca Boccassi 32f66088de several fixes for Coverity (#36753) 2025-03-15 11:46:14 +00:00
Yu Watanabe e92d699dde test-cgroup-util: allow ESRCH in cg_pidref_get_path() and friends
As the process may be already dead.

Follow-ups for ca82f0cbe2.
2025-03-15 10:51:28 +09:00
Matteo CroceandYu Watanabe 912a48572d test-network: check that network configuration is stable with KeepConfiguration=yes
Check that when networkd restarts, and the network configures
KeepConfiguration=yes, the network configuration is never changed.

Ensure this by dumping the `ip monitor` output when networkd is restarting.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2025-03-15 10:26:20 +09:00
Yu Watanabe cf28def391 network: do not remove static routes on other interfaces that are currently in the pending state
Otherwise, even if .network file has KeepConfiguration=yes, routes on
an interfaces may be removed on restart.

Fixes a bug introduced by 8d01e44c1f.
2025-03-15 10:26:20 +09:00
Yu Watanabe d9000d708c test: drop redundant parentheses in ASSERT_OK() and friends
This reverts 278e3adf50, and drop more
redundant parentheses, as they unfortunately does not suppress the
false-positive warnings by coverity.
2025-03-15 09:08:06 +09:00
Yu Watanabe 88f4650f22 meson: handle bool-compare warning as error
Then we can detect the error fixed by the previous commit like the following:

../src/libsystemd/sd-device/test-sd-device.c: In function ‘test_sd_device_enumerator_add_all_parents’:
../src/shared/tests.h:225:51: error: comparison of constant ‘0’ with boolean expression is always true [-Werror=bool-compare]
  225 | #define ASSERT_OK(expr) __coverity_check__((expr) >= 0)
      |                                                   ^~
../src/libsystemd/sd-device/test-sd-device.c:547:9: note: in expansion of macro ‘ASSERT_OK’
  547 |         ASSERT_OK(sd_device_enumerator_add_all_parents(e) >= 0);
      |         ^~~~~~~~~
2025-03-15 08:56:38 +09:00
Yu Watanabe 09e0ce8010 test: fix wrong use of ASSERT_OK() and friends 2025-03-15 08:56:38 +09:00
Yu Watanabe 83340eb1fa tests: replace ASSERT_OK() and friends with coverity firendy function
We already have done the same for assert_se() since
d9fb7afb48.

Hopefully this makes coverity silent about the false-positive side-effect
warnings.
2025-03-15 08:56:38 +09:00
Yu Watanabe 0e3e424261 test-macro: CONST_MAX() and friends may return (void*)0 when built under coverity
See 963c6c90af.
2025-03-15 08:56:38 +09:00
Andrii Chubatiuk 5209e9cb05 journal-remote: added custom headers support 2025-03-15 07:27:38 +09:00
Lennart Poettering e5dfe2cd8d udevadm: check number of passed arguments
We didn't check the number of arguments first, hence ended up outputting
some ugly complaints with `(null)` in a format string. And what's worse
accepted any number of arguments, where we'd ignore all but the first
two though.
2025-03-15 05:12:46 +09:00
Lennart Poettering d810815ed4 firstboot: welcome user with emoji in firstboot wizard 🧙 2025-03-15 05:12:12 +09:00
Zbigniew Jędrzejewski-Szmek 3a15daf440 Restore docs/PAX_CONTROL_GROUPS
This partially reverts 8d04b8198d.
If we completely drop the file, users will get a 404. But this document
has been in place for a long time and is referred to in many other places,
incl. our old wiki at https://www.freedesktop.org/wiki/Software/.
The page already says that it's been replaced
("… Please consult this document only as a historical reference. …").
We should only remove it from the index (which
8d04b8198d did).

In general, let's be more careful about preserving link stability.
When we change something in a way that breaks URLs, we're creating
pain for users.
2025-03-14 20:33:37 +09:00
Zbigniew Jędrzejewski-Szmek 51eab4afa6 docs/ROOTFS_DISCOVERY: removed doubled dot
Inadvertent change in 487b95d9b6.
2025-03-14 11:06:37 +01:00
Luca Boccassi 104587314f mkosi: update debian commit reference
* d8c7f8f7f4 Update changelog for 257.4-2 release
* f74cf88300 Split bootctl to new systemd-boot-tools package
* 10a8764966 Update changelog for 257.4-1 release
2025-03-14 05:25:20 +09:00
Lennart Poettering e707d0459c analyze: don't connect to bus from analyze test run (#36719)
This thing should not be "live", hence don't try to connect to the bus,
or bind the private bus socket.

Fixes: #36540
2025-03-13 17:51:45 +01:00
Lennart Poettering 96a0cfbf47 emergency-action: sleep 5s before rebooting in various cases
This adds a new EMERGENCY_ACTION_SLEEP_5S flag, which when set will
delay the emergency action for 5s. This is supposed to be used together
with EMERGENCY_ACTION_WARN so that users can actually read the message
we output.

We enable this with all emergency action requests that already set
EMERGENCY_ACTION_WARN, except for the 7x ctrl-alt-del burst reboot,
where the user knows what they do and there's no real reason to wait,
they don't need to be informed.

This also enables both EMERGENCY_ACTION_WARN + EMERGENCY_ACTION_SLEEP_5S
for FailureAction= processing of regular units, where these were so far
off. (it leaves this off for SuccessAction= however!). This is a good
thing to make things more debuggable: if something fails and we reboot
this really deserves notification of the user.

(For SuccessAction= this logic does not apply, since the shutdown action
induced here is apparently intended part of the codeflow, for example in
systemd-reboot.service or a similar unit, where the shutdown is goal and
not exception and derserves no additional noisy reporting).

Inspired by: https://github.com/systemd/systemd/pull/36705#issuecomment-2717014120
2025-03-13 17:03:42 +01:00
Zbigniew Jędrzejewski-Szmek 487b95d9b6 docs/ROOTFS_DISCOVERY: minor wording and syntactic improvements 2025-03-13 16:05:03 +01:00
Lennart Poettering 66c2a2e42a test-execute: prominently show which test we are about to enter 2025-03-13 14:22:13 +01:00
Lennart Poettering 2544075c0b execute: add some minor debug logging 2025-03-13 14:22:13 +01:00
Lennart Poettering ec5bcf0b69 pid1: don't connect to oomd in test runs 2025-03-13 14:22:13 +01:00
Lennart Poettering 71a737d68d analyze: don't connect to bus from analyze test run
This thing should not be "live", hence don't try to connect to the bus,
or bind the private bus socket.

Fixes: #36540
2025-03-13 14:22:13 +01:00
Lennart Poettering e75fbee624 manager: explicitly create our private runtime directory
So far /run/systemd/ was created as side-effect of initializing the
D-Bus client/server. But in one of the next commits we'll suppress
connecting to D-Bus in test runs, hence let's move the logic our of the
D-Bus code and into manager_startup().

Then, also drop creating it again and again in PID 1 at various places,
and just rely on it to exist.
2025-03-13 14:22:13 +01:00