]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agomkosi: Add bpftool to final image
Daan De Meyer [Mon, 12 Jun 2023 12:40:54 +0000 (14:40 +0200)] 
mkosi: Add bpftool to final image

Useful for debugging bpf.

3 years agomkosi: Add socat to the final image
Daan De Meyer [Thu, 8 Jun 2023 14:32:24 +0000 (16:32 +0200)] 
mkosi: Add socat to the final image

Useful for debugging vsock stuff

3 years agoMerge pull request #28010 from DaanDeMeyer/vsock-type
Daan De Meyer [Tue, 13 Jun 2023 13:41:58 +0000 (15:41 +0200)] 
Merge pull request #28010 from DaanDeMeyer/vsock-type

Vsock improvements

3 years agoudevadm-control: fix error message
David Tardon [Tue, 13 Jun 2023 13:31:20 +0000 (15:31 +0200)] 
udevadm-control: fix error message

Extracted from #25523 by Lennart.

3 years agosd-daemon: Add vsock fallback to SOCK_STREAM 28010/head
Daan De Meyer [Tue, 13 Jun 2023 08:26:00 +0000 (10:26 +0200)] 
sd-daemon: Add vsock fallback to SOCK_STREAM

SOCK_SEQPACKET is only supported on recent kernels. Let's add a
fallback to SOCK_STREAM if it is not supported.

To accomodate SOCK_STREAM, we also modify
pid_notify_with_fds_internal() to do sendmsg() in a loop as with
SOCK_STREAM, sendmsg() is not guaranteed to write all data in a single
syscall or fail otherwise.

3 years agosd-daemon: Use socket type from vsock address if set
Daan De Meyer [Mon, 12 Jun 2023 16:21:08 +0000 (18:21 +0200)] 
sd-daemon: Use socket type from vsock address if set

If a socket type is explicitly provided in the vsock address, let's
make sure we try only that socket type.

3 years agosocket-util: Allow specifying socket type in vsock address
Daan De Meyer [Tue, 13 Jun 2023 08:03:44 +0000 (10:03 +0200)] 
socket-util: Allow specifying socket type in vsock address

3 years agosocket: bump listen() backlog to INT_MAX everywhere
Lennart Poettering [Tue, 13 Jun 2023 08:15:59 +0000 (10:15 +0200)] 
socket: bump listen() backlog to INT_MAX everywhere

This is a rework of #24764 by Cristian Rodríguez
<crodriguez@owncloud.com>, which stalled.

Instead of assigning -1 we'll use a macro defined to INT_MAX however.

3 years agoMerge pull request #28014 from bluca/portable_fixes
Lennart Poettering [Tue, 13 Jun 2023 11:19:02 +0000 (13:19 +0200)] 
Merge pull request #28014 from bluca/portable_fixes

portabled fixes

3 years agoMerge pull request #28017 from poettering/link-tmpfile-flags
Lennart Poettering [Tue, 13 Jun 2023 11:18:42 +0000 (13:18 +0200)] 
Merge pull request #28017 from poettering/link-tmpfile-flags

teach link_tmpfile_at() to properly sync

3 years agoportable: make sure to fsync after extracting/copying 28014/head
Luca Boccassi [Mon, 12 Jun 2023 22:51:51 +0000 (23:51 +0100)] 
portable: make sure to fsync after extracting/copying

Just in case we are on a flimsy filesystem/disk

3 years agotest: re-enable TEST-02 on ppc64le 27952/head
Frantisek Sumsal [Mon, 12 Jun 2023 13:43:54 +0000 (15:43 +0200)] 
test: re-enable TEST-02 on ppc64le

3 years agotest: make sure ping works for unprivileged users
Frantisek Sumsal [Mon, 12 Jun 2023 12:13:25 +0000 (14:13 +0200)] 
test: make sure ping works for unprivileged users

3 years agotest: copy file xattrs (if any) as well
Frantisek Sumsal [Mon, 12 Jun 2023 11:21:11 +0000 (13:21 +0200)] 
test: copy file xattrs (if any) as well

3 years agotest: merge TEST-61-UNITTESTS-QEMU with TEST-02-UNITTESTS
Frantisek Sumsal [Wed, 7 Jun 2023 11:51:02 +0000 (13:51 +0200)] 
test: merge TEST-61-UNITTESTS-QEMU with TEST-02-UNITTESTS

