Commit Graph
85360 Commits
Author SHA1 Message Date
Popax21 f603bc37f4 nss-resolve: add env var to specify resolved ifindex
Adds a new `SYSTEMD_NSS_RESOLVE_INTERFACE` environment variable to the nss-resolve module, whose value is subsequently passed down to the `ifindex` resolved lookup option.
This allows name lookups to be constrained to a just single interface for e.g. captive portal browsers.
2025-12-18 10:53:27 +01:00
Lennart Poettering 18d90c1628 bash: clarfiy what 80-systemd-osc-context.sh is about in the spec 2025-12-18 10:50:23 +01:00
Lennart Poettering d91aed3b55 docs: add redirection of the osc context to uapi website 2025-12-18 10:50:23 +01:00
Luca Boccassi f33d550d44 Add polkit support to varlinkctl and sd-sysext (#39796) 2025-12-18 09:10:53 +00:00
Daan De Meyer 27aba70b3b core: two trivial cleanups (#40126)
Split out from #40093
2025-12-18 08:55:29 +01:00
Daan De Meyer 198898c07b docs: some updates to release process (#40128) 2025-12-18 08:53:43 +01:00
Luca Boccassi cb6ccb1c31 mkosi: update debian commit reference to 6f15bdaae7014c233b662ac4a33d464893b81b36
* 6f15bdaae7 Update architecture match for 50-pid-max.conf (v3)
* 333cc1fcc5 Downgrade depends to recommends for IPC endpoint of respective libnss modules
* ab99a1b51a Revert "Update architecture match for 50-pid-max.conf"
* b93d7f855a Update changelog for 259~rc3-1 release
* 95c7f8a3d6 Install new udev rule
* 89509d9692 d/t/tests-in-lxd: re-construct --pin-packages arguments for autopkgtest
* 6b77249c71 d/extra/dbus-1: rename systemd-localed-read-only.conf
* 819831c19a Update architecture match for 50-pid-max.conf
* 0ddff89e9d Mirror dmi_arches from meson.build into debian/udev.install
* 398e8791db d/t/control: pull in optional libs for boot-and-services too
* c727922ad5 Update changelog for 259~rc2-1 release
* 8faf105531 Install new varlinkctl bash completion script
* f4b4cea2be d/t/control: ensure unit-tests autopkgtest pulls in dlopened libraries for test
* 7e8aba9883 Update changelog for 259~rc1-1 release
* 5953c42402 Update symbols file for v259~rc1
* 353125ccfa Install new files for v259~rc1
* ca22d1ca4f Drop patches, all merged upstream
* 32c75efca2 d/t/unit-config: fix python decorator copypasta
* e32179d633 d/rules: disable sysv compat in upstream builds
* cf77bd44be Install new files for upstream build
* aa564e5d3b kernel-install: skip 55-initrd.install when an initrd is already staged
2025-12-18 08:53:03 +01:00
Luca Boccassi ea73b8887b docs: update mkosi config file path in release process
Follow-up for fb514c2f8f
2025-12-18 00:47:14 +00:00
Luca Boccassi b1192a01cd docs: add OBS step to release process
Version rewriting in obs-service-tar-scm is not happy with rc tags
2025-12-18 00:46:41 +00:00
Mike Yuan 16bae207c2 core/dbus-execute: respect write flags for empty assignments too 2025-12-18 00:39:59 +01:00
Mike Yuan 8619c65fcf core/service: const and pure'ify service_restart_usec_next() 2025-12-18 00:39:59 +01:00
Luca Boccassi 34f41471fc sysext: add polkit support to varlink service 2025-12-17 23:22:05 +00:00
Luca Boccassi a2d53619c0 varlinkctl: add support for polkit interactive auth 2025-12-17 23:22:05 +00:00
Luca Boccassi 90f4c0473a core: set Result=start-limit-hit when a unit is rate limited
There is currently no way to figure out a rate limit was hit on a unit,
as the last result is stripped in order to keep reporting the first
result, which is useful in case of a watchdog failure, which is the
reason why it was changed as such.

But rate limiting is also an important information to provide to
users, so allow the Result property to reflect it when it
happens.
2025-12-18 00:19:09 +01:00
Luca Boccassi 2a1193d4cc Bump version in meson.version 2025-12-17 23:14:11 +00:00
Luca Boccassi 9ca433482f Finalize meson.version for v259 2025-12-17 23:02:36 +00:00
Luca Boccassi b262ded0bd Boot loader menu docs and tweaks (#39842) 2025-12-17 23:00:59 +00:00
Zbigniew Jędrzejewski-Szmek 3cdd80d3e0 sd-boot: correct typos 2025-12-17 22:55:38 +01:00
Zbigniew Jędrzejewski-Szmek 221a33c412 TODO: remove resolved entry
Done in https://github.com/uapi-group/specifications/commit/677b722bb8b84625b68162ba201c8461497f9585.
2025-12-17 22:55:38 +01:00
Zbigniew Jędrzejewski-Szmek 755637b04a docs/BLI: add missing descriptions of feature bits
Follow up for 2553a5482c,
92bb46c464,
e15d18b4c6,
a67f22c4a7,
e1f1b5fc62.
2025-12-17 22:55:38 +01:00
Zbigniew Jędrzejewski-Szmek 3e2b026da3 man/systemd-boot: say that /EFI/systemd/drivers is for hardware
In aad0d11e7c we stopped supporting XBOOTLDR
with a different fs driver. This was the primary example that comes to mind
when we talk about loading filesystem drivers in the firmware. Since we don't
want people to do load such drivers, use a different example.
2025-12-17 22:55:38 +01:00
Zbigniew Jędrzejewski-Szmek 1228429908 docs/BOOT_LOADER_INTERFACE: use full variable names once
We said in the header that "all EFI variables use the vendor UUID
4a67b082-0a4c-41cf-b6c7-440b29bb8c4f", but people not familiar with
UEFI might not know that this is concatenated with the variable name.
Let's use the full form once — when introducing the variable — to
make it easier to grep and search for.

While at it, use sembreaks in the document. This makes subsequent
changes much easier to review. (It also shows that some sentences
are rather long and thus hard to understand.)
2025-12-17 22:55:23 +01:00
Luca Boccassi 676c098d0a Chores for v259 (#40120) 2025-12-17 18:39:40 +00:00
Luca Boccassi cf0d7f8330 NEWS: finalize 2025-12-17 13:35:38 +00:00
Luca Boccassi f1a862a26d NEWS: update contributors list 2025-12-17 13:34:57 +00:00
Luca Boccassi 28c5929e90 Update syscalls table
ninja -C build update-syscall-tables update-syscall-header
2025-12-17 13:33:26 +00:00
Luca Boccassi d2e4162b51 Update hwdb
ninja -C build update-hwdb
2025-12-17 13:32:00 +00:00
QuickSwift315490 f9425092c6 hwdb: fix unstable button triggering on Mipad 2 under GNOME (#40071)
Change unknown key mappings to reserved.

A KEY_RESERVED button is marked as reserved and passed to the kernel. This will stop the kernel from passing this keystroke event to user space.

If unknown, the key is set to KEY_UNKNOWN and the event is passed to user space, which we want to avoid.
2025-12-17 13:26:47 +00:00
Haiyue Wang 568fe0294d meson: fix BPF build warnings due to MS extensions
Fix BPF program build warnings on Linux-6.19.0-rc1, more detail is [1]:

A). clang-bpf

[781/2458] Generating src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.unstripped.o with a custom command
In file included from ../src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.c:3:
./vmlinux.h:60263:3: warning: declaration does not declare anything [-Wmissing-declarations]
 60263 |                 struct ns_tree;
       |                 ^~~~~~~~~~~~~~
./vmlinux.h:80251:2: warning: declaration does not declare anything [-Wmissing-declarations]
 80251 |         struct __fs_path;
       |         ^~~~~~~~~~~~~~~~
./vmlinux.h:96184:2: warning: declaration does not declare anything [-Wmissing-declarations]
 96184 |         struct freelist_tid;
       |         ^~~~~~~~~~~~~~~~~~~
./vmlinux.h:114441:2: warning: declaration does not declare anything [-Wmissing-declarations]
 114441 |         struct renamedata;
        |         ^~~~~~~~~~~~~~~~~
./vmlinux.h:118480:2: warning: declaration does not declare anything [-Wmissing-declarations]
 118480 |         union pipe_index;
        |         ^~~~~~~~~~~~~~~~
./vmlinux.h:130452:4: warning: declaration does not declare anything [-Wmissing-declarations]
 130452 |                         struct freelist_counters;
        |                         ^~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.

B). gcc-bpf

meson setup -Dbpf-compiler=gcc build

[1040/2458] Generating src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.unstripped.o with a custom command
In file included from ../src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.c:3:
./vmlinux.h:60263:31: warning: declaration does not declare anything
60263 |                 struct ns_tree;
      |                               ^
./vmlinux.h:80251:25: warning: declaration does not declare anything
80251 |         struct __fs_path;
      |                         ^
./vmlinux.h:96184:28: warning: declaration does not declare anything
96184 |         struct freelist_tid;
      |                            ^
./vmlinux.h:114441:26: warning: declaration does not declare anything
114441 |         struct renamedata;
       |                          ^
./vmlinux.h:118480:25: warning: declaration does not declare anything
118480 |         union pipe_index;
       |                         ^
./vmlinux.h:130452:49: warning: declaration does not declare anything
130452 |                         struct freelist_counters;
       |                                                 ^

[1] https://git.kernel.org/torvalds/c/639f58a0f480
    "bpftool: Fix build warnings due to MS extensions"

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
2025-12-17 12:58:33 +00:00
Andrew Halaney 0927356f8e man/systemd.exec: Make EnvironmentFile error conditions more explicit
It is not entirely clear what happens when EnvironmentFile fails in the
prior wording. With the new wording it should now be clear that if it
fails to process the file the service will fail, and if it is prefixed
with "-" all errors are silently ignored.

Signed-off-by: Andrew Halaney <ahalaney@netflix.com>
2025-12-17 11:56:52 +01:00
Luca Boccassi 8fba2ed258 test: fix race condition in TEST-80-NOTIFYACCESS
In some cases systemd is faster to send the SIGHUP
than the script is to start the 'sleep' and background
it, so it never gets interrupted later and the test
is left hanging waiting for it.

[ 5028.410588] systemd[1]: Starting reload-timeout.service...
[ 5028.429544] reload-timeout.sh[165]: + set -o pipefail
[ 5028.429544] reload-timeout.sh[165]: + COUNTER=0
[ 5028.429841] reload-timeout.sh[165]: + trap sighup_handler SIGHUP
[ 5028.429841] reload-timeout.sh[165]: + export SYSTEMD_LOG_LEVEL=debug
[ 5028.429841] reload-timeout.sh[165]: + SYSTEMD_LOG_LEVEL=debug
[ 5028.429841] reload-timeout.sh[165]: + systemd-notify --ready
[ 5028.432891] systemd[1]: reload-timeout.service: Got notification message from PID 165: READY=1
[ 5028.432908] systemd[1]: reload-timeout.service: Changed start -> running
[ 5028.432983] systemd[1]: reload-timeout.service: Job 409 reload-timeout.service/start finished, result=done
[ 5028.432997] systemd[1]: Started reload-timeout.service.
[ 5028.433941] TEST-80-NOTIFYACCESS.sh[164]: Job for reload-timeout.service finished.
[ 5028.433941] TEST-80-NOTIFYACCESS.sh[164]: Got result done/Success for job reload-timeout.service.
[ 5028.433941] TEST-80-NOTIFYACCESS.sh[164]: Bus n/a: changing state RUNNING → CLOSED
[ 5028.436949] TEST-80-NOTIFYACCESS.sh[99]: + systemctl reload --no-block reload-timeout.service
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: Bus n/a: changing state UNSET → OPENING
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: sd-bus: starting bus by connecting to /run/systemd/private...
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: Bus n/a: changing state OPENING → AUTHENTICATING
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: Executing dbus call org.freedesktop.systemd1.Manager ReloadUnit(reload-timeout.service, replace)
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: Bus n/a: changing state AUTHENTICATING → RUNNING
[ 5028.445202] reload-timeout.sh[165]: + wait_for_signal
[ 5028.445586] reload-timeout.sh[169]: + sleep infinity
[ 5028.447285] reload-timeout.sh[165]: ++ sighup_handler
[ 5028.447285] reload-timeout.sh[165]: ++ echo hup1
[ 5028.444886] systemd[1]: reload-timeout.service: Trying to enqueue job reload-timeout.service/reload/replace
[ 5028.445228] systemd[1]: reload-timeout.service: Installed new job reload-timeout.service/reload as 491
[ 5028.445240] systemd[1]: reload-timeout.service: Enqueued job reload-timeout.service/reload as 491
[ 5028.446601] systemd[1]: reload-timeout.service: Service has no extensions to reload.
[ 5028.446799] systemd[1]: reload-timeout.service: Changed running -> reload-signal
[ 5028.446881] systemd[1]: Reloading reload-timeout.service...
[ 5028.451343] TEST-80-NOTIFYACCESS.sh[167]: Bus n/a: changing state RUNNING → CLOSED
[ 5028.452421] TEST-80-NOTIFYACCESS.sh[99]: + timeout 10 bash -c 'until [[ $(systemctl show reload-timeout.service -P SubState) == "reload-signal" ]]; do sleep .5; done'
[ 5028.460676] TEST-80-NOTIFYACCESS.sh[172]: Bus n/a: changing state UNSET → OPENING
[ 5028.460676] TEST-80-NOTIFYACCESS.sh[172]: sd-bus: starting bus by connecting to /run/systemd/private...
[ 5028.462029] TEST-80-NOTIFYACCESS.sh[172]: Bus n/a: changing state OPENING → AUTHENTICATING
[ 5028.462029] TEST-80-NOTIFYACCESS.sh[172]: Showing one /org/freedesktop/systemd1/unit/reload_2dtimeout_2eservice
[ 5028.463759] TEST-80-NOTIFYACCESS.sh[172]: Bus n/a: changing state AUTHENTICATING → RUNNING
[ 5028.470322] TEST-80-NOTIFYACCESS.sh[172]: Bus n/a: changing state RUNNING → CLOSED
[ 5028.472991] TEST-80-NOTIFYACCESS.sh[99]: + sync_in hup1
[ 5028.472991] TEST-80-NOTIFYACCESS.sh[99]: + read -r x
[ 5028.473839] reload-timeout.sh[165]: + wait 169
[ 5028.473996] TEST-80-NOTIFYACCESS.sh[99]: + test hup1 = hup1
[ 5028.473996] TEST-80-NOTIFYACCESS.sh[99]: + timeout 10 bash -c 'until [[ $(systemctl show reload-timeout.service -P SubState) == "reload-notify" ]]; do sleep .5; done'
[ 5038.477383] systemd[1]: TEST-80-NOTIFYACCESS.service: Failed with result 'exit-code'.

(note how the 'wait' is long after SIGHUP has been processed already)

Fixes https://github.com/systemd/systemd/issues/39581

Follow-up for ca8658120e
2025-12-17 18:41:59 +09:00
Yu Watanabe b6abe84602 core: fix extensions refreshing (dlopen() shenanigans) (#40112) 2025-12-17 18:41:23 +09:00
Vivian Wang 2e8985113b stub: Use log_debug if addons has no applicable sections
This can happen expectedly if an addon purely provides .dtbauto
sections, and there's no match for this machine. Reduce the log message
of this case to "debug" level.
2025-12-17 18:37:49 +09:00
Priit Jõerüüt b5a920cee1 po: Translated using Weblate (Estonian)
Currently translated at 91.6% (242 of 264 strings)

Co-authored-by: Priit Jõerüüt <jrtkbfdr@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/et/
Translation: systemd/main
2025-12-17 14:21:20 +09:00
Mike Yuan 5a2340aeb3 core/exec-credential: fix credentials plain dir exchanging (#40108)
Follow-ups for #39637

Split out from #40093
2025-12-17 00:25:11 +01:00
Mike Yuan 4d136f1462 core: dlopen() libcryptsetup in extensions refreshing
Follow-up for a08f2ea02d

This fixes extensions refreshing + verity-protected DDIs.
TEST-50-DISSECT previously passed because confext refreshing
is tested after live mount, the latter of which used to
load libcryptsetup in pid1.
2025-12-16 22:11:45 +01:00
Yu Watanabe 650fc62526 TEST-70-TPM2: re-enable tpm2-setup test on Alpine/postmarketOS
After 64b5c5f593, the test passes on
Alpine/postmarketOS.

This partially reverts 9fafe89bcc.
2025-12-16 21:10:12 +00:00
Mike Yuan 12df39fadf core/service: defer cryptsetup dlopen to helper process
This should still be safe, as we block dlopen() in namespace_fork().

Partially reverts 9252e26f4c.
2025-12-16 21:57:37 +01:00
Mike Yuan 8f397d5922 core/unit: add unit_fork_helper_process_full() that takes ForkFlags 2025-12-16 21:30:36 +01:00
Mike Yuan 3602308480 TEST-54-CREDS: add test case for #40108 2025-12-16 21:28:19 +01:00
Mike Yuan 6c1bcdd614 core/exec-credential: fix credentials plain dir exchanging
Follow-up for d796c6b7c6

rename() may yield ENOTEMPTY rather than EEXIST for existing dir,
so catch that too. Also, both the source and target must be
writable when exchanging.

Test coverage for this logic (i.e. user units with ExecStartPre=)
will be added later.
2025-12-16 21:25:51 +01:00
Mike Yuan 29a823b3b6 process-util: add a flag for retaining dlopen()-ability
While blocking dlopen() in child generally makes sense, it does
also lead to misery - in the very case of extension/cred refreshing
it then enforces loading of libcryptsetup/libacl in pid1, which
are otherwise never used. Let's add a flag to opt out hence, but
still prohibit it in namespace_fork/enter().
2025-12-16 21:07:20 +01:00
Mike Yuan 5188da568c acl-util: systematically fall back to fchmod() if acl is not available
Same as 2a64b56da4, but for
fd_acl_make_writable().

While at it, un-export fd_acl_make_{read_only,writable}_fallback(),
instead apply ifdeffery in .c
2025-12-16 20:16:58 +01:00
Mike Yuan 4abf7ee02e Revert "acl-util: drop now unused fd_acl_make_writable()"
This reverts commit 4175cd4f40.

It turned out that we still need this. Preparation for later commits.
2025-12-16 20:16:57 +01:00
Mike Yuan e6e001cdd4 acl-util: treat pointer type as a whole
Follow-up for 4976d6e9ac
2025-12-16 20:16:57 +01:00
Mike Yuan 552822992c core/service: do not honor SuccessExitStatus= for our own helpers
They're exclusively under our control, hence errors should not be
suppressed based on external user input.
2025-12-17 04:04:02 +09:00
Luca Boccassi c78d18096d mkosi: drop gh from mkosi-tools debian/ubuntu
It was removed from testing so building images fails
2025-12-16 17:54:15 +00:00
Luca Boccassi 830275f343 mkosi: update mkosi commit reference to 9e31235211d975bae25622d6205a8396d104335e
* 9e31235211 pacman: Make sure hookdir exists
* 20009b7f48 make_image: log systemd-repart *.conf files at the --debug level
* b94b415db9 run: Increase string limit for strace when debugging sandbox
* 9f6d9405d6 Ring the terminal bell after the last image has been built
* b509b4246d Add glob in default initrd to exclude some exotic drivers
* 189394b8b9 Allow KernelModules= globs to also match relative to modules root dir
* 92bd086e4e zypper: add --force-resolution flag
* 3637749702 kmod: Only add fully resolved fw path if it exists
* d41ac276c9 Add details to KernelModulesInitrd= doc
* 1b6960ddb1 Fix SplitArtifacts=repart-definitions for addons
* 07464f38d6 Add log_step call in build_kernel_modules_initrd
* 18f5885362 Use proper constants for ansi colors
* 454c1602b6 mkosi-obs: add SplitArtifacts=repart-definitions and use it
* 9e57461af6 Copy repart definitions to staging directory
* 1acab18874 Add SplitArtifacts=repart-definitions
* c5c5c225e8 mkosi-obs: always include verity certificate
* ac5babb8e0 Revert "Use Path.relative_to instead of Path.parts"
* cbb1daeb76 action: Use environment variables instead of inputs
* 97c81eef72 portable: support split roothash
2025-12-16 15:59:02 +00:00
Lennart Poettering 200f792b3e tpm2-util: create leading dirs for anchor secret
Fixes #40087
2025-12-16 22:28:10 +09:00
Lennart Poettering 64b5c5f593 test: prefer tests with PCR 16 over PCR 11
PCR 16 is intended for debugging purposes, and is the only PCR that can
be reset by software. Let's prefer that for testing.

PCR 11 has a purpose (i.e. kernel is measured there on UKI systems, as
are the boot phases), hence let's not use that for testing.

That should remove any interference of boot time ordering and testing
our tpm code, as we will write to PCR 16 only, and reset it before we
rely on it.

This likely, kind of fixes #39582, but the issue mixes two things, PCR
11 issues on real-life hardware, and PCR 11 isues in our artificial
tests. Only the latter is addressed by this PR, the other issue needs
more debugging, but without logs we cannot do much.
2025-12-16 22:28:10 +09:00