Commit Graph

59225 Commits

Author SHA1 Message Date
Yu Watanabe
e402e99eaa network: fix DHCPv4 address renewal with IPv4ACD
Previously, when a DHCP address is renewed and if the IPv4ACD for the
address is enabled, the address will never drop the probing flag, thus
the lifetime of the address will never be updated.

This drops NETWORK_CONFIG_STATE_PROBING, and the IPv4ACD status is
managed another bit, Address.acd_bound. And, the flag is updated only
when the IPv4ACD announced the address or detects conflict.
2022-08-18 15:44:23 +09:00
Luca Boccassi
5ad8116a87 test: expect libdevmapper failure in TEST-50-DISSECT
libdevmapper/device mapper driver can return semi-random failures when
opening verity devices, and we have fallback code to deal with it.
But the test was not expecting the fallback path, so it became unreliable.

Fixes https://github.com/systemd/systemd/issues/23866
2022-08-18 01:35:06 +01:00
Zbigniew Jędrzejewski-Szmek
87305b0fbf sd-messages: rename newly added constants
This hasn't been through a release yet, so we are free to change the name.

Closes #24270.
C.f. 9075066955 (r80812414)
2022-08-17 22:01:54 +09:00
Zbigniew Jędrzejewski-Szmek
ed7f7a984d sd-messages: make the table wider
For whatever reason, nowadays we add entries that are quite long, so
we were using line continuation for most of new entries. This is hard
to read and edit. So let's just make the table wide enough to accomodate
all the names without line splits.
2022-08-17 22:01:54 +09:00
Lennart Poettering
4dde902ea0 tpm2-util: more structure initialization simplifications 2022-08-17 21:59:47 +09:00
Lennart Poettering
582fc142da random-util: drop unnecessary header file
(And some minor reindents)
2022-08-17 21:59:28 +09:00
Yu Watanabe
190169e591 Merge pull request #24250 from yuwata/backlight-multiple-graphics-cards
backlight: support multiple graphics cards system
2022-08-17 21:58:59 +09:00
Lennart Poettering
86b4e141a5 fs-util: make touch() an inline function 2022-08-17 21:58:33 +09:00
Lennart Poettering
aba5dac372 tpm2-util: credit TPM2 RNG entropy only once per boot
Acquiring random data from the TPM is not precisely quick, let's speed
things up by doing this at most once per boot. For that, let's maintain
a flag file in /run/.
2022-08-17 21:58:17 +09:00
Yu Watanabe
f9b3b99017 udev: rename various validate() -> should_reload() for builtin commands
Previously, true by validate() means several configs are outdated and we
need to reload configs. That's not intuitive for me. Let's rename the
functions.
2022-08-17 21:56:46 +09:00
Yu Watanabe
0161378cf7 Merge pull request #24333 from yuwata/sysctl
sysctl: improve performance for applying glob pattern
2022-08-17 21:56:15 +09:00
Yu Watanabe
59edcf2b64 test-network: add/update module check
For https://github.com/systemd/systemd-centos-ci/pull/517.
2022-08-17 10:05:20 +00:00
Yu Watanabe
fa9bd36937 test: add tests for glob sysctl pattern 2022-08-17 14:30:20 +09:00
Yu Watanabe
86fc149c69 test: use assertions in sysctl tests 2022-08-17 14:30:20 +09:00
Yu Watanabe
3f75892dd2 test: do not use sysctl.d to store test conf
Otherwise, late invocations of systemd-sysctl, especially through udev
rules may fail.
2022-08-17 14:30:20 +09:00
Yu Watanabe
9ec8c82b8c sysctl: apply prefix before calling glob()
Otherwise, if there exist million of network interfaces,
calling glob() for network properties takes much time.

Fixes #24031.
2022-08-17 14:30:20 +09:00
Yu Watanabe
3b703fe269 path-util: introduce path_glob_can_match() 2022-08-17 14:30:20 +09:00
Yu Watanabe
7177ac4572 sysctl: split out code for applying glob option 2022-08-17 14:30:20 +09:00
Yu Watanabe
c01404fdf1 sysctl: drop /proc/sys/ in prefix 2022-08-17 14:30:20 +09:00
Yu Watanabe
350ffa9749 sysctl: use ordered_hashmap_ensure_put() 2022-08-17 14:30:20 +09:00
Yu Watanabe
e0504dd011 backlight: fix issue on multiple graphics cards system
If a system has multiple graphics cards, then we cannot associate
platform backlight devices to backlight devices under PCI bus.

Previously, in such case, vaidate_device() for a raw backlight device
might erroneously detect a platform device and return false. So, users
could not save/load backlight level.

This makes validate_device() give up to associate platform devices on
non-PCI bus with raw backlight devices. That may cause unwanted
backlight level save or restore by systemd-backlight@.service, but users
can workaround that by masking specific instances of the service.

Closes #24223.
2022-08-17 14:22:43 +09:00
Yu Watanabe
f8ff4b6076 backlight: filter out unnecessary backlight devices by device enumerator 2022-08-17 14:21:36 +09:00
Yu Watanabe
b2f77b5e21 backlight: add/update several logs for validating backlight devices 2022-08-17 14:21:26 +09:00
Zbigniew Jędrzejewski-Szmek
b1358f0362 run: simplification 2022-08-17 07:08:37 +09:00
Zbigniew Jędrzejewski-Szmek
eab62c01ef manager: allow assignment of properties on target/swap/device units
E.g. Documentation or Markers could apply to any unit type. This already worked
partially, because a direct dbus call could be made:

After rebuild with the patch, but before the manager has been restarted:
$ build/systemctl --user set-property dev-zram0.swap Markers=+needs-restart
$ build/systemctl --user show -p Markers dev-zram0.swap
Markers=needs-restart

I noticed that that the rpm unit restart helper was throwing errors for target
units. We should just let the Markers be set for those too, even if it doesn't
do anything in the end. This way we don't need to special-case by unit type.
2022-08-17 07:08:37 +09:00