We plan to SRU src:systemd-hwe to Jammy[1] to provide an easier way to SRU HWE hwdb rules to Ubuntu. The src:systemd-hwe package contains a test script[2] to ensure that no redundant hwdb rules are added to the package, i.e. rules that are already present in src:systemd. This test requires patches to implement --root flag support for the `systemd-hwdb query` command[3]. These patches are already present in kinetic.
Without these patches in Jammy, src:systemd-hwe would have to disable these tests, which are important to maintaining HWE hwdb rules in Ubuntu.
[Where problems could occur]
The patches add support for the --root flag when calling systemd-hwdb query, thus changing the behavior of this command (previously, query would always load the system's hwdb.bin). It is unlikely that existing scripts try to use the --root flag with `systemd-hwdb query`, but if they did, this is where we would see problems.
[Impact]
We plan to SRU src:systemd-hwe to Jammy[1] to provide an easier way to SRU HWE hwdb rules to Ubuntu. The src:systemd-hwe package contains a test script[2] to ensure that no redundant hwdb rules are added to the package, i.e. rules that are already present in src:systemd. This test requires patches to implement --root flag support for the `systemd-hwdb query` command[3]. These patches are already present in kinetic.
Without these patches in Jammy, src:systemd-hwe would have to disable these tests, which are important to maintaining HWE hwdb rules in Ubuntu.
[1] https:/ /bugs.launchpad .net/ubuntu/ +source/ systemd- hwe/+bug/ 1983996 /git.launchpad. net/~canonical- foundations/ +git/systemd- hwe/tree/ tests/hwdb- redundancy? h=main /github. com/systemd/ systemd/ pull/23518
[2] https:/
[3] https:/
[Test plan]
* Create a new directory for testing hwdb rule queries:
$ mkdir -p fakeroot/ etc/udev/ hdwb.d
* Add a new .hwdb file to override an existing rule. For example, I chose to override the last entry from /lib/udev/ hdwb.d/ 60-keyboard. hwdb:
$ tail -2 /lib/udev/ hwdb.d/ 60-keyboard. hwdb > fakeroot/ etc/udev/ hwdb.d/ 60-keyboard. hwdb reserved/ g' fakeroot/ etc/udev/ hwdb.d/ 60-keyboard. hwdb etc/udev/ hwdb.d/ 60-keyboard. hwdb dmi:bvn* :bvr*:bd* :svnAcer* :pnPeppy: * MODEL=reserved
$ sed -i 's/chromebook/
$ cat fakeroot/
evdev:atkbd:
XKB_FIXED_
* Create the hwdb.bin within fakeroot:
$ systemd-hwdb update --root fakeroot etc/udev/ hwdb.bin etc/udev/ hwdb.bin
$ ls fakeroot/
fakeroot/
* Finally, attempt to query this new hwdb.bin using systemd-hwdb query. On an unpatched system, we will see results from the system's hwdb.bin:
$ systemd-hwdb query --root fakeroot evdev:atkbd: dmi:bvn* :bvr*:bd* :svnAcer* :pnPeppy: * | grep XKB_FIXED_MODEL MODEL=chromeboo k
XKB_FIXED_
...and on a patched system we should see the overridden rule:
$ systemd-hwdb query --root fakeroot evdev:atkbd: dmi:bvn* :bvr*:bd* :svnAcer* :pnPeppy: * | grep XKB_FIXED_MODEL MODEL=reserved
XKB_FIXED_
[Where problems could occur]
The patches add support for the --root flag when calling systemd-hwdb query, thus changing the behavior of this command (previously, query would always load the system's hwdb.bin). It is unlikely that existing scripts try to use the --root flag with `systemd-hwdb query`, but if they did, this is where we would see problems.