Commit Graph

1155 Commits

Author SHA1 Message Date
hulkoba
0d8926b1c3
docs/CONTRIBUTING: format text 2024-03-27 07:11:56 +01:00
hulkoba
426d487900
docs/CODE_OF_CONDUCT: format text 2024-03-27 07:11:55 +01:00
hulkoba
af31cd6e62
docs/CATALOG: format text 2024-03-27 07:11:55 +01:00
hulkoba
59652fff30
docs/BUILDING_IMAGES: format text 2024-03-27 07:11:55 +01:00
hulkoba
e9a55babcd
docs/BOOT: format text 2024-03-27 07:11:54 +01:00
hulkoba
b7d1e251a2
docs/BACKPORTS: format text 2024-03-27 07:11:54 +01:00
hulkoba
3bfe71098d
docs/AUTOPKGTEST: format text 2024-03-27 07:11:53 +01:00
hulkoba
51d8900677
docs/ARCHITECTURE: format text 2024-03-27 07:11:53 +01:00
hulkoba
e7f7da45e7
docs/API_FILE_SYSTEM: format text 2024-03-27 07:11:53 +01:00
hulkoba
565e2396fd
docs/FAQ: update logind man page link and fix relative link 2024-03-27 07:11:52 +01:00
hulkoba
b058563a54
docs/PORTABILITY_AND_STABILITY: update internal links 2024-03-27 07:11:52 +01:00
hulkoba
a90c3a9eb2
docs/JOURNAL_FILE_FORMAT: update journal links 2024-03-27 07:11:52 +01:00
hulkoba
2cc483482e
docs/INITRD_INTERFACE: update link
separate usr is broken
2024-03-27 07:11:51 +01:00
hulkoba
67ae7f6e73
docs/CONTAINER_INTERACE: update vm-or-container-manager link 2024-03-27 07:11:51 +01:00
hulkoba
9adb7cd99d
docs/GROUP_DELEGATION: update links
to The New Control Group Interfaces and Writing VM and Container Managers
2024-03-27 07:11:50 +01:00
hulkoba
fd50b326a4
docs/WRITING_RESOLVER_CLIENTS: update manpage link 2024-03-27 07:11:50 +01:00
hulkoba
9f985a6cfc
docs/WRITING_RESOLVER_CLIENTS: format text 2024-03-27 07:11:39 +01:00
Mariano Giménez
d3421bd4e4
docs: add pax control groups
and adapt links
2024-03-27 06:53:47 +01:00
Mariano Giménez
151c22e873
docs/TIPS_AND_TRICKS: update faq link 2024-03-27 06:53:46 +01:00
Mariano Giménez
ed8998d372
docs/DEBUGGING: add screenshot and fix path to it 2024-03-27 06:53:46 +01:00
Mariano Giménez
cc7ec2cab4
docs/WRITING VM_AND_CONTAINER_MANAGERS: update manpage link
and container interface link
2024-03-27 06:53:46 +01:00
Mariano Giménez
288816c503
docs/WRITING_NETWORK_CONFIGURATION_MANAGERS: update manpage links 2024-03-27 06:53:45 +01:00
Mariano Giménez
b479ff876f
docs/WRITING_DISPLAY_MANAGERS: update links
to desktop environments and logind manpage
2024-03-27 06:53:45 +01:00
Mariano Giménez
48c43dbe1c
docs/WRITING_DESKTOP_ENV: update links
to 'bus api of logind' and 'inhitor locks'
2024-03-27 06:53:45 +01:00
Mariano Giménez
14ca3f421e
docs/THE_CASE_FOR_THE_USR_MERGE): update link to 'seprate usr is broken' 2024-03-27 06:53:44 +01:00
Mariano Giménez
cc9977da03
docs/MINIMAL_BUILDS: remove last sentence due to missing link
http://kdzbn.homelinux.net/libcap-add-pkg-config.patch
This link is a 404, so we removed the whole sentence.
2024-03-27 06:53:44 +01:00
Mariano Giménez
adf0eb641a
docs/INHIBITOR_LOCKS: update logind d-bus api link
and fix freedesktop wiki link
2024-03-27 06:53:44 +01:00
Mariano Giménez
f9be794ace
docs/CONTROL_GROUP_INTERFACE: update links 2024-03-27 06:53:43 +01:00
Mariano Giménez
5f1b83d240
docs/BOOT: update bootloader specification link 2024-03-27 06:53:43 +01:00
Mariano Giménez
101c4ff939
docs/BACKPORTS: close parenthesis 2024-03-27 06:53:42 +01:00
hulkoba
257889efb3
docs/HACKING: fix jinja link 2024-03-27 06:53:42 +01:00
hulkoba
517fd35f94
docs/HACKING: link mkosi webpage
and remove one of two mkosi github links
2024-03-27 06:53:29 +01:00
hulkoba
f757c5a4bf
docs/CODING_STYLE: remove whitespace 2024-03-27 06:49:16 +01:00
hulkoba
4ba04a050a
docs/ARCHITECTURE: link test/readme.testsuite 2024-03-27 06:49:16 +01:00
Krzesimir Nowak
33cb10f68d docs: Document SYSTEMD_SYSEXT_MUTABLE_MODE env var 2024-03-25 08:14:36 +01:00
Daan De Meyer
e33d43b059 docs: Add one more git submodule setting to configure 2024-03-21 23:02:52 +00:00
Matthias Lisin
8c2440dd42 docs: fix keys in wrong section 2024-03-21 02:32:26 +01:00
Daan De Meyer
db7374e156 Document new vsock literals
Fixes #31849
2024-03-19 12:31:36 +00:00
Luca Boccassi
15d4bedf3d
Merge pull request #31778 from yuwata/kbd-util
kbd-util: allow to override the default keymap directories
2024-03-18 12:20:36 +00:00
Luca Boccassi
48570c9273
Merge pull request #31811 from yuwata/network-pin-persistent-storage
network: pin file descriptor of persistent storage
2024-03-18 11:08:21 +00:00
Tycho Andersen
af668ab10a docs: update footer to 2024 2024-03-16 03:14:23 +09:00
Daan De Meyer
6233a76932 meson: Rename add-git-hook.sh to git-setup.sh and configure git in it
Let's automatically apply the recommended git config with meson.
2024-03-15 17:27:49 +01:00
Daan De Meyer
c735424908 docs: Update HACKING guide with recommended git config 2024-03-15 17:27:49 +01:00
Yu Watanabe
013359ac65 network: pin file descriptor of persistent storage
This also drop the support of /run/systemd/netif/persistent-storage-ready,
as the file is anyway removed when networkd is stopped.
Let's use $SYSTEMD_NETWORK_PERSISTENT_STORAGE_READY=1 instead on testing.
2024-03-16 01:12:05 +09:00
Yu Watanabe
6e0abf5fb3 docs: fix typo
Follow-up for 34c6b7d9de.
2024-03-15 04:04:01 +09:00
Yu Watanabe
e852f10cb4 kbd-util: allow to override the default keymap directories
This introduces $SYSTEMD_KEYMAP_DIRECTORIES environment variable to
override the hardcoded keymap directories.

