Changeset 85cd74c


Ignore:
Timestamp:
07/27/2021 05:53:40 AM (10 months ago)
Author:
Thomas Trepl (Moody) <thomas@…>
Branches:
ml-11.0, multilib
Children:
64a306d
Parents:
3388c22 (diff), 6d6f242 (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 upstream changes

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    r3388c22 r85cd74c  
    4747
    4848    <listitem>
     49      <para>2021-07-26</para>
     50      <itemizedlist>
     51        <listitem>
     52          <para>[thomas] - Fix a programming error in shadow-4.9</para>
     53        </listitem>
     54      </itemizedlist>
     55    </listitem>
     56
     57    <listitem>
     58      <para>2021-07-25</para>
     59      <itemizedlist>
     60        <listitem>
     61          <para>[xry111] - (Hopefully) complete stripping workaround.</para>
     62        </listitem>
     63      </itemizedlist>
     64    </listitem>
     65
     66    <listitem>
    4967      <para>2021-07-25</para>
    5068      <itemizedlist>
  • chapter08/pkgmgt.xml

    r3388c22 r85cd74c  
    122122        deleted libraries.
    123123      </para></listitem>
     124
     125      <listitem>
     126        <para>If a binary or a shared library is overwrote, the processes
     127        using the code or data in the binary or library may crash.  The
     128        correct way to update a binary or a shared library without causing
     129        the process to crash is: remove it first, then install the new
     130        version into position. The <command>install</command> command
     131        provided by <application>Coreutils</application> has already
     132        implemented this and most packages use it to install binaries and
     133        libraries.  So you won't be troubled by this issue most of the time.
     134        However, the install process of some packages (notably Mozilla JS
     135        in BLFS) just overwrites the file if it exists and causes crash, so
     136        it's safer to save your work and close unneeded running processes
     137        before updating a package.</para>
     138      </listitem>
    124139    </itemizedlist>
    125140
  • chapter08/shadow.xml

    r3388c22 r85cd74c  
    9696<screen><userinput remap="pre">sed -i 's/1000/999/' etc/useradd</userinput></screen>
    9797-->
     98    <para>Fix a simple programming error by modifying a file with following command:</para>
     99
     100<screen><userinput remap="pre">sed -e "224s/rounds = SHA_ROUNDS_DEFAULT/min_&amp;/" -i libmisc/salt.c</userinput></screen>
     101
    98102    <para>Prepare Shadow for compilation:</para>
    99103
  • chapter08/strippingagain.xml

    r3388c22 r85cd74c  
    2424  backup of the LFS system in its current state.</para>
    2525
    26   <para>First place the debugging symbols for selected libraries
    27   in separate files.  This debugging information is needed if running
     26  <para>The debugging symbols for selected libraries are placed
     27  in separate files.  These debugging information is needed if running
    2828  regression tests that use <ulink
    2929  url='&blfs-book;/general/valgrind.html'>valgrind</ulink> or <ulink
     
    3131  </para>
    3232
     33  <para>And, <command>strip</command> will overwrite the binary or library
     34  file.  This may crash the processes using code or data from the file.  If
     35  the process running <command>strip</command> itself is affected, the
     36  binary or library being stripped may be destroyed.  This may make the
     37  system completely unusable.  To avoid it, we'll copy some libraries and
     38  binaries into <filename class="directory">/tmp</filename>, strip them
     39  there, and install them back with the <command>install</command> command.
     40  Read the related entry in <xref linkend="pkgmgmt-upgrade-issues"/> for the
     41  rationale to use the <command>install</command> command here.</para>
     42
    3343<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from GCC -->
    3444
    3545<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"-->
    3646<screen><userinput>save_usrlib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so
    37              libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version; libz.so.&zlib-version;
     47             libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version;
    3848             libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;-->
    3949
     
    6878done</userinput><userinput>
    6979
    70 unset LIB save_usrlib</userinput></screen>
     80online_usrbin="bash find strip"
     81online_usrlib="libbfd-&binutils-version;.so libdl-&glibc-version;.so
     82               libhistory.so.&readline-version; libncursesw.so.&ncurses-version;
     83               libm-&glibc-version;.so libreadline.so.&readline-version;
     84               libz.so.&zlib-version;"
    7185
    72 <!--  <para>Before performing the stripping, take special care to ensure that
    73   none of the binaries that are about to be stripped are running:</para>
     86for BIN in $online_usrbin; do
     87    cp /usr/bin/$BIN /tmp/$BIN
     88    strip --strip-all /tmp/$BIN
     89    install -vm755 /tmp/$BIN /usr/bin
     90    rm /tmp/$BIN
     91done
    7492
    75 <screen role="nodump"><userinput>exec /tools/bin/bash</userinput></screen>
    76  
    77   <para>Now the binaries and libraries can be safely stripped:</para>
    78 -->
    79   <para>Now the binaries and libraries can be stripped:</para>
    80 <screen><userinput>find /usr/lib -type f -name \*.a \
    81    -exec strip --strip-debug {} ';'</userinput>
    82 <userinput arch="ml_32,ml_all">find /usr/lib32 -type f -name \*.a \
    83    -exec strip --strip-debug {} ';'</userinput>
    84 <userinput arch="ml_x32,ml_all">find /usr/libx32 -type f -name \*.a \
    85    -exec strip --strip-debug {} ';'</userinput><userinput>
     93for LIB in $online_usrlib; do
     94    cp /usr/lib/$LIB /tmp/$LIB
     95    strip --strip-unneeded /tmp/$LIB
     96    install -vm755 /tmp/$LIB /usr/lib
     97    rm /tmp/$LIB
     98done</userinput><userinput arch="ml_32,ml_all">
     99for LIB in $online_usrlib; do
     100    cp /usr/lib32/$LIB /tmp/$LIB
     101    strip --strip-unneeded /tmp/$LIB
     102    install -vm755 /tmp/$LIB /usr/lib32
     103    rm /tmp/$LIB
     104done</userinput><userinput arch="ml_x32,ml_all">
     105for LIB in $online_usrlib; do
     106    cp /usr/libx32/$LIB /tmp/$LIB
     107    strip --strip-unneeded /tmp/$LIB
     108    install -vm755 /tmp/$LIB /usr/libx32
     109    rm /tmp/$LIB
     110done</userinput><userinput>
    86111
    87 find /usr/lib -type f -name \*.so* ! -name \*dbg ! -name libz.so* \
    88    -exec strip --strip-unneeded {} ';'</userinput>
    89 <userinput arch="ml_32,ml_all">find /usr/lib32 -type f -name \*.so* ! -name \*dbg ! -name libz.so* \
    90    -exec strip --strip-unneeded {} ';'</userinput>
    91 <userinput arch="ml_x32,ml_all">find /usr/libx32 -type f -name \*.so* ! -name \*dbg ! -name libz.so* \
    92    -exec strip --strip-unneeded {} ';'</userinput><userinput>
     112find /usr/lib -type f -name \*.a \
     113   -exec strip --strip-debug {} ';'
    93114
    94 find /usr/{bin,sbin,libexec} -type f \
    95     -exec strip --strip-all {} ';'</userinput></screen>
     115for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg); do
     116    case "$online_usrlib $save_usrlib" in
     117        *$(basename $i)* ) ;;
     118        * ) strip --strip-unneeded $i ;;
     119    esac
     120done</userinput><userinput arch="ml_32,ml_all">
     121for i in $(find /usr/lib32 -type f -name \*.so* ! -name \*dbg); do
     122    case "$online_usrlib $save_usrlib" in
     123        *$(basename $i)* ) ;;
     124        * ) strip --strip-unneeded $i ;;
     125    esac
     126done</userinput><userinput arch="ml_x32,ml_all">
     127for i in $(find /usr/libx32 -type f -name \*.so* ! -name \*dbg); do
     128    case "$online_usrlib $save_usrlib" in
     129        *$(basename $i)* ) ;;
     130        * ) strip --strip-unneeded $i ;;
     131    esac
     132done</userinput><userinput>
     133
     134for i in $(find /usr/bin -type f); do
     135    case "$online_usrbin" in
     136        *$(basename $i)* ) ;;
     137        * ) strip --strip-all $i ;;
     138    esac
     139done
     140
     141find /usr/{sbin,libexec} -type f \
     142    -exec strip --strip-all {} ';'
     143
     144unset BIN LIB save_usrlib online_usrbin online_usrlib
     145</userinput></screen>
    96146
    97147  <para>A large number of files will be reported as having their file
Note: See TracChangeset for help on using the changeset viewer.