]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agosystemd.catalog: freezed -> froze 29070/head
Mike Yuan [Tue, 5 Sep 2023 04:57:28 +0000 (12:57 +0800)] 
systemd.catalog: freezed -> froze

Follow-up for 1dc604d821b6f9519e1961b154ae37baad57dbb1

2 years agosystemctl: drop unnecessary else
Mike Yuan [Tue, 5 Sep 2023 04:55:45 +0000 (12:55 +0800)] 
systemctl: drop unnecessary else

Follow-up for 8a826a979aa51703ec45dbecc34691265b4d04e0

2 years agojournalctl: reset --lines= correctly if no argument
Mike Yuan [Tue, 5 Sep 2023 04:52:28 +0000 (12:52 +0800)] 
journalctl: reset --lines= correctly if no argument

Follow-up for 8d6791d2aa98c989101f572278e9b0a63edfec42

2 years agonetwork: make the build happy on i*86 again
Frantisek Sumsal [Mon, 4 Sep 2023 17:32:22 +0000 (19:32 +0200)] 
network: make the build happy on i*86 again

In file included from ../src/basic/macro.h:455,
                 from ../src/basic/alloc-util.h:10,
                 from ../src/basic/hash-funcs.h:4,
                 from ../src/basic/hashmap.h:8,
                 from ../src/shared/dns-domain.h:10,
                 from ../src/network/networkd-radv.c:9:
../src/network/networkd-radv.c: In function â€˜config_parse_router_home_agent_lifetime’:
../src/network/networkd-radv.c:1626:28: error: format â€˜%lu’ expects argument of type â€˜long unsigned int’, but argument 11 has type â€˜long long unsigned int’ [-Werror=format=]
 1626 |                            "Invalid %s= must be in the range 1...%lu seconds, ignoring: %s", lvalue,
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/basic/log.h:361:125: note: in definition of macro â€˜log_syntax’
  361 |                         ? log_syntax_internal(unit, _level, config_file, config_line, _e, PROJECT_FILE, __LINE__, __func__, __VA_ARGS__) \
      |                                                                                                                             ^~~~~~~~~~~
../src/network/networkd-radv.c:1626:68: note: format string is defined here
 1626 |                            "Invalid %s= must be in the range 1...%lu seconds, ignoring: %s", lvalue,
      |                                                                  ~~^
      |                                                                    |
      |                                                                    long unsigned int
      |                                                                  %llu
cc1: all warnings being treated as errors

Addresses: https://github.com/systemd/systemd/pull/28964#issuecomment-1705550404
Follow-up to 6a6d27bc5b0.

