Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/udev.xml

    r4bc51b9 r7152faa  
    1 <?xml version="1.0" encoding="ISO-8859-1"?>
     1<?xml version="1.0" encoding="UTF-8"?>
    22<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
    33  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
     
    5555
    5656 <screen><userinput remap="pre">sed '/systemd-sysctl/s/^/#/' -i rules.d/99-systemd.rules.in</userinput></screen>
     57
     58    <para>Adjust the hardcoded paths to network configuration files for the
     59    standalone udev installation:</para>
     60
     61 <screen><userinput remap="pre">sed '/NETWORK_DIRS/s/systemd/udev/' -i src/basic/path-lookup.h</userinput></screen>
    5762
    5863    <para>Prepare Udev for compilation:</para>
     
    121126    </variablelist>
    122127
     128    <para>Get the list of the shipped udev helpers and save it into an
     129    environment variable (exporting it is not strictly necessary, but it makes
     130    building as a regular user or using a package manager easier):</para>
     131
     132    <screen><userinput remap="make">export udev_helpers=$(grep "'name' :" ../src/udev/meson.build | \
     133                      awk '{print $3}' | tr -d ",'" | grep -v 'udevadm')</userinput></screen>
     134
    123135    <para>Only build the components needed for udev:</para>
    124136
    125137    <screen><userinput remap="make">ninja udevadm systemd-hwdb                                           \
    126138      $(ninja -n | grep -Eo '(src/(lib)?udev|rules.d|hwdb.d)/[^ ]*') \
    127       $(realpath libudev.so --relative-to .)</userinput></screen>
     139      $(realpath libudev.so --relative-to .)                         \
     140      $udev_helpers</userinput></screen>
    128141
    129142    <para>Install the package:</para>
    130143
    131     <screen><userinput remap="install">install -vm755 -d {/usr/lib,/etc}/udev/{hwdb,rules}.d
     144    <screen><userinput remap="install">install -vm755 -d {/usr/lib,/etc}/udev/{hwdb.d,rules.d,network}
    132145install -vm755 -d /usr/{lib,share}/pkgconfig
    133146install -vm755 udevadm                             /usr/bin/
     
    143156                      -not -name '*power-switch*') /usr/lib/udev/rules.d/
    144157install -vm644 hwdb.d/*  ../hwdb.d/{*.hwdb,README} /usr/lib/udev/hwdb.d/
    145 install -vm755 $(find src/udev \
    146                       -type f -not -name '*.*')    /usr/lib/udev</userinput></screen>
     158install -vm755 $udev_helpers                       /usr/lib/udev
     159install -vm644 ../network/99-default.link          /usr/lib/udev/network</userinput></screen>
    147160
    148161    <para>Install some custom rules and support files useful in an LFS
     
    159172    --no-same-owner --strip-components=1                              \
    160173    -C /usr/share/man --wildcards '*/udev*' '*/libudev*'              \
     174                                  '*/systemd.link.5'                  \
    161175                                  '*/systemd-'{hwdb,udevd.service}.8
     176
     177sed 's|systemd/network|udev/network|'                                 \
     178    /usr/share/man/man5/systemd.link.5                                \
     179  > /usr/share/man/man5/udev.link.5
     180
    162181sed 's/systemd\(\\\?-\)/udev\1/' /usr/share/man/man8/systemd-hwdb.8   \
    163182                               > /usr/share/man/man8/udev-hwdb.8
     183
    164184sed 's|lib.*udevd|sbin/udevd|'                                        \
    165185    /usr/share/man/man8/systemd-udevd.service.8                       \
    166186  > /usr/share/man/man8/udevd.8
    167 rm  /usr/share/man/man8/systemd-*.8</userinput></screen>
     187
     188rm /usr/share/man/man*/systemd*</userinput></screen>
     189
     190    <para>Finally, unset the <envar>udev_helpers</envar> variable:</para>
     191
     192    <!-- remap="make" seems confusing but we don't have sth. like
     193         remap="clean".  -->
     194    <screen><userinput remap="install">unset udev_helpers</userinput></screen>
    168195
    169196  </sect2>
Note: See TracChangeset for help on using the changeset viewer.