The test was originally introduced for Ubuntu CI, as it uses
PREFER_NSPAWN=1, but it was subsequently disabled two years ago [0], so
it was pretty much useless. Let's merge it into TEST-02 and tweak it a
bit to run only certain tests under QEMU when $TEST_PREFER_NSPAWN is
set.

[0] b152adbfa9b708dade8559b9962241902bf2eb7c

3 years agoproc-cmdline: parse the whole /proc/cmdline
Frantisek Sumsal [Mon, 12 Jun 2023 19:05:30 +0000 (21:05 +0200)] 
proc-cmdline: parse the whole /proc/cmdline

The kernel command line may contain newlines which kernel happily
accepts, but we'd ignore everything past the first newline. Let's fix
that by replacing read_one_line_file() with read_full_file().

3 years agotree-wide: start properly syncing at various places we so far didn't 28017/head
Lennart Poettering [Tue, 13 Jun 2023 07:49:50 +0000 (09:49 +0200)] 
tree-wide: start properly syncing at various places we so far didn't

Let's better be safe than sorry, and install files fully safely now that
is is easy.

3 years agocoredump: port over code to new LINK_TMPFILE_SYNC flag
Lennart Poettering [Tue, 13 Jun 2023 07:49:35 +0000 (09:49 +0200)] 
coredump: port over code to new LINK_TMPFILE_SYNC flag

3 years agotmpfile-util: add new LINK_TMPFILE_SYNC flag for syncing properly before/after linkin...
Lennart Poettering [Tue, 13 Jun 2023 07:45:39 +0000 (09:45 +0200)] 
tmpfile-util: add new LINK_TMPFILE_SYNC flag for syncing properly before/after linking in the file

This syncs the data before linking it in, and both data + dir once done.
This should give us proper semantics for installing files safely into
the fs.

3 years agotmpfile-util: turn last parameter of link_tmpfile() into a proper flags
Lennart Poettering [Tue, 13 Jun 2023 07:40:53 +0000 (09:40 +0200)] 
tmpfile-util: turn last parameter of link_tmpfile() into a proper flags

This changes a boolean param into a proper bitflag field.

Given this only defines a single flag for now this doesn't look like
much of an improvement. But we'll add another flag shortly, where it
starts to make more sense.

3 years agoportable: do not extract empty unit files
Luca Boccassi [Mon, 12 Jun 2023 22:47:03 +0000 (23:47 +0100)] 
portable: do not extract empty unit files

Bare minimum sanity check, an empty unit is an invalid unit so
skip it early.

3 years agoupdate TODO
Lennart Poettering [Mon, 12 Jun 2023 21:00:47 +0000 (23:00 +0200)] 
update TODO

3 years agoresolvectl: add resolvectl command for dumping cache contents 28012/head
Lennart Poettering [Mon, 12 Jun 2023 14:46:04 +0000 (16:46 +0200)] 
resolvectl: add resolvectl command for dumping cache contents

A wrapper around the new varlink call, showing the data either in its
native JSON or in a more human readable textual form.

3 years agoresolved: add DNS_RESOURCE_KEY_TO_STRING() macro helper
Lennart Poettering [Mon, 12 Jun 2023 14:45:25 +0000 (16:45 +0200)] 
resolved: add DNS_RESOURCE_KEY_TO_STRING() macro helper

This does the usual compound init trick to get formatted strings of
stuff.

We should probably port various pieces of code over to using this.

3 years agoresolved: add dns_resource_key_from_json() helper
Lennart Poettering [Mon, 12 Jun 2023 14:44:40 +0000 (16:44 +0200)] 
resolved: add dns_resource_key_from_json() helper

It reverse what dns_resource_key_to_json(), i.e. turns JSON data into a
parsed DnsResourceKey object.

Ultimately this just moves a client-side local wrapper into generic
code. Nothing truly new here.

3 years agoresolved: add DumpCache varlink call for acquiring a complete dump of all of resolved...
Lennart Poettering [Mon, 12 Jun 2023 14:40:59 +0000 (16:40 +0200)] 
resolved: add DumpCache varlink call for acquiring a complete dump of all of resolved's RR caches

This adds a simple varlink call io.systemd.Resolve.Monitor.DumpCache to
the existing io.systemd.Resolve.Monitor service. It compiles a JSON
object containing the per-scope cache entries and returns it.

Replaces: #20053 #19104

Fixes: #14796
3 years agoboot: Unify protocol opening
Jan Janssen [Mon, 12 Jun 2023 13:12:05 +0000 (15:12 +0200)] 
boot: Unify protocol opening

