Commit graph

71914 commits

Author SHA1 Message Date
Lennart Poettering ad60cdd050 manager: clean up audit/plymouth code a bit
Let's add assert()s, and let's put checks in similar order to emphasize
the symmetry. Also let's do cheap checks first.
2024-03-14 17:23:06 +01:00
Lennart Poettering e516c4d286 machine-id-setup: inform supervisor about chosen machine ID
Similar as the previous commit, it's useful for a supervisor to know
what machine ID we settlted on, in particular as various other things
are deterministically derived from it, for example MAC addresses and
such.
2024-03-14 17:23:02 +01:00
Lennart Poettering 2f3b55c4f1 hostname-setup: send chosen hostname to supervisor via sd_notify()
once we decided on a hostname, let's tell the supervisor about it. This
is useful for example in order to recognize the system via mDNS/LLMNR or
in a DHCP lease.
2024-03-14 17:22:58 +01:00
Lennart Poettering 5a515940e9 hostname-setup: various modernizations 2024-03-14 17:22:54 +01:00
Lennart Poettering 37d15cd132 manager: make manager_send_ready() more symmetric regarding per-user/per-service scope
Always check the scope explicitly, always assert(m), and name the two
functions in a symmetric way.
2024-03-14 17:22:49 +01:00
Lennart Poettering fb44dc646b core: normalize how we issue sd_notify() from PID 1
Always cast to (void) if we ignore the return value.

Always pass the first arg as boolean.

Always prefix the first arg with /* unset_environment= */.
2024-03-14 17:20:46 +01:00
Yu Watanabe 6b67cf808a json: introduce json_dispatch_int8() and json_dispatch_uint8() 2024-03-14 23:56:44 +08:00
Yu Watanabe d30d44883f stat-util: expose fd_is_read_only_fs()
Currently it is not used, but the fucntion is already quite generic and
useful.
2024-03-14 23:45:27 +08:00
Piotr Drąg 2c75cb8b51 po: add pkg/debian to POTFILES.skip
Debian packaging includes the exploded tarball, so scripts used to
detect files that should be in POTFILES.in, like intltool-update -m
used on https://l10n.gnome.org/module/systemd/, falsely detect its
files as needed to be translated. Avoid this behavior by putting
the whole submodule in POTFILES.skip.
2024-03-14 13:41:56 +00:00
Mike Yuan cd804013a6 shell-completion: add systemd-cat --namespace=
Follow-up for 45bcab66a9

Addresses https://github.com/systemd/systemd/pull/31754#discussion_r1524715062
2024-03-14 13:07:19 +00:00
Yu Watanabe cdafb51ab4
Merge pull request #31754 from YHNdnzj/journal-fd-namespace
journal/cat: allow connecting output to specific journal namespace
2024-03-14 19:59:19 +09:00
Zbigniew Jędrzejewski-Szmek a954b427e9 src/partition: remove unnecessary uses of "make sure" 2024-03-14 11:15:55 +01:00
Zbigniew Jędrzejewski-Szmek 25e98e331d units: retitle systemd-bootctl*.{service,socket}
"Starting Boot Control…" would be a fairly confusing message in the boot logs.
Use "… Service" to mirror what we have in other services like
systemd-{hostnamed,timedated,portabled,machined,…}.service.
2024-03-14 11:15:55 +01:00
Zbigniew Jędrzejewski-Szmek 3986aa6d08 units: drop "(Varlink)"
We generally don't specify the protocol implementation in unit descriptions.

For journald, we have:
  $ git grep Description 'units/*journald*'
  units/systemd-journald-audit.socket:Description=Journal Audit Socket
  units/systemd-journald-dev-log.socket:Description=Journal Socket (/dev/log)
  units/systemd-journald-varlink@.socket:Description=Journal Varlink Socket for Namespace %i
  units/systemd-journald.service.in:Description=Journal Service
  units/systemd-journald.socket:Description=Journal Sockets
  units/systemd-journald@.service.in:Description=Journal Service for Namespace %i
  units/systemd-journald@.socket:Description=Journal Sockets for Namespace %i
