Commit Graph
80640 Commits
Author SHA1 Message Date
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 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
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
Yu Watanabe 3d2391a004 meson: remove more deprecated meson options
- default-hierarchy meson option was deprecated by
  31323f21bb (v256).
- nscd meson option was deprecated by
  28f1f1a5e6 (v257).

Let's completely remove them now.
2025-04-05 22:54:42 +09:00
Yu Watanabe c1d21129d0 mkosi/opensuse: drop default-hierarchy from systemd.spec 2025-04-05 22:54:27 +09:00
Yu Watanabe 9b372f8e7d mkosi: update arch commit reference
* 7948d79b63 upgpkg: 257.5-1: new upstream release
* d9badad1d4 drop use of deprecated nscd meson option
* af071243cf upgpkg: 257.4-1: new upstream release
2025-04-05 20:51:37 +09:00
Yu Watanabe d893f35559 udev-watch: push inotify fd to service manager's fdstore (#36977) 2025-04-05 20:34:42 +09:00
Khem Raj fd9c4b4f49 shared/cred-util: Ensure TPM code is used with HAVE_TPM2 guards
Building with no TPM2 we end up with following error

/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10: note: in a call to built-in function ‘__builtin___memcpy_chk’
In function ‘memcpy’,
    inlined from ‘encrypt_credential_and_warn’ at ../git/src/shared/creds-util.c:1091:17:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10: error: argument 2 null where non-null expected [-Werror=nonnull]
   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:29:10: note: in a call to built-in function ‘__builtin___memcpy_chk’
cc1: some warnings being treated as errors   29 |   return __builtin___memcpy_chk (__dest, __src, __len,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   30 |                                  __glibc_objsize0 (__dest));
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~

This is because code referencing tpm2 data structures is still used while the
initialization of the function has been compiled out since its conditional on HAVE_TPM2

We add needed guards in places where it is missing to fix this problem

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-04-05 11:28:07 +01:00
Yu Watanabe e4e40936f3 nspawn: drop cgv1 handling; core: drop cgroup agent (#36764) 2025-04-05 17:57:18 +09:00
Yu Watanabe db5d89309a TEST-17-UDEV: check journal about inotify watch 2025-04-05 17:33:31 +09:00
Yu Watanabe 40959dcc02 TEST-17-UDEV: rename subtests 2025-04-05 17:33:31 +09:00
Yu Watanabe 04ae22375a udev-watch: dump installed inotify watches on start and stop 2025-04-05 17:33:31 +09:00
Yu Watanabe beaf7e04eb udev: push inotify fd to file descriptor store
Then, if we get inotify fd on start, it is not necessary to re-enable
inotify watch.
2025-04-05 17:33:14 +09:00
Yu Watanabe 5edb07be62 udev-watch: split-out manager_process_inotify() from on_inotify()
No functional change, just refactoring.
2025-04-05 07:10:17 +09:00
Yu Watanabe ef0f8397a5 udev: move inotify watch related functions to udev-watch.c 2025-04-05 07:10:17 +09:00