Changeset 850536a


Ignore:
Timestamp:
02/01/2024 09:05:49 AM (4 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
xry111/update-glibc
Children:
10a450c
Parents:
d3b0a08
Message:

Add info about how to upgrade Glibc safely

Location:
chapter08
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chapter08/glibc.xml

    rd3b0a08 r850536a  
    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;), you need to take some extra
     208        caution 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 messages complaining "nscd disabled building Glibc"
     245             will show up running things like sudo.  -->
     246        <listitem revision='systemd'>
     247          <para>
     248            If upgrading on a LFS system based on Systemd prior to 12.1
     249            (exclusive), disable and stop <command>nscd</command>:
     250          </para>
     251
     252          <screen role='nodump'><userinput>systemctl disable --now nscd</userinput></screen>
     253        </listitem>
     254
     255        <!-- This is to ensure we don't start a process at the time point
     256             where some Glibc shared libraries are updated but the others
     257             are not.  Such mismatches can cause programs crash on startup,
     258             esp. a mismatch between ld-linux-x86-64.so.2 and
     259             libc.so.6.  Note that a crash in the installation process
     260             will leave the system in a state with the mismatch forever,
     261             unrecoverable without the help of another distro.  -->
     262        <listitem>
     263          <para>
     264            Perform a <envar>DESTDIR</envar> installation and upgrade
     265            the Glibc shared libraries on the system using one single
     266            <command>install</command> command:
     267          </para>
     268
     269          <screen role='nodump'><userinput>make DESTDIR=$PWD/dest install
     270install -vm755 dest/usr/lib/*.so.* /usr/lib</userinput></screen>
     271        </listitem>
     272      </itemizedlist>
     273
     274      <para>
     275        It's imperative to strictly follow these steps above unless you
     276        completely understand what you are doing.
     277        <emphasis role='bold'>Any unproved deviation may render the system
     278        completely unusable.  YOU ARE WARNED.</emphasis>
     279      </para>
     280
     281      <para>
     282        Then continue to follow the instructions on this page.  Once they
     283        are finished, reboot the system immediately.
     284      </para>
     285    </important>
    203286
    204287    <para>Install the package:</para>
  • chapter08/pkgmgt.xml

    rd3b0a08 r850536a  
    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
Note: See TracChangeset for help on using the changeset viewer.