]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 months agoman,doc: document some aspects of user record management/homed a bit better
Lennart Poettering [Wed, 8 Nov 2023 10:11:22 +0000 (11:11 +0100)] 
man,doc: document some aspects of user record management/homed a bit better

Fixes: #29759
7 months agoman: be even clearer that tmpfiles user/group/mode are applied on existing inodes
Lennart Poettering [Wed, 8 Nov 2023 09:56:07 +0000 (10:56 +0100)] 
man: be even clearer that tmpfiles user/group/mode are applied on existing inodes

I think it was clear already, but let's be even clearer.

Fixes: #29774
7 months agoman: update COREDUMP_xyz journal fields docs
Lennart Poettering [Wed, 8 Nov 2023 09:48:41 +0000 (10:48 +0100)] 
man: update COREDUMP_xyz journal fields docs

This completes/corrects the documentation for the following fields:

    COREDUMP_CGROUP= - doc where wrong, actually covered COREDUMP_PROC_CGROUP=
    COREDUMP_CMDLINE= → undocumented so far
    COREDUMP_PROC_CGROUP= → docs where there but incorrectly assigned to COREDUMP_CGROUP=
    COREDUMP_PROC_AUXV= → undocumented so far
    COREDUMP_SESSION= → undocumented so far

Fixes: #29832
7 months agoman: add missing unit file section name to example
Lennart Poettering [Wed, 8 Nov 2023 09:31:55 +0000 (10:31 +0100)] 
man: add missing unit file section name to example

Fixes: #29917
7 months agoMerge pull request #29921 from yuwata/sd-dhcp-client-timestamp
Luca Boccassi [Wed, 8 Nov 2023 10:55:11 +0000 (10:55 +0000)] 
Merge pull request #29921 from yuwata/sd-dhcp-client-timestamp

dhcp: further cleanups for timestamp

7 months agoresolvectl: do not sort domain output
Ronan Pigott [Tue, 7 Nov 2023 22:05:02 +0000 (15:05 -0700)] 
resolvectl: do not sort domain output

The order of search domains is important information. We shouldn't
obscure it by sorting the search domains when printing.

Fixes: af781878d598 ("resolvectl: sort domain/nta output")
7 months agotest: retry the property check a couple of times
Frantisek Sumsal [Wed, 8 Nov 2023 08:13:45 +0000 (09:13 +0100)] 
test: retry the property check a couple of times

41e4ce06fe shortened existing sleeps, which resulted in the check being
sometimes done before the property had a chance to update. Let's do what
what we do with the rest of the checks and retry it a couple of times.

Resolves: #29923

7 months agoMerge pull request #28519 from ddstreet/tpm2_external_seal
Lennart Poettering [Wed, 8 Nov 2023 09:28:28 +0000 (10:28 +0100)] 
Merge pull request #28519 from ddstreet/tpm2_external_seal

Update systemd-cryptenroll to enroll TPM using only public key

7 months agosd-dhcp-client,-server: set timestamp based on the time when received a packet 29921/head
Yu Watanabe [Wed, 8 Nov 2023 04:49:03 +0000 (13:49 +0900)] 
sd-dhcp-client,-server: set timestamp based on the time when received a packet

It seems that RFC does not say anything about the timestamp of lease
we should use: time that the client sent a request or received a reply.
In DHCPv6 client and NDisc, we use a timestamp that we receive a packet,
rather than we sent something. So, let's consistently use the same
logic for DHCPv4 client.

By using the logic, we will hopefully not forget to set timestamp again,
which is fixed by 089362976c2a653a77f942bfeb3f61d0e180f078.

7 months agosd-dhcp-client: move packet size check to dhcp_packet_verify_headers()
Yu Watanabe [Wed, 8 Nov 2023 04:15:00 +0000 (13:15 +0900)] 
sd-dhcp-client: move packet size check to dhcp_packet_verify_headers()

No functional change.

7 months agosd-dhcp-client: split out client_verify_message_header()
Yu Watanabe [Wed, 8 Nov 2023 04:04:59 +0000 (13:04 +0900)] 
sd-dhcp-client: split out client_verify_message_header()

This is not necessary to be called when a packet is received through the
RAW socket, but should not hurt anything.

7 months agotest: set working directory even if it is expected that the command fails
Yu Watanabe [Wed, 8 Nov 2023 03:16:26 +0000 (12:16 +0900)] 
test: set working directory even if it is expected that the command fails

Otherwise, parsing may unexpectedly succeeds but fail to run writing
.network files with permission error.

Follow-up for 6bc5de53e8410fdec817300185b7ad72cd7775dd.

