1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

67016 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
37edb704f9 test: shorten sample names, drop numerical prefixes
We don't care about the ordering, so we may just as well drop the numerical
prefixes that we normally use for sorting. Also rename some other samples
to keep width of output down to reasonable width.
2023-09-02 17:32:19 +03: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 fc289dd0ad.
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
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 1686c884bf.

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 b2851e8d62, 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 7d481546ac and
a3f758b310.
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 837773add4.

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
Susant Sahani
1a6b1214af sd-radv: fix memory leak 2023-08-28 14:07:16 +01:00
Zbigniew Jędrzejewski-Szmek
56a0b9065e meson: restore specifications of dependency on version_h
This partially reverts 3c1eee5bed.
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.
2023-08-28 14:06:23 +01:00
Luca Boccassi
1686c884bf 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.
2023-08-28 12:29:10 +01:00
Lennart Poettering
73f0eedf9b 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.
2023-08-28 11:24:53 +01:00
Chris Patterson
23cbe90d7d 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>
2023-08-28 10:42:27 +01:00
Yu Watanabe
b2851e8d62 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.
2023-08-28 10:25:14 +01:00