2 years agonetwork: Fix memory leak PREF64 (#29064)
Susant Sahani [Mon, 4 Sep 2023 19:43:56 +0000 (01:13 +0530)] 
network: Fix memory leak PREF64 (#29064)

Follow-up for 6e8f5e4c1f5fcdb3b63343268936f9c269b6a209.

Fixes #29062.

2 years agoman: add version information for functions
Abderrahim Kitouni [Mon, 4 Sep 2023 12:46:35 +0000 (13:46 +0100)] 
man: add version information for functions

2 years agoMerge pull request #29059 from YHNdnzj/catalog-followup 29065/head
Luca Boccassi [Mon, 4 Sep 2023 16:57:19 +0000 (17:57 +0100)] 
Merge pull request #29059 from YHNdnzj/catalog-followup

Follow-ups for recently-added catalogs

2 years agoMerge pull request #29023 from pelaufer/dhcp-prefix-dbus
Yu Watanabe [Mon, 4 Sep 2023 15:16:19 +0000 (00:16 +0900)] 
Merge pull request #29023 from pelaufer/dhcp-prefix-dbus

Add dhcp client prefix lease information to networkd json output

2 years agoMerge pull request #29052 from yuwata/icmp6-util-cleanups
Yu Watanabe [Mon, 4 Sep 2023 15:15:23 +0000 (00:15 +0900)] 
Merge pull request #29052 from yuwata/icmp6-util-cleanups

icmp6-util: several cleanups and fixlets

2 years agocatalog/systemd.catalog: rephrase a bunch of messages 29059/head
Mike Yuan [Mon, 4 Sep 2023 13:31:47 +0000 (21:31 +0800)] 
catalog/systemd.catalog: rephrase a bunch of messages

Follow-up for #28873

2 years agocore/crash-handler: correct indentation
Mike Yuan [Mon, 4 Sep 2023 12:19:53 +0000 (20:19 +0800)] 
core/crash-handler: correct indentation

2 years agosd-messages.h: correct alignment
Mike Yuan [Mon, 4 Sep 2023 12:12:23 +0000 (20:12 +0800)] 
sd-messages.h: correct alignment

2 years agonetwork: ndisc - Allow to parse PREF64 prefix
Susant Sahani [Mon, 28 Aug 2023 18:12:39 +0000 (23:42 +0530)] 
network: ndisc - Allow to parse PREF64 prefix

2 years agonetwork: sd-radv - Allow to configure Mobile IPv6 Home Agent
Susant Sahani [Thu, 24 Aug 2023 18:38:48 +0000 (00:08 +0530)] 
network: sd-radv - Allow to configure Mobile IPv6 Home Agent

2 years agotest: extract dummy icmp6 utils for tests 29052/head
Yu Watanabe [Mon, 4 Sep 2023 08:38:10 +0000 (17:38 +0900)] 
test: extract dummy icmp6 utils for tests

This extracts common implementation of dummy icmp6 utils used by tests.

2 years agoicmp6-util: make icmp6_receive() accept the null source address
Yu Watanabe [Mon, 4 Sep 2023 08:44:45 +0000 (17:44 +0900)] 
icmp6-util: make icmp6_receive() accept the null source address

Fixes #29050.

2 years agoicmp6-util: several cleanups for icmp6_receive()
Yu Watanabe [Mon, 4 Sep 2023 08:00:31 +0000 (17:00 +0900)] 
icmp6-util: several cleanups for icmp6_receive()

- Rename the argument for storing the sender address,
- allow to call it with NULL for ret_xyz,
- reduce needless copy of timestamp when the message does not have
  timestamp.

2 years agoMerge pull request #28896 from pelaufer/dhcp_dbus_notify
Yu Watanabe [Mon, 4 Sep 2023 12:48:43 +0000 (21:48 +0900)] 
Merge pull request #28896 from pelaufer/dhcp_dbus_notify

Add DHCP client state and change notification to networkd dbus interface

2 years agosd-ndisc,sd-radv: fix use of uninitialized value
Yu Watanabe [Mon, 4 Sep 2023 07:51:25 +0000 (16:51 +0900)] 
sd-ndisc,sd-radv: fix use of uninitialized value

When icmp6_receive() fails, then the source address is not initialized yet.

2 years agoMerge pull request #29055 from mrc0mmand/bash-comp
Luca Boccassi [Mon, 4 Sep 2023 10:22:39 +0000 (11:22 +0100)] 
Merge pull request #29055 from mrc0mmand/bash-comp

shell-completions: add missing systemctl verbs/options

2 years agoshell-completions: add missing systemctl verbs/options 29055/head
Frantisek Sumsal [Mon, 4 Sep 2023 09:10:43 +0000 (11:10 +0200)] 
shell-completions: add missing systemctl verbs/options

Resolves: #29048

2 years agoshell-completions: code cleanup
Frantisek Sumsal [Mon, 4 Sep 2023 08:56:18 +0000 (10:56 +0200)] 
shell-completions: code cleanup

2 years agouserdbd: Order systemd-userdbd.service after systemd-remount-fs.service
Victor Westerhuis [Sun, 3 Sep 2023 11:31:46 +0000 (13:31 +0200)] 
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.

2 years agomkosi: temporarily disable Arch
Luca Boccassi [Sun, 3 Sep 2023 13:07:56 +0000 (14:07 +0100)] 
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.

2 years agoMerge pull request #28988 from keszybz/sd128-arbitrary-values
Luca Boccassi [Sun, 3 Sep 2023 13:05:32 +0000 (14:05 +0100)] 
Merge pull request #28988 from keszybz/sd128-arbitrary-values

Add sd-id128 and systemd-id128 functionality to do "app specific" with any "base"

2 years agoMerge pull request #28976 from yuwata/network-ndisc-drop-on-zero-lifetime
Luca Boccassi [Sun, 3 Sep 2023 13:04:58 +0000 (14:04 +0100)] 
Merge pull request #28976 from yuwata/network-ndisc-drop-on-zero-lifetime

network/ndisc: also drop configurations with infinite lifetime on RA …

2 years agoMerge pull request #28963 from YHNdnzj/loginctl-table
Luca Boccassi [Sun, 3 Sep 2023 13:04:24 +0000 (14:04 +0100)] 
Merge pull request #28963 from YHNdnzj/loginctl-table

loginctl: use vertical table for {user,session,seat}-status

2 years agoMerge pull request #28793 from poettering/switch-root-flags-tweak
Mike Yuan [Sun, 3 Sep 2023 03:18:18 +0000 (11:18 +0800)] 
Merge pull request #28793 from poettering/switch-root-flags-tweak

various switch-root tweaks/fixes

2 years agohwdb: Added config for RCA W101SA23T1 (#29041)
Robby Red [Sun, 3 Sep 2023 03:17:15 +0000 (23:17 -0400)] 
hwdb: Added config for RCA W101SA23T1 (#29041)

2 years agoAdding tests for dhcp client and dhcp6 client dbus state interface 28896/head
pelaufer [Sat, 2 Sep 2023 20:53:23 +0000 (14:53 -0600)] 
Adding tests for dhcp client and dhcp6 client dbus state interface

2 years agoAdding dhcp client and dhcp6 client dbus status interface
pelaufer [Sat, 2 Sep 2023 20:52:35 +0000 (14:52 -0600)] 
Adding dhcp client and dhcp6 client dbus status interface

2 years agoAdding dhcp client and dhcp6 client state interface
pelaufer [Sat, 2 Sep 2023 20:51:03 +0000 (14:51 -0600)] 
Adding dhcp client and dhcp6 client state interface

2 years agoAdding dhcp_state_to_string and dhcp client state change logging
pelaufer [Sat, 2 Sep 2023 20:46:47 +0000 (14:46 -0600)] 
Adding dhcp_state_to_string and dhcp client state change logging

2 years agoAdd dhcp client prefix lease information to networkd json output 29023/head
pelaufer [Sat, 2 Sep 2023 18:20:44 +0000 (12:20 -0600)] 
Add dhcp client prefix lease information to networkd json output

2 years agobuild(deps): bump actions/checkout from 3.5.3 to 3.6.0 28997/head
dependabot[bot] [Fri, 1 Sep 2023 09:22:50 +0000 (09:22 +0000)] 
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](https://github.com/actions/checkout/compare/c85c95e3d7251135ab7dc9ce3241c5835cc595a9...f43a0e5ff2bd294095638e18286ca9a3d1956744)

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

Signed-off-by: dependabot[bot] <support@github.com>
2 years agobuild(deps): bump meson from 1.2.0 to 1.2.1 in /.github/workflows
dependabot[bot] [Fri, 1 Sep 2023 09:11:15 +0000 (09:11 +0000)] 
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>
2 years agobuild(deps): bump github/codeql-action from 2.21.2 to 2.21.5
dependabot[bot] [Fri, 1 Sep 2023 09:22:56 +0000 (09:22 +0000)] 
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](https://github.com/github/codeql-action/compare/0ba4244466797eb048eb91a6cd43d5c03ca8bd05...00e563ead9f72a8461b24876bee2d0c2e8bd2ee8)

---
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>
2 years agologinctl: use vertical table for {user,session,seat}-status 28963/head
Mike Yuan [Fri, 23 Jun 2023 14:44:52 +0000 (22:44 +0800)] 
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

2 years agostring-util: introduce strrepa
Mike Yuan [Sat, 26 Aug 2023 09:50:24 +0000 (17:50 +0800)] 
string-util: introduce strrepa

2 years agoformat-table: use format_timestamp_relative_monotonic
Mike Yuan [Wed, 23 Aug 2023 12:29:04 +0000 (20:29 +0800)] 
format-table: use format_timestamp_relative_monotonic

2 years agonetwork/ndisc: drop captive portals with zero lifetime earlier 28976/head
Yu Watanabe [Sat, 2 Sep 2023 05:40:25 +0000 (14:40 +0900)] 
network/ndisc: drop captive portals with zero lifetime earlier

This also adds a comment about that we use the main lifetime for captive
portals.

2 years agoRevert "shutdown: do not umount recursively before MS_MOVE" 28793/head
Lennart Poettering [Fri, 11 Aug 2023 10:15:25 +0000 (12:15 +0200)] 
Revert "shutdown: do not umount recursively before MS_MOVE"

This reverts commit 6b219b74de53729249956221a971047aab7c96e0.

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.

2 years agoswitch-root: when pivot_root() fails, but old root shall be mounted, do so
Lennart Poettering [Fri, 11 Aug 2023 10:10:18 +0000 (12:10 +0200)] 
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.

2 years agoswitch-root: rework SWITCH_ROOT_SKIP_RECURSIVE_RUN flag
Lennart Poettering [Fri, 11 Aug 2023 09:57:16 +0000 (11:57 +0200)] 
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: b12d41a8bb7c99f7d7a1c7821a886d98b42d9ce0

2 years agoMerge pull request #29017 from msizanoen1/fix-onboot-rotate
Zbigniew Jędrzejewski-Szmek [Sat, 2 Sep 2023 11:26:44 +0000 (14:26 +0300)] 
Merge pull request #29017 from msizanoen1/fix-onboot-rotate

journal: Relax boot ID and monotonic clock consistency checks

2 years agoMerge pull request #28971 from YHNdnzj/soft-reboot-is-better-switch-root
Zbigniew Jędrzejewski-Szmek [Sat, 2 Sep 2023 11:22:53 +0000 (14:22 +0300)] 
Merge pull request #28971 from YHNdnzj/soft-reboot-is-better-switch-root

core,systemctl: use path_is_root & limit switch-root to initrd transitions

2 years agoman: add version information 28988/head
Zbigniew Jędrzejewski-Szmek [Tue, 29 Aug 2023 14:23:22 +0000 (17:23 +0300)] 
man: add version information

I'm keeping this as a separate commit. It is the first time version
information is manually added after 6a73a4f7c466887a03c9939300ba6864203b1b3f
and we might want to revert this later.

2 years agoTODO: add entry about service and socket units
Zbigniew Jędrzejewski-Szmek [Tue, 29 Aug 2023 11:50:04 +0000 (14:50 +0300)] 
TODO: add entry about service and socket units

2 years agoid128: rework conditional to reduce indentation
Zbigniew Jędrzejewski-Szmek [Sun, 27 Aug 2023 11:56:32 +0000 (14:56 +0300)] 
id128: rework conditional to reduce indentation

2 years agosd-id128: do not allow null 'app_id' param
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 12:03:14 +0000 (14:03 +0200)] 
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.

2 years agoid128: allow combining --app with show
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 11:39:02 +0000 (13:39 +0200)] 
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.

2 years agovarious: use id128_from_string_not_null()
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 13:13:05 +0000 (15:13 +0200)] 
various: use id128_from_string_not_null()

No functional change. In config_parse_address_generation_type() we would set
the output parameter and then say it's ignored, so it _looked_ like an error in
the code, but the variable was always initialized to SD_ID128_NULL anyway, so
the code was actually fine.

2 years agocore,systemctl: refuse switching root if we're not in initrd 28971/head
Mike Yuan [Fri, 25 Aug 2023 16:39:23 +0000 (00:39 +0800)] 
core,systemctl: refuse switching root if we're not in initrd

2 years agocore,systemctl: refuse switching root to current root properly
Mike Yuan [Fri, 25 Aug 2023 16:18:25 +0000 (00:18 +0800)] 
core,systemctl: refuse switching root to current root properly

Fixes #28970

2 years agoRevert "network: ndisc - drop routes of lifetime 0"
Yu Watanabe [Sat, 2 Sep 2023 05:29:55 +0000 (14:29 +0900)] 
Revert "network: ndisc - drop routes of lifetime 0"

This reverts commit 4ccd48cb2693a3603f14a30b6286228597285d92.

From RFC 4861 section 4.2.
> The Router Lifetime applies only to the router's usefulness as a default
> router; it does not apply to information contained in other message fields
> or options.  Options that need time limits for their information include
> their own lifetime fields.

Hence, based on the lifetime field of the message header, we should not
drop any other information.
Note that, in ndisc_router_process_default(), we have already dropp the
default gateway when the lifetime is zero. Hence, we can safely drop the
change.

2 years agooomd: avoid unnecessary wake-ups for ManagedOOMSwap
Christian Hergert [Tue, 29 Aug 2023 21:58:10 +0000 (14:58 -0700)] 
oomd: avoid unnecessary wake-ups for ManagedOOMSwap

If there are no "ManagedOOMSwap" entries to monitor, then the event source
can be completely disabled. This scenario appears to be common and avoiding
the wake-ups can save idle energy consumption.

This was discovered while using Sysprof for various GNOME 45 performance
tuning. systemd-oomd goes from waking up a few times a second to no
wake-ups helping keep a laptop in deep(er) sleep.

Signed-off-by: Christian Hergert <chergert@redhat.com>
2 years agoAdding client_set_state to sd-dhcp-client.c to support a client state change hook
pelaufer [Fri, 1 Sep 2023 16:34:26 +0000 (10:34 -0600)] 
Adding client_set_state to sd-dhcp-client.c to support a client state change hook

2 years agoJournal: Add message IDs for emergency-level log messages
OMOJOLA JOSHUA [Wed, 30 Aug 2023 09:30:42 +0000 (10:30 +0100)] 
Journal: Add message IDs for emergency-level log messages

2 years agosd-login: Fix sd_pidfd_* function signature parameter types
msizanoen [Fri, 1 Sep 2023 09:06:34 +0000 (16:06 +0700)] 
sd-login: Fix sd_pidfd_* function signature parameter types

The type of a file descriptor is `int`, not `pid_t`. This should not
have any effects on API consumers as `pid_t` is already typedef'd as
`int` on all glibc-based systems.

2 years agoman: mention version info for NFTSet= setting
Yu Watanabe [Fri, 1 Sep 2023 11:17:53 +0000 (20:17 +0900)] 
man: mention version info for NFTSet= setting

Follow-up for fc289dd0ad4c223c0fa02dc7e91f7244143fa918.

2 years agoMerge pull request #24570 from topimiettinen/nft-sets-v2
Yu Watanabe [Fri, 1 Sep 2023 11:13:39 +0000 (20:13 +0900)] 
Merge pull request #24570 from topimiettinen/nft-sets-v2

network: firewall integration with NFT sets

2 years agoglyph-util: bring glyphs into same order everywhere
Lennart Poettering [Wed, 12 Jul 2023 20:28:12 +0000 (22:28 +0200)] 
glyph-util: bring glyphs into same order everywhere

The enum definition, the two string tables and the test all were using
different orders (and in case of the test even missed entries).

Let's unify this, and make sure we always use the same order. This
settles the confusion, and makes the order used for the unicode string
table the canonical one, adjusting the other lists to match it. And adds
the missing entries to the tets.

2 years agoMerge pull request #29004 from poettering/measure-log
Lennart Poettering [Thu, 31 Aug 2023 07:47:35 +0000 (09:47 +0200)] 
Merge pull request #29004 from poettering/measure-log

tpm2: whenever we measure, also write a tpm log record

2 years agoNEWS: Typo
Milton D. Miller II [Wed, 30 Aug 2023 19:22:46 +0000 (14:22 -0500)] 
NEWS: Typo

Let's not encourage the lawyers.

2 years agobusctl: do not print start/stop monitoring messages with --quiet/--json
Luca Boccassi [Wed, 30 Aug 2023 17:56:07 +0000 (18:56 +0100)] 
busctl: do not print start/stop monitoring messages with --quiet/--json

2 years agojournal: Relax boot ID and monotonic clock consistency checks 29017/head
msizanoen [Wed, 30 Aug 2023 11:53:29 +0000 (18:53 +0700)] 
journal: Relax boot ID and monotonic clock consistency checks

The monotonic clock value consistency should only be checked if the boot
ID is the same as the last journal entry, and requiring that the current
boot ID be the same as the boot ID of the last entry is not necessary
for ensuring deterministic bisection as we already enforce strict
ordering of the real time clock value in a single journal file.

This fixes an issue where a new journal file is unnecessarily created
every boot, potentially wasting storage space.

2 years agojournal: Don't write to journal files without the new boot ID update behavior guarantee
msizanoen [Wed, 30 Aug 2023 13:11:42 +0000 (20:11 +0700)] 
journal: Don't write to journal files without the new boot ID update behavior guarantee

With the old boot ID update behavior there's no way to compare the boot
ID of a new entry to be written with the boot ID of the last entry in
the journal in a performant manner, and therefore no way to determine if
monotonic clock value consistency checking is needed. Refuse to open
journal files without the new boot ID update behavior guarantee to
simplify consistency checking.

2 years agomkosi: pin CentOS9 kernel to working version
Luca Boccassi [Wed, 30 Aug 2023 11:57:49 +0000 (12:57 +0100)] 
mkosi: pin CentOS9 kernel to working version

Newer kernels are affected by a regression that causes a kernel panic
on shutdown, so pin them for now. Can be reverted once that problem is
fixed.

https://bugzilla.redhat.com/show_bug.cgi?id=2234390

2 years agotest: add test for new measurement log 29004/head
Lennart Poettering [Wed, 30 Aug 2023 10:53:06 +0000 (12:53 +0200)] 
test: add test for new measurement log

2 years agotpm2: whenever we measure, also write a tpm log record
Lennart Poettering [Fri, 7 Jul 2023 19:45:54 +0000 (21:45 +0200)] 
tpm2: whenever we measure, also write a tpm log record

Previously we only logged our measurements to the journal. This is not a
great solution though, since regular logs are subject to rotation, which
is something we really cannot have for measurements (as it means we can
never reproduce the PCR values from the data). Hence, let's maintain an
explicit log.

Ideally, we'd just use the TCG Canonical Event Log format 1:1
(https://trustedcomputinggroup.org/resource/canonical-event-log-format/).
However it's not a perfect fit fo us, for various reasons. But let's
follow it (in its JSON incantation) as closely at it makes sense, so
that it can easily be converted to the full format by programs consuming
it.

Code comments explain where we deviate from the TCG CEL-JSON, and what
to do about it when reading the data.

2 years agoMerge pull request #29013 from yuwata/sd-dhcp-client-ensure-iaid-and-duid
Luca Boccassi [Wed, 30 Aug 2023 10:51:39 +0000 (11:51 +0100)] 
Merge pull request #29013 from yuwata/sd-dhcp-client-ensure-iaid-and-duid

sd-dhcp-client: set IAID and DUID earlier

2 years agoRevert "test-dhcp-client: add temporary workaround for assertion failure" 29013/head
Yu Watanabe [Wed, 30 Aug 2023 08:26:57 +0000 (17:26 +0900)] 
Revert "test-dhcp-client: add temporary workaround for assertion failure"

This reverts commit 1686c884bfa846f8da87621e87870eb18dd8107c.

The issue should be fixed by the previous commit. Let's drop the
workaround.

2 years agosd-dhcp-client: ensure IAID and DUID being set on start
Yu Watanabe [Wed, 30 Aug 2023 08:33:01 +0000 (17:33 +0900)] 
sd-dhcp-client: ensure IAID and DUID being set on start

After b2851e8d6287ab9bb3cd6e42395271c45ce0e377, if IAID and DUID are not
set on start, calling sd_dhcp_client_set_iaid_duid_en() in
client_message_init() triggers assertion, as the client is already
running at the stage. Let's set IAID and DUID earlier.

Fixes #28990.

2 years agoMerge pull request #29007 from tormath1/tormath1/reload
Mike Yuan [Tue, 29 Aug 2023 16:39:30 +0000 (00:39 +0800)] 
Merge pull request #29007 from tormath1/tormath1/reload

sysext: fix around `--root` support

2 years agoMerge pull request #28955 from poettering/generic-pe
Luca Boccassi [Tue, 29 Aug 2023 15:09:54 +0000 (16:09 +0100)] 
Merge pull request #28955 from poettering/generic-pe

unify two disparate PE executable parsers we currently have into one

2 years agoMerge pull request #28999 from keszybz/two-man-ukify-fixe
Luca Boccassi [Tue, 29 Aug 2023 15:08:49 +0000 (16:08 +0100)] 
Merge pull request #28999 from keszybz/two-man-ukify-fixe

Make ukify non-experimental

2 years agoid128-util: add id128_from_string_not_null()
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 13:10:25 +0000 (15:10 +0200)] 
id128-util: add id128_from_string_not_null()

2 years agosystemd-id128: properly document the show verb
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 11:29:01 +0000 (13:29 +0200)] 
systemd-id128: properly document the show verb

