]>
Commit | Line | Data |
---|---|---|
fa78cfd4 | 1 | --- rpm-4.4.9.orig/macros.in 2008-01-31 19:20:08.798315963 +0200 |
2 | +++ rpm-4.4.9/macros.in 2008-01-31 19:20:50.850567944 +0200 | |
3 | @@ -188,15 +188,21 @@ | |
529784bf | 4 | %debug_package \ |
5 | %ifnarch noarch\ | |
6 | %global __debug_package 1\ | |
7 | -%package debug\ | |
8 | +%package debuginfo\ | |
9 | Summary: Debug information for package %{name}\ | |
fa78cfd4 | 10 | +Summary(pl.UTF-8): Informacje dla debuggera dla pakietu %{name}\ |
529784bf | 11 | Group: Development/Debug\ |
fa78cfd4 | 12 | +Requires: filesystem-debuginfo >= 3.0-16\ |
529784bf | 13 | AutoReqProv: 0\ |
14 | -%description debug\ | |
15 | +%description debuginfo\ | |
16 | This package provides debug information for package %{name}.\ | |
17 | Debug information is useful when developing applications that use this\ | |
18 | package or when debugging this package.\ | |
19 | -%files debug -f debugfiles.list\ | |
fa78cfd4 | 20 | +%description debuginfo -l pl.UTF-8\ |
529784bf | 21 | +Ten pakiet dostarcza informacje dla debuggera dla pakietu %{name}.\ |
fa78cfd4 | 22 | +Informacje te są przydatne przy rozwijaniu aplikacji używających tego\ |
529784bf | 23 | +pakietu oraz przy odpluskwianiu samego pakietu.\ |
24 | +%files debuginfo -f debugfiles.list\ | |
25 | %defattr(-,root,root)\ | |
26 | %endif\ | |
27 | %{nil} | |
fa78cfd4 | 28 | @@ -1046,7 +1052,7 @@ |
29 | %{?buildroot:%{__rm} -rf '%{buildroot}'} | |
ebdaaf76 AM |
30 | %__spec_install_body %{___build_body} |
31 | %__spec_install_post\ | |
e0c83b5d JB |
32 | -%{?__debug_package:%{__debug_install_post}}\ |
33 | +%{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\ | |
ebdaaf76 AM |
34 | %{__arch_install_post}\ |
35 | %{__os_install_post}\ | |
36 | %{nil} | |
fa78cfd4 | 37 | --- rpm-4.4.9.orig/platform.in 2008-01-31 19:20:08.676303626 +0200 |
38 | +++ rpm-4.4.9/platform.in 2008-01-31 19:20:50.844567337 +0200 | |
415a7ef5 AM |
39 | @@ -61,7 +61,7 @@ |
40 | %{nil} | |
41 | ||
42 | %__spec_install_post\ | |
43 | - %{?__debug_package:%{__debug_install_post}}\ | |
44 | + %{expand:%%define __sip_%{?_enable_debug_packages} 1}%{?__sip_1:%{?__debug_package:%{__debug_install_post}}}%{expand:%%undefine __sip_%{?_enable_debug_packages}}\ | |
45 | %{__arch_install_post}\ | |
46 | %{__os_install_post}\ | |
47 | %{nil} | |
2f792da1 ER |
48 | --- rpm-4.5/scripts/find-debuginfo.sh 2008-05-22 14:11:01.000000000 +0300 |
49 | +++ rpm-4.5/scripts/find-debuginfo.sh 2008-08-27 21:28:20.669206923 +0300 | |
ded25736 | 50 | @@ -1,32 +1,50 @@ |
fa78cfd4 | 51 | #!/bin/sh |
52 | -#find-debuginfo.sh - automagically generate debug info and file list | |
53 | -#for inclusion in an rpm spec file. | |
54 | +# find-debuginfo.sh - automagically generate debug info and file list | |
55 | +# for inclusion in an rpm spec file. | |
56 | ||
57 | -if [ -z "$1" ] ; then BUILDDIR="." | |
58 | -else BUILDDIR=$1 | |
59 | +if [ -z "$1" ]; then | |
60 | + BUILDDIR="." | |
61 | +else | |
62 | + BUILDDIR=$1 | |
63 | fi | |
64 | ||
65 | LISTFILE=$BUILDDIR/debugfiles.list | |
66 | SOURCEFILE=$BUILDDIR/debugsources.list | |
67 | ||
68 | -debugdir="${RPM_BUILD_ROOT}/usr/lib/debug" | |
69 | - | |
70 | -echo -n > $SOURCEFILE | |
71 | +: > $SOURCEFILE | |
72 | +: > $LISTFILE | |
6fc678f5 JB |
73 | |
74 | strip_to_debug() | |
75 | { | |
76 | - eu-strip --remove-comment -f "$1" "$2" || : | |
68f854fb PS |
77 | + objcopy --only-keep-debug --remove-section .comment "$2" "$1" |
78 | + objcopy --add-gnu-debuglink="$1" "$2" | |
6fc678f5 JB |
79 | } |
80 | ||
639079f5 ER |
81 | +if [ ! -d $RPM_BUILD_ROOT ]; then |
82 | + # no buildroot, exit | |
83 | + exit 0 | |
84 | +fi | |
85 | + | |
fa78cfd4 | 86 | +filelist=$(find $RPM_BUILD_ROOT ! -path "$RPM_BUILD_ROOT/usr/lib/debug/*.debug" -type f '(' -perm -0100 -or -perm -0010 -or -perm -0001 ')') |
87 | +if [ -z "$filelist" ]; then | |
88 | + # no files, exit | |
89 | + exit 0 | |
90 | +fi | |
91 | + | |
92 | +filetypes=$(echo "$filelist" | xargs -r -d'\n' file) | |
93 | +elflist=$(echo "$filetypes" | awk -F: '/ELF.*, not stripped/ {print $1}') | |
94 | +if [ -z "$elflist" ]; then | |
95 | + # no elf objects, exit | |
96 | + exit 0 | |
97 | +fi | |
98 | + | |
6fc678f5 | 99 | # Strip ELF binaries |
fa78cfd4 | 100 | -for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \ |
101 | - sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p'` | |
102 | -do | |
103 | - dn=$(dirname $f | sed -n -e "s#^$RPM_BUILD_ROOT##p") | |
104 | - bn=$(basename $f .debug).debug | |
105 | - | |
106 | - debugdn="${debugdir}${dn}" | |
107 | - debugfn="${debugdn}/${bn}" | |
108 | - [ -f "${debugfn}" ] && continue | |
109 | +echo "$elflist" | while read f; do | |
110 | + dn=$(dirname "${f#$RPM_BUILD_ROOT}") | |
111 | + bn=$(basename "$f" .debug).debug | |
112 | + | |
113 | + debugdn="$RPM_BUILD_ROOT/usr/lib/debug$dn" | |
114 | + debugfn="$debugdn/$bn" | |
115 | + [ -f "$debugfn" ] && continue | |
8b1ec822 | 116 | |
529784bf | 117 | echo extracting debug info from $f |
2f792da1 ER |
118 | @@ -37,7 +55,7 @@ |
119 | [ -f "$debugfn" ] && continue | |
120 | ||
121 | echo extracting debug info from $f | |
122 | - /usr/lib/rpm/4.5/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" | |
123 | + /usr/lib/rpm/debugedit -b "$RPM_BUILD_DIR" -d /usr/src/debug -l "$SOURCEFILE" "$f" | |
124 | ||
125 | # A binary already copied into /usr/lib/debug doesn't get stripped, | |
126 | # just has its file names collected and adjusted. |