Commit Graph

64508 Commits

Author SHA1 Message Date
Daan De Meyer
fecbce1fc6 sulogin: Read SYSTEMD_SULOGIN_FORCE from kernel cmdline
This allows setting it on the kernel cmdline and having it work
automatically without having to write any dropins or such.

Also enable the option in mkosi so that we can debug the initrd
properly with a locked root account.
2023-05-13 09:16:55 +02:00
Luca Boccassi
27cead47be Merge pull request #27633 from DaanDeMeyer/repart-dropin
repart: Make sure we look up dropin files in the root directory
2023-05-12 21:29:38 +01:00
Daan De Meyer
f0ad3e6b96 units: Add missing dependencies on initrd-switch-root.target
These are all services that valid to be run in the initrd, so let's
make sure they have the appropriate dependencies on
initrd-switch-root.target so that they are stopped when we're about
to switch root.
2023-05-13 02:14:02 +08:00
drosdeck
e71254edb0 Fix Positivo CF40CM-V2 key toggle touchpad 2023-05-13 03:13:24 +09:00
Daan De Meyer
34f2fd5096 repart: Make sure we look up dropin files in the root directory 2023-05-12 17:52:47 +02:00
Daan De Meyer
947f59ba2b conf-parser: Add root argument to config_parse_many() 2023-05-12 17:52:32 +02:00
Frantisek Sumsal
e8dba80626 core: fix memory leak during deserialization
when activation-details-unit-name is encountered multiple times.

Resolves: #27623
2023-05-13 00:42:25 +09:00
Daan De Meyer
9b05a3715b repart: Make sure r is declared last 2023-05-12 17:38:00 +02:00
Daan De Meyer
4b047310f6 repart: Read arguments directly instead of passing them in 2023-05-12 17:38:00 +02:00
Daan De Meyer
104afc7300 mkosi: Use zstd compression on non-centos distros
Just because centos doesn't support it doesn't mean we can't use it
on the other distros.
2023-05-12 11:38:02 +02:00
Daan De Meyer
39886236e8 mkosi: Update .gitignore to account for changed output locations 2023-05-12 11:38:02 +02:00
Daan De Meyer
33ad6163ba mkosi: Only build initrd if Bootable= is enabled or set to "auto"
With this change, Bootable= can be set to "no" for a faster build
intended for booting in systemd-nspawn but not qemu.
2023-05-12 11:38:02 +02:00
Daan De Meyer
a84cc71e7a mkosi: Use initrd symlink without format/compression
This way, we can change the compression (and even the output format)
in the future without having to modify the final preset.
2023-05-12 11:38:02 +02:00
Daan De Meyer
059c961135 mkosi: Update to latest 2023-05-12 11:38:02 +02:00
Daan De Meyer
153d5dfd87 core: Try to initialize TERM from systemd.tty.term.console as well
We already have the systemd.tty.xxx kernel cmdline arguments for
configuring tty's for services, let's make sure the term cmdline
argument applies to pid1 as well.
2023-05-12 08:38:20 +02:00
Daan De Meyer
32b0be0eb8 Merge pull request #27565 from yuwata/static-destruct
static-destruct: support clearing array on exit
2023-05-12 08:36:43 +02:00
Daan De Meyer
2bc161dddb mkfs-util: Add quiet argument to make_filesystem()
We default to quiet operation everywhere except for repart, where
we disable quiet and have the mkfs tools write to stdout.

We also make sure --quiet or equivalent is implemented for all mkfs
tools.
2023-05-12 07:51:50 +02:00
Daan De Meyer
aaa27e2e21 core: Check if any init exists before switching root
If we switch root and can't execute an init program afterwards, we're
completely stuck as we can't go back to the initramfs to start
emergency.service as it will have been completely removed by the switch
root operation.

