Commit Graph
63703 Commits
Author SHA1 Message Date
Daan De Meyer af6c5c7025 mkosi: Update to latest
This also migrates the configuration to the new format that was
just merged in mkosi. Specifically, we make use of the new [Match]
sections to only include specific config snippets per distro.
2023-04-07 08:13:42 +09:00
Yu Watanabe 0864b5eb6e Merge pull request #27158 from mrc0mmand/more-tests
test: introduce TEST-81-GENERATORS
2023-04-07 07:53:37 +09:00
Frantisek Sumsal 61961e693d test: check if we skip the full setup on daemon-reexec
A simple test case for issue #27106.

Resolves: #27139
2023-04-07 07:53:14 +09:00
Frantisek Sumsal 17c9dbc98b test: introduce TEST-81-GENERATORS
Add some explicit tests for various generators we ship, e.g.:
    - systemd-debug-generator
    - systemd-environment-d-generator
    - systemd-fstab-generator
2023-04-06 13:16:40 +02: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
Frantisek Sumsal 9948a169c0 test: add a couple of tests for systemd-modules-load 2023-04-06 10:26:47 +02:00
Frantisek Sumsal 006a60e079 fstab-generator: don't propagate ignored errno
With certain fstabs we may propagate ENXIO from the $SYSTEMD_SYSFS_CHECK
check all the way up, making fstab-generator exit with a non-zero EC and
without any helpful message, which is really confusing.
2023-04-06 10:26:47 +02: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
be0cc2ce6c.
2023-04-05 19:58:57 +01:00
Yu Watanabe 70650ae345 test: add tests for dir_fd_is_root_or_cwd()
Follow-up for e212f42279.
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 acbb504eaf
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