7 months agovmspawn: fix memleak
Yu Watanabe [Wed, 8 Nov 2023 05:54:17 +0000 (14:54 +0900)] 
vmspawn: fix memleak

Fixes CID#1523912.

7 months agotree-wide: fix typo
Yu Watanabe [Wed, 8 Nov 2023 05:57:33 +0000 (14:57 +0900)] 
tree-wide: fix typo

7 months agosd-dhcp-client: make client_handle_message() propagate critical error
Yu Watanabe [Wed, 8 Nov 2023 03:56:57 +0000 (12:56 +0900)] 
sd-dhcp-client: make client_handle_message() propagate critical error

Then, stop client in the caller side.

This also makes
- ignore all errors except for resource errors like OOM when FORCERENEW
  is received,
- trigger assertion when an message received even if the client is
  stopped.

This should not change any functionality. Just refactoring.

7 months agoMerge pull request #29910 from yuwata/rapid-commit
Yu Watanabe [Wed, 8 Nov 2023 03:20:17 +0000 (12:20 +0900)] 
Merge pull request #29910 from yuwata/rapid-commit

dhcp: about rapid commit

7 months agoMerge pull request #29913 from keszybz/vmspawn-ci
Luca Boccassi [Tue, 7 Nov 2023 23:35:48 +0000 (23:35 +0000)] 
Merge pull request #29913 from keszybz/vmspawn-ci

Build vmspawn in CI and fix one test failure

7 months agoMerge pull request #29915 from mrc0mmand/ntp-followups
Luca Boccassi [Tue, 7 Nov 2023 22:38:23 +0000 (22:38 +0000)] 
Merge pull request #29915 from mrc0mmand/ntp-followups

timesync: fix PropertiesChanges signals for NTP properties

7 months agovmspawn: add missing include 29913/head
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 21:50:37 +0000 (22:50 +0100)] 
vmspawn: add missing include

../src/src/vmspawn/vmspawn-util.c:33:13: error: implicit declaration of function ‘access’; did you mean ‘accept’? [-Werror=implicit-function-declaration]

7 months agoMerge pull request #6763 from kinvolk/iaguis/no-new-privs
Luca Boccassi [Tue, 7 Nov 2023 21:34:49 +0000 (21:34 +0000)] 
Merge pull request #6763 from kinvolk/iaguis/no-new-privs

core: allow using seccomp without no_new_privs when unprivileged

7 months agomeson: enable vmspawn by default in developer mode
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 20:51:40 +0000 (21:51 +0100)] 
meson: enable vmspawn by default in developer mode

This should also implicitly enabled vmspawn in CI. It wasn't passing even the
basic tests, which we didn't see, because it needs to be explicitly enabled.

7 months agoman: many fixes systemd-vmspawn(1)
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 20:36:46 +0000 (21:36 +0100)] 
man: many fixes systemd-vmspawn(1)

- version information
- indentation and missing tags
- mkosi and qemu don't need root

7 months agoMerge pull request #29914 from yuwata/network-generator
Luca Boccassi [Tue, 7 Nov 2023 20:51:21 +0000 (20:51 +0000)] 
Merge pull request #29914 from yuwata/network-generator

network-generator: several cleanups and follow-ups for dns server handling

7 months agoxdg-autostart: downgrade warning for missing executables
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 16:50:51 +0000 (17:50 +0100)] 
xdg-autostart: downgrade warning for missing executables

On a system with a shared home directory, I'm getting a bunch of warnings:

systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.signal.Signal.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/im.riot.Riot.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/libexec/gnome-tweak-tool-lid-inhibitor' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/ignore-lid-switch-tweak.desktop: not generating unit, error parsing Exec= line: No such file or directory
systemd-xdg-autostart-generator[76]: Exec binary '/usr/bin/flatpak' does not exist: No such file or directory
systemd-xdg-autostart-generator[76]: /home/zbyszek/.config/autostart/org.telegram.desktop.desktop: not generating unit, error parsing Exec= line: No such file or directory

This isn't really a problem. Let's just print an info message.

7 months agoMerge pull request #29909 from keszybz/documentation-cleanup
Luca Boccassi [Tue, 7 Nov 2023 20:46:13 +0000 (20:46 +0000)] 
Merge pull request #29909 from keszybz/documentation-cleanup

Two small documentation cleanups

7 months agotimesync: fix PropertiesChanges signals for NTP properties 29915/head
Frantisek Sumsal [Tue, 7 Nov 2023 12:16:05 +0000 (13:16 +0100)] 
timesync: fix PropertiesChanges signals for NTP properties

As in their current form they didn't work at all:

systemd-timesyncd[190115]: Assertion 's' failed at src/libsystemd/sd-event/sd-event.c:3058, function sd_event_source_set_enabled(). Ignoring.
systemd-timesyncd[190115]: Failed to reenable system ntp server change event source!
systemd-timesyncd[190115]: Failed to enable ntp server defer event, ignoring: Invalid argument

This was also pointed out in the post-merge review [0].

Let's address this together with the rest of the comments, and add
some tests to make sure everything works as it should.

Resolves: #28770
Follow-up to: 8f1c446

[0] https://github.com/systemd/systemd/commit/8f1c4469793f2f0281fdfbc20ba4085e20cdd16f#r124147466

7 months agotest: "prettify" the test a bit
Frantisek Sumsal [Tue, 7 Nov 2023 13:35:06 +0000 (14:35 +0100)] 
test: "prettify" the test a bit

7 months agosystemctl: grey out legend
Lennart Poettering [Tue, 7 Nov 2023 16:34:08 +0000 (17:34 +0100)] 
systemctl: grey out legend

The legend is not the primary information, but simply explanatory, hence
grey it out a bit.

This mimics what we do for pcrlock.

7 months agonetwork-generator: refuse unexpected trailing strings 29914/head
Yu Watanabe [Tue, 7 Nov 2023 19:28:02 +0000 (04:28 +0900)] 
network-generator: refuse unexpected trailing strings

7 months agonetwork-generator: allow to specify both IPv4 and IPv6 DNS servers
Yu Watanabe [Tue, 7 Nov 2023 19:09:48 +0000 (04:09 +0900)] 
network-generator: allow to specify both IPv4 and IPv6 DNS servers

Follow-up for 923599523c10d8897551e081e6b00cd8002309c3.

7 months agonetwork-generator: add missing assertions
Yu Watanabe [Tue, 7 Nov 2023 18:56:53 +0000 (03:56 +0900)] 
network-generator: add missing assertions

7 months agonetwork-generator: drop unused family argument
Yu Watanabe [Tue, 7 Nov 2023 18:54:50 +0000 (03:54 +0900)] 
network-generator: drop unused family argument

7 months agonetwork-generator: relax requirement for peer address, route destination, and gateway
Yu Watanabe [Tue, 7 Nov 2023 18:49:12 +0000 (03:49 +0900)] 
network-generator: relax requirement for peer address, route destination, and gateway

No functional changes, as the caller already sets them.

7 months agovmspawn: shorted --help output to fit in 80 columns
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 17:54:38 +0000 (18:54 +0100)] 
vmspawn: shorted --help output to fit in 80 columns

I think that "SB" is good enough here, the option name shows the unabbreviated
name.

7 months agonetwork: add [DHCPServer] RapidCommit= setting 29910/head
Yu Watanabe [Tue, 7 Nov 2023 16:33:43 +0000 (01:33 +0900)] 
network: add [DHCPServer] RapidCommit= setting

7 months agosd-dhcp-server: support rapid commit (RFC4039)
Yu Watanabe [Tue, 7 Nov 2023 16:27:46 +0000 (01:27 +0900)] 
sd-dhcp-server: support rapid commit (RFC4039)

https://datatracker.ietf.org/doc/html/rfc4039

7 months agoman: link to new btrfs website for btrfs man pages 29909/head
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 17:14:33 +0000 (18:14 +0100)] 
man: link to new btrfs website for btrfs man pages

https://archive.kernel.org/oldwiki/btrfs.wiki.kernel.org/index.php/Manpage/btrfs(5).html
says "This wiki has been archived and the content is no longer updated."
and redirects to https://btrfs.readthedocs.io/en/latest/btrfs-man5.html.
Let's move all the btrfs links to btrfs.readthedocs.io.

7 months agoMerge pull request #29876 from poettering/kernel-install-all
Lennart Poettering [Tue, 7 Nov 2023 17:29:47 +0000 (18:29 +0100)] 
Merge pull request #29876 from poettering/kernel-install-all

add "kernel-install list" and "kernel-install add-all"

7 months agotest: update TEST-70 with systemd-cryptenroll calculated TPM2 enrollment 28519/head
Dan Streetman [Tue, 25 Jul 2023 00:04:28 +0000 (20:04 -0400)] 
test: update TEST-70 with systemd-cryptenroll calculated TPM2 enrollment

Update test to check systemd-cryptenroll --tpm2-device-key= enrollment.

7 months agotest: fix env var name of persistent handle used for testing so it is removed after...
Dan Streetman [Tue, 7 Nov 2023 17:18:08 +0000 (12:18 -0500)] 
test: fix env var name of persistent handle used for testing so it is removed after test