I think it is not necessary to provide the first class configuration
option for controlling the keymap directories, but it is not good to
hardcode the paths. So, let's introduce an environment variable to
override that.

Prompted by #31759.

Closes #31759.
2024-03-15 03:19:45 +09:00
Lennart Poettering
34c6b7d9de docs: add a new document describing the VM interface of systemd
This mirrors the existing CONTAINER_INTERFACE.md document, but describes
extension points of systemd running in a VM with a machine manager
supervising it.
2024-03-14 17:25:04 +01:00
Lennart Poettering
83797ece91 docs: update various links 2024-03-14 17:25:00 +01:00
Lennart Poettering
b6a24b87c1 docs: properly line break WRITING_VM_AND_CONTAINER_MANAGERS.md 2024-03-14 17:24:57 +01:00
Lennart Poettering
1e785c50c9 docs: document new sd_notify() extensions 2024-03-14 17:24:24 +01:00
Daan De Meyer
61fbdd441f
Merge pull request #31345 from DaanDeMeyer/mkosi-packages
Build distribution packages in mkosi
2024-03-07 11:12:14 +01:00
Daan De Meyer
4d0f1451b5 Build distribution packages in mkosi
Instead of running meson install and hoping for the best, let's build
distribution packages from the downstream packaging specs. This gets
us the following:

- Vastly simplified mkosi scripts since we don't need a separate initrd
  image anymore but can just reuse the default mkosi initrd.
- Almost everything can move to the base image as its not the basis
  anymore for the initrd and as such we don't need to care about the
  size anymore.
- The systemd packages that get pulled in as dependencies of other
  packages get properly uninstalled and replaced with our packages that
  we built instead of just installing on top of an existing systemd
  installation with no guarantee that everything from that previous
  installation was removed.
- Much better testing coverage as what we're testing is much closer
  to what will actually be deployed in distributions.
- Immediate feedback if something we change breaks distribution packaging
- We get integration with the distribution for free as we'll automatically
  use the proper directories and such instead of having to hack this
  into a mkosi build script.
- ...
2024-03-07 10:47:19 +01:00
Lennart Poettering
74d142ff3a
Merge pull request #30612 from AdrianVovk/sleep-freeze-user-seesions
Freeze user sessions for all types of sleep
2024-03-06 18:52:57 +01:00
Luca Boccassi
ba6ec879bb
Merge pull request #31621 from poettering/resolved-proxy-do
resolved: proxy upstream local requests to our stub with DO bit set
2024-03-06 13:55:14 +00:00
Christian Wesselhoeft
da95494ca3 PORTABLE_SERVICES.md: Improve grammar 2024-03-06 10:02:38 +00:00
Adrian Vovk
a5b009d935
homework: Lock/Unlock: Freeze/Thaw user session
Whenever a home directory is in a locked state, accessing the files of
the home directory is extremely likely to cause the thread to hang. This
will put the session in a strange state, where some threads are hanging
due to file access and others are not hanging because they are not
trying to access any of the user's files.