https://github.com/systemd/systemd/issues/27514 requested this functionality
among other things, but it is already implemented. The man page was also
missing 'show' in the synopsis, so add that, along with an example.

2 years agoman: document sd_id128_get_app_specific
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 11:07:32 +0000 (13:07 +0200)] 
man: document sd_id128_get_app_specific

2 years agosd-id128: export sd_id128_get_app_specific()
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 11:03:38 +0000 (13:03 +0200)] 
sd-id128: export sd_id128_get_app_specific()

We exported sd_id128_get_machine_app_specific() and
sd_id128_get_boot_app_specific(). But those operate on the current machine,
and sometimes the user might want to do the same calculation for a different
machine, or an earlier boot, etc. We expose the underlying implementation
to make this easy.

2 years agosd-id128: avoid one memcpy
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 10:34:34 +0000 (12:34 +0200)] 
sd-id128: avoid one memcpy

By aligning the output buffer, we can just use the result directly, no need to
copy stuff around.

2 years agoshared/id128-print: fix indentation, reduce variable scope
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 10:22:46 +0000 (12:22 +0200)] 
shared/id128-print: fix indentation, reduce variable scope

2 years agoid128: add option -P to only show value
Zbigniew Jędrzejewski-Szmek [Sat, 26 Aug 2023 10:12:01 +0000 (12:12 +0200)] 
id128: add option -P to only show value

