Commit Graph

1351 Commits

Author SHA1 Message Date
Philip Withnall
ce35320b5c docs: Update memory pressure docs for latest GLib support for it
As of GLib 2.90.0 (not yet released), GLib will fully support the spec,
including the `MEMORY_PRESSURE_WATCH` and `MEMORY_PRESSURE_WRITE`
environment variables, which it did not support previously.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/5046

(cherry picked from commit 075f74a19c)
(cherry picked from commit 97369d584a)
(cherry picked from commit 64d15be6f0)
2026-07-23 22:32:14 +01:00
Valentin David
af04bddb02 units: Run systemd-pcrnvdone in initrd
The measurement that systemd-pcrnvdone corresponds to
`src/pcrlock/pcrlock.d/770-nvpcr-separator.pcrlock`, and 770 is supposed to
happen in the initrd (which ends at 800).

(cherry picked from commit 856ab04a29)
(cherry picked from commit 1321eb76f7)
2026-07-23 22:28:19 +01:00
Jordan Petridis
c2038aaa6a docs/INHIBITOR_LOCKS: Update sentence for the new mode added
804874d26a added a new mode but the
sentence wasn't updated and it was still stating that there are Two modes
instead.

(cherry picked from commit 84d10a9004)
(cherry picked from commit 3ff640df40)
2026-06-26 14:50:36 +01:00
Luca Boccassi
ce4ffe001f docs: specifically mention that braces in if blocks do not need to be symmetric
The claude bot keeps getting this wrong again and again:

  Claude: nit: systemd coding style requires braces on both branches of
               an if/else when one branch uses them. Here the if branch
               is a single statement without braces but the else branch
               uses braces

Specifically mention this is not the case in the coding style doc
to hopefully make it stop hallucinating this rule

(cherry picked from commit 36896a27b1)
(cherry picked from commit e0e731c653)
2026-06-26 14:50:32 +01:00
Lennart Poettering
cd8725e429 docs: document the .nvpcr file format superficially
(cherry picked from commit 89c837a5f8)
(cherry picked from commit e6ff91addf)
2026-06-26 14:50:32 +01:00
roib
10824f7465 docs: update footer to 2026
(cherry picked from commit db1ca20591)
(cherry picked from commit 2aa3e50692)
2026-05-27 12:20:18 +01:00
rusty-snake
524adaec7d docs: fix capability name, it's CAP_MKNOD not CAP_SYS_MKNOD (#41621)
(cherry picked from commit b40ed2067f)
(cherry picked from commit c36c8a31e6)
2026-05-27 12:20:18 +01:00
Kit Dallege
a256323c8e docs: fix misleading VM/machined documentation
Fix two issues in WRITING_VM_AND_CONTAINER_MANAGERS.md:

1. The Host OS Integration section implied that -M switch and
   machinectl shell/login work for VMs, but they currently only
   work for containers. Add a note clarifying this limitation.

2. The Guest OS Integration section said "there's only one" VM
   integration API (SMBIOS Product UUID), but VM_INTERFACE.md
   documents five. Replace the outdated single-API description
   with a reference to VM_INTERFACE.md listing all five.

Fixes #40935

Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit adc4757b9e)
(cherry picked from commit 385dc8fb38)
2026-05-27 12:20:17 +01:00
Adrian Wannenmacher
656670df9d fix list of inhibitor lock types
Markdown and HTML don't support mixing ordered and unordered items
within a single list. This means the previous syntax actually produced
three separate lists.

Also, markdown converters don't necesarrily respect the first number in
an ordered list, and may just overwrite it to one. This is the case for
the one that generates the systemd.io page. And even if that wasn't the
case, the numbering of the second ordered list would be off by one.

(cherry picked from commit f377be7081)
(cherry picked from commit 5665b14945)
2026-05-27 12:20:16 +01:00
Rito Rhymes
6c6b635b8a docs: contain image sizing and prevent overflow on mobile
`max-width: 100%` keeps images from expanding beyond
their container and creating horizontal overflow scroll
on small screens.