We are using HandleProtocol everywhere except in these few cases. This
unifies on HandleProtocol as it is simpler to use and equivalent to
OpenProtocol.

The only difference between the two is that OpenProtocol attributes the
opened protocol to a firmware-owned handle instead of our image handle.
This has no real use for regular UEFI applications as any protocols
opened via BY_HANDLE or GET_PROTOCOL is not required to be closed. In
fact, when a protocol is uninstalled it will do nothing more than reduce
the open count for these.

3 years agojson: add json_dispatch_variant_noref() helper
Lennart Poettering [Mon, 12 Jun 2023 14:37:37 +0000 (16:37 +0200)] 
json: add json_dispatch_variant_noref() helper

This is identical to json_dispatch_variant() but doesn't increase the
ref counter of the variant. This is useful for taking JSON objects apart
locally without the intention to keep any component pinned for longer
than the local stack frame.

3 years agoman: explain timesyncd epoch mtime touch files in a bit more detail
Lennart Poettering [Mon, 12 Jun 2023 12:06:10 +0000 (14:06 +0200)] 
man: explain timesyncd epoch mtime touch files in a bit more detail

Let's mention what /usr/lib/clock-epoch precisely does, and underline we
only *advance* the time based on it.

Inspired by Darkdragon-001's #23214.

Replaces #23214

3 years agoMerge pull request #27989 from poettering/message-append-string-set
Lennart Poettering [Mon, 12 Jun 2023 12:12:05 +0000 (14:12 +0200)] 
Merge pull request #27989 from poettering/message-append-string-set

common helpers for serializing Set of strings into bus message

3 years agobus-util: add bus_property_get_string_set() helper 27989/head
Lennart Poettering [Fri, 9 Jun 2023 19:45:31 +0000 (21:45 +0200)] 
bus-util: add bus_property_get_string_set() helper

This is a common implementation of a property getter for a Set of
strings.

3 years agobus-util: add bus_message_append_string_set() helper
Lennart Poettering [Fri, 9 Jun 2023 17:12:51 +0000 (19:12 +0200)] 
bus-util: add bus_message_append_string_set() helper

This new helper adds all strings from a Set object as a string array to
a message.

Various places where we have similar code are then ported over to this.

3 years agoukify: move verb mangling to finalize_options()
Zbigniew Jędrzejewski-Szmek [Wed, 7 Jun 2023 07:10:49 +0000 (09:10 +0200)] 
ukify: move verb mangling to finalize_options()

This simplifies the logic: finalize_options() is the step that does the
checks and the mangling. The checks for consistency are done in more places,
so we need to pass a verb (we only have 'build', but once we add other verbs,
any would do).

3 years agoukify: split out iteration over phase path groups and keys
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jun 2023 19:03:10 +0000 (21:03 +0200)] 
ukify: split out iteration over phase path groups and keys

In preparation for future changes.

3 years agoman,test: root or hardware is not needed for ukify
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jun 2023 18:32:33 +0000 (20:32 +0200)] 
man,test: root or hardware is not needed for ukify

3 years agoukify: fix synopsis in --help
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jun 2023 18:27:48 +0000 (20:27 +0200)] 
ukify: fix synopsis in --help

Missed in a3b227d28a823d59e3281109f5369d0f63b40f62.

3 years agoukify: use pager for --help
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jun 2023 15:32:47 +0000 (17:32 +0200)] 
ukify: use pager for --help

The output is now too long to fit on one page, let's use a pager automatically
like in other places.

The implementation is copied from mkosi, but adjusted to follow what other
systemd tools do.

3 years agomeson: bump required version to 0.56.0 26728/head
Yu Watanabe [Sun, 15 May 2022 18:36:34 +0000 (03:36 +0900)] 
meson: bump required version to 0.56.0

3 years agomeson: bump required version to 0.55.0
Yu Watanabe [Sun, 15 May 2022 18:22:33 +0000 (03:22 +0900)] 
meson: bump required version to 0.55.0

3 years agomeson: bump required version to 0.54.0
Yu Watanabe [Sun, 15 May 2022 18:21:16 +0000 (03:21 +0900)] 
meson: bump required version to 0.54.0

3 years agomeson: define _GNU_SOURCE as '1'
Zbigniew Jędrzejewski-Szmek [Mon, 12 Jun 2023 08:45:48 +0000 (10:45 +0200)] 
meson: define _GNU_SOURCE as '1'

