This commit is contained in:
parent
9525994e02
commit
2300e13507
@ -5,12 +5,12 @@ build the binary. The patches moves them into a separate package -debugsource.
|
|||||||
|
|
||||||
---
|
---
|
||||||
macros.in | 12 ++++++++++++
|
macros.in | 12 ++++++++++++
|
||||||
scripts/find-debuginfo.sh | 43 ++++++++++++++++++++++++++-----------------
|
scripts/find-debuginfo.sh | 12 +++++++++---
|
||||||
2 files changed, 38 insertions(+), 17 deletions(-)
|
2 files changed, 21 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
Index: macros.in
|
Index: b/macros.in
|
||||||
===================================================================
|
===================================================================
|
||||||
--- macros.in.orig
|
--- macros.in
|
||||||
+++ macros.in
|
+++ macros.in
|
||||||
@@ -183,6 +183,18 @@ Debug information is useful when develop
|
@@ -183,6 +183,18 @@ Debug information is useful when develop
|
||||||
package or when debugging this package.\
|
package or when debugging this package.\
|
||||||
@ -31,19 +31,19 @@ Index: macros.in
|
|||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
%_defaultdocdir %{_usr}/doc/packages
|
%_defaultdocdir %{_usr}/doc/packages
|
||||||
Index: scripts/find-debuginfo.sh
|
Index: b/scripts/find-debuginfo.sh
|
||||||
===================================================================
|
===================================================================
|
||||||
--- scripts/find-debuginfo.sh.orig
|
--- scripts/find-debuginfo.sh
|
||||||
+++ scripts/find-debuginfo.sh
|
+++ scripts/find-debuginfo.sh
|
||||||
@@ -172,8 +172,8 @@ set -o pipefail
|
@@ -172,8 +172,8 @@ set -o pipefail
|
||||||
strict_error=ERROR
|
strict_error=ERROR
|
||||||
$strict || strict_error=WARNING
|
$strict || strict_error=WARNING
|
||||||
|
|
||||||
-# Strip ELF binaries
|
-# Strip ELF binaries
|
||||||
-find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) |
|
-find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 |
|
||||||
+# Strip ELF binaries (and no static libraries)
|
+# Strip ELF binaries (and no static libraries)
|
||||||
+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" |
|
+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) ! -name "*.a" -print0 |
|
||||||
xargs --no-run-if-empty stat -c '%h %D_%i %n' |
|
xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' |
|
||||||
while read nlinks inum f; do
|
while read nlinks inum f; do
|
||||||
case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
||||||
@@ -282,10 +282,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -
|
@@ -282,10 +282,16 @@ if [ -d "${RPM_BUILD_ROOT}/usr/lib" -o -
|
||||||
|
@ -1,8 +1,36 @@
|
|||||||
Index: scripts/find-debuginfo.sh
|
--- scripts/find-debuginfo.sh 2008/09/15 22:56:11 1.1
|
||||||
===================================================================
|
+++ scripts/find-debuginfo.sh 2008/09/15 22:58:57
|
||||||
--- scripts/find-debuginfo.sh.orig
|
@@ -126,6 +126,20 @@
|
||||||
+++ scripts/find-debuginfo.sh
|
link_relative "$t" "$l" "$RPM_BUILD_ROOT"
|
||||||
@@ -173,12 +173,18 @@ strict_error=ERROR
|
}
|
||||||
|
|
||||||
|
+# Compare two binaries but ignore the .note.gnu.build-id section
|
||||||
|
+elfcmp()
|
||||||
|
+{
|
||||||
|
+ local tmp1=$(mktemp -t ${1##*/}.XXXXXX)
|
||||||
|
+ local tmp2=$(mktemp -t ${2##*/}.XXXXXX)
|
||||||
|
+
|
||||||
|
+ objcopy -O binary -R .note.gnu.build-id $1 $tmp1
|
||||||
|
+ objcopy -O binary -R .note.gnu.build-id $2 $tmp2
|
||||||
|
+ cmp -s $tmp1 $tmp2
|
||||||
|
+ local res=$?
|
||||||
|
+ rm -f $tmp1 $tmp2
|
||||||
|
+ return $res
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
# Make a build-id symlink for id $1 with suffix $3 to file $2.
|
||||||
|
make_id_link()
|
||||||
|
{
|
||||||
|
@@ -144,7 +158,7 @@
|
||||||
|
local other=$(readlink -m "$root_idfile")
|
||||||
|
other=${other#$RPM_BUILD_ROOT}
|
||||||
|
if cmp -s "$root_idfile" "$RPM_BUILD_ROOT$file" ||
|
||||||
|
- eu-elfcmp -q "$root_idfile" "$RPM_BUILD_ROOT$file" 2> /dev/null; then
|
||||||
|
+ elfcmp "$root_idfile" "$RPM_BUILD_ROOT$file" ; then
|
||||||
|
# Two copies. Maybe one has to be setuid or something.
|
||||||
|
echo >&2 "*** WARNING: identical binaries are copied, not linked:"
|
||||||
|
echo >&2 " $file"
|
||||||
|
@@ -173,12 +187,18 @@
|
||||||
$strict || strict_error=WARNING
|
$strict || strict_error=WARNING
|
||||||
|
|
||||||
# Strip ELF binaries
|
# Strip ELF binaries
|
||||||
@ -10,8 +38,9 @@ Index: scripts/find-debuginfo.sh
|
|||||||
- \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
|
- \( -perm -0100 -or -perm -0010 -or -perm -0001 \) \
|
||||||
- -print |
|
- -print |
|
||||||
-file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' |
|
-file -N -f - | sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p' |
|
||||||
+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) |
|
-xargs --no-run-if-empty stat -c '%h %D_%i %n' |
|
||||||
xargs --no-run-if-empty stat -c '%h %D_%i %n' |
|
+find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm +111 -or -name "*.so*" -or -name "*.ko" \) -print 0 |
|
||||||
|
+xargs --no-run-if-empty -0 stat -c '%h %D_%i %n' |
|
||||||
while read nlinks inum f; do
|
while read nlinks inum f; do
|
||||||
+ case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
+ case $(objdump -h $f 2>/dev/null | egrep -o '(debug[\.a-z_]*|gnu.version)') in
|
||||||
+ *debuglink*) continue ;;
|
+ *debuglink*) continue ;;
|
||||||
@ -25,7 +54,7 @@ Index: scripts/find-debuginfo.sh
|
|||||||
get_debugfn "$f"
|
get_debugfn "$f"
|
||||||
[ -f "${debugfn}" ] && continue
|
[ -f "${debugfn}" ] && continue
|
||||||
|
|
||||||
@@ -199,6 +205,8 @@ while read nlinks inum f; do
|
@@ -199,6 +219,8 @@
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "extracting debug info from $f"
|
echo "extracting debug info from $f"
|
||||||
@ -34,7 +63,7 @@ Index: scripts/find-debuginfo.sh
|
|||||||
id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \
|
id=$(/usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug \
|
||||||
-i -l "$SOURCEFILE" "$f") || exit
|
-i -l "$SOURCEFILE" "$f") || exit
|
||||||
if [ -z "$id" ]; then
|
if [ -z "$id" ]; then
|
||||||
@@ -215,13 +223,25 @@ while read nlinks inum f; do
|
@@ -215,13 +237,25 @@
|
||||||
esac
|
esac
|
||||||
|
|
||||||
mkdir -p "${debugdn}"
|
mkdir -p "${debugdn}"
|
||||||
@ -67,7 +96,7 @@ Index: scripts/find-debuginfo.sh
|
|||||||
|
|
||||||
if [ -n "$id" ]; then
|
if [ -n "$id" ]; then
|
||||||
make_id_link "$id" "$dn/$(basename $f)"
|
make_id_link "$id" "$dn/$(basename $f)"
|
||||||
@@ -250,12 +270,14 @@ if [ -s "$SOURCEFILE" ]; then
|
@@ -250,12 +284,14 @@
|
||||||
# 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 |
|
find "${RPM_BUILD_ROOT}/usr/src/debug" -type d -print0 |
|
||||||
xargs --no-run-if-empty -0 chmod a+rx
|
xargs --no-run-if-empty -0 chmod a+rx
|
||||||
|
@ -24,7 +24,7 @@ License: GPL v2 or later
|
|||||||
Group: System/Packages
|
Group: System/Packages
|
||||||
Summary: Python Bindings for Manipulating RPM Packages
|
Summary: Python Bindings for Manipulating RPM Packages
|
||||||
Version: 4.4.2.3
|
Version: 4.4.2.3
|
||||||
Release: 2
|
Release: 5
|
||||||
Requires: rpm = %{version}
|
Requires: rpm = %{version}
|
||||||
%py_requires
|
%py_requires
|
||||||
Source99: rpm.spec
|
Source99: rpm.spec
|
||||||
|
12
rpm.changes
12
rpm.changes
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 16 01:01:30 CEST 2008 - ro@suse.de
|
||||||
|
|
||||||
|
- fix find-debuginfo.sh and debugsource-package.diff to even
|
||||||
|
apply (directory depth)
|
||||||
|
- add hack from jblunck using home made elfcmp
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 15 20:32:32 CEST 2008 - jblunck@suse.de
|
||||||
|
|
||||||
|
- fix find-debuginfo.sh to work on filenames with spaces in
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Sep 12 18:16:33 CEST 2008 - mls@suse.de
|
Fri Sep 12 18:16:33 CEST 2008 - mls@suse.de
|
||||||
|
|
||||||
|
12
rpm.spec
12
rpm.spec
@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions
|
|||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
Summary: The RPM Package Manager
|
Summary: The RPM Package Manager
|
||||||
Version: 4.4.2.3
|
Version: 4.4.2.3
|
||||||
Release: 2
|
Release: 5
|
||||||
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
|
||||||
@ -306,7 +306,7 @@ Summary: A C library for parsing command line parameters
|
|||||||
License: LGPL v2.1 or later
|
License: LGPL v2.1 or later
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Version: 1.7
|
Version: 1.7
|
||||||
Release: 450
|
Release: 453
|
||||||
#
|
#
|
||||||
|
|
||||||
%description -n popt
|
%description -n popt
|
||||||
@ -329,7 +329,7 @@ Summary: C Library for Parsing Command Line Parameters
|
|||||||
License: LGPL v2.1 or later
|
License: LGPL v2.1 or later
|
||||||
Group: System/Libraries
|
Group: System/Libraries
|
||||||
Version: 1.7
|
Version: 1.7
|
||||||
Release: 450
|
Release: 453
|
||||||
Requires: popt = 1.7
|
Requires: popt = 1.7
|
||||||
Requires: glibc-devel
|
Requires: glibc-devel
|
||||||
|
|
||||||
@ -364,6 +364,12 @@ Authors:
|
|||||||
%doc %{_mandir}/man3/popt.3*
|
%doc %{_mandir}/man3/popt.3*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 16 2008 ro@suse.de
|
||||||
|
- fix find-debuginfo.sh and debugsource-package.diff to even
|
||||||
|
apply (directory depth)
|
||||||
|
- add hack from jblunck using home made elfcmp
|
||||||
|
* Mon Sep 15 2008 jblunck@suse.de
|
||||||
|
- fix find-debuginfo.sh to work on filenames with spaces in
|
||||||
* Fri Sep 12 2008 mls@suse.de
|
* Fri Sep 12 2008 mls@suse.de
|
||||||
- fix changelog cutter
|
- fix changelog cutter
|
||||||
- fix find-requires script
|
- fix find-requires script
|
||||||
|
Loading…
Reference in New Issue
Block a user