`height: auto` ensures the image scales proportionally
when width is adjusted.

(cherry picked from commit e5a6cc3a6f)
2026-03-12 12:13:02 +00:00
Rito Rhymes
b4e951c3de docs: wrap bare enum constants in inline code in JOURNAL_FILE_FORMAT
(cherry picked from commit f18df62e71)
2026-03-12 12:13:02 +00:00
Rito Rhymes
45d9ecaa55 docs: allow long inline code to wrap to prevent overflow on mobile
(cherry picked from commit f9d4dce604)
2026-03-12 12:13:02 +00:00
Rito Rhymes
ea5aad4518 docs: allow long links to wrap to prevent overflow on mobile
(cherry picked from commit 4443626b16)
2026-03-12 12:13:02 +00:00
Lennart Poettering
a0981c8d3e CODING_STYLE: add a brief log msg style guide
(cherry picked from commit 83b4a5bb3d)
2026-02-26 10:24:31 +00:00
Luca Boccassi
d33dbbc613 journald: set a lower size limit for FDs from unpriv processes
Unprivileged processes can send 768M in a FD-based message to journald,
which will be malloc'ed in one go, likely causing memory issues.
Set the limit for unprivileged users to 24M.

Allow coredumps as an exception, since we always allowed storing
up to the 768M max core files in the journal.

Reported on yeswehack.com as #YWH-PGM9780-48

(cherry picked from commit e67b008fa3)
2026-02-26 10:24:31 +00:00
Lennart Poettering
4429491bf5 CODING_STYLE: document how to handle kernel compat
Let's define a way how to mark codepaths that are subject to
deletion once the kernel baseline reaches a certain version, to make it
easier to find these cases.

WHile we are at it, introuce a whole section in CODING_STYLE about
kernel version compat.

I followed the new scheme in #39621, but we can merge the coding style
guidelines on this already.

