[systemd-devel] [PATCH] udev hwdb: Store binary database in libdir, not in /etc

Lennart Poettering lennart at poettering.net
Sun Jun 16 17:52:42 PDT 2013


On Sun, 16.06.13 22:32, Martin Pitt (martin.pitt at ubuntu.com) wrote:

> 
> Hello Lennart,
> 
> Lennart Poettering [2013-06-16  8:36 +0200]:
> > As Tom pointed out, /usr is package manager territory and exactly the
> > same on all machines (with the same set of package installed at
> > least).
> 
> I wrote "libdir", but what the patch actually uses "udevlibdir, i. e.
> /lib/udev/.

Well, distributions such as Fedora and ArchLinux actually did the /usr
merge, hence my comment.

> > It's supposed to be sharable between hosts. Doing recursive
> > checksumming of /usr (modulo /usr/local) should yield the same
> > results on all installations with the same package set.
> 
> We actually generate the hwdb during package build and ship hwdb.bin
> statically. Right now there is no reason to ship the source files and
> build the DB in package postinst. I guess you generate it in the
> postinst, but that means that it's not a package manager controlled
> file either way, regardless of where it's stored.

The file is supposed to be be built on the installed system so that
other packages or the admin can drop in additional hwdb files. And yes,
it is not a package manager controlled file, which is precisely why I am
saying it belongs to /etc, not /usr.

Ubuntu is doing it wrong if they ship the file pre-built. 

> > Of course /etc isn't particularly beautiful for this either, since it
> > doesn't match *conceptually* what else is stored on that partition, but
> > at least it has the right *availability*, *shareability* and *access*
> > guarantees.
> 
> /lib has exactly the same availability/shareability/access properties
> AFAICS. Especially as the hwdb.bin file will be in exactly the same
> directory as the other udev helpers.

No, by placing it in /usr (or /lib, for old distributions which haven't
done the /usr merge yet) you break the rule that the files the systemd
package installs in /usr should be the same on all installations of the
same package version.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list