The cleanup uses PERSISTENT_HANDLE while the test uses PERSISTENT, so change
the test to use PERSISTENT_HANDLE so it's cleaned up (i.e. removed from the
tpm) after the test.

7 months agocryptenroll: add support for calculated TPM2 enrollment
Dan Streetman [Fri, 21 Jul 2023 19:49:16 +0000 (15:49 -0400)] 
cryptenroll: add support for calculated TPM2 enrollment

Instead of enrolling the local TPM to a luks volume, use the public key from a
TPM to enroll it into the luks volume. This is useful when enrolling a TPM that
is not currently accessible, for example if the TPM is located on a different
system.

7 months agoNEWS: fix strange line break
Zbigniew Jędrzejewski-Szmek [Tue, 7 Nov 2023 16:58:51 +0000 (17:58 +0100)] 
NEWS: fix strange line break

7 months agosd-dhcp-client: unconditionally set sd_dhcp_client.request_sent when a packet is...
Yu Watanabe [Tue, 7 Nov 2023 17:14:59 +0000 (02:14 +0900)] 
sd-dhcp-client: unconditionally set sd_dhcp_client.request_sent when a packet is sent

If a server replies an ACK for the initial DISCOVER, previously
request_sent was not set, so networkd handle the lease timed out.

Follow-up for 808b65a08729caa268efd57c478285ee4912d5a3.

7 months agotpm2: update test-tpm2 for tpm2_calculate_seal()
Dan Streetman [Tue, 3 Oct 2023 14:25:19 +0000 (10:25 -0400)] 
tpm2: update test-tpm2 for tpm2_calculate_seal()

Add testing for tpm2_calculate_seal().

7 months agotpm2: add tpm2_calculate_seal() and helper functions
Dan Streetman [Wed, 28 Jun 2023 15:46:31 +0000 (11:46 -0400)] 
tpm2: add tpm2_calculate_seal() and helper functions

Add functions to calculate a sealed secret object.

7 months agotpm2: add tpm2_sym_alg_*_string() and tpm2_sym_mode_*_string()
Dan Streetman [Mon, 6 Nov 2023 18:40:11 +0000 (13:40 -0500)] 
tpm2: add tpm2_sym_alg_*_string() and tpm2_sym_mode_*_string()

Add functions to convert between alg id and string name for symmetric
algorithms and symmetric encryption modes.

7 months agotpm2: add test to verify srk templates
Dan Streetman [Tue, 3 Oct 2023 14:25:19 +0000 (10:25 -0400)] 
tpm2: add test to verify srk templates

Verify the tpm2_get_srk_template() and tpm2_get_best_srk_template() functions
work as expected.

7 months agotpm2: allow using tpm2_get_srk_template() without tpm
Dan Streetman [Tue, 3 Oct 2023 14:25:19 +0000 (10:25 -0400)] 
tpm2: allow using tpm2_get_srk_template() without tpm

The SRK templates are defined by specification, so move the check for TPM
support to the tpm2_get_best_srk_template() function, and allow anyone to get
the ECC and RSA templates.

Also add test to verify the SRK templates are correct.

7 months agocoredumpctl: propagate SIGTERM to the debugger process
Frantisek Sumsal [Tue, 7 Nov 2023 11:06:02 +0000 (12:06 +0100)] 
coredumpctl: propagate SIGTERM to the debugger process

If we're waiting for the debugger process to exit and receive SIGTERM,
propagate it to all processes in our process group, including the
debugger, so we can follow it up with a proper cleanup.

Resolves: #28772

7 months agosd-dhcp-client: gracefully ignore OFFER with Rapid Commit option
Yu Watanabe [Tue, 7 Nov 2023 13:41:37 +0000 (22:41 +0900)] 
sd-dhcp-client: gracefully ignore OFFER with Rapid Commit option

Fixes #29904.

7 months agoMerge pull request #29907 from poettering/dispatch-uint64_t-as-string
Lennart Poettering [Tue, 7 Nov 2023 15:13:34 +0000 (16:13 +0100)] 
Merge pull request #29907 from poettering/dispatch-uint64_t-as-string

teach json_dispatch_uint64() to parse decimal strings

7 months agoupdate CI 29876/head
Lennart Poettering [Tue, 7 Nov 2023 14:58:32 +0000 (15:58 +0100)] 
update CI

7 months agoupdate TODO
Lennart Poettering [Tue, 7 Nov 2023 11:14:30 +0000 (12:14 +0100)] 
update TODO

