OBS User unknown 2007-04-23 21:21:13 +00:00 committed by Git OBS Bridge
parent f1d1f2d22d
commit 6d338d7cd4
4 changed files with 26 additions and 17 deletions

View File

@ -30,7 +30,7 @@
/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" /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, # A binary already copied into /usr/lib/debug doesn't get stripped,
@@ -34,19 +45,58 @@ @@ -34,19 +45,60 @@
esac esac
mkdir -p "${debugdn}" mkdir -p "${debugdn}"
@ -43,20 +43,22 @@
+ objcopy --only-keep-debug $f $debugfn || : + objcopy --only-keep-debug $f $debugfn || :
+ strip_option="--strip-all" + strip_option="--strip-all"
+ case "$f" in + case "$f" in
+ *$STRIP_KEEP_SYMTAB*)
+ strip_option="--strip-debug"
+ ;;
+ *.ko|*.a) + *.ko|*.a)
+ strip_option="--strip-debug" + 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 + if test "$NO_DEBUGINFO_STRIP_DEBUG" = true ; then
+ strip_option= + strip_option=
fi fi
+ objcopy --add-gnu-debuglink=$debugfn $strip_option $f || : + objcopy --add-gnu-debuglink=$debugfn $strip_option $f || :
+ chmod $mode $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" \) ` +for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -name "*.exe.mdb" -or -name "*.dll.mdb" \) `
+do +do
+ dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p") + dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p")
@ -66,17 +68,15 @@
+ debugdn="${debugdir}${dn}" + debugdn="${debugdir}${dn}"
+ mkdir -p "${debugdn}" + mkdir -p "${debugdn}"
+ mv "$f" "${debugdn}" + mv "$f" "${debugdn}"
done +done
+
+ +
mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug 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) -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 -# stupid cpio creates new directories in mode 0700, fixup
-find ${RPM_BUILD_ROOT}/usr/src/debug -type d -print0 | xargs -0 chmod a+rx -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 +(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 +# trying to replace dangling and/or absolute symlink
+DBASE=${RPM_BUILD_ROOT}/usr/src/debug +DBASE=${RPM_BUILD_ROOT}/usr/src/debug
+for link in `find $DBASE -type l -printf "%P\n"` ; do +for link in `find $DBASE -type l -printf "%P\n"` ; do
@ -90,7 +90,9 @@
+ cp "`readlink -f $RPM_BUILD_DIR/$link`" "$DBASE/$link" + cp "`readlink -f $RPM_BUILD_DIR/$link`" "$DBASE/$link"
+ fi + fi
+done +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 + test -d ${RPM_BUILD_ROOT}/usr/lib/debug && echo /usr/lib/debug
+ echo /usr/src/debug + echo /usr/src/debug

View File

@ -16,7 +16,7 @@ License: GNU General Public License (GPL)
Group: System/Packages Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages Summary: Python Bindings for Manipulating RPM Packages
Version: 4.4.2 Version: 4.4.2
Release: 105 Release: 107
Requires: rpm = %{version} Requires: rpm = %{version}
%py_requires %py_requires

View File

@ -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 Tue Apr 17 14:24:01 CEST 2007 - dmueller@suse.de

View File

@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq popt = %{popt_version} permission
Autoreqprov: on Autoreqprov: on
Summary: The RPM Package Manager Summary: The RPM Package Manager
Version: 4.4.2 Version: 4.4.2
Release: 98 Release: 100
Source: rpm-%{version}.tar.bz2 Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2 Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.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) License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: System/Libraries Group: System/Libraries
Version: 1.7 Version: 1.7
Release: 326 Release: 328
# #
%description -n popt %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) License: GNU Library General Public License v. 2.0 and 2.1 (LGPL)
Group: System/Libraries Group: System/Libraries
Version: 1.7 Version: 1.7
Release: 326 Release: 328
Requires: popt = 1.7 Requires: popt = 1.7
Requires: glibc-devel Requires: glibc-devel
@ -380,6 +380,8 @@ Authors:
%doc %{_mandir}/man3/popt.3* %doc %{_mandir}/man3/popt.3*
%changelog %changelog
* Sun Apr 22 2007 - dmueller@suse.de
- fix stripping of symbol table
* Tue Apr 17 2007 - dmueller@suse.de * Tue Apr 17 2007 - dmueller@suse.de
- strip comment and gcc command line sections from the packages - strip comment and gcc command line sections from the packages
- rework SYMTAB_KEEP to accept a file pattern - rework SYMTAB_KEEP to accept a file pattern