-
Notifications
You must be signed in to change notification settings - Fork 400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(hwdb): install hwdb on demand when module is needed #2443
Conversation
I like and support this approach. Note that the downstream issue would not be resolved unless somehow hwdb.d/20-net-ifname.hwdb also gets installed into the initramfs. Is that outside of the scope of this PR (perhaps it should be) ? |
No, that's not needed. |
Exactly. I've just confirmed: https://gist.github.com/pvalena/873bed9e9eb749f127ca7f60c330dd3d |
|
||
# systemd-hwdb ships the file in /etc, with /usr/lib as an alternative. | ||
# Therefore consider this location as preferred for configuration. | ||
hwdb_bin="${udevdir}"/hwdb.bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
${udevdir}/hwdb.bin
is already unconditionally installed by 01systemd-udevd
, so it can be ignored here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I was rather thinking on systemd-udevd depending on this module, which might handle hwdb in more complex way; also not install multiple ones unnecessarily. Please also note that the install is not optional (-o
) intentionally; and this module is not enabled by default. Does that make sense?
There's also an additional benefit of this module working correctly without systemd-udevd :) in case that's ever needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also an additional benefit of this module working correctly without systemd-udevd :) in case that's ever needed.
This makes sense to me. This situation is very similar to udev rules - they are installed both by systemd-udevd
and udev-rules
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also an additional benefit of this module working correctly without systemd-udevd :)
That's a benefit without any value. ATM, HWDB is configuration for systemd-udevd
, just like .rules
files. It could be used for other things, but it's not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also an additional benefit of this module working correctly without systemd-udevd :) in case that's ever needed.
This makes sense to me. This situation is very similar to udev rules - they are installed both by
systemd-udevd
andudev-rules
.
Uff. Does udev-rules
even work on modern systems? The list of .rules
files seem to be rather short. (OTOH, it contains stuff that makes no sense in initrd, like 70-uaccess.rules
or 71-seat.rules
.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uff. Does udev-rules even work on modern systems?
We have a Gentoo container (with openrc and musl) where most Dracut tests pass - https://github.com/dracutdevs/dracut/blob/master/test/container/Dockerfile-Gentoo .
If Fedora wishes, it simply can just not package Dracut modules that is not needed for a systemd based initramfs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(OTOH, it contains stuff that makes no sense in initrd, like 70-uaccess.rules or 71-seat.rules.)
FWIW - both udev-rules
and systemd
Drauct modules seem to include these rules.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say if it's not breaking anything, let's keep it (and this also verifies hwdb.bin
is present / installed, as udevd module simply runs opt-install).
IOW first looks in |
Adding a module to install hwdb. Further extensions might make only selected part of hwdb installable, to save space. The module is not included by default. Including the module adds 2MB of compressed data (on Fedora, the file has 12MB). hwdb is needed in case of custom HW, like a keyboard/mouse or various interfaces. Original PR: dracutdevs#1681
Changes
Adding a module to install hwdb. Further extensions might make only selected part of hwdb installable, to save space. The module is not included by default.
Including the module adds 2MB of compressed data (on Fedora, the file has 12MB).
hwdb is needed in case of custom HW, like a keyboard/mouse or various interfaces.
Original PR: #1681
Downstream Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1968118
Please note that
hwdb.bin
is similarly installed bysystemd-udevd
, which could instead pull in this module as dependency.Checklist