]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agotree-wide: fix typo
Yu Watanabe [Tue, 25 Oct 2022 18:24:45 +0000 (03:24 +0900)] 
tree-wide: fix typo

3 years agoMerge pull request #25131 from poettering/image-root-help-text-fix
Yu Watanabe [Tue, 25 Oct 2022 18:17:17 +0000 (03:17 +0900)] 
Merge pull request #25131 from poettering/image-root-help-text-fix

analyze/coredumpctl: add --image=/--root= to --help texts

3 years agoman: also use DDIs in systemd-dissect man page 25133/head
Lennart Poettering [Tue, 25 Oct 2022 16:59:10 +0000 (18:59 +0200)] 
man: also use DDIs in systemd-dissect man page

3 years agodissect: mention DDI moniker in --help text
Lennart Poettering [Tue, 25 Oct 2022 13:42:21 +0000 (15:42 +0200)] 
dissect: mention DDI moniker in --help text

3 years agocore/device: also serialize/deserialize device syspath
Yu Watanabe [Tue, 25 Oct 2022 12:41:17 +0000 (21:41 +0900)] 
core/device: also serialize/deserialize device syspath

The field will be used in later commits.

3 years agocore/device: update comment
Yu Watanabe [Tue, 25 Oct 2022 12:40:21 +0000 (21:40 +0900)] 
core/device: update comment

