Commit graph

955 commits

Author SHA1 Message Date
Aidan Dang b04ff66b42 Implement --luks-pbkdf-force-iterations for homed 2022-12-06 15:56:11 +01:00
Luca Boccassi f252ea9ae4
Merge pull request #25638 from bluca/rate_limit_config
pid1: add env var to override default mount rate limit burst
2022-12-06 02:07:47 +01:00
Luca Boccassi 24a4542cfa pid1: add env var to override default mount rate limit burst
I am hitting the rate limit on a busy system with low resources, and
it stalls the boot process which is Very Bad (TM).
2022-12-05 21:05:57 +00:00
Jan Macku c0ee89ac7e doc: CentOS is EOL use CentOS stream 2022-12-05 18:35:47 +01:00
Jan Macku efe05392f6 doc: fix markdown-lint issues in CONTRIBUTING.md 2022-12-05 16:33:57 +01:00
Jan Macku f6f213acaf doc: update link to systemd-rhel GitHub repo
systemd-rhel GitHub repository has been moved to new location:

- https://github.com/redhat-plumbers
2022-12-05 16:33:57 +01:00
Michal Sekletar 88e4bfa62b core: add possibility to not track certain unit types 2022-11-24 09:28:22 +09:00
Jason A. Donenfeld 47b3e96647 boot: remove random-seed-mode
Now that the random seed is used on virtualized systems, there's no
point in having a random-seed-mode toggle switch. Let's just always
require it now, with the existing logic already being there to allow not
having it if EFI itself has an RNG. In other words, the logic for this
can now be automatic.
2022-11-22 01:30:03 +01:00
Luca Boccassi a0c544ee09
Merge pull request #25379 from keszybz/update-doc-links
Update doc links
2022-11-22 01:07:13 +01:00
Jason A. Donenfeld a4eea6038c bootctl: install system token on virtualized systems
Removing the virtualization check might not be the worst thing in the
world, and would potentially get many, many more systems properly seeded
rather than not seeded. There are a few reasons to consider this:

- In most QEMU setups and most guides on how to setup QEMU, a separate
  pflash file is used for nvram variables, and this generally isn't
  copied around.

- We're now hashing in a timestamp, which should provide some level of
  differentiation, given that EFI_TIME has a nanoseconds field.

- The kernel itself will additionally hash in: a high resolution time
  stamp, a cycle counter, RDRAND output, the VMGENID uniquely
  identifying the virtual machine, any other seeds from the hypervisor
  (like from FDT or setup_data).

- During early boot, the RNG is reseeded quite frequently to account for
  the importance of early differentiation.

So maybe the mitigating factors make the actual feared problem
significantly less likely and therefore the pros of having file-based
seeding might outweigh the cons of weird misconfigured setups having a
hypothetical problem on first boot.
2022-11-21 15:13:26 +01:00
Zbigniew Jędrzejewski-Szmek 2bd051a06d docs/BOOT_LOADER_INTERFACE: reword sentence to apply to both entry types 2022-11-21 12:26:35 +01:00
Zbigniew Jędrzejewski-Szmek db81144428 tree-wide: BLS and DPS are now on uapi-group website 2022-11-21 12:26:35 +01:00
Lennart Poettering 6337be0a4e pcrphase: add $SYSTEMD_PCRPHASE_STUB_VERIFY env var for overriding stub check 2022-11-17 07:44:11 +09:00
Jason A. Donenfeld 0be72218f1 boot: implement kernel EFI RNG seed protocol with proper hashing
Rather than passing seeds up to userspace via EFI variables, pass seeds
directly to the kernel's EFI stub loader, via LINUX_EFI_RANDOM_SEED_TABLE_GUID.
EFI variables can potentially leak and suffer from forward secrecy
issues, and processing these with userspace means that they are
initialized much too late in boot to be useful. In contrast,
LINUX_EFI_RANDOM_SEED_TABLE_GUID uses EFI configuration tables, and so
is hidden from userspace entirely, and is parsed extremely early on by
the kernel, so that every single call to get_random_bytes() by the
kernel is seeded.

In order to do this properly, we use a bit more robust hashing scheme,
and make sure that each input is properly memzeroed out after use. The
scheme is:

    key = HASH(LABEL || sizeof(input1) || input1 || ... || sizeof(inputN) || inputN)
    new_disk_seed = HASH(key || 0)
    seed_for_linux = HASH(key || 1)

The various inputs are:
- LINUX_EFI_RANDOM_SEED_TABLE_GUID from prior bootloaders
- 256 bits of seed from EFI's RNG
- The (immutable) system token, from its EFI variable
- The prior on-disk seed
- The UEFI monotonic counter
- A timestamp

This also adjusts the secure boot semantics, so that the operation is
only aborted if it's not possible to get random bytes from EFI's RNG or
a prior boot stage. With the proper hashing scheme, this should make
boot seeds safe even on secure boot.

There is currently a bug in Linux's EFI stub in which if the EFI stub
manages to generate random bytes on its own using EFI's RNG, it will
ignore what the bootloader passes. That's annoying, but it means that
either way, via systemd-boot or via EFI stub's mechanism, the RNG *does*
get initialized in a good safe way. And this bug is now fixed in the
efi.git tree, and will hopefully be backported to older kernels.

As the kernel recommends, the resultant seeds are 256 bits and are
allocated using pool memory of type EfiACPIReclaimMemory, so that it
gets freed at the right moment in boot.
2022-11-14 15:21:58 +01:00
Lennart Poettering 71ea84369e locale: honour new env var $SYSTEMD_UTF8=
This is useful to force off fancy unicode glyph use (i.e. use "->"
instead of "→"), which is useful in tests where locales might be
missing, and thus control via $LC_CTYPE is not reliable.

Use this in TEST-58, to ensure the output checks we do aren't confused
by missing these glyphs being unicode or not.
2022-11-10 17:20:36 +01:00
Zbigniew Jędrzejewski-Szmek b1fd5cd4ed Revert "initrd: extend SYSTEMD_IN_INITRD to accept non-ramfs rootfs"
This reverts commit 1f22621ba3.

As described in the reverted commit, we don't want to get rid of the check
completely. But the check requires opting-in by setting SYSTEMD_IN_INITRD=lenient,
which is cumbersome and doesn't seem to actually happen.
https://bugzilla.redhat.com/show_bug.cgi?id=2137631 is caused by systemd refusing
to treat the system as an initrd because overlayfs is used. Let's revert this
approach and do something that doesn't require opt-in instead.

I don't think it makes sense to keep support for "SYSTEMD_IN_INITRD=lenient" or
"SYSTEMD_IN_INITRD=auto". To get "auto" behaviour, just unset the option. And
"lenient" will be reimplemented as a better check. Thus the changes to the
option interface are completely reverted.
2022-11-09 09:20:33 +01:00
Luca Boccassi 729a492881 docs: DPS and BLS have moved to uapi-group.org 2022-11-02 07:31:18 +09:00
William Roberts 026d249969 docs/HACKING.md: clarify some portions
Clarify portions of HACKING.md so folks don't spend as much time as I
did on it.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
2022-10-31 20:56:37 +01:00
Frantisek Sumsal de85e1a2f4 docs: update translation strings before new release 2022-10-20 10:39:03 +02:00
Zbigniew Jędrzejewski-Szmek 0923b4253c tree-wide: replace "plural(s)" by "plurals"
(s) is just ugly with a vibe of DOS. In most cases just using the normal plural
form is more natural and gramatically correct.

There are some log_debug() statements left, and texts in foreign licenses or
headers. Those are not touched on purpose.
2022-10-17 15:10:53 +02:00
Daan De Meyer beead603c5
Merge pull request #24629 from DaanDeMeyer/mkosi-kernel
mkosi: Optionally build a kernel image from mkosi.kernel/
2022-10-11 14:37:19 +02:00
Aidan Dang fd83c98e8a Implement --luks-sector-size for homed 2022-10-07 16:36:04 +02:00
Daan De Meyer e81710d3d0 journal: Store offsets to tail entry array objects in chain
Previously, we'd iterate an entry array from start to end every time
we added an entry offset to it. To speed up this operation, we cache
the last entry array in the chain and how many items it contains.
This allows the addition of an entry to the chain to be done in
constant time instead of linear time as we don't have to iterate
the entire chain anymore every time we add an entry.
2022-10-07 12:28:09 +02:00
Daan De Meyer a9089a6604 journal: Use 32-bit entry item object offsets in compact mode
To do this, we move EntryItem out of journal-def.h and turn it into
a host only struct in native endian mode so we can still use it to
ship the necessary info around.

Aside from that, the changes are pretty simple, we introduce some
extra functions to access the right field depending on the mode and
convert all the other code to use those functions instead of
accessing the raw fields.

