1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-15 05:57:26 +03:00

63698 Commits

Author SHA1 Message Date
Kai Lueke
1e07c6f31d man/systemd-dissect.xml: Remove old sysext path, add confext path
The /usr/lib/extensions/ location for systemd-sysext images is not
supported anymore. In https://github.com/systemd/systemd/pull/26013
systemd-confext images got introduced and we can list its path under
/usr instead.
2023-04-06 20:46:43 +09:00
Luca Boccassi
d7805ff711
Merge pull request #26013 from goenkam/maanya/syscfg-feature
confext: extension of sysext
2023-04-06 10:59:18 +01:00
Daan De Meyer
b24bfd6ee4 repart: Add more logging 2023-04-06 09:45:46 +02:00
maanyagoenka
bbcc658e35 confext: shell completion for systemd-confext 2023-04-05 21:50:04 +00:00
maanyagoenka
1f4f166690 confext: documentation and man page updates for confext 2023-04-05 21:50:04 +00:00
maanyagoenka
f7700ea599 test-os-util: add tests for sysext and confext release files 2023-04-05 21:50:04 +00:00
maanyagoenka
c3c6a4f0a9 confext: add tests for systemd-confext 2023-04-05 21:50:04 +00:00
maanyagoenka
1f839f48e0 confext: add the systemd-confext.service file 2023-04-05 21:50:04 +00:00
maanyagoenka
4da1df42ac confext: add multi call functionality to sysext
The confext concept is an extension of the existing sysext concept and
allows to extend the host's filesystem or a unit's filesystem with signed
images that add new files to the /etc/ directory using OverlayFS.
2023-04-05 21:50:04 +00:00
maanyagoenka
30dfe035eb extension-release: establish compatibility between host file and extension-release file
The release file that accompanies the confext images needs to be
host compatible to be able to be merged into the host /etc/ directory.
This commit checks for version compatibility between the image file and
the host file.
2023-04-05 21:50:04 +00:00
maanyagoenka
b60e0f5777 os-util: add a new confext image type and the ability to parse their release files
Adds a new image type called IMAGE_CONFEXT which is similar to IMAGE_SYSEXT but works
for the /etc/ directory instead of /usr/ and /opt/. This commit also adds the ability to
parse the release file that is present with the confext image in /etc/confext-release.d/
directory.
2023-04-05 21:50:04 +00:00
Luca Boccassi
7393530f22
Merge pull request #27154 from DaanDeMeyer/kconfig
mkosi kernel build updates
2023-04-05 19:59:24 +01:00
Franck Bui
f9a23d428a test: use kbd-mode-map we ship in TEST-73-LOCALE
The rational is the same as the one described in commit
be0cc2ce6c947aafadb3f42dba405269f670b31c.
2023-04-05 19:58:57 +01:00
Yu Watanabe
70650ae345 test: add tests for dir_fd_is_root_or_cwd()
Follow-up for e212f422796da9e626030289faf083407c8955df.
2023-04-05 19:38:08 +01:00
Daan De Meyer
85a319b65c mkosi: Update bundled kconfig
- Remove useless serial console configs
- Add CONFIG_SERIAL_8250_PCI so that qemu's virtconsole works properly
- Add CONFIG_DMI and CONFIG_DMI_SYSFS so that SMBIOS credentials work
- Add CONFIG_IKCONFIG and CONFIG_IKCONFIG_PROC so we can read the
  current kernel config from /proc/config.gz
- Add CONFIG_IOSCHED_BFQ to get rid of a udev error on boot on Fedora
- Add CONFIG_HW_RANDOM_VIRTIO to get hw rng in qemu
- Add CONFIG_SECURITY_YAMA to get rid of warning from sysctl on boot
- Add CONFIG_VSOCKETS and CONFIG_VIRTIO_VSOCKETS to enable vsock support
2023-04-05 17:19:24 +02:00
Daan De Meyer
74f2a3ae0d mkosi: Make sure we always boot our built from source kernel
If we build a kernel from source, let's make sure it's always booted
by giving it a very high version number.
2023-04-05 16:20:28 +02:00
Ronan Pigott
cad0fc7a13 resolve: refuse mdns scope for ipv4 broadcast addresses
This query can never be answered, so let's no wait for it to timeout.
2023-04-05 13:27:16 +02:00
Zbigniew Jędrzejewski-Szmek
effd05626d
Merge pull request #27143 from bluca/no_tpm
cryptsetup: fix build without TPM2
2023-04-05 11:24:18 +02:00
Daan De Meyer
89c8328fc9 Revert "mkosi: Drop python-docutils"
This reverts commit be266f49d6b7e3f021e2a07f937d39d1f14a283d.