(cherry picked from commit 43ef7c944c)
2026-02-26 10:24:31 +00:00
Tabis Kabis
1396af1bae Switch back to 'http' in SVG files (#40661)
Firefox & Chrome don't render images because of 'https' being used in the SVG.
Switch back to 'http'.

Follow-up for 0922f62126

(cherry picked from commit b15b337f8e)
2026-02-12 17:49:43 +00:00
Zbigniew Jędrzejewski-Szmek
0b7f74585f docs: update old man page links to the official location
(cherry picked from commit 2cbea2dd75)
2026-02-06 14:29:11 +00:00
Zbigniew Jędrzejewski-Szmek
279164b13b 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

(cherry picked from commit f4dd927e5c)
2026-02-06 14:29:11 +00:00
Yu Watanabe
017050a838 docs: update external links
- fix many links and drop unreachable links,
- always use https rather than http if supported,

(cherry picked from commit 0922f62126)
2026-02-06 14:29:11 +00:00
Philip Withnall
877b9f9a0d 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>
(cherry picked from commit a05439097f)
2026-02-06 14:29:10 +00:00
Yu Watanabe
2a1da92d9f docs: fix multiple grammar errors
Generated by GitHub Copilot.

(cherry picked from commit bd604320af)
2026-02-06 14:29:10 +00:00
DaanDeMeyer
9af7887104 docs: Document practice of using comments for argument names
(cherry picked from commit 90e80b9e8b)
2026-02-06 14:29:10 +00:00
Ben Boeckel
487ad1c9db docs/PASSWORD_AGENTS: document the AcceptCached= field
(cherry picked from commit 0d15b2304b)
2026-02-06 14:29:10 +00:00
Ben Boeckel
59d7895d48 docs/PASSWORD_AGENTS: document the Silent= field
(cherry picked from commit 9f4606c361)
2026-02-06 14:29:10 +00:00
Ben Boeckel
f5a743ebe8 docs/PASSWORD_AGENTS: clarify that Echo=0 may obscure
(cherry picked from commit dc08cb1eb8)
2026-02-06 14:29:10 +00:00
Ben Boeckel
d526f7ce75 docs/PASSWORD_AGENTS: note that the user directory may be created
(cherry picked from commit 19d7ce2f7b)
2026-02-06 14:29:10 +00:00
DaanDeMeyer
0c12b14d2c docs: Add explicit reference to unprivileged userns docs of mkosi
Fixes #40216

(cherry picked from commit f3c67f7e16)
2026-02-06 14:29:10 +00:00
Lennart Poettering
36dd990ee2 docs: add redirection of the osc context to uapi website
(cherry picked from commit d91aed3b55)
2026-02-06 14:29:09 +00:00
Luca Boccassi
8cd8adba08 Create CNAME 2025-12-17 23:13:15 +00:00
Luca Boccassi
b262ded0bd Boot loader menu docs and tweaks (#39842) 2025-12-17 23:00:59 +00:00
Zbigniew Jędrzejewski-Szmek
755637b04a docs/BLI: add missing descriptions of feature bits
Follow up for 2553a5482c,
92bb46c464,
e15d18b4c6,
a67f22c4a7,
e1f1b5fc62.
2025-12-17 22:55:38 +01:00
Zbigniew Jędrzejewski-Szmek
1228429908 docs/BOOT_LOADER_INTERFACE: use full variable names once
We said in the header that "all EFI variables use the vendor UUID
4a67b082-0a4c-41cf-b6c7-440b29bb8c4f", but people not familiar with
UEFI might not know that this is concatenated with the variable name.
Let's use the full form once — when introducing the variable — to
make it easier to grep and search for.

While at it, use sembreaks in the document. This makes subsequent
changes much easier to review. (It also shows that some sentences
are rather long and thus hard to understand.)
2025-12-17 22:55:23 +01:00
Daan De Meyer
9848f56cc6 tree-wide: Use meson test -q
meson test output is extremely verbose, printing
a separate line for each successful test. Let's
add -q/--quiet everywhere so it only prints full
lines for skipped and failed tests.
2025-12-12 11:45:58 +01:00
Daan De Meyer
ee6b3d1aa2 test: Stop using grep -q in integration test
When a TTY is attached to the test unit, grep -q will generate SIGPIPE
for the previous command in the pipeline which in combo with `pipefail`
will cause the command to fail with exit status 141 which will fail the
test.

Replace with >/dev/null to avoid this from happening.

See also https://www.gnu.org/software/grep/manual/html_node/Usage.html
> There is a related problem with Bash’s set -e -o pipefail. Since grep
> does not always read all its input, a command outputting to a pipe read
> by grep can fail when grep exits before reading all its input, and the
> command’s failure can cause Bash to exit.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
2025-12-10 12:09:10 +01:00
Yu Watanabe
f01daa30f1 docs/MOUNT_REQUIREMENTS: fix typo
Follow-ups for 3e94ae6f1e.
2025-11-25 22:52:10 +09:00
Lennart Poettering
81b52a013c docs: reference UAPI specs by their number when linked 2025-11-23 17:16:09 +01:00
Daan De Meyer
dd281e19a7 docs: Document cast formatting rules 2025-11-22 23:41:46 +01:00
Daan De Meyer
3c6af4cc79 Make file-hierarchy.7 link to two online docs and drop most of the contents (#39412) 2025-11-20 09:56:41 +01:00
Luca Boccassi
6d36d07599 docs: elf metadata specs have moved to uapi-group 2025-11-19 20:00:25 +01:00
Zbigniew Jędrzejewski-Szmek
720876d5c0 docs/MOUNT_REQUIREMENTS: also link to LFHS
This document doesn't really without the basis of the other one.
2025-11-18 13:03:38 +01:00
Zbigniew Jędrzejewski-Szmek
3e94ae6f1e docs/MOUNT_REQUIREMENTS: describe nested mounts more carefully
I was looking into a question posed in one of the Fedora discussion threads:
is it OK for a package to assume that files in different directories under /usr
are always on the same mount point? rpmlint emits a warning if a package has
files that are hardlinked between directories, i.e. rpmlint thinks that this
is not the case. But in practice, our systems are like this and our tooling
generally doesn't expect a part of /usr to be separated out. I looked at the
MOUNT_REQUIREMENTS document, but it doesn't answer this question clearly.
It was clearly written with the assumption that e.g. "/usr/" or "/var/" are one
mount point, so when it is "mounted", all of it is available. But the document
also talks about submounts being pulled in through requirements on specific
units, which requires some mounts not to be mounted all at once, so the reader
is left without any direct answer to this question.

This rewrite makes the following changes:
- rename "generally three categories of requirements" to
  "three general categories of mount points" because we're categorizing
  mount points, not requirements.
- always repeat the category name in further mentions,
  e.g. "2/early" instead of just "2" so the reader doesn't have to jump
  back to the table when reading.
- mention that it is OK for a mount point to be not split out
- say that submount which is "conceptually separate" may be mounted
  later.
- say "ephemeral system" instead of "stateless system" and split out
  the description of those systems into a separate paragraph and clearly
  state that they are an exception that skips the requirements listed in
  this document.
- be consistent in specifying the boundary before which each category must
  have been mounted. Previously, cat. 1 was described as "before transisition"
  and cat. 2 was described as "during early boot", which created the additional
  problem that later we needed to contradict this saying that "must be mounted
  during early boot" doesn't actually mean that and this can be done ealier.
  If we say "before end of early boot", we avoid this awkwardness.
2025-11-18 13:03:38 +01:00
Daan De Meyer
7e5a07c24a Various documentation updates 2025-11-18 10:09:19 +00:00
Luca Boccassi
00ed239a7b repart: prefix LUKS superblock label with "luks-" by default, and add explicit VolumeLabel= setting to control it (#39713)
Alternative-to: #39536
2025-11-17 17:46:39 +00:00
Philip Withnall
69f1a1d5ed docs: Update MEMORY_PRESSURE to mention recent improvements in GLib
See https://gitlab.gnome.org/GNOME/glib/-/issues/2931 for the changes in
GLib upstream. Using `GMemoryMonitor` is now more compliant with the
systemd recommended approach, but it needs further work to read the
recommended environment variables rather than unconditionally accessing
the per-cgroup PSI kernel file directly.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-11-17 18:05:41 +01:00
Lennart Poettering
e30738c20c dissect-tool: accept encryption password via $PASSWORD 2025-11-17 16:42:58 +01:00
Lennart Poettering
867e64737a units: measure a separator event into PCR 9 after completing NvPCR initialization
We do this in a separate service (rather than inside of
systemd-tpm2-setup), since we want failures of this measurement to
result in an instant reboot, like for most our measurements.

Failures to initialize nvpcrs, or allocate an SRK are somewhat OK (and
more likely), as long as this separator communicates clearly where they
have to have taken place, if they worked.
2025-11-14 22:22:39 +01:00
Lennart Poettering
d70296bb56 tpm2-setup: measure information about NvPCR initialization to PCR 9
This locks down NvPCR initilization a bit more: we'll measure each
initialization of an NvPCR into PCR 9, thus chaining the NvPCRs to the
PCR set. After all NvPCRs are initialized we measure a barrier into PCR
9 as well.

This ensures that later additions of NvPCRs are clearly recognizable and
distuingishable from those done at boot.
2025-11-14 22:04:58 +01:00
Ivan Kruglov
b8ef90d6fd docs: initial version of varlink guideline 2025-11-14 17:54:20 +01:00
Zbigniew Jędrzejewski-Szmek
aff5c0af8b docs/BACKPORTS: update
We now keep stable branches in the main repo. Update the description
to match current practice.

Closes https://github.com/systemd/systemd/issues/35846.
2025-11-12 23:01:35 +00:00