7 months agoman: document /usr/lib/modules/ paths as recommend copy source for kernel-install
Lennart Poettering [Mon, 6 Nov 2023 11:03:03 +0000 (12:03 +0100)] 
man: document /usr/lib/modules/ paths as recommend copy source for kernel-install

7 months agokernel-install: make "inspect" work more like "add" regarding omission of parameters
Lennart Poettering [Mon, 6 Nov 2023 17:25:46 +0000 (18:25 +0100)] 
kernel-install: make "inspect" work more like "add" regarding omission of parameters

This makes "kernel-install inspect" work more "kernel-install add": if
the version or kernel image is specified as "-" or omitted we'll make it
up.

7 months agokernel-install: add add-all verb
Lennart Poettering [Mon, 6 Nov 2023 10:34:11 +0000 (11:34 +0100)] 
kernel-install: add add-all verb

7 months agokernel-install: make version/kernel image parameters optional for "add"
Lennart Poettering [Mon, 6 Nov 2023 09:47:10 +0000 (10:47 +0100)] 
kernel-install: make version/kernel image parameters optional for "add"

Let's make kernel-install a bit easier to use:

If the kernel version is not specified, let's imply "uname -r", so that
we regnerate the entries for the current kernel.

If the kernel image is not specified let's imply using
/usr/lib/modules/$version/vmlinuz, i.e. the location distros like Fedora
drop the kernel into, which we generally recommend people to use.

If the kernel is not found there, don't try to automatically pick the
kernel path, and fail, as before.

7 months agokernel-install: add command to list installed kernels
Lennart Poettering [Mon, 6 Nov 2023 09:30:58 +0000 (10:30 +0100)] 
kernel-install: add command to list installed kernels

This simply dumps the dirs in /usr/lib/modules/ and whether they contain
a vmlinuz binary.

7 months agotree-wide: take in all *our* JSON structures also decimal strings 29907/head
Lennart Poettering [Tue, 7 Nov 2023 13:17:10 +0000 (14:17 +0100)] 
tree-wide: take in all *our* JSON structures also decimal strings

Let's be friendly in what we accept: whenever we define a JSON
structure, let's also allow decimal strings where we want an integer.

This patch purely replaces JSON_VARIANT_UNSIGNED by
_JSON_VARIANT_TYPE_INVALID in the various JsonDispatch[] tables, so that
we'll happily accept any type in json_dispatch(), so that
json_dispatch_uint64() and related tools can do their thing.

This does not switch over OCI (as a JSON structure not defined by us).

7 months agojson: teach dispatch logic to also take numbers formatted as strings
Lennart Poettering [Tue, 7 Nov 2023 12:14:43 +0000 (13:14 +0100)] 
json: teach dispatch logic to also take numbers formatted as strings

JSON famously is problematic with integers beyond 53 bits, because
JavaScript stores everything in double precision floating points.
Various implementations in other languages can deal with signed 64 bit
integers, and a few can deal with unsigned 64bit too (like ours).

Typically program that need more then 53 bit of accuracy encode integers
as decimal strings, to make sure that even if consumers can't really
process larger values they at least won't corrupt the data while passing
it along. This is also recommended by JSON-I (RFC 7493)

To maximize compatibility with other implementations let's add 1st class
parsing support for such objects in the json_dispatch() API.

This makes json_dispatch_uint64() and related calls parse such
integers-formatted-as-decimal-strings as uint64_t. This logic will only
be enabled if the "type" field of JsonDispatch is left unspecified (i.e.
set to negative/_JSON_VARIANT_TYPE_INVALID) though, hence alone does not
change anything in effect.

This purely is about consuming such values, whether we should genreate
them also is a discussion for a separate PR.

7 months agostring-util: add strdup_or_null() helper
Lennart Poettering [Mon, 6 Nov 2023 10:33:51 +0000 (11:33 +0100)] 
string-util: add strdup_or_null() helper

7 months agobootspec: fix typo
Antonio Alvarez Feijoo [Tue, 7 Nov 2023 08:55:56 +0000 (09:55 +0100)] 
bootspec: fix typo

7 months agotest-execute: add no_new_privs tests for SystemCallFilter 6763/head
Iago López Galeiras [Wed, 20 Sep 2023 09:40:47 +0000 (11:40 +0200)] 
test-execute: add no_new_privs tests for SystemCallFilter

When starting a service with a non-root user and a SystemCallFilter and
other settings (like ProtectClock), the no_new_privs flag should not be set.

Also, test that CapabilityBoundingSet behaves correctly, since we need
to preserve some capabilities to do the seccomp filter and restore the
ones set by the service before executing.

