Bug 60398 - systemd-197: udevadm hwdb --update needs additional switch for ${ROOT} support
Summary: systemd-197: udevadm hwdb --update needs additional switch for ${ROOT} support
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-07 06:30 UTC by Samuli Suominen
Modified: 2013-02-08 11:12 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch to add --root switch for offset $ROOT support (6.14 KB, patch)
2013-02-07 18:39 UTC, Samuli Suominen
Details | Splinter Review

Description Samuli Suominen 2013-02-07 06:30:31 UTC
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
Comment 1 Samuli Suominen 2013-02-07 18:39:58 UTC
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.
Comment 2 Kay Sievers 2013-02-08 11:12:36 UTC
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.