This changes the generated config.h file thusly:
-#define _GNU_SOURCE
+#define _GNU_SOURCE 1

Canonically, _GNU_SOURCE is just defined, without any value, but g++ defines
_GNU_SOURCE implicitly [1]. This causes a warning about a redefinition during
complilation of C++ programs after '-include config.h'. Our config attempts to
inject this (and a bunch of other arguments) into all compliations. But before
meson 0.54, flags for dependencies were not propagated correctly (*), and the C++
compilation was done without various flags (**). Once that was fixed, we started
getting a warning.

[1] http://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.predefined
(*) Actually, the changelog doesn't say anything. But it mentions various work
    related to dependency propagation, and apparently this changes as a side
    effect.
(**) -fno-strict-aliasing
    -fstrict-flex-arrays=1
    -fvisibility=hidden
    -fno-omit-frame-pointer
    -include config.h

This could be solved in various ways, but it'd require either making the
compilation command line longer, which we want to avoid for readability of the
build logs, or splitting the logic to define the args for C++ progs separately,
which would make our meson.build files more complicated. Changing the
definition to '1' also solves the issue (because apparently now we match the
implicit definition), and shouldn't have other effects. I checked compilation
with gcc and clang. Maybe on other systems this could cause problems. We can
revisit if people report issues.

3 years agotest: drop test for IFLA_NUM_RX_QUEUES
Yu Watanabe [Sat, 10 Jun 2023 07:45:02 +0000 (16:45 +0900)] 
test: drop test for IFLA_NUM_RX_QUEUES

The attribute is not included in the netlink message if the kernel
built with CONFIG_RPS disabled.

Fixes #27969.

3 years agomeson: add systemd.pc and udev.pc to 'devel' target/tag
Luca Boccassi [Sun, 11 Jun 2023 23:41:49 +0000 (00:41 +0100)] 
meson: add systemd.pc and udev.pc to 'devel' target/tag

Same as the other pkg-config files, it is useful to install these in a specific
target that doesn't require compiling anything

3 years agotest: make coverage runs happy again
Frantisek Sumsal [Sun, 11 Jun 2023 07:02:52 +0000 (09:02 +0200)] 
test: make coverage runs happy again

3 years agoMerge pull request #27980 from bluca/tests
Yu Watanabe [Sat, 10 Jun 2023 08:46:10 +0000 (17:46 +0900)] 
Merge pull request #27980 from bluca/tests

add unit tests for *DirectorySymlink= and deserialize_strv helper

3 years agoexecute: fix minor type confusion
Lennart Poettering [Fri, 9 Jun 2023 19:57:51 +0000 (21:57 +0200)] 
execute: fix minor type confusion

The .gl_pathc field is size_t, hence count in size_t too, to not
accidentally drop 32 of 64bits on the floor.

3 years agohwdb: fix arrow keys on HP Elite Dragonfly G3
Benjamin Raison [Fri, 9 Jun 2023 22:34:28 +0000 (00:34 +0200)] 
hwdb: fix arrow keys on HP Elite Dragonfly G3

3 years agobattery-util: debug log when we're unsure about the battery level
Mike Yuan [Fri, 9 Jun 2023 16:30:41 +0000 (00:30 +0800)] 
battery-util: debug log when we're unsure about the battery level

3 years agoman: 'flag' parameter in portable1 spec is now used
Luca Boccassi [Fri, 9 Jun 2023 15:14:59 +0000 (16:14 +0100)] 
man: 'flag' parameter in portable1 spec is now used

It has been used for a while, and it is described fully a couple of
paragraphs below, but this snippet was not deleted.

3 years agotree-wide: fix typos of "boottime"/"BOOTTIME"
Nick Rosbrook [Fri, 9 Jun 2023 16:21:11 +0000 (12:21 -0400)] 
tree-wide: fix typos of "boottime"/"BOOTTIME"

3 years agoserialize: add deserialize_strv helper 27980/head
Luca Boccassi [Thu, 1 Jun 2023 18:32:29 +0000 (19:32 +0100)] 
serialize: add deserialize_strv helper

3 years agotest-execute: add unit tests for *DirectorySymlink=
Luca Boccassi [Fri, 2 Jun 2023 22:00:18 +0000 (23:00 +0100)] 
test-execute: add unit tests for *DirectorySymlink=