7 months agocore: allow using seccomp without no_new_privs when unprivileged
Iago López Galeiras [Tue, 7 Nov 2023 10:06:56 +0000 (11:06 +0100)] 
core: allow using seccomp without no_new_privs when unprivileged

Until now, using any form of seccomp while being unprivileged (User=)
resulted in systemd enabling no_new_privs.

There's no need for doing this because:

* We trust the filters we apply
* If User= is set and a process wants to apply a new seccomp filter, it
will need to set no_new_privs itself

An example of application that might want seccomp + !no_new_privs is a
program that wants to run as an unprivileged user but uses file
capabilities to start a web server on a privileged port while
benefitting from a restrictive seccomp profile.

We now keep the privileges needed to do seccomp before calling
enforce_user() and drop them after the seccomp filters are applied.

If the syscall filter doesn't allow the needed syscalls to drop the
privileges, we keep the previous behavior by enabling no_new_privs.

7 months agoTODO: fix more typos
Diego Viola [Tue, 7 Nov 2023 09:29:24 +0000 (06:29 -0300)] 
TODO: fix more typos

7 months agoTODO: fix typos
Diego Viola [Tue, 7 Nov 2023 07:46:39 +0000 (04:46 -0300)] 
TODO: fix typos

7 months agoMerge pull request #29879 from Flowdalic/cgroup-memory-peak
Mike Yuan [Tue, 7 Nov 2023 01:53:57 +0000 (09:53 +0800)] 
Merge pull request #29879 from Flowdalic/cgroup-memory-peak

cgroup: add support for memory.peak

7 months agoMerge pull request #29888 from mrc0mmand/network-generator
Luca Boccassi [Tue, 7 Nov 2023 00:10:43 +0000 (00:10 +0000)] 
Merge pull request #29888 from mrc0mmand/network-generator

test: add a couple of tests for systemd-network-generator

7 months agokernel-install: Add --root, --image and --image-policy
Daan De Meyer [Wed, 25 Oct 2023 07:57:44 +0000 (09:57 +0200)] 
kernel-install: Add --root, --image and --image-policy

Currently only supported for the "inspect" verb as "add" and "remove"
require figuring out what to do with plugins.

7 months agoresolve: use exact-match domain as routing domain for single-labels
Tad Fisher [Fri, 6 Oct 2023 20:52:07 +0000 (13:52 -0700)] 
resolve: use exact-match domain as routing domain for single-labels

With ResolveUnicastSingleLabel=yes, a scope's search domains are affixed to the
query even when a routing domain matches the single-label query name,
preventing the use of dotless single-label domains entirely.

This changes dns_scope_name_wants_search_domain() to return false when the
scope contains an exact match of the single-label name in the query, allowing
lookups for dotless domains with ResolveUnicastSingleLabel enabled.

7 months agoMerge pull request #29882 from keszybz/documentation-cleanup
Luca Boccassi [Mon, 6 Nov 2023 21:24:08 +0000 (21:24 +0000)] 
Merge pull request #29882 from keszybz/documentation-cleanup

Documentation cleanup

7 months agotest: wait for the "latest" systemd-bsod message
Frantisek Sumsal [Mon, 6 Nov 2023 19:00:09 +0000 (20:00 +0100)] 
test: wait for the "latest" systemd-bsod message

Let's wait for the "latest" message systemd-bsod prints to the console
to appear, otherwise we might be too fast and take a console snapshot
before it contains all the information:

[   44.237788] testsuite-04.sh[1744]: + setterm --term linux --dump --file /tmp/console.dump
[   44.246089] systemd-bsod[1858]: QR code could not be printed, ignoring: Operation not supported
[   44.305692] testsuite-04.sh[1744]: + grep -aq 'The current boot has failed' /tmp/console.dump
[   44.308047] testsuite-04.sh[1744]: + grep -aq 'Service emergency message' /tmp/console.dump
[   44.311200] testsuite-04.sh[1744]: + grep -aq 'Press any key to exit' /tmp/console.dump
[   44.314359] testsuite-04.sh[1744]: + at_exit
[   44.315087] testsuite-04.sh[1744]: + local EC=1
[   44.315945] testsuite-04.sh[1744]: + [[ 1 -ne 0 ]]
[   44.316647] testsuite-04.sh[1744]: + [[ -e /tmp/console.dump ]]
[   44.318305] testsuite-04.sh[1744]: + cat /tmp/console.dump
[   44.319320] testsuite-04.sh[1871]:    The current boot has failed!
[   44.319970] testsuite-04.sh[1871]:    Service emergency message

