Commit Graph
80609 Commits
Author SHA1 Message Date
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
Mike Yuan 44a8b3d30b NEWS: remark cgroup v1 removal 2025-04-04 15:34:52 +02:00
Mike Yuan fc4663b379 core/cgroup: drop extraneous CGRuntime check in unit_get_memory_available()
Currently, for units whose CGRuntime is not allocated just yet, e.g.
inactive ones, MemoryAvailable fails to account for their MemoryMax/High
settings. Let's remove the CGRuntime check hence. The call to
unit_get_memory_accounting() would certainly fail, but it doesn't matter,
since 'current' is initially set to 0 anyways.
2025-04-04 15:34:52 +02:00
Mike Yuan 702aa33935 core/cgroup: fold unit_get_current_memory() into generic memory accounting helper 2025-04-04 15:34:52 +02:00
Mike Yuan 40d54c2da0 procfs-util: modernize convert_meminfo_value_to_uint64_bytes() 2025-04-04 15:34:51 +02:00
Mike Yuan 110d0ff1fa procfs-util: use xsprintf() where appropriate 2025-04-04 15:34:51 +02:00
Mike Yuan 77a0d2e3ec core/cgroup: remove legacy hierarchy setup
This also makes pin_cgroupfs_fd actually pin the fs root,
so that we can port all cg_* helpers to operate under
the fd later on.
2025-04-04 15:34:51 +02:00
Mike Yuan be1d96dbc3 core: remove cgroups-agent 2025-04-04 15:34:51 +02:00
Mike Yuan f0f2675e24 mkosi: update debian commit reference
* 4643263123 Add NEWS entry to warn about network connectivity loss due to mDNS, and workaround
* c995755707 Update changelog for 257.4-9 release
* 5e2ba1a045 resolved: break mDNS, remove conflict with avahi
* 6cf6fa39b4 Update changelog for 257.4-8 release
* 5067878f3a reintroduce systemd-resolved, with conflict on avahi-daemon
* 60c0d67e45 d/rules: drop nscd meson option
* 542de2ed44 Install new files for upstream CI
* 1e9b0e30da d/t/boot-and-services: skip gdm3 test in nested LXD run
* 4142fb487b systemd.preinst: fix shellcheck warnings
* 7879441e78 systemd.preinst: do not use systemctl
* 1d5ba16cf0 Update changelog for 257.4-7 release
* ddd3438e04 autopkgtest: re-enable integration tests
* 98698b582f autopkgtest: fix debugging leftover
* f62660777f Backport patches to fix integration tests skipping
* b7308013af autopkgtest: when nested tests-in-lxd skips don't fail outer run
* d5e96c6e56 Update changelog for 257.4-6 release
* 2493e2ffc7 Add Lintian override for 'unknown-field Protected'
* e27ebff834 d/control: fix systemd-boot and systemd-boot-tools descriptions
* 705fff1663 systemd: conflict with dracut on arm64
* 7e92bc39e9 Update changelog for 257.4-5 release
* 7638a4dcc1 autopkgtest: fix unit-tests for upstream CI
* 83a6bbe55a Add missing dh-exec shbang to d/systemd-tests.install
* 11b82593a5 Update changelog for 257.4-4 release
* f221a72abd Drop systemd-nspawn on arm64
* b8ecb66d05 Drop systemd-resolved package
* 560cde98d7 Move leftover resolved files to its own package
* fc2758d02d autopkgtest: drop versioning constraints on tzdata
* b2b7c59141 autopkgtest: remove workaround for 'meson compiile mkosi' and use 'mkosi -f' instead to avoid slow rebuilds
* 17e11869b5 systemd.postinst: add markers for janitor removals
* 581a5994f5 Handle new tmp mount on upgrade in preinst rather than postinst
* 58f6a4f689 d/control: only conflict against opensysusers << 0.7.3-4.1~
* 6dee609537 userdb: fix wildcard matching
* cf722bcd44 systemd-container: use more wildcards to install files
* 2339308f43 userdbd: use wildcard to install units
* a663f671bd Add myself to Uploaders
* 4a5bef9a48 Install new files
* c529659001 Drop systemd-cgroups-agent with upstream profile
* 970061c678 d/rules: add TODO reminder to drop Ubuntu-specific workaround
* 88fc574439 systemd-boot: do case-insensitive parsing of efibootmgr output
* eecb9466e0 Update tzdata-legacy version constraint for new bookworm-p-u tzdata version
* 5d9570efad Update changelog for 257.4-3 release
* 614efde487 Fix versioned breaks/replaces for sd-boot-tools
2025-04-04 14:36:14 +02:00
Mike Yuan 2a010ef8fd cgroup-util: remove now unused cg_kernel_controllers() 2025-04-04 14:36:14 +02:00
Mike Yuan b26a994fb8 nspawn: reject existing cgroupfs mount if cgns is enabled 2025-04-04 14:36:14 +02:00
Mike Yuan 02c4d27b17 nspawn: do not spuriously override cgroup2fs options on host 2025-04-04 14:36:14 +02:00
Mike Yuan 1614ca809e nspawn/meson: drop duplicate condition on ENABLE_NSPAWN
Follow-up for d95818f522

The whole dir is skipped if disabled, so no need for individual
conditions below.
2025-04-04 14:36:13 +02:00
Mike Yuan 6801a9d88a nspawn: drop cgroup v1 handling 2025-04-04 14:36:11 +02:00
Yu Watanabe 7200827885 udev-spawn: search executed command in build directory
This should be useful when debugging RUN{program}= and friends.
2025-04-04 21:10:25 +09:00
Yu Watanabe b58c240312 build-path: make pin_callout_binary() optionally provides the path to the found executable 2025-04-04 21:02:18 +09:00
Yu Watanabe 2c31eda469 build-path: check if found path is executable binary
Otherwise, the path may point to a non-executable, e.g. a directory.
2025-04-04 20:56:11 +09:00
Yu Watanabe ab29e77aa9 meson: enable -Werror=flex-array-member-not-at-end 2025-04-04 20:54:53 +09:00
Yu Watanabe d307410327 ethtool: do not embed struct with flexible array into another struct
To allow compile ethtool-util.c with -Werror=flex-array-member-not-at-end.
2025-04-04 20:54:53 +09:00
Yu Watanabe a8d4be01f4 sbsign: rename WIN_CERTIFICATE -> WIN_CERTIFICATE_HEADER and drop trailing flexible array
To allow building sbsign with -Werror=flex-array-member-not-at-end.
2025-04-04 20:54:53 +09:00