3 years agoRevert "core: drop non-default value for DefaultLimitMEMLOCK=" (#25058)
xiaoyang [Tue, 25 Oct 2022 16:49:07 +0000 (00:49 +0800)] 
Revert "core: drop non-default value for DefaultLimitMEMLOCK=" (#25058)

This reverts commit 606104bcdbf9d2fe1f39594cc6379db9209569d9.

3 years agotest: rewrite tests for renaming network interface
Yu Watanabe [Mon, 24 Oct 2022 17:58:39 +0000 (02:58 +0900)] 
test: rewrite tests for renaming network interface

- use `udevadm wait` instead of `udevadm info --wait-initialized`,
- use `timeout` command instead of the fixed time sleep,
- add basic tests for #25106,
- add brief comment about #25115.

3 years agocore: give a nicer error message on invalid aliases
Jacek Migacz [Sun, 18 Sep 2022 13:41:38 +0000 (15:41 +0200)] 
core: give a nicer error message on invalid aliases

3 years agocoredumpctl: add --root= + --image= to --help text 25131/head
Lennart Poettering [Tue, 25 Oct 2022 13:41:22 +0000 (15:41 +0200)] 
coredumpctl: add --root= + --image= to --help text

3 years agoanalyze: add --image= + --root= to --help text
Lennart Poettering [Tue, 25 Oct 2022 13:39:14 +0000 (15:39 +0200)] 
analyze: add --image= + --root= to --help text

3 years agoupdate TODO
Lennart Poettering [Thu, 20 Oct 2022 21:07:47 +0000 (23:07 +0200)] 
update TODO

3 years agogh actions: run a unit test iteration without machine-id 25120/head
Luca Boccassi [Tue, 25 Oct 2022 00:17:09 +0000 (01:17 +0100)] 
gh actions: run a unit test iteration without machine-id

3 years agoudev-test: use passwd instead of machine-id for checks
Luca Boccassi [Tue, 25 Oct 2022 14:10:05 +0000 (15:10 +0100)] 
udev-test: use passwd instead of machine-id for checks

Much more likely to be present

3 years agotest/test-systemd-tmpfiles.py: do not fail if machine-id is missing
Luca Boccassi [Tue, 25 Oct 2022 14:02:10 +0000 (15:02 +0100)] 
test/test-systemd-tmpfiles.py: do not fail if machine-id is missing

When building in a chroot there might not be any machine-id

3 years agotest-load-fragment: do not fail if machine-id is missing
Luca Boccassi [Tue, 25 Oct 2022 13:41:54 +0000 (14:41 +0100)] 
test-load-fragment: do not fail if machine-id is missing

When building in a chroot there might not be any machine-id

3 years agotest-execute: do not fail if machine-id is missing
Luca Boccassi [Tue, 25 Oct 2022 13:38:22 +0000 (14:38 +0100)] 
test-execute: do not fail if machine-id is missing

When building in a chroot there might not be any machine-id

3 years agotest-unit-name: do not fail if machine-id is missing
Luca Boccassi [Tue, 25 Oct 2022 00:38:32 +0000 (01:38 +0100)] 
test-unit-name: do not fail if machine-id is missing

When building in a chroot there might not be any machine-id

3 years agotest-specifier: do not fail if machine-id is missing
Luca Boccassi [Tue, 25 Oct 2022 00:12:46 +0000 (01:12 +0100)] 
test-specifier: do not fail if machine-id is missing

When building in a chroot there might not be any machine-id

3 years agotest-id128: do not fail if machine-id is missing
Luca Boccassi [Tue, 25 Oct 2022 00:05:04 +0000 (01:05 +0100)] 
test-id128: do not fail if machine-id is missing

When building in a chroot there might not be any machine-id

3 years agotest-fs-util: do not fail if machine-id is missing
Luca Boccassi [Mon, 24 Oct 2022 23:59:47 +0000 (00:59 +0100)] 
test-fs-util: do not fail if machine-id is missing

When building in a chroot there might not be any machine-id

3 years agotest-condition: skip test if machine-id is missing
Luca Boccassi [Mon, 24 Oct 2022 23:56:44 +0000 (00:56 +0100)] 
test-condition: skip test if machine-id is missing

When building in a chroot there might not be any machine-id

3 years agotest-sd-device: check if /run/udev/ exists
Luca Boccassi [Mon, 24 Oct 2022 23:50:05 +0000 (00:50 +0100)] 
test-sd-device: check if /run/udev/ exists

When running the tests in a chroot /sys/ might be writable, but it
doesn't mean udev will be running

Assertion 'sd_event_add_inotify(event, NULL, "/run/udev" , IN_DELETE, on_inotify, NULL) >= 0' failed at src/libsystemd/sd-device/test-sd-device.c:352, function test_sd_device_enumerator_filter_subsystem(). Aborting.

3 years agoman: Mention that journal file size is capped to 4G in compact mode
Daan De Meyer [Tue, 25 Oct 2022 11:44:32 +0000 (13:44 +0200)] 
man: Mention that journal file size is capped to 4G in compact mode

3 years agorandom-seed: clarify one comment 25092/head
Franck Bui [Tue, 25 Oct 2022 11:54:10 +0000 (13:54 +0200)] 
random-seed: clarify one comment

3 years agoReport version string as in the Boot Loader Spec, fix boot loader upgrades
Zbigniew Jędrzejewski-Szmek [Tue, 25 Oct 2022 07:53:49 +0000 (09:53 +0200)] 
Report version string as in the Boot Loader Spec, fix boot loader upgrades

We generate a "version string" that is reported by various tools. This patch
changes this version string to use the characters specified for the version
string in the Boot Loader Specification. We start using the special characters
we have in the spec for this exact purpose and thus fix version comparisons.
We also stop using '+' which is not part of the allowed charset and is used for
boot attempt counting and should not be part of the version string.

The version string is (among other places) used in sd-boot and the comparison
result is used by 'bootctl update' to decide whether to install a new binary.
Before, because 'nn-rc1' compares higher than 'nn', we would refuse to upgrade
pre-release versions.

The boot loader is the primary motivation. I'm not aware of programatic version
comparisons in other places, but it makes sense to use the same versions string
everywhere.

(This patch effectively only matters for non-distro builds, because distro
builds presumably use -Dversion-tag to set something meaningful. Ideally, those
version strings are compatible with our version strings, but this is outside of
our control.)

3 years agorandom-seed: downgrade some messages
Franck Bui [Fri, 21 Oct 2022 13:08:43 +0000 (15:08 +0200)] 
random-seed: downgrade some messages

In these cases, we eat up the error and propagate success so we should log at
warning level only.

3 years agorandom_seed: minor improvement in run()
Franck Bui [Thu, 20 Oct 2022 13:03:20 +0000 (15:03 +0200)] 
random_seed: minor improvement in run()

3 years agorandom-seed: split out run()
Franck Bui [Thu, 20 Oct 2022 07:39:12 +0000 (09:39 +0200)] 
random-seed: split out run()

No functional change.

3 years agorandom-seed: no need to pass 'mode' argument when opening /dev/urandom
Franck Bui [Thu, 20 Oct 2022 06:52:10 +0000 (08:52 +0200)] 
random-seed: no need to pass 'mode' argument when opening /dev/urandom

The open() call is not supposed to create /dev/urandom.

No functional change.

3 years agorandom-seed: make the logic to calculate the number of bytes read from the random...
Franck Bui [Thu, 20 Oct 2022 06:45:02 +0000 (08:45 +0200)] 
random-seed: make the logic to calculate the number of bytes read from the random seed file clearer

We want the size to lie within [/proc/sys/kernel/random/poolsize,RANDOM_POOL_SIZE_MAX]
interval. Let's make it more obvious.

Also move the logic in a dedicated function.

3 years agorandom-seed: use getopt()
Franck Bui [Wed, 19 Oct 2022 13:49:24 +0000 (15:49 +0200)] 
random-seed: use getopt()

It's not really necessary since systemd-random-seed is an internal tool for the
moment but this might change in future (to allow system installers to
initialize a random seed file for example).

Also introducing new options will be easier.

3 years agobtrfs-util: move btrfs_defrag_fd() from fd-util.[ch]
Yu Watanabe [Mon, 24 Oct 2022 20:35:04 +0000 (05:35 +0900)] 
btrfs-util: move btrfs_defrag_fd() from fd-util.[ch]

After d71ece3f0b85c7a3decc50143b68ac07fc5831ae, the function is not used
in libbasic or libsystemd anymore. Let's move it to more appropriate
place.

3 years agoMerge pull request #25118 from bluca/rc2 v252-rc3
Luca Boccassi [Mon, 24 Oct 2022 21:02:58 +0000 (23:02 +0200)] 
Merge pull request #25118 from bluca/rc2

hwdb/news for rc3

3 years agoUpdate autosuspend hwdb 25118/head
Luca Boccassi [Mon, 24 Oct 2022 19:26:22 +0000 (20:26 +0100)] 
Update autosuspend hwdb

ninja -C build update-hwdb-autosuspend

3 years agoUpdate hwdb
Luca Boccassi [Mon, 24 Oct 2022 19:25:30 +0000 (20:25 +0100)] 
Update hwdb

ninja -C build update-hwdb

3 years agoNEWS: update contributors list
Luca Boccassi [Mon, 24 Oct 2022 19:14:12 +0000 (20:14 +0100)] 
NEWS: update contributors list

3 years agoMerge pull request #25052 from yuwata/resolvconf-compat
Yu Watanabe [Mon, 24 Oct 2022 19:08:41 +0000 (04:08 +0900)] 
Merge pull request #25052 from yuwata/resolvconf-compat

resolvconf-compat: first try to use the specified interface name as is

3 years agoudev: fix the errno check if a couple of places
Frantisek Sumsal [Mon, 24 Oct 2022 17:12:55 +0000 (19:12 +0200)] 
udev: fix the errno check if a couple of places

Follow-up to 691a596da15.

3 years agomkosi: libbpf0 -> libbpf1
Luca Boccassi [Mon, 24 Oct 2022 18:19:17 +0000 (19:19 +0100)] 
mkosi: libbpf0 -> libbpf1

3 years agoMerge pull request #25080 from keszybz/search-paths
Yu Watanabe [Mon, 24 Oct 2022 16:57:41 +0000 (01:57 +0900)] 
Merge pull request #25080 from keszybz/search-paths

Refusing linking files underneath our hierarchy, improve error messages

3 years agotest: add tests for setting DNS servers by resolvectl or resolvconf 25052/head
Yu Watanabe [Tue, 18 Oct 2022 11:12:30 +0000 (20:12 +0900)] 
test: add tests for setting DNS servers by resolvectl or resolvconf

3 years agotest-string-util: remove several strdupa() calls
Luca BRUNO [Mon, 24 Oct 2022 12:49:32 +0000 (12:49 +0000)] 
test-string-util: remove several strdupa() calls

This performs the same semantic transformation as the Coccinelle
script 'strdupa.cocci'.
Somehow the existing semantic patch is not properly triggering on
this 'string_replace_char' test.

3 years agohwdb: fix key toggle and programmable button for Positivo K142 (#25111)
Edson Juliano Drosdeck [Mon, 24 Oct 2022 16:03:52 +0000 (13:03 -0300)] 
hwdb: fix key toggle and programmable button for Positivo K142 (#25111)

3 years agopo: Translated using Weblate (Estonian)
H A [Mon, 24 Oct 2022 15:23:38 +0000 (17:23 +0200)] 
po: Translated using Weblate (Estonian)

Currently translated at 71.5% (138 of 193 strings)

Co-authored-by: H A <contact+fedora@hen.ee>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/et/
Translation: systemd/main

3 years agohomed: properly initialize all return params
Lennart Poettering [Mon, 24 Oct 2022 10:22:46 +0000 (12:22 +0200)] 
homed: properly initialize all return params

3 years agoresolvconf-compat: first parse provided interface name as is
Yu Watanabe [Tue, 18 Oct 2022 08:18:55 +0000 (17:18 +0900)] 
resolvconf-compat: first parse provided interface name as is

Then, try to drop multiple protocol specifiers at the end.

Strictly speaking, this breaks backward compatibility:
if eth0 and eth0.42 exists, then previously,
    echo 'nameserver 192.168.0.1' | resolvconf -a eth0.42
adds the DNS server to eth0 instead of eth0.42, as we unconditionally
dropped the specifier after the last dot, and
    echo 'nameserver 192.168.0.1' | resolvconf -a eth0.42.dhcp
adds the DNS server to eth0.42. However, with this commit, now
the both commands add the DNS server to eth0.42. But, hopefully,
this should be preferable behavior.

Fixes #25032.

3 years agoman: fix count mismatch 25080/head
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 10:27:29 +0000 (12:27 +0200)] 
man: fix count mismatch

We said "search path" and "search paths" in the same sentence…

3 years agosystemctl,manager: refuse linking unit files underneath the search paths
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 09:32:25 +0000 (11:32 +0200)] 
systemctl,manager: refuse linking unit files underneath the search paths

We treat symlinks to unit files outside of the search path differently from
symlinks to unit files *in* the search path. The former are "linked" unit
files, while the latter are enablement symlinks and such and will be removed
when disabling the unit.

The history of the check for in_search_path() is interesting: this condition
was added already in the first version of the code in
830964834f330836b9d33752e83de09d4f38da87. Since the beginning, matching
arguments would simply be ignored. I think this is dubious. The man page says:

> Link a unit file that is *not* in the unit file search paths
> into the unit file search path

But for backwards-compat, let's continue to silently do nothing for files
*in* the search path.

The case of symlinks to unit files underneath the search path, but in some
subdirectory, is less clear. We didn't check for this case, so it was
implicitly allowed. But that's just an oversight, we don't want to allow people
to create additional subhierarchies under our hierarchy. Let's check for this
case and refuse.

Closes #24605.

3 years agoshared/install: check that install_changes_add() didn't fail on success
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 10:07:10 +0000 (12:07 +0200)] 
shared/install: check that install_changes_add() didn't fail on success

This adds a check for an allocation error for the calls to install_changes_add()
where we're plannig to return success from the call. In cases where we're
returning failure, it doesn't matter as much: the operation will fail anyway,
and if the allocation fails, we'll just get a less descriptive error message.

3 years agoshared/install: add forgotten calls to install_changes_add()
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 09:31:41 +0000 (11:31 +0200)] 
shared/install: add forgotten calls to install_changes_add()