7 months agotest-network: test MultiPathRoute= via another interface
Yu Watanabe [Mon, 6 Nov 2023 18:20:38 +0000 (03:20 +0900)] 
test-network: test MultiPathRoute= via another interface

Prompted by https://github.com/systemd/systemd/pull/14194#issuecomment-1795489641.

7 months agotest: add a couple of tests for systemd-network-generator 29888/head
Frantisek Sumsal [Mon, 6 Nov 2023 16:49:17 +0000 (17:49 +0100)] 
test: add a couple of tests for systemd-network-generator

Only for ip= stuff, for now.

7 months agoMerge pull request #29894 from bluca/typo
Luca Boccassi [Mon, 6 Nov 2023 20:29:16 +0000 (20:29 +0000)] 
Merge pull request #29894 from bluca/typo

udev/man typos

7 months agoman/systemd-stub: split and simplify a wall'o'text paragraph 29882/head
Zbigniew Jędrzejewski-Szmek [Mon, 6 Nov 2023 14:02:51 +0000 (15:02 +0100)] 
man/systemd-stub: split and simplify a wall'o'text paragraph

7 months agoman/networkctl,systemd-soft-reboot: capitalize and add periods
Zbigniew Jędrzejewski-Szmek [Mon, 6 Nov 2023 14:02:20 +0000 (15:02 +0100)] 
man/networkctl,systemd-soft-reboot: capitalize and add periods

We added version information, so now each bullet point contains multiple
paragraphs, so we need proper sentences.

7 months agoman: "Documentation" is not part of the title
Zbigniew Jędrzejewski-Szmek [Mon, 6 Nov 2023 14:00:46 +0000 (15:00 +0100)] 
man: "Documentation" is not part of the title

<ulinks> contents are used to generate a SEE ALSO section at the
bottom of a man page, so we need to include the title, without additional
words, in the content.

7 months agoman: more hyperlinks and other fixes
Zbigniew Jędrzejewski-Szmek [Mon, 6 Nov 2023 13:59:00 +0000 (14:59 +0100)] 
man: more hyperlinks and other fixes

Closes https://github.com/systemd/systemd/issues/29814.

7 months agotree-wide: s/life-cycle/lifecycle/g
Zbigniew Jędrzejewski-Szmek [Mon, 6 Nov 2023 13:52:01 +0000 (14:52 +0100)] 
tree-wide: s/life-cycle/lifecycle/g

7 months agodocs: fix title levels, remove unneded words
Zbigniew Jędrzejewski-Szmek [Mon, 6 Nov 2023 13:50:03 +0000 (14:50 +0100)] 
docs: fix title levels, remove unneded words

The title applies to the whole page, not just the first section.
And there should be just one title ('# foo') in a given document.

7 months agoman: use meaningful titles for <ulink>s
Zbigniew Jędrzejewski-Szmek [Mon, 6 Nov 2023 11:43:40 +0000 (12:43 +0100)] 
man: use meaningful titles for <ulink>s

As pointed out in https://github.com/systemd/systemd/issues/29814, we need to
use phrases are are meaningful on their own, because the man page formatter
creates a list at the bottom. With <ulink>see docs</ulink>, we end up with:
  NOTES:
    1. see docs
       https://some.url/page
    2. see docs
       https://some.url/page2
