mirror of
https://github.com/systemd/systemd.git
synced 2024-11-05 23:51:28 +03:00
681eb9cf2b
In particular, use /lib/systemd instead of /usr/lib/systemd in distributions like Debian which still have not adopted a /usr merge setup. Use XML entities from man/custom-entities.ent to replace configured paths while doing XSLT processing of the original XML files. There was precedent of some files (such as systemd.generator.xml) which were already using this approach. This addresses most of the (manual) fixes from this patch: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/patches/Fix-paths-in-man-pages.patch?h=experimental-220 The idea of using generic XML entities was presented here: http://lists.freedesktop.org/archives/systemd-devel/2015-May/032240.html This patch solves almost all the issues, with the exception of: - Path to /bin/mount and /bin/umount. - Generic statements about preference of /lib over /etc. These will be handled separately by follow up patches. Tested: - With default configure settings, ran "make install" to two separate directories and compared the output to confirm they matched exactly. - Used a set of configure flags including $CONFFLAGS from Debian: http://anonscm.debian.org/cgit/pkg-systemd/systemd.git/tree/debian/rules Installed the tree and confirmed the paths use /lib/systemd instead of /usr/lib/systemd and that no other unexpected differences exist. - Confirmed that `make distcheck` still passes.
90 lines
3.8 KiB
XML
90 lines
3.8 KiB
XML
<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
|
|
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
|
|
<!ENTITY % entities SYSTEM "custom-entities.ent" >
|
|
%entities;
|
|
]>
|
|
|
|
<refentry id="hwdb" conditional="ENABLE_HWDB">
|
|
<refentryinfo>
|
|
<title>hwdb</title>
|
|
<productname>systemd</productname>
|
|
<authorgroup>
|
|
<author>
|
|
<contrib>Developer</contrib>
|
|
<firstname>Kay</firstname>
|
|
<surname>Sievers</surname>
|
|
<email>kay@vrfy.org</email>
|
|
</author>
|
|
<author>
|
|
<contrib>Developer</contrib>
|
|
<firstname>Tom</firstname>
|
|
<surname>Gundersen</surname>
|
|
<email>teg@jklm.no</email>
|
|
</author>
|
|
</authorgroup>
|
|
</refentryinfo>
|
|
|
|
<refmeta>
|
|
<refentrytitle>hwdb</refentrytitle>
|
|
<manvolnum>7</manvolnum>
|
|
</refmeta>
|
|
|
|
<refnamediv>
|
|
<refname>hwdb</refname>
|
|
<refpurpose>Hardware Database</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1><title>Description</title>
|
|
<para>The hardware database is a key-value store for associating modalias-like keys to
|
|
udev-properties-like values. It is used primarily by udev to add the relevant properties
|
|
to matching devices, but it can also be queried directly.</para>
|
|
</refsect1>
|
|
|
|
<refsect1><title>Hardware Database Files</title>
|
|
<para>The hwdb files are read from the files located in the
|
|
system hwdb directory <filename>&udevlibexecdir;/hwdb.d</filename>,
|
|
the volatile runtime directory <filename>/run/udev/hwdb.d</filename>
|
|
and the local administration directory <filename>/etc/udev/hwdb.d</filename>.
|
|
All hwdb files are collectively sorted and processed in lexical order,
|
|
regardless of the directories in which they live. However, files with
|
|
identical filenames replace each other. Files in <filename>/etc</filename>
|
|
have the highest priority, files in <filename>/run</filename> take precedence
|
|
over files with the same name in <filename>/usr/lib</filename>. This can be
|
|
used to override a system-supplied hwdb file with a local file if needed;
|
|
a symlink in <filename>/etc</filename> with the same name as a hwdb file in
|
|
<filename>/usr/lib</filename>, pointing to <filename>/dev/null</filename>,
|
|
disables the hwdb file entirely. hwdb files must have the extension
|
|
<filename>.hwdb</filename>; other extensions are ignored.</para>
|
|
|
|
<para>The hwdb file contains data records consisting of matches and
|
|
associated key-value pairs. Every record in the hwdb starts with one or
|
|
more match string, specifying a shell glob to compare the database
|
|
lookup string against. Multiple match lines are specified in additional
|
|
consecutive lines. Every match line is compared individually, they are
|
|
combined by OR. Every match line must start at the first character of
|
|
the line.</para>
|
|
|
|
<para>The match lines are followed by one or more key-value pair lines, which
|
|
are recognized by a leading space character. The key name and value are separated
|
|
by <literal>=</literal>. An empty line signifies the end
|
|
of a record. Lines beginning with <literal>#</literal> are ignored.</para>
|
|
|
|
<para>The content of all hwdb files is read by
|
|
<citerefentry><refentrytitle>systemd-hwdb</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
|
and compiled to a binary database located at <filename>/etc/udev/hwdb.bin</filename>,
|
|
or alternatively <filename>&udevlibexecdir;/hwdb.bin</filename> if you want ship the compiled
|
|
database in an immutable image.
|
|
During runtime only the binary database is used.</para>
|
|
</refsect1>
|
|
|
|
<refsect1>
|
|
<title>See Also</title>
|
|
<para>
|
|
<citerefentry>
|
|
<refentrytitle>systemd-hwdb</refentrytitle><manvolnum>8</manvolnum>
|
|
</citerefentry>
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|