Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • chapter08/udev.xml

    r264a80d r823fbde  
    5656 <screen><userinput remap="pre">sed '/systemd-sysctl/s/^/#/' -i rules.d/99-systemd.rules.in</userinput></screen>
    5757
     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>
     62
    5863    <para>Prepare Udev for compilation:</para>
    5964
     
    6772      -Ddev-kvm-mode=0660           \
    6873      -Dlink-udev-shared=false      \
     74      -Dlogind=false                \
     75      -Dvconsole=false              \
    6976      ..</userinput></screen>
    7077
     
    108115        </listitem>
    109116      </varlistentry>
     117
     118      <varlistentry>
     119        <term><parameter>-Dlogind=false -Dvconsole=false</parameter></term>
     120        <listitem>
     121          <para>These options prevent the generation of several udev rule
     122          files belonging to the other Systemd components that we won't
     123          install.</para>
     124        </listitem>
     125      </varlistentry>
    110126    </variablelist>
    111127
    112128    <para>Only build the components needed for udev:</para>
    113129
    114     <screen><userinput remap="make">ninja udevadm systemd-hwdb \
    115       $(grep -o -E "^build (src/libudev|src/udev|rules.d|hwdb.d)[^:]*" \
    116         build.ninja | awk '{ print $2 }')                              \
     130    <screen><userinput remap="make">ninja udevadm systemd-hwdb                                           \
     131      $(ninja -n | grep -Eo '(src/(lib)?udev|rules.d|hwdb.d)/[^ ]*') \
    117132      $(realpath libudev.so --relative-to .)</userinput></screen>
    118133
    119     <para>Remove one udev rule file requiring a full Systemd
    120     installation:</para>
    121 
    122 <screen><userinput remap="make">rm rules.d/90-vconsole.rules</userinput></screen>
    123 
    124134    <para>Install the package:</para>
    125135
    126     <screen><userinput remap="install">install -vm755 -d {/usr/lib,/etc}/udev/{hwdb,rules}.d
     136    <screen><userinput remap="install">install -vm755 -d {/usr/lib,/etc}/udev/{hwdb.d,rules.d,network}
    127137install -vm755 -d /usr/{lib,share}/pkgconfig
    128 install -vm755 udevadm                     /usr/bin/
    129 install -vm755 systemd-hwdb                /usr/bin/udev-hwdb
    130 ln      -svfn  ../bin/udevadm              /usr/sbin/udevd
    131 cp      -av    libudev.so{,*[0-9]}         /usr/lib/
    132 install -vm644 ../src/libudev/libudev.h    /usr/include/
    133 install -vm644 src/libudev/*.pc            /usr/lib/pkgconfig/
    134 install -vm644 src/udev/*.pc               /usr/share/pkgconfig/
    135 install -vm644 ../src/udev/udev.conf       /etc/udev/
    136 install -vm644 rules.d/* ../rules.d/{*.rules,README} /usr/lib/udev/rules.d/
    137 install -vm644 hwdb.d/*  ../hwdb.d/{*.hwdb,README}   /usr/lib/udev/hwdb.d/
    138 install -vm755 $(find src/udev -type f | grep -F -v ".") /usr/lib/udev</userinput></screen>
     138install -vm755 udevadm                             /usr/bin/
     139install -vm755 systemd-hwdb                        /usr/bin/udev-hwdb
     140ln      -svfn  ../bin/udevadm                      /usr/sbin/udevd
     141cp      -av    libudev.so{,*[0-9]}                 /usr/lib/
     142install -vm644 ../src/libudev/libudev.h            /usr/include/
     143install -vm644 src/libudev/*.pc                    /usr/lib/pkgconfig/
     144install -vm644 src/udev/*.pc                       /usr/share/pkgconfig/
     145install -vm644 ../src/udev/udev.conf               /etc/udev/
     146install -vm644 rules.d/* ../rules.d/README         /usr/lib/udev/rules.d/
     147install -vm644 $(find ../rules.d/*.rules \
     148                      -not -name '*power-switch*') /usr/lib/udev/rules.d/
     149install -vm644 hwdb.d/*  ../hwdb.d/{*.hwdb,README} /usr/lib/udev/hwdb.d/
     150install -vm755 $(find src/udev \
     151                      -type f -not -name '*.*')    /usr/lib/udev
     152install -vm644 ../network/99-default.link          /usr/lib/udev/network</userinput></screen>
    139153
    140154    <para>Install some custom rules and support files useful in an LFS
     
    151165    --no-same-owner --strip-components=1                              \
    152166    -C /usr/share/man --wildcards '*/udev*' '*/libudev*'              \
     167                                  '*/systemd.link.5'                  \
    153168                                  '*/systemd-'{hwdb,udevd.service}.8
     169
     170sed 's|systemd/network|udev/network|'                                 \
     171    /usr/share/man/man5/systemd.link.5                                \
     172  > /usr/share/man/man5/udev.link.5
     173
    154174sed 's/systemd\(\\\?-\)/udev\1/' /usr/share/man/man8/systemd-hwdb.8   \
    155175                               > /usr/share/man/man8/udev-hwdb.8
     176
    156177sed 's|lib.*udevd|sbin/udevd|'                                        \
    157178    /usr/share/man/man8/systemd-udevd.service.8                       \
    158179  > /usr/share/man/man8/udevd.8
    159 rm  /usr/share/man/man8/systemd-*.8</userinput></screen>
     180
     181rm /usr/share/man/man*/systemd*</userinput></screen>
    160182
    161183  </sect2>
Note: See TracChangeset for help on using the changeset viewer.