Ignore:
Timestamp:
03/24/2023 08:44:09 AM (13 months ago)
Author:
Thomas Trepl <thomas@…>
Branches:
12.0, 12.1, kea, ken/TL2024, ken/tuningfonts, lazarus, lxqt, plabs/newcss, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, trunk, xry111/llvm18, xry111/xf86-video-removal
Children:
218e13c
Parents:
0de5b82f (diff), 9b33190 (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 branch 'trunk' of git.linuxfromscratch.org:blfs into trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • introduction/important/building-notes.xml

    r0de5b82f r0f8922e  
    613613      entries. The <command>mv</command> just removes the destination file from
    614614      the directory but does not touch its content, so that it satisfies the
    615       condition for the kernel to use the old (deleted) file. The script below
    616       is just an example.
     615      condition for the kernel to use the old (deleted) file.
     616      But this approach can detach hard links into duplicated copies,
     617      causing a bloat which is obviously unwanted as we are stripping to
     618      reduce system size.  If two files in a same file system share the
     619      same inode number, they are hard links to each other and we should
     620      reconstruct the link.  The script below is just an example.
    617621      It should be run as the &root; user:
    618622    </para>
     
    626630fi
    627631
     632last_fs_inode=
     633last_file=
     634
    628635{ find /usr/lib -type f -name '*.so*' ! -name '*dbg'
    629636  find /usr/lib -type f -name '*.a'
    630637  find /usr/{bin,sbin,libexec} -type f
    631 } | while read file; do
     638} | xargs stat -c '%m %i %n' | sort | while read file; do
    632639       if ! readelf -h $file >/dev/null 2>&amp;1; then continue; fi
    633640       if file $file | grep --quiet --invert-match 'not stripped'; then continue; fi
     641
     642       if [ "$fs $inode" = "$last_fs_inode" ]; then
     643         ln -f $last_file $file;
     644         continue;
     645       fi
    634646
    635647       cp --preserve $file    ${file}.tmp
    636648       strip --strip-unneeded ${file}.tmp
    637649       mv ${file}.tmp $file
    638      done</literal>
     650
     651       last_fs_inode="$fs $inode"
     652       last_file=$file
     653done</literal>
    639654EOF
    640655chmod 744 /usr/sbin/strip-all.sh</userinput></screen>
Note: See TracChangeset for help on using the changeset viewer.