This can lead to a whole slew of consequences. For example, imagine a
likely situation where the Wayland compositor is not hanging, but the
user's open apps are. Eventually, the compositor will detect that none
of the apps are responding to its pings, assume that they're frozen
(which they are), and kill them. The systemd user instance can end up in
a similarly confused state and start killing user services. In the worst
case, killing an app at an unexpected moment can lead to data loss.

The solution is to suspend execution of the whole user session by
freezing the user's slice.
2024-03-05 12:12:36 -05:00
Adrian Vovk
0b958bb3ee
sleep: Always freeze user.slice
Previously, we'd only freeze user.slice in the case of s2h, because we
didn't want the user session to resume while systemd was transitioning
from suspend to hibernate.

This commit extends this freezing behavior to all sleep modes.

We also have an environment variable to disable the freezing behavior
outright. This is a necessary workaround for someone that has hooks
in /usr/lib/systemd/system-sleep/ which communicate with some
process running under user.slice, or if someone is using the proprietary
NVIDIA driver which breaks when user.slice is frozen (issue #27559)

Fixes #27559
2024-03-05 12:12:35 -05:00
Lennart Poettering
6399be223b resolved: make resolved authoritative in resolveing our local host name
This is a kinda a follow-up for ce266330fc: it
makes resolved authoritative on our local hostname, and never contacts
DNS anymore for it.

We effectively already were authoritative for it, except if the user
queried for other RR types than just A/AAAA. This closes the gap and
refuses routing other RR type queries to DNS.

Fixes: #23662
2024-03-05 15:31:32 +01:00
Max Gautier
7360be92ad Fixing bad link to Debian packages tests 2024-03-05 11:22:13 +01:00
Frantisek Sumsal
b99a26e136 docs: update translation-related instructions
Just making them consistent with the rest of the doc.
2024-03-04 10:12:20 +01:00
Luca Boccassi
a73144bbdf repart: add --private-key-source and drop --private-key-uri
It turns out it's mostly PKCS11 that supports the URI format,
and other engines just take files. For example the tpm2-tss-openssl
engine just takes a sealed private key file path as the key input,
and the engine needs to be specified separately.

Add --private-key-source=file|engine:foo|provider:bar to
manually specify how to use the private key parameter.

Follow-up for 0a8264080a
2024-03-01 17:32:19 +00:00
Adrian Vovk
793ceda177 user-record: Add preferredSession{Type,Launcher}
These will be used by display managers to pre-select the user's
preferred desktop environment and display server type. On homed, the
display manager will also be able to set these fields to cache the
user's last selection.
2024-03-01 16:28:10 +00:00
Lennart Poettering
5b97957376
Merge pull request #31531 from poettering/verity-userspace-optional
dissect: make use of userspace verity keyring optional
2024-02-28 22:04:58 +01:00
Lennart Poettering
f0ecff8506 dissect: condition usespace verity keyring via kernel cmdline option + env var 2024-02-28 16:18:22 +01:00
Lennart Poettering
78266a54f1 tree-wide: use "_" rather than "-" as separator in kernel cmdline options
Most of our kernel cmdline options use underscores as word separators in
kernel cmdline options, but there were some exceptions. Let's fix those,
and also use underscores.

Since our /proc/cmdline parsers don't distinguish between the two
characters anyway this should not break anything, but makes sure our own
codebase (and in particular docs and log messages) are internally
consistent.
2024-02-28 15:33:51 +01:00
Mike Yuan
dc4eb788e6 docs: update link for Arch Linux bugtracker 2024-02-25 11:27:18 +00:00
Mike Yuan
3d3c42773d
docs/CODING_STYLE: fix typo (CLONE_VORK -> VFORK) 2024-02-24 13:26:19 +08:00
Yu Watanabe
16a52db488 docs: fix typo 2024-02-24 11:30:39 +09:00
Zbigniew Jędrzejewski-Szmek
1b4dc2ea28 docs: drop .md suffixes again 2024-02-23 09:56:00 +01:00
Zbigniew Jędrzejewski-Szmek
8e3fee33af Revert "docs: use collections to structure the data"
This reverts commit 5e8ff010a1.

This broke all the URLs, we can't have that. (And actually, we probably don't
_want_ to make the change either. It's nicer to have all the pages in one
directory, so one doesn't have to figure out to which collection the page
belongs.)
2024-02-23 09:48:47 +01:00
Zbigniew Jędrzejewski-Szmek
9df75c85a3 docs: fix typo in page name
Fixup for 163e2c8346.
2024-02-22 13:01:17 +01:00
hulkoba
5e8ff010a1
docs: use collections to structure the data 2024-02-22 10:11:54 +01:00
hulkoba
4049d92fda
docs: add distributions and mastodon 2024-02-22 10:11:10 +01:00
hulkoba
6b2a277624
docs: add Manuals and Documentation for Users and Administrators 2024-02-22 10:11:10 +01:00
Mariano Giménez
163e2c8346
docs: add documentation for developers 2024-02-22 10:11:09 +01:00
Mariano Giménez
313f2ebc88
add related packages links 2024-02-22 10:11:09 +01:00
Mariano Giménez
b6d06b85f0
add The systemd for Developers Series pages 2024-02-22 10:11:08 +01:00
Mariano Giménez
1c4f6bb60a
add administrators blog series links to extra_pages.json 2024-02-22 10:11:08 +01:00
Mariano Giménez
65c63edcd9
add videos and presentations 2024-02-22 10:11:07 +01:00
Mariano Giménez
7d4afa76e3
add publications to extra_pages.json 2024-02-22 10:11:05 +01:00
Lennart Poettering
0691d0e5a1 pcrlock: document the env vars we honour to find measurement logs
This env vars have been supported for a while, let's document them where
we usually document them.
2024-02-21 14:45:19 +01:00
hulkoba
eafadb91ce docs: show mkosi project on website 2024-02-21 13:08:08 +01:00
Adrian Vovk
1b466c0940 user-record: Add blobDirectory and blobManifest
These fields are used to connect a JSON user record to its blob
directory, and to include the directory's contents in the record's
signature
2024-02-19 11:18:11 +00:00
Adrian Vovk
4006b98da6 Document blob directory behavior
We're documenting the behavior of blob directories here. These docs
refer to things that aren't yet implemented at the time of the commit, but will be later in the same PR.
2024-02-19 11:18:11 +00:00
Daan De Meyer
55c2350e85
Merge pull request #31320 from DaanDeMeyer/versioning
meson: Start adding devel and rc suffixes to the project version
2024-02-15 20:15:04 +01:00
Daan De Meyer
ea2a57bee3 meson: Start adding devel and rc suffixes to the project version
Let's make sure that versions generated by meson-vcs-tag.sh always
sort higher than official and stable releases. We achieve this by
immediately updating the meson version in meson.build after a new
release. To make sure this version always sorts lower than future
rcs, we suffix it with "~devel" which will sort lower than "~rcX".