Turns out we installed this because it's required by the bpf selftests
so let's keep it intact.
2023-04-05 11:00:52 +02:00
Lennart Poettering
aa7c4dd66e service: use newdup() where appropriate 2023-04-05 15:25:36 +09:00
Yu Watanabe
78ebf8bfb6
Merge pull request #27137 from yuwata/id128-get-machine
sd-id128: introduce id128_get_machine() and _at()
2023-04-05 15:24:45 +09:00
Zbigniew Jędrzejewski-Szmek
51214cf491 various: simplify calls to parse_boolean_argument()
parse_boolean_argument() returns the same information via both the output
argument and normal return.
2023-04-05 13:06:26 +08:00
Luca Boccassi
b7b48b389c ci: do one build with no tpm/p11kit/fido2
We have some missing coverage in the CI, all builds enable these features,
but there are often changes and they cover a lot of code. Do one build
without them to ensure we don't break builds.
2023-04-04 22:38:08 +01:00
Luca Boccassi
4255980887 cryptsetup: fix build without TPM2
Follow-up for acbb504eaf1be51572b1c0d0d490ac478bc41c64
2023-04-04 22:35:04 +01:00
William Roberts
96181b7a89 tpm2: fix nits from PR #26185
Fixes:
  - Comment style
  - Alignment style
  - cleanup macro usage
  - incorrect error message[1]

1. Thanks to tempusfugit991@gmail.com for pointing out the error
message mistake.

Signed-off-by: William Roberts <william.c.roberts@intel.com>
2023-04-04 20:41:11 +01:00
Thomas Blume
d6d0661631 test/test-functions: fix typo in install_suse_systemd() 2023-04-04 20:39:11 +01:00
Lennart Poettering
45ed795f41 update TODO
As it turns out RuntimeDirectoryPreserve= already supports such a mode.
2023-04-04 21:29:22 +02:00
Lennart Poettering
d657a4d8b1 update TODO 2023-04-04 21:29:22 +02:00
Lennart Poettering
e43911a78e execute: add one more assert() 2023-04-04 21:29:22 +02:00
Zbigniew Jędrzejewski-Szmek
9f27df2938
Merge pull request #27128 from keszybz/sd-bus-docs-and-error-messages
Improvements to man pages for systemd.service, sd-bus, and better error messages
2023-04-04 21:28:15 +02:00
Yu Watanabe
bc729e81f2 man: mention -o option for systemd-journal-remote 2023-04-04 19:52:04 +01:00
Yu Watanabe
a9f48db5f6 machine-id-setup: do not read host's machine ID when root directory is specified
If a root directory is specified, and e.g. /var under the root directory
is a symlink to the host's /var, then we wrongly read host's machine ID,
even if O_NOFOLLOW is set.

Let's chase the path with CHASE_NOFOLLOW to refuse such case.

Also, refuse null ID, otherwise we may setup machine ID with NULL.
2023-04-05 00:52:56 +09:00
Yu Watanabe
c1d74108a0 machine-id-setup: use id128_get_machine() at one more place 2023-04-05 00:52:56 +09:00
Yu Watanabe
f7b5f39934 discover-image: use id128_get_machine() at one more place 2023-04-05 00:52:56 +09:00
Yu Watanabe
edd595f760 specifier: always convert missing machine-id file to EUNATCH
Then, use id128_get_machine().
2023-04-05 00:52:56 +09:00
Yu Watanabe
319477f1b6 nspawn: ignore NULL machine ID in the container
Previously, when the NULL (all zero) machine ID is configured in the
container, nspawn refused to execute.