The machinery to report a good error message only works if the
error was registered with install_changes_add() and a file name. Otherwise
we only get a generic "Op failed: %m" message.

In some places -EINVAL is replaced by -EUCLEAN, so that we get the proper
error message.

3 years agoshared/install: make install_changes_add propagate passed-in errno value
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 09:41:53 +0000 (11:41 +0200)] 
shared/install: make install_changes_add propagate passed-in errno value

The function was written to only return an error from internal allocation
failures, because when using it to create a bus message, we want to distinguish
a failed operation from an allocation error when sending the reply. But it
turns out that the only caller that makes this distinction checks that the
passed-in errno value ('type') is not negative beforehand. So we can make the
function pass 'type' value through, which makes most of the callers nicer.

No functional change.

3 years agoresolvectl: rely on invoked_as()
Yu Watanabe [Tue, 18 Oct 2022 11:27:41 +0000 (20:27 +0900)] 
resolvectl: rely on invoked_as()

3 years agostring-util: make free_and_strdup_warn() return 1 when new string is assigned
Yu Watanabe [Tue, 18 Oct 2022 11:08:39 +0000 (20:08 +0900)] 
string-util: make free_and_strdup_warn() return 1 when new string is assigned

3 years agosystemctl: fix potential memleak on failure in determine_default()
Yu Watanabe [Tue, 18 Oct 2022 14:08:24 +0000 (23:08 +0900)] 
systemctl: fix potential memleak on failure in determine_default()

