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

60574 Commits

Author SHA1 Message Date
Luca Boccassi
a5683afba8 Update autosuspend hwdb
ninja -C build update-hwdb-autosuspend
2022-10-24 20:26:22 +01:00
Luca Boccassi
3203190130 Update hwdb
ninja -C build update-hwdb
2022-10-24 20:25:58 +01:00
Luca Boccassi
fa9b3a5f81 NEWS: update contributors list 2022-10-24 20:14:12 +01:00
Yu Watanabe
8cf144c3f6
Merge pull request #25052 from yuwata/resolvconf-compat
resolvconf-compat: first try to use the specified interface name as is
2022-10-25 04:08:41 +09:00
Frantisek Sumsal
f5dfbdd014 udev: fix the errno check if a couple of places
Follow-up to 691a596da1.
2022-10-25 04:08:17 +09:00
Luca Boccassi
022684221e mkosi: libbpf0 -> libbpf1 2022-10-24 20:40:07 +02:00
Yu Watanabe
8207ec4b49
Merge pull request #25080 from keszybz/search-paths
Refusing linking files underneath our hierarchy, improve error messages
2022-10-25 01:57:41 +09:00
Yu Watanabe
72ca42c1b4 test: add tests for setting DNS servers by resolvectl or resolvconf 2022-10-25 01:52:16 +09:00
Luca BRUNO
88f8bd753a 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.
2022-10-25 01:04:12 +09:00
Edson Juliano Drosdeck
a58b8d65ca
hwdb: fix key toggle and programmable button for Positivo K142 (#25111) 2022-10-25 01:03:52 +09:00
H A
d8e777e0a5 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
2022-10-25 00:27:39 +09:00
Lennart Poettering
3b1494ad70 homed: properly initialize all return params 2022-10-24 15:56:59 +02:00
Yu Watanabe
7d4e850323 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.
2022-10-24 20:34:10 +09:00
Zbigniew Jędrzejewski-Szmek
32d2e70ae4 man: fix count mismatch
We said "search path" and "search paths" in the same sentence…
2022-10-24 12:54:03 +02:00
Zbigniew Jędrzejewski-Szmek
a6f318a554 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
830964834f. 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.
2022-10-24 12:51:41 +02:00
Zbigniew Jędrzejewski-Szmek
f31f10a620 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.
2022-10-24 12:38:28 +02:00
Zbigniew Jędrzejewski-Szmek
81de696273 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.
2022-10-24 12:38:28 +02:00
Zbigniew Jędrzejewski-Szmek
94e7298d30 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.
2022-10-24 12:37:19 +02:00
Yu Watanabe
427eeb44f2 resolvectl: rely on invoked_as() 2022-10-24 18:55:53 +09:00
Yu Watanabe
a56dd1580d string-util: make free_and_strdup_warn() return 1 when new string is assigned 2022-10-24 18:55:11 +09:00
Yu Watanabe
5905bddce2 systemctl: fix potential memleak on failure in determine_default()
And make verb_set_default() return zero on success.
2022-10-24 18:55:11 +09:00
Frantisek Sumsal
4856f63846
Merge pull request #25100 from weblate/weblate-systemd-master
Translations update from Fedora Weblate
2022-10-22 19:01:06 +00:00
Jan Kuparinen
cbcd3b1b9c 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
2022-10-22 19:19:52 +02:00
Yuri Chornoivan
dad6735cdf 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
2022-10-22 19:19:52 +02:00
Oğuz Ersen
f8270d8aad 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
2022-10-22 19:19:51 +02:00
김인수
60a325bbfe 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
2022-10-22 19:19:51 +02:00
Daniel Rusek
ddf99965fa 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
2022-10-22 19:19:51 +02:00
Zbigniew Jędrzejewski-Szmek
96f8c63601 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 132c73b57a, 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.
2022-10-21 17:40:59 +02:00
Jonathan Kang
2051a98172 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
2022-10-21 16:53:33 +02:00
Michael Biebl
8c5787d75e
Merge pull request #25083 from bluca/revert_timer
Revert "Fix issue with system time set back (#24131)"
2022-10-20 19:58:10 +02:00
Frantisek Sumsal
b1c547d161
Merge pull request #25084 from mrc0mmand/scorecard-tweaks
ci: run the Scorecards action in PRs only on config update
2022-10-20 16:45:22 +00:00
Lennart Poettering
efe7ab9652 update TODO 2022-10-20 18:28:55 +02:00
Luca Boccassi
edbaca9f9c
Merge pull request #25081 from keszybz/test-local-addresses-fail
Fix racy check in test-local-addresses
2022-10-20 17:47:14 +02:00
Frantisek Sumsal
b3ea9cf13b 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).
2022-10-20 17:10:50 +02:00
Frantisek Sumsal
3e35a3302c ci: add a missing SPDX line 2022-10-20 17:03:37 +02:00
Luca Boccassi
701f7f6c8f
Merge pull request #25077 from keszybz/completions-optional-components
Fix completions when machinectl is not installed and other fixes
2022-10-20 15:57:46 +02:00
Luca Boccassi
0bf1d0ff04 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 5ded3917a1.

Fixes https://github.com/systemd/systemd/issues/24984
2022-10-20 14:01:09 +01:00
Luca Boccassi
40c05a3459 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
2022-10-20 14:29:45 +02:00
Weblate
1726ce726f 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
2022-10-20 12:06:08 +00:00
Frantisek Sumsal
0dc8777eb3
Merge pull request #25078 from mrc0mmand/update-pot
po: regenerate the translation files
2022-10-20 11:43:54 +00:00
Luca Boccassi
63857bf4f7 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
2022-10-20 13:11:10 +02:00
Zbigniew Jędrzejewski-Szmek
0ed08e50dd 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.
2022-10-20 12:58:16 +02:00
Zbigniew Jędrzejewski-Szmek
3f861e8dd9 test-local-addresses: inline iterator variable 2022-10-20 12:57:31 +02:00
Zbigniew Jędrzejewski-Szmek
983e637872 resolved: drop unnecessary empty lines 2022-10-20 12:57:31 +02:00
Zbigniew Jędrzejewski-Szmek
d856e1a745 tree-wide: inline declarations of sd_netlink_message iterators
Most places were already converted, but a few weren't for some reason.
2022-10-20 12:57:31 +02:00
Zbigniew Jędrzejewski-Szmek
5ad58fea73 Make comment about coordinating offline and online installation symmetric
https://github.com/systemd/systemd/pull/24728#issuecomment-1260966910
2022-10-20 12:28:00 +02:00
Frantisek Sumsal
de85e1a2f4 docs: update translation strings before new release 2022-10-20 10:39:03 +02:00
Frantisek Sumsal
e9c43e5f22 po: regenerate the translation files
See: https://mesonbuild.com/Localisation.html#generate-pot-file
Resolves: #25071
2022-10-20 10:38:15 +02:00
Leon M. George
3d218676fc man: document effect of --user on --unit with journalctl
Relates to #25061.
2022-10-20 10:28:52 +02:00
Zbigniew Jędrzejewski-Szmek
c2af23b50f
Merge pull request #25073 from mrc0mmand/parse-hwdb-tweaks
test: make parse-hwdb compatible with older pyparsing versions
2022-10-20 10:02:04 +02:00