Now id128_get_machine() is used, so NULL machine ID is refused with
-ENOMEDIUM, and fallback to specified UUID or randomly generated one.
2023-04-05 00:52:56 +09:00
Yu Watanabe
5ee37b703e repart: use id128_get_machine()
This also makes that the seed is actually randomized when the read
machine ID is NULL.
2023-04-05 00:52:56 +09:00
Yu Watanabe
1adbc2a428 test: add tests for id128_get_machine() and _at() 2023-04-05 00:52:56 +09:00
Yu Watanabe
64c8c1bf1c sd-id128: introduce id128_get_machine() and id128_get_machine_at() 2023-04-05 00:52:56 +09:00
Yu Watanabe
e212f42279 fd-util: introduce dir_fd_is_root_or_cwd() 2023-04-05 00:52:56 +09:00
Yu Watanabe
99e6d7941b test: add tests for ID128_REFUSE_NULL 2023-04-05 00:52:56 +09:00
Yu Watanabe
52673ef848 sd-id128: introduce ID128_REFUSE_NULL flag 2023-04-05 00:52:56 +09:00
Lennart Poettering
51339a9aeb service: minor modernizations 2023-04-04 22:34:18 +08:00
Zbigniew Jędrzejewski-Szmek
45f540a297 manager: remove transient unit directory during startup
I was testing transient units and user@.service crashed. I restarted it, and
tried to create a transient unit. It failed because
/run/user/1000/systemd/transient/ remained after the previous aborted run:
  Failed to start transient service unit: Unit run-u0.service was already loaded or has a fragment file.

Remove the directory during initial startup so we don't get confused by our own
files.
2023-04-04 22:33:20 +08:00
Zbigniew Jędrzejewski-Szmek
91053fc94e sd-bus: use macros for standard bus error names consistently
Also add definitions for a few names that didn't have them and update
the list in the man page.
2023-04-04 15:18:00 +02:00
Zbigniew Jędrzejewski-Szmek
44d82df46e core: a more informative error when SetProperties/StartTransientUnit fails
I was changing how some properties are appended to the StartTransientUnit call
and messed up the message contents. When something is wrong with how the
message is structed, we would return a very generic
"Failed to start transient service unit: No such device or address".

Mention that it was property setting that failed, and translate ENXIO to a
different message. bus_unit_set_properties() or any of the children it calls
may also return other errors, in particular EBADMSG or ENOMEM, but the error
message that is generated for those is understandable, so we don't need to
"translate" them explicitly.

bus_unit_set_properties() is called from two places, so it seems nicer to
generate the message internally, rather than ask the caller to do that. Also,
now bus_unit_set_properties() always sets <error>, which is nicer for the
callers.
2023-04-04 15:18:00 +02:00
Zbigniew Jędrzejewski-Szmek
6db00b5de1 man/sd_bus_message_open_container: mention two common errors 2023-04-04 15:18:00 +02:00
Zbigniew Jędrzejewski-Szmek
4d7ae2557b man/systemd.service: add example for char prefixes
The prefixes can be specified for any part of the command. The docs imply this,
but it's not entirely obvious. Let's add an example.
2023-04-04 15:18:00 +02:00
Zbigniew Jędrzejewski-Szmek
8202c01701 man: move description of command line substitution out of ExecStart=
The description was split — part was under ExecStart= and part in "Command lines".
Now the whole generic part is moved to the separate section, and under ExecStart=
only the stuff that is specific to that option is described.

This just moves the text and removes some repetitions.
2023-04-04 15:18:00 +02:00
Zbigniew Jędrzejewski-Szmek
3ff67ec43a core: unify two similar paths, avoid formatting of unused string
After 'if (DEBUG_LOGGING)' is added, the two call sites are almost identical,
except that we forgot LOG_UNIT_INVOCATION_ID(unit).

I removed the handling of the log_oom(). It's a debug message only after all,
and it's unlikely to fail.
2023-04-04 15:18:00 +02:00