And make verb_set_default() return zero on success.

3 years agoMerge pull request #25100 from weblate/weblate-systemd-master
Frantisek Sumsal [Sat, 22 Oct 2022 19:01:06 +0000 (19:01 +0000)] 
Merge pull request #25100 from weblate/weblate-systemd-master

Translations update from Fedora Weblate

3 years agopo: Translated using Weblate (Finnish) 25100/head
Jan Kuparinen [Sat, 22 Oct 2022 17:19:52 +0000 (19:19 +0200)] 
po: Translated using Weblate (Finnish)

Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Jan Kuparinen <copper_fin@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fi/
Translation: systemd/main

3 years agopo: Translated using Weblate (Ukrainian)
Yuri Chornoivan [Sat, 22 Oct 2022 17:19:52 +0000 (19:19 +0200)] 
po: Translated using Weblate (Ukrainian)

Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Yuri Chornoivan <yurchor@ukr.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/uk/
Translation: systemd/main

3 years agopo: Translated using Weblate (Turkish)
Oğuz Ersen [Sat, 22 Oct 2022 17:19:51 +0000 (19:19 +0200)] 
po: Translated using Weblate (Turkish)

Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/tr/
Translation: systemd/main

3 years agopo: Translated using Weblate (Korean)
김인수 [Sat, 22 Oct 2022 17:19:51 +0000 (19:19 +0200)] 
po: Translated using Weblate (Korean)

Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main

