]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
12 months 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.

12 months 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.

12 months 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.

12 months 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.

12 months 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

12 months 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

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

12 months 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.

12 months 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.

12 months 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"

12 months 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 …

12 months 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

12 months 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

12 months 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)

12 months 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>
12 months 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>
12 months 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>
12 months 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

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

12 months 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

12 months 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.

12 months 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.

12 months 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.

12 months 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

12 months 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

12 months 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

12 months 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.

12 months 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

12 months 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

12 months 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.

12 months 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.

12 months 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.

12 months 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

12 months 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

12 months 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.

12 months 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>
12 months 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

12 months 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.

12 months 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.

12 months 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

12 months 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.

12 months 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

12 months 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.

12 months 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

12 months 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.

12 months 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.

12 months 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

12 months 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

12 months 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.

12 months 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

12 months 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.

12 months 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.

12 months 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

12 months 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

12 months 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

12 months 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()

12 months 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.

12 months 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

12 months 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.

12 months 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.

12 months 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

12 months 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.

12 months 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

12 months 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>
12 months 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.

12 months 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>.

12 months 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.

12 months 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.

12 months 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>
12 months 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>
12 months 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

12 months 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

12 months 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

12 months 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

12 months 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

12 months 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…

12 months 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.

12 months 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.

12 months 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

12 months agoRevert "Revert "test: add test case for systemd-update-utmp vs daemon-reexec""
Mike Yuan [Mon, 28 Aug 2023 09:29:31 +0000 (17:29 +0800)] 
Revert "Revert "test: add test case for systemd-update-utmp vs daemon-reexec""

This reverts commit 837773add465bd0a0d1f598203d297cf0129468b.

The original issue #27287 is fixed by #28123. Let's
reintroduce the test for systemd-update-utmp.

12 months agoMerge pull request #28948 from poettering/tpm2-duplicate-pcr-names
Luca Boccassi [Mon, 28 Aug 2023 16:43:10 +0000 (17:43 +0100)] 
Merge pull request #28948 from poettering/tpm2-duplicate-pcr-names

tpm2: unify tpm2 PCR symbolic identifiers

12 months agoMerge pull request #28916 from ddstreet/tpm2_pcr_value_post_merge
Luca Boccassi [Mon, 28 Aug 2023 16:42:48 +0000 (17:42 +0100)] 
Merge pull request #28916 from ddstreet/tpm2_pcr_value_post_merge

Tpm2 pcr value post merge

12 months agologind-session: generalize EIO handling for {restore,leave}_vt 28998/head
Mike Yuan [Mon, 28 Aug 2023 14:33:33 +0000 (22:33 +0800)] 
logind-session: generalize EIO handling for {restore,leave}_vt

Replaces #28949

12 months agologind: add missing asserts
Mike Yuan [Mon, 28 Aug 2023 13:21:06 +0000 (21:21 +0800)] 
logind: add missing asserts

12 months agologind: use hashmap value destructors
Mike Yuan [Mon, 28 Aug 2023 13:20:44 +0000 (21:20 +0800)] 
logind: use hashmap value destructors

12 months agologind: rephrase log messages
Mike Yuan [Mon, 28 Aug 2023 12:44:19 +0000 (20:44 +0800)] 
logind: rephrase log messages

12 months agologin: Properly handle -EIO in session_leave_vt
msizanoen [Thu, 24 Aug 2023 09:42:37 +0000 (16:42 +0700)] 
login: Properly handle -EIO in session_leave_vt

session_leave_vt may be called after the VT device was hung up, which
will cause vt_release to fail with -EIO. This is known to cause an issue
with GNOME 44 on Fedora where gdm-session-worker sometimes freezes when
trying to switch to VT 1 after a `loginctl terminate-user` operation.

Fix this by reopening the VT in session_leave_vt if we get an -EIO.

12 months agosd-radv: fix memory leak
Susant Sahani [Mon, 28 Aug 2023 10:21:22 +0000 (15:51 +0530)] 
sd-radv: fix memory leak

12 months agomeson: restore specifications of dependency on version_h
Zbigniew Jędrzejewski-Szmek [Mon, 28 Aug 2023 11:46:24 +0000 (14:46 +0300)] 
meson: restore specifications of dependency on version_h

This partially reverts 3c1eee5beda642707037b189481c3c30d1668da7.
I thought that it is not necessary, but
https://mesonbuild.com/Reference-manual_functions.html#vcs_tag says:

> This method returns a custom_tgt should be used to signal dependencies if
> other targets use the file outputted by this.
>
> For example, if you generate a header with this and want to use that in a
> build target, you must add the return value to the sources of that build
> target. Without that, Meson will not know the order in which to build the
> targets.

