A switch like --root or --installroot is required. The thing is that we call `udevadm hwdb --update` at the end of udev installation, in the post install phase in 2 places: udev and hwids package that contains all the iab.txt, oui.txt, pci.ids, and so forth The postinst phase must be called with ${ROOT} as the package manager is supposed to support ${ROOT}. So the files should be picked up from ${ROOT} what it uses to generate the hwdb.bin and the hwdb.bin should also end up in the actual ${ROOT} udevadm hwdb --update --root="${ROOT}" And if not defined, ${ROOT} is just / Currently this is breaking the packaging of udev for Gentoo, in fact, this is the only real problem we are having. Thanks for looking into it
Created attachment 74371 [details] [review] Patch to add --root switch for offset $ROOT support "udevadm: support updating hwdb from an offset root Introduce `--root` option to make users run udevadm on rootfs not mounted as / Ease the life of distribution packagers." Thanks to Luca Barbato (lu_zero) for the orig. patch. Only changed slightly to apply cleanly against current git, and 197.
The patch seems to read the sources from the real root. It should read the files from the --root= location. --root= should work now.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.