3 years agopo: Translated using Weblate (Czech)
Daniel Rusek [Sat, 22 Oct 2022 17:19:51 +0000 (19:19 +0200)] 
po: Translated using Weblate (Czech)

Currently translated at 100.0% (193 of 193 strings)

Co-authored-by: Daniel Rusek <mail@asciiwolf.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/cs/
Translation: systemd/main

3 years agomeson: always use libatomic if found
Zbigniew Jędrzejewski-Szmek [Wed, 19 Oct 2022 14:23:41 +0000 (16:23 +0200)] 
meson: always use libatomic if found

Semi-quoting https://github.com/systemd/systemd/issues/25057:

clang-16 has made the choice to turn on -Werror=implicit-function-declaration,implicit-int.
(See Gentoo's tracker bug https://bugs.gentoo.org/870412).
Added in commit 132c73b57ad1d363e97e1f4720f0e920826f34e1, systemd now does a
check to see if libatomic is needed with some compile/link tests with e.g.
__atomic_exchange_1, but the tests don't provide a prototype for
__atomic_exchange_1 so with clang-16 the test fails, breaking the build.

Let's simplify things by linking to libatomic unconditionally if it is found
and seems to work. If actually unneeded, it might be dropped via --as-needed.
This seems to work with gcc and clang.

declare_dependency() is used instead of cc.find_library(), because the latter
picks up a symlink in gcc private directory (e.g.
/usr/lib/gcc/x86_64-redhat-linux/12/libatomic.so), and we don't want that.

Fixes #25057.

3 years agohwdb: Add support for Elgato Stream Deck XL (gen 2)
Jonathan Kang [Fri, 21 Oct 2022 09:58:37 +0000 (17:58 +0800)] 
hwdb: Add support for Elgato Stream Deck XL (gen 2)

Add support for the following Elgato Stream Deck Device:

  ID 0fd9:008f Elgato Systems GmbH Stream Deck XL

3 years agorandom-seed: make one more use of random_write_entropy()
Franck Bui [Wed, 19 Oct 2022 13:28:27 +0000 (15:28 +0200)] 
random-seed: make one more use of random_write_entropy()

No functional change.

3 years agorandom-seed: shorten a bit may_credit()
Franck Bui [Wed, 19 Oct 2022 13:27:04 +0000 (15:27 +0200)] 
random-seed: shorten a bit may_credit()

No functional change.

3 years agoMerge pull request #25083 from bluca/revert_timer
Michael Biebl [Thu, 20 Oct 2022 17:58:10 +0000 (19:58 +0200)] 
Merge pull request #25083 from bluca/revert_timer

Revert "Fix issue with system time set back (#24131)"

3 years agoMerge pull request #25084 from mrc0mmand/scorecard-tweaks
Frantisek Sumsal [Thu, 20 Oct 2022 16:45:22 +0000 (16:45 +0000)] 
Merge pull request #25084 from mrc0mmand/scorecard-tweaks

ci: run the Scorecards action in PRs only on config update

3 years agoupdate TODO
Lennart Poettering [Thu, 20 Oct 2022 16:28:49 +0000 (18:28 +0200)] 
update TODO

3 years agoMerge pull request #25081 from keszybz/test-local-addresses-fail
Luca Boccassi [Thu, 20 Oct 2022 15:47:14 +0000 (17:47 +0200)] 
Merge pull request #25081 from keszybz/test-local-addresses-fail

Fix racy check in test-local-addresses

3 years agoci: run the Scorecards action in PRs only on config update 25084/head
Frantisek Sumsal [Thu, 20 Oct 2022 15:06:26 +0000 (17:06 +0200)] 
ci: run the Scorecards action in PRs only on config update

Also, unify the string quotation a bit and drop one unnecessary
expression syntax (as everything in `if` statements is automatically
evaluated as an expression).

3 years agoci: add a missing SPDX line
Frantisek Sumsal [Thu, 20 Oct 2022 15:03:37 +0000 (17:03 +0200)] 
ci: add a missing SPDX line

3 years agoMerge pull request #25077 from keszybz/completions-optional-components
Luca Boccassi [Thu, 20 Oct 2022 13:57:46 +0000 (15:57 +0200)] 
Merge pull request #25077 from keszybz/completions-optional-components

Fix completions when machinectl is not installed and other fixes

3 years agoRevert "Fix issue with system time set back (#24131)" 25083/head
Luca Boccassi [Thu, 20 Oct 2022 13:01:09 +0000 (14:01 +0100)] 
Revert "Fix issue with system time set back (#24131)"

This fix unfortunately introduced a much worse regression that
is affecting many users, so let's revert it for now and rework
it in the next release.

This reverts commit 5ded3917a161d87984d74d70b5eb2a254e54b44e.

Fixes https://github.com/systemd/systemd/issues/24984

3 years agomeson: Generate fuzzer inputs with directives 24958/head
Michal Koutný [Thu, 6 Oct 2022 14:48:01 +0000 (16:48 +0200)] 
meson: Generate fuzzer inputs with directives

The lists of directives for fuzzer tests are maintained manually in the
repo. There is a tools/check-directives.sh script that runs during test
phase and reports stale directive lists.
Let's rework the script into a generator so that these directive files
are created on-the-flight and needn't be updated whenever a unit file
directives change. The scripts is rewritten in Python to get rid of gawk
dependency and each generated file is a separate meson target so that
incremental builds refresh what is just necessary (and parallelize
(negligible)).

Note: test/fuzz/fuzz-unit-file/directives-all.slice is kept since there
is not automated way to generate it (it is not covered by the check
script neither).

3 years agoservice: do fine-grained validation of CPUSchedulingPriority= at execution time
Luca Boccassi [Wed, 19 Oct 2022 22:52:58 +0000 (23:52 +0100)] 
service: do fine-grained validation of CPUSchedulingPriority= at execution time

The precise bounds of the scheduling priority depend on the scheduling policy,
so depending on the order in which the two settings are specified the
validation might pass or fail.
When checking the setting only validate the outer range (valid values in general are 0 to 99),
and let the execution fail later if the priority does not match the
specified policy (1 to 99 for RR/FIFO, 0 for the rest).

Fixes https://github.com/systemd/systemd/issues/20320

3 years agopo: Update translation files
Weblate [Thu, 20 Oct 2022 11:44:25 +0000 (13:44 +0200)] 
po: Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Co-authored-by: Weblate <noreply@weblate.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/
Translation: systemd/main

3 years agoMerge pull request #25078 from mrc0mmand/update-pot
Frantisek Sumsal [Thu, 20 Oct 2022 11:43:54 +0000 (11:43 +0000)] 
Merge pull request #25078 from mrc0mmand/update-pot

po: regenerate the translation files

3 years agocore: allow-list char-rtc with ProtectClock=yes only if needed
Luca Boccassi [Wed, 19 Oct 2022 23:37:08 +0000 (00:37 +0100)] 
core: allow-list char-rtc with ProtectClock=yes only if needed

Allow-listing a device implicitly blocks everything else, so this
has the opposite of the intended effect when PrivateDevices= is
not used.
Allow-list char-rtc only if there is a device policy set.

Fixes https://github.com/systemd/systemd/issues/18142

3 years agotest-local-addresses: drop racy check 25081/head
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 10:54:44 +0000 (12:54 +0200)] 
test-local-addresses: drop racy check

