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

Lennart Poettering lennart at poettering.net
Sat Jun 15 23:36:06 PDT 2013


On Fri, 14.06.13 12:26, Martin Pitt (martin.pitt at ubuntu.com) wrote:

> Hello all,
> 
> right now, udev stores its binary hwdb cache in /etc/udev/, which is
> ugly IMHO. This is neither user-editable nor configuration of any
> kind. It's just a cache file, and does not need to appear in backup,
> VCSes of /etc and the like.
> 
> Can we move it to the libdir instead? Attached patch does that.

No.

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). 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.

hwdb.bin is data that is generated dynamically on the host, and is
possibly different on the various installation. It hence has no place in
/usr.

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.

/var doesn't work for this, as /var might be mounted too
late. Introducing a new directory /cache or so would certainly work, but
given that this problem exists only for the very minimal set of
early-boot services this sounds like too big a change.

And yeah, there are some other things in /usr that are currently
generated on the host, and that should better be moved to /etc.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list