Commit Graph
84365 Commits
Author SHA1 Message Date
Daan De Meyer cfabf3eb3b TEST-87-AUX-UTILS-VM: Propagate SYSTEMD_PAGER at one more place 2025-10-31 08:57:38 +01:00
Daan De Meyer 472161f368 userdb: Add missing .membership extension to membership files
Follow up for fe0342edf4

This also drops the mkosi testuser from the wheel and systemd-journal
groups as the integration tests rely on the testuser not being to read
the full journal.
2025-10-31 08:57:08 +01:00
Daan De Meyer 097b6d3f66 nspawn: Fix docs 2025-10-31 08:26:04 +01:00
Christoph Anton Mitterer bfb365d924 man: clarify quoting of $ in command lines (#39494)
When the special executable prefix `:` is used, `$$` yield the literal `$$`.
2025-10-31 15:28:57 +09:00
dgengtek 4207abb6e1 man: clarify requirements for BridgeVLAN to work 2025-10-31 15:26:14 +09:00
Yu Watanabe 404d9bfb62 mount-setup: Add memory_hugetlb_accounting to cgroupfs mount (#39486)
This mount option will count HugeTLB memory usage towards the cgroup’s
overall memory usage for the memory controller.

See
https://lore.kernel.org/all/20231006184629.155543-4-nphamcs@gmail.com/T/#u
for the patch introducing the new mount option.
2025-10-31 15:20:10 +09:00
Daan De Meyer 886c078702 mount-setup: Add memory_hugetlb_accounting to cgroupfs mount
This mount option will count HugeTLB memory usage towards the cgroup’s
overall memory usage for the memory controller.

See https://lore.kernel.org/all/20231006184629.155543-4-nphamcs@gmail.com/T/#u
for the patch introducing the new mount option.
2025-10-30 22:28:41 +01:00
Daan De Meyer 5ce388aec8 mount-setup: Add optional function which provides extra mount options 2025-10-30 22:28:39 +01:00
Lennart Poettering 96d03f8e41 importd: port export-tar code to use the one systemd-dissect already uses (#39405)
Split out of #38728.

(Testcase is part of that PR)
2025-10-30 22:15:34 +01:00
Daan De Meyer c46344d597 mount-setup: Reformat table
Preparation for the next commit.
2025-10-30 19:59:29 +01:00
Daan De Meyer 056f437487 core: several cleanups/fixes for fd passing (#39491) 2025-10-30 19:57:16 +01:00
Mike Yuan a274cb0cff core/exec-invoke: switch keep_fds to heap allocation
Hardcoding total size of the array is error-prone, especially
considering the exeuctable_fd is added far below, so the '4' is
not entirely obvious. Also we seldomly do VLAs.
2025-10-30 17:47:30 +01:00
Mike Yuan f70346fb87 core/exec-invoke: store all stashed fds in ExecParameters, incl. OpenFile= ones
Keeping a half-detached counter around brings nothing
but confusion, and leads to fd leak in error paths.
2025-10-30 17:47:30 +01:00
Mike Yuan f4314f2fbc core/exec-invoke: do not discard stashed fds when stdio is connected to socket
This makes zero sense. Not sure how it got introduced...
2025-10-30 17:47:30 +01:00
Mike Yuan d93fff5c0c core/service: also pass sockets to control processes when stdio is named fd 2025-10-30 17:47:30 +01:00
Mike Yuan c954830fa9 core/service: only pass socket fds to control processes
If socket is used as stdio, we'd currently imply EXEC_PASS_FDS
and dump the whole set of fds to the control processes. This is
pretty much unexpected and unnecessary though, instead let's
pass only the socket fds.

Yes, this is a compat break, but a relatively minor one I'd
argue. And we can always revisit things if users do complain.
2025-10-30 17:47:29 +01:00
Mike Yuan d85d98f406 core/execute: merge n_storage_fds and n_extra_fds into stashed_fds
The distinction between fdstore and extra fds is only meaningful
to struct Service. As far as executor is concerned they're just
some fds to pass to the service. Let's just merge it hence,
for the sake of simplicity.
2025-10-30 17:47:29 +01:00
Mike Yuan f78e7ca7da core/execute: serialize fd_names only if there're fds to pass 2025-10-30 17:47:29 +01:00
Mike Yuan 3299fb4ba7 core/execute: reorder ExecParameters fields 2025-10-30 17:47:28 +01:00
Mike Yuan 75e05a9880 core/exec-invoke: rename process earlier
This is independent of any other setup stages, and should
happen as early as possible to make comm logged by journald
accurate.
2025-10-30 17:45:34 +01:00
Mike Yuan edb8fcd813 core/exec-invoke: set exit_status on exec_context_named_iofds() failure 2025-10-30 16:12:14 +01:00
Mike Yuan 04072ad9ed core/exec-invoke: do not attempt to use fdstore/extra fds for stdio
According to systemd.exec(5):

> The fd:name option connects standard input to a specific, named
> file descriptor provided *by a socket unit*. ...

Currently however we're looking at the whole fd array passed,
fix it.
2025-10-30 16:12:14 +01:00
Mike Yuan 234d8f8bc3 core/exec-invoke: drop redundant stdio_fdname checks
exec_context_fdname() would never return NULL if corresponding
stdio mode is set to named fd.
2025-10-30 16:12:14 +01:00
Mike Yuan e984e2ca26 core/execute: mark exec_context_fdname() as pure 2025-10-30 16:12:13 +01:00
Mike Yuan 2fd2d8d575 core/execute: remove unused ExecParameters.cgroup_supported
Follow-up for 188286eec6
2025-10-30 16:12:13 +01:00
Daan De Meyer a79d2e47fc mkosi: update fedora commit reference to ea1d871ecd6c2fe063523840c1e4cf9bcf200e32 (#39483) 2025-10-30 16:07:22 +01:00
Daan De Meyer 5cabeed80b run0: Add --empower
--empower gives full privileges to a non-root user. Currently this
includes all capabilities but we leave the option open to add more
privileges via this option in the future.

Why is this useful? When running privileged development or debugging
commands from your home directory (think bpftrace, strace and such),
you want any files written by these tools to be owned by your current
user, and not by the root user. run0 --empower will allow you to run
all privileged operations (assuming the tools check for capabilities
and not UIDs), while any files written by the tools will still be owned
by the current user.
2025-10-30 15:28:36 +01:00
Lennart Poettering 19bf12bff3 pcrlock: don't lock PCR 12 by default
This creates a chicken-and-egg problem: we stuff the pcrlock policy into
a credential in the ESP, but credentials get measured into PCR 12, hence
PCR 12 is both input and output of the pcrlock logic, which makes
impossible to calculate.

Let's drop PCR 12 for now.

(We might want to pass the policy some other way one day, to avoid this,
but that's something for another day.)

Note that this still allows locking to PCR12 if people want to (for
example because they don't need this for the rootfs, and hence need no
cred passing via the ESP), this hence only changes the default, nothing
more.

Fixes: #33546
2025-10-30 14:12:41 +00:00
Daan De Meyer b1856a6c4a analyze: Add shell completion for dlopen-metadata 2025-10-30 14:11:28 +00:00
Yu Watanabe b5d63191ca network/sysctl: logs when per-link IPMasquerade= setting changes the global IPv6Forwarding= setting
All other cases, settings on different interfaces are completely
independent. But IPMasquerade=yes on an interface enables the global
IPv6Forwarding= setting, and hence affects other interfaces.
Let's log about that.

Prompted by https://github.com/systemd/systemd/issues/39304#issuecomment-3430382233.
2025-10-30 14:58:16 +01:00
Daan De Meyer 16f4bc90d2 mkosi: update fedora commit reference to ea1d871ecd6c2fe063523840c1e4cf9bcf200e32
* ea1d871ecd Add missing networkd socket units
* b76b5da2e6 Merge #214 `Drop backwards compat logic from integration tests script`
* 7208fa2b1b Require systemd-rpm-macros for build
* 2e1a6c7474 Require python3-zstandard in ELN
* 79c9db1bc8 Require systemd-libs and systemd-shared to be in the same version
* db38445a7e Drop two patches with workaround (selinux, kernel)
* 593a204189 Version 258.1
* a3e9e27982 Change '%{systemd}' to systemd in Conflicts/Provides/Requires/Recommends
* 88877a4184 Require systemd-networkd and systemd-udev to be in the same version
* 8a446daec7 Version 258 💝
* cceac93491 Pre-create /etc/userdb directory
* b442086d5f Version 258~rc4
* 327e54e421 Add to patch to create userdb root directory with correct label
* 2289d65726 Fix unit name in scriptlet
* 5acde9f1fd Add workaround patch to hopefully pass podman CI tests
* 1f5ed0da1f Version 258~rc3
* 50936458a7 obs: move recipe files in place
* 1bdb4efe40 obs: switch to xz for compression
* be7a4d0863 Version 258~rc2
* 2ace9416e8 obs: also use version with tilde for Source0
* 8d1645af75 Use again %{version} when building in OBS
* 98cc5fd91a Version 258~rc1
* ed7d2f1132 Add "test" that LTO effectively removes unused code from shared lib
* 40b38a04d2 Build docs on 64-bit architectures only
* 5d30fd3b26 Version 257.7
2025-10-30 14:56:41 +01:00
Daan De Meyer a835537f75 mkosi: Disable lto feature of systemd spec
This makes sure the systemd spec doesn't check if LTO is working as
expected when it is actually disabled.
2025-10-30 14:56:04 +01:00
Daan De Meyer 097536a49c analyze: Add dlopen-metadata verb (#39457)
systemd-analyze dlopen-metadata will show dlopen metadata
in the ELF binary.
2025-10-30 13:56:01 +01:00
Daan De Meyer 92ea9584c6 test-namespace: Migrate to new assertion macros 2025-10-30 13:36:05 +01:00
Lennart Poettering 9851382c12 homed: always report that registered users are members of their own groups
As per the userdb spec we should report in GetMemberships() that users
are in their own groups. Hence follow the spec.

Fixes: #26061
2025-10-30 12:12:00 +00:00
Marcos Alano 44ca5b8002 hwdb: add support for the Logitech MX Master 4 (#39490) 2025-10-30 20:16:26 +09:00
Daan De Meyer 0fe29d0672 analyze: Add dlopen-metadata verb
systemd-analyze dlopen-metadata will show dlopen metadata
in the ELF binary.
2025-10-30 11:58:23 +01:00
Daan De Meyer da30f59f60 TEST-65-ANALYZE: Add missing --no-pager 2025-10-30 08:41:44 +01:00
Daan De Meyer 004b7f1f7e elf-util: Add support for parsing dlopen metadata
Then we can add support for showing dlopen metadata to systemd-analyze.
2025-10-30 08:41:43 +01:00
MoisticulesandMoisticules f54d72c2b6 hwdb: gpd micropc2 sensor (#39493)
This rule calibrates rotation of the screen display by adjusting matrix
of sensor for the GPD MicroPC 2

Co-authored-by: Moisticules <interknet@live.com>
2025-10-30 14:44:01 +09:00
Rafael Fontenelle 7679e8aa19 po: Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Rafael Fontenelle <rafaelff@gnome.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pt_BR/
Translation: systemd/main
2025-10-30 11:46:06 +09:00
Lennart Poettering 90305bd17a pull: add pretty progress bar to systemd-pull too
This already exists in systemd-import, but let's add it for systemd-pull
too.
2025-10-29 13:09:57 +01:00
Lennart Poettering 6fa83be763 main: switch explicitly to tty1 on soft-reboot
Fixes: #39462
2025-10-29 13:09:20 +01:00
Daan De Meyer 2988bba60f mount-util: Iterate mountinfo backwards when unmounting
Submounts will always be located further in the mountinfo file, so
when we're unmounting, iterating backwards is likely to be more
efficient than iterating forwards. It'll also reduce the amount of
EBUSY debug logging we'll get since we'll stop trying to unmount
parent mounts with submounts which will always fail with EBUSY.
2025-10-29 12:01:32 +01:00
Daan De Meyer 35e03f6302 core: Don't setup mount propagation tunnel if not required
If we know we have mount_setattr(), then we don't need the mount
propagation tunnel, so don't set it up.
2025-10-29 12:01:02 +01:00
Lennart Poettering 3780a0b446 export-tar: port to common libarchive tar generation code 2025-10-29 10:09:44 +01:00
Lennart Poettering faaed501e0 dissect: move tar make code into tar-util.[ch] and make it generic
That way we can later use it for importd's "export" verb
2025-10-29 10:09:44 +01:00
Allison Karlitskaya 516df12af9 udevadm: flush output after each monitor event
If you're using `udevadm monitor` from a script, without a tty, then
libc defaults to being fully-buffered, and won't flush stdout after
newlines.  This is fine for tools that dump a bunch of data and then
exit immediately.  It's a problem for tools like `udevadm monitor` which
have long pauses: the buffered data can get stuck in the buffer for an
unbounded amount of time.

In the Cockpit project we've been working around this for some time with
`stdbuf` which is a `LD_PRELOAD` hack to change the libc buffering
behaviour, but we'd like to stop doing that.

Let's make sure we flush the buffer after each event.
2025-10-28 17:51:19 +01:00
Yu Watanabe 6454fde83e TEST-07-PID1: wait for systemd-resolved being stopped
As 'systemctl stop' is called with --no-block, previously systemd-resolved
might not be stopped when 'resolvectl' is called, and the DBus connection
might be closed during the call:
```
TEST-07-PID1.sh[5643]: + systemctl stop --no-block systemd-resolved.service
TEST-07-PID1.sh[5643]: + resolvectl
TEST-07-PID1.sh[5732]: Failed to get global data: Remote peer disconnected
```

Follow-up for 8eefd0f4de.
Fixes https://github.com/systemd/systemd/pull/39388#issuecomment-3439277442.
2025-10-28 13:26:15 +00:00
Daan De Meyer 308d40626d basic: Use xopenat_full() in mkdir_p_root_full() 2025-10-28 13:01:48 +01:00