The test would fail when addresses were being removed in parallel. In general,
the check is only valid when the machine configuration is static, which in
general isn't true.

CentOS CI (Arch Linux) fails in TEST-02-UNITTESTS test-local-addresses:

10:38:05 (gdb) #0  0x00007f86260a164c in ?? () from /usr/lib/libc.so.6
10:38:05 No symbol table info available.
10:38:05 #1  0x00007f8626051958 in raise () from /usr/lib/libc.so.6
10:38:05 No symbol table info available.
10:38:05 #2  0x00007f862603b53d in abort () from /usr/lib/libc.so.6
10:38:05 No symbol table info available.
10:38:05 #3  0x00007f862639a755 in log_assert_failed (
10:38:05     text=text@entry=0x56180e56c03b "n == n_ipv4 + n_ipv6",
10:38:05     file=file@entry=0x56180e56c0d1 "src/test/test-local-addresses.c",
10:38:05     line=line@entry=45,
10:38:05     func=func@entry=0x56180e56c360 <__PRETTY_FUNCTION__.6> "test_local_addresses") at ../build/src/basic/log.c:853
10:38:05 No locals.
10:38:05 #4  0x000056180e56b77e in test_local_addresses ()
10:38:05     at ../build/src/test/test-local-addresses.c:45
10:38:05         a = 0x0
10:38:05         n = 234
10:38:05         n_ipv4 = 236
10:38:05         n_ipv6 = 7
10:38:05         __PRETTY_FUNCTION__ = "test_local_addresses"
10:38:05         __func__ = "test_local_addresses"
10:38:05 #5  0x000056180e56ba67 in run_test_table () at ../build/src/shared/tests.h:106
10:38:05         r = 0
10:38:05         t = 0x56180e56e010 <__unique_prefix_static_test_table_entry10>
10:38:05         __PRETTY_FUNCTION__ = <optimized out>
10:38:05         __func__ = "run_test_table"
10:38:05 #6  0x000056180e56bb2f in main (argc=1, argv=0x7ffc3a814808)
10:38:05     at ../build/src/test/test-local-addresses.c:81
10:38:05         _intro = 0x0
10:38:05         _outro = 0x0
10:38:05         _r = 0
10:38:05         _q = 0
10:38:05 (gdb)