3 years agoxdg-autostart-generator: extend start timeout
Lennart Poettering [Thu, 8 Jun 2023 13:29:17 +0000 (15:29 +0200)] 
xdg-autostart-generator: extend start timeout

The current start + stop timeouts for xdg autostart files are *very*
short with 5s. On a busy system this might be too easy to hit even in
unintended case.

Apparently, the intention here was to cut the shutdown logic short.
(https://github.com/systemd/systemd/issues/27919#issuecomment-1580576178)
Let's hence stick to the very short timeout for that (under the
assumption that apps are written in a safe enough style to not lose data
if killed too early). But for starting XGD autostrat services, use our
regular timeouts.

See: #27919

3 years agoboot: Fix memory leak
Jan Janssen [Thu, 8 Jun 2023 17:04:22 +0000 (19:04 +0200)] 
boot: Fix memory leak

3 years agoMerge pull request #26059 from DaanDeMeyer/cred-glob
Luca Boccassi [Thu, 8 Jun 2023 19:40:37 +0000 (20:40 +0100)] 
Merge pull request #26059 from DaanDeMeyer/cred-glob

creds: Add ImportCredential=

3 years agoMerge pull request #26848 from yuwata/kernel-install
Luca Boccassi [Thu, 8 Jun 2023 19:23:10 +0000 (20:23 +0100)] 
Merge pull request #26848 from yuwata/kernel-install

kernel-install: rewrite in C

3 years agointegritysetup: support mode=(journal|bitmap|direct)
Alfred Klomp [Thu, 8 Jun 2023 11:26:24 +0000 (13:26 +0200)] 
integritysetup: support mode=(journal|bitmap|direct)

Add a parameter to the integritytab file to set the mode in which to
open the integrity volume. The mode can be journaled (the default),
bitmap without a journal, or direct mode without a journal or a bitmap.

This change removes the `no-journal' option because it is redundant,
being replaced with `mode=direct'.

