1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-14 05:57:40 +03:00

67022 Commits

Author SHA1 Message Date
Mike Yuan
62efc7629b
format-table: use format_timestamp_relative_monotonic 2023-09-02 22:58:00 +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
Mike Yuan
4da159bc53
core,systemctl: refuse switching root if we're not in initrd 2023-09-02 15:56:24 +08:00
Mike Yuan
b0c5f0e1f4
core,systemctl: refuse switching root to current root properly
Fixes #28970
2023-09-02 15:56:24 +08:00
Christian Hergert
b63beb4d28 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>
2023-09-02 02:25:58 +01:00
OMOJOLA JOSHUA
ad5db9404e Journal: Add message IDs for emergency-level log messages 2023-09-01 13:59:21 +01:00
msizanoen
904b8bb5a8 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.
2023-09-01 13:29:47 +01:00
Yu Watanabe
c97f268f29 man: mention version info for NFTSet= setting
Follow-up for fc289dd0ad4c223c0fa02dc7e91f7244143fa918.
2023-09-01 13:29:27 +01:00
Yu Watanabe
1d4c874d3c
Merge pull request #24570 from topimiettinen/nft-sets-v2
network: firewall integration with NFT sets
2023-09-01 20:13:39 +09:00
Lennart Poettering
c27465d72d 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.
2023-08-31 14:39:49 +02:00
Lennart Poettering
359b5e7539
Merge pull request #29004 from poettering/measure-log
tpm2: whenever we measure, also write a tpm log record
2023-08-31 09:47:35 +02:00
Milton D. Miller II
c23b07df3a NEWS: Typo
Let's not encourage the lawyers.
2023-08-30 20:50:47 +01:00
Luca Boccassi
a699b1e7a9 busctl: do not print start/stop monitoring messages with --quiet/--json 2023-08-30 20:50:32 +01:00
msizanoen
addcecf6f4 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.
2023-08-30 20:17:18 +07:00
msizanoen
2f766aca1e 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.
2023-08-30 20:16:45 +07:00
Luca Boccassi
b0881b65a6 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
2023-08-30 14:11:11 +01:00
Lennart Poettering
a4e941ee1f test: add test for new measurement log 2023-08-30 13:08:17 +02:00
Lennart Poettering
cb19bdaebf 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.
2023-08-30 12:59:34 +02:00
Luca Boccassi
73ac9520ec
Merge pull request #29013 from yuwata/sd-dhcp-client-ensure-iaid-and-duid
sd-dhcp-client: set IAID and DUID earlier
2023-08-30 11:51:39 +01:00
Yu Watanabe
3b981f7428 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.
2023-08-30 17:37:22 +09:00
Yu Watanabe
5e2a89d84b 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.
2023-08-30 17:37:03 +09:00
Mike Yuan
acf565b499
Merge pull request #29007 from tormath1/tormath1/reload
sysext: fix around `--root` support
2023-08-30 00:39:30 +08:00
Luca Boccassi
8fcc700bd9
Merge pull request #28955 from poettering/generic-pe
unify two disparate PE executable parsers we currently have into one
2023-08-29 16:09:54 +01:00
Luca Boccassi
de6906b1c1
Merge pull request #28999 from keszybz/two-man-ukify-fixe
Make ukify non-experimental
2023-08-29 16:08:49 +01:00
Zbigniew Jędrzejewski-Szmek
6a73a4f7c4
Merge pull request #28900 from abderrahim/version-info
man: add version info
2023-08-29 16:59:48 +03:00
Malte Poll
4947de275a mkfs-util: propagate SOURCE_DATE_EPOCH to mcopy
Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
2023-08-29 14:58:44 +01:00
Abderrahim Kitouni
ec07c3c80b 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.
2023-08-29 14:07:24 +01:00
Zbigniew Jędrzejewski-Szmek
594e27b0bc 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>.
2023-08-29 15:16:35 +03:00
Zbigniew Jędrzejewski-Szmek
f65aa477d9 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.
2023-08-29 15:16:35 +03:00
Zbigniew Jędrzejewski-Szmek
d3f8b754d4 man/ukify: fix synopsis
Fixup for 7d481546acc8dbd9be05fe7a901e5598487aec02 and
a3f758b3104ee1161d2dbf5a8c1be653340b1672.
2023-08-29 15:16:35 +03:00
Mathieu Tortuyaux
6a69b0d6d8
sysext: skip the reload if --root= is provided
Signed-off-by: Mathieu Tortuyaux <mtortuyaux@microsoft.com>
2023-08-29 13:55:36 +02:00
Mathieu Tortuyaux
14361f6dd9
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>
2023-08-29 13:55:09 +02:00
Lennart Poettering
d8e2ba1b8e shared: remove now unused pe-header.h 2023-08-29 11:25:52 +02:00
Lennart Poettering
5c425807bf shared: port kernel-image.c over to new common PE parser 2023-08-29 11:25:52 +02:00
Lennart Poettering
8bc9d1aa9f shared: port bootspec.c over to new common PE parser 2023-08-29 11:25:52 +02:00
Lennart Poettering
0786b03969 shared: add common implementation of PE parser 2023-08-29 11:25:52 +02:00
Luca Boccassi
599a312484
Merge pull request #28998 from YHNdnzj/logind-vt-handling
logind: several cleanups
2023-08-29 01:09:10 +01:00
Jan Janssen
29c2f6ac4b meson: Fix version script
Apparently, the `|` has a higher priority…
2023-08-29 01:08:38 +01:00
Frantisek Sumsal
5599c84bcd 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.
2023-08-29 01:08:08 +01:00
Abderrahim Kitouni
4623eecb2f man: Add xinclude namespace
This will be used by the next commit to add version information to the
nodes.
2023-08-28 18:27:10 +01:00
Luca Boccassi
337e8504f7
Merge pull request #28328 from yuwata/network-ndisc-limit-captive-portal
network: limit number of captive portals by RA
2023-08-28 17:45:22 +01:00
Mike Yuan
08a5bc4f48 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.
2023-08-28 17:43:57 +01:00
Luca Boccassi
cd4ed8579b
Merge pull request #28948 from poettering/tpm2-duplicate-pcr-names
tpm2: unify tpm2 PCR symbolic identifiers
2023-08-28 17:43:10 +01:00
Luca Boccassi
f154440980
Merge pull request #28916 from ddstreet/tpm2_pcr_value_post_merge
Tpm2 pcr value post merge
2023-08-28 17:42:48 +01:00
Mike Yuan
93041c6010
logind-session: generalize EIO handling for {restore,leave}_vt
Replaces #28949
2023-08-28 23:58:39 +08:00
Mike Yuan
a8d5378a88
logind: add missing asserts 2023-08-28 22:50:42 +08:00
Mike Yuan
2d7cbead01
logind: use hashmap value destructors 2023-08-28 22:37:21 +08:00
Mike Yuan
36f9fadfe3
logind: rephrase log messages 2023-08-28 22:37:21 +08:00
msizanoen
99d4ad71b7 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.
2023-08-28 17:35:24 +03:00