We have '-P' in systemctl with similar meaning.

Partially closes https://github.com/systemd/systemd/issues/27514.

2 years agoMerge pull request #28900 from abderrahim/version-info
Zbigniew Jędrzejewski-Szmek [Tue, 29 Aug 2023 13:59:48 +0000 (16:59 +0300)] 
Merge pull request #28900 from abderrahim/version-info

man: add version info

2 years agomkfs-util: propagate SOURCE_DATE_EPOCH to mcopy
Malte Poll [Mon, 28 Aug 2023 15:20:36 +0000 (17:20 +0200)] 
mkfs-util: propagate SOURCE_DATE_EPOCH to mcopy

Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2 years agoman: add version info 28900/head
Abderrahim Kitouni [Tue, 22 Aug 2023 16:52:36 +0000 (17:52 +0100)] 
man: add version info

This tries to add information about when each option was added. It goes
back to version 183.

The version info is included from a separate file to allow generating it,
which would allow more control on the formatting of the final output.

2 years agoukify: fail if the config file was not read 28999/head
Zbigniew Jędrzejewski-Szmek [Mon, 28 Aug 2023 15:44:42 +0000 (18:44 +0300)] 
ukify: fail if the config file was not read

Inspired by https://github.com/systemd/systemd/pull/28997.
Noticed by Alvin Alvarado <alvin@striczkof.io>.