so we need to keep "Varlink" in the name. But also use "Sockets" (plural)
for the "main" socket unit, since it opens multiple sockets.
2024-03-14 11:14:10 +01:00
Lennart Poettering 7b14f85cd8 man: shorten unnecessarily long example 2024-03-14 11:05:04 +01:00
Lennart Poettering 837eda0522
Merge pull request #31770 from poettering/linkat-replace
introduce linkat_replace() helper, and port various things over to it
2024-03-14 11:03:59 +01:00
Zbigniew Jędrzejewski-Szmek 4fd9ed3e41 units/systemd-machine-id-commit: retitle
Our docs say that the Description should be capitalized.
Also, change "commit" to "save" to make this more accessible.
2024-03-14 10:26:45 +01:00
Zbigniew Jędrzejewski-Szmek 3719dcb0bc units: retitle systemd-pcrextend.{service,socket}, change TPM2→TPM
I was looking at the logs in some bug and saw this:

Mar 13 15:55:12 fedora systemd[1]: systemd-pcrmachine.service - TPM2 PCR Machine ID Measurement was skipped because of an unmet condition check (ConditionSecurity=measured-uki).
Mar 13 15:55:12 fedora systemd[1]: Starting systemd-remount-fs.service - Remount Root and Kernel File Systems...
Mar 13 15:55:12 fedora systemd[1]: systemd-tpm2-setup-early.service - TPM2 SRK Setup (Early) was skipped because of an unmet condition check (ConditionSecurity=measured-uki).

This is overly technical, for most units we don't provide this level of
detail about the implementation. So retitle the units to be more accessible.

Also, the fact that it's a v. 2 of the TPM is not that important. We don't
support TPM 1.2, but computers without TPM v2 are getting rare. For other
units we don't advertise the version of hardware, and let's not do this here,
to reduce some complexity.
2024-03-14 10:26:45 +01:00
Yu Watanabe af02814a85 ptyfwd: fix typo
Follow-up for d0aa368c85.
2024-03-14 17:40:26 +09:00
Yu Watanabe fcaa510597 TODO: fix typo
Follow-up for 54b0e05ed0.
2024-03-14 17:39:12 +09:00
Yu Watanabe f03caa0d3e stat-util: fix typo
Follow-up for 7cff2b79f0.
2024-03-14 17:37:50 +09:00
Lennart Poettering 5655e5c955 creds-util: port make_credential_host_secret() over to link_tmpfile_at()
Let's simplify things by just reusing the primitives we already have.
2024-03-14 09:22:09 +01:00
Lennart Poettering ccec206498 tmpfile-util: port link_tmpfile_at() over to linkat_replace() 2024-03-14 09:22:09 +01:00
Lennart Poettering 1f27e7b724 fs-util: add new helper linkat_replace() 2024-03-14 09:22:09 +01:00
Lennart Poettering 0b8e36f064 fs-util: move link_fd() from tmpfile-util.c into generic fs-util.c
It's a generically useful call, let's move it so that we can use it at
more places.
2024-03-14 09:17:46 +01:00
Lennart Poettering dd92ba8a7a path-util: add helper that checks if a path definitely refers to a dir 2024-03-14 09:17:46 +01:00
Zbigniew Jędrzejewski-Szmek 478dc50266
Merge pull request #31771 from keszybz/meson-make-partial-builds-great-again
Meson make partial builds work again
2024-03-14 08:23:04 +01:00
Mike Yuan 45bcab66a9
journal/cat: allow connecting output to specific journal namespace 2024-03-14 14:25:53 +08:00
Mike Yuan d4923a13b7
units: make systemd-journald@.socket installable 2024-03-14 14:25:52 +08:00
Mike Yuan 32104d3251
sd-journal: introduce sd_journal_stream_fd_with_namespace 2024-03-14 14:25:52 +08:00
Mike Yuan 2a11593178
journal-send: introduce journal_stream_path helper 2024-03-14 14:25:52 +08:00
Mike Yuan baaca3db6a
path-util: introduce skip_leading_slash and use it where appropriate 2024-03-14 14:25:52 +08:00
Luca Boccassi 823ef2675d
Merge pull request #31761 from CodethinkLabs/vmspawn/bug_fixes
vmspawn: fix two minor bugs
2024-03-13 23:37:50 +00:00
Mike Yuan 1ea275f119 core/cgroup: introduce MemoryZSwapWriteback setting
Added in
501a06fe8e
2024-03-13 23:36:25 +00:00
Daan De Meyer 49fc22f46c
Merge pull request #31758 from DaanDeMeyer/kvm
mkosi: Enable KVM
2024-03-14 00:16:43 +01:00
Luca Boccassi 8e35076101
Merge pull request #31584 from yuwata/sd-ndisc-option-parser-cleanups
sd-ndisc: rewrite option parser
2024-03-13 23:06:50 +00:00
Daan De Meyer e399efea79 mkosi: Enable KVM
Since https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/,
it seems that KVM is supported on GA runners, so let's explicitly
enable it to make sure it is used.

