1
0
mirror of https://github.com/systemd/systemd synced 2025-10-06 00:13:24 +02:00
Commit Graph

1282 Commits

Author SHA1 Message Date
Le_Futuriste
83b5dabb40 docs(boot): fix typo in code block 2025-09-27 00:21:53 +09:00
Lennart Poettering
264608e8c3 docs: add a governance document
Since there have been disagreements on certain aspects of the technical
direction, let's clear things up, and introduce a governance document,
taking inspiration from:

https://github.com/uapi-group/uapi-group.github.io/blob/main/content/_index.md#governance
2025-09-24 08:48:17 +02:00
Luca Boccassi
12ef7e0a2c docs: use '_' as separator for OSC page
Make it consistent with other pages

Fixes https://github.com/systemd/systemd/issues/39019
2025-09-19 20:11:46 +09:00
ners
7b7f0983e0 localectl: use XKB path specified from environment variable 2025-09-19 15:37:52 +09:00
Ryan Brue
d7c7af28fb doc: document /run/host/root/ as an optional bind mount for the host fs
Container managers may want to bind mount the root filesystem
somewhere within the container. Security-wise, this is very much not
recommended, but it may be something application containers may want
to do nonetheless.

Ref: https://github.com/flatpak/flatpak/pull/6125#issuecomment-2759378603
2025-09-17 13:55:44 +01:00
Salim B
d92990c783 docs: fix typo 2025-08-18 04:43:44 +09:00
Yu Watanabe
ed9c82095a assert-util: introduce log_set_assert_return_is_critical_from_env()
It will be used for testing nss modules.
2025-08-17 00:14:42 +09:00
DaanDeMeyer
cb372a3ce4 docs: Add policy on AI generated code to contributing doc
Contributors making use of AI should clearly mention so in their
PR descriptions and include the prompt used to generate the pull
request.
2025-07-29 18:40:26 +02:00
Zbigniew Jędrzejewski-Szmek
b68b9f8f7f docs/ENVIRONMENT: fix typo and adjust grammar 2025-07-29 11:36:21 +02:00
Nick Owens
8acee7c35e docs: fix SurviveFinalKillSignal typo 2025-07-22 18:03:39 +01:00
Luca Boccassi
bfeaefebf2 docs: mention LoaderTpm2ActivePcrBanks in BLI
Follow-up for 6eab4cd44c
2025-07-22 17:05:21 +02:00
Philip Freeman
72775b7c89 Update USER_RECORD.md (#38283)
trailing comma here is invalid json.
2025-07-22 18:27:37 +09:00
Lennart Poettering
0fa8b51962 tree-wide: the env var is called $XDG_RUNTIME_DIR, not $XDG_RUNTIME_DIRECTORY 2025-07-15 12:49:08 +02:00
Yu Watanabe
e58ba80a40 units: drop runlevel[0-6].target 2025-07-13 05:49:09 +09:00
Yu Watanabe
af925f7eb3 systemctl: kill SysV compat 'runlevel' command 2025-07-13 05:38:13 +09:00
Yu Watanabe
1d81c3a74e docs: mention src/include/ directories 2025-07-11 13:05:46 +09:00
DaanDeMeyer
7f76ff2821 tree-wide: Use "mkosi box" instead of "mkosi sandbox"
The box verb was added as a synonym for sandbox. sandbox still works,
but let's switch to box as it's shorter.
2025-07-10 16:24:34 +02:00
Andres Beltran
26c6f3271a core: add quota support for State, Cache, and Log exec directories 2025-07-07 17:28:47 +00:00
Lennart Poettering
d03714e4e4 tree-wide: "human readable" → "human-readable"
Apparently, the spelling with a hyphen is better style in the English
language.

Suggested by: #36165
2025-07-07 11:21:25 +02:00
Yu Watanabe
c2f3bb742b Add systemd-analyze verb to list runtime unit properties (#37665) 2025-07-04 11:47:38 +09: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
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
Zbigniew Jędrzejewski-Szmek
7d247d3cb8 meson: drop explicit custom_target names
[1] says:
> Since 0.60.0 the name argument is optional and defaults to the basename of
> the first output
We specify >= 0.62 as the supported version, so drop the duplicate name in all cases
where it is the same as outputs[0], i.e. almost all cases.

[1] https://mesonbuild.com/Reference-manual_functions.html#custom_target
2025-06-28 17:14:50 +02:00
Lennart Poettering
584e5222d2 fix docs for inhibitor logic (#37975)
Fixes: #34091

Sigh.
2025-06-26 17:22:08 +02:00
Luca Boccassi
4cce53b76a Small udpates to TPM2_PCR_MEASUREMENTS page (#37978) 2025-06-26 14:28:03 +01:00
Lennart Poettering
2cdaad5b3b docs: properly document inhibitor locks
I still am annoyed that this wasn't documented properly when the
inhibitor locks where modified, even though raised multiple times in PR
reviews.

Follow-up for: #30307
See: #34091
2025-06-26 15:21:01 +02:00
Zbigniew Jędrzejewski-Szmek
85b84437c8 docs/TPM2_PCR_MEASUREMENTS: fix typo 2025-06-26 12:25:30 +02:00
Zbigniew Jędrzejewski-Szmek
ab7e55f195 docs/TPM2_PCR_MEASUREMENTS: link to the PCR registry page 2025-06-26 12:16:59 +02:00
Lennart Poettering
170d7d49f5 user-record: also support "aliases" in the "status" section of user records
Some user record providers might want to implement case-insensitive user
record matching, or other forms of non-normalized matching. So far
uderdb didn't allow that, because client's typically revalidate the
returned user records against the search keys (at least our clients do)
– they check if the search user name is actually part of the user record
and its aliases.

In order to support such lookups we thus need to allow the looup keys to
be part of the user record, but also not be persisted in it, because
the number of casings/spellings of a username might be ridiculously
high.

A nice way out is to allow "aliases" not only in the main part of the
record, but also in the "status" part, that contains information
dynamically determined at query time. We can insert a second "aliases"
field there, which the parser will then merge with the primary "aliases"
field, but the existing rules around "status" ensure tha the data is
never persisted.

Follow-up: e2e1f38f5a
2025-06-23 22:26:24 +01:00
Valentin David
0dc39dffbd Use paths specified from environment variables for /etc configuration files
Some configuration files that need updates are directly under in /etc. To
update them atomically, we need write access to /etc. For Ubuntu Core this is
an issue as /etc is not writable. Only a selection of subdirectories can be
writable. The general solution is symlinks or bind mounts to writable places.
But for atomic writes in /etc, that does not work. So Ubuntu has had a patch
for that that did not age well.

Instead we would like to introduce some environment variables for alternate
paths.

 * SYSTEMD_ETC_HOSTNAME: /etc/hostname
 * SYSTEMD_ETC_MACHINE_INFO: /etc/machine-info
 * SYSTEMD_ETC_LOCALTIME: /etc/localtime
 * SYSTEMD_ETC_LOCALE_CONF: /etc/locale.conf
 * SYSTEMD_ETC_VCONSOLE_CONF: /etc/vconsole.conf
 * SYSTEMD_ETC_ADJTIME: /etc/adjtime

While it is for now expected that there is a symlink from the standard, we
still try to read them from that alternate path. This is important for
`/etc/localtime`, which is a symlink, so we cannot have an indirect symlink or
bind mount for it.

Since machine-id is typically written only once and not updated. This commit
does not cover it. An initrd can properly create it and bind mount it.
2025-06-23 15:32:11 +02:00
Yu Watanabe
27546b769c sd-lldp-tx: do not expose machine ID by default
Previously, systemd-networkd sent machine ID as chassis ID.
Let's use application specific machine ID.

This is a kind of backward compat breaking. Hence, this also introduces
the support of $SD_LLDP_SEND_MACHINE_ID environment variable.

Closes #37613.
2025-06-18 00:53:20 +09:00
Lennart Poettering
d1bacb0b8d doc: clarify that root storage daemons need unit files
Fixes: #37700
2025-06-04 15:07:34 +02:00
Lennart Poettering
59fe8d74b5 doc: mention 'exitrd' term 2025-06-04 15:07:34 +02:00
Emmanuel Ferdman
13a98f1f05 doc: fix integration tests guide reference 2025-06-04 07:29:16 +09:00
Adrian Vovk
554130faf3 Define uid range for greeter
In multi-seat scenarios, a display manager might need to start multiple
greeter sessions. But systemd allows at most one graphical session per
user. So, display managers now have a range of UIDs to dynamically
allocate users for their greeter sessions.
2025-06-02 11:19:12 +02:00
Luca Boccassi
fa25fece05 Minor docs cleanups (#37439) 2025-05-14 17:16:05 +01:00
Zbigniew Jędrzejewski-Szmek
2fe7cdd91a docs/BOOT_LOADER_INTERFACE: minor grammar fixes 2025-05-14 18:06:38 +02:00
Zbigniew Jędrzejewski-Szmek
f72e277d0b docs: punctuation and a typo 2025-05-14 18:06:04 +02:00
Daan De Meyer
686bbf1e7f Introduce forward.h header with forward declarations
In preparation for adopting forward declarations to reduce unnecessary
transitive includes across the tree, let's introduce a forward.h header
with forward declarations for all libc, libsystemd, basic and shared types.

Additionally, this header exports all basic integer types and errno constants,
as well as all macros including assertions macros. These header files contain
types often used in headers and are always included in every source file one
way or another anyway.

To avoid having to include memory-util.h and alloc-util.h in forward.h, we
split off the parts we need from both into cleanup-util.h and only include
cleanup-util.h in forward.h.

To keep this commit self-contained, we include cleanup-fundamental.h and
cleanup-util.h from the headers that originally contained the same macros.
We'll remove these again in a later commit that optimizes the includes in
src/basic and src/fundamental.

Split out of #37364
2025-05-14 15:44:17 +02:00
Lennart Poettering
f9d76a8d15 sd-boot: add support for a sysfail entry (#34856)
Add support for a sysfail boot entry. Sysfail boot entries can be used
for optional tweaking the automatic selection order in case a failure
state of the system in some form is detected (boot firmware failure
etc).

The EFI variable `LoaderEntrySysFail` contains the sysfail boot loader
entry to use. It can be set using bootctl:
```
$ bootctl set-sysfail sysfail.conf
```

The `LoaderEntrySysFail` EFI variable would be unset automatically
during next boot by `systemd-boot-clear-sysfail.service` if no system
failure occured, otherwise it would be kept as it is and a system
failure reason will be saved to `LoaderSysFailReason` EFI variable.

`sysfail_check()` expected to be extented to support possibleconditions
when we should boot sysfail("recovery") boot entry.

Also add support for using a sysfail boot entry in case of UEFI firmware
capsule update failure [1]. The status of a firmware update is obtained
from the EFI System Resource Table (ESRT), which provides an optional
mechanism for identifying device and system firmware resources for the
purposes of targeting firmware updates to those resources.
    
Current implementation uses the value of LastAttemptStatus field from
ESRT, which describes the result of the last firmware update attempt for
the firmware resource entry. The field is updated each time an
`UpdateCapsule()` is attempted for an ESRT entry and is preserved across
reboots (non-volatile).
    
This can be be used in setups with support for A/B OTA updates, where
the boot firmware and Linux/RootFS might be updated synchronously.
    
The check is activated by adding "sysfail-firmware-upd" to loader.conf
    
[1]
https://uefi.org/specs/UEFI/2.10/23_Firmware_Update_and_Reporting.html
2025-05-13 11:23:26 +02:00
André Monteiro
02527e95b5 Add dns0.eu in resolved.conf.in (#37404)
Add dns0.eu as a dns option in resolved.conf.in
This also adds Quad9 DNS servers as the default fallback servers.
2025-05-13 08:36:22 +09:00
Igor Opaniuk
004e3e4082 sd-boot: add support for a sysfail entry
Add support for a sysfail boot entry. Sysfail boot entries can be
used for optional tweaking the automatic selection order in case a
failure state of the system in some form is detected (boot firmware
failure etc).

The EFI variable `LoaderEntrySysFail` holds the boot loader entry to
be used in the event of a system failure. If a failure occurs, the reason
will be stored in the `LoaderSysFailReason` EFI variable.

sysfail_check() expected to be extented to support possible
conditions when we should boot sysfail("recovery") boot entry.

Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2025-05-12 15:37:46 +02:00
Salim B
e0a5e2d66b docs: fix typos 2025-05-07 00:49:49 +09:00
Lennart Poettering
a4c81a6509 docs: add more markdown markup to UIDS_GIDS.md 2025-04-30 10:33:53 +02:00
Yu Watanabe
4db8663b81 tree-wide: fix typo 2025-04-27 10:36:12 +09:00
Daan De Meyer
c2ba4a2864 docs: Document manual cgroup controller management for Delegate=yes
This isn't immediately clear, so let's explicitly document this fact.

More context in https://github.com/systemd/systemd/issues/7355.
2025-04-25 00:42:24 +01:00
Daan De Meyer
44e86153d1 meson: Define our own clang-tidy target
meson's target has a few issues:
- Runs on all source files regardless if they're included in the
  build or not
- Doesn't have any dependencies on generated sources which means we
  have to do a full build first before we can run clang-tidy
- Doesn't allow us to pass any extra arguments

To work around these, let's define our own clang-tidy target instead
using llvm's run-clang-tidy script. Alongside the clang-tidy target,
let's start keeping track of all generated sources which we make the
clang-tidy target depend on. We also add a new target which will only
generate source files which is useful for setting up the source tree
for running code analysis against it.
2025-04-24 12:36:36 +02:00
Daan De Meyer
bde994efcc mkosi: Run clangd within the tools tree instead of the build container
Running within the build sandbox has a number of disadvantages:
- We have a separate clangd cache for each distribution/release combo
- It requires to build the full image before clangd can be used
- It breaks every time the image becomes out of date and requires a
  rebuild
- We can't look at system headers as we don't have the knowledge to map
  them from inside the build sandbox to the corresponding path on the host

Instead, let's have mkosi.clangd run clangd within the tools tree. We
already require building systemd for both the host and the target anyway,
and all the dependencies to build systemd are installed in the tools tree
already for that, as well as clangd since it's installed together with the
other clang tooling we install in the tools tree. Unlike the previous approach,
this approach only requires the mkosi tools tree to be built upfront, which has
a much higher chance of not invalidating its cache. We can also trivially map
system header lookups from within the sandbox to the path within mkosi.tools
on the host so that starts working as well.
2025-04-23 21:04:07 +02:00
Alexander Kurtz
e8939ebcd3 docs/MEMORY_PRESSURE: Replace incorrect "packages" with correct "pages" 2025-04-20 17:49:06 +09:00
Daan De Meyer
352fee103b docs: Add note to keep header files as lean as possible to CODING_STYLE.md 2025-04-19 11:52:58 +02:00