which is not very useful :(

Also, the text inside the tag should not include punctuation.

Python helper:
  from xml_helper import xml_parse
  for p in glob.glob('../man/*.xml'):
       t = xml_parse(p)
       ulinks = t.iterfind('.//ulink')
       for ulink in ulinks:
           if ulink.text is None: continue
           text = ' '.join(ulink.text.split())
           print(f'{p}: {text}')

7 months agoRevert "mkosi: Use cache and build subdirectories"
Daan De Meyer [Mon, 6 Nov 2023 18:24:00 +0000 (19:24 +0100)] 
Revert "mkosi: Use cache and build subdirectories"

We're not going ahead with the corresponding change in mkosi
after all so revert the preparatory change in systemd as well.

This reverts commit f756bcdf17915ffb3b8e3e21b4aa2b53ccaaac1a.

7 months agotest: fix build without SBAT_DISTRO
Luca Boccassi [Mon, 6 Nov 2023 16:31:50 +0000 (16:31 +0000)] 
test: fix build without SBAT_DISTRO

Follow-up for c9bebec872

7 months agoman: fix typo 29894/head
Luca Boccassi [Mon, 6 Nov 2023 18:50:30 +0000 (18:50 +0000)] 
man: fix typo

allows to -> allows one to

7 months agoudev: ressize -> result_size
Luca Boccassi [Mon, 6 Nov 2023 18:48:25 +0000 (18:48 +0000)] 
udev: ressize -> result_size

Lintian flags it as a typo of 'resize', so rename it and make it clearer too

7 months agorun: include peak memory in output 29879/head
Florian Schmaus [Mon, 6 Nov 2023 16:28:41 +0000 (17:28 +0100)] 
run: include peak memory in output

Fixes #28542.

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
7 months agocore: include peak memory in unit_log_resources()
Florian Schmaus [Mon, 6 Nov 2023 16:24:14 +0000 (17:24 +0100)] 
core: include peak memory in unit_log_resources()

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
7 months agocgroup: add support for memory.peak
Florian Schmaus [Mon, 6 Nov 2023 12:15:55 +0000 (13:15 +0100)] 
cgroup: add support for memory.peak

Linux's Control Group v2 interfaces exposes memory.peak, which contains the
"max memory usage recorded for the cgroup and its descendants since the
creation of the cgroup."

This commit adds a new property "MemoryPeak" for units and makes "systemctl
show" display this value if it is available.

Fixes #29878.

Signed-off-by: Florian Schmaus <flo@geekplace.eu>
7 months agonetwork-generator: allow specifying MAC address without MTU
Frantisek Sumsal [Mon, 6 Nov 2023 16:46:59 +0000 (17:46 +0100)] 
network-generator: allow specifying MAC address without MTU

Also, don't panic when both optional arguments are empty. This should
make the syntax compatible-ish with the dracut one from dracut.cmdline(7).

Resolves: #29855

7 months agonetwork-generator: correctly handle IPv6 DNS servers in ip=
Frantisek Sumsal [Mon, 6 Nov 2023 16:05:11 +0000 (17:05 +0100)] 
network-generator: correctly handle IPv6 DNS servers in ip=

IPv6 addresses in the ip= assignment need to be enclosed in [], which
was handled for all IP-related fields except for the two optional DNS
fields.

7 months agologin: switch an if condition to a switch statement
Peter Hutterer [Wed, 1 Nov 2023 01:57:21 +0000 (11:57 +1000)] 
login: switch an if condition to a switch statement

No functional changes but makes the code more readable once we expand
the list of device types.

7 months agoupdate TODO
Lennart Poettering [Mon, 6 Nov 2023 16:37:21 +0000 (17:37 +0100)] 
update TODO

7 months agotcrypt: try all entered passphrases instead of just the first one (#29837)
jjimbo137 [Mon, 6 Nov 2023 16:39:01 +0000 (11:39 -0500)] 
tcrypt: try all entered passphrases instead of just the first one (#29837)

Previously only the first entered passphrase would be used.  Add the ability to check all the passwords entered by the user.  The total number of passwords entered is still limited by passphrase entry limit.

7 months agobootctl: fix -q option
Antonio Alvarez Feijoo [Mon, 6 Nov 2023 13:54:42 +0000 (14:54 +0100)] 
bootctl: fix -q option

Follow up to 14e6e444dd9eaa0db229548c31baecd75de4478e

7 months agoman/bootctl: fix --dry-run entry
Antonio Alvarez Feijoo [Mon, 6 Nov 2023 15:32:49 +0000 (16:32 +0100)] 
man/bootctl: fix --dry-run entry

Fixes 8702496bfb0205764569782a9a2ebd11fd80e5e8

7 months agoman/measure: document --uname
Antonio Alvarez Feijoo [Mon, 6 Nov 2023 14:29:23 +0000 (15:29 +0100)] 
man/measure: document --uname

Follow up to b6f2e6860220aa89550f690b12246c4e8eb6e908

7 months agoMerge pull request #29675 from DaanDeMeyer/kernel-install-json
Yu Watanabe [Mon, 6 Nov 2023 16:07:03 +0000 (01:07 +0900)] 
Merge pull request #29675 from DaanDeMeyer/kernel-install-json

kernel-install: Add --json option for inspect verb

7 months agoMerge pull request #29872 from yuwata/udevadm-trigger-receive-buffer-size
Luca Boccassi [Mon, 6 Nov 2023 14:43:23 +0000 (14:43 +0000)] 
Merge pull request #29872 from yuwata/udevadm-trigger-receive-buffer-size

udevadm-trigger: extend receive buffer size

7 months agopcrlock: show emojis for each PCR line
Lennart Poettering [Mon, 6 Nov 2023 12:32:02 +0000 (13:32 +0100)] 
pcrlock: show emojis for each PCR line

I am sorry, I totally forgot adding emojis reflecting the state of each
PCR. I hope I can do better in future, and hereby I'd like to rectify
the situation a bit.