The logs show that there's a huge number of private addresses, probably from
some other test running in parallel.

3 years agotest-local-addresses: inline iterator variable
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 10:43:35 +0000 (12:43 +0200)] 
test-local-addresses: inline iterator variable

3 years agoresolved: drop unnecessary empty lines
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 10:39:07 +0000 (12:39 +0200)] 
resolved: drop unnecessary empty lines

3 years agotree-wide: inline declarations of sd_netlink_message iterators
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 10:38:41 +0000 (12:38 +0200)] 
tree-wide: inline declarations of sd_netlink_message iterators

Most places were already converted, but a few weren't for some reason.

3 years agoMake comment about coordinating offline and online installation symmetric
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 08:32:46 +0000 (10:32 +0200)] 
Make comment about coordinating offline and online installation symmetric

https://github.com/systemd/systemd/pull/24728#issuecomment-1260966910

3 years agodocs: update translation strings before new release 25078/head
Frantisek Sumsal [Thu, 20 Oct 2022 08:28:41 +0000 (10:28 +0200)] 
docs: update translation strings before new release

3 years agopo: regenerate the translation files
Frantisek Sumsal [Thu, 20 Oct 2022 08:19:16 +0000 (10:19 +0200)] 
po: regenerate the translation files

See: https://mesonbuild.com/Localisation.html#generate-pot-file
Resolves: #25071

3 years agoman: document effect of --user on --unit with journalctl
Leon M. George [Wed, 19 Oct 2022 15:22:48 +0000 (17:22 +0200)] 
man: document effect of --user on --unit with journalctl

Relates to #25061.

3 years agoMerge pull request #25073 from mrc0mmand/parse-hwdb-tweaks
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 08:02:04 +0000 (10:02 +0200)] 
Merge pull request #25073 from mrc0mmand/parse-hwdb-tweaks

test: make parse-hwdb compatible with older pyparsing versions

3 years agoshell-completion/zsh: rename helper for clarity 25077/head
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 07:45:24 +0000 (09:45 +0200)] 
shell-completion/zsh: rename helper for clarity

3 years agoshell-completion/zsh: silence error when machinectl is not installed
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 05:48:02 +0000 (07:48 +0200)] 
shell-completion/zsh: silence error when machinectl is not installed

This fixes a few unrelated issues:
- when ENABLE_MACHINED is false, machinectl is not installed, but _sd_machines
  is still used in a few places that want to complete -M and such.
  Also, bash completion calls machinectl in various places.
  Make missing machinectl mean "no machines" in this case, so
  that no error is generated in the callers.
- machinectl list --full would print multiple lines of output per machine,
  breaking grep, issue introduced in e2268fa43742ece4a5cdc2e93f731b2bb2fcc883.
  Using --max-addresses=1 would fix the issue, but let's use
  --max-addresses=0 because we now can.
- the lists used in various places were slightly different for no good reason.
- don't use a subshell if not necessary.

The code for bash still uses the same combined list of images and running
machines for various commands. The zsh code uses images for start/clone, and
running machines for the rest. Maybe something to fix in the future.

Replaces #25048.

3 years agomachinectl: allow --max-addresses=0
Zbigniew Jędrzejewski-Szmek [Thu, 20 Oct 2022 07:38:59 +0000 (09:38 +0200)] 
machinectl: allow --max-addresses=0

Sometimes the addresses are not important, so allow skipping them in output.

