Commit graph

891 commits

Author SHA1 Message Date
Jeremy Fleischman 121cb88292 Fix some typos in RESOLVED-VPNS.md 2023-11-12 12:55:29 +00:00
Lennart Poettering 7480859a11 man,doc: document some aspects of user record management/homed a bit better
Fixes: #29759
2023-11-08 12:40:08 +01:00
Zbigniew Jędrzejewski-Szmek 55e40b0be8 tree-wide: s/life-cycle/lifecycle/g 2023-11-06 20:16:34 +01:00
Zbigniew Jędrzejewski-Szmek f04aac3d5a docs: fix title levels, remove unneded words
The title applies to the whole page, not just the first section.
And there should be just one title ('# foo') in a given document.
2023-11-06 20:16:34 +01:00
Maanya Goenka db776f6935 portable: add support for confext
Support confexts for portable services
2023-11-03 16:59:58 +00:00
Frantisek Sumsal d4317fe172 nspawn: allow disabling os-release check
Introduce a new env variable $SYSTEMD_NSPAWN_CHECK_OS_RELEASE, that can
be used to disable the os-release check for bootable OS trees. Useful
when trying to boot a container with empty /etc/ and bind-mounted /usr/.

Resolves: #29185
2023-11-03 16:05:14 +00:00
Lennart Poettering d54c747f7e firewall: allow selecting firewall backend via env var 2023-11-03 09:34:02 +01:00
Lennart Poettering 0631eac96d crytsetup: allow overriding the token .so library path via an env var
I tried to get something similar upstream:

https://gitlab.com/cryptsetup/cryptsetup/-/issues/846

But no luck, it was suggested I use ELF interposition instead. Hence,
let's do so (but not via ugly LD_PRELOAD, but simply by overriding the
relevant symbol natively in our own code).

This makes debugging tokens a ton easier.
2023-11-02 18:18:00 +00:00
Lennart Poettering df586a49bb doc: document explicitly when we require specific top-level mounts to be established 2023-10-30 11:10:50 +00:00
Raul Cheleguini 813dbff4d5 nspawn: allow user-specified MAC address on container side
Introduce the environment variable SYSTEMD_NSPAWN_NETWORK_MAC to allow
user-specified MAC address on container side.
2023-10-25 13:59:46 +01:00
Mike Yuan 5d4072d0ed
man,docs: suffix directories with / 2023-10-21 06:25:35 +08:00
Daan De Meyer 26204e1a4a
Merge pull request #29630 from DaanDeMeyer/manager-json
Various refactoring in preparation for adding JSON dump to pid 1
2023-10-20 16:42:12 +02:00
Luca Boccassi f455365031
Merge pull request #29626 from bluca/auto_soft_reboot
systemctl: automatically softreboot/kexec if set up on reboot
2023-10-20 13:46:46 +01:00
Luca Boccassi 665a3d6d15 systemctl: automatically softreboot/kexec if set up on reboot
Automatically softreboot if the nextroot has been set up with an OS
tree, or automatically kexec if a kernel has been loaded with kexec
--load.

Add SYSTEMCTL_SKIP_AUTO_KEXEC and SYSTEMCTL_SKIP_AUTO_SOFT_REBOOT to
skip the automated switchover.
2023-10-20 11:45:37 +01:00
Joerg Behrmann cf37171890 credentials: document that their path is stable for system services 2023-10-20 11:44:46 +01:00
Daan De Meyer ee7304df5d mkosi: Use RuntimeTrees= to mount sources
Instead of using ExtraTrees=, let's use the new RuntimeTrees= option
to mount the full repository into the VM/container. Let's also store
the sources under /usr/src/systemd and update the gdbinit file and
vscode HACKING guide section to match the new location.
2023-10-20 12:43:57 +02:00
Emil Velikov 6efdd7fec5 sd-boot: add way to disable the 100ms delay when timeout=0
Currently we have a 100ms delay which allows for people to enter/show
the boot menu even when timeout is set to zero.

In a handful of cases, that may not be needed - both in terms of access
policy, as well as latency.

For example: the option to provide the boot menu may be hidden behind an
"expert only" UX in the OS, to avoid end users from accidentally
entering it.

In addition, the current 100ms input polling may cause unexpected
additional delays in the boot. Some example numbers from my SteamDeck:

 - boot counting/rename/flush doubles 300us -> 600us
 - seed/hash setup doubles 900us -> 1800us
 - kernel/image load gets ~40% slower 107ms -> 167ms

It's not entirely clear why the UEFI calls gets slower, nevertheless the
information in itself proves useful.

This commit introduces a new option "menu-disabled", which omits the
100ms delay. The option is documented throughout the manual pages as
well as the Boot Loader Specification.

v2:
 - use STR_IN_SET

v3:
 - drop erroneous whitespace

v4:
 - add a new LoaderFeature bit,
 - don't change ABI keep TIMEOUT_* tokens the same
 - move new token in the 64bit range, update API and storage for it
 - change inc/dec behaviour to TIMEOUT_MIN : TIMEOUT_MENU_FORCE
 - user cannot opt-in from sd-boot itself, add assert_not_reached()