Supercedes commit bcc1ee56c, from a week ago, which implemented
`no-journal'.

Resolves #27587

3 years agoman/os-release: Add VENDOR_NAME= and VENDOR_URL= keys to os-release
Philip Withnall [Wed, 31 May 2023 14:49:42 +0000 (15:49 +0100)] 
man/os-release: Add VENDOR_NAME= and VENDOR_URL= keys to os-release

These will be used in UIs to refer to the company or organization which
produces the OS separately from referring to the OS itself.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Fixes: #27777
3 years agoman: document that "systemctl mask" doesn't work for units whose file is in /etc
Lennart Poettering [Thu, 8 Jun 2023 14:59:15 +0000 (16:59 +0200)] 
man: document that "systemctl mask" doesn't work for units whose file is in /etc

Fixes: #27965
3 years agoMerge pull request #27712 from ddstreet/tpm2_simplify_srk
Luca Boccassi [Thu, 8 Jun 2023 17:52:31 +0000 (18:52 +0100)] 
Merge pull request #27712 from ddstreet/tpm2_simplify_srk

Tpm2 simplify srk

3 years agoac-power: fix a typo
Mike Yuan [Mon, 5 Jun 2023 15:03:58 +0000 (23:03 +0800)] 
ac-power: fix a typo

3 years agoman: reference naming of triggered services of timer unit
Lennart Poettering [Thu, 8 Jun 2023 12:20:42 +0000 (14:20 +0200)] 
man: reference naming of triggered services of timer unit

Fixes: #27116
3 years agoMerge pull request #27968 from poettering/may-gc-tweaks
Lennart Poettering [Thu, 8 Jun 2023 12:54:09 +0000 (14:54 +0200)] 
Merge pull request #27968 from poettering/may-gc-tweaks

pid1: some minor GC logic tweaks

3 years agoMerge pull request #27961 from poettering/journalctl-user-unit-man-fix
Mike Yuan [Thu, 8 Jun 2023 12:19:07 +0000 (20:19 +0800)] 
Merge pull request #27961 from poettering/journalctl-user-unit-man-fix

journalctl: fix --user when invoked by system users

3 years agounits: Use ImportCredential= where applicable 26059/head
Daan De Meyer [Thu, 8 Jun 2023 12:09:36 +0000 (14:09 +0200)] 
units: Use ImportCredential= where applicable

3 years agocreds: Add ImportCredential=
Daan De Meyer [Fri, 13 Jan 2023 15:22:46 +0000 (16:22 +0100)] 
creds: Add ImportCredential=

ImportCredential= takes a credential name and searches for a matching
credential in all the credential stores we know about it. It supports
globs which are expanded so that all matching credentials are loaded.

3 years agotpm2: add tpm2_get_legacy_template() and tpm2_get_srk_template() 27712/head
Dan Streetman [Fri, 17 Feb 2023 17:59:18 +0000 (12:59 -0500)] 
tpm2: add tpm2_get_legacy_template() and tpm2_get_srk_template()

Add functions to get either the 'legacy' or standard SRK template, for RSA or
ECC. The 'legacy' templates are those used with earlier code, where a transient
key was created to use for tpm sealing; the standard SRK is the persistent
shared key as defined in TCG guidance docs.

This also replaces tpm2_get_primary_template() with the new functions; that
function's use of flags is confusing and unnecessary.

3 years agotpm2: add tpm2_read_public()
Dan Streetman [Thu, 18 May 2023 00:03:00 +0000 (20:03 -0400)] 
tpm2: add tpm2_read_public()

3 years agotpm2: add tpm2_get_capability_handle(), tpm2_esys_handle_from_tpm_handle()
Dan Streetman [Fri, 17 Feb 2023 17:50:31 +0000 (12:50 -0500)] 
tpm2: add tpm2_get_capability_handle(), tpm2_esys_handle_from_tpm_handle()

Add tpm2_get_capability_handle() to query if a "TPM handle" (meaning, a
location/address in TPM storage) is populated in the TPM, and
tpm2_get_capability_handles() to query for a specific number of handles.

Add tpm2_esys_handle_from_tpm_handle() to create an "esys handle" (an opaque
reference for use with the TPM EAPI that represents a TPM handle address) for an
existing TPM handle.

Since the TPM handle already exists in the TPM, this also also requires
updating the cleanup code for Tpm2Handle objects to close the object (free its
resources only from the EAPI code, but leave the handle in the TPM) instead of
flush the object (which frees its EAPI resources and removes it from the TPM).

3 years agoexecute: Make credential_search_path() more flexible
Daan De Meyer [Tue, 17 Jan 2023 10:10:04 +0000 (11:10 +0100)] 
execute: Make credential_search_path() more flexible

Let's also allow looking up only the encrypted credential search
path.

3 years agocore: do not GC units/jobs that are in the D-Bus queue 27968/head
Lennart Poettering [Thu, 8 Jun 2023 09:11:49 +0000 (11:11 +0200)] 
core: do not GC units/jobs that are in the D-Bus queue

Let's make sure that D-Bus messages are always sent out when pending,
before we might GC a unit/job.

This is kinda a follow-up for 8db998981a4fefd0122bcf5f965726b63c9045c2,
and a similar logic really applies: GC should only be done if we
processed everything else, generated evertyhing else and really don't
need it anymore.

3 years agounit: don't gc unit in oom queue
Lennart Poettering [Thu, 8 Jun 2023 09:11:28 +0000 (11:11 +0200)] 
unit: don't gc unit in oom queue

This is a follow-up for 8db998981a4fefd0122bcf5f965726b63c9045c2, and
follows a similar logic: a pending OOM event really trumps everything:
we should not GC a unit while it is pending.

3 years agoman: document how calendar times catch up after system suspend/hibernation
Lennart Poettering [Thu, 8 Jun 2023 08:33:36 +0000 (10:33 +0200)] 
man: document how calendar times catch up after system suspend/hibernation

Fixes: #26166
3 years agoupdate TODO
Lennart Poettering [Thu, 8 Jun 2023 07:55:18 +0000 (09:55 +0200)] 
update TODO

3 years agoman: document that journalctl --user requires Storage=persistent 27961/head
Lennart Poettering [Wed, 7 Jun 2023 14:23:45 +0000 (16:23 +0200)] 
man: document that journalctl --user requires Storage=persistent

Fixes: #25061
3 years agosd-journal: when SD_JOURNAL_CURRENT_USER is set, and called from system UID, imply...
Lennart Poettering [Wed, 7 Jun 2023 13:19:25 +0000 (15:19 +0200)] 
sd-journal: when SD_JOURNAL_CURRENT_USER is set, and called from system UID, imply SD_JOURNAL_SYSTEM

Fixes: #26742 #23679
3 years agojournald: move uid_for_system_journal() to uid-alloc-range.h
Lennart Poettering [Wed, 7 Jun 2023 13:16:50 +0000 (15:16 +0200)] 
journald: move uid_for_system_journal() to uid-alloc-range.h

Let's move this helper call from journald specific code to src/basic/,
so that we can use it from sd-journal.

While we are at it, slightly extend it to also cover container uids,
which are also routed to the system journal now.

This places the call in uid-alloc-range.[ch] which contains similar
functions that match UID ranges for specific purposes.

3 years agoshared: move uid-alloc-range.[ch] from src/shared/ → src/basic/
Lennart Poettering [Wed, 7 Jun 2023 13:15:42 +0000 (15:15 +0200)] 
shared: move uid-alloc-range.[ch] from src/shared/ → src/basic/

This way we can use it in libsystemd

3 years agoman: suffix --unit with an equal sign, since it expects an argument
Lennart Poettering [Wed, 7 Jun 2023 12:54:34 +0000 (14:54 +0200)] 
man: suffix --unit with an equal sign, since it expects an argument

As per our usual syntax in the docs.

3 years agotpm2: replace _cleanup_tpm2_* macros with _cleanup_()
Dan Streetman [Wed, 17 May 2023 21:16:23 +0000 (17:16 -0400)] 
tpm2: replace _cleanup_tpm2_* macros with _cleanup_()

Remove _cleanup_tpm2_context_ and _cleanup_tpm2_handle_ macros, replacing their
use with _cleanup_(tpm2_context_unrefp) and _cleanup_(tpm2_handle_freep),
respectively.

3 years agoman: drop documentation of internal lookup flags
Lennart Poettering [Wed, 7 Jun 2023 21:37:11 +0000 (23:37 +0200)] 
man: drop documentation of internal lookup flags

This removes documentation of SD_RESOLVED_REQUIRE_PRIMARY and
SD_RESOLVED_CLAMP_TTL, which are internal flags, and not usable from
outside of resolved. They are refused by D-Bus APIs, for a reason.

Various other fixes/clean-ups of the relevant docs (including reordering
of the flags docs by "grouping" rather than bit values).

Fixes: #26619
3 years agoMerge pull request #27958 from mrc0mmand/test-functions-tweaks
Luca Boccassi [Wed, 7 Jun 2023 20:54:01 +0000 (21:54 +0100)] 
Merge pull request #27958 from mrc0mmand/test-functions-tweaks

test: a couple of assorted test-functions tweaks

3 years agopam_systemd_home: suppress LOG_DEBUG msgs if debugging is off
David Tardon [Wed, 7 Jun 2023 13:16:18 +0000 (15:16 +0200)] 
pam_systemd_home: suppress LOG_DEBUG msgs if debugging is off

This is a "sequel" to commit 2675747f3cdd6f1e6236bbb2f79abfa53fb307f1 .

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2210770
3 years agopreset: enable systemd-networkd-wait-online.service by default
Lennart Poettering [Wed, 7 Jun 2023 14:37:52 +0000 (16:37 +0200)] 
preset: enable systemd-networkd-wait-online.service by default

As #25459 points out our default preset is contradictory. Let's fix
that.

This enables systemd-networkd-wait-online.service, as we enable
systemd-networkd.service which enables that anyway.

This is safe since network-online.target should not be pulled in by
default.

Fixes: #25459
3 years agoMerge pull request #27960 from DaanDeMeyer/update-mkosi
Daan De Meyer [Wed, 7 Jun 2023 14:37:02 +0000 (16:37 +0200)] 
Merge pull request #27960 from DaanDeMeyer/update-mkosi

mkosi: Update to latest

3 years agotest: wrap agetty & getfacl when running with sanitizers 27958/head
Frantisek Sumsal [Wed, 7 Jun 2023 14:26:21 +0000 (16:26 +0200)] 
test: wrap agetty & getfacl when running with sanitizers

The list is getting slightly ridiculous.

3 years agomeson: stop using nested lists for sources
Zbigniew Jędrzejewski-Szmek [Thu, 9 Mar 2023 09:35:05 +0000 (10:35 +0100)] 
meson: stop using nested lists for sources

meson itself flattens the list when it is used in "sources:" field, but it
makes our own processing more complicated. I find it also a bit confusing.

3 years agomkosi: Update to latest 27960/head
Daan De Meyer [Wed, 7 Jun 2023 13:59:03 +0000 (15:59 +0200)] 
mkosi: Update to latest

mkosi's match syntax was changed so we update our config files to
use the new match syntax which mimicks the systemd condition syntax.

3 years agotest: drop $SKIP_INITRD
Frantisek Sumsal [Wed, 7 Jun 2023 13:21:10 +0000 (15:21 +0200)] 
test: drop $SKIP_INITRD

It's pointless nowadays, since we always need an initrd for the test VMs
as we require modules that are usually not compiled in the kernel.

3 years agotest: rebuild the ldconfig cache after changing its configuration
Frantisek Sumsal [Wed, 7 Jun 2023 13:19:44 +0000 (15:19 +0200)] 
test: rebuild the ldconfig cache after changing its configuration

Follow-up to ba79e8c2cc.

3 years agoman: mention that OnCalendar= combines well with systemd-time-wait-sync.service
Lennart Poettering [Wed, 7 Jun 2023 12:31:02 +0000 (14:31 +0200)] 
man: mention that OnCalendar= combines well with systemd-time-wait-sync.service

Fixes: #23440
3 years agoFix zsh completion for "localectl set-locale"
Cyril Roelandt [Wed, 7 Jun 2023 12:33:19 +0000 (14:33 +0200)] 
Fix zsh completion for "localectl set-locale"

When running:

    $ localectl set-locale LC_MESSAGES=<TAB>

One is prompted with a list of locale fields instead of the list of
valid locales. This is because by calling "compset -P1 '*='", we modify
the $PREFIX special parameter before testing whether it contains an
equal sign. Therefore

    if [[ -prefix 1 *\= ]]

is always false, and we always suggest a list of locale fields to the
user.

Fixes: #27955
3 years agokbd-model-map: change the order of Hungarian keymaps
Balló György [Wed, 7 Jun 2023 11:33:18 +0000 (13:33 +0200)] 
kbd-model-map: change the order of Hungarian keymaps

This changes the console layout from 'hu101' to 'hu' when the user calls 'localectl set-x11-keymap hu', because 'hu' is the expected layout instead of 'hu101' for most users.

3 years agoMerge pull request #27629 from ddstreet/tpm2_verify_sym_params
Daan De Meyer [Wed, 7 Jun 2023 11:48:54 +0000 (13:48 +0200)] 
Merge pull request #27629 from ddstreet/tpm2_verify_sym_params

Tpm2 verify sym params

3 years agoMerge pull request #27882 from DaanDeMeyer/repart-truncate
Zbigniew Jędrzejewski-Szmek [Wed, 7 Jun 2023 11:32:11 +0000 (13:32 +0200)] 
Merge pull request #27882 from DaanDeMeyer/repart-truncate

copy: Add COPY_TRUNCATE

3 years agoresolved: add comment clarifying why we decompress DNS names when parsing SRV
Lennart Poettering [Wed, 7 Jun 2023 10:23:25 +0000 (12:23 +0200)] 
resolved: add comment clarifying why we decompress DNS names when parsing SRV

Fixes: #22838
3 years agoman: document which IP ports resolved listens on, and what for
Lennart Poettering [Wed, 7 Jun 2023 10:47:09 +0000 (12:47 +0200)] 
man: document which IP ports resolved listens on, and what for

Fixes: #23045
3 years agoMerge pull request #27885 from DaanDeMeyer/please-dont-make-me-write-more-openat...
Zbigniew Jędrzejewski-Szmek [Wed, 7 Jun 2023 11:25:33 +0000 (13:25 +0200)] 
Merge pull request #27885 from DaanDeMeyer/please-dont-make-me-write-more-openat-helpers

Add more openat like helper functions

3 years agopam: add call to pam_umask
Michal Sekletar [Wed, 31 May 2023 16:50:12 +0000 (18:50 +0200)] 
pam: add call to pam_umask

Setting umask for user sessions via UMASK setting in /etc/login.defs is
a well-known feature. Let's make sure that user manager also runs with
this umask value.

Follow-up for 5e37d1930b41b24c077ce37c6db0e36c745106c7.

3 years agomeson: use "cpp -E -dM" to process header file 27846/head
Zbigniew Jędrzejewski-Szmek [Tue, 6 Jun 2023 07:54:20 +0000 (09:54 +0200)] 
meson: use "cpp -E -dM" to process header file

This was requested in review:
https://github.com/systemd/systemd/pull/27846#discussion_r1210383265

I kept this as separate commit because the change would impact both of
the previous commits and splitting it up seems like unnecessary work.
The result is unchanged.

v2:
- use universal_newlines=True to keep compat with Python 3.6 on C8S.