2 years agoukify: move to /usr/bin and mark as non non-experimental
Zbigniew Jędrzejewski-Szmek [Mon, 28 Aug 2023 15:22:43 +0000 (18:22 +0300)] 
ukify: move to /usr/bin and mark as non non-experimental

The notice in the man page is removed and the tool is moved into the $PATH.
A compat symlink is provided.

It is fairly widely used now, and realistically we need to keep backwards
compat or people will be very unhappy.

2 years agoman/ukify: fix synopsis
Zbigniew Jędrzejewski-Szmek [Mon, 28 Aug 2023 15:20:56 +0000 (18:20 +0300)] 
man/ukify: fix synopsis

Fixup for 7d481546acc8dbd9be05fe7a901e5598487aec02 and
a3f758b3104ee1161d2dbf5a8c1be653340b1672.

2 years agosysext: skip the reload if `--root=` is provided 29007/head
Mathieu Tortuyaux [Tue, 29 Aug 2023 08:52:38 +0000 (10:52 +0200)] 
sysext: skip the reload if `--root=` is provided

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2 years agosysext: fix `--root=` support
Mathieu Tortuyaux [Tue, 29 Aug 2023 11:42:16 +0000 (13:42 +0200)] 
sysext: fix `--root=` support

when provided `--root=` was failing for `status`:
```
$ systemd-sysext --root=/mnt status
Failed to open '/usr/.systemd-sysext/extensions': No such file or directory
```

