]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
19 months agotest: add test for IN_SET() with bitfield specifier 25134/head
Yu Watanabe [Tue, 25 Oct 2022 18:32:05 +0000 (03:32 +0900)] 
test: add test for IN_SET() with bitfield specifier

19 months agomacro: fix indentation
Yu Watanabe [Tue, 25 Oct 2022 18:28:08 +0000 (03:28 +0900)] 
macro: fix indentation

19 months agomacro: Simply case macros for IN_SET
Jan Janssen [Tue, 25 Oct 2022 17:55:08 +0000 (19:55 +0200)] 
macro: Simply case macros for IN_SET

The CASE param would normally provide the operation for the compiler to
do in this macro magic. But in this case CASE_F_1 was hardcoding the
operation, making the parameter moot.
This just removes the somewhat pointless parameter instead of fixing
the one case. These macros are used for IN_SET case labels only and
not named generically anyways.

19 months agomacro: Use more correct type in IN_SET
Jan Janssen [Tue, 25 Oct 2022 17:33:40 +0000 (19:33 +0200)] 
macro: Use more correct type in IN_SET

This will now catch mistakes like this:
    struct s {
            int i:2;
    } s = { 1 };
    assert_se(IN_SET(s.i, ULLONG_MAX));

> warning: implicit conversion from 'unsigned long long' to
> 'typeof (+s.i)' (aka 'int') changes value from 18446744073709551615
> to -1 [-Wconstant-conversion]

19 months agotree-wide: fix typo
Yu Watanabe [Tue, 25 Oct 2022 18:24:45 +0000 (03:24 +0900)] 
tree-wide: fix typo

19 months 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

19 months 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.

19 months 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.

19 months 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

19 months 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

19 months 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

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

19 months 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

19 months 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.)

19 months 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.

19 months 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

19 months 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

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

ninja -C build update-hwdb

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

19 months 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

19 months 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.

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

19 months 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

19 months 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

19 months 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.

19 months 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)

19 months 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

19 months 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

19 months 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.

19 months 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…

19 months 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.

19 months 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.

19 months 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.

19 months 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.

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

19 months 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

19 months 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.

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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.

19 months 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

19 months 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)"

19 months 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

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

19 months 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

19 months 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).

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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.

19 months 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

19 months 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

19 months 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.

19 months 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

19 months 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

19 months 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

19 months 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.

19 months 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

19 months 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

19 months 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.

19 months 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.

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

19 months 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.

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

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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

19 months 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...

19 months 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.

19 months agoMerge pull request #25056 from yuwata/sd-device-monitor-set-description
Luca Boccassi [Wed, 19 Oct 2022 11:04:17 +0000 (13:04 +0200)] 
Merge pull request #25056 from yuwata/sd-device-monitor-set-description

tree-wide: set description for device monitor

19 months agoREADME.md: add a missing line break
Frantisek Sumsal [Wed, 19 Oct 2022 09:17:33 +0000 (11:17 +0200)] 
README.md: add a missing line break

Follow-up to b7a279f9ef.

