Commit Graph
80652 Commits
Author SHA1 Message Date
Daan De Meyer a0ce5e642f test: Install files required to run integration tests standalone
Let's make it possible to run the integration tests without requiring
the sources by installing the mkosi and integration-tests directories.
2025-04-08 13:02:24 +02:00
Luca Boccassi 442d8c3f06 TEST-04-JOURNAL: include util.sh before calling cgroupfs_supports_user_xattrs() (#37039)
Fixes a bug introduced by 46322f2742
(v256).
Fixes #36991.
2025-04-08 09:52:13 +01:00
Yu Watanabe f0cf0c9ba7 TEST-17-UDEV: several follow-ups (#37042) 2025-04-08 16:43:03 +09:00
Luca Boccassi a088ab8d42 udev: fix potential stuck on exit (#37022)
If an event is requeued after termination is requested, previously
systemd-udevd never called sd_event_exit() and stuck.
2025-04-07 23:54:23 +01:00
Jules Lamur 06fadc4286 fstab-generator: fix options in systemd.mount-extra= arg
Fixes a bug introduced by 55365b0a23 (v254).

The arguments `(rd.)systemd.mount-extra` take a value that looks like
`WHAT:WHERE[:FSTYPE[:OPTIONS]]`. The `OPTIONS` were parsed into a nulstr
where a comma-separated c-string was expected. This leads to a bug where
only the first option was taken into account by the generator.

For example, if you passed `systemd.mount-extra=/x:/y:baz:ro,defaults`
to the kernel, `systemd-fstab-generator` would translate that into a
nulstr: `ro\0defaults\0`.
Since methods processing options in the generator expected a
comma-separated c-string, they would only see the first option, `ro` in
this case.
2025-04-08 07:10:07 +09:00
Luca Boccassi 5f8e5297b4 test: switch to new config keyword for bind9 >= 9.21
bind9 9.21 removed the deprecated 'managed-keys', swap it with
'trust-anchors' if the version is 9.21 or newer

[   20.654086] TEST-75-RESOLVED.sh[1217]: + delv -a /etc/bind.keys @ns1.unsigned.test signed.test
[   20.654425] TEST-75-RESOLVED.sh[1218]: + tee /tmp/tmp.D4LNomAKqY
[   20.672599] TEST-75-RESOLVED.sh[1218]: ;; /etc/bind.keys:1: option 'managed-keys' no longer exists
2025-04-08 07:09:26 +09:00
Yu Watanabe 9e372b643b TEST-04-JOURNAL: sync journal in test script, and find journal with invocation ID
Hopefully improve the stability of the test.
2025-04-08 06:56:52 +09:00
Yu Watanabe 86d59686b7 TEST-04-JOURNAL: include util.sh before calling cgroupfs_supports_user_xattrs()
Fixes a bug introduced by 46322f2742 (v256).
Fixes #36991.
2025-04-08 06:39:06 +09:00
Yu Watanabe ae84aa286a TEST-17-UDEV: fd may be >= 10
Follow-up for db5d89309a.
2025-04-08 06:16:14 +09:00
Yu Watanabe 9f7ddd2955 TEST-17-UDEV: update rules filename
Follow-up for 40959dcc02.
2025-04-08 06:15:22 +09:00
Yu Watanabe bd05126399 nspawn-oci: replace use of deprecated cgroup v1 properties with v2 ones (#37038) 2025-04-08 05:28:11 +09:00
Luca Boccassi 2a9f618276 base-filesystem: avoid creating /lib64 symlink on existing rootfs
While all distributions agree on where the basic rootfs symlinks
(/bin /sbin /lib) should point to, not all of them agree on the
target of /lib64. Debian and derivatives, expect something different
than Fedora et al. This is mostly due to the different way multiarch
vs multilib are designed.

This can lead to the situation where running systemd-nspawn on Fedora
to boot a Debian container creates an incompatible symlink in the guest
persistent, pre-created and pre-populated root filesystem, causing
issues due to these incompatibilities.

While it would be great if Debian and derivatives had the same
expectations as the rest of the world, this is baked in many places
and not likely to ever be fixable, as the multiarch vs multilib
behaviours are now very entrenched, and changing it would break
compatibilities left and right.

The core purpose of base-filesystem was to allow bringing up a system
with an empty/ephemeral/etc rootfs (and a /usr/ image on top). So as
a workaround, create /lib64 only if we detect that we have created
/bin /lib and /sbin, as that's a sure sign we are booting into an
empty rootfs that needs to be populated.
Conversely, if the filesystem _already_ has /bin /sbin and /lib,
it means it is not ephemeral and it is pre-prepared and persistent,
so it's a good idea to avoid second-guessing the image builder tool
or the package manager and override what it does, and just let them
carry on with the system however they configured it.

Reworked and reworded, original author: Helmut Grohne <helmut@subdivi.de>
2025-04-08 05:27:31 +09:00
Vitaly Kuznetsov f501830595 man: mention "overlay" as a possible option for systemd.volatile
systemd.volatile=overlay is described in the text below, however, it
is missing in the enclosed list of possible options in the beginning.
2025-04-08 02:29:29 +09:00
Yu Watanabe aed61aa382 nspawn/oci: replace use of deprecated BlockIOWeight/BlockIODeviceWeight with IOWeight/IODeviceWeight 2025-04-08 02:08:37 +09:00
Yu Watanabe 173ffdaffb nspawn/oci: replace use of deprecated CPUShares with CPUWeight 2025-04-08 02:08:37 +09:00
Yu Watanabe b7fb6ec34f nspawn/oci: also set CPUQuotaPeriodUSec DBus property 2025-04-08 02:08:37 +09:00
Yu Watanabe c019af5eed test-notify-recv: fix message string
Follow-up for 2351bc991e.
Addresses https://github.com/systemd/systemd/pull/37016#discussion_r2031363409.
2025-04-08 02:04:13 +09:00
Yu Watanabe b135cb321a udev: drop unnecessary discardment of queued events
With the previous commit, now on_post_exit() checks only events
currently being processed. Hence, it is not necessary to discard
queued events in manager_exit().

Also, as already SIGTERM is sent to all workers, kill workers timer
is not necessary anymore after manager_exit(), hence disable it.

This mostly does not change any behavior. Just refactoring and
preparation for later change.
2025-04-07 22:17:16 +09:00
Yu Watanabe 45e8c283d8 udev: do not wait for event queue being empty on exit
When the manager process is requested to terminate, if a worker process
try to lock a block device and failed, then the worker returns a
TRY_AGAIN notification and the event is requeued. Hence, the event queue
may have pending events even after manager_exit() is called. In such
situation, sd_event_exit() will never called, and udevd will stuck.

This makes, after termination is requested, it only checks whether there
are any events currently being processed.
2025-04-07 22:17:16 +09:00
Yu Watanabe b6ede8e275 udev: unconditionally send signals to workers
It is not necessary to wait for a worker processing an event before
sending SIGTERM. Workers will handle SIGTERM after they finish events
that they are currently processing. Let's send SIGTERM whenever it
necessary.
2025-04-07 22:17:16 +09:00
Yu Watanabe b75841029f udev: split out two functions from on_post()
No functional change, just refactoring and preparation for later change.
2025-04-07 22:17:16 +09:00
Daan De Meyer a94520dc78 mkosi: Update to latest 2025-04-07 13:31:37 +02:00
Yu Watanabe b5d68c6ded units: update comment
Follow-up for f89985ca49.
2025-04-07 17:34:08 +09:00
Yu Watanabe 4c697fdd9c docs/NETWORK_ONLINE: fix typo
Follow-up for 45b1321653.
2025-04-07 17:02:00 +09:00
Yu Watanabe 223be3e8cc docs/ARCHITECTURE: fix typo
Follow-up for e1c52cb271.
2025-04-07 17:00:35 +09:00
Yu Watanabe 3af3f30a01 man/tmpfile: fix typo
Follow-up for 007b77ac6c.
2025-04-07 16:58:43 +09:00
Yu Watanabe 05c7c8f65e man/gpt-auto: fix typo
Follow-up for c481605d0d.
2025-04-07 16:57:11 +09:00
Yu Watanabe 7cdff85eb3 man/nss-resolve: fix typo
Follow-up for 2b015ea4b2.
2025-04-07 16:56:09 +09:00
Yu Watanabe 7de438cdb5 NEWS,TODO: fix typo 2025-04-07 16:54:05 +09:00
Yu Watanabe 8bf8e51bf5 fs-util: fix typo
Follow-up for 053e0626db.
2025-04-07 16:53:15 +09:00
Yu Watanabe f0deacdd5c pcre2-util: fix typo
Follow-up for 5517e214c8.
2025-04-07 16:52:04 +09:00
Yu Watanabe f501563ec3 machine: fix typo
Follow-up for a4019c75c2.
2025-04-07 16:49:43 +09:00
Yu Watanabe 500fd53a51 string-util: fix typo
Follow-up for 87b7d9b6ff.
2025-04-07 16:46:17 +09:00
Yu Watanabe f5b09f02ac network/netdev: fix typo
Follow-up for 540eb5f037.
2025-04-07 16:44:21 +09:00
Yu Watanabe 38747451af core/service: fix typo
Follow-up for c53d2d54bd.
2025-04-07 16:42:10 +09:00
Yu Watanabe 18f7a0cad9 network: fix typo
Follow-up for 96dd66eddf.
2025-04-07 16:41:25 +09:00
Yu Watanabe 77c796d46f terminal-util: fix typo
Follow-up for 3390be38d1.
2025-04-07 16:35:18 +09:00
Yu Watanabe 79ef03740d terminal-util: fix typo
Follow-up for b27f791691.
2025-04-07 16:34:07 +09:00
Yu Watanabe 71cc90aabc udev: fix typo
Follow-up for 0ba9d06963.
2025-04-07 16:30:52 +09:00
Mike Yuan c06b8d96f4 core: do not use pidref_hash_ops_free for Manager.watch_pids
The PidRefs are in all cases owned by Unit.pids, and gets removed
from Manager.watch_pids(_more) when the unit is destructed, via
unit_unwatch_pidref(). This hasn't caused any issue because
manager_clear_jobs_and_units() is called before destroying
Manager.watch_pids(_more), but let's get this right.
2025-04-07 15:48:23 +09:00
Mike Yuan ead510fe06 core/manager: also assert on Manager.units_by_invocation_id being empty after cleanup 2025-04-07 15:48:23 +09:00
Yu Watanabe 856db27d97 udev: move extra_timeout_usec() to udev-config.c
Then, introduce manager_kill_worker_timeout() helper function.
No functional change, just refactoring.
2025-04-06 21:55:09 +01:00
ZIHCO cc9229e42d test: extend the unit test test-notify-recv.c 2025-04-07 05:28:17 +09:00
Hang Li ae7082d836 po: Translated using Weblate (Chinese (Simplified) (zh_CN))
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Hang Li <dabao1955@163.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main
2025-04-07 05:23:21 +09:00
Daan De Meyer 6aa69f702b core: Resolve /dev/console if it's connected to stdin (#36666) 2025-04-06 14:14:35 +02:00
Yu Watanabe 9b3194c771 build-path: port to find_executable() and friends, do not return resolved path (#37025) 2025-04-06 11:25:51 +09:00
Mike Yuan c0ebcb818e build-path: teach pin_callout_binary() to search $PATH too
Prompted by 2caa462504
2025-04-06 02:39:06 +02:00
Mike Yuan 28b6bfd370 build-path: port to open_and_check_executable(), do not return resolved path
Follow-up for b58c240312

We need to be extremely careful with using the path associated with fd,
since it contains the resolved path if a symlink was opened. In particular,
it's really not desirable to return the resolved executable path in
pin_callout_binary(), which would end up as argv[0] in udev_event_spawn(),
potentially changing the behavior of spawned process.
2025-04-06 02:39:05 +02:00
Mike Yuan 326d60a9d0 path-util: generalize open_and_check_executable() 2025-04-06 02:32:47 +02:00
Yu Watanabe b57885e107 meson: remove more deprecated meson options (#36915)
This removes two more already deprecated meson options.
2025-04-06 01:58:30 +09:00