v5:
 - s/Menu disablement control/Menu can be disabled/
 - rewrap comments to 109
 - use SYNTHETIC_ERRNO(EOPNOTSUPP)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-10-17 15:09:53 +01:00
Emil Velikov b9de6a7b94 docs/BOOT_LOADER_INTERFACE: mention that menu-* options are strings
To be on the safe side, explicitly mention that apart from the numerical
entries we can allow string ones.

Implementation-wise, bootctl will use internal numerical values that
match sd-boot's ABI. The latter also accepts the string options.

Going forward we'd like to avoid adding more internal magic and be more
explicit.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2023-10-17 14:59:26 +01:00
Mike Yuan 74b2c22fd7 docs/FILE_DESCRIPTOR_STORE: NotifyAccess=cgroup -> all
Fixes #29590
2023-10-17 11:59:38 +01:00
Lennart Poettering cde8cc946b
Merge pull request #29272 from enr0n/coredump-container
coredump: support forwarding coredumps to containers
2023-10-16 16:13:16 +02:00
Daan De Meyer 36d87065f2
Merge pull request #29558 from mrc0mmand/varlinkctl-tests
varlink: add a couple of tests + accompanying fixes
2023-10-16 09:49:42 +02:00
Frantisek Sumsal d04af6aaca docs: update fuzzers docs 2023-10-14 17:55:29 +02:00
Nick Rosbrook cfc015f09e man: document CoredumpReceive= setting 2023-10-13 15:28:50 -04:00
Luca Boccassi bb5232b6a3 core: add systemd-executor binary
Currently we spawn services by forking a child process, doing a bunch
of work, and then exec'ing the service executable.

There are some advantages to this approach:

- quick: we immediately have access to all the enourmous amount of
  state simply by virtue of sharing the memory with the parent
- easy to refactor and add features
- part of the same binary, will never be out of sync

There are however significant drawbacks:

- doing work after fork and before exec is against glibc's supported
  case for several APIs we call
- copy-on-write trap: anytime any memory is touched in either parent
  or child, a copy of that page will be triggered
- memory footprint of the child process will be memory footprint of
  PID1, but using the cgroup memory limits of the unit

The last issue is especially problematic on resource constrained
systems where hard memory caps are enforced and swap is not allowed.
As soon as PID1 is under load, with no page out due to no swap, and a
service with a low MemoryMax= tries to start, hilarity ensues.

Add a new systemd-executor binary, that is able to receive all the
required state via memfd, deserialize it, prepare the appropriate
data structures and call exec_child.