19 months agoci: Enable Scorecard Github Action and Badge (#25054)
Joyce [Wed, 19 Oct 2022 09:05:39 +0000 (06:05 -0300)] 
ci: Enable Scorecard Github Action and Badge (#25054)

* chore: enable scorecard action

* chore: add badge to the README file

* chore: enable on config file update

* chore: update scorecard to 2.0.4

* chore: run scorecard on PR at main branch

* chore: add condition to publish_result key

* chore: skip upload to code scanning if PR

* chore: only runs scorecard in the main repo

Resolves: #25042

19 months agotree-wide: do not use "re" with fmemopen 25059/head
Zbigniew Jędrzejewski-Szmek [Wed, 19 Oct 2022 07:49:59 +0000 (09:49 +0200)] 
tree-wide: do not use "re" with fmemopen

The man page says nothing about "e". Glibc clearly accepts it without fuss, but
it is meaningless for a memory object (and probably doesn't work). This use is
not portable, so let's avoid it.

19 months agoshared/tpm2-util: wrap comments
Zbigniew Jędrzejewski-Szmek [Wed, 19 Oct 2022 07:30:47 +0000 (09:30 +0200)] 
shared/tpm2-util: wrap comments

19 months agoresolved,test-fileio: use "re" when opening files
Zbigniew Jędrzejewski-Szmek [Wed, 19 Oct 2022 07:30:30 +0000 (09:30 +0200)] 
resolved,test-fileio: use "re" when opening files

This doesn't matter too much, because neither of those programs forks, but
let's dot he generally correct thing anyway.

19 months agocoredump: avoid deadlock when passing processed backtrace data 25055/head
Zbigniew Jędrzejewski-Szmek [Tue, 18 Oct 2022 16:23:53 +0000 (18:23 +0200)] 
coredump: avoid deadlock when passing processed backtrace data

We would deadlock when passing the data back from the forked-off process that
was doing backtrace generation back to the coredump parent. This is because we
fork the child and wait for it to exit. The child tries to write too much data
to the output pipe, and and after the first 64k blocks on the parent because
the pipe is full. The bug surfaced in Fedora because of a combination of four
factors:
87707784c70dc9894ec613df0a6e75e732a362a3 was backported to v251.5, which
  allowed coredump processing to be successful.
1a0281a3ebf4f8c16d40aa9e63103f16cd23bb2a was NOT backported, so the output
  was very verbose.
- Fedora has the ELF package metadata available, so a lot of output can be
  generated. Most other distros just don't have the information.
- gnome-calendar crashes and has a bazillion modules and 69596 bytes of output
  are generated for it.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2135778.

The code is changed to try to write data opportunistically. If we get partial
information, that is still logged. In is generally better to log partial
backtrace information than nothing at all.

19 months agoshared/json: use different return code for empty input
Zbigniew Jędrzejewski-Szmek [Wed, 19 Oct 2022 06:41:13 +0000 (08:41 +0200)] 
shared/json: use different return code for empty input

It is useful to distinguish if json_parse_file() got no input or invalid input.
Use different return codes for the two cases.

19 months agotest: skip one test for iszero_safe() on i386 without SSE2
Yu Watanabe [Tue, 18 Oct 2022 12:23:26 +0000 (21:23 +0900)] 
test: skip one test for iszero_safe() on i386 without SSE2

We do not provide any numerical libraries, and iszero_safe() is only
used in parsing or formatting JSON. Hence, it is not necessary for us to
request that the function provides the same result on different systems.

Fixes #25044.

19 months agotree-wide: set description for device manager 25056/head
Yu Watanabe [Tue, 18 Oct 2022 19:46:24 +0000 (04:46 +0900)] 
tree-wide: set description for device manager

19 months agoudev: drop redundant description setting
Yu Watanabe [Tue, 18 Oct 2022 19:45:10 +0000 (04:45 +0900)] 
udev: drop redundant description setting

Follow-up for f714ecd450828e45a6f04e6277011d67a10c323f.

19 months agoMerge pull request #25050 from keszybz/transient-drop-ins-2
Luca Boccassi [Tue, 18 Oct 2022 17:32:36 +0000 (19:32 +0200)] 
Merge pull request #25050 from keszybz/transient-drop-ins-2

TEST-15: add one more variant of the test for drop-ins on transient services

19 months agoshared/json: allow json_variant_dump() to return an error
Zbigniew Jędrzejewski-Szmek [Tue, 18 Oct 2022 16:09:06 +0000 (18:09 +0200)] 
shared/json: allow json_variant_dump() to return an error

19 months agoNEWS: add entries after 252-rc1, update contrib list v252-rc2
Zbigniew Jędrzejewski-Szmek [Tue, 18 Oct 2022 12:30:54 +0000 (14:30 +0200)] 
NEWS: add entries after 252-rc1, update contrib list

19 months agoTODO: drop entry 25050/head
Zbigniew Jędrzejewski-Szmek [Tue, 18 Oct 2022 10:29:09 +0000 (12:29 +0200)] 
TODO: drop entry

This was resolved by 028a981c005e90c36c269e28709bf25032c2e8ca. We don't do
the reload in the normal path.

19 months agoTEST-15: add test that shows slice dropin issue
Zbigniew Jędrzejewski-Szmek [Tue, 18 Oct 2022 10:01:38 +0000 (12:01 +0200)] 
TEST-15: add test that shows slice dropin issue

This should be fixed by single-unit reloads. We already have a TODO
entry for this.

19 months agoupdate TODO
Lennart Poettering [Tue, 18 Oct 2022 10:08:53 +0000 (12:08 +0200)] 
update TODO

19 months agoMerge pull request #25004 from keszybz/transient-drop-ins
Luca Boccassi [Tue, 18 Oct 2022 09:49:29 +0000 (11:49 +0200)] 
Merge pull request #25004 from keszybz/transient-drop-ins

Allow drop-ins for transient units

19 months agoMerge pull request #25007 from keszybz/rename-dbus-dump
Zbigniew Jędrzejewski-Szmek [Tue, 18 Oct 2022 09:34:16 +0000 (11:34 +0200)] 
Merge pull request #25007 from keszybz/rename-dbus-dump

manager: rename dbus method

19 months agomanager: use target process context to set socket context
Ted X. Toth [Thu, 13 Oct 2022 19:58:26 +0000 (12:58 -0700)] 
manager: use target process context to set socket context

Use target process context to set socket context when using SELinuxContextFromNet
not systemd's context. Currently when using the SELinuxContextFromNet option for
a socket activated services, systemd calls getcon_raw which returns init_t and
uses the resulting context to compute the context to be passed to the
setsockcreatecon call. A socket of type init_t is created and listened on and
this means that SELinux policy cannot be written to control which processes
(SELinux types) can connect to the socket since the ref policy allows all
'types' to connect to sockets of the type init_t. When security accessors see
that any process can connect to a socket this raises serious concerns. I have
spoken with SELinux contributors in person and on the mailing list and the
consensus is that the best solution is to use the target executables context
when computing the sockets context in all cases.

[zjs review/comment:

This removes the branch that was added in 16115b0a7b7cdf08fb38084d857d572d8a9088dc.
16115b0a7b7cdf08fb38084d857d572d8a9088dc did two things: it had the branch here
in 'socket_determine_selinux_label()' and a code in 'exec_child()' to call
'label_get_child_mls_label(socket_fd, command->path, &label)'.

Before this patch, the flow was:
'''
mac_selinux_get_child_mls_label:
  peercon = getpeercon_raw(socket_fd);
  if (!exec_label)
     exec_label = getfilecon_raw(exe);

socket_open_fds:
  if (params->selinux_context_net)                 #
     label = mac_selinux_get_our_label();          #  this part is removed
  else                                             #
     label = mac_selinux_get_create_label_from_exe(path);
  socket_address_listen_in_cgroup(s, &p->address, label);

exec_child():
   exec_context = mac_selinux_get_child_mls_label(fd, executable, context->selinux_context);
   setexeccon(exec_context);
'''
]

19 months agoanalyze: use DumpUnitsMatchingPatternsByFileDescriptor 25007/head
Zbigniew Jędrzejewski-Szmek [Mon, 17 Oct 2022 13:03:16 +0000 (15:03 +0200)] 
analyze: use DumpUnitsMatchingPatternsByFileDescriptor

Similarly to DumpByFileDescriptor vs Dump,
DumpUnitsMatchingPatternsByFileDescriptor is used in preference. Dissimilarly,
a fallback to DumpUnitsMatchingPatterns is not done on error, because there is
no need for backwards compatibility.

The code is still more verbose than I'd like, but there are four different code
paths with slightly different rules in each case, so it's hard to make this all
very brief. Since we have a separate file dedicated to making those calls, the
verbose-but-easy-to-follow implementation should be OK.

Closes #24989.

I only did a quick test that all both variants works locally and over ssh.