Commit Graph

80628 Commits

Author SHA1 Message Date
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
David C. Manuelda
668d915a4b boot: only link libgcc when compiler is gcc
When compiling in systems which do not have gcc installed
(like a musl+llvm system) the forced linkage "-lgcc" is
stopping it to compile. As when compiler is clang it do not
need to link explicitelly to gcc I've modified meson to only
link to gcc library when compiler is gcc.

Closes: #35162
2025-04-05 07:02:37 +09:00
Matteo Croce
936e298f0e use grep whole-word search
grep supports whole-word search with `-w`, no need to look for a
trailing space.
2025-04-05 05:24:30 +09:00
Beniamino Galvani
f7996e2a33 network: add support for HSR netdev
Add support for creating HSR/PRP interfaces. HSR (High-availability Seamless
Redundancy) and PRP (Parallel Redundancy Protocol) are two protocols that
provide seamless failover against failure of any single network component. They
are both implemented by the "hsr" kernel driver.
2025-04-05 05:23:53 +09:00
Luca Boccassi
c1b0e39ffd tree-wide: allow building with -Werror=flex-array-member-not-at-end (#36993)
Fixes #36988.
2025-04-04 18:37:54 +01:00
Mike Yuan
b157a7e613 core: also stash executor path in Manager
Prompted by b58c240312

Let's not query it over and over again in exec_spawn().
2025-04-05 02:33:00 +09:00
Yu Watanabe
c3c905c6c1 TEST-64-UDEV-STORAGE: enable debug logging and set timeout
For debugging the following failure:
```
41/95 systemd:integration-tests / TEST-64-UDEV-STORAGE-mdadm_basic                              TIMEOUT        1800.02s   killed by signal 15 SIGTERM
[   30.902392] TEST-64-UDEV-STORAGE.sh[517]: + sfdisk --wipe=always /dev/md/mdmirpar
[   31.326202] TEST-64-UDEV-STORAGE.sh[517]: + udevadm trigger --settle --parent-match /dev/md/mdmirpar
[  900.971338] kauditd_printk_skb: 10 callbacks suppressed
[  900.971343] audit: type=1130 audit(1743767825.783:146): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  900.974057] audit: type=1131 audit(1743767825.786:147): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-tmpfiles-clean comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Finishing after writing 68494 entries
qemu-kvm: terminating on signal 15 from pid 131949 (/usr/bin/python3)
```
2025-04-05 02:32:13 +09:00
Daan De Meyer
2b0087e5b1 exec-invoke: Always go via stdin fd in setup_pam() to get tty
We might have resolved the tty to something else if it was set to
/dev/console, so let's always go via stdin in setup_pam(). This also
means we won't set the pam tty if only stdout or stderr are connected
to a tty, which seems like a sensible thing to do.
2025-04-04 17:13:16 +02:00
Daan De Meyer
6f1d594d63 core: Resolve /dev/console if it's connected to stdin
If /dev/console is connected to stdin there's a possibility that
the unit might try to start a logind session from within the unit.
Let's make sure that any such sessions are started on the tty that
/dev/console points to and not on /dev/console itself.
2025-04-04 17:13:14 +02:00
Yu Watanabe
99d704c6e8 stat-util: drop unnecessary call of xopenat() in xstatfsat() 2025-04-05 00:13:01 +09:00
Daan De Meyer
c7f7d87db5 terminal-util: Make sure resolve_dev_console() always returns a full path
Currently it returns a full path in some cases and a partial path in others.
Let's make sure it always returns a full path.
2025-04-04 17:12:58 +02:00
Yu Watanabe
fe30942cda udev-spawn: search executed command in build directory (#36985)
This makes pin_callout_binary() optionally provides the path of the pinned
binary, and makes it used in udev-spawn.c, to allow easy debugging of
program invocations requested by RUN{program} and friends.
2025-04-05 00:11:15 +09:00
Mike Yuan
1b781af6ee NEWS: document kernel baseline bump
Follow-up for 16ac586e5a
2025-04-04 15:34:52 +02:00