Changeset f6548ac for chapter08


Ignore:
Timestamp:
05/08/2024 05:36:31 PM (4 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/arm64
Children:
161a267
Parents:
e4e7ffb (diff), c5a1240 (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/arm64

Location:
chapter08
Files:
1 added
14 edited

Legend:

Unmodified
Added
Removed
  • chapter08/chapter08.xml

    re4e7ffb rf6548ac  
    2020  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>
    2121  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>
     22  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="lz4.xml"/>
    2223  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/>
    2324  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/>
  • chapter08/coreutils.xml

    re4e7ffb rf6548ac  
    5454    </note>
    5555
    56     <!-- https://seclists.org/oss-sec/2024/q1/30 -->
    57     <para>Fix a security vulnerability in the <command>split</command>
    58     utility:</para>
    59 
    60 <screen><userinput remap="pre">sed -e '/n_out += n_hold/,+4 s|.*bufsize.*|//&amp;|' \
    61     -i src/split.c</userinput></screen>
    62 
    6356    <para>Now prepare Coreutils for compilation:</para>
    6457
     
    124117<screen><userinput remap="test">chown -R tester . </userinput></screen>
    125118
    126     <para>Now run the tests:</para>
    127 
    128 <screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
    129 
    130 <!-- Sometimes skipped, but if not it may fail.
    131      Please DO NOT remove or comment out this unless we can fully
    132      understand it!
    133     <para>The test-getlogin test may fail in the LFS chroot environment.</para>
    134     20240226: Commented out as it seems the upstream has root-caused and
    135     fixed the issue.  I've checked the fix is in Coreutils 9.4 release
    136     tarball:
    137 
    138     https://lists.gnu.org/archive/html/bug-gnulib/2022-06/msg00079.html
    139 -->
     119    <!-- To editors: in jhalfs the standard input is always piped to "make"
     120         so the test failures are not reproducible in jhalfs even if
     121         running the build in a PTY.  Don't use jhalfs to test if we can
     122         remove < /dev/null.  -->
     123    <para>Now run the tests (using <filename>/dev/null</filename> for the
     124    standard input, or two tests may be broken if building LFS in a
     125    graphical terminal or a session in SSH or GNU Screen etc. because the
     126    standard input is connected to a PTY from host distro, and the device
     127    node for such a PTY cannot be accessed from the LFS chroot
     128    environment):</para>
     129
     130<screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" &lt; /dev/null</userinput></screen>
    140131
    141132    <para>Remove the temporary group:</para>
    142133
    143134<screen><userinput remap="test">groupdel dummy</userinput></screen>
     135
     136    <para>
     137       Two tests, <filename>tests/cp/preserve-mode.sh</filename> and
     138       <filename>tests/mv/acl.sh</filename>, are known to
     139       fail in the chroot environment, but pass in a complete system.
     140    </para>
    144141
    145142    <para>Install the package:</para>
  • chapter08/glibc.xml

    re4e7ffb rf6548ac  
    5050
    5151<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
    52 <!--
    53     <para>Now fix two security vulnerabilities and a regression causing the
    54     posix_memalign() function very slow in some conditions:</para>
    55 
    56 <screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-fixes-patch;</userinput></screen>
    57 -->
     52
     53    <para>Now fix a security vulnerability:</para>
     54
     55<screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-patch;</userinput></screen>
     56
    5857    <para>The Glibc documentation recommends building Glibc
    5958    in a dedicated build directory:</para>
     
    172171        parallel make jobs).  These tests can be identified with:</para>
    173172
    174         <!-- TODO: Using nodump for freeze.  Change it to role="test" after
    175              12.1 release so jhalfs can list these in the log.  -->
    176         <screen role="nodump"><userinput>grep "Timed out" -l $(find -name \*.out)</userinput></screen>
     173        <screen><userinput remap="test">grep "Timed out" $(find -name \*.out)</userinput></screen>
    177174
    178175        <para>It's possible to re-run a single test with enlarged timeout
  • chapter08/kmod.xml

    re4e7ffb rf6548ac  
    8585    which are beyond the scope of LFS.</para>
    8686
    87     <para>Install the package and create symlinks for
     87    <para>Install the package and recreate some symlinks for
    8888    compatibility with Module-Init-Tools (the package that previously handled
    89     Linux kernel modules):</para>
     89    Linux kernel modules).  The building system will create all these
     90    symlinks in <filename class='directory'>/usr/bin</filename>, but we
     91    only want <command>lsmod</command> there and all other symlinks in
     92    <filename class='directory'>/usr/sbin</filename> instead:</para>
    9093
    9194<screen><userinput remap="install">make install
     
    9396for target in depmod insmod modinfo modprobe rmmod; do
    9497  ln -sfv ../bin/kmod /usr/sbin/$target
    95 done
    96 
    97 ln -sfv kmod /usr/bin/lsmod</userinput></screen>
     98  rm -fv /usr/bin/$target
     99done</userinput></screen>
    98100
    99101  </sect2>
  • chapter08/ncurses.xml

    re4e7ffb rf6548ac  
    5151            --with-cxx-shared       \
    5252            --enable-pc-files       \
    53             --enable-widec          \
    5453            --with-pkg-config-libdir=/usr/lib/pkgconfig</userinput></screen>
    5554
     55      <!--  - -enable-widec this is now the default -->
    5656    <variablelist>
    5757      <title>The meaning of the new configure options:</title>
     
    9595        </listitem>
    9696      </varlistentry>
    97 
    98       <varlistentry>
    99         <term><parameter>--enable-widec</parameter></term>
     97<!--
     98      <varlistentry>
     99        <term><parameter>- -enable-widec</parameter></term>
    100100        <listitem>
    101101          <para>This switch causes wide-character libraries (e.g., <filename
     
    109109        </listitem>
    110110      </varlistentry>
    111 
     111-->
    112112    </variablelist>
    113113
     
    128128
    129129    <para>The installation of this package will overwrite
    130     <filename class="libraryfile">libncursesw.so.&ncurses-release;</filename>
     130    <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>
    131131    in-place.  It may crash the shell process which is using code and data
    132132    from the library file.  Install the package with
     
    138138
    139139<screen><userinput remap="install">make DESTDIR=$PWD/dest install
    140 install -vm755 dest/usr/lib/libncursesw.so.&ncurses-release; /usr/lib
    141 rm -v  dest/usr/lib/libncursesw.so.&ncurses-release;
     140install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
     141rm -v  dest/usr/lib/libncursesw.so.&ncurses-version;
    142142sed -e 's/^#if.*XOPEN.*$/#if 1/' \
    143143    -i dest/usr/include/curses.h
  • chapter08/ninja.xml

    re4e7ffb rf6548ac  
    8383    </variablelist>
    8484
     85    <para>The package tests cannot run in the chroot environment. They require
     86    <ulink url="&blfs-book;general/cmake.html">cmake</ulink>.</para>
     87<!--
    8588    <para>To test the results, issue:</para>
    8689
    8790<screen><userinput remap="test">./ninja ninja_test
    88 ./ninja_test --gtest_filter=-SubprocessTest.SetWithLots</userinput></screen>
     91./ninja_test - -gtest_filter=-SubprocessTest.SetWithLots</userinput></screen>
     92-->
    8993
    9094    <para>Install the package:</para>
  • chapter08/procps.xml

    re4e7ffb rf6548ac  
    7171<screen revision='systemd'><userinput remap="make">make src_w_LDADD='$(LDADD) -lsystemd'</userinput></screen>
    7272
    73     <para> To run the test suite, run:</para>
    74 
    75 <screen><userinput remap="test">make -k check</userinput></screen>
     73    <!-- To editors: "pmap {X,XX} with unreachable process" tests don't work
     74         as root.  They may seem to pass due to some Tcl/Expect/DejaGNU
     75         internal hazards with some "luck" though.  -->
     76    <para>To run the test suite, run:</para>
     77
     78<screen><userinput remap="test">chown -R tester .
     79su tester -c "PATH=$PATH make check"</userinput></screen>
    7680
    7781    <para>One test named
    7882    <literal>ps with output flag bsdtime,cputime,etime,etimes</literal>
    7983    is known to fail if the host kernel is not built with
    80     <literal>CONFIG_BSD_PROCESS_ACCT</literal> enabled.
    81     <!-- These two tests just do not work as root but they seem to pass
    82          in most time due to some internal hazards of Tcl/Expect/DejaGNU
    83          framework.  However the failures have been really observed.
    84          TODO: run the test suite as tester after the freeze ends.  -->
    85     Two tests named
    86     <literal>pmap X with unreachable process</literal> and
    87     <literal>pmap XX with unreachable process</literal> are known to
    88     fail occasionally.</para>
     84    <literal>CONFIG_BSD_PROCESS_ACCT</literal> enabled.</para>
    8985
    9086    <para>Install the package:</para>
  • chapter08/python.xml

    re4e7ffb rf6548ac  
    7979<screen><userinput remap="make">make</userinput></screen>
    8080
    81     <para>Running the tests at this point is not recommended.  The
    82     tests are known to hang indefinitely in the partial LFS environment.
    83     If desired, the tests can be rerun at the end of this chapter, or
    84     when Python 3 is reinstalled in BLFS.  To run the tests anyway,
    85     issue <command>make test</command>.</para>
     81    <para>Some tests are known to occasionally hang indefinitely.  So to test the
     82    results, run the test suite but set a 2-minute time limit for each
     83    test case:</para>
     84
     85<screen><userinput remap="test">make test TESTOPTS="--timeout 120"</userinput></screen>
     86
     87    <para>For a relatively slow system you may need to increase the time
     88    limit and 1 SBU (measured when building Binutils pass 1 with one CPU
     89    core) should be enough.  Some tests are flaky, so the test suite will
     90    automatically re-run failed tests.  If a test failed but then passed
     91    when re-run, it should be considered as passed.</para>
    8692
    8793    <para>Install the package:</para>
  • chapter08/shadow.xml

    re4e7ffb rf6548ac  
    4141  <sect2 role="installation">
    4242    <title>Installation of Shadow</title>
     43
     44    <important>
     45      <para>
     46        If you've installed Linux-PAM, you should follow
     47        <ulink url='&blfs-book;postlfs/shadow.xml'>the BLFS shadow
     48        page</ulink> instead of this page to build (or, rebuild or upgrade)
     49        shadow.
     50      </para>
     51    </important>
    4352
    4453    <note>
  • chapter08/sysklogd.xml

    re4e7ffb rf6548ac  
    5656    <para>Install the package:</para>
    5757
    58 <screen><userinput remap="install">make BINDIR=/sbin install</userinput></screen>
     58<screen><userinput remap="install">make install</userinput></screen>
    5959
    6060  </sect2>
  • chapter08/systemd.xml

    re4e7ffb rf6548ac  
    226226
    227227<screen><userinput remap="make">ninja</userinput></screen>
     228
     229    <para>Some tests need a basic <filename>/etc/os-release</filename> file.
     230    To test the results, issue:</para>
     231
     232<screen><userinput remap="test">echo 'NAME="Linux From Scratch"' &gt; /etc/os-release
     233ninja test</userinput></screen>
     234
     235    <!-- This test needs /run/systemd/inaccessible/sock, which only exists
     236         after initializing the system with systemd.  -->
     237    <para>One test named <literal>systemd:core / test-namespace</literal>
     238    is known to fail in the LFS chroot environment.  Some other tests may
     239    fail because they depend on various kernel configuration options.</para>
    228240
    229241    <para>Install the package:</para>
  • chapter08/tcl.xml

    re4e7ffb rf6548ac  
    44  <!ENTITY % general-entities SYSTEM "../general.ent">
    55  %general-entities;
    6   <!ENTITY tdbc-ver          "1.1.5">
    7   <!ENTITY itcl-ver          "4.2.3">
     6  <!ENTITY tdbc-ver          "1.1.7">
     7  <!ENTITY itcl-ver          "4.2.4">
    88]>
    99
  • chapter08/util-linux.xml

    re4e7ffb rf6548ac  
    4343    <title>Installation of Util-linux</title>
    4444
     45<!--
    4546    <para>First, disable a problematic test:</para>
    4647
    4748    <screen><userinput remap="pre">sed -i '/test_mkfds/s/^/#/' tests/helpers/Makemodule.am</userinput></screen>
    48 
     49-->
    4950    <para>Prepare Util-linux for compilation:</para>
    5051
    51 <screen revision="sysv"><userinput remap="configure">./configure --bindir=/usr/bin    \
    52             --libdir=/usr/lib    \
    53             --runstatedir=/run   \
    54             --sbindir=/usr/sbin  \
    55             --disable-chfn-chsh  \
    56             --disable-login      \
    57             --disable-nologin    \
    58             --disable-su         \
    59             --disable-setpriv    \
    60             --disable-runuser    \
    61             --disable-pylibmount \
    62             --disable-static     \
    63             --without-python     \
    64             --without-systemd    \
     52    <screen revision="sysv"><userinput remap="configure">./configure --bindir=/usr/bin     \
     53            --libdir=/usr/lib     \
     54            --runstatedir=/run    \
     55            --sbindir=/usr/sbin   \
     56            --disable-chfn-chsh   \
     57            --disable-login       \
     58            --disable-nologin     \
     59            --disable-su          \
     60            --disable-setpriv     \
     61            --disable-runuser     \
     62            --disable-pylibmount  \
     63            --disable-liblastlog2 \
     64            --disable-static      \
     65            --without-python      \
     66            --without-systemd     \
    6567            --without-systemdsystemunitdir        \
    6668            ADJTIME_PATH=/var/lib/hwclock/adjtime \
    6769            --docdir=/usr/share/doc/util-linux-&util-linux-version;</userinput></screen>
    6870
    69 <screen revision="systemd"><userinput remap="configure">./configure --bindir=/usr/bin    \
    70             --libdir=/usr/lib    \
    71             --runstatedir=/run   \
    72             --sbindir=/usr/sbin  \
    73             --disable-chfn-chsh  \
    74             --disable-login      \
    75             --disable-nologin    \
    76             --disable-su         \
    77             --disable-setpriv    \
    78             --disable-runuser    \
    79             --disable-pylibmount \
    80             --disable-static     \
    81             --without-python     \
     71      <screen revision="systemd"><userinput remap="configure">./configure --bindir=/usr/bin     \
     72            --libdir=/usr/lib     \
     73            --runstatedir=/run    \
     74            --sbindir=/usr/sbin   \
     75            --disable-chfn-chsh   \
     76            --disable-login       \
     77            --disable-nologin     \
     78            --disable-su          \
     79            --disable-setpriv     \
     80            --disable-runuser     \
     81            --disable-pylibmount  \
     82            --disable-liblastlog2 \
     83            --disable-static      \
     84            --without-python      \
    8285            ADJTIME_PATH=/var/lib/hwclock/adjtime \
    8386            --docdir=/usr/share/doc/util-linux-&util-linux-version;</userinput></screen>
     
    9194<screen><userinput remap="make">make</userinput></screen>
    9295
    93     <para>If desired, run the test suite as a non-&root; user:</para>
     96    <!-- To editors:
     97         Two tests need a /etc/fstab file.  They are skipped if the host
     98         distro isn't using systemd as the init system, so don't remove
     99         the creation of /etc/fstab unless you've tested it with such a
     100         host distro (for example LFS systemd or Debian).  -->
     101    <para>If desired, create a dummy <filename>/etc/fstab</filename> file
     102    to satisfy two tests and run the test suite as a non-&root;
     103    user:</para>
    94104
    95105    <warning><para>Running the test suite as the
     
    104114    </warning>
    105115
    106 <screen><userinput remap="test">chown -R tester .
     116<screen><userinput remap="test">touch /etc/fstab
     117chown -R tester .
    107118su tester -c "make -k check"</userinput></screen>
    108119
    109     <para>The <emphasis>hardlink</emphasis> tests will fail if the host's kernel
    110     does not have the option <option>CONFIG_CRYPTO_USER_API_HASH</option>
    111     enabled or does not have any options providing a SHA256 implementation
    112     (for example, <option>CONFIG_CRYPTO_SHA256</option>, or
    113     <option>CONFIG_CRYPTO_SHA256_SSSE3</option> if the CPU supports
    114     Supplemental SSE3) enabled. In addition,
    115     two sub-tests from misc: mbsencode and one sub-test from script: replay are
    116     known to fail.</para>
     120    <para>
     121       The <emphasis>hardlink</emphasis> tests will fail if the host's kernel
     122       does not have the option <option>CONFIG_CRYPTO_USER_API_HASH</option>
     123       enabled or does not have any options providing a SHA256 implementation
     124       (for example, <option>CONFIG_CRYPTO_SHA256</option>, or
     125       <option>CONFIG_CRYPTO_SHA256_SSSE3</option> if the CPU supports
     126       Supplemental SSE3) enabled. In addition, the lsfd: inotify test will
     127       fail if the kernel option <option>CONFIG_NETLINK_DIAG</option> is not
     128       enabled.
     129    </para>
    117130
    118131    <para>Install the package:</para>
  • chapter08/vim.xml

    re4e7ffb rf6548ac  
    7777    <para>The test suite outputs a lot of binary data to the screen.  This can
    7878    cause issues with the settings of the current terminal (especially while
    79     we are overriding the <envar>TERM</envar> variable to satisify some
     79    we are overriding the <envar>TERM</envar> variable to satisfy some
    8080    assumptions of the test suite).  The problem can be
    8181    avoided by redirecting the output to a log file as shown above.  A
Note: See TracChangeset for help on using the changeset viewer.