Commit Graph

82576 Commits

Author SHA1 Message Date
Yu Watanabe
4df7d51cde networkd-test: stop varlink socket before setting up runtime directories
Follow-up for b0ea79c5b5.
2025-07-05 16:54:19 +09:00
Luca Boccassi
a06e64d884 ci: use -p and -f when creating dirs/removing files in mkosi job btrfs setup
It failed at least once:

mkdir: cannot create directory ‘/mnt/mkosi’: File exists
2025-07-05 11:38:10 +09:00
Lennart Poettering
aac21825cd seccomp-util: allowlist open_tree() as part of @file-system
Now that we make use of open_tree() in places we previously used
openat() with O_PATH, it makes sense to move it from @mount to
@file-system. Without the OPEN_TREE_CLONE flag open_tree() is after all
unprivileged.

Note that open_tree_attr() I left in @mount, since it's purpose is
really to set mount options when cloning, and that's clearly a mount
related thing, not so much something you could use unpriv.

Follow-up for: c5de7b14ae

This addresses an issue tracked down by Antonio Feijoo: since the commit
that started to use open_tree() various apps started to crash because
they used seccomp filters and sd-device started to use open_tree()
internally.
2025-07-04 22:23:24 +02:00
DaanDeMeyer
eabee42517 man: Fix typo 2025-07-04 21:33:36 +02:00
Luca Boccassi
b8fe5fa129 Small cleanups for tests (#38063) 2025-07-04 19:24:29 +01:00
Luca Boccassi
7c6e78a6bc mkosi: update debian commit reference to cc380fbc8af2e17165623d16630b7fc3ab4291d0
* cc380fbc8a Install new files for upstream build
* 45f81ec53e Install new files for upstream build
* 105837d0ba Update changelog for 257.7-1 release
* bb17074bfd systemd-boot: reduce harmless noise on cleanup
* 363898fe05 systemd-boot: remove fb too on removal
2025-07-04 20:17:51 +02:00
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
Zbigniew Jędrzejewski-Szmek
54889c6cfb basic/rlimit-util.c: drop duplicate checks
parse_sec() and parse_time() already handle "infinity".
TEST(rlimit_parse_format) covered the first case, also extend it to cover
the second case.
2025-07-04 12:11:00 +02:00
Zbigniew Jędrzejewski-Szmek
fb629de435 basic/rlimit-util.c: align table 2025-07-04 12:11:00 +02:00
Zbigniew Jędrzejewski-Szmek
269dcf0115 test-dirent-util: remove strange whitespace 2025-07-04 11:57:52 +02:00
Zbigniew Jędrzejewski-Szmek
eb5b854150 tests: use log_tests_skipped more, use shorter form
Also change order to handle errors before 0 in one case.
2025-07-04 11:57:38 +02: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
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