Commit Graph

82565 Commits

Author SHA1 Message Date
Gabríel Arthúr Pétursson
cd12611a88 man: Fix typo in name of sd_id128_to_uuid_string 2025-07-04 18:42:22 +01:00
DaanDeMeyer
1f0acba512 presets: Disable by default for initrd presets
For initrd presets, we can change the default to disable services
by default instead of enabling by default without breaking compat
so let's do that as it makes much more sense as a default than
enabling everything by default.
2025-07-04 16:22:27 +01:00
ZIHCO
9a08000d18 systemd-analyze: added the verb unit-shell to spawn and attach shell 2025-07-04 16:09:07 +01:00
Luca Boccassi
8a1d134144 ci: enable build/unit test jobs on ppc64le
New workers we got from IBM can be used now. The GHA linter doesn't
recognize them yet, so add a local workaround until the change is
merged in the linter.
2025-07-04 13:35:31 +01:00
Lennart Poettering
0fa3ac436c ssh-generator: generate /etc/issue.d/ with VSOCK ssh info data (#37819)
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-04 10:45:45 +02:00
Yu Watanabe
908b0ea15f udev: gracefully handle ENODEV or friends in opening device node
Fixes #38033.
2025-07-04 09:47:47 +02:00
Luca Boccassi
614e0180ea ci: enable arm64 runner for build/unit jobs
Enable only a couple of jobs, to avoid running down capacity too much
2025-07-04 12:39:43 +09:00
Luca Boccassi
60bda55f5b ukify: when decompressing kernel before signing, call verify on decompressed file
Otherwise it will fail as it's an archive, not a PE file:

Invalid DOS header magic
Can't open image /boot/vmlinuz.old
/boot/vmlinuz.old is compressed and cannot be loaded by UEFI, decompressing
+ sbverify --list /boot/vmlinuz.old
=========================== short test summary info ============================
FAILED ../src/ukify/test/test_ukify.py::test_efi_signing_sbsign[3650] - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.
FAILED ../src/ukify/test/test_ukify.py::test_efi_signing_sbsign[None] - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.
FAILED ../src/ukify/test/test_ukify.py::test_inspect - subprocess.CalledProcessError: Command '['sbverify', '--list', PosixPath('/boot/vmlinuz.old')]' returned non-zero exit status 1.

Follow-up for 0dd03215f1
2025-07-04 12:39:43 +09:00
Yu Watanabe
c2f3bb742b Add systemd-analyze verb to list runtime unit properties (#37665) 2025-07-04 11:47:38 +09:00
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
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