The new release workflow is to update the version in meson.build
for each rc and the official release and to also update the version
number after a new release to the next development version.

The full version is exposed as PROJECT_VERSION_FULL and used where
it makes sense over PROJECT_VERSION.

We also switch to reading the version from a meson.version file in
the repo instead of hardcoding it in meson.build. This makes it
easier to access both inside and outside of the project.

The meson-vcs-tag.sh script is rewritten to query the version from
meson.version instead of passing it in via the command line. This
makes it easier to use outside of systemd since users don't have to
query the version themselves first.
2024-02-14 15:36:34 +01:00
Daan De Meyer
c0561a05f5 docs: Use v255~rc1 instead of v255-rc1
This gets the point across better that we want the rc to sort lower
than the official release.
2024-02-14 15:36:33 +01:00
Lennart Poettering
46c60f7216 user-record: add fields for a fallback home dir + shell
This adds fields to the user record logic to allow a "fallback" home
directory and shell to be set as part of the "status" section of the
user record, i.e. supplied by the manager of the user record.

The idea is that if the fallback homedir/shell is set it will take
precedence over the real one in most ways.

Usecase: let's try to make ssh logins into homed directories work.
systemd-homed would set a fallback shell/homedir for inactive home dirs.
Thus, when ssh logins take place via key auth, we can allow them, and
these fallback session params would be used because the real home cannot
be activated just yet becasue we cannot acquire any password for it from
the user.
2024-02-14 15:01:38 +01:00
Adrian Vovk
49e55abb7f
user-record: Add languages field
This field is like preferredLanguage, but takes a priority list of
languages instead. If an app isn't translated into a user's primary
language, it can fall back to one of the other languages in the list
thus making the app more accessible to the user.

For instance: in my experience, many Ukrainians are fluent in Russian,
often significantly better than English (especially if they are of a
generation that grew up during the USSR). Such a person might set this
new variable to ["uk_UA.UTF-8", "ru_UA.UTF-8"] so that software that
lacks Ukrainian translations will first try Russian translations before
defaulting to English.

Fixes #31290
2024-02-13 17:39:14 -05:00
Daan De Meyer
6d55e3a364 Use tilde for rc tag versioning
tilde sorts lower in the version comparison spec:
https://uapi-group.org/specifications/specs/version_format_specification/

➜  systemd git:(strip) systemd-analyze compare-versions 249\~rc1 249
249\~rc1 < 249
➜  systemd git:(strip) systemd-analyze compare-versions 249-rc1 249
249-rc1 > 249