We also drop the unused entry item hash field in compact mode. We
already stopped doing anything with this field a while ago, now we
actually drop it from the format in compact mode.
2022-10-07 12:20:57 +02:00
Daan De Meyer 99daf3ce03 journal: Use 32-bit entry array offsets in compact mode
Before:

OBJECT TYPE      ENTRIES SIZE
Unused           0       0B
Data             3610336 595.7M
Field            5310    285.2K
Entry            3498326 1.2G
Data Hash Table  29	 103.1M
Field Hash Table 29      151.3K
Entry Array      605991  1011.6M
Tag              0	 0B
Total            7720021 2.9G

After:

OBJECT TYPE      ENTRIES SIZE
Unused           0	 0B
Data             3562667 591.0M
Field            3971    213.6K
Entry            3498566 1.2G
Data Hash Table  20	 71.1M
Field Hash Table 20	 104.3K
Entry Array	 582647  505.0M
Tag              0	 0B
Total            7647891 2.4G
2022-10-07 12:20:08 +02:00
Daan De Meyer 61297656c7 journal: Enable compact mode
We also add an environment variable $SYSTEMD_JOURNAL_COMPACT that
can be used to disable compact mode if needed (similar to
$SYSTEMD_JOURNAL_KEYED_HASH).
2022-10-07 11:28:12 +02:00
Daan De Meyer 87413812c9 journal: Add compact mode
This adds a new flag in preparation for incompatible journal changes
which will be gated behind this flag. The max file size of journal
files in compact mode is limited to 4 GiB.
2022-10-07 11:26:28 +02:00
Zbigniew Jędrzejewski-Szmek 868e6ce65c docs/CONTRIBUTING: strenghten language about ABI stability, fix links, other tweaks
The text made it sound like breaking ABI in libsystemd is allowed with good reasons.
In fact, we plan never to do this, so make the language stronger.

Also remind people about distro forums for reporting bugs. Those are probably a
better place than systemd-devel for new users.

Also, add some missing articles and apostrophes, fix URLs, remove repeated phrases,
etc.
2022-10-01 11:29:24 +02:00
Daan De Meyer d12e9bdc76 mkosi: Optionally build a kernel image from mkosi.kernel/
If mkosi.kernel/ exists, the mkosi script will try to build a kernel
image from it. We use the architecture defconfig as a base and add
our own extra configuration on top.

We also add some extra tooling to the build image required to build
the kernel and include some documentation in HACKING.md on how to
use this new feature.