Use posix_spawn which uses CLONE_VM + CLONE_VFORK, to ensure there is
no copy-on-write (same address space will be used, and parent process
will be frozen, until exec).
The sd-executor binary is pinned by FD on startup, so that we can
guarantee there will be no incompatibilities during upgrades.
2023-10-12 15:01:51 +01:00
Lennart Poettering ce4801c42b doc: readd vanished ```
This disappeared in 1e8f5f79e1, let's
restore it.
2023-10-11 11:41:56 +02:00
Lennart Poettering 22d7fb6646 docs: document that in future we'll do EV_EVENT_TAG only, no EV_IPL 2023-10-10 23:31:33 +01:00
Abderrahim Kitouni e8868e8354 doc-sync: add support for uploading the documentation for main
It will refuse running on any other branch than main or stable branches.

Also update the release instructions to run it on the stable branch.
2023-10-10 17:50:04 +01:00
Luca Boccassi 795e80c7ed
Merge pull request #29507 from abderrahim/doc-sync-improvement
Improvements to the doc-sync target
2023-10-10 08:59:33 +01:00
Luca Boccassi 12de4ed1ca boot: measure loader.conf in PCR5
Results in:

- EventNum: 26
  PCRIndex: 5
  EventType: EV_EVENT_TAG
  DigestCount: 4
  Digests:
  - AlgorithmId: sha1
    Digest: 155fb999ca61ba8c7b1f1d87cee821f772ef084a
  - AlgorithmId: sha256
    Digest: 4c26adf231603613afc00bb3d5cad046aec6a525ca01262417c7085caab452b5
  - AlgorithmId: sha384
    Digest: 3e0758cb6605ac274e55d747bf29ee3474fc4413cd5e7a451d1375219cd7f08a30fc915a8df7131657ca78b82b9ccec8
  - AlgorithmId: sha512
    Digest: e32d905b9092c543802f386db9a397d9b6593bdb8360fb747a6d23e491a09595fec8699184cc790d0873a3d52ed16d045538f0c73ece48278fae0fb6ed9b4ed6
  EventSize: 32
  Event: 2a58bcf5180000006c006f0061006400650072002e0063006f006e0066000000
2023-10-09 22:22:09 +01:00
Luca Boccassi 3e6f010e03 stub: measure all cmdline addons together 2023-10-09 22:22:09 +01:00
Luca Boccassi 68f85761e2 stub: add support for dtb addons
Same as kernel command line addons.
2023-10-09 22:22:09 +01:00
Abderrahim Kitouni 00fc4a3945 doc-sync: automatically detect whether we're updating the latest version
also update the release instructions to push release candidates to -stable
2023-10-09 18:37:41 +01:00
Daan De Meyer f478b6e97d Update HACKING instructions
Let's mention that we just need the latest stable release of mkosi,
not the latest git commit. We also split the instructions for building
on the host and the instructions for building with mkosi into two blocks,
as it's not required to build on the host anymore to build with mkosi.
2023-10-06 09:16:33 +02:00
Lennart Poettering e59049d7a9 repart: add simple mechanism to override fstype choices
This is very useful for quickly testing things when building DDIs, in
particular in the CI, and trivial to add.
2023-10-05 19:18:36 +02:00
Mike Yuan ba96ba0420 docs/HACKING: Arch has dropped asp in favor of pkgctl
Prompted by #29461

See also: https://wiki.archlinux.org/title/Arch_build_system#Using_the_pkgctl_tool
2023-10-05 17:54:37 +02:00
Lennart Poettering 4c376e58da markdown: add document listing TPM2 PCR measurements we make comprehensively
This is useful to write TPM event log decoders.
2023-10-04 15:38:48 +02:00
Yu Watanabe 52afaee74b sd-netlink: make the default timeout configurable by environment variable
On normal systems, triggering a timeout should be a bug in code or
configuration error, so I do not think we should extend the default
timeout. Also, we should not introduce a 'first class' configuration
option about that. But, making it configurable may be useful for cases
such that "an extremely highly utilized system (lots of OOM kills,
very high CPU utilization, etc)".

Closes #25441.
2023-10-01 12:41:10 +09:00
Luca Boccassi 2c0ca3e398 docs: note root storage daemons can now also use SurviveFinalKillSignal=yes 2023-09-28 13:48:14 +01:00
Lennart Poettering 32295fa08f pcrphase: rename binary to pcrextend
The tool initially just measured the boot phase, but was subsequently
extended to measure file system and machine IDs, too. At AllSystemsGo
there were request to add more, and make the tool generically
accessible.

Hence, let's rename the binary (but not the pcrphase services), to make
clear the tool is not just measureing the boot phase, but a lot of other
things too.

The tool is located in /usr/lib/ and still relatively new, hence let's
just rename the binary and be done with it, while keeping the unit names
stable.

While we are at it, also move the tool out of src/boot/ and into its own
src/pcrextend/ dir, since it's not really doing boot related stuff
anymore.
2023-09-25 17:17:20 +02:00
Zbigniew Jędrzejewski-Szmek 61afc53924 docs/FDS: add missing article and reword sentence 2023-09-25 11:30:02 +01:00
Lennart Poettering 1df74d1cea docs: various updates to the fdstore docs
ispell made some suggestions which I applied.

Addresses: https://github.com/systemd/systemd/pull/29209#pullrequestreview-1632623460

Also adds a brief paragraph about initrd transitions. (Plymouth really
should start using the fdstore for pinning DRM objects, and stop trying
to survive the initrd→host transition)
2023-09-20 09:17:43 +02:00
Joerg Behrmann 7227dd816f treewide: fix typos
- mostly: usecase -> use case
- continously -> continuously
- single typos in docs/FILE_DESCRIPTOR_STORE.md
2023-09-19 10:05:38 +02:00
Lennart Poettering 0959847af5 doc: add a markdown doc giving an overview over the fdstore
And link it up everywhere.
2023-09-18 14:47:07 +02:00
Gioele Barabucci 4a899c5a23 docs/NETWORK_ONLINE: Use until instead of while !
`until` is the standard POSIX shell builtin to be used when waiting for
a condition to appear.
2023-08-14 09:15:31 +02:00
Gioele Barabucci 3078ece8c4 docs/NETWORK_ONLINE: Move Type=, RemainAfterExit= to [Service]
`Type=` and `RemainAfterExit=` belong in `[Service]`, not `[Unit]`.

Fixes #28826
2023-08-14 09:15:21 +02:00
Jan Macku e868f5efae docs: update link to RHEL/CentOS Stream tracker
Also update link to systemd downstream GitHub repo.
2023-08-11 09:55:10 +01:00
Yu Watanabe ec88da9146 docs: fix typo 2023-08-01 15:53:32 +09:00
Luca Boccassi fdacce7421 docs: note that Github Pages configuration has to be updated after a release 2023-07-28 23:42:20 +01:00
Luca Boccassi b0d3095fd6 Drop split-usr and unmerged-usr support
As previously announced, execute order 66:

https://lists.freedesktop.org/archives/systemd-devel/2022-September/048352.html

The meson options split-usr, rootlibdir and rootprefix become no-ops
that print a warning if they are set to anything other than the
default values. We can remove them in a future release.
2023-07-28 19:34:03 +01:00
David Tardon 85fe60b9e8 docs: fix order 2023-07-13 09:37:00 +00:00