We update mkosi to latest and set QemuFirmware=uefi to disable
secure boot which crashes qemu until https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2038777
is fixed.
2024-03-13 23:45:11 +01:00
Daan De Meyer d1c29b517a mkosi: Allow booting without secure boot
Don't fail if SecureBoot is not enabled. Instead, only execute
the secure boot related checks if secure boot is actually enabled.
2024-03-13 23:42:34 +01:00
Daan De Meyer d6e8137716 boot: Only use io.systemd.boot.kernel-cmdline-extra for type 1 images
Otherwise the cmdline is duplicated for UKIs.
2024-03-13 23:42:34 +01:00
dependabot[bot] a17ae1f8d5 build(deps): bump github/codeql-action from 3.24.6 to 3.24.7
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.6 to 3.24.7.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](8a470fddaf...3ab4101902)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 23:16:19 +01:00
dependabot[bot] 748b7be948 build(deps): bump pkg/debian from 49132a8 to 5451923
Bumps pkg/debian from `49132a8` to `5451923`.

---
updated-dependencies:
- dependency-name: pkg/debian
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 20:18:08 +01:00
dependabot[bot] e065f1c41b build(deps): bump actions/checkout from 4.1.1 to 4.1.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](b4ffde65f4...9bb56186c3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 20:15:20 +01:00
dependabot[bot] 660efa717c build(deps): bump meson from 1.3.2 to 1.4.0 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 1.3.2 to 1.4.0.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.3.2...1.4.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 19:26:52 +01:00
dependabot[bot] 9daa5b2a96 build(deps): bump softprops/action-gh-release from 1 to 2
Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 1 to 2.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](de2c0eb89a...9d7c94cfd0)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 19:26:03 +01:00
Zbigniew Jędrzejewski-Szmek d5dd917a02 meson: always use vcs_tag
The branch with configure_file() was broken: meson doesn't know that
this file is a prerequisite for other targets, so partial rebuilds were broken.
Easy reproducer:
  git mv .git{,.no}
  touch meson build && ninja -C build src/basic/libbasic.a
  rm build/version.h
  ninja -C build src/basic/libbasic.a

Using vcs_tag() also in that case makes meson always build the file.

(Combined with the issue fixed in previous commit, I was encountering
failed builds quite often.)

Fixes 3f6ce3d4f0.
2024-03-13 18:40:57 +01:00
Zbigniew Jędrzejewski-Szmek 9e11979765 meson: .git can also be a file
With git-worktree, .git is just a file that specifies where
the parent git directory is. All the git information is available
in a git worktree, so it should be treated the same as a checkout
with a .git directory.
2024-03-13 18:37:41 +01:00
Daan De Meyer e307bebc03
Merge pull request #31673 from DaanDeMeyer/mkosi
mkosi: Introduce packaging sources as submodules
2024-03-13 17:48:00 +01:00
Sam Leonard 4364a542e3
vmspawn: fix FD passing logic 2024-03-13 15:32:08 +00:00
Sam Leonard 002243ea64
vmspawn: prefix extra kernel-cmdline-extra with -smbios 2024-03-13 15:31:52 +00:00
Daan De Meyer ffc2773804 units: Bump various oneshot unit timeouts to 90s
In mkosi, we've been having CI failures caused by
systemd-machine-id-commit.service timing out. Let's bump the timeout
for it and systemd-rfkill.service to 90s which we also use for other
oneshot services to avoid transient failures on slower systems.
2024-03-14 00:10:48 +09:00