1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

955 Commits

Author SHA1 Message Date
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