From 35bb629e10c2514825fbe848bbdc1a96e82a6ef227d6df13ee5d01400a893bc1 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Mon, 23 Apr 2007 21:21:13 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=12 --- finddebuginfo.diff | 28 +++++++++++++++------------- rpm-python.spec | 2 +- rpm.changes | 5 +++++ rpm.spec | 8 +++++--- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/finddebuginfo.diff b/finddebuginfo.diff index b5c6a5d..39e51fa 100644 --- a/finddebuginfo.diff +++ b/finddebuginfo.diff @@ -30,7 +30,7 @@ /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" # A binary already copied into /usr/lib/debug doesn't get stripped, -@@ -34,19 +45,58 @@ +@@ -34,19 +45,60 @@ esac mkdir -p "${debugdn}" @@ -43,20 +43,22 @@ + objcopy --only-keep-debug $f $debugfn || : + strip_option="--strip-all" + case "$f" in -+ *$STRIP_KEEP_SYMTAB*) -+ strip_option="--strip-debug" -+ ;; + *.ko|*.a) + strip_option="--strip-debug" + ;; -+ esac ++ *$STRIP_KEEP_SYMTAB*) ++ if test -n "$STRIP_KEEP_SYMTAB"; then ++ strip_option="--strip-debug" ++ fi ++ ;; ++ esac + if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then + strip_option= fi + objcopy --add-gnu-debuglink=$debugfn $strip_option $f || : + chmod $mode $f -+done -+ + done + +for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -name "*.exe.mdb" -or -name "*.dll.mdb" \) ` +do + dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p") @@ -66,17 +68,15 @@ + debugdn="${debugdir}${dn}" + mkdir -p "${debugdn}" + mv "$f" "${debugdn}" - done - ++done ++ + mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug -cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug) -# stupid cpio creates new directories in mode 0700, fixup -find ${RPM_BUILD_ROOT}/usr/src/debug -type d -print0 | xargs -0 chmod a+rx +(cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug) < $SOURCEFILE - --find ${RPM_BUILD_ROOT}/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE --find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE ++ +# trying to replace dangling and/or absolute symlink +DBASE=${RPM_BUILD_ROOT}/usr/src/debug +for link in `find $DBASE -type l -printf "%P\n"` ; do @@ -90,7 +90,9 @@ + cp "`readlink -f $RPM_BUILD_DIR/$link`" "$DBASE/$link" + fi +done -+ + +-find ${RPM_BUILD_ROOT}/usr/lib/debug -type f | sed -n -e "s#^$RPM_BUILD_ROOT##p" > $LISTFILE +-find ${RPM_BUILD_ROOT}/usr/src/debug -mindepth 1 -maxdepth 1 | sed -n -e "s#^$RPM_BUILD_ROOT##p" >> $LISTFILE +{ + test -d ${RPM_BUILD_ROOT}/usr/lib/debug && echo /usr/lib/debug + echo /usr/src/debug diff --git a/rpm-python.spec b/rpm-python.spec index 445c598..9059d18 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -16,7 +16,7 @@ License: GNU General Public License (GPL) Group: System/Packages Summary: Python Bindings for Manipulating RPM Packages Version: 4.4.2 -Release: 105 +Release: 107 Requires: rpm = %{version} %py_requires diff --git a/rpm.changes b/rpm.changes index b45e867..054fa41 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Apr 22 15:23:12 CEST 2007 - dmueller@suse.de + +- fix stripping of symbol table + ------------------------------------------------------------------- Tue Apr 17 14:24:01 CEST 2007 - dmueller@suse.de diff --git a/rpm.spec b/rpm.spec index a045830..8fc49dc 100644 --- a/rpm.spec +++ b/rpm.spec @@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission Autoreqprov: on Summary: The RPM Package Manager Version: 4.4.2 -Release: 98 +Release: 100 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -321,7 +321,7 @@ Summary: A C library for parsing command line parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 326 +Release: 328 # %description -n popt @@ -344,7 +344,7 @@ Summary: C Library for Parsing Command Line Parameters License: GNU Library General Public License v. 2.0 and 2.1 (LGPL) Group: System/Libraries Version: 1.7 -Release: 326 +Release: 328 Requires: popt = 1.7 Requires: glibc-devel @@ -380,6 +380,8 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Sun Apr 22 2007 - dmueller@suse.de +- fix stripping of symbol table * Tue Apr 17 2007 - dmueller@suse.de - strip comment and gcc command line sections from the packages - rework SYMTAB_KEEP to accept a file pattern