Changeset 20902dd for chapter08


Ignore:
Timestamp:
02/02/2024 10:06:05 AM (8 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/loongarch, xry111/loongarch-12.1, xry111/loongarch-12.2
Children:
ee8c846
Parents:
027a36d (diff), e14adea (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/loongarch

Location:
chapter08
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • chapter08/bash.xml

    r027a36d r20902dd  
    7676    <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>
    7777
    78 <screen><userinput remap="test">chown -Rv tester .</userinput></screen>
     78<screen><userinput remap="test">chown -R tester .</userinput></screen>
    7979
    8080    <para>The test suite of this package is designed to be run as a non-&root;
  • chapter08/coreutils.xml

    r027a36d r20902dd  
    122122    compile and run the tests:</para>
    123123
    124 <screen><userinput remap="test">chown -Rv tester . </userinput></screen>
     124<screen><userinput remap="test">chown -R tester . </userinput></screen>
    125125
    126126    <para>Now run the tests:</para>
  • chapter08/findutils.xml

    r027a36d r20902dd  
    8383    <para>To test the results, issue:</para>
    8484
    85 <screen><userinput remap="test">chown -Rv tester .
     85<screen><userinput remap="test">chown -R tester .
    8686su tester -c "PATH=$PATH make check"</userinput></screen>
    8787
  • chapter08/gawk.xml

    r027a36d r20902dd  
    5555    <para>To test the results, issue:</para>
    5656
    57 <screen><userinput remap="test">chown -Rv tester .
     57<screen><userinput remap="test">chown -R tester .
    5858su tester -c "PATH=$PATH make check"</userinput></screen>
    5959
  • chapter08/gcc.xml

    r027a36d r20902dd  
    155155    <para>Test the results as a non-privileged user, but do not stop at errors:</para>
    156156
    157 <screen><userinput remap="test">chown -Rv tester .
     157<screen><userinput remap="test">chown -R tester .
    158158su tester -c "PATH=$PATH make -k check"</userinput></screen>
    159159
  • chapter08/glibc.xml

    r027a36d r20902dd  
    5050
    5151<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
    52 
     52<!--
    5353    <para>Now fix two security vulnerabilities and a regression causing the
    5454    posix_memalign() function very slow in some conditions:</para>
    5555
    5656<screen><userinput remap="pre">patch -Np1 -i ../&glibc-upstream-fixes-patch;</userinput></screen>
    57 
     57-->
    5858    <para>The Glibc documentation recommends building Glibc
    5959    in a dedicated build directory:</para>
     
    201201
    202202<screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen>
     203
     204    <important>
     205      <para>
     206        If upgrading Glibc to a new minor version (for example, from
     207        Glibc-2.36 to Glibc-&glibc-version;) on a running LFS system, you
     208        need to take some extra precautions to avoid breaking the system:
     209      </para>
     210
     211      <itemizedlist>
     212        <listitem>
     213          <!-- There are two reasons we don't support this:
     214               1. Upgrading on a system with separate /lib and /usr/lib is
     215                  tricky.
     216               2. With Glibc prior to 2.34 libc.so.6 etc. are symlinks to
     217                  libc-2.33.so etc., again causing the upgradation tricky.
     218                  The Glibc NEWS file explicit states they no longer use
     219                  symlinks for the ABI names to avoid upgradation
     220                  issues.  -->
     221          <para>
     222            Upgrading Glibc on a LFS system prior to 11.0 (exclusive) is
     223            not supported.  Rebuild LFS if you are running such an old LFS
     224            system but you need a newer Glibc.
     225          </para>
     226        </listitem>
     227
     228        <!-- https://sourceware.org/pipermail/libc-alpha/2024-January/154095.html -->
     229        <listitem>
     230          <para>
     231            If upgrading on a LFS system prior to 12.0 (exclusive), install
     232            <application>Libxcrypt</application> following
     233            <xref role='.' linkend='ch-system-libxcrypt'/>  In addition to
     234            a normal <application>Libxcrypt</application> installation,
     235            <emphasis role='bold'>you MUST follow the note in Libxcrypt
     236            section to install
     237            <filename class='libraryfile'>libcrypt.so.1*</filename>
     238            (overwritting
     239            <filename class='libraryfile'>libcrypt.so.1</filename> from the
     240            prior Glibc installation)</emphasis>.
     241          </para>
     242        </listitem>
     243
     244        <!-- Otherwise on lfs-systemd nscd will fail to start on boot,
     245             and on both lfs-sysv and lfs-systemd useradd etc. will try
     246             to start nscd, then nscd will fail to start as well and
     247             produce some spurious error message.  -->
     248        <listitem>
     249          <para>
     250            If upgrading on a LFS system prior to 12.1 (exclusive),
     251            remove the <command>nscd</command> program:
     252          </para>
     253
     254          <screen role='nodump'><userinput>rm -f /usr/sbin/nscd</userinput></screen>
     255
     256          <para>
     257            If this system (prior to LFS 12.1, exclusive) is based on
     258            Systemd, it's also needed to disable and stop the
     259            <command>nscd</command> service now:
     260          </para>
     261
     262          <screen revision='systemd' role='nodump'><userinput>systemctl disable --now nscd</userinput></screen>
     263        </listitem>
     264
     265        <listitem>
     266          <para>
     267            Upgrade the kernel and reboot if it's older than &min-kernel;
     268            (check the current version with <command>uname -r</command>)
     269            or if you want to upgrade it anyway, following
     270            <xref linkend='ch-bootable-kernel' role='.'/>
     271          </para>
     272        </listitem>
     273
     274        <listitem>
     275          <para>
     276            Upgrade the kernel API headers if it's older than &min-kernel;
     277            (check the current version with
     278            <command>cat /usr/include/linux/version.h</command>)
     279            or if you want to upgrade it anyway, following
     280            <xref linkend='ch-tools-linux-headers'/> (but removing
     281            <envar>$LFS</envar> from the <command>cp</command> command).
     282          </para>
     283        </listitem>
     284
     285        <!-- This is to ensure we don't start a process at the time point
     286             where some Glibc shared libraries are updated but the others
     287             are not.  Such mismatches can cause programs crash on startup,
     288             esp. a mismatch between ld-linux-x86-64.so.2 and
     289             libc.so.6.  Note that a crash in the installation process
     290             will leave the system in a state with the mismatch forever,
     291             unrecoverable without the help of another distro.  -->
     292        <listitem>
     293          <para>
     294            Perform a <envar>DESTDIR</envar> installation and upgrade
     295            the Glibc shared libraries on the system using one single
     296            <command>install</command> command:
     297          </para>
     298
     299          <screen role='nodump'><userinput>make DESTDIR=$PWD/dest install
     300install -vm755 dest/usr/lib/*.so.* /usr/lib</userinput></screen>
     301        </listitem>
     302      </itemizedlist>
     303
     304      <para>
     305        It's imperative to strictly follow these steps above unless you
     306        completely understand what you are doing.
     307        <emphasis role='bold'>Any unexpected deviation may render the
     308        system completely unusable.  YOU ARE WARNED.</emphasis>
     309      </para>
     310
     311      <para>
     312        Then continue to run the <command>make install</command> command
     313        and the <command>sed</command> command against
     314        <filename>/usr/bin/ldd</filename>.  Once they are finished, reboot
     315        the system immediately.
     316      </para>
     317    </important>
    203318
    204319    <para>Install the package:</para>
  • chapter08/make.xml

    r027a36d r20902dd  
    5454    <para>To test the results, issue:</para>
    5555
    56 <screen><userinput remap="test">chown -Rv tester .
     56<screen><userinput remap="test">chown -R tester .
    5757su tester -c "PATH=$PATH make check"</userinput></screen>
    5858
  • chapter08/pkgmgt.xml

    r027a36d r20902dd  
    6464      <listitem>
    6565        <para>If Glibc needs to be upgraded to a newer
    66         version, (e.g.,  from Glibc-2.31 to Glibc-2.32), it is safer to
    67         rebuild LFS.  Though you <emphasis>may</emphasis> be able to rebuild
    68         all the packages in their dependency order, we do not recommend
    69         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>
     66        version, (e.g.,  from Glibc-2.36 to Glibc-&glibc-version;),
     67        some extra steps are needed to avoid breaking the system.
     68        Read <xref linkend='ch-system-glibc'/> for details.</para>
    8169      </listitem>
    8270
  • chapter08/sed.xml

    r027a36d r20902dd  
    5252    <para>To test the results, issue:</para>
    5353
    54 <screen><userinput remap="test">chown -Rv tester .
     54<screen><userinput remap="test">chown -R tester .
    5555su tester -c "PATH=$PATH make check"</userinput></screen>
    5656
  • chapter08/util-linux.xml

    r027a36d r20902dd  
    104104    </warning>
    105105
    106 <screen><userinput remap="test">chown -Rv tester .
     106<screen><userinput remap="test">chown -R tester .
    107107su tester -c "make -k check"</userinput></screen>
    108108
  • chapter08/vim.xml

    r027a36d r20902dd  
    6767    to the source tree:</para>
    6868
    69 <screen><userinput remap="test">chown -Rv tester .</userinput></screen>
     69<screen><userinput remap="test">chown -R tester .</userinput></screen>
    7070
    7171    <para>Now run the tests as user <systemitem
Note: See TracChangeset for help on using the changeset viewer.