path was not relative to the given `--root` - same goes for the `need_reload`
as it was inspired from the `verb_status` section.

Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2 years agoshared: remove now unused pe-header.h 28955/head
Lennart Poettering [Thu, 24 Aug 2023 13:42:06 +0000 (15:42 +0200)] 
shared: remove now unused pe-header.h

2 years agoshared: port kernel-image.c over to new common PE parser
Lennart Poettering [Thu, 24 Aug 2023 13:41:32 +0000 (15:41 +0200)] 
shared: port kernel-image.c over to new common PE parser

2 years agoshared: port bootspec.c over to new common PE parser
Lennart Poettering [Thu, 24 Aug 2023 13:41:09 +0000 (15:41 +0200)] 
shared: port bootspec.c over to new common PE parser

2 years agoshared: add common implementation of PE parser
Lennart Poettering [Thu, 24 Aug 2023 13:40:41 +0000 (15:40 +0200)] 
shared: add common implementation of PE parser

2 years agoMerge pull request #28998 from YHNdnzj/logind-vt-handling
Luca Boccassi [Tue, 29 Aug 2023 00:09:10 +0000 (01:09 +0100)] 
Merge pull request #28998 from YHNdnzj/logind-vt-handling

logind: several cleanups

2 years agomeson: Fix version script
Jan Janssen [Mon, 28 Aug 2023 17:18:37 +0000 (19:18 +0200)] 
meson: Fix version script

Apparently, the `|` has a higher priority…

2 years agotest: fix debugging of nspawn tests
Frantisek Sumsal [Mon, 28 Aug 2023 20:42:36 +0000 (22:42 +0200)] 
test: fix debugging of nspawn tests

The pipe stuff introduced in 701e0c2660 causes nspawn to switch the
console from 'interactive' into 'read-only' which is a bit useless when
debugging. Let's set --console=interactive explicitly in such case.

Follow-up to 701e0c2660.

2 years agoman: Add xinclude namespace
Abderrahim Kitouni [Tue, 22 Aug 2023 16:52:02 +0000 (17:52 +0100)] 
man: Add xinclude namespace

This will be used by the next commit to add version information to the
nodes.

2 years agoMerge pull request #28328 from yuwata/network-ndisc-limit-captive-portal
Luca Boccassi [Mon, 28 Aug 2023 16:45:22 +0000 (17:45 +0100)] 
Merge pull request #28328 from yuwata/network-ndisc-limit-captive-portal

network: limit number of captive portals by RA