To prevent leaving users with a completely undebuggable system, let's
at least check before we switch root whether at least one of the init
programs we might want to execute actually exist, and fail early if
none of them exists.
2023-05-12 07:48:50 +02:00
Daan De Meyer
3f92250f4c core: Make sure systemctl exit <X> works outside of a container
When running in a VM, we now support propagating the exit status
via a vsock notify socket, so drop the restrictions on propagating
an exit status when not in a container to make sure this works
properly.
2023-05-12 07:48:29 +02:00
Yu Watanabe
f466e828db Merge pull request #27618 from DaanDeMeyer/fstab-generator
Fstab generator fixes
2023-05-12 04:23:54 +09:00
Yu Watanabe
82c60c939c test-network: add tests for static lease matching with chaddr
Follow-up for 4646cdaa37 (#27313).
2023-05-12 03:07:10 +09:00
Yu Watanabe
db4afb95c2 Merge pull request #27611 from yuwata/core-mount-escape-utf8
core/mount: escape invalid utf8 chars
2023-05-12 01:40:32 +09:00
Daan De Meyer
32fe629abc fstab-generator: Fix log message 2023-05-11 14:44:16 +02:00
Daan De Meyer
338da50141 fstab-generator: Unset kernel cmdline options if empty value is given 2023-05-11 14:44:16 +02:00
Daan De Meyer
200268c6db fstab-generator: Take systemd.verity= into account
Disable verity logic if systemd.verity= switch is disabled.
2023-05-11 14:44:14 +02:00
Frantisek Sumsal
b0582f6b63 cryptenroll: actually allow using multiple "special" strings when wiping
The systemd-cryptenroll man page states:

    Takes a comma separated list of numeric slot indexes, or the special
    strings ..., or any combination of these strings or numeric
    indexes, in which case all slots matching either are wiped.

but we'd allow only one special string at any given time as the value
was not ORed when assigning. So, for example, --wipe=recovery,password
would actually become --wipe=password, etc.
2023-05-11 13:12:08 +01:00
Daan De Meyer
885b5cabe2 Merge pull request #27610 from DaanDeMeyer/mkosi-trivial
mkosi: Trivial fixes
2023-05-11 14:04:34 +02:00
Yu Watanabe
4804da5853 core/mount: escape invalid UTF8 char in dbus reply
When What= or Options= may contain invalid UTF8 chars.

Replaces aaf7b0e411 (#27541).
2023-05-11 19:25:38 +09:00
Yu Watanabe
bcf58ff559 Revert "core/mount: replace invalid UTF-8 code points in "what" and "options""
This reverts commit aaf7b0e411.

Not only /proc/mountinfo, .mount units not started yet may contain
invalid UTF-8 chars.
2023-05-11 19:24:42 +09:00
Daan De Meyer
1d07c3de79 mkosi: Install apt in Debian/Ubuntu images 2023-05-11 12:18:50 +02:00
Daan De Meyer
93a948865c mkosi: Run in debug mode
Let's make sure we log more of what mkosi's doing so we can debug
issues better. Note this also makes mkosi set SYSTEMD_LOG_LEVEL=debug
when running programs so we'll get all the systemd debug logging as
well.
2023-05-11 12:18:50 +02:00
Daan De Meyer
fef33f9498 mkosi: Disable pamconfdir
Let's use the distro's pam config instead of installing the systemd one.
2023-05-11 12:18:50 +02:00
Daan De Meyer
b811b9addf mkosi: Add back accidentally removed .gdbinit file 2023-05-11 12:18:50 +02:00
Daan De Meyer
94fe8c87c7 mkosi: Enable systemd-timesyncd by default 2023-05-11 12:18:50 +02:00
Daan De Meyer
949e1fdd52 mkosi: Disable auditd in the preset instead of masking it 2023-05-11 12:18:50 +02:00
Daan De Meyer
4f7582bc0b mkosi: Disable dnf-makecache.service by default 2023-05-11 12:18:50 +02:00
Daan De Meyer
b959570012 mkosi: Make sure we use systemd-networkd-wait-online
Disable the NetworkManager one and pull in the networkd one explicitly.
2023-05-11 12:18:50 +02:00
Daan De Meyer
4decc7a514 mkosi: Replace root password setting with a credential 2023-05-11 12:18:50 +02:00
Daan De Meyer
db7a46ed5f mkosi: Disable create-log-dirs option
We run the build as a regular user and create-log-dirs requires to
run as root so let's disable the option to avoid error noise during
the install phase.
2023-05-11 12:16:47 +02:00
Daan De Meyer
3e9dd3cde0 mkosi: Stop creating test users in prepare scripts
This was added for opensuse to make the tests pass but doesn't seem
to be needed anymore after recent changes so let's drop it.
2023-05-11 12:16:47 +02:00
Daan De Meyer
4bfcb6ba27 mkosi: Don't run slow tests by default
Instead, allow enabling it via an environment variable and do so
in CI.
2023-05-11 12:16:47 +02:00
Luca Boccassi
fcb4ba6c14 Merge pull request #27539 from esposem/ukify_pesign
ukify: support pesign as alternative to sbsign
2023-05-11 10:45:59 +01:00
Yu Watanabe
d698679112 Merge pull request #27596 from yuwata/drop-pure
drop two more inappropriate _pure_ attributes and several cleanups
2023-05-11 16:49:40 +09:00
Yu Watanabe
531a6233d1 Merge pull request #27603 from mrc0mmand/more-test-shenanigans
test: merge PID1-related tests into TEST-07-PID1
2023-05-11 16:48:13 +09:00
dependabot[bot]
43a221473c build(deps): bump actions/checkout from 3.3.0 to 3.5.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](ac59398561...8e5e7e5ab8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 09:34:08 +02:00
dependabot[bot]
93b2175a87 build(deps): bump meson from 1.0.1 to 1.1.0 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.0.1...1.1.0)

---
updated-dependencies:
- dependency-name: meson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 09:33:21 +02:00
dependabot[bot]
c07aa178b3 build(deps): bump actions/upload-artifact from 3.1.1 to 3.1.2
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3.1.1...0b7f8abb1508181956e8e162db84b466c27e18ce)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 09:31:55 +02:00
dependabot[bot]
6a3ba07bfb build(deps): bump github/super-linter from 4.10.1 to 5.0.0
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.10.1 to 5.0.0.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](454ba4482c...45fc0d8828)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 09:31:22 +02:00
dependabot[bot]
882235d581 build(deps): bump actions/github-script from 6.4.0 to 6.4.1
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.0 to 6.4.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](98814c53be...d7906e4ad0)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-11 09:30:48 +02:00
Frantisek Sumsal
15bbc0c107 test: abstract the common test parts into a utility script
Also, instead of bailing out on the first failed subtest, always run all
subtests and print a summary at the end (with an appropriate exit code).
2023-05-10 21:26:26 +02:00