Also update tools/meson-vcs-tag.sh to use carets instead of hyphens
for the git part of the version as carets are allowed to be part of
a version by pacman while hyphens are not and both sort higher than
a version without the git part.
2024-02-13 18:14:36 +01:00
Luca Boccassi
dba0afa14e openssl: add helper to load key from provider/engine
It's not the literal private key, but EVP_PKEY becomes a reference
to the engine/provider that OpenSSL knows how to use later
2024-02-09 14:36:10 +00:00
Lennart Poettering
4fec9fed61
Merge pull request #30847 from keszybz/some-docs-updates
Some docs updates
2024-01-31 11:09:56 +01:00
Luca Boccassi
343e35b36d core: add SYSTEMD_VERITY_SHARING env var for local development
When running an image that cannot be mounted (e.g.: key missing intentionally
for development purposes), there's a retry loop that takes some time
and slows development down. Add an env var to disable it.
2024-01-26 10:14:15 +00:00
Daan De Meyer
98118c44ae Remove a few references to dracut
Let's remove some explicit references to dracut as we prefer initrds
built with mkosi these days.
2024-01-24 17:54:38 +01:00
Zbigniew Jędrzejewski-Szmek
4e434bc096 docs/UID-GIDS: use the modern spellings of pkg-config variables 2024-01-24 12:55:00 +01:00
Zbigniew Jędrzejewski-Szmek
7e4f30c3d0 docs/UID-GIDS: mention that ranges are actually configurable
It silly for our docs to say that they aren't when we added support for this a
few years ago.

Also, drop some mentions of "runtime". This implied that those values can be
changed almost at will, but actually, they can only be meaningfully changed
_before_ the allocations are made.
2024-01-24 12:55:00 +01:00
Adrian Vovk
a15b9768ec
docs: Fix typo in USER_RECORD 2024-01-19 12:27:06 -05:00
Lennart Poettering
4a6fe5f05e varlink: also honour new env var $SYSTEMD_VARLINK_LISTEN in varlink_server_listen_auto()
varlink_server_listen_auto() is supposed to be the one-stop solution for
turning simple command line tools into IPC services. They aren't easy to
test/debug however, since you have to invoke them through a service
manager.

Let's make this easier: if the SYSTEMD_VARLINK_LISTEN env var is set,
let's listen on the socket specified therein. This makes things easier
to gdb: just run the service from the cmdline.
2024-01-16 13:45:35 +01:00
Daan De Meyer
52842bb2c5 mkosi: Build a directory image by default
Both building and booting a directory image is much faster than
building or booting a disk image so let's default to a directory
image.

In CI, we stick to a disk image to make sure that keeps working as
well.

The only extra dependency this introduces is virtiofsd which is
packaged in all distributions except Debian stable. For users
hacking on systemd on Debian stable, a disk image can be built by
writing the following to mkosi.local.conf:

```
[Output]
Format=disk
```
2024-01-12 16:19:48 +01:00
Lennart Poettering
62b3e5fd41 doc: document new /run/host/ inodes in container interface doc 2024-01-11 16:05:20 +01:00
Lennart Poettering
bcb1bb379e sd-bus: also intrepret $SYSTEMD_SSH env var
To make things symmetric to the $SYSTEMD_SSH logic that the varlink
transport supports, let's also honour such a variable in sd-bus when
picking ssh transport.
2024-01-08 23:24:51 +01:00
Lennart Poettering
a1bb30de7f varlink: add "ssh:" transport
This uses openssh 9.4's -W support for AF_UNIX. Unfortunately older versions
don't work with this, and I couldn#t figure a way that would work for
older versions too, would not be racy and where we'd still could keep
track of the forked off ssh process.

Unfortunately, on older versions -W will just hang (because it tries to
resolve the AF_UNIX path as regular host name), which sucks, but hopefully this
issue will go away sooner or later on its own, as distributions update.

Fedora is still stuck at 9.3 at the time of posting this (even on
Fedora), even though 9.4, 9.5, 9.6 have all already been released by
now.

Example:
        varlinkctl call -j ssh:root@somehost:/run/systemd/io.systemd.Credentials io.systemd.Credentials.Encrypt '{"text":"foobar"}'
2024-01-08 23:24:45 +01:00
Luca Boccassi
5af0f171f9 udev: add upper bound of 5 hours to SYSTEMD_UDEV_EXTRA_TIMEOUT_SEC=
Follow-up for b16c6076cb

CID#1533111
2024-01-04 14:30:20 +01:00
Yu Watanabe
b16c6076cb udev: wait for an extra time before the manager kills workers
Otherwise, udev workers cannot detect slow programs invoked by
IMPORT{program}=, PROGRAM=, or RUN=, and whole worker process may be
killed.

Fixes #30436.

