1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

71634 Commits

Author SHA1 Message Date
Göran Uddeborg
32a56fd81c po: Translated using Weblate (Swedish)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Göran Uddeborg <goeran@uddeborg.se>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main
2024-03-06 02:06:50 +01:00
Vasiliy Kovalev
a850ae7a9c hwdb: Add touchpad toggle mapping for Kvadra LE14U/LE15U
Signed-off-by: Vasiliy Kovalev <kovalev@altlinux.org>
2024-03-05 22:08:09 +00:00
Mike Yuan
771bf2274a
basic: remove spuriously doubled newline and leftover separator
Follow-up for 3fc72d5413
2024-03-06 03:29:12 +08:00
Daan De Meyer
1ec5c1409e
Merge pull request #31550 from teknoraver/dlopen_compress
Dynamically load compression libraries
2024-03-05 20:16:19 +01:00
Daan De Meyer
674a9a010b
Merge pull request #31640 from DaanDeMeyer/mkosi
Mkosi fixes
2024-03-05 20:13:00 +01:00
Frantisek Sumsal
75c8b98090 test: bump the timeout for test-execute subtests if running w/ QEMU
Bump the timeout for test-execute subtests if running with plain QEMU
(as part of TEST-02-UNITTESTS), since we might start hitting the default
2m timeout with some more involved subtests, especially when the AWS
region we're running in is under heavy load. I see this regularly in the
CentOS Stream 9 nightly cron job with exec-dynamicuser-statedir.service
which has a lot of ExecStart's.
2024-03-05 18:50:14 +00:00
Daan De Meyer
bb478caa86 mkosi: Use specifier to refer to the output directory
Otherwise the output directory cannot be configured by users.
2024-03-05 19:42:18 +01:00
Daan De Meyer
c00b17f6d3 mkosi: Allow users to configure the build and cache directory 2024-03-05 19:41:50 +01:00
Daan De Meyer
adbb0237c6 mkosi: Set minimum version
This will only be taken into account by newer mkosi versions but it'll
at least save some pain from running on a too old version.
2024-03-05 19:41:06 +01:00
Vishal Chillara Srinivas
d08566fad7 resolved: remove entry from cache when goodbye packet received
RFC6762 10.1 says that queriers receiving a Multicast DNS response with a TTL
of zero SHOULD record a TTL of 1 and then delete the record one second later.

Added a timer event to trigger a callback to clean-up the cache one second after
a goodbye packet is received. The callback also checks for any cache entries
expiring within the next one second and schedules follow-up cleanup callbacks
accordingly.
2024-03-05 19:00:03 +01:00
Adrian Vovk
91448cf050
NEWS: Add note about freezing user session changes
These changes have the potential to break suspend on systems with
proprietary NVIDIA drivers, so we should make a big NEWS entry about it
2024-03-05 12:12:37 -05:00
Adrian Vovk
a5b009d935
homework: Lock/Unlock: Freeze/Thaw user session
Whenever a home directory is in a locked state, accessing the files of
the home directory is extremely likely to cause the thread to hang. This
will put the session in a strange state, where some threads are hanging
due to file access and others are not hanging because they are not
trying to access any of the user's files.

This can lead to a whole slew of consequences. For example, imagine a
likely situation where the Wayland compositor is not hanging, but the
user's open apps are. Eventually, the compositor will detect that none
of the apps are responding to its pings, assume that they're frozen
(which they are), and kill them. The systemd user instance can end up in
a similarly confused state and start killing user services. In the worst
case, killing an app at an unexpected moment can lead to data loss.

The solution is to suspend execution of the whole user session by
freezing the user's slice.
2024-03-05 12:12:36 -05:00
Adrian Vovk
0b958bb3ee
sleep: Always freeze user.slice
Previously, we'd only freeze user.slice in the case of s2h, because we
didn't want the user session to resume while systemd was transitioning
from suspend to hibernate.

This commit extends this freezing behavior to all sleep modes.

We also have an environment variable to disable the freezing behavior
outright. This is a necessary workaround for someone that has hooks
in /usr/lib/systemd/system-sleep/ which communicate with some
process running under user.slice, or if someone is using the proprietary
NVIDIA driver which breaks when user.slice is frozen (issue #27559)

Fixes #27559
2024-03-05 12:12:35 -05:00
Adrian Vovk
7483708131
bus-unit-util: Add utility to freeze/thaw units
This utility lets us freeze units, and then automatically thaw them
when via a _cleanup_ handler. For example, you can now write something
like:

```
_cleanup_(unit_freezer_thaw) UnitFreezer freezer = UNIT_FREEZER_NULL;
r = unit_freezer_freeze("myunit.service", &freezer);
if (r < 0)
    return r;
// Freeze is thawed once this scope ends
```

Aside from the basic _freeze and _thaw methods, there's also
_cancel and _restore. Cancel destroys the UnitFreezer without
thawing the unit. Restore creates a UnitFreezer without freezing it.
The idea of these two methods is that it allows the freeze/thaw to
be separated from each other (i.e. done in response to two separate
DBus method calls). For example:

```
_cleanup_(unit_freezer_thaw) UnitFreezer freezer = UNIT_FREEZER_NULL;
r = unit_freezer_freeze("myunit.service", &freezer);
if (r < 0)
    return r;
// Freeze is thawed once this scope ends

r = do_something()
if (r < 0)
    return r; // Freeze is thawed

unit_freezer_cancel(&freezer); // Thaw is canceled.
```

Then in another scope:
```
// Bring back a UnitFreezer object for the already-frozen service
_cleanup_(unit_freezer_thaw) UnitFreezer freezer = UNIT_FREEZER_NULL;
r = unit_freezer_restore("myunit.service", &freezer);
if (r < 0)
    return r;
// Freeze is thawed once this scope ends
```
2024-03-05 12:12:34 -05:00
Lennart Poettering
1761567641 resolved: properly decode NAPTR RRs
Fixes: #18126
2024-03-05 15:46:31 +01:00
Lennart Poettering
c6342e35b0 escape: teach octescape() to work with NUL terminated strings 2024-03-05 15:46:31 +01:00
Lennart Poettering
6399be223b resolved: make resolved authoritative in resolveing our local host name
This is a kinda a follow-up for ce266330fc: it
makes resolved authoritative on our local hostname, and never contacts
DNS anymore for it.

We effectively already were authoritative for it, except if the user
queried for other RR types than just A/AAAA. This closes the gap and
refuses routing other RR type queries to DNS.

Fixes: #23662
2024-03-05 15:31:32 +01:00
Lennart Poettering
4b91896226 resolved: make outselves authoritative for /etc/hosts entries in full
If you query for an MX RR of a host listed in /etc/hosts, let's return
an empty reply rather than NXDOMAIN, i.e. indicate that the name exists
but has no MX RR assigned, thus making ourselves authoritative.

The venerable "host" tool by default sends requests for A + AAAA + MX
and ensures we never propagate queries further on.

Fixes: #31223
2024-03-05 15:31:26 +01:00
Lennart Poettering
40008b83a0 resolved: rename variable found_{a|aaaa} → question_for_{a|aaaa}
Te variables indicate what kind of RRs we are looking for, but the name
so far suggests it was about what we already found. Let's rename the
variables to make the purpose clearer.
2024-03-05 15:31:02 +01:00
Lennart Poettering
8841d1cef8 resolved: do DNS RR type based routing
So far we only looked at the domain name when routing requests to
specific scopes. With this we'll also take the DNS RR type into account.
This takes benefit of the fact that lookups for RRs such as SOA or NS or
the various DNSSEC RR types never really make sense to be routed to
LLMNR or mDNS, since they don't have concepts there.

This hence refuses to route requests for those RR types to the
LLMNR/mDNS scopes, which hence means they'll likely be routed to classic
DNS instead.

This should improve behaviour of tools that assumes it speaks to classic
DNS only via 127.0.0.53, since it will now usually do that.
2024-03-05 15:29:25 +01:00
Lennart Poettering
df81adba88 ci: disable test that is now answered by knot
dig question with DNSSEC on will now be proxied upstream, i.e. to the
test knot server. This leads to different results, but the result isn't
tha tinteresting since we don't want to test knot, but resolved. Hence
comment this test.

There seems to be something wrong with the test though, as the upstream
server refused recursion, but if so it is not suitable as an upstream
server really, as resolved can only be client to a recursive resolver.
2024-03-05 15:29:19 +01:00
Lennart Poettering
9c47b33444 resolved: enable DNS proxy mode if client wants DNSSEC
So far we disabled DNSSEC if local clients asked for it via DO flag if
DNSSEC=no is set. Let's instead switch to proxy mode in this case, and
thus treat client requested DO mode as a way to force proxy mode.

This means DNSSEC=no just controls whether resolved will do validation
for regular looups, but it has no effect anymore on lookups from clients
that indicated they want to do their own DNSSEC anyway.

Fixes: #19227 #23737 #25105
2024-03-05 15:29:15 +01:00
Lennart Poettering
718324c5e0 resolved: use relaxed single label rules when proxying DNS queries
When we use proxy mode when propagating DNS queries to upstream DNS
servers, let's use the relaxed single label rules. This has the benefit
that tools such "delv" work on the proxy stub 127.0.0.54.
2024-03-05 15:29:10 +01:00
Lennart Poettering
36418a4792 resolvectl: expose new SD_RESOLVED_RELAX_SINGLE_LABEL flag in resolvectl 2024-03-05 15:29:04 +01:00
Lennart Poettering
d0eae64c1f resolved: add new SD_RESOLVED_RELAX_SINGLE_LABEL resolver flag
This new flag allows resolving single label names via public DNS. By
default this is turned off, and this option allows excepting a lookup
for this.
2024-03-05 15:28:54 +01:00
Luca Boccassi
11d1c90c49
Merge pull request #31631 from mrc0mmand/mkosi-addons
mkosi: fix UKI addons test
2024-03-05 14:16:49 +00:00
Antonio Alvarez Feijoo
43aca0d99e extract-word: update remaining calls to extract_many_words
Follow-up to 4f49512695
2024-03-05 12:21:42 +00:00
Yu Watanabe
21fdecdc13 sd-netlink: allow to call rtnl_get_link_info() without iftype and flags 2024-03-05 12:19:47 +00:00
Frantisek Sumsal
e86b1a9b0f mkosi: make shellcheck happy 2024-03-05 12:41:30 +01:00
Matteo Croce
3c66db7e28 Update TODO file
Update the line about dynamically load compression libraries.
2024-03-05 12:38:39 +01:00
Matteo Croce
3fc72d5413 dynamically load compression libraries
Dynamically load liblz4, libzstd and liblzma with dlopen().
This helps to reduce the size of the initrd image when these libraries
are not really needed.
2024-03-05 12:37:21 +01:00
Matteo Croce
1c20c9f4fc move dlfcn-util into basic
I'm going to dlopen_many_sym_or_warn() in src/basic/compress.c, this
will introduce a circular dependency because libshared already depends
from libbasic.
To avoid this, move dlfcn-util.c from libshared to libbasic.
2024-03-05 12:33:44 +01:00
Frantisek Sumsal
193fa9d7fe Revert "mkosi: Don't fail on systemd-vconsole-setup.service failure for now"
This doesn't seem to fail anymore.

This reverts commit 84c7929cd4.
2024-03-05 12:18:40 +01:00
Frantisek Sumsal
d9c8cf40b5 Revert "mkosi: Disable cmdline addon test for now"
Let's see if this finally works.

This reverts commit e167a8283d.
2024-03-05 12:16:44 +01:00
Frantisek Sumsal
374fa8e853 mkosi: fix UKI addons test
The test hasn't been working for a while, since there's no /efi or /boot
in $DESTDIR.

Resolves: #31618
2024-03-05 12:16:44 +01:00
Nick Rosbrook
70aece8193 test: check for kernel.apparmor_restrict_unprivileged_userns
Some tests in test-execute are already skipped if we do not have
unprivileged user namespaces. Extend this check to look for an apparmor
specific sysctl indicating that unprivileged userns creation is
restricted.
2024-03-05 11:15:49 +00:00
Max Gautier
7360be92ad Fixing bad link to Debian packages tests 2024-03-05 11:22:13 +01:00
Zbigniew Jędrzejewski-Szmek
27faf24a48
Merge pull request #31597 from keszybz/option-P-for-machinectl-and-timedatectl
Option -P for machinectl and timedatectl
2024-03-05 10:11:40 +04:00
Evgeny Vereshchagin
1500b656cd fuzz: dump LLDP neighbors JSON too
to make sure all the fields are in more or less good shape.

It's a follow-up to https://github.com/systemd/systemd/pull/31583
2024-03-05 12:40:28 +09:00
Mike Yuan
f52e9ed62b
core/service: don't transition to start-post on cgroup empty event
with ExitType=cgroup

It's not clear to me what the rationale of the logic was
when ExitType=cgroup got introduced. But similar to
the previous commit, I think we should not transition to
'start-post' on cgroup empty event. This is especially
important for Type=dbus/notify services.
2024-03-05 10:45:52 +08:00
Mike Yuan
1651ce09c0
core/service: Type=notify/dbus services shouldn't be considered active
when ExitType=cgroup and main process exits

Follow-up for ef4300654e
2024-03-05 10:45:49 +08:00
Luca Boccassi
e0270bab43
Merge pull request #31582 from bluca/fix_hostnamed_ci
test: fix test-loopback and test-resolved-stream on Ubuntu 24.04
2024-03-04 20:37:52 +00:00
Mike Yuan
2560dcbfe6 stat-util: generalize is_* and verify_* handling 2024-03-04 19:53:51 +00:00
Lennart Poettering
2492c89af0 resolved,pcrlock: make a bunch of varlink introspection structures static
Not sure why gcc doesn't warn that these have no "extern" definition,
but also aren't static...
2024-03-04 19:50:54 +00:00
Lennart Poettering
af8a03ccf8 resolved: mention the Varlink interface of resolved
This is ready from prime-time, hence mention it.
2024-03-04 19:50:01 +00:00
Lennart Poettering
fbcfa943cd resolvectl: output nice error message if we can't JSONify RR
Some RR types we don't have a mapping to JSON for. Handle this
reasonably.
2024-03-04 19:49:21 +00:00
Lennart Poettering
217f63c9b8 varlink: allow strings for integer varlink IDL fields
This is a follow-up for 67a3028555: also
allow strings as integer during IDL validation of JSON records.
2024-03-04 19:47:26 +00:00
Frantisek Sumsal
a7839bff68
Merge pull request #31619 from weblate/weblate-systemd-main
Translations update from Fedora Weblate
2024-03-04 20:29:34 +01:00
Mike Yuan
3d1759299f
man/systemd-debug-generator: be consistent on '=' for boolean options 2024-03-05 02:19:58 +08:00
Oğuz Ersen
ebc226d69b po: Translated using Weblate (Turkish)
Currently translated at 100.0% (233 of 233 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/tr/
Translation: systemd/main
2024-03-04 19:12:57 +01:00