Commit Graph

59235 Commits

Author SHA1 Message Date
Alper Nebi Yasak
e2f25ae648 udev: hwdb: Match iio sensors based on their label
The IIO subsystem exposes a 'label' sysfs file to help userspace better
identify its devices [1]. Standardized labels include the sensor type
along with its location, including 'accel-base' and 'accel-display'.

Most Chrome OS boards have two accelerometers that are indistinguishable
except for this label (or a 'location' sysfs file before Linux v6.0),
and need different mounting matrix corrections based on their location.

Add a udev rule that matches hwdb entries using this label, so we can
correct both accelerometers on these devices with hwdb entries. The
existing rules and hwdb entries are not modified to keep potential
out-of-tree entries working, but new entries in this form will override
existing ones. Also add currently standardized labels to parse-hwdb.py.

[1] https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-iio
2022-08-18 21:17:19 +03:00
Frantisek Sumsal
cd7ad0cbde Merge pull request #24054 from keszybz/initrd-no-reload
Don't do daemon-reload in the initrd
2022-08-18 13:15:14 +00:00
Luca Boccassi
0a152619ac bash-completion: autocomplete cgroup names in systemd-cgtop 2022-08-18 12:58:12 +01:00
Zbigniew Jędrzejewski-Szmek
db5276215a initrd-parse-etc: override argv[0] to avoid dracut issue
Quoting https://github.com/systemd/systemd/pull/24054#issuecomment-1210501631:
> this would need a patch in dracut, specifically adding the
> systemd-sysroot-fstab-check to the list of installed stuff:
> fe8fa2b0ca/modules.d/00systemd/module-setup.sh (L47).
>
> I could do this manually in the CI (and I guess I'd have to do it anyway even
> if the patch lands in upstream, since it won't be available in C8S), but it
> should get there first before merging this PR, otherwise it's going to break
> Rawhide.
2022-08-18 10:27:44 +02: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