Commit Graph
85960 Commits
Author SHA1 Message Date
Mike Yuan c27d1b3eec ssh-generator: follow symlink when searching for sshd@.service
unit_file_exists() currently does not follow symlinks, as it is
mainly used to test whether the unit (of any install state)
has been seen under search dirs. However, in ssh-generator
we should search for and honor whatever the distro ships,
which might be an alias or linked externally.
2026-02-03 08:17:34 +09:00
Luca Boccassi ce41216e49 ask-password: install polkit policy
The policy was added, but never hooked into meson to be installed,
so it's unused. Install it.

Follow-up for 066f6bfb62
2026-02-03 08:16:25 +09:00
Yu Watanabe ab8603d26b Fixes for ask-password (#40549) 2026-02-03 07:48:13 +09:00
Yu Watanabe 4c6afaab19 mkosi: workaround issue in mdadm-4.5 + linux-6.18
After debian updated the kernel from 6.17 to 6.18, mdadm command fails
with the following:
```
+ mdadm --create /dev/md/mdmirror ...
mdadm: size set to 64512K
mdadm: Can't open /sys/module/md_mod/parameters/legacy_async_del_gendisk
mdadm: init md module parameters fail
```

This seems a bug in mdadm, and fix is already merged in the upstream:
https://github.com/md-raid-utilities/mdadm/pull/228
Until the fix is backported, let's workaround the issue.

See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1125390
2026-02-02 15:32:48 +01:00
Zbigniew Jędrzejewski-Szmek 65f72f5dbb ask-password: remove files in /run when query is aborted
Because of the missing 'goto', if the query was aborted, we
would leave behind the ask.* ini file.
2026-02-02 15:16:23 +01:00
Zbigniew Jędrzejewski-Szmek f01c99c67e ask-password: reject control chars and quotes in query description
As reported in https://yeswehack.com/vulnerability-center/reports/705270,
YesWeHack issue #YWH-PGM9780-66, if a newline is injected into the message
field, it is passed through unmolested and lands in the .ini file. This
obviously would cause the parser to be confused.

Let's forbid any control characters or quotes in those fields. If we want
something more complicated in the future, we can add a custom validation
function and allow some escaping mechanism.
2026-02-02 15:16:23 +01:00
Antonio Alvarez Feijoo 5327755f8b discover-image: fix typo in log message 2026-02-02 22:24:28 +09:00
Jim Spentzos e831a44b07 po: Translated using Weblate (Greek)
Currently translated at 35.9% (95 of 264 strings)

Co-authored-by: Jim Spentzos <jimspentzos2000@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/el/
Translation: systemd/main
2026-02-02 05:26:31 +09:00
Mike Yuan 7e6003b9bc Update the "portability and stability" document (#40502) 2026-02-01 12:43:18 +01:00
Zbigniew Jędrzejewski-Szmek fcff83a534 meson: conditionalize tmpfiles.d/legacy.conf
This is a compat interface, so let downstream like Arch drop it easily.
2026-02-01 09:40:10 +01:00
Zbigniew Jędrzejewski-Szmek 0acd1b4f35 units: restore runlevel[0-6].target aliases
This partially reverts commit e58ba80a40. Those
aliases were removed as part of the removal of sysvinit compat, but the removal
was immediately reported as a regression by users. In particular, users can
have one of those set as the default target, or use those names in Wants= or
Requires= dependencies. At least in Fedora, the removal was immediately
reverted.

When looking at our "portability and stability promise", I noticed that those
units are explicitly listed in the promise. Let's restore them upstream. They
are conditionalized under a new -Dcompat-sysv-interfaces=bool option, so that
downstreams like Arch that wasnt to strictly avoid legacy interfaces can easily
disable them. They are dropped from the docs, like we do for all deprecated
interfaces.
2026-02-01 09:40:10 +01:00
Yu Watanabe 389254d9df boot: fix typo in variable name
Fixed by GitHub Copilot.
2026-02-01 08:26:07 +01:00
Zbigniew Jędrzejewski-Szmek f4dd927e5c docs/PORTABILITY_AND_STABILITY: update the policy
The kernel has a "don't break userspace" policy [1] which is very easy
to understand and like (even if the details are complicated). We had a
complicated policy statement, but the actual practice is that we'll
generally avoid changes that cause problems for users. So the whole
detailed table is more of a guideline than something that we can rely
on.

To improve public perception, and to align the docs with practice, let's
make a general promise to keep stability, and change the existing table
to a "guideline" that tells people which interfaces to use and which not
to use so that use and development of systemd don't conflict or create
pain.

The existing document was very long, and I think it'll have a bigger
impact if it shorter. In particular, the chart is dropped, because it
was of limited use and severly outdated, because we have added many new
interfaces and components without updating it. Adding the missing
elements (and then keeping it updated) would be a lot of effort. The
chart would be most useful to somebody trying to build a systemd
reimplementation, but there haven't been many attempts like this, so
let's save the work and drop it and make the document shorter.

I also dropped the mentions of Debian. Back in the day, we did indeed
adopt many Debian conventions for config files and such, but over the
years the scope of the project has grown quite a bit and that part
of systemd is a small fraction now. And we've adopted conventions
and ideas from many other places too, so we don't mention Debian
specifically.

[1] https://docs.kernel.org/admin-guide/reporting-regressions.html
2026-01-31 17:28:42 +01:00
Zbigniew Jędrzejewski-Szmek 0c40aef7ef emacs: drop obsolete emacs property
New emacs warns on every open about the old attribute. Let's assume that
everybody who uses emacs uses the latest version, so we can drop the compat.
2026-01-31 17:26:17 +01:00
David Santamaría Rogado 9e5b898d3a quirks: keyboard: d330 keyboard rework
change matches to generic input devices one as name can't be used
because these keyboards have multiple names and also they are used in
multiple devices. This way will be possible to define more detachable
keyboards in an easy way for multiple devices.

Known USB ids for D330 series are: 17EF:60C3, 17EF:60C6 and 17EF:60C8.

Also mark that the tablet part keys and the keyboard doesn't have any
LED to let interfaces decide to expose on-screen indicators.
2026-01-31 15:30:29 +09:00
Yu Watanabe c3540c80a5 bus-unit-util: convert StandardInputText to StandardInputData
Fixes #40527.
2026-01-31 06:41:57 +09:00
Yu Watanabe da912e7f2f bus-unit-util: make ExecSearchPath= accepts colon separated list
Unlike other settings that takes multiple values, the setting takes
colon separated list of paths, but when specified as a DBus property,
it previously accepted space separated list of paths.
Let's also make the DBus property accepts colon separated lists.

Fixes #40513.
2026-01-31 01:24:07 +09:00
Yu Watanabe 4481c9ff65 machine: skip reading properties through DBus when not connected
When machined is started earlier than DBus service, the execution is
blocked by reading properties through DBus for a while. Let's return
earlier if the DBus connection is not ready.

Fixes issue reported in #40414.
2026-01-31 01:23:26 +09:00
Yu Watanabe 579640f50c network: slightly improve log message 2026-01-31 01:22:38 +09:00
Yu Watanabe f3600fe955 docs: fix typo, grammar, and broken links (#40498) 2026-01-31 01:21:04 +09:00
Yu Watanabe 99f332ffb1 A few test fixes (#40524)
These are some patches we currently have in Ubuntu for the development
release. A couple are related to Ubuntu switching to uutils coreutils by
default.
2026-01-31 01:19:38 +09:00
Graham Reed 93c0e032b0 man: OnSuccessJobMode= default is fail (#40509)
For the feature added in 294446dcb9,
with OnSuccessJobMode= added to the docs in
e87abe8206.
2026-01-31 01:18:46 +09:00
Luca Boccassi 90e6a9a1fb gh: mention that there are packages from main available in issue template
Makes it easier for bug reporters to try reproducing on latest main
2026-01-30 16:12:44 +00:00
Yu Watanabe 0922f62126 docs: update external links
- fix many links and drop unreachable links,
- always use https rather than http if supported,
2026-01-31 01:11:11 +09:00
Yu Watanabe 966c29ae59 tools: add script that checks external links in docs
Generated by GitHub Copilot, and manually adjusted.
2026-01-31 01:11:05 +09:00
Govind Venugopal e198f1a847 network: fix NFTSet population when [DHCPPrefixDelegation] Assign=no (#40049)
When [DHCPPrefixDelegation] Assign=no, networkd creates routes instead of
addresses. These routes need to populate nftables sets for firewall
rules to work correctly.

This commit adds dhcp_pd_route_modify_nft_set() to handle NFT set
updates for DHCP-PD routes, similar to how address_modify_nft_set()
handles them for addresses.

Fixes: #38383
2026-01-30 23:38:13 +09:00
Nick Rosbrook 7c9c34514a test: disable pipefail again in monitor_check_rr()
Partially reverts d6b3793704.

On Ubuntu 26.04 devel, TEST-75-RESOLVED often fails at this stage,
despite the matching query apparently being found:

 + monitor_check_rr '2025-12-18 16:02:54' 'follow10.so.close.signed.test IN CNAME follow11.yet.so.far.signed.test'
  + set +x
  Dec 18 16:02:54 ns1.unsigned.test resolvectl[552]: ← A: follow10.so.close.signed.test IN CNAME follow11.yet.so.far.signed.test
 + monitor_check_rr '2025-12-18 16:02:54' 'follow11.yet.so.far.signed.test IN CNAME follow12.getting.hot.signed.test'
  + set +x
  Dec 18 16:02:54 ns1.unsigned.test resolvectl[552]: ← A: follow11.yet.so.far.signed.test IN CNAME follow12.getting.hot.signed.test
 + monitor_check_rr '2025-12-18 16:02:54' 'follow12.getting.hot.signed.test IN CNAME follow13.almost.final.signed.test'
  + set +x
  Dec 18 16:02:54 ns1.unsigned.test resolvectl[552]: ← A: follow12.getting.hot.signed.test IN CNAME follow13.almost.final.signed.test
 + monitor_check_rr '2025-12-18 16:02:54' 'follow13.almost.final.signed.test IN CNAME follow14.final.signed.test'
  + set +x
  Dec 18 16:02:54 ns1.unsigned.test resolvectl[552]: ← A: follow13.almost.final.signed.test IN CNAME follow14.final.signed.test

Unsetting pipefail, as was done before d6b3793704, appears to fix the
problem.
2026-01-30 09:36:53 -05:00
Yu Watanabe 3762ada7e3 repart: Restore early fstab/crypttab generation (#40473)
fstab/crypttab generation were moved to the late stage to support
'fixate-volume-key' option. This, however, broke the use-case when
fstab/crypttab are put to the generated partition/image.

Fixes #40444
2026-01-30 23:32:07 +09:00
Nick Rosbrook 9dcfd6e8fe test: cope with uutils coreutils flag parsing for date command
With GNU coreutils, one can pass an argument to the "set" flag like:

 date -s "-3 days"

With uutils coreutils, that gives an error:

 error: unexpected argument '-3' found
    tip: to pass '-3' as a value, use '-- -3'

That's a bug (https://github.com/uutils/coreutils/issues/9679), but both
implementations accept --set="-3 days" just fine, so use that instead.
2026-01-30 09:30:20 -05:00
Nick Rosbrook a8efad14f8 test: use journalctl -n option instead of piping to head
On Ubuntu's test infrastructure for the development series, this test
often fails when piping the journal output to head. The cause is
unclear, but possibly related to Ubuntu's use of uutils coreutils.

Workaround this by just using journalctl's -n flag, which removes the
need for piping output to head.
2026-01-30 09:30:20 -05:00
Yu Watanabe 43b6eb09be discover-image: Follow symlinks in a given root (#39843)
This is needed to set up extension images from the initrd with
`systemd-sysext --root=/sysroot/ merge`.

- vpick: Don't use openat directly but resolve symlinks in given root
    
With systemd-sysext --root= all symlinks should be followed relative to
    the given root and direct openat usage doesn't work.
    Remove the openat call and let pin_choice do the work with the chase
    helper function to resolve the symlink in the given root.
- discover-image: Follow symlinks in a given root
    
    So far systemd-sysext with --root= specified didn't follow extension
symlinks (such as the "current" symlinks managed by systemd-sysupdate).
The main use case is running systemd-sysext --root=/sysroot for setting
    up the overlay mounts already from the initrd.
    
Resolve symlinks correctly but don't defend against later symlink races
    that would access a path outside of the given root. Malicous live
modifications are not a realistic threat model and anyway for that one
would need to rework how the image entry is passed over up to the point
when the loop device is set up. This change here does not introduce this
weakness nor does it expose it more than before. Thus, make it explicit
    that setting up the extensions for a given --root= implies a certain
trust into this given root tree that it does not try do race conditions
with symlinks to trick systemd-sysext to mount a file outside --root=.
Without a strict --image-policy= set we would anyway mount filesystems
right away which is another attack vector but, again, the main use case
    is to do this for the final system which is trusted at this stage.
- sysext: Use correct image name for extension release checks
    
For the extension release check the image name is needed and was derived
    from the backing file of the loop device. However, this can have a
different name when symlinks were resolved. The surprising behavior was
that it worked when the target name started with the extension name and
_ because that's what's supported to chop off version suffixes. However,
we should not have such strict requirements for the target name and also
allow - as version separator and entirely different names/prefixes, the
    same way as we also do for directories instead of raw images.
    
    Do not use the image name derived from the backing file of the loop
    device but directly the extension name we have at hand.
- test: Add tests for handling symlinks with systemd-sysext
    
    When we now allow following symlinks inside a --root= we should also
test that it works in various cases from simple relative and absolute
    symlinks to .v being a symlink itself or its contents, both for
directory and for .raw image extensions. While at it, also add a simple
    test for .v without symlinks which wasn't there for direct usage of
    systemd-sysext.
2026-01-30 22:36:20 +09:00
Ivan Shapovalov 32417c1723 network: fix max MTU check for IPv6 MTU adjustments
When link MTU is being adjusted in an IPv6 context (e.g., according to
the MTU received in an RA), the new MTU is clamped against link's
current MTU than link's max MTU. This means that the link MTU can never
be increased via an RA:

    systemd-networkd[10068]: eth1: Reducing requested IPv6 MTU 8900 to the interface's maximum MTU 1500.
    systemd-networkd[10068]: Setting '/proc/sys/net/ipv6/conf/eth1/mtu' to '1500'
    systemd-networkd[10068]: No change in value '1500', suppressing write

Fix this check to make logical sense, and also to match a similar check
in src/network/networkd-setlink.c:link_adjust_mtu().
2026-01-30 22:34:20 +09:00
David Santamaría Rogado 7263e409b1 hwdb: keyboard: hp omnibook ultra flip
avoid kernel messages complaining about unknown keycodes from keys
already handled by acpi methods.
2026-01-30 22:33:55 +09:00
Nicolas Dorier 4585483ef9 Expand hwdb entries for additional hardware wallets
The list is ported straight from https://github.com/bitcoin-core/HWI/tree/master/hwilib/udev

The HWI project is a widely popular command line tool to access bitcoin
hardware wallets, maintained by the bitcoin-core team.
2026-01-30 22:33:35 +09:00
Vitaly Kuznetsov 7a4b51ce4c TEST-58-REPART: Add a test for fstab/crypttab inclusion
Check that generated fstab/crypt are generated early and thus can
be put to the created volume.
2026-01-30 13:21:57 +01:00
Vitaly Kuznetsov 307785960b repart: Restore early generation of fstab/crypttab
Commit 15b1c33 ("repart: Generate fstab and crypttab late") moved
fstab/crypttab generation to the late stage but this introduced a regression:
it may be necessary to include fstab and crypttab into the generated partition
(e.g. with CopyFiles=). This is incompatible with 'fixate-volume-key' option as
it is impossible to capture LUKS volume key before it gets created but all the
rest should work fine.

Generate crypttab twice: early and late to capture possible changes. There's no
need to do the same for fstab for now, so keep the status quo.
2026-01-30 13:21:57 +01:00
Mike Yuan 95a7b7d474 core: several follow-ups for varlink EnqueueMarkedJobs() method (#40365) 2026-01-30 08:38:13 +01:00
Yu Watanabe 1d60b723a3 Fix bug in DM iteration and standardise how to iterate through DM layers (#40426)
get_block_device_harder_fd() currently only traverses one level of
device mapper stacking when looking for the underlying block device.
This causes issues with nested DM setups like dm-crypt on top of
dm-integrity, where we don't traverse enough to get the actual physical
device.

Fix this by iterating through all DM layers until we reach a device with
no underlying device. And while we're at it also make cgroups use the
same logic.

Fixes: #40419
2026-01-30 15:36:03 +09:00
Lennart Poettering 1ccf4fe026 discover-image: carefully process sidecars
We have been a bit sloppy with caring for the various sidecards. Address
that.
2026-01-30 14:13:49 +09:00
Philip Withnall a05439097f docs: Add a diagram for the internals of sysupdate
I had to sketch this out before I could get the internals of
systemd-sysupdate straight in my head, particularly around how an
`UpdateSet` points to one `Instance` from each of a set of `Resource`s,
and those `Instance`s are either all sources or all targets.

Hopefully this is useful to the next person to look at the code.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2026-01-30 13:19:33 +09:00
David Santamaría Rogado 3bb9dedc05 hwdb: keyboard: uppercase apple id 2026-01-30 10:00:26 +09:00
David Santamaría Rogado 1c8cdfceb3 hwdb: keyboard: fix typo CAPSLOCK to NUMLOCK 2026-01-30 09:59:27 +09:00
Zbigniew Jędrzejewski-Szmek 248bc94fbf Rework error propagation in systemctl preset (#40504) 2026-01-29 16:41:31 +01:00
David Tardon a11278ce63 test: fix test with -Dnetworkd=false
User and group systemd-network are created from
sysusers.d/systemd-network.conf, which is only copied into the test
image when building with -Dnetworkd=true. This means that if
-Dnetworkd=false is used, the user and the group don't exist, which
causes the test to fail.

Use a locally created user and group to avoid that.
2026-01-29 21:12:34 +09:00
Zbigniew Jędrzejewski-Szmek 64eb78135c shared/install: rework error propagation again
The immediate impulse for this change is the fedora scriptlet which called:
  /usr/lib/systemd/systemd-update-helper install-system-units cryptsetup-pre.target cryptsetup.target getty@.service ... system-systemd\x2dcryptsetup.slice system-systemd\x2dveritysetup.slice ...
which called
  systemctl preset cryptsetup-pre.target cryptsetup.target getty@.service ... system-systemd\x2dcryptsetup.slice system-systemd\x2dveritysetup.slice ...
which threw an error that system-systemdx2dcryptsetup.slice does not exist
and did nothing at all. (The backslash is consumed by the shell.)
The obvious fix here is to figure out more levels of escaping… But we should
do something more robust in such cases.

If we fail in processing of a single unit, let preset all continue processing
units, report the failure through 'changes'. At the end, return failure. In
general, for operations which operate on a list of units specified by the user,
fail the whole operation if any of the individual operations failed. The only
operation where we don't do this is 'preset-all'.

$ SYSTEMD_LOG_LEVEL=debug build/systemctl --root=/ preset asdf1.servie asdf2.path; echo $?
Cannot find unit asdf1.servie.service.
Cannot find unit asdf2.path.
Failed to preset unit: Unit asdf1.servie.service does not exist
Failed to preset unit: Unit asdf2.path does not exist
1

While at it, fix double logging in the manager: dump_unit_changes() already
logs about errors, so the manager should only log on success.
2026-01-29 08:49:44 +01:00
Zbigniew Jędrzejewski-Szmek c67d64add6 shared/install: fix bogus error handling
This partially reverts a4f0e0da35. The
intent was good, we gather the errors, but we have no mechanism to
propagate the result, so the gathered result was ignored. In 'changes'
we can only report errors for specific units. If reading of the
directory fails, we might just as well report the error immediately.
This isn't great, but it's better then ignoring the errors. In practice,
failing halfway in this manner is unlikely, since it'd mean that the fs
is corrupted or something like that. We might as well return immediately
on such catastrophic errors.
2026-01-29 07:45:55 +01:00
Kai Lüke 16b3472b3f vmspawn: Add image format option to support qcow2
A QEMU qcow2 VM image can be internally sparse and compressed.
Support such images in vmspawn for both the main disk and any extra
disks.
2026-01-29 09:02:13 +09:00
Antonio Alvarez Feijoo b0b2a71d81 tar-util: do not error out if archive_read_next_header() returns ARCHIVE_WARN
archive_read_header(3) states that `archive_read_next_header()` returns
`ARCHIVE_WARN` if it succeeds but a non-critical error is found, so issue a
warning instead of stopping the untar process in this case.
2026-01-29 02:41:11 +09:00
Jeff Layton eb2e91b981 pidfd/cgroup-util: use fully-sized filehandle buffers
The current code assumes that FILEID_KERNFS filehandles will never grow
in size. This is not a safe assumption and userland shouldn't be trying
to guess the size of the filehandle it'll get.

We have a macro for that: MAX_HANDLE_SZ.
2026-01-29 00:57:03 +09:00
Yu Watanabe bd604320af docs: fix multiple grammar errors
Generated by GitHub Copilot.
2026-01-29 00:40:18 +09:00