3 years agotest: make pylint happy 25073/head
Frantisek Sumsal [Wed, 19 Oct 2022 20:43:49 +0000 (22:43 +0200)] 
test: make pylint happy

3 years agotest: make parse-hwdb compatible with older pyparsing versions
Frantisek Sumsal [Wed, 19 Oct 2022 19:16:04 +0000 (21:16 +0200)] 
test: make parse-hwdb compatible with older pyparsing versions

Follow-up to e77fed207a41a77f88853a89a8408fbfa9a17ddd.

3 years agoupdate TODO
Lennart Poettering [Wed, 19 Oct 2022 14:21:51 +0000 (16:21 +0200)] 
update TODO

3 years agoMerge pull request #25068 from aafeijoo-suse/bash-completion-dissect
Luca Boccassi [Wed, 19 Oct 2022 15:30:55 +0000 (17:30 +0200)] 
Merge pull request #25068 from aafeijoo-suse/bash-completion-dissect

dissect: add missing help option and bash-completion support

3 years agoMerge pull request #25059 from keszybz/fopen-re
Frantisek Sumsal [Wed, 19 Oct 2022 12:49:31 +0000 (12:49 +0000)] 
Merge pull request #25059 from keszybz/fopen-re

Use "re" or "r" as appropriate for various calls

3 years agobash-completion: add systemd-dissect support 25068/head
Antonio Alvarez Feijoo [Wed, 19 Oct 2022 12:43:50 +0000 (14:43 +0200)] 
bash-completion: add systemd-dissect support

3 years agodissect: add missing --umount to the help output
Antonio Alvarez Feijoo [Wed, 19 Oct 2022 12:42:42 +0000 (14:42 +0200)] 
dissect: add missing --umount to the help output

3 years agoMerge pull request #25055 from keszybz/coredump-deadlock
Luca Boccassi [Wed, 19 Oct 2022 12:21:33 +0000 (14:21 +0200)] 
Merge pull request #25055 from keszybz/coredump-deadlock

Fix coredump deadlock with overly long backtraces

3 years agoTEST-15: add daemon-reload in one place
Zbigniew Jędrzejewski-Szmek [Wed, 19 Oct 2022 07:56:56 +0000 (09:56 +0200)] 
TEST-15: add daemon-reload in one place

Quoting https://github.com/systemd/systemd/pull/25050#discussion_r998721845:

This part seems to be quite racy, at least in the C8S job:

[ 1767.520856] H testsuite-15.sh[35]: *** test transient slice drop-ins
[ 1767.520856] H testsuite-15.sh[35]: + mkdir -p /etc/systemd/system/slice.d
[ 1767.522480] H testsuite-15.sh[35]: + mkdir -p /etc/systemd/system/a-.slice.d
[ 1767.524992] H testsuite-15.sh[35]: + mkdir -p /etc/systemd/system/a-b-.slice.d
[ 1767.526799] H testsuite-15.sh[35]: + mkdir -p /etc/systemd/system/a-b-c.slice.d
[ 1767.528302] H testsuite-15.sh[35]: + echo -e '[Unit]\nDocumentation=man:drop1'
[ 1767.528434] H testsuite-15.sh[35]: + echo -e '[Unit]\nDocumentation=man:drop2'
[ 1767.528519] H testsuite-15.sh[35]: + echo -e '[Unit]\nDocumentation=man:drop3'
[ 1767.528595] H testsuite-15.sh[35]: + echo -e '[Unit]\nDocumentation=man:drop4'
[ 1767.528676] H testsuite-15.sh[35]: + systemctl cat a-b-c.slice
[ 1767.541321] H systemctl[1042]: No files found for a-b-c.slice.
[ 1767.542854] H systemd[1]: testsuite-15.service: Main process exited, code=exited, status=1/FAILURE
[ 1767.542995] H systemd[1]: testsuite-15.service: Failed with result 'exit-code'.
[ 1767.543360] H systemd[1]: Failed to start testsuite-15.service.
[ 1767.543542] H systemd[1]: testsuite-15.service: Consumed 1.586s CPU time.
[ 1767.543938] H systemd[1]: Reached target testsuite.target.
[ 1767.545737] H systemd[1]: Starting end.service...

3 years agoman: document restrictions on naming interfaces
Lennart Poettering [Wed, 19 Oct 2022 09:38:11 +0000 (11:38 +0200)] 
man: document restrictions on naming interfaces

Let's document that "." is a bad choice of character when naming
interfaces. Let's also document the hard restrictions we make when
naming interfaces.

Result of the mess that is #25052.