We can use version_h directly, since we already have it.

Hopefully fixes https://github.com/systemd/systemd/issues/28994.

12 months agotest-dhcp-client: add temporary workaround for assertion failure
Luca Boccassi [Mon, 28 Aug 2023 10:03:45 +0000 (11:03 +0100)] 
test-dhcp-client: add temporary workaround for assertion failure

Workaround for https://github.com/systemd/systemd/issues/28990

Introduced by https://github.com/systemd/systemd/pull/28932 but CI was
green there. Add a workaround to get the CI back in shape while it is
being investigated.

12 months agoboot: don't pass kernel cmdline option to UKIs which have the very same line built-in
Lennart Poettering [Mon, 21 Aug 2023 16:18:41 +0000 (18:18 +0200)] 
boot: don't pass kernel cmdline option to UKIs which have the very same line built-in

There's really no point in first extracting a command line from an UKI
to just pass it unmodified to the UKI. In particular as this is
systematically ignored in SecureBoot is enabled.

Let's drop this, so that unless the user actually edits the cmdline we
pass nothing to the invoked kernel.

Note that this low-key is a compat break, since the passed cmdline gets
measured. However, in the interest of minimized the difference between
systems with and without sd-boot to behave the same i think we should
suppress the command line anyway.

12 months ago99-systemd.rules.in: tag PTP devices with systemd
Chris Patterson [Fri, 25 Aug 2023 21:23:40 +0000 (17:23 -0400)] 
99-systemd.rules.in: tag PTP devices with systemd

Chronyd and similar time services, when using PTP devices, may need
the BindsTo/After directives to ensure the devices are available
before starting.  Tag PTP devices with systemd to allow for wider
adoption.

Signed-off-by: Chris Patterson <cpatterson@microsoft.com>
12 months agosd-dhcp-client: make client initially in stopped state
Yu Watanabe [Wed, 23 Aug 2023 04:25:35 +0000 (13:25 +0900)] 
sd-dhcp-client: make client initially in stopped state

Previously, DHCP_STATE_STOPPED and DHCP_STATE_INIT are both handled as
not-running. Moreover, previously after sd_dhcp_client_start() is
called, the client still in INIT state (and thus handled as not-running)
even if its internal timer event sources are initialized.

Let's make only STOPPED state handled as not-running, and make the
client initially in STOPPED state.

Prompted by #28896.

12 months agopkg.m4 macro needs brackets
Michael Vasseur [Thu, 24 Aug 2023 19:47:05 +0000 (21:47 +0200)] 
pkg.m4 macro needs brackets

See documentation at: https://manpages.debian.org/testing/pkgconf/pkg.m4.7.en.html

Without this the macro was not always correctly resolved so the correct command was not used in the rest of the snippet.

12 months agoMerge pull request #28977 from keszybz/drop-versiondep
Luca Boccassi [Mon, 28 Aug 2023 09:02:01 +0000 (10:02 +0100)] 
Merge pull request #28977 from keszybz/drop-versiondep

meson: simplify handling of the version tag

12 months agoman/gpt-auto-generator: avoid saying "negative" for boolean
Zbigniew Jędrzejewski-Szmek [Sun, 27 Aug 2023 14:10:38 +0000 (17:10 +0300)] 
man/gpt-auto-generator: avoid saying "negative" for boolean

Fixes #28928.

12 months agoMerge pull request #28968 from DaanDeMeyer/rlimit
Zbigniew Jędrzejewski-Szmek [Sun, 27 Aug 2023 14:06:58 +0000 (16:06 +0200)] 
Merge pull request #28968 from DaanDeMeyer/rlimit

Limit rlim_max in rlimit_nofile_safe() to nr_open

12 months agoman: Fix typo in config file example for ukify
Alvin Alvarado [Sat, 26 Aug 2023 13:25:46 +0000 (23:25 +1000)] 
man: Fix typo in config file example for ukify

or else it would output 'Unknown config setting [UKI] SecureBootCerificate=' or just an error outright if not overrode.

12 months agoshared/firewall-util: promote failure to init ipv6 NAT to error 24570/head
Topi Miettinen [Wed, 9 Aug 2023 19:53:29 +0000 (22:53 +0300)] 
shared/firewall-util: promote failure to init ipv6 NAT to error

12 months agotest: testing for networkd NFTSet feature
Topi Miettinen [Wed, 9 Aug 2023 20:16:24 +0000 (23:16 +0300)] 
test: testing for networkd NFTSet feature