To avoid the kernel sources from being copied into the build or
final image (which we don't want because it takes a while), we put
the mkosi.kernel/ directory in .gitignore and use
"SourceFileTransfer=mount" so that the sources are still accessible
in the build image.
2022-09-29 20:15:57 +02:00
Zbigniew Jędrzejewski-Szmek 3efadceb9e docs/CONTRIBUTING: explain various labels and add link to "reviewable" PRs
The linked filter gives an up-to-date list of pull requests that need review.
(Yes, there's too many.) We used to set 'needs-review' label, but that is
not available to non-members, and also every pull requests which is not labeled
'reviewed/needs-rework'/'ci-fails/needs-rework'/'needs-rebase' can and should
be reviewed.

If this is merged, I'll drop the 'needs-review' label.
2022-09-30 01:23:30 +09:00
Sarah Brofeldt f8151a707c docs/NETWORK_ONLINE: systemd.network hyperlink fix 2022-09-28 15:48:39 +09:00
Luca Boccassi 542e6eb38d
Merge pull request #24799 from poettering/initrd-ftw
use "initrd" rather than "initial RAM disk" or "initramfs" to refernce the concept
2022-09-23 20:43:15 +01:00
Daan De Meyer 354dc913c5
Merge pull request #24635 from DaanDeMeyer/repart-verity-sig
repart: Add support for generating verity sig partitions
2022-09-23 18:53:04 +02:00
Lennart Poettering 55c041b4e4 tree-wide: also settle on "initrd" instead of "initial RAM disk"
With this the concept is now called the same way everywhere except where
historical info is relevant or where the other names are API.
2022-09-23 15:12:18 +02:00
Daan De Meyer 35e596f83f docs: Mention that "certificateFingerprint" source should be in DER 2022-09-23 14:10:11 +02:00
Yu Watanabe 0b0cdb1652 doc: drop remaining references to LGTM.com 2022-09-23 18:29:22 +09:00
Lennart Poettering 4d0d34b4e7
Merge pull request #24709 from keszybz/partition-table-constants
Expose various GPT UUIDs as public contants and link them up in docs
2022-09-21 20:07:21 +02:00
Zbigniew Jędrzejewski-Szmek da7dfd8ef5 docs/DPS: use the SD_GPT_* constants here too 2022-09-21 15:30:31 +02:00
Lennart Poettering 0b81e47e80 boot-loader-spec: undo redefinition of $BOOT
In 53c26db4da the meaning of $BOOT was
redefined. I think that's quite problematic, since the concept is
implemented in code and interface of bootctl. Thus, I think we should
stick to the original definition, which is: "where to *place* boot menu
entries" (as opposed to "where to *read* boot menu entries from").

The aforementioned change was done to address two things afaiu:

1. it focussed on a $BOOT as the single place to put boot entries in,
   instead of mentioning that both ESP and $BOOT are expected to be
   the source

2. it mentioned the /loader/ dir (as location for boot loader resources)
   itself as part of the spec, which however only really makes sense in
   the ESP. /loader/entries/ otoh makes sense in either the ESP or
   $BOOT.

With this rework I try to address these two issues differently:

1. I intend to make clear the $BOOT is the "primary" place to put stuff
   in, and is what should be mounted to /boot/.

2. The ESP (if different from $BOOT) is listed as "secondary" source to
   read from, and is what should be mounted to /efi/. NB we now make the
   distinction between "where to put" (which is single partition) and
   "where to read from".

3. This drops any reference of the /loader/ dir witout the /entries/
   suffix. Only the full /loader/entries/ dir (and its companion file
   /loader/entries.srel) are now mentioned. Thus isolated /loader/
   directory hence becomes irrelevant in the spec, and the fact that
   sd-boot maintains some files there (and only in the ESP) is kept out
   of the spec, because it is irrelevant to other boot loaders.

4. It puts back the suggestion to mount $BOOT to /boot/ and the ESP to
   /efi/ (and suggests adding a symlink or bind mount if both are the
   same partition). Why? Because the dirs are semantically unrelated:
   it's OK and common to have and ESP but no $BOOT, hence putting ESP
   inside of a useless, non-existing "ghost" dir /boot/ makes little
   sense. More importantly though, because these partitions are
   typically backed by VFAT we want to maintain them as an autofs, with
   a short idle delay, so that the file systems are unmounted (and thus
   fully clean) at almost all times. This doesn't work if they are
   nested within each other, as the establishment of the inner autofs
   would pin the outer one, making the excercise useless. Now I don't
   think the spec should mention autofs (since that is an implementation
   detail), but it should arrange things so that this specific, very
   efficient, safe and robust implementation can be implemented.

The net result should be easy from an OS perspective:

1. *Put* boot loader entries in /boot/, always.

2. *Read* boot loader entries from both /boot/ and /efi/ -- if these are distinct.

3. The only things we define in the spec are /loader/entries/*.conf and
   /EFI/Linux/*.efi in these two partitions (well, and the companion
   file /loader/entries.srel

4. /efi/ and /boot/ because not nested can be autofs.

5. bootctl code and interface (in particular --esp-path= and
   --boot-path=) match the spec again. `bootctl -x` and `bootctl -p`
   will now print the path to $BOOT and ESP again, matching the concepts
   in the spec again.

From the sd-boot perspective things are equally easy:

1. Read boot enrties from ESP and XBOOTLDR.

2. Maintain boot loader config/other resources in ESP only.

And that's it.

Fixes: #24247
2022-09-20 21:49:58 +02:00
Lennart Poettering e04ef18e48 boot-loader-spec: fix typo 2022-09-20 21:35:58 +02:00
Lennart Poettering cae6a289db boot-loader-spec: add comment about case sensitivity of file names 2022-09-20 21:35:58 +02:00
Zbigniew Jędrzejewski-Szmek 7bb99e23e5
Delete CNAME 2022-09-20 17:46:40 +02:00
Zbigniew Jędrzejewski-Szmek 9a941ffefe sd-gpt, docs: define s390 before s390x
In all other cases we have the older variant before the newer. And since we
generate some documentation tables from the header, this order is also visible
for users. Let's restore the order. This commit does
4565246911 in a slightly different fashion.
2022-09-20 16:48:50 +02:00
Luca BRUNO 72ceee435d docs: add a note about selectively overriding default dependencies
This documents that explicit `Before=`/`After=` dependencies can be
used to selectively override implicit ordering coming from default
dependencies. That allows for more granular control compared to the
already documented `DefaultDependencies=no` option.

The alternative approach came up in a discussion around the ordering
of `boot-complete.target`, so this also adds an explicit suggestion
in that direction to the "Automatic Boot Assessment" documentation.

Ref: https://lists.freedesktop.org/archives/systemd-devel/2022-September/048330.html
2022-09-20 13:57:26 +02:00
Luca Boccassi b60d3016eb docs: mention tmpfiles.d in CREDENTIALS.md and add example 2022-09-08 16:33:24 +01:00
Lennart Poettering bbb71e5c98 CODING_STYLE: fix header level 2022-09-08 16:13:07 +02:00
Jan Janssen 97f077df05 boot: Avoid magic values in timeout EFI vars 2022-09-07 12:55:55 +02:00
Lennart Poettering e8a587dca2 docs: Some CODING_STYLE additions 2022-09-07 10:05:46 +02:00
Johannes Schauer Marin Rodrigues 3fa8a1148a sysusers: make sp_lstchg shadow field reproducible
If the environment variable SOURCE_DATE_EPOCH is set, use its value
instead of the current time.
2022-09-02 07:17:25 +02:00
Yu Watanabe 2b6605102d dissect-image: add environment variable to control timeout for waiting devlink to be configured 2022-08-31 23:20:09 +09:00
Lennart Poettering 79127368d8 docs: use Title Case for section titles
as per:

https://titlecase.com/
2022-08-29 14:48:26 +02:00
Uriel Corfa c0a18932dc docs: fix incorrect env var name for credentials directory
CREDENTIAL_PATH appears nowhere in the systemd source code.
$CREDENTIALS_DIRECTORY is what is used instead.
2022-08-28 17:35:58 +09:00
Jacek Migacz d896260958 resolve: control system hostname synthesis via environment variable 2022-08-26 11:19:17 +09:00
Lennart Poettering e109541fe6 docs: suggests people use path_extract_filename() + path_extract_directory() 2022-08-23 15:10:15 +02:00
Daan De Meyer 2d92c35b35 docs: Add guide to debug binaries in vscode that need to run as root 2022-08-18 14:46:01 +02:00
Daan De Meyer d1e9a4244b docs: Recommend pkexec over using an askpass program with sudo
Less configuration required than downloading and configuring an
askpass program.
2022-08-18 14:17:07 +02:00
Ludwig Nussel 9c28539a95 docs: mention qemu fw_cfg size limitation 2022-08-11 13:32:55 +02:00
Sonali Srivastava 39e3135bc2 docs: mkosi-13 or newer required 2022-08-08 12:15:20 +01:00
Luca Boccassi c1178baacd docs: add disabled PR template for code freeze
To be enabled on rc1, and disabled again after the final release.
Gives contributors a clear warning that new features/APIs will be
postponed.
2022-08-04 11:10:28 +02:00
Daan De Meyer 7ca9563ca1 mkosi: Remove usage of deprecated option names/sections 2022-07-18 16:54:58 +02:00
Daan De Meyer 69d638e67e mkosi: Changes to allow booting with sanitizers in mkosi
- Extra memory because ASAN needs it
- The environment variables to make the sanitizers more useful
- LD_PRELOAD because the ASAN DSO needs to be the first in the list
- The sanitizer library packages
- Disable syscall filters because they interfere with ASAN
- Disable systemd-hwdb-update because it's super slow when systemd-hwdb
  is built with sanitizers
- Take the value for meson's b_sanitize option from the SANITIZERS
  environment variable
2022-07-18 16:54:56 +02:00
Yu Watanabe 59159aee20
Merge pull request #24018 from keszybz/generator-cleanups
Make generators easier to test, fix various corner issues
2022-07-16 05:11:49 +09:00
Zbigniew Jędrzejewski-Szmek 99e3d47679 fstab-generator: allow overriding path to /sysroot/etc/fstab too
This adds $SYSTEMD_SYSROOT_FSTAB analoguous to $SYSTEMD_FSTAB.
2022-07-15 15:48:05 +02:00
Lennart Poettering 4f80cfca5e pid1: add mechanism for conditionalizing units/network/netdev/link based on credentials passed in
This is useful when provisioning systems via nspawn/qemu and running
specific services only if specific data is passed into the system.
2022-07-15 10:53:45 +02:00
Lennart Poettering 8de7de462b pid1: import creds from SMBIOS too, not just qemu's fw_cfg
This imports credentials also via SMBIOS' "OEM vendor string" section,
similar to the existing import logic from fw_cfg.

Functionality-wise this is very similar to the existing fw_cfg logic,
both of which are easily settable on the qemu command line.

Pros and cons of each:

SMBIOS OEM vendor strings:
   - pro: fast, because memory mapped
   - pro: somewhat VMM independent, at least in theory
   - pro: qemu upstream sees this as the future
   - pro: no additional kernel module needed
   - con: strings only, thus binary data is base64 encoded

fw_cfg:
   - pro: has been supported for longer in qemu
   - pro: supports binary data
   - con: slow, because IO port based
   - con: only qemu
   - con: requires qemu_fw_cfg.ko kernel module
   - con: qemu upstream sees this as legacy
2022-07-15 08:31:34 +09:00
Lennart Poettering e07ed99dd7 docs: normalize uppercasing of titles of network doc 2022-07-05 22:12:08 +02:00
Lennart Poettering a22a4e1d1a docs: move some stuff into "Networking" section
The "Networking" section has a lonely single document listed right now,
even though the "Concepts" section has two more network related docs.
Move them over, let's end this loneliness.
2022-07-05 11:22:06 +01:00
nl6720 0e68582323 tree-wide: link to docs.kernel.org for kernel documentation
https://www.kernel.org/ links to https://docs.kernel.org/ for the documentation.
See https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=ebc1c372850f249dd143c6d942e66c88ec610520

These URLs are shorter and nicer looking.
2022-07-04 19:56:53 +02:00
Zbigniew Jędrzejewski-Szmek e1c52cb271 docs/ARCHITECTURE: mention src/fundamental/ and add more details 2022-06-30 11:02:13 +02:00
Yu Watanabe 94f881fd8e
Merge pull request #23849 from mbiebl/more-https
Use https for freedesktop.org
2022-06-29 03:22:51 +09:00
Michael Biebl e2285c5735 Use https for man7.org 2022-06-28 16:05:31 +02:00
Michael Biebl 41d6f3bf4d Use https for freedesktop.org
grep -l -r http:// | xargs sed -E -i s'#http://(.*).freedesktop.org#https://\1.freedesktop.org#'
2022-06-28 13:10:05 +02:00
Sam James 5a9276f659 gpt: add PARISC UUIDs
Not doing PARISC64 for now as no userland exists for it yet.
2022-06-28 04:52:42 +01:00
Zbigniew Jędrzejewski-Szmek d331f48482 docs/CONTRIBUTING: ask people to send a ping on stalled reviews
A few related changes: be explicit that 'main' is the branch we're referring
to. There was a case recently of somebody rebasing on 'master' by mistake.
It's better to be explicit, since 'main' is still not the default for git
(AFAIK).

Also, github seems to send mails about force-pushes, so drop that as a
justification. Commenting about changes that were done is useful even if
github were to send a notification.

And finally, $subject. We do that ourselves, but outside contributors might not
know that that's expected.
2022-06-10 15:04:23 +02:00
Benjamin Franzke 4d74273d69 docs: desaturate dark-mode background color
The documentations dark-mode background color as
added in #23417 was perceived to be too purple-y [1]
and is therefore replaced by a desaturated black
that is derived from the systemd brand-black using
12% less HSL saturation.

[1] https://github.com/systemd/systemd/pull/23417#issuecomment-1146323820
2022-06-10 13:52:31 +02:00
Yu Watanabe 74223cbe14 tree-wide: fix typo 2022-06-10 08:26:08 +09:00
Zbigniew Jędrzejewski-Szmek 82a0ffe585 docs/AUTOMATIC_BOOT_ASSESSMENT: describe how to integrate a DE viability check
I reordered the component list to match chronological order: we first install
an entry, then boot it, then the checks happen, etc. Before it was
ordered by "importance", but that is harder to follow.
2022-06-09 13:22:48 +02:00
Zbigniew Jędrzejewski-Szmek db82e667c7 docs/BLS: move "boot counting" into the main spec
The boot-counting file-renaming entry-sorting part that the boot
loader implements is moved to the main document. The second document
describes a specific implementation that is provided through systemd
units.

The sorting algorithm is extended to say that bad entries should
be sorted later.

I also added a note that bad entries should be available for booting.

For some reason, the second document said that it applies only to EFI systems.
AFAIK there are no implementations for non-EFI, but the specification should
work just fine, if somebody were to implement it. So that part is dropped.

Fixes #23345.

Sadly, bootctl doesn't implement sorting of boot entries with counting :((((
But I'm leaving that for another PR.
2022-06-09 13:22:48 +02:00
Zbigniew Jędrzejewski-Szmek a5b28b7721 CODING_STYLE: say that inet_ntop() is a no no 2022-06-06 09:52:52 +02:00
Yu Watanabe 0dd4876815 sd-bus: drop D-Bus version 2 format support
It seems the format is used only by kdbus.
2022-06-01 03:41:15 +09:00
Matthias Lisin b3c57bd76c docs: fix typo XBOOOTLDR -> XBOOTLDR 2022-05-31 10:20:33 +02:00
Yu Watanabe f79f6856a2 doc: fix typo
Follow-ups for #23504.
2022-05-31 01:16:04 +09:00
Evgeny Vereshchagin 61ad4f25ed docs: mention how to build 32 bit fuzz targets 2022-05-29 09:12:38 +00:00
Luca Boccassi e1a8917ae1
Merge pull request #23504 from keszybz/bls-reordering
Refactor the BLS and add a description of version sorts
2022-05-27 14:36:10 +01:00
Zbigniew Jędrzejewski-Szmek 53c26db4da docs/BLS: clear up the confusion about what $BOOT means
The text used was originally written for everything being on the ESP. It was
later generalized for support XBOOTLDR, and "$BOOT" was introduced to mean
something like "XBOOTLDR if present, the ESP otherwise", and most of the text
was changed to talk about $BOOT. Sadly, this doesn't work, because the two
partitions are not interchangeable. sd-boot loads entries from both partitions,
and its configuration, random-seed, etc. only from the ESP.

The terms are redefined: $BOOT now means either the ESP or the "boot partition"
playing the same role on MBR systems, and $XBOOTLDR is XBOOTLDR.

Like various previous commits, this makes the specification describe our
current implementation.

Also, the let's just accept the common practice of using /boot and /boot/efi.
Since both partitions need to be read to gather configuration, it isn't a
problem that one is mounted underneath the other one. I think having /boot and
/efi is OK, but not better in any measureable way, so let's stop trying to push
people towards this setup.

A note that XBOOTLDR must be on the same disk as ESP is added.
2022-05-26 20:21:09 +02:00
Evgeny Vereshchagin 39e63b441b docs: be more specific about the OSS-Fuzz toolchain 2022-05-26 15:22:50 +00:00
Evgeny Vereshchagin 7d7c92ef8c docs: update OSS-Fuzz links 2022-05-26 14:16:17 +00:00
Zbigniew Jędrzejewski-Szmek 2367bdcfc9 docs/BLS: describe version comparisons
Fixes #23346.
2022-05-25 13:47:47 +02:00
Zbigniew Jędrzejewski-Szmek 0f5a416c81 docs/BLS: rework the description of directory layout
We said "`$BOOT/loader/` is the directory containing all files needed
for Type #1 entries" which is blatantly wrong. And also saying that we
define two directories, /loader and /loader/entries, but only ever defining
the second one was not very consistent.

Instead, let's say that /loader/ is for "boot loader configuration", and
/loader/entries has the snippets. A new section about /<entry-token>/<version>/
is added. This is described as the "recommended layout for additional files".

Also, we said that ID= should be used in the file name, but in fact it
wasn't in the example that was given, and afaik, nobody ever did that. So
this part is reduced to say "kernel version (as returned by `uname -r`,
including the OS identifier)". AFAIK, all distros include some form of
OS identifier in the version, so this should be good enough.

Since we now don't depend on autodetection (e.g. with entry-token and layout
configured), the installed doesn't need to always create /loader/entries and
things will still work. So don't say that the installer needs to create it.

Part of the discussion is moved to the Discussion section.

Overall, this brings the specification more in line with actual practice.
2022-05-24 21:46:08 +02:00
Zbigniew Jędrzejewski-Szmek 14bacc744f docs: /etc/os-release → os-release(3)
It's /usr/lib/os-release now mostly. But let's link to the man page.
2022-05-24 21:46:08 +02:00
Zbigniew Jędrzejewski-Szmek 7bb36d2d7a docs: reworder/rewrite BLS to read more like a specification
I tried not to introduce any semantic changes, but to reorder the whole
text to be more usable as a reference specification: more sections are
created and the discussion and justifications are moved to the end.
Also, "BIOS" is changed to "firmware" in various places, and other parts
of the text that made sense when this was originally written are now dated
are adjusted. I separated and extended the examples a bit.

The abstract at the top ("TL;DR: Currently there’s no common boot scheme…")
is dropped. It didn't seem to fit anywhere.
2022-05-24 21:46:06 +02:00
Zbigniew Jędrzejewski-Szmek 2f9b7186e3
Merge pull request #23414 from keszybz/analyze-vercmp
systemd-analyze compare-versions
2022-05-23 09:14:51 +02:00
Benjamin Franzke ae00bafdf8 docs: improve table readability
Let the table span more than the default content width,
if the table contains alot of data (controlled by width: auto)
(720px is very good for continuous text, but too narrow for tables).

The container class is therefore adapted to put the
width restriction on the elements itself, allowing for
exceptions for individual elements like <table> and
<h1> (which used an offset margin before and is now
streamlined to use a max-width as well).

Also add a striped background to ease reading rows
and allow for horizontal mobile scrolling without
overflowing the entire document, only the table itself.
2022-05-21 22:41:21 +01:00
Zbigniew Jędrzejewski-Szmek 6be96a9aed
Merge pull request #23460 from keszybz/docs-redirect
docs: rename COREDUMP_PACKAGE_METADATA → ELF_PACKAGE_METADATA
2022-05-21 18:11:18 +02:00
Benjamin Franzke 9ba7734f1e docs: adapt forward layout to systemd.io design 2022-05-21 18:09:50 +02:00
Zbigniew Jędrzejewski-Szmek d4224b9cc7 docs: rename COREDUMP_PACKAGE_METADATA → ELF_PACKAGE_METADATA
The format described by this document is used not only for coredumps,
but also for other purposes, so we've outgrown the old title.

A redirect was added based on https://codepo8.github.io/github-redirection-demo/.
I tried to use a relative link, but it's hard to test if it works
before merging.

Co-authored-by: Benjamin Franzke <benjaminfranzke@googlemail.com>
2022-05-21 18:08:19 +02:00
Benjamin Franzke 92897d768d tree-wide: replace obsolete wiki links with systemd.io/manpages
All wiki pages that contain a deprecation banner
pointing to systemd.io or manpages are updated to
point to their replacements directly.

Helpful command for identification of available links:
git grep freedesktop.org/wiki | \
    sed "s#.*\(https://www.freedesktop.org/wiki[^ $<'\\\")]*\)\(.*\)#\\1#" | \
    sort | uniq
2022-05-21 14:29:14 +02:00
Benjamin Franzke a25d9395ad tree-wide: streamline wiki links
* Avoid traling slash as most links are defined without.
* Always use https:// protocol and www. subdomain

Allows for easier tree-wide linkvalidation
for our migration to systemd.io.
2022-05-21 14:28:03 +02:00
Benjamin Franzke 63812e15c6 docs: streamline headline structure in JOURNAL_EXPORT_FORMATS.md
Add one general first-level headline and transform
the existing ones into second-level headlines.
2022-05-18 20:34:10 +02:00
Benjamin Franzke 5c90c67a34 docs: use relative links
Allows for links to work both on systemd.io (or forks) and
when viewed on https://github.com/systemd/systemd/tree/main/docs

Note that the markdown links are converted by jekyll-relative-links[1]
to html. This plugin is enabled by default on github pages[2][3].

Due to a bug in jekyll-relative-links – see
https://github.com/benbalter/jekyll-relative-links/issues/61 –
we need to avoid line-wrapped links when using relative markdown links.

[1] https://github.com/benbalter/jekyll-relative-links
[2] https://github.blog/2016-12-05-relative-links-for-github-pages/
[3] https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/about-github-pages-and-jekyll#plugins
2022-05-18 20:34:10 +02:00
Zbigniew Jędrzejewski-Szmek e4885958dc
Merge pull request #23417 from bnf/docs-dark-mode
docs: add dark mode
2022-05-18 13:09:50 +02:00
Yu Watanabe 69ce09afc2 doc: fix typo 2022-05-18 17:57:05 +09:00
Benjamin Franzke 2eca6d602f docs: overhaul styling for example log messages on startpage
* Use brand-green for demo log messages on the startpage
   instead of the default `green` color defined by the browser vendor
   (after all, the brand green color is intended to reflect the
   boot status output)
 * Add a matching blue intro color (mixed using HSL from brand-green
   by 55deg hue rotation and 4% lightness)
 * Use a defined font-size
   (to avoid blurry rendering at 13.33333px, due to font-size: smaller)
 * Add possibility for the browser to show horizontal scrollbar
   (avoid overflow in mobile view)
2022-05-17 23:00:18 +02:00
Benjamin Franzke 9b266e4349 docs: add dark mode
Respect the user agent property  `prefers-color-scheme` by
rendering the documentation in dark mode, if requested.

Reorganise CSS to store the color palette into CSS variables
and reference these from another set of CSS variables that
are dynamically switched based on the prefers-color-scheme
media query.

Light mode variables stay they same as before,
but to ease color mixing, the current RGB values
have been transformed to HSL (using chrome devtools).
The current body background is now --sd-gray-extralight,
the current body color is now --sd-gray-extradark.
Other gray-variations, needed for dark-mode constrasts
are derived from these colors using HSL lightness shifting.

The systemd brand black color is used as dark mode background
and a matching extralight gray font color has been selected.

The link font-weight is reduced to 400 in dark mode,
as the green color on dark ground becomes to overwhelming
with a bold font.

The systemd logo color is dynamically swapped by using
the special fill value `currentColor` for dark/light-mode
depending parts – as per specification on brand.systemd.io
2022-05-17 23:00:18 +02:00
Benjamin Franzke 62bbb96d00 docs: regenerate highlight style and streamline background overwrite
* Update to rougify 3.26.1 styling
 * Adapt background overwrite by removing default background color
   and only adding explicit overwrites for syntax error
   (error stylings appear for example in json-excerpts –
   see HACKING.md – and are therefore hidden by our css)
2022-05-17 23:00:18 +02:00
Benjamin Franzke 818e46ae7c docs: avoid multiple first-level headlines
One document should only contain one main
headline, both for structuring and for
visual reasons.

Relevant cases found via:

  git grep -A2 '^# ' docs/
2022-05-17 23:00:18 +02:00
Benjamin Franzke 85b5930b7b docs: provide a first level headline for the frontpage
* Provides a nice introduction to the intro paragraph
 * Ensures text of subpages start at the same position as the intro text
   on the homepage
   => less visual "jumps" while navigating
2022-05-17 23:00:18 +02:00
Benjamin Franzke bd59f2bf92 docs: respect default browser font-size
16px is default by all browser vendors when
font-setting is defined to be 'medium'.

Scale all font sizes and margins to
based on 16px base size.
2022-05-17 23:00:18 +02:00
Benjamin Franzke 68f0d3ff12 docs: add reasonable difference between h2 and h3 font-size 2022-05-17 23:00:18 +02:00
Benjamin Franzke cfcbf1dafb docs: replace <pre>, <code> and <tt> tags by backticks
Let jekyll render a proper codeblock, instead
of using custom HTML code in markdown.
Also <tt> is deprecated.
2022-05-17 22:35:54 +02:00
Benjamin Franzke 86a3a73bb4 docs: adapt theme color meta property
The theme color is used on android to style the chrome
browser-ui with a color that suits the webpage.

Use the dark brand color instead of a random default blue color
in order to fit to the rest of the color scheme.
2022-05-17 22:35:54 +02:00
Benjamin Franzke 74de5ddb99 docs: remove unneeded font-related attributes from svg logo
The font has been vectorized and therefore all
font related properties are ignored anyway.
2022-05-17 22:35:54 +02:00
Benjamin Franzke b336535c6e docs: use whole numbers for circle in page-logo
0.001 is usually rounded to 0 by browsers, still,
better to be explicit and save some bytes.
2022-05-17 22:35:54 +02:00
Benjamin Franzke f08446a4f5 docs: replace invalid h1 font-weight
h1 font weight is defined to be 100 but no font-face
definition for weight 100 is included.
The browser will use the nearest available font-weight
instead. As that is 400, we do specify it explicitly now.
2022-05-17 22:35:53 +02:00
Benjamin Franzke d5ce270ced docs: remove link to missing apple-touch-icon 2022-05-17 21:13:24 +02:00
Benjamin Franzke f32c5aa16c docs: remove invalid link to feed.xml 2022-05-17 21:13:21 +02:00
Benjamin Franzke 55813558cd docs: remove trailing space 2022-05-17 21:13:19 +02:00
Zbigniew Jędrzejewski-Szmek 68df2df668 Clean up the text in description of strverscmp_improved() 2022-05-17 16:33:43 +02:00
Zbigniew Jędrzejewski-Szmek 45b1321653 docs: say how to delay network-online.target
Could be related to https://access.redhat.com/solutions/4879291.
Unfortunately I can't access this page, but the title seems
relevant.
2022-05-17 12:50:09 +02:00
Zbigniew Jędrzejewski-Szmek 3b098432be docs: copy the page about network-online.target from the wiki
From https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/.

I changed the order in the page, but didn't change the text too much. Now the
discussion of the different targets is at the top, and they are ordered like
during boot (network-pre.target first, then network.target, and
network-online.target last). The parts about LSB and $network are pushed down a
bit. I think it is still useful to have them, but not as the main entry point
into the discussion. I tried to clean up the grammar and wording a bit.

One meanigful change is that we now don't say that network-online.target means
interfaces are up and IP addresses have been assigned. In other places we were
saying that the actual implementation is provided by
NetworkManager-wait-online.service, so the actual meaning is not under our
control. The text is changed to say "usually".

The last paragraph is new, I think it's good to say that
"dnf-makecache.service" is fine to use "network-online.target".
2022-05-17 12:50:09 +02:00
Stefan Seering 026d48ba93 fix typo 2022-05-12 21:13:03 +09:00
Elias Probst 8f1a581e0d
Use consistent formatting for PID 1 across docs/ 2022-05-11 15:31:07 +02:00
Elias Probst 6f3961381a
Typo (swich-rootswitch-root) 2022-05-11 15:30:21 +02:00
Zbigniew Jędrzejewski-Szmek c04361d725 docs/ARCHITECTURE: describe fuzzer locations and use 2022-05-08 17:53:56 +02:00
Zbigniew Jędrzejewski-Szmek e447f9ac0b docs/RELEASE: typo in target name 2022-05-05 19:49:26 +02:00
Zbigniew Jędrzejewski-Szmek 3e8caa34d6 docs: use lowercase "qemu" and other minor tweaks to test docs
We used both "qemu" and "QEMU", let's use the lower-case version everywhere
since it's also the name of the binary and the version that people are
most familiar with.

The stuff under test/ is not only for the integeration tests, but also
for various other test-related stuff, so adjust the docs a bit.
2022-05-04 12:58:43 +02:00
Zbigniew Jędrzejewski-Szmek c656265d8f docs: say that fuzzer input samples should have short names 2022-05-04 12:58:43 +02:00
Yu Watanabe 77f081f363 fix typo 2022-05-03 01:16:32 +09:00
Lennart Poettering 0ba05e754c docs: typo fix
As per:

https://github.com/systemd/systemd/pull/23170#pullrequestreview-959233817
2022-05-02 18:04:38 +02:00
Lennart Poettering fe672fe539 doc: add new markdown docs for credentials 2022-04-28 18:12:00 +02:00
Lennart Poettering 005b126745 docs: suggest to erase /var/lib/systemd/credential.secret when preparing golden images 2022-04-22 16:51:50 +02:00
Daan De Meyer a2a9d54108 kernel-install: Skip execution if $KERNEL_INSTALL_BYPASS=1 2022-04-22 09:12:08 +09:00
Lennart Poettering a7910612a5 sd-device: don't accept non-sysfs paths
There are some file systems mounted below /sys/ that are not actually
sysfs, i.e. are not arranged in a sysfs/kobject style. Let's refuse
those early. (Example, /sys/fs/cgroup/ and similar.)

(Also, let's add an env var for this, so that it can be turned off for
test cases.)
2022-04-13 14:40:13 +02:00
Zbigniew Jędrzejewski-Szmek edef9c469a docs/RELEASE: also mention syscall tables 2022-04-12 15:28:39 +02:00
Zbigniew Jędrzejewski-Szmek e8a688178c docs: stop recommending meson compile
With meson-0.60, meson compile stopped working with some targets:

$ meson compile -C build update-man-rules
ERROR: Can't invoke target `update-man-rules`: ambiguous name. Add target type and/or path: `PATH/NAME:TYPE`

This is obviously a regression in meson, but based on a chat with the
maintainers, it seems that there's some disagreement as to whether 'meson
compile' is useful and how exactly it should work. Since we're already at
meson 0.60.3 and this hasn't been fixed, and people generally don't seem to
consider this an issue, let's return to documenting the usual practice of
'ninja -C build' that just works everywhere.

(Since nobody has raised any fuss in systemd, it means that people are
generally using the shorter form during development too. I only noticed
because I pasted a command from the release docs when preparing -rc1.)
2022-04-12 12:35:44 +02:00
Zbigniew Jędrzejewski-Szmek 8f04a1ca2b meson: also allow setting GIT_VERSION via templates
GIT_VERSION is not available as a config.h variable, because it's rendered
into version.h during builds. Let's rework jinja2 rendering to also
parse version.h. No functional change, the new variable is so far unused.

I guess this will make partial rebuilds a bit slower, but it's useful
to be able to use the full version string.
2022-04-05 22:18:31 +02:00
Lennart Poettering ae61c53c3b man: document new udevadm lock tool 2022-04-04 17:19:51 +02:00
Zbigniew Jędrzejewski-Szmek 53877d0385
Merge pull request #22649 from keszybz/symlink-enablement-yet-again-punish-me-harder
Fixups to the unit enablement logic
2022-03-29 21:10:03 +02:00
Zbigniew Jędrzejewski-Szmek df78419d10 basic: add new variable $SYSTEMD_OS_RELEASE to override location of os-release
The test for the variable is added in test-systemctl-enable because there we
can do it almost for free, and the variable is most likely to be used with
'systemctl enable --root' anyway.
2022-03-29 16:17:56 +02:00
Luca Boccassi 505df87ea8 docs: use native type instead of byte stream in COREDUMP_PACKAGE_METADATA
The first three fields of a note are binary, so they are subject to
flipping due to endianess. Instead of a stream of bytes, just use
the native 4-bytes type so that it gets encoded automatically.

Implemented in the tools via: https://github.com/systemd/package-notes/pull/31
2022-03-28 14:19:42 +02:00
Lennart Poettering 13a5ffa477 doc: two markdown markup fixes 2022-03-23 13:47:15 +01:00
Lennart Poettering 3f4ead8d5f doc: add a bunch of missing <br> 2022-03-23 13:44:25 +01:00
Lennart Poettering 3976da0265 docs: extend BUILDING_IMAGES with a section about IMAGE_ID=/IMAGE_VERSION=
Also, beef up links everywhere.
2022-03-23 12:25:01 +01:00
Lennart Poettering 8f39ecf6aa docs: link up new image building docs a bit 2022-03-23 12:25:01 +01:00
Lennart Poettering a43d2229bb docs: make man page links in markdown Links section use teletype font, as we usually do 2022-03-23 12:25:01 +01:00
Lennart Poettering 6538c0efca docs: add some docs about building OS images
It's not trivial to know what to reset how. Let's document this a bit.
2022-03-22 18:10:39 +01:00
Lennart Poettering f6ad0282c9 docs: add /loader/entries.srel to the boot loader spec
This new file is supposed to address conflicts with Fedora/Grub's
frankenbootloaderspec implementation, that squatted the /loader/entries/
dir, but place incompatible files in them (that do variable expansion?).

A simple text file /loader/entries.srel shall indicate which spec is
implemented. If it contains the string "type1\n" then the
/loader/entries/ directory implements our standard spec, otherwise
something else.
2022-03-22 00:34:33 +01:00
Zbigniew Jędrzejewski-Szmek 5f1077af1e
Merge pull request #22519 from poettering/boot-order-title-revert
sd-boot: rework boot entry sorting
2022-03-18 19:04:48 +01:00
Lennart Poettering 1011935785 docs: add new "sort-key" field to boot loader spec
This allows snippet generators to explicitly order entries: any string
can be set as an entry's "sort key". If set, sd-boot will use it to sort
entries on display.

New logic is hence (ignore the boot counting logic)

  sort-key is set → primary sort key: sort-key (lexicographically increasing order)
                  → secondary sort key: machine-id (also increasing order)
                  → tertiary sort key: version (lexicographically decreasing order!)

  sort-key is not set → primary sort key: entry filename (aka id), lexicographically increasing order)

With this scheme we can order OSes by their names from A-Z but then put
within the same OS still the newest version first. This should clean up
the order to match expectations more.

Based on discussions here:

https://github.com/systemd/systemd/pull/22391#issuecomment-1040092633
2022-03-18 11:59:30 +01:00
Lennart Poettering 09d4d60360 doc: mention that setfsuid() is a reason why UIDs >= 2147483648 are icky 2022-03-18 11:54:45 +01:00
Lennart Poettering 200aa3583f docs: document the user.delegate xattr 2022-03-16 16:32:47 +01:00
Lennart Poettering 4bb37359f6 docs: s/straight-forward/straightforward/
Inspired by https://github.com/systemd/systemd/pull/20156#discussion_r810878846
2022-03-15 22:46:09 +00:00
Jason A. Donenfeld ffa047a03e random-util: remove RDRAND usage
/dev/urandom is seeded with RDRAND. Calling genuine_random_bytes(...,
..., 0) will use /dev/urandom as a last resort. Hence, we gain nothing
here by having our own RDRAND wrapper, because /dev/urandom already is
based on RDRAND output, even before /dev/urandom has fully initialized.

Furthermore, RDRAND is not actually fast! And on each successive
generation of new x86 CPUs, from both AMD and Intel, it just gets
slower.

This commit simplifies things by just using /dev/urandom in cases where
we before might use RDRAND, since /dev/urandom will always have RDRAND
mixed in as part of it.

And above where I say "/dev/urandom", what I actually mean is
GRND_INSECURE, which is the same thing but won't generate warnings in
dmesg.
2022-03-14 19:47:13 +00:00
Lennart Poettering e28770e367 docs: document how we usually define enums 2022-03-14 19:10:11 +00:00
Lennart Poettering 40f55f6998 docs: document we use C11 with GNU extensions now
Follow-up for: #22711
2022-03-14 18:43:49 +00:00
Yu Watanabe 21547367cd doc: fix error code 2022-03-13 10:24:45 +00:00
Zbigniew Jędrzejewski-Szmek 6d6104e0c9 docs: add more links for portabled 2022-03-07 14:32:16 +01:00
Matthias Lisin 7d5beae28c docs: swap Name and Partition Type UUID in header 2022-02-21 02:46:57 +01:00
Lennart Poettering cec16155e3 docs: $SYSTEMD_NSS_BYPASS_BUS is not honoured anymore, don't document it
It was removed back in 1684c56f40

Follow-up for: 1684c56f40
2022-02-18 10:49:31 +01:00
Lennart Poettering 9df83788c1 docs: document homed's use of the container UID mapping 2022-02-16 13:37:01 +01:00
Zbigniew Jędrzejewski-Szmek d33575eb4a docs: more internal links 2022-02-15 10:26:58 +01:00
Lennart Poettering 1d7150ec7f docs: make clear that if you use threaded cgroups you need to do that two levels down from your delegated cgroup
Prompted by: #22486
2022-02-14 19:06:40 +00:00
Eduard Tolosa 7060c656ed Update footer.html 2022-02-08 21:59:10 +01:00
adrian5 fa16642f4a docs: Improve HOME_DIRECTORY.md 2022-02-08 21:06:53 +09:00
bearhoney d0515a289a Update CODING_STYLE.md
Fixed typo.
2022-02-07 10:46:22 +00:00
Erik Sjölund f223fd6add docs: fix typos and improve language
Fix typos and improve the language by
adding a few commas and a missing word.
2022-01-26 22:35:33 +00:00
Luca Boccassi 2ef2024462 portable: add support for ExtensionDirectories in --extension
Same as for the root os image, support passing a directory, using
the new ExtensionDirectories setting.
2022-01-24 00:21:15 +09:00
Yu Watanabe adc1b76c30 core: add missing dependency DBus properties
Follow-up for 0bc488c99a.

Also sort dependency properties to make them match the definition of
`enum UnitDependency` in basic/unit-def.h.

Fixes #22133.
2022-01-16 14:05:33 +00:00
Zbigniew Jędrzejewski-Szmek 78afbb67d2 docs: promise stability for the journal json format too 2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek 717e92ceb9 man+docs: adjust links to the new page 2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek d9044a43f6 docs: import the Journal JSON Format description as subsection
I don't think we need a separate page for this, so both "export" formats share
a page.  We can just link to the approprate section when necessary.
2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek 5e3ab38e70 docs: import the Journal Export Format description from the wiki
This is a straightforward import, only links are adjusted.
2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek 931bc1957b docs: use https:// for fd.o links 2022-01-12 16:05:59 +01:00
Zbigniew Jędrzejewski-Szmek 8c19f79e40 docs: fix typo in key name and adjust grammar a bit 2022-01-10 13:22:48 +01:00
Jan Janssen 948d085e89 boot: Add gdb support and documentation
This will finally allow debugging issues in systemd without resorting to
Print() calls all over the place.
2022-01-04 17:23:01 +01:00
Zbigniew Jędrzejewski-Szmek df1f621bda docs: update branch names
Also use --atomic when pushing multiple items with git;
adjust some external URLs.
2022-01-03 21:15:21 +01:00
Yu Watanabe 283f7c9872 doc: fix typo 2021-12-09 08:50:19 +01:00
Yu Watanabe a783421498 tree-wide: fix typo 2021-12-02 00:51:02 +09:00
Arvid E. Picciani 312dac2869 docs: document that systemd closes console during normal runtime
fixes #21451

Signed-off-by: Arvid E. Picciani <aep@exys.org>
2021-12-01 10:16:15 +01:00
Zbigniew Jędrzejewski-Szmek 8592a0d799
Merge pull request #21578 from bluca/json_spec
docs: clarify JSON terms in COREDUMP_PACKAGE_METADATA
2021-11-30 16:36:36 +01:00
Luca Boccassi 45f822ceb3 docs: clarify ELF note usage in COREDUMP_PACKAGE_METADATA 2021-11-30 14:42:43 +00:00
Luca Boccassi bedd92b956 docs: clarify JSON terms in COREDUMP_PACKAGE_METADATA 2021-11-30 12:36:16 +00:00
Yu Watanabe a6f44d610c tree-wide: fix typo 2021-11-30 12:30:07 +00:00
Alyssa Ross f000edf9ea docs: fix descriptions in discoverable partitions
00db9a114e ("docs: generate table from header using a script") got the
descriptions for the partition types mixed up.  After that change, the
spec claimed, for example, that the /usr partition should contain
"dm-verity integrity hash data for the matching root partition", and
that the /usr verity partition should be of type "Any native, optionally
in LUKS".  This made the spec an extremely confusing read before I
figured out what must have happened!

I've gone through the table as it existed prior to 00db9a114e, and moved
the descriptions around in the script that generates the table until
they matched up with what they used to be.  Then I regenerated the
table from the fixed script.
2021-11-27 13:46:35 +00:00
Lennart Poettering 9aa3e5ebdf user-record: add rebalanceWeight field 2021-11-25 18:28:44 +01:00
Lennart Poettering 8a129c808a os-release: add new PORTABLE_PREFIXES= field for declaring valid portable service match prefixes 2021-11-23 22:55:11 +01:00
Zbigniew Jędrzejewski-Szmek 07430e514a docs: remove comment that makes githubs renderer very angry
It is fine on github.com, but not on github.io.
2021-11-23 19:46:27 +01:00
Lennart Poettering 2f09e2eea1 man/doc: document auto resize modes 2021-11-23 08:07:21 +01:00
Lennart Poettering 494876ce38
Merge pull request #21425 from keszybz/ppc64-fixes
Add base-filesystem defines for arm64/ppc64el/riscv64 and make build quiet again
2021-11-22 10:10:05 +01:00
Zbigniew Jędrzejewski-Szmek 0ccc588c2f docs: document the partition UUID used by homed 2021-11-19 18:49:46 +01:00
Zbigniew Jędrzejewski-Szmek 00db9a114e docs: generate table from header using a script
This adds a helper script:
$ python3 tools/list-discoverable-partitions.py <src/shared/gpt.h
<!-- generated with tools/list-discoverable-partitions.py -->
| Partition Type UUID | Name | Allowed File Systems | Explanation |
|---------------------|------|----------------------|-------------|
| _Root Partition (Alpha)_ | `6523f8ae-3eb1-4e2a-a05a-18b695ae656f` | [Root Partition] | [Root Partition more] |
| _Root Partition (ARC)_ | `d27f46ed-2919-4cb8-bd25-9531f3c16534` | ditto | ditto |
...

The output can be pasted into the markdown file. I think this works better than
trying to match the two lists by hand.
2021-11-19 18:49:46 +01:00
Lennart Poettering 49d5e4d0bb doc: rebreak boot loader spec 2021-11-19 15:40:08 +01:00
Zbigniew Jędrzejewski-Szmek 1aeb03798a docs: switch the first two columns in partition uuid list
Readers are most likely to want to go from a partition id to the uuid,
so puts the uuid second
2021-11-19 15:30:08 +01:00
Lennart Poettering 14efbfd96d docs: clarify the assumption on numeric values of JSON parsers we make
Prompted by:

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/BOBD6KVTXPR6K5ANAX6LIJLKNSGXCR3B/
2021-11-19 15:10:37 +01:00
Luca Boccassi cc970310a4 CONTAINER_INTERFACE: clarify that /proc/sys can be writable with namespacing
When user and network namespaces are enabled, the kernel
makes the global keys read-only, and makes the namespaced
ones available for the guest already.
2021-11-17 10:53:03 +00:00
Lennart Poettering 947796eac3 docs: mention RET_NERRNO() in CODING_STYLE.md 2021-11-16 08:04:09 +01:00
Lennart Poettering 1ca5a6c76e
Merge pull request #21333 from poettering/homed-report-fs-and-access-mode
homed: report actual home dir access mode and fs type in effect
2021-11-13 08:04:33 +01:00
Lennart Poettering b1beb00406
Merge pull request #21331 from poettering/luks-extra-mount-options
homed: allow per-user additional LUKS mount options
2021-11-13 08:03:55 +01:00
Lennart Poettering 67a6d39953 doc: document the two new accessMode/fileSystemType fields 2021-11-12 22:44:54 +01:00
Lennart Poettering 5dd57a00d5 doc: document the new luksExtraMountOptions concept 2021-11-12 22:22:06 +01:00
Lennart Poettering db42f011c6 docs: document new mount option env var 2021-11-12 17:36:53 +01:00
Emily Gonyer be7148ebed
Change gendered terms to be gender-neutral (#21325)
Some typos are also fixed.
2021-11-12 16:09:56 +01:00
Lennart Poettering ec512b9b9d doc: add some docs with a checklist of what to do for new architectures 2021-11-10 15:18:01 +01:00
Lennart Poettering 1fb2d8fcb6 docs: invite people to define GPT partition types for all archs now
The discovery partitions spec so far suggested we should define
arch-specific partition type uuids only for archs that have EFI. Let's
change that and invite people to define them for any arch. Why? Even if
GPT is defined as part of the UEFI spec it's quite useful independently
of it, too. Specifically, our image dissection logic makes use of it,
i.e. systemd-nspawn, systemd-gpt-auto-generator, systemd-repart,
RootImage=, portable services, and so on. None of these tools are
related to UEFI in any way.

Hence, let's open this up.
2021-11-10 15:18:01 +01:00
Zbigniew Jędrzejewski-Szmek e2de2d28f4
Merge pull request #20813 from unusual-thoughts/exittype_v2
Reintroduce ExitType
2021-11-08 15:06:37 +01:00
Christian Brauner a6d1760024 build: preserve correct mode when generating files via jinja2
When using "capture : true" in custom_target()s the mode of the source
file is not preserved when the generated file is not installed and so
needs to be tweaked manually. Switch from output capture to creating the
target file and copy the permissions from the input file.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
2021-11-08 12:06:48 +00:00
Henri Chain 596e447076 Reintroduce ExitType
This introduces `ExitType=main|cgroup` for services.
Similar to how `Type` specifies the launch of a service, `ExitType` is
concerned with how systemd determines that a service exited.

- If set to `main` (the current behavior), the service manager will consider
  the unit stopped when the main process exits.

- The `cgroup` exit type is meant for applications whose forking model is not
  known ahead of time and which might not have a specific main process.
  The service will stay running as long as at least one process in the cgroup
  is running. This is intended for transient or automatically generated
  services, such as graphical applications inside of a desktop environment.

Motivation for this is #16805. The original PR (#18782) was reverted (#20073)
after realizing that the exit status of "the last process in the cgroup" can't
reliably be known (#19385)

This version instead uses the main process exit status if there is one and just
listens to the cgroup empty event otherwise.

The advantages of a service with `ExitType=cgroup` over scopes are:
- Integrated logging / stdout redirection
- Avoids the race / synchronisation issue between launch and scope creation
- More extensive use of drop-ins and thus distro-level configuration:
  by moving from scopes to services we can have drop ins that will affect
  properties that can only be set during service creation,
  like `OOMPolicy` and security-related properties
- It makes systemd-xdg-autostart-generator usable by fixing [1], as obviously
  only services can be used in the generator, not scopes.

[1] https://bugs.kde.org/show_bug.cgi?id=433299
2021-11-08 10:15:23 +01:00
Lennart Poettering 0cdb32ef52
Merge pull request #21171 from DaanDeMeyer/tty-dimensions
exec: Add TTYRows and TTYColumns properties to set TTY dimensions
2021-11-06 10:16:45 +01:00
Daan De Meyer 51462135fb exec: Add TTYRows and TTYColumns properties to set TTY dimensions 2021-11-05 21:32:14 +00:00
Lennart Poettering 67302b38b4 docs: document systemd-homed development env vars 2021-11-05 19:07:52 +01:00
Zbigniew Jędrzejewski-Szmek 9214f2999b CODING_STYLE: allow joined variable declarations and function calls
… but only for a single variable.

The guidelines already allowed declaring variables at the point of
initialization. But not making a function call to do that. Let's allow that
now.  The existing style of declaring and initializing seperate is still
allowed, and whatever makes most sense should be used.
2021-11-03 10:30:36 +01:00
Lennart Poettering a21e88d476 docs: document what integer range we expect from JSON parsers 2021-10-28 14:15:46 +01:00
Lennart Poettering c04358ce84 docs: document $PASSWORD in ENVIRONMENT.md
Fixes: #20955
2021-10-28 10:51:12 +02:00
Lennart Poettering 4c2ee5c7f2 homework: allow specifying explicit additional mount options when using CIFS backend
This is useful since certain shares can only be mounted with additional
mount flags. For example the SMB share in modern AVM Fritz!Boxes
requires "noserverino" to be set to work from Linux.
2021-10-27 22:46:46 +02:00
Lennart Poettering bf15879b39 homework: allow specifying a dir component in CIFS services
Allow specifying CIFS services in the format //host/service/subdir/… to
allow multiple homedirs on the same share, and not in the main dir of
the share.

All other backends allow placing the data store at arbitrary places,
let's allow this too for the CIFS backend. This is particularly useful
for testing.
2021-10-27 22:37:56 +02:00
Yu Watanabe 4df5799f9b doc: fix typo in command
Follow-up for #21147.
2021-10-28 03:57:24 +09:00
Zbigniew Jędrzejewski-Szmek 3c15860e9e
Merge pull request #21147 from DaanDeMeyer/hacking-docs
docs: Clean up HACKING.md
2021-10-27 14:09:46 +02:00
Daan De Meyer b2c9da052a docs: Specify code block language for mkosi boot instructions 2021-10-27 12:27:16 +01:00
Daan De Meyer 4c71f971c1 docs: Make mkosi install instructions generic 2021-10-27 12:27:16 +01:00
Daan De Meyer b43ed972e0 docs: Extend builddep instructions to include more distros 2021-10-27 12:27:14 +01:00
Luca Boccassi f3f1172cf6 docs/COREDUMP_PACKAGE_METADATA: ELF section should be allocated and 0-padded 2021-10-27 12:29:31 +02:00
Daan De Meyer 390a307665 docs: Remove mkosi symlink instruction from HACKING
mkosi automatically builds for the host distro which seems a much
better default to encourage since dnf won't be installed on any host
system that's not Fedora anyway.
2021-10-27 11:10:52 +01:00
Daan De Meyer ff7c07fb08 docs: Simplify git instructions in HACKING slightly 2021-10-27 11:10:52 +01:00
Daan De Meyer 540804827a docs: Clean up links in HACKING.md 2021-10-27 11:10:50 +01:00
Luca Boccassi 98acae1f21 docs/COREDUMP_PACKAGE_METADATA: ELF section should be read-only and 4-bytes-aligned 2021-10-26 12:49:39 +01:00
Luca Boccassi 2f13844e73 docs/COREDUMP_PACKAGE_METADATA: add architecture field 2021-10-25 23:09:43 +01:00
Yu Watanabe 241167e68a
Merge pull request #21051 from poettering/nspawn-no-sync
nspawn: add --suppress-sync=yes mode for turning sync() and friends i…
2021-10-20 22:42:43 +09:00
Dimitri Papadopoulos ba669952b2 Typos found by codespell 2021-10-20 22:20:18 +09:00
Lennart Poettering 4a4654e024 nspawn: add --suppress-sync=yes mode for turning sync() and friends into NOPs via seccomp
This is supposed to be used by package/image builders such as mkosi to
speed up building, since it allows us to suppress sync() inside a
container.

This does what Debian's eatmydata tool does, but for a container, and
via seccomp (instead of LD_PRELOAD).
2021-10-20 11:35:15 +02:00
Lennart Poettering e8c7c4d9d1 loop-util: enable LO_FLAGS_DIRECT_IO by default on loopback devices
Fixes: #21003
2021-10-19 15:38:21 +02:00
Daan De Meyer 3f3bc1f2e7 docs: Fix value for "processId" in HACKING doc
This needs to be pickRemoteProcess to make sure the UI shows
the PIDs of processes in the mkosi container instead of processes
on the host system.
2021-10-18 15:02:05 +01:00
Zbigniew Jędrzejewski-Szmek bcce9a609a docs: mark spdx headers with the default license to website files
Those were added in b41a3f66c9 without
an explicit license, so they are under the default license. Some files
already got a header previously, so this only touches the remaining.

The same should be done for docs/_data/extra_pages.json, but it's json, and
json doesn't allow comments.
2021-10-18 09:43:18 +02:00
Zbigniew Jędrzejewski-Szmek 546e57f51b gitattributes: mark more files as "binary"
This way we know that we shouldn't look for a spdx header in them.
2021-10-18 09:40:35 +02:00
Lennart Poettering eaaa02bffe
Merge pull request #20902 from tasleson/integritysetup-generator
Add stand-alone dm integrity support
2021-10-15 18:57:17 +02:00
Tony Asleson 1f1a2243c0 Add stand-alone dm-integrity support
This adds support for dm integrity targets and an associated
/etc/integritytab file which is required as the dm integrity device
super block doesn't include all of the required metadata to bring up
the device correctly.  See integritytab man page for details.
2021-10-15 10:19:54 -05:00
Zbigniew Jędrzejewski-Szmek 0bb6699edc
Merge pull request #20980 from bluca/compat_readme
docs: add guidelines w.r.t. compatibility to docs/CONTRIBUTING.md
2021-10-15 09:49:29 +02:00
Lennart Poettering e3bde91293 doc: document that alloca_safe() and friends are the APIs to use 2021-10-14 15:57:52 +02:00
Luca Boccassi ea7ded75f3 docs: add guidelines w.r.t. compatibility to docs/CONTRIBUTING.md 2021-10-12 11:09:58 +01:00
Lennart Poettering ccd25f41f5 docs: document $SYSTEMD_CRYPTSETUP_USE_TOKEN_MODULE 2021-10-11 11:15:08 +02:00
Luca Boccassi 7fe57498de add LICENSES/README.md explaining the license situation 2021-10-01 17:27:34 +01:00
Luca Boccassi f59a1ab4b0 docs: mention that contributed code must be compatible with GPL-2.0-or-later explicitly 2021-09-29 17:42:51 +01:00
Lennart Poettering 54dcf847b1 docs: document the three new env vars for tweaking GPT dissection/validation 2021-09-28 17:03:44 +02:00
Lennart Poettering 77617993ee docs: document the new Verity signature partition type, and its UUIDs 2021-09-28 17:03:39 +02:00
Albert Brox 5918a93355 core: implement RuntimeMaxDeltaSec directive 2021-09-28 16:46:20 +02:00
Zbigniew Jędrzejewski-Szmek 66a0e22293
Merge pull request #20849 from keszybz/man-page-tags-and-links
Add license tags to doc pages, fixups and more internal links in man pages
2021-09-27 12:09:48 +02:00
Zbigniew Jędrzejewski-Szmek 0aff7b7584 docs: add spdx tags to all .md files
I have no idea if this is going to cause rendering problems, and it is fairly
hard to check. So let's just merge this, and if it github markdown processor
doesn't like it, revert.
2021-09-27 09:19:02 +02:00
Alberto Mardegan 4db9e01f7f docs: clarify order of events in cgroup scope creation 2021-09-23 16:02:03 +01:00
Peter Morrow c93a7d4ad3 docs: update docs with StartupAllowedCPUs and StartupAllowedMemoryNodes details
Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
2021-09-15 09:52:12 +01:00
Luca Boccassi 76ab98fa2b docs: generic info about adding directives in ARCHITECTURE.md 2021-09-14 13:55:05 +01:00
Zbigniew Jędrzejewski-Szmek 8c7e2b48c5 docs: polish the text about Portable Services a bit
No semantic changes, just removal of repetitions and unnecessary words, and
some more formatting.
2021-09-08 12:59:08 +02:00