Co-authored-by: sushmbha <sushmita.bhattacharya@oracle.com>
2024-01-03 04:23:22 +09:00
Daan De Meyer
3d11b46bf7
Add $SYSTEMD_HWDB_UPDATE_BYPASS (#30463)
Same as $KERNEL_INSTALL_BYPASS, but for hwdb. This will speed up
cross architecture image builds in mkosi as I can disable package
managers from running the costly hwdb update stuff in qemu user
mode and run it myself with a native systemd-hwdb with --root=.
2023-12-14 18:57:05 +09:00
Colin Walters
47374e0601 docs/CREDENTIALS: Don't write authorized_keys with executable bits
No reason to make this file executable.
2023-12-14 07:58:30 +00:00
Luca Boccassi
0065f4b142 RELEASE: mark a few items for the final step
Doesn't make much sense to push RCs to the stable repository, just
do that in the final tag push
2023-12-06 21:07:42 +00:00
Daan De Meyer
c417615c12 mkosi: Drop building custom kernel logic
Now that mkosi-kernel is a thing, this logic in systemd is just mostly
bitrotting since I just use mkosi-kernel these days. If I ever need to
hack on systemd and the kernel in tandem, I'll just add support for
building systemd to mkosi-kernel instead, so let's drop the support for
building a custom kernel in systemd's mkosi configuration.
2023-11-29 15:00:34 +00:00
Daan De Meyer
0e38893a0f
Merge pull request #30236 from DaanDeMeyer/mkosi
Update to mkosi v19
2023-11-28 23:39:41 +01:00
Zbigniew Jędrzejewski-Szmek
25757715fe shared/cryptsetup-util: build problematic code only in developer mode
This code doesn't link when gcc+lld is used:

$ LDFLAGS=-fuse-ld=lld meson setup build-lld && ninja -C build-lld udevadm
...
ld.lld: error: src/shared/libsystemd-shared-255.a(libsystemd-shared-255.a.p/cryptsetup-util.c.o):
  symbol crypt_token_external_path@@ has undefined version
collect2: error: ld returned 1 exit status

As a work-around, restrict it to developer mode.

Closes https://github.com/systemd/systemd/issues/30218.
2023-11-28 20:23:45 +00:00
Daan De Meyer
bcb335ac68 Update to mkosi v19
- Use mkosi.images/ instead of mkosi.presets/
- Use the .chroot suffix to run scripts in the image
- Use BuildSources= match for the kernel build
- Move 10-systemd.conf to mkosi.conf and rely on mkosi.local.conf
  for local configuration
2023-11-28 19:54:58 +01:00
Luca Boccassi
094d85a6bb docs/RELEASE.md: retain systemd.io in IRC topic update 2023-11-14 20:18:50 +00:00
Vito Caputo
8c5f6494bc doc: some trivial cleanups to MEMORY_PRESSURE.md 2023-11-14 09:46:57 +00:00
Lennart Poettering
abc19a6ffa storagetm: expose more useful metadata for nvme block devices
don't let the devices to be announced just as model "Linux". Let's instead
propagate the underlying block device's model. Also do something
reasonably smart for the serial and firmware version fields.
2023-11-13 19:32:34 +00:00
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
Micah Abbott
2262cbf9fd docs: cleanups to ROOT_STORAGE_DAEMONS
There were a couple spelling/grammatical errors in the docs that made
it hard to read and understand parts of this doc. I cleaned up those
errors and reflowed the line breaks to keep to the 80 char limit.
2023-07-12 15:49:05 +01:00
Yu Watanabe
627cdcc785 tree-wide: fix typos reported by Fossies Codespell report 2023-07-12 10:14:50 +09:00
Joerg Behrmann
5bc9ea070f treewide: fix "an" before consonant U sounds
The article "a" goes before consonant sounds and "an" goes before vowel
sounds. This commit changes an to a for UKI, UDP, UTF-8, URL, UUID, U-Label, UI
and USB, since they start with the sound /ˌjuː/.
2023-07-06 11:59:41 +01:00
Lennart Poettering
de70ecb328 import-creds: add support for binary credentials specified on the kernel cmdline 2023-07-04 23:19:48 +02:00
Lennart Poettering
df5f51c3fe doc: document inird credentials + and how to consume credentials in generators
(as well as various other fixes)
2023-07-04 23:17:17 +02:00
Zbigniew Jędrzejewski-Szmek
da89046643 tree-wide: "<n>bit" → "<n>-bit"
In some places, "<n> bits" is used when more appropriate.
2023-07-02 11:10:12 +01:00
Daan De Meyer
2fe24cccde mkosi: Enable Incremental= mode by default
Since mkosi is now smart enough to drop the caches when the list of
packages changes, let's enable Incremental= mode by default to ensure
a good experience for anyone new to hacking on systemd with mkosi.
2023-06-29 13:11:39 +01:00
Lennart Poettering
fba84e121b journalctl: read env vars that override compiled catalog database and source files
This makes it a bit easier to test catalog files without installing
systemd.
2023-06-27 23:20:15 +02:00
Frantisek Sumsal
dc7e580e64 tree-wide: use https for the 0pointer.de doc links 2023-06-23 13:46:56 +01:00
Lennart Poettering
2499d32022 docs: document threading situation in coding style 2023-06-23 10:05:16 +02:00
Lennart Poettering
7e81ce6bb8 docs: describe $TESTFUNCS briefly
Follow-up for f1a83e41ae
2023-06-22 15:14:47 +01:00
Zbigniew Jędrzejewski-Szmek
5811490a3f docs/CREDENTIALS: fix confusion of i.e. and e.g. 2023-06-19 13:36:30 +02:00
Daan De Meyer
bbfb25f4b9 creds: Add ImportCredential=
ImportCredential= takes a credential name and searches for a matching
credential in all the credential stores we know about it. It supports
globs which are expanded so that all matching credentials are loaded.
2023-06-08 14:09:18 +02:00
Zbigniew Jędrzejewski-Szmek
badea0d6df sd-boot,sd-stub: also print version after the address
The kernel, systemd, and many other things print their version during boot.
sd-boot and sd-stub are also important, so let's print the version if EFI_DEBUG.
(If !EFI_DEBUG, continue to be quiet.)

When updating the docs, I saw that that the text in HACKING.md was out of date.
Instead of trying to update the instructions there, make it shorter and refer
the reader to tools/debug-sd-boot.sh for details.
2023-05-24 04:34:56 +09:00
Zbigniew Jędrzejewski-Szmek
bd3beda283 shared/condition: add envvar override for the check for first-boot
Before 7cd43e34c5, it was possible to use
SYSTEMD_PROC_CMDLINE=systemd.condition-first-boot to override autodetection.
But now this doesn't work anymore, and it's useful to be able to do that for
testing.
2023-05-23 15:09:39 +02:00
Zbigniew Jędrzejewski-Szmek
7ecce0e571 docs: list all public headers in stability promise
We provide the same stability for all the headers that are public.

Also, mark id128 as portable to other systems. There is really nothing in the
code that would make it hard. It would probably work out-of-the-box.
2023-05-16 08:50:11 +02:00
Daan De Meyer
47e5e12866 mkosi: Package a erofs usr partition with signed verity
Let's start moving towards a more involved partitioning setup to
test our stuff more when using mkosi.

The root partition is generated on boot with systemd-repart.

CentOS supports neither erofs nor btrfs so we use squashfs and xfs
instead.

We also enable SecureBoot= locally for additional coverage. This
and the use of verity means users need to run `mkosi genkey` once
to generate the keys necessary to do secure boot and verity.
2023-05-13 10:49:17 +02:00
Klaus
ab13274a19
docs: add correct pacman command (#27486)
The `pacman` command in order to install packages on Arch in the documentation is invalid.
This PR fixes the command.
2023-05-02 17:18:10 +08:00
Lennart Poettering
a8b993dc11 core: add DelegateSubgroup= setting
This implements a minimal subset of #24961, but in a lot more
restrictive way: we only allow one level of subcgroup (as that's enough
to address the no-processes in inner cgroups rule), and does not change
anything about threaded cgroup logic or similar, or make any of this new
behaviour mandatory.

All this does is this: all non-control processes we invoke for a unit
we'll invoke in a subgroup by the specified name.

We'll later port all our current services that use cgroup delegation
over to this, i.e. user@.service, systemd-nspawn@.service and
systemd-udevd.service.
2023-04-27 12:18:32 +02:00
Lawrence Thorpe
08b61b40ed
docs: fix LoadCredentialEncrypted example (#27387)
Embedded credential name 'ciphertext.cred' does not match filename 'foobar', refusing.
2023-04-25 15:41:01 +02:00
Lennart Poettering
4d26b2277a doc: say in CODING_STYLE that AT_EMPTY_PATH should be implied on openat() style APIs (and NULL path is OK)
As discussed here:

https://github.com/systemd/systemd/pull/27397#issuecomment-1521630044
2023-04-25 14:05:08 +02:00
07416
f6e94c5f7d
a colloquial abbreviation 'btw' in TEMPORARY_DIRECTORIES.md (#27365)
* Update TEMPORARY_DIRECTORIES.md
2023-04-23 10:48:17 +01:00
Frantisek Sumsal
94d82b5980 tree-wide: code spelling fixes
As reported by Fossies.
2023-04-20 21:54:59 +02:00
Frantisek Sumsal
e24c6676c7 docs: add a missing $ sign
Addresses https://github.com/systemd/systemd/pull/27283#pullrequestreview-1386816102.
Follow-up to 1a127aa02b.
2023-04-16 20:31:33 +02:00
Frantisek Sumsal
1a127aa02b docs: a couple of typo fixes & formatting tweaks 2023-04-15 13:12:43 +02:00
Yu Watanabe
5cf69e709e os-util: make $SYSTEMD_OS_RELEASE prefixed with the root directory
To make it consistent with other env vars, e.g. $SYSTEMD_ESP_PATH or
$SYSTEMD_XBOOTLDR_PATH.

This is useful when the root is specified by a file descriptor, instead
of a path.
2023-04-11 18:49:23 +09:00
Zbigniew Jędrzejewski-Szmek
1e094cb4ba
Merge pull request #27126 from yuwata/journal-compress
sd-journal: allow to specify compression algorithm through env
2023-04-07 09:28:27 +02:00
maanyagoenka
1f4f166690 confext: documentation and man page updates for confext 2023-04-05 21:50:04 +00:00
Yu Watanabe
1f06ea747b sd-journal: allow to specify compression algorithm through env
Fixes RHBZ#2183546 (https://bugzilla.redhat.com/show_bug.cgi?id=2183546).

Previously, journal file is always compressed with the default algorithm
set at compile time. So, if a newer algorithm is used, journal files
cannot be read by older version of journalctl that does not support the
algorithm.

Co-authored-by: Colin Walters <walters@verbum.org>
2023-04-04 18:32:12 +09:00
Ludwig Nussel
6fb595bc2f docs: fix coredump legacy example 2023-03-31 11:47:17 +02:00
Lennart Poettering
b6bd98ebd5 docs: add a document with an overview over systemd's coredump handling 2023-03-30 16:11:26 +02:00
Daan De Meyer
65e179a1e7 tmpfiles: Try to take a BSD lock on files as well
Similar to what we do for directories, just before we remove a file,
let's try to take a BSD lock on it. If that fails, skip removing the
file.
2023-03-30 11:45:05 +02:00
Daan De Meyer
94c9855a18 mkosi: Update to latest
- Drop Netdev= as it was removed in mkosi
- Always install python-psutil in the final image (required for networkd tests)
- Always Install python-pytest in the final image (required for ukify tests)
- Use the narrow glob for all centos python packages
- Drop the networkd mkosi config files (the default image can be used instead)
- Use ".conf" as the mkosi config file suffix everywhere
- Copy src/ to /root/src in the final image and set gdb substitute path in
  .gdbinit to make gdb work properly
2023-03-29 13:27:19 +02:00
Luca Boccassi
e8114a4f86 portable: add PORTABLE_NAME_AND_VERSION= and other metadata to LogsExtraFields=
This is useful to identify log messages with metadata from the images
they run on. Look for ID/VERSION_ID/IMAGE_ID/IMAGE_VERSION/BUILD_ID,
with a SYSEXT_ prefix if we are looking at an extension, and append via
LogExtraFields= as respectively PORTABLE_NAME_AND_VERSION= in case of a
single image. In case of extensions, append as PORTABLE_ROOT_NAME_AND_VERSION=
for the base and one PORTABLE_EXTENSION_AND_VERSION= for each extension.

Example with a base and two extensions, with the unit coming from the
first extension:

[Service]
RootImage=/home/bluca/git/systemd/base.raw
Environment=PORTABLE=app0.raw
BindReadOnlyPaths=/etc/os-release:/run/host/os-release
LogExtraFields=PORTABLE=app0.raw
Environment=PORTABLE_ROOT=base.raw
LogExtraFields=PORTABLE_ROOT=base.raw
LogExtraFields=PORTABLE_ROOT_NAME_AND_VERSION=debian_10

ExtensionImages=/home/bluca/git/systemd/app0.raw
LogExtraFields=PORTABLE_EXTENSION=app0.raw
LogExtraFields=PORTABLE_EXTENSION_NAME_AND_VERSION=app_0

ExtensionImages=/home/bluca/git/systemd/app1.raw
LogExtraFields=PORTABLE_EXTENSION=app1.raw
LogExtraFields=PORTABLE_EXTENSION_NAME_AND_VERSION=app_1
2023-03-28 12:14:21 +01:00
Luca Boccassi
8c8331fc50 portable: include base and extension images in log fields
When a portable service uses extensions, we use the 'main' image name
(the one where the unit was found in) as PORTABLE=. It is useful to
also list all the images actually used at runtime, as they might
contain libraries and so on.

Use PORTABLE_ROOT= for the image/directory that is used as RootImage=
or RootDirectory=, and PORTABLE_EXTENSION= for the image/directory that
is used as ExtensionImages= or ExtensionDirectories=.

Note that these new fields are only added if extensions are used,
there's no change for single-DDI portables.

Example with a base and two extensions, with the unit coming from the
first extension:

[Service]
RootImage=/home/bluca/git/systemd/base.raw
Environment=PORTABLE=app0.raw
BindReadOnlyPaths=/etc/os-release:/run/host/os-release
LogExtraFields=PORTABLE=app0.raw
LogExtraFields=PORTABLE_ROOT=base.raw

ExtensionImages=/home/bluca/git/systemd/app0.raw
LogExtraFields=PORTABLE_EXTENSION=app0.raw

ExtensionImages=/home/bluca/git/systemd/app1.raw
LogExtraFields=PORTABLE_EXTENSION=app1.raw
2023-03-28 10:36:01 +01:00
Frantisek Sumsal
13bf321610 docs: s/authorized_key/authorized_keys/ 2023-03-24 16:16:50 +01:00