Commit Graph

67053 Commits

Author SHA1 Message Date
Frantisek Sumsal
05ebcbd5c5 shell-completions: code cleanup 2023-09-04 11:49:26 +02:00
Victor Westerhuis
9dd8858281 userdbd: Order systemd-userdbd.service after systemd-remount-fs.service
Otherwise the root filesystem might still be readonly and
systemd-userdbd fails to start.

Explicitly pick systemd-remount-fs.service instead of local-fs-pre.target
to prevent a dependency cycle.
2023-09-04 09:47:05 +08:00
Luca Boccassi
f7f842f888 mkosi: temporarily disable Arch
The mkosi Arch CI doesn't work as the keyring package is out
of date and cannot be built due to various build toolchain
issues. Disable the job as it always fails and confuses
submitters.
2023-09-03 14:40:24 +01:00
Luca Boccassi
626a9eba09 Merge pull request #28988 from keszybz/sd128-arbitrary-values
Add sd-id128 and systemd-id128 functionality to do "app specific" with any "base"
2023-09-03 14:05:32 +01:00
Luca Boccassi
809eb17134 Merge pull request #28976 from yuwata/network-ndisc-drop-on-zero-lifetime
network/ndisc: also drop configurations with infinite lifetime on RA …
2023-09-03 14:04:58 +01:00
Luca Boccassi
4b246347ba Merge pull request #28963 from YHNdnzj/loginctl-table
loginctl: use vertical table for {user,session,seat}-status
2023-09-03 14:04:24 +01:00
Mike Yuan
62f643a34d Merge pull request #28793 from poettering/switch-root-flags-tweak
various switch-root tweaks/fixes
2023-09-03 11:18:18 +08:00
Robby Red
f06bee168b hwdb: Added config for RCA W101SA23T1 (#29041) 2023-09-03 11:17:15 +08:00
dependabot[bot]
475974eb5b build(deps): bump actions/checkout from 3.5.3 to 3.6.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](c85c95e3d7...f43a0e5ff2)

---
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-09-02 19:13:09 +00:00
dependabot[bot]
c5de4ee02b build(deps): bump meson from 1.2.0 to 1.2.1 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.2.0...1.2.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-02 19:12:43 +00:00
dependabot[bot]
3bb5656ff1 build(deps): bump github/codeql-action from 2.21.2 to 2.21.5
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.21.2 to 2.21.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0ba4244466...00e563ead9)

---
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>
2023-09-02 19:12:34 +00:00
Mike Yuan
bf366954fa loginctl: use vertical table for {user,session,seat}-status
To make alignment better and more manageable.

Requested in https://github.com/systemd/systemd/pull/27769#discussion_r1203952407
2023-09-02 22:59:57 +08:00
Mike Yuan
00614746e9 string-util: introduce strrepa 2023-09-02 22:59:15 +08:00
Mike Yuan
62efc7629b format-table: use format_timestamp_relative_monotonic 2023-09-02 22:58:00 +08:00
Yu Watanabe
218f3738d8 network/ndisc: drop captive portals with zero lifetime earlier
This also adds a comment about that we use the main lifetime for captive
portals.
2023-09-02 22:25:17 +09:00
Lennart Poettering
c6c5d20de5 Revert "shutdown: do not umount recursively before MS_MOVE"
This reverts commit 6b219b74de.

This commit doesn't look right to me. We have to unmount everything
recursively *before* we MS_MOVE because the MS_MOVE will not get rid of
it for us, and we simply cannot access these mounts after the MS_MOVE is
complete anymore.

This is a fundamental difference between MS_MOVE and pivot_root(). The
latter repivots the entire mount table getting rid of anything outside
of the new root. MS_MOVE otoh just mounts a bunch of mount points to the
top, leaving in place whatever might be underneath it.

Thus, if we go through the MS_MOVE codepath we must unmount everything
explicitly before doing so because otherwise the mounts will be pinned
forever, but be entirely invisble to userspace.
2023-09-02 19:47:58 +08:00
Lennart Poettering
95648f9ed0 switch-root: when pivot_root() fails, but old root shall be mounted, do so
If pivot_root() fails, we'll fall back to switching root via MS_MOVE.
Unlike pivot_root() that won't place the old root fs anyway, but just
hide it. That's problematic during shutdown for example, since after all
we might still want to access it from the exitrd, to disassemble it
properly.

Hence let's make things somewhat systematic: regardless if pivot_root()
or MS_MOVE is used, always make the old root fs show up in the selected
new dir.
2023-09-02 19:47:58 +08:00
Lennart Poettering
c2d62118f7 switch-root: rework SWITCH_ROOT_SKIP_RECURSIVE_RUN flag
Negative flags always raise eyebrows. Let's normalize
SWITCH_ROOT_SKIP_RECURSIVE_RUN to become SWITCH_ROOT_RECURSIVE_RUN, i.e.
make recursive behaviour opt-in, rather than opt-out. We only want it
for the initrd→host transition, and in all other cases we'd prefer to
avoid it.

This allows us to simplify some code. Also, normalize the mount point
table in switch_root() a bit, to be static const, and then just select
between two mount flag sets via SWITCH_ROOT_RECURSIVE_RUN, where the
mount flag without MS_BIND (i.e. zero) just means "skip this entry".

This does not actually change anything in behaviour, it's just
refactoring.

Follow-up for: b12d41a8bb
2023-09-02 19:47:57 +08:00
Zbigniew Jędrzejewski-Szmek
a53dc9b130 Merge pull request #29017 from msizanoen1/fix-onboot-rotate
journal: Relax boot ID and monotonic clock consistency checks
2023-09-02 14:26:44 +03:00
Zbigniew Jędrzejewski-Szmek
698287d7dc Merge pull request #28971 from YHNdnzj/soft-reboot-is-better-switch-root
core,systemctl: use path_is_root & limit switch-root to initrd transitions
2023-09-02 14:22:53 +03:00
Zbigniew Jędrzejewski-Szmek
437e217a48 man: add version information
I'm keeping this as a separate commit. It is the first time version
information is manually added after 6a73a4f7c4
and we might want to revert this later.
2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek
ed856ea15c TODO: add entry about service and socket units 2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek
716126c069 id128: rework conditional to reduce indentation 2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek
fa96afb4c4 sd-id128: do not allow null 'app_id' param
If it is null, we get the 'base' param unchanged:
$ build/systemd-id128 show 00000000000000000000000000000001 \
  --app-specific=00000000000000000000000000000000
00000000000000000000000000000001

This is not good, because it breaks our promise that the base (usually either
machine-id or boot-id) cannot be derived from the result. Some application
using the library could use a null app id, inadvertently exposing the machine
or boot id. (This could happen because of forgotten initialization, or maybe
because the app id is configurable, and the user configures it wrongly.)

Note: the other way the secret is not exposed:
$ build/systemd-id128 show 00000000000000000000000000000000 \
  --app-specific=00000000000000000000000000000002
4f63080959264900b0d88d999dae2d3a

Normally systemd would not allow a null machine-id or boot-id, but we can let
the user do the calculation that if they want to.
2023-09-02 14:17:29 +03:00
Zbigniew Jędrzejewski-Szmek
b37e8184a5 id128: allow combining --app with show
This effectively exposes sd_id128_get_app_specific() on the commandline.

Fixes https://github.com/systemd/systemd/issues/27514.
2023-09-02 14:17:29 +03:00