Changeset 7546d8b for chapter08


Ignore:
Timestamp:
11/21/2023 12:45:26 AM (8 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/clfs-ng
Children:
e49e2ea
Parents:
2df066c9 (diff), 01247ac (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge remote-tracking branch 'origin/trunk' into xry111/clfs-ng

Location:
chapter08
Files:
1 added
11 edited

Legend:

Unmodified
Added
Removed
  • chapter08/automake.xml

    r2df066c9 r7546d8b  
    5454<screen><userinput remap="make">make</userinput></screen>
    5555
    56     <para> Using the -j4 make option speeds up the tests, even on systems with
    57     only one processor, due to internal delays in individual tests.  To test
     56    <para>Using four parallel jobs speeds up the tests, even on systems with
     57    less logical cores, due to internal delays in individual tests.  To test
    5858    the results, issue:</para>
    5959
    60 <screen><userinput remap="test">make -j4 check</userinput></screen>
     60<screen><userinput remap="test">make <replaceable>-j$(($(nproc)&gt;4?$(nproc):4))</replaceable> check</userinput></screen>
     61
     62    <para>Replace <replaceable>$((...))</replaceable> with the number of
     63    logical cores you want to use if you don't want to use all.</para>
    6164
    6265    <para>The test t/subobj.sh is known to fail.</para>
  • chapter08/chapter08.xml

    r2df066c9 r7546d8b  
    6666  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flit-core.xml"/>
    6767  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wheel.xml"/>
     68  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="setuptools.xml"/>
    6869  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/>
    6970  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/>
  • chapter08/gawk.xml

    r2df066c9 r7546d8b  
    6060    <para>Install the package:</para>
    6161
    62 <screen><userinput remap="install">make LN='ln -f' install</userinput></screen>
     62<screen><userinput remap="install">rm -f /usr/bin/gawk-&gawk-version;
     63make install</userinput></screen>
    6364
    6465    <variablelist>
    65       <title>The meaning of the overridden make variable:</title>
     66      <title>The meaning of the command:</title>
    6667
    6768      <varlistentry>
    68         <term><envar>LN='ln -f'</envar></term>
     69        <term><command>rm -f /usr/bin/gawk-&gawk-version;</command></term>
    6970        <listitem>
    70            <para>This variable ensures that the previous hard link installed
     71           <para>The building system will not recreate the hard link
     72           <filename>gawk-&gawk-version;</filename> if it already exists.
     73           Remove it to ensure that the previous hard link installed
    7174           in <xref linkend='ch-tools-gawk'/> is updated here.</para>
    7275       </listitem>
  • chapter08/glibc.xml

    r2df066c9 r7546d8b  
    7575             --enable-stack-protector=strong          \
    7676             --with-headers=/usr/include              \
     77             --disable-nscd                           \
    7778             libc_cv_slibdir=/usr/lib</userinput></screen>
    7879
     
    113114          <para>This option tells the build system where to find the
    114115          kernel API headers.</para>
     116        </listitem>
     117      </varlistentry>
     118
     119      <varlistentry>
     120        <term><parameter>--disable-nscd</parameter></term>
     121        <listitem>
     122          <para>Do not build the name service cache daemon which is no
     123          longer used.</para>
    115124        </listitem>
    116125      </varlistentry>
     
    208217
    209218<screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd</userinput></screen>
    210 
     219<!--
    211220    <para>Install the configuration file and runtime directory for
    212221    <command>nscd</command>:</para>
     
    220229    <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
    221230install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service</userinput></screen>
    222 
     231-->
    223232    <para>Next, install the locales that can make the system respond in a
    224233    different language.  None of these locales are required, but if some of them
     
    500509        ldd, lddlibc4,
    501510        ld.so (symlink to ld-linux-x86-64.so.2 or ld-linux.so.2),
    502         locale, localedef, makedb, mtrace, nscd,
     511        locale, localedef, makedb, mtrace,
    503512        pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
    504513        zdump, and zic</seg>
     
    520529        /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale,
    521530        /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo,
    522         /var/cache/nscd, and /var/lib/nss_db</seg>
     531        and /var/lib/nss_db</seg>
    523532      </seglistitem>
    524533    </segmentedlist>
     
    650659          <indexterm zone="ch-system-glibc mtrace">
    651660            <primary sortas="b-mtrace">mtrace</primary>
    652           </indexterm>
    653         </listitem>
    654       </varlistentry>
    655 
    656       <varlistentry id="nscd">
    657         <term><command>nscd</command></term>
    658         <listitem>
    659           <para>A daemon that provides a cache for the most common name
    660           service requests</para>
    661           <indexterm zone="ch-system-glibc nscd">
    662             <primary sortas="b-nscd">nscd</primary>
    663661          </indexterm>
    664662        </listitem>
  • chapter08/man-db.xml

    r2df066c9 r7546d8b  
    114114    <para>To test the results, issue:</para>
    115115
    116 <screen><userinput remap="test">make -k check</userinput></screen>
    117 
    118     <!-- https://gitlab.com/man-db/man-db/-/issues/25 -->
    119     <para>One test named <filename>man1/lexgrog.1</filename> is known
    120     to fail.</para>
     116<screen><userinput remap="test">make check</userinput></screen>
    121117
    122118    <para>Install the package:</para>
  • chapter08/openssl.xml

    r2df066c9 r7546d8b  
    6464    <para>To test the results, issue:</para>
    6565
    66 <screen><userinput remap="test">make test</userinput></screen>
     66<screen><userinput remap="test">HARNESS_JOBS=<replaceable>$(nproc)</replaceable> make test</userinput></screen>
    6767
    6868    <para>One test, 30-test_afalg.t, is known to fail if the host kernel
  • chapter08/perl.xml

    r2df066c9 r7546d8b  
    112112    <para>To test the results (approximately 11 SBU), issue:</para>
    113113
    114 <screen><userinput remap="test">make test</userinput></screen>
     114<screen><userinput remap="test">TEST_JOBS=$(nproc) make test_harness</userinput></screen>
    115115
    116116    <para>Install the package and clean up:</para>
  • chapter08/pkgmgt.xml

    r2df066c9 r7546d8b  
    6868        all the packages in their dependency order, we do not recommend
    6969        it.  </para>
     70      </listitem>
     71
     72      <listitem>
     73        <para>Reinstalling the same version of Glibc (&glibc-version; for
     74        this release of LFS) with patches should be safe when these patches
     75        do not change ABI and API.  When a security vulnerability is found
     76        in Glibc, we often need to apply such a patch to fix the
     77        vulnerability and reinstall Glibc.  Consult
     78        <ulink url='&lfs-root;lfs/advisories/'>LFS security
     79        advisories</ulink> if you are alerted for a published Glibc security
     80        vulnerability but unsure about the action to take.</para>
    7081      </listitem>
    7182
     
    153164        implemented this, and most packages use that command to install binary files and
    154165        libraries.  This means that you won't be troubled by this issue most of the time.
    155         However, the install process of some packages (notably Mozilla JS
     166        However, the install process of some packages (notably SpiderMonkey
    156167        in BLFS) just overwrites the file if it exists; this causes a crash. So
    157168        it's safer to save your work and close unneeded running processes
     
    186197      special program to manage the packages. Each package is installed in a
    187198      separate directory. For example, package foo-1.1 is installed in
    188       <filename class='directory'>/usr/pkg/foo-1.1</filename>
    189       and a symlink is made from <filename>/usr/pkg/foo</filename> to
    190       <filename class='directory'>/usr/pkg/foo-1.1</filename>. When
     199      <filename class='directory'>/opt/foo-1.1</filename>
     200      and a symlink is made from <filename>/opt/foo</filename> to
     201      <filename class='directory'>/opt/foo-1.1</filename>. When
    191202      a new version foo-1.2 comes along, it is installed in
    192       <filename class='directory'>/usr/pkg/foo-1.2</filename> and the previous
     203      <filename class='directory'>/opt/foo-1.2</filename> and the previous
    193204      symlink is replaced by a symlink to the new version.</para>
    194205
    195206      <para>Environment variables such as <envar>PATH</envar>,
    196       <envar>LD_LIBRARY_PATH</envar>, <envar>MANPATH</envar>,
    197       <envar>INFOPATH</envar> and <envar>CPPFLAGS</envar> need to be expanded to
    198       include <filename>/usr/pkg/foo</filename>. If you install more than a few packages,
    199       this scheme becomes unmanageable.</para>
    200 
     207      <envar>MANPATH</envar>, <envar>INFOPATH</envar>,
     208      <envar>PKG_CONFIG_PATH</envar>, <envar>CPPFLAGS</envar>,
     209      <envar>LDFLAGS</envar>, and the configuration file
     210      <filename>/etc/ld.so.conf</filename> may need to be expanded to
     211      include the corresponding subdirectories in
     212      <filename class='directory'>/opt/foo-x.y</filename>.</para>
     213
     214      <para>
     215        This scheme is used by the BLFS book to install some very large
     216        packages to make it easier to upgrade them.  If you install more
     217        than a few packages, this scheme becomes unmanageable.  And some
     218        packages (for example Linux API headers and Glibc) may not work well
     219        with this scheme.
     220        <emphasis role='bold'>Never use this scheme system-wide.</emphasis>
     221      </para>
    201222    </sect3>
    202223
  • chapter08/python.xml

    r2df066c9 r7546d8b  
    4949            --enable-shared      \
    5050            --with-system-expat  \
    51             --with-system-ffi    \
    5251            --enable-optimizations</userinput></screen>
    5352
     
    6261       </listitem>
    6362     </varlistentry>
    64 
    65     <varlistentry>
    66       <term><parameter>--with-system-ffi</parameter></term>
    67       <listitem>
    68         <para>This switch enables linking against the system version of
    69         <filename class='libraryfile'>libffi.so</filename>.</para>
    70       </listitem>
    71     </varlistentry>
    7263
    7364    <varlistentry>
  • chapter08/shadow.xml

    r2df066c9 r7546d8b  
    277277        <seg>chage, chfn, chgpasswd, chpasswd, chsh, expiry, faillog,
    278278        getsubids, gpasswd, groupadd, groupdel, groupmems, groupmod, grpck,
    279         grpconv, grpunconv, lastlog, login, logoutd, newgidmap, newgrp,
     279        grpconv, grpunconv, login, logoutd, newgidmap, newgrp,
    280280        newuidmap, newusers, nologin, passwd, pwck, pwconv, pwunconv,
    281281        sg (link to newgrp), su, useradd, userdel, usermod,
     
    460460      </varlistentry>
    461461
    462       <varlistentry id="lastlog">
    463         <term><command>lastlog</command></term>
    464         <listitem>
    465           <para>Reports the most recent login of all users or of a
    466           given user</para>
    467           <indexterm zone="ch-system-shadow lastlog">
    468             <primary sortas="b-lastlog">lastlog</primary>
    469           </indexterm>
    470         </listitem>
    471       </varlistentry>
    472 
    473462      <varlistentry id="login">
    474463        <term><command>login</command></term>
  • chapter08/udev.xml

    r2df066c9 r7546d8b  
    6767      -Ddev-kvm-mode=0660           \
    6868      -Dlink-udev-shared=false      \
     69      -Dlogind=false                \
     70      -Dvconsole=false              \
    6971      ..</userinput></screen>
    7072
     
    108110        </listitem>
    109111      </varlistentry>
     112
     113      <varlistentry>
     114        <term><parameter>-Dlogind=false -Dvconsole=false</parameter></term>
     115        <listitem>
     116          <para>These options prevent the generation of several udev rule
     117          files belonging to the other Systemd components that we won't
     118          install.</para>
     119        </listitem>
     120      </varlistentry>
    110121    </variablelist>
    111122
    112123    <para>Only build the components needed for udev:</para>
    113124
    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 }')                              \
     125    <screen><userinput remap="make">ninja udevadm systemd-hwdb                                           \
     126      $(ninja -n | grep -Eo '(src/(lib)?udev|rules.d|hwdb.d)/[^ ]*') \
    117127      $(realpath libudev.so --relative-to .)</userinput></screen>
    118 
    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>
    123128
    124129    <para>Install the package:</para>
     
    126131    <screen><userinput remap="install">install -vm755 -d {/usr/lib,/etc}/udev/{hwdb,rules}.d
    127132install -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>
     133install -vm755 udevadm                             /usr/bin/
     134install -vm755 systemd-hwdb                        /usr/bin/udev-hwdb
     135ln      -svfn  ../bin/udevadm                      /usr/sbin/udevd
     136cp      -av    libudev.so{,*[0-9]}                 /usr/lib/
     137install -vm644 ../src/libudev/libudev.h            /usr/include/
     138install -vm644 src/libudev/*.pc                    /usr/lib/pkgconfig/
     139install -vm644 src/udev/*.pc                       /usr/share/pkgconfig/
     140install -vm644 ../src/udev/udev.conf               /etc/udev/
     141install -vm644 rules.d/* ../rules.d/README         /usr/lib/udev/rules.d/
     142install -vm644 $(find ../rules.d/*.rules \
     143                      -not -name '*power-switch*') /usr/lib/udev/rules.d/
     144install -vm644 hwdb.d/*  ../hwdb.d/{*.hwdb,README} /usr/lib/udev/hwdb.d/
     145install -vm755 $(find src/udev \
     146                      -type f -not -name '*.*')    /usr/lib/udev</userinput></screen>
    139147
    140148    <para>Install some custom rules and support files useful in an LFS
Note: See TracChangeset for help on using the changeset viewer.