Commit Graph
82957 Commits
Author SHA1 Message Date
Luca Boccassi bfa39a8654 ci: restrict x86-only packages to x86 configs (#38056)
Prepare the ground for non-x86 CI jobs. Still work in progress, but
these preparatory steps work and can be already included.
2025-07-04 01:26:22 +01:00
Lennart Poettering 95b58ed32e pcrlock: process components outside of location window properly
So far, when we tried to match a component to eent log entries we
skipped those components if they were outside of our location window.
That however is too aggressive, since it means any components that are
already in the logs, but outside of the location window will be
considered unrecognized in the logs, and thus removed from the PCR
policy.

Change things around: always try to match up all components, regardless
if inside the location window or outside, but then make it non-fatal we
can't find a component outside of the location window.

Fixes: #36079
2025-07-03 23:04:43 +01:00
Luca Boccassi d7095eea4f ci: also install llvm-<version>
On some architectures that's not pulled in by default, it ships llvm-ar
which is needed by meson
2025-07-03 22:58:25 +01:00
Luca Boccassi 14a6b5fece ci: install packages available only on x86_64/arm64 on those arches only 2025-07-03 22:57:46 +01:00
Luca Boccassi 5d9881b89c mkosi: libclang-rt-dev is not available on s390x
Doesn't seem intentional, so use a regex for now:
https://bugs.debian.org/1108683
2025-07-03 22:54:43 +01:00
Luca Boccassi 71f9082c7b mkosi: move efi packages to conditional drop-in 2025-07-03 22:54:43 +01:00
Luca Boccassi dac45cbf77 mkosi: drop workaround for opensuse systemd-stub tmpfiles
It was moved back to the main package
2025-07-03 22:54:43 +01:00
Luca Boccassi 144ea281f3 sd-event struct typedefs and comments (#37790) 2025-07-03 22:22:40 +01:00
Lennart Poettering c5de7b14ae chase: when chasing paths, trigger automounts
As it turns out open() with O_PATH does *not* trigger autofs, you get a
reference to the autofs inode, if not triggered.

But there's a way out: open_tree() (when specified without
OPEN_TREE_CLONE) is actually fully equivalent to open() with O_PATH –
with the exception of one thing: it *does* trigger automounts.

Thanks for Christian Brauner for pointing me to this and saving my day.

Fixes: #33155
2025-07-03 22:18:56 +01:00
Luca Boccassi 0754db571b openssl-util: allow to build with openssl without UI support (#38041)
This makes it possible to build systemd with
-Dc_args='-DOPENSSL_NO_UI_CONSOLE=1'. Hopefully, now systemd can be
built with other openssl implementations, like BoringSSL, which deos not
support UIs.

Closes #38024.
2025-07-03 22:11:02 +01:00
Mike Yuan b68179c072 fd-util: Move RAW_O_LARGEFILE and O_ACCMODE_STRICT definitions to fd-util.h (#38051) 2025-07-03 22:27:39 +02:00
Zbigniew Jędrzejewski-Szmek 01033b3711 test-utf8: drop explicit setting of colors
It was added in 82208a9949, but since
13ee939784, we enable colors by default.
I don't think this function is doing anything useful.
2025-07-03 21:03:26 +02:00
Zbigniew Jędrzejewski-Szmek 01383af1c1 shared/bus-unit-util: stop unsing strndupa
Those are user-controlled strings, so let's use heap allocations in the usual
fashion. (Though, with strndupa_safe, the allocations were bounded anyway, so
ultimately this doesn't matter.)
2025-07-03 21:03:26 +02:00
Zbigniew Jędrzejewski-Szmek d971936bf4 shell-completions: add systemd-analyze transient-settings
The zsh completions only complete one type argument, even though multiple
args are allowed. But the same issue occurs with other completions, e.g.
for options. I don't know how to solve this.
2025-07-03 21:03:26 +02:00
Zbigniew Jędrzejewski-Szmek 773cb7aa7e docs/TRANSIENT-SETTINGS: update lists
Those lists were partially wrong and partially outdated. We should generate
this document automatically, but let's revisit this topic after the conversion
to sphinx. For now, as a stop-gap solution, I generated the lists from
the new 'systemd-analyze transient-settings' command.
2025-07-03 21:03:26 +02:00
Zbigniew Jędrzejewski-Szmek a839c4b7b7 analyze: add transient-settings verb
Related to https://github.com/systemd/systemd/pull/37641.

The name "transient settings" was used in docs/TRANSIENT-SETTINGS.md.
Using "setting" helps distinguish this from D-Bus "properties", which are
a much larger set, partially overlapping.
2025-07-03 21:03:26 +02:00
Zbigniew Jędrzejewski-Szmek 1c1626e063 shared/bus-unit-util: add bus_dump_transient_settings() helper
bus_append_unit_property() and associated functions accept a long list of
properties. But the specific names are only available through code. But it is
useful to be able to know the specific list of properties that is supported, in
particular for shell completions. Thus, add a way to list the properties that
are supported by the code.

In the future we could also turn this into a test for the documentation. For
various reasons, the list of properties listed in the docs is a partially
overlapping set. E.g. for service type, the pull request
https://github.com/systemd/systemd/pull/37661 creates a list with 212 entries,
and this code generates 7 entries less and 184 more. I didn't check all the
differences, but in the few cases I did, the list generated here was actually
correctly supported by 'systemd-run -p'.

A smoke test is added.
2025-07-03 21:03:26 +02:00
Zbigniew Jędrzejewski-Szmek c133545430 shared/bus-unit-util: convert to a table 2025-07-03 19:58:15 +02:00
Zbigniew Jędrzejewski-Szmek b77e4fc6ce shared/bus-unit-util: add helper for TimeoutSec= 2025-07-03 19:58:15 +02:00
Zbigniew Jędrzejewski-Szmek 73ac906bec shared/bus-unit-util: add define to shorten common append pattern 2025-07-03 19:58:12 +02:00
Zbigniew Jędrzejewski-Szmek 472a1faae8 shared/bus-unit-util: add helper for AppArmorProfile=/SmackProcessLabel= 2025-07-03 19:53:40 +02:00
Zbigniew Jędrzejewski-Szmek dbd4d4cc43 shared/bus-unit-util: add helper for CPUQuotaPeriodSec=ManagedOOMMemoryPressureDurationSec= 2025-07-03 19:53:40 +02:00
Zbigniew Jędrzejewski-Szmek 5e18038da2 shared/bus-unit-util: add helper for unit deps 2025-07-03 19:53:40 +02:00
Zbigniew Jędrzejewski-Szmek a90d205af5 shared/bus-unit-util: define helper for conditions and asserts
The function has "try" in the name because it dynamically checks
if the field name matches.
2025-07-03 19:53:40 +02:00
Zbigniew Jędrzejewski-Szmek 9806468ea4 shared/bus-unit-util: define helper for SuccessActionExitStatus= and friend 2025-07-03 19:53:40 +02:00
Zbigniew Jędrzejewski-Szmek bfa7d82661 shared/bus-unit-util: add helper for TimersCalendar property 2025-07-03 19:53:40 +02:00
Zbigniew Jędrzejewski-Szmek c3c21b2bc4 shared/bus-unit-util: add helper for TimersMonotonic property 2025-07-03 19:53:40 +02:00
Zbigniew Jędrzejewski-Szmek d661a540a3 shared/bus-unit-util: add helper for Listen property 2025-07-03 19:53:38 +02:00
Zbigniew Jędrzejewski-Szmek 65ebd48e6f shared/bus-unit-util: use common helper for various strv properties 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 7673abfc2b shared/bus-unit-util: define helper for SuccessExitStatus= and friends 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 7a5eb9d03d shared/bus-unit-util: define helper for Paths property 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 9228d67dc8 test: drop ProtectHostnameEx, add one test for ProtectHostnameEx
This is a separate commit because the parent commit is supposed to be
backward compatible, i.e. the tests must pass with both the bogus ProtectHostnameEx
name and ProtectHostname.

A test is added for ProtectHostnameEx to verify that it is still accepted
for backward compat.
2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 9e3bc6406b shared/bus-unit-util: add helper for ProtectHostnameEx and fix naming confusion
As with grandparent commit for ImportCredentialEx=, the whole series of commits
that extended ProtectHostname was confused (6746f28854,
cf48bde7ae, e76fcd0e40),
because it added ProtectHostnameEx in places where parsing of ProtectHostname
should be have been extended.

Accept ProtectHostname=… with the new extended syntax, keep accepting
ProtectHostnameEx=… for compat with release v257. Prefer sending ProtectHostname.

Partially resolves https://github.com/systemd/systemd/issues/37174.
2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 779aed7443 shared/bus-unit-util: add a helper function for directory args 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek e04484ad7c shared/bus-unit-util: define helper for ExtensionImages= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 1c202720be shared/bus-unit-util: define helper for MountImages= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 79decd4e49 shared/bus-unit-util: define helper for RootImageOptions= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 5517273715 shared/bus-unit-util: define helper for RootHashSignature= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 4d92c1da45 shared/bus-unit-util: define helper for RootHash= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 8f90f4b86f shared/bus-unit-util: define helper for TemporaryFileSystem= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 0fdcbaf633 shared/bus-unit-util: define helper for BindPaths=/BindReadOnlyPaths= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek af677b7a25 shared/bus-unit-util: define helper for RestrictNamespaces=/DelegateNamespaces= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek c622449cb7 shared/bus-unit-util: add helper for filter lists 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 187b248e5b shared/bus-unit-util: add helper for NUMAMask= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 85eb4381d3 shared/bus-unit-util: use common helper for NUMAPolicy= 2025-07-03 19:35:33 +02:00
Zbigniew Jędrzejewski-Szmek 6dd31c8339 shared/bus-unit-util: define helper for CPUAffinity= 2025-07-03 19:35:12 +02:00
Lennart Poettering 03b7de45d8 tree-wide: Add more socket units (#37991) 2025-07-03 17:43:20 +02:00
DaanDeMeyer 4a8c395167 tree-wide: Add initrd presets
Currently, when running "systemctl preset-all --root=xxx" in mkosi
to enable/disable units for initrds, the system presets are used.
The problem with this approach is that the system presets are written
for the system, and that is not necessarily ideal for an initrd, but we
still want to use the same packages in the initrd that we install in the
system, so let's introduce a separate directory for initrd presets which
is used to pick up preset files from when we detect that we're configuring
an initrd (by looking for /etc/initrd-release).

We also introduce a systemd preset file for the initrd, which is based on
the system one, except with all the stuff unnecessary for the initrd removed.
2025-07-03 17:43:01 +02:00
Lennart Poettering 77bf8f8905 conf-files: if CONF_FILES_REGULAR|CONF_FILES_DIRECTORY is used together allow either file or dir
This fixes a a bug introduced by
50c81130b6.
2025-07-03 17:41:07 +02:00
Lennart Poettering cfd8920243 ssh-generator: generate /etc/issue.d/ with VSOCK ssh info data
I find myself trying to log into a fresh ParticleOS VM started via
systemd-vmspawn all the time, but I don't know its CID. Let's show it on
the getty screen, to make it immediately visible.
2025-07-03 17:36:09 +02:00