RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Pinto Elia
  Root:   /v/rpm/cvs                       Email:  devzero2...@rpm5.org
  Module: rpm                              Date:   26-May-2011 16:26:27
  Branch: HEAD                             Handle: 2011052614262601

  Modified files:
    rpm                     CHANGES configure.ac
    rpm/macros              macros.in macros.rpmbuild.in
    rpm/scripts             find-debuginfo.sh

  Log:
    elfutils-0.153 introduce the --reloc-debug-sections
    This is a new option to eu-strip that strips
    out/resolves relocations between .debug_* elf sections in ET_REL files.
    This can save a lot of space for kernel module, but also for generic shared 
libs
    for example.
    Use this option with find-debuginfo if supported by the target platform.
    Check also for the eu_strip path and AC_SUBST it if found
    (ref http://lists.rpm.org/pipermail/rpm-maint/2011-May/003041.html).
    @rpm.org has introduced the same change but for they not automatically 
enabled it
    if supported by the current elfutils version.

  Summary:
    Revision    Changes     Path
    1.3648      +10 -0      rpm/CHANGES
    2.496       +29 -0      rpm/configure.ac
    1.55        +2  -2      rpm/macros/macros.in
    1.8         +2  -1      rpm/macros/macros.rpmbuild.in
    1.16        +10 -2      rpm/scripts/find-debuginfo.sh
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.3647 -r1.3648 CHANGES
  --- rpm/CHANGES       24 May 2011 10:39:11 -0000      1.3647
  +++ rpm/CHANGES       26 May 2011 14:26:26 -0000      1.3648
  @@ -1,4 +1,14 @@
   5.4.0 -> 5.4.1:
  +    - devzero2000: elfutils-0.153 introduce the --reloc-debug-sections
  +      This is a new option to eu-strip that strips
  +      out/resolves relocations between .debug_* elf sections in ET_REL files.
  +      This can save a lot of space for kernel module, but also for generic 
shared libs
  +      for example.
  +      Use this option with find-debuginfo if supported by the target 
platform.
  +      Check also for the eu_strip path and AC_SUBST it if found
  +      (ref http://lists.rpm.org/pipermail/rpm-maint/2011-May/003041.html).
  +      @rpm.org has introduced the same change but for they not automatically 
enabled it 
  +      if supported by the current elfutils version.
       - devzero2000: added gcc-c++ in devtool.conf for fedora (required by 
beecrypt)
       - devzero2000: added fedora per platform macro from redhat-rpm-config
       - devzero2000: added suse to the per vendor change configure.ac enabler
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.495 -r2.496 configure.ac
  --- rpm/configure.ac  23 May 2011 13:58:40 -0000      2.495
  +++ rpm/configure.ac  26 May 2011 14:26:26 -0000      2.496
  @@ -564,6 +564,35 @@
   AC_CHECK_PROGS(LIBTOOLIZE, libtoolize glibtoolize, libtoolize)
   AC_SUBST(LIBTOOLIZE)
   
  +# check for elfutils eu-strip --reloc-debug_sections
  +# elfutils-0.153 introduce the --reloc-debug-sections
  +# This is a new option to eu-strip that strips
  +# out/resolves relocations between .debug_* elf sections in ET_REL files.
  +# This can save a lot of space for kernel module.
  +# Use this option in find-debuginfo if supported
  +# Check also for the eu_strip path and AC_SUBST it if found
  +# not used really today
  +old_PATH=$PATH
  +PATH=$MYPATH
  +AC_CACHE_CHECK([whether eu-strip supports --reloc-debug-sections], 
[ac_cv_path_EU_STRIP],
  +  [AC_PATH_PROGS_FEATURE_CHECK([EU_STRIP], [eu-strip strip],
  +    [[eu_stripout=`$ac_path_EU_STRIP --help | grep "\--reloc-debug-sections"`
  +      test "x$eu_stripout" != x \
  +      && ac_cv_path_EU_STRIP=$ac_path_EU_STRIP 
debuginfo_eu_strip_reloc_debug_sections="-r"]],
  +    [[   debuginfo_eu_strip_reloc_debug_sections="" ]] 
  +)])
  +PATH=$old_PATH
  +AC_SUBST([debuginfo_eu_strip_reloc_debug_sections])
  +AS_IF([test "x$ac_cv_path_EU_STRIP" != x], [
  +     AC_SUBST([EU_STRIP], [$ac_cv_path_EU_STRIP])
  +], [
  +     AC_SUBST([EU_STRIP], [:])
  +     AC_MSG_RESULT([no])
  +])
  +
  +
  +
  +
   dnl # check for id -u
   AC_MSG_CHECKING(whether id supports -u)
   if ${__ID} -u 2>&1 > /dev/null; then
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros/macros.in
  ============================================================================
  $ cvs diff -u -r1.54 -r1.55 macros.in
  --- rpm/macros/macros.in      9 May 2011 15:14:20 -0000       1.54
  +++ rpm/macros/macros.in      26 May 2011 14:26:27 -0000      1.55
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.54 2011/05/09 15:14:20 devzero2000 Exp $
  +# $Id: macros.in,v 1.55 2011/05/26 14:26:27 devzero2000 Exp $
   #
   # This is a global RPM configuration file. All changes made here will
   # be lost when the rpm package is upgraded. Any per-system configuration
  @@ -137,7 +137,7 @@
   #     the script.  See the script for details.
   #
   %__debug_install_post   \
  -   %{_rpmhome}/find-debuginfo.sh 
%{?_missing_build_ids_terminate_build:--strict-build-id} 
%{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\
  +   %{_rpmhome}/find-debuginfo.sh 
%{?_missing_build_ids_terminate_build:--strict-build-id} 
%{?_find_debuginfo_opts} @debuginfo_eu_strip_reloc_debug_sections@ 
"%{_builddir}/%{?buildsubdir}"\
   %{nil}
   
   #    Template for debug information sub-package.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros/macros.rpmbuild.in
  ============================================================================
  $ cvs diff -u -r1.7 -r1.8 macros.rpmbuild.in
  --- rpm/macros/macros.rpmbuild.in     11 Apr 2011 00:34:01 -0000      1.7
  +++ rpm/macros/macros.rpmbuild.in     26 May 2011 14:26:27 -0000      1.8
  @@ -1,7 +1,7 @@
   #/*! \page build_macros Default configuration: @USRLIBRPM@/macros.rpmbuild
   # \verbatim
   #
  -# $Id: macros.rpmbuild.in,v 1.7 2011/04/11 00:34:01 jbj Exp $
  +# $Id: macros.rpmbuild.in,v 1.8 2011/05/26 14:26:27 devzero2000 Exp $
   #
   # This file contains rpmbuild configuration macros.
   #
  @@ -21,6 +21,7 @@
   %__ranlib            @RANLIB@
   %__remsh             %{__rsh}
   %__strip             @__STRIP@
  +%__eu_strip             @__EU_STRIP@
   
   # XXX avoid failures if tools are not installed when rpm is built.
   %__libtoolize                @LIBTOOLIZE@
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/scripts/find-debuginfo.sh
  ============================================================================
  $ cvs diff -u -r1.15 -r1.16 find-debuginfo.sh
  --- rpm/scripts/find-debuginfo.sh     18 May 2011 13:32:50 -0000      1.15
  +++ rpm/scripts/find-debuginfo.sh     26 May 2011 14:26:27 -0000      1.16
  @@ -2,7 +2,7 @@
   #find-debuginfo.sh - automagically generate debug info and file list
   #for inclusion in an rpm spec file.
   #
  -# Usage: find-debuginfo.sh [--strict-build-id] [-g]
  +# Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r]
   #                       [-o debugfiles.list]
   #                       [[-l filelist]... [-p 'pattern'] -o debuginfo.list]
   #                       [builddir]
  @@ -18,12 +18,16 @@
   # the -l filelist file, or whose names match the -p pattern.
   # The -p argument is an egrep-style regexp matching the a file name,
   # and must not use anchors (^ or $).
  +# The -r flag says to use eu-strip --reloc-debug-sections.
   #
   # All file names in switches are relative to builddir (. if not given).
   #
   
   # With -g arg, pass it to strip on libraries.
   strip_g=false
  +# with -r arg, pass --reloc-debug-sections to eu-strip.
  +strip_r=false
  +
   
   # Barf on missing build IDs.
   strict=false
  @@ -39,6 +43,9 @@
     -g)
       strip_g=true
       ;;
  +  -r)
  +    strip_r=true
  +    ;;
     -o)
       if [ -z "${lists[$nout]}" -a -z "${ptns[$nout]}" ]; then
         out=$2
  @@ -89,10 +96,11 @@
   strip_to_debug()
   {
     local g=
  +  $strip_r && r=--reloc-debug-sections
     $strip_g && case "$(file -bi "$2")" in
     application/x-sharedlib,*) g=-g ;;
     esac
  -  eu-strip --remove-comment $g -f "$1" "$2" || exit
  +  eu-strip --remove-comment $r $g -f "$1" "$2" || exit
     chmod 444 "$1" || exit
   }
   
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                rpm-cvs@rpm5.org

Reply via email to