1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-29 21:55:36 +03:00
Commit Graph

56441 Commits

Author SHA1 Message Date
Yu Watanabe
830f50ab1e resolve: drop never matched condition
As dns_scope_good_domain() does not return negative errno.
2022-02-23 07:53:53 +09:00
Yu Watanabe
6e4d122ad1 unit: escape %
Fixes #22601.
2022-02-23 06:54:54 +09:00
Lennart Poettering
b547838000 units: drop After=systemd-networkd.service from systemd-resolved.service
This ordering existed since resolved was first created, but there should
not be any need to order the two services against each other, as
resolved should be able to pick up networkd DNS metadata either way (as
it works with inotify in /run).

Let's drop this hence, and not cargo-cult this to eternity

Also see: https://github.com/systemd/systemd/pull/22389#issuecomment-1045978403
2022-02-23 06:52:39 +09:00
Yu Watanabe
05d8ad0f85
Merge pull request #22596 from yuwata/test-fix-fd-leaks
test: fix fd leaks
2022-02-23 06:51:06 +09:00
Zbigniew Jędrzejewski-Szmek
cab4ed0f4a
Merge pull request #22592 from yuwata/test-oomd-util-fixlets
test: test-oomd-util fixlets
2022-02-22 18:25:45 +01:00
Frantisek Sumsal
b491d74064 ci: fix clang-13 installation
For some reason Ubuntu Focal repositories now have `llvm-13` virtual
package which can't be installed, but successfully fools our check,
resulting in no clang/llvm being installed...

```
$ apt show llvm-13
Package: llvm-13
State: not a real package (virtual)
N: Can't select candidate version from package llvm-13 as it has no candidate
N: Can't select versions from package 'llvm-13' as it is purely virtual
N: No packages found

$ apt install --dry-run llvm-13
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package llvm-13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'llvm-13' has no installation candidate
```
2022-02-22 17:57:25 +01:00
Zbigniew Jędrzejewski-Szmek
09d0758b22
Merge pull request #22574 from yuwata/network-dhcp-pd-fixes
network: dhcp-pd: fix two issues
2022-02-22 17:53:00 +01:00
Lennart Poettering
92148fb777 clang-format: we actually typically use 16ch continuation indentation
We use 8 for blocks, and 16 for continuation in most cases afaics, hence
say so in .clang-format too
2022-02-22 17:32:50 +01:00
Yu Watanabe
be99883e13 test: fix file descriptor leak in test-psi-util
Fixes an issue reported in #22576.
2022-02-23 00:58:16 +09:00
Yu Watanabe
1da5325d19 test: fix file descriptor leak in test-tmpfiles.c
Also fixes a typo in assertion.

Fixes an issure reported in #22576.
2022-02-23 00:58:16 +09:00
Yu Watanabe
19962747ca test: fix file descriptor leak in test-fs-util
Fixes an issue reported in #22576.
2022-02-23 00:58:13 +09:00
Lennart Poettering
bd4f672e4c
Merge pull request #22584 from poettering/systemctl-verb-renamed
systemctl: rename "verb" entrypoint functions systematically to verb_xyz()
2022-02-22 16:16:58 +01:00
Lennart Poettering
c04c7c10c0 analyze: fix build on non-seccomp builds
Follow-up for #22585

See: https://github.com/systemd/systemd/pull/22585#issuecomment-1047658990
2022-02-22 16:15:52 +01:00
Lennart Poettering
623461c130 systemctl: rework daemon_reload() functions
Let's split out the inner parts of verb_daemon_reload() as a function
daemon_reload() and then stop using the former outside of the verbs
logic, and instead call the latter whenever we need to reload the daemon
as auxiliary opeation.

This should make our logic more systematic as we don't have to provide
fake or misleading argc/argv to verb_daemon_reload() anymore.
2022-02-22 14:15:08 +01:00
Lennart Poettering
32baf64d5a systemctl: systematically rename verb entrypoints verb_xyz()
Let's clean up our function naming a bit, and always name the
verb_xyz(), where the xyz maps to the command line verb as closely as
possible.

No actual code changes, just an attempt to make the systemctl sources a
bit more systematic, and less surprising.
2022-02-22 14:15:07 +01:00
Yu Watanabe
282696ce52 test: fix file descriptor leak in test-oomd-util
Fixes an issue reported in #22576.
2022-02-22 21:50:52 +09:00
Yu Watanabe
8306912b0e test: fix memory and fd leak in test-dhcp6-client
Fixes an issue reported in #22576.
2022-02-22 21:50:43 +09:00
Yu Watanabe
2e37084fc9 test: drop timeout handlers
Fixes file descriptor leak reported in #22576.
2022-02-22 21:50:32 +09:00
Yu Watanabe
62d4b3b36e test: fix file descriptor leak in test-catalog
Fixes an issue reported in #22576.
2022-02-22 21:50:29 +09:00
Yu Watanabe
07b7337aff network: dhcp-pd: allow to assign the same subnet prefix to multiple interfaces
There is no reason networkd refuses that. Especially, when multiple
downstream interfaces are connected to the same network, it is natural to
assign the same subnet prefix to them.

Prompted by #22571.
2022-02-22 20:39:32 +09:00
Yu Watanabe
38488babe7 network: dhcp-pd: fix prefix length of address assigned to upstream interface
This effectively revert ab0c82d9f7.

I have no idea why I did that...

Fixes #22559.
2022-02-22 20:39:28 +09:00
Yu Watanabe
a6d6a51d83 test-oomd-util: fix conditional jump on uninitialised value
Fixes #22577.
2022-02-22 20:24:22 +09:00
Yu Watanabe
d9fe39b24a test-oomd-util: style fixlets 2022-02-22 20:21:57 +09:00
Franck Bui
c972880640 core: really skip automatic restart when a JOB_STOP job is pending
It's not clear why we rescheduled a service auto restart while a stop job for
the unit was pending. The comment claims that the unit shouldn't be restarted
but the code did reschedule an auto restart meanwhile.

In practice that was rarely an issue because the service waited for the next
auto restart to be rescheduled, letting the queued stop job to be proceed and
service_stop() to be called preventing the next restart to complete.

However when RestartSec=0, the timer expired right away making PID1 to
reschedule the unit again, making the timer expired right away... and so
on. This busy loop prevented PID1 to handle any queued jobs (and hence giving
no chance to the start rate limiting to trigger), which made the busy loop last
forever.

This patch breaks this loop by skipping the reschedule of the unit auto restart
and hence not depending on the value of u->restart_usec anymore.

Fixes: #13667
2022-02-22 11:45:12 +01:00
Ludwig Nussel
6d7127d6dd systemctl: improve error messages related to halt failures 2022-02-22 11:36:29 +01:00
Zbigniew Jędrzejewski-Szmek
22049270c0
Merge pull request #22585 from poettering/analyze-split-up
analyze: split out each verb into its own .c/.h pair
2022-02-22 11:02:57 +01:00
Lan Tian
70920214b6 hwdb: Force release calculator key on all HP OMEN laptops 2022-02-22 10:40:51 +01:00
prumian
d9ab110ddc
hwdb: add CST Laser Trackball (#22583)
Set the default to 800DPI as this is what user manual suggests.
2022-02-22 07:47:39 +01:00
Lennart Poettering
0e48986961 env-util: drop unsetenv_erase()
Follow-up for: e99ca14741

Found by @grigorig: e99ca14741 (r67071855)
2022-02-21 23:08:34 +00:00
Lennart Poettering
dc4864dd68 analyze: modernize pretty_boot_time() a bit
Use simple strextend() backed by dynamic memory instead of format string
logic with fixed buffer.
2022-02-21 17:22:23 +01:00
Lennart Poettering
ef38bedbf9 analyze: systematically name verb entry point functions verb_xyz()
Some of the functions so far were named do_xyz(), others dump_xyz() and
even others test_xyz(). let's instead name them exactly like the verb
exposed in the command line, just prefixed with verb_
2022-02-21 17:22:23 +01:00
Lennart Poettering
e82116e56b analyze: move "condition" verb into analyze-condition.[ch] 2022-02-21 17:22:23 +01:00
Lennart Poettering
f2562398ea analyze: split out "verify" verb into own .c/.h file
This renames the old analyze-verify.[ch] pair →
analyze-verify-util.[ch], because it's used by the test logic as well,
and by keeping it separate from the verify verb logic we don't have to
import the arg_xyz variables.
2022-02-21 17:22:23 +01:00
Lennart Poettering
2acfc25225 analyze: move inspect-elf verb entrypoint into analyze-elf.[ch], too
like for the other verbs, let's move the whole entry point for the verb,
too.
2022-02-21 17:22:23 +01:00
Lennart Poettering
57a22a3f97 analyze: fully move "security" verb to analyze-security.[ch]
let's move the verb entropy point too, like for the other verbs now.
2022-02-21 17:22:23 +01:00
Lennart Poettering
f24f8e3789 analyze: split out "time" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
ef215fa752 analyze: split out critical chain 2022-02-21 17:22:23 +01:00
Lennart Poettering
0c2d69df7f analyze: split out "unit-files" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
36258fbe74 analyze: split out "unit-paths" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
faaa6ea076 analyze: split out log control verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
c649b343b4 analyze: split out cat-config verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
ba474dada8 analyze: split out "plot" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
113dd9cbc4 analyze: split out "blame" verb + time helpers 2022-02-21 17:22:23 +01:00
Lennart Poettering
6488e8443b analyze: split out "capability" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
73cb64c44d analyze: split out "exit-status" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
ab86ccbab0 analyze: highlight the range of deprecated verbs in comments a bit better 2022-02-21 17:22:23 +01:00
Lennart Poettering
2b04e72cd1 analyze: split out "service-watchdogs" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
cccd2af6f5 analyze: split out "dot" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
25eb70af8b analyze: split out "dump" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering
389638d395 analyze: split out "syscall-filter" verb 2022-02-21 17:22:23 +01:00