Commit Graph

87220 Commits

Author SHA1 Message Date
Luca Boccassi
136d839fec man: switch ostree link to manpage
Webpage has been defaced and taken over
2026-03-18 18:40:43 +00:00
Daan De Meyer
d105f4c5a5 ci: Add back subagents and stop using --json-schema in claude-review
Let's stop using --json-schema and instead have claude write a JSON
file in the repo root which we pass around as an artifact similar to
how we pass around the input. This works around the bug where claude
receives task notifications after producing structured output which
breaks the structured output.
2026-03-18 16:50:17 +01:00
Zbigniew Jędrzejewski-Szmek
26230ed5c1 Rename verb functions for consistency and add per-verb constant parameter (#41003)
We often have a pattern where the same verb function is used for
multiple actions. This leads to an antipattern where we figure out what
action needs to be taken from argv[0] multiple times: often once in
arse_argv() to figure out what options are allowed, then once again
implicitly in dispatch_verb(), and then again in the action verb itself.
Let's allow passing a parameter into the verb to simplify this.
2026-03-18 16:46:13 +01:00
Daan De Meyer
fb2cf9f557 ci: Don't read claude settings from the repo
Shouldn't be possible, but extra hardening never hurts.
2026-03-18 13:48:55 +01:00
Daan De Meyer
20a8f5832a ci: Prettify JSON in pr context file so claude can parse it
Currently it's a single line which makes it hard for claude to read
what's in it.
2026-03-18 13:48:55 +01:00
Daan De Meyer
9374d7fa06 ci: Allow claude-review access to /tmp and /var/tmp 2026-03-18 13:48:55 +01:00
Daan De Meyer
1a7678e881 ci: Stop using subagents in claude-review workflow
As it seems impossible to prevent claude from receiving notifications
about subagents finishing after it has produced structured output, which
breaks the structured output as it has to be the final reply, let's stop
using subagents and background tasks completely to avoid the issue.
2026-03-18 13:48:55 +01:00
Vitaly Kuznetsov
a06992dd16 measure: make tpm_log_tagged_event() measure CC as well
tpm_log_tagged_event() only measures the event to the TPM while
tpm_log_ipl_event() measures the event both to the TPM and CC. Fix the
inconsistency.

Note, this is a potentially breaking change for TDX guests as systemd will
now measure more stuff to the MRTD/RTMRs, reference values for attestation may
need to be adjusted.

Found by Claude Code Review.
2026-03-18 12:35:21 +00:00
Luca Boccassi
cd1f2f2ff9 sd-dlopen: make macros to generate .notes.dlopen sections public API (#41047)
If this new scheme of adding dependencies is supposed to be used more
widely we need to start making it easy to add them. So add a new
self-contained header that projects can simply include without the need
to link against libsystemd itself. This will allow them to generate
`.notes.dlopen` sections:

```
> readelf -p .note.dlopen ./l2md

String dump of section '.note.dlopen':
  [     a]  |@FDO
  [    10]  [{"feature":"manifest-json","description":"Manifest-based change detection via gzip and JSON parsing","priority":"suggested","soname":["libz.so.1","libsystemd.so.0"]}]
  [    c2]  |@FDO
  [    c8]  [{"feature":"manifest-http","description":"HTTP transport for lore.kernel.org manifest fetch","priority":"suggested","soname":["libcurl.so.4"]}]
```
2026-03-18 12:33:58 +00:00
Daan De Meyer
2e676fd636 ci: Allow all commands in claude-review workflow
claude is asking for permissions in the logs, let's grant it access
to execute all commands to avoid the permission denials.
2026-03-18 12:44:48 +01:00
Daan De Meyer
02ab8dfc4f ci: Enable unpriv user namespaces for claude-review
Required for bubblewrap to work properly.
2026-03-18 12:44:48 +01:00
Nandakumar Raghavan
a4aae32478 ansi-color: fix SYSTEMD_COLORS=true regression when output is piped
The SYSTEMD_COLORS=true/1/yes no longer forced colors
when stdout was not a TTY (e.g. piped), because the COLOR_TRUE bypass
of the terminal_is_dumb() check was accidentally dropped.

Restore the old behavior by guarding the TTY check with
`m != COLOR_TRUE`, so an explicit boolean "true" value continues to
unconditionally force color output regardless of whether stdout is a TTY
or whether $NO_COLOR is set.
2026-03-18 12:03:38 +01:00
Daan De Meyer
e9396ef165 ci: Bump number of turns for claude and mention turns in prompt
claude keeps failing by its subagents completing after it has already
written the review for large prs. It seems to run out of turns, tries
to get the subagents to post partial reviews but doesn't seem to stop
them.

Let's insist that it waits for background tasks to stop but let's also
increase the max turns a bit so it doesn't run out as quickly.
2026-03-18 12:00:48 +01:00
Daan De Meyer
eef8f528a3 ci: Enable network isolation for claude and allow most tools
claude wants to use python to access the JSON context so let's allow
it. Since python3 basically allows you to reimplement every other tool,
let's just enable all tools except the web related ones but enable network
isolation so it can't try to exfiltrate anything via python.
2026-03-18 12:00:48 +01:00
Nandakumar Raghavan
36d129a7ad repart: add --grain-size= option for partition alignment
Add a --grain-size= CLI option to override the default 4 KiB partition
alignment grain. Setting --grain-size=1M matches the alignment used by
fdisk/parted and fixes misaligned partitions after small fixed-size
partitions like the 16 KiB verity-sig partition.

Also fix context_place_partitions() to re-align the start offset after
each partition, not just once per free area. Without this, a small
partition would cause all subsequent partitions in the same free area
to start at an unaligned offset.
2026-03-18 10:39:39 +00:00
Luca Boccassi
3236700a67 docs: update security policy to suggest GH advisories 2026-03-18 10:36:43 +00:00
Zbigniew Jędrzejewski-Szmek
cfc31d9c76 ci: reeanble compilation test with clang -O2, disable -Wmaybe-uninitialized for old gcc
In CI we get spurious failures about unitialized variables with gcc
versions older then (depending on the case) 12, 13, or 14. Let's only
try to do this check with newer gcc which returns more useful results.
At the same time, do compile with both gcc and clang at -O2, just
disable the warning.

The old logic seems to have been confused. We compile with -Wall, at
least in some cases, which includes -Wmaybe-unitialized. So if we
_don't_ want it, we need to explicitly disable it.
2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
69544de33e bless-boot: use verb function argument 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
1dc35ab944 report: use verb function argument 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
31ddd87da0 tree-wide: extend verbs functions with extra per-verb data parameter
We often have a pattern where the same verb function is used for
multiple actions. This leads to an antipattern where we figure out what
action needs to be taken from argv[0] multiple times: often once in
parse_argv() to figure out what options are allowed, then once again
implicitly in dispatch_verb(), and then again in the action verb itself.
Let's allow passing a parameter into the verb to simplify this.

This matches a pattern we have in conf-parser.h, where we have both
void *userdata (more global) and void *data (per-config item). Here,
I opted for uintptr_t userdata. It seems that most of the time we'll
want to just pass an enum value. This works OK with no casts. I also
tried a void* and union. In both cases, much more boilerplate is needed:
either a cast or a macro to help avoid compiler warnings. uintptr_t
seems generic enough to cover foreseeable usecases with no fuss.

This is a noop refactoring. See next commit for an example.
2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
9e8babc8ab update-utmp: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
5eccdf20ac pull: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
095368238a import-fs: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
b2a55d2fb2 import: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
8fb107aa99 export: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
326824deeb oomctl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
89e3ed81b1 portablectl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
cdf9951fe0 resolvectl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
73a2eafad3 timedatectl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
0950a0c0d1 udevadm: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
f75a6b7564 userdbctl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
26216a7e95 networkctl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
3d72ffc415 machinectl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
165e36e320 hostnamectl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
65c10b815b localectl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
82ac3a24ee importctl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
94a4849947 loginctl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
f5f1bc36d0 coredumpctl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
e6ec16dbe2 busctl: call all verb functions verb_* 2026-03-18 10:28:47 +00:00
Zbigniew Jędrzejewski-Szmek
b16cfc0c16 homectl: call all verb functions verb_*
This series of renaming patches has a few overlapping motivations:
- when functions are named uniformly, it code is more obvious
- I want to add a parameter to all verb functions
- in #40880 uniform naming of verb functions will be necessary too.
So let's do this cleanup. Some tools had a mix of functions w/ and
w/o "verb_", which looked messy.
2026-03-18 10:28:47 +00:00
Christian Brauner
919b8c7c92 sd-dlopen: relicense header to MIT-0
Relicense sd-dlopen.h from LGPL-2.1-or-later to MIT-0 so that
downstream projects can copy/paste the macros directly without
introducing a build dependency on the systemd headers.

Acked-by: Lennart Poettering <lennart@amutable.com>
Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-03-18 10:28:11 +00:00
Christian Brauner
f90ee22bcf man: add sd-dlopen(3) and SD_ELF_NOTE_DLOPEN(3) man pages
Document the new public sd-dlopen.h header and SD_ELF_NOTE_DLOPEN()
macro with associated constants. Includes usage examples for single
and multiple soname annotations.

Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-03-18 10:28:11 +00:00
Christian Brauner
8b12350b75 dlfcn-util: migrate to public SD_ELF_NOTE_DLOPEN() API
Switch all internal callers from the private ELF_NOTE_DLOPEN() macro to
the new public SD_ELF_NOTE_DLOPEN() API from sd-dlopen.h, and remove
the now-redundant macro definitions from dlfcn-util.h.

Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-03-18 10:28:11 +00:00
Christian Brauner
e10302b6b6 sd-dlopen: add header-only public API for FDO .note.dlopen ELF metadata
Expose ELF note dlopen annotation macros as a public header-only API in
sd-dlopen.h. This allows any project to embed .note.dlopen metadata in
their ELF binaries by simply including the header - no runtime linkage
against libsystemd is required.

The header provides SD_ELF_NOTE_DLOPEN() and associated macros/constants
implementing the ELF dlopen metadata specification for declaring optional
shared library dependencies loaded via dlopen() at runtime.

Signed-off-by: Christian Brauner <brauner@kernel.org>
2026-03-18 10:28:11 +00:00
noxiouz
4c7af7d9d1 coredump: capture crashing thread ID and name
Add %I (TID in initial PID namespace) to the core_pattern, so the
kernel passes the crashing thread's TID to systemd-coredump. Use it
to read the thread's comm name from /proc/<tid>/comm and log both as
new journal fields:

  COREDUMP_TID=       — TID of the crashing thread
  COREDUMP_THREAD_NAME= — comm name of the crashing thread

These fields are also stored as xattrs on external coredump files
(user.coredump.tid, user.coredump.thread_name) and displayed by
coredumpctl info alongside the PID line.

For single-threaded processes the TID equals the PID and thread_name
equals comm; for multi-threaded programs with named worker threads
(pthread_setname_np / PR_SET_NAME) this identifies which thread
crashed without needing to open the coredump file itself.

The new fields are optional in the socket forwarding path, so older
systemd-coredump senders are handled gracefully.

Co-developed-by: Claude <claude@anthropic.com>
2026-03-18 10:27:27 +00:00
Lennart Poettering
8a2c423870 find-esp: introduce _full() flavour of ESP/XBOOTLDR discovery functions
These functions take so many return paramaters, and in many of our cases
we don't actually needt them. Hence introduce _full() flavours of the
funcs, and hide the params by default.
2026-03-18 10:25:59 +00:00
Daan De Meyer
e87303d511 ci: Reduce retention for pr-context JSON file to a week
We don't need to keep this around fpr 90 days, let's keep it around
for a week.
2026-03-18 10:53:49 +01:00
Daan De Meyer
2967e89597 ci: Enable users without write action to the repo to access claude review
The labelling approach introduced in 6089075265
means contributors can now trigger the workflow on their own when the label
is added by a maintainer and they update the PR. Hence we need to allow all
users to access the claude code action. This is safe because we already gate
the workflow ourselves to only the contributors that we want to allow.
Additionally, the claude code job has no permissions anymore except read access
to the repository and can execute very limited tools, so this should be safe.
2026-03-18 10:53:49 +01:00
Daan De Meyer
2cada660de ci: Fix artifact name in claude-review workflow
The name doesn't actually matter, it gets replaced with the name
of the file when not archiving. So stop passing a name and pass in
the filename as the name when downloading the artifact.
2026-03-18 10:53:49 +01:00
Daan De Meyer
b29f3bbfa8 ci: Use artifacts to pass around pr context
The current approach runs into issues on large prs:
https://github.com/systemd/systemd/actions/runs/23220105199/job/67490722033
2026-03-18 07:27:41 +01:00