SHA256
3
0
forked from pool/rpm
OBS User unknown 2009-07-29 15:17:28 +00:00 committed by Git OBS Bridge
parent 466a664fb3
commit bd5319d2fe
6 changed files with 75 additions and 13 deletions

14
debuglink.diff Normal file
View File

@ -0,0 +1,14 @@
Index: rpm-4.4.2.3/scripts/find-debuginfo.sh
===================================================================
--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-27 12:06:41.000000000 +0200
+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-27 12:08:05.000000000 +0200
@@ -185,7 +185,8 @@ make_id_link()
get_debugfn()
{
dn=$(dirname "${1#$RPM_BUILD_ROOT}")
- bn=$(basename "$1" .debug).debug
+# Do not strip existing .debug suffixes
+ bn=$(basename "$1").debug
debugdn=${debugdir}${dn}
debugfn=${debugdn}/${bn}

View File

@ -1,7 +1,7 @@
Index: rpm-4.4.2.3/build/files.c
===================================================================
--- rpm-4.4.2.3.orig/build/files.c 2009-07-24 11:38:22.000000000 +0200
+++ rpm-4.4.2.3/build/files.c 2009-07-24 11:38:30.000000000 +0200
--- rpm-4.4.2.3.orig/build/files.c 2009-07-27 17:59:07.000000000 +0200
+++ rpm-4.4.2.3/build/files.c 2009-07-27 18:02:00.000000000 +0200
@@ -28,6 +28,10 @@
#define _RPMTE_INTERNAL
#include "rpmte.h"
@ -159,7 +159,7 @@ Index: rpm-4.4.2.3/build/files.c
if (pkg->fileList == NULL)
continue;
@@ -2508,6 +2638,106 @@ int processBinaryFiles(Spec spec, int in
@@ -2508,6 +2638,116 @@ int processBinaryFiles(Spec spec, int in
if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)))
res = rc;
@ -179,6 +179,7 @@ Index: rpm-4.4.2.3/build/files.c
+ char tmp[1024];
+ const char *name;
+ StringBuf files = NULL;
+ int seen_build_id = 0;
+
+ /* Check if the current package has files with debug info
+ and record them. */
@ -207,7 +208,6 @@ Index: rpm-4.4.2.3/build/files.c
+ files = newStringBuf();
+ appendStringBuf(files, "%defattr(-,root,root)\n");
+ appendStringBuf(files, "%dir /usr/lib/debug\n");
+ appendStringBuf(files, "%dir /usr/lib/debug/.build-id\n");
+ }
+ /* Add the files main debug-info file. */
+ snprintf (tmp, 1024, "/usr/lib/debug/%s.debug\n", base);
@ -223,6 +223,11 @@ Index: rpm-4.4.2.3/build/files.c
+ if (getELFBuildId (name, &build_id, &build_id_size) == -1)
+ continue;
+
+ /* If we see build-id links for the first time add the
+ directory. */
+ if (!seen_build_id)
+ appendStringBuf(files, "%dir /usr/lib/debug/.build-id\n");
+
+ /* From the build-id construct the two links pointing back
+ to the debug information file and the binary. */
+ snprintf (tmp, 1024, "/usr/lib/debug/.build-id/%02x/",
@ -249,6 +254,11 @@ Index: rpm-4.4.2.3/build/files.c
+ snprintf (tmp, 1024, "Debug information for package %s", name);
+ headerAddEntry (dbg->header, RPMTAG_SUMMARY, RPM_STRING_TYPE,
+ tmp, 1);
+ snprintf (tmp, 1024, "This package provides debug information for package %s.\n"
+ "Debug information is useful when developing applications that use this\n"
+ "package or when debugging this package.", name);
+ headerAddEntry (dbg->header, RPMTAG_DESCRIPTION, RPM_STRING_TYPE,
+ tmp, 1);
+ headerAddEntry (dbg->header, RPMTAG_GROUP, RPM_STRING_TYPE,
+ "Development/Debug", 1);
+ /* Inherit other tags from parent. */
@ -268,9 +278,9 @@ Index: rpm-4.4.2.3/build/files.c
}
Index: rpm-4.4.2.3/macros.in
===================================================================
--- rpm-4.4.2.3.orig/macros.in 2009-07-24 11:38:22.000000000 +0200
+++ rpm-4.4.2.3/macros.in 2009-07-24 11:38:22.000000000 +0200
@@ -173,19 +173,6 @@
--- rpm-4.4.2.3.orig/macros.in 2009-07-27 17:59:07.000000000 +0200
+++ rpm-4.4.2.3/macros.in 2009-07-27 17:59:07.000000000 +0200
@@ -173,24 +173,10 @@
# Template for debug information sub-package.
%debug_package \
%global __debug_package 1\
@ -290,10 +300,15 @@ Index: rpm-4.4.2.3/macros.in
%package debugsource\
Summary: Debug sources for package %{name}\
Group: Development/Debug\
AutoReqProv: 0\
-Requires: %{name}-debuginfo = %{version}-%{release}\
%description debugsource\
This package provides debug sources for package %{name}.\
Debug sources are useful when developing applications that use this\
Index: rpm-4.4.2.3/scripts/find-debuginfo.sh
===================================================================
--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-24 11:38:22.000000000 +0200
+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-24 11:38:22.000000000 +0200
--- rpm-4.4.2.3.orig/scripts/find-debuginfo.sh 2009-07-27 17:59:06.000000000 +0200
+++ rpm-4.4.2.3/scripts/find-debuginfo.sh 2009-07-27 17:59:10.000000000 +0200
@@ -274,19 +274,11 @@ while read nlinks inum f; do
fi
done || exit

12
elfflagreqprov.diff Normal file
View File

@ -0,0 +1,12 @@
Index: rpm-4.4.2.3/autodeps/linux.req
===================================================================
--- rpm-4.4.2.3.orig/autodeps/linux.req 2009-07-24 11:38:21.000000000 +0200
+++ rpm-4.4.2.3/autodeps/linux.req 2009-07-27 15:45:17.000000000 +0200
@@ -110,6 +110,7 @@ for f in "${liblist[@]}" "${exelist[@]}"
}
}
/^Version References:$/ { START=2; }
+ /^private flags/ { START=3; }
(START==2) && /required from/ {
sub(/:/, "", $3);
LIBNAME=$3;

View File

@ -24,7 +24,7 @@ License: GPL v2 or later
Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages
Version: 4.4.2.3
Release: 44
Release: 45
Requires: rpm = %{version}
%py_requires
Source99: rpm.spec

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Mon Jul 27 18:02:37 CEST 2009 - rguenther@suse.de
- add description to debuginfo packages
-------------------------------------------------------------------
Mon Jul 27 15:46:36 CEST 2009 - rguenther@suse.de
- do not strip .debug suffix during debug-link generation
- do not add requires based on private ELF flags [bnc#524681]
- remove requires on debuginfo from debugsource package
-------------------------------------------------------------------
Sat Jul 25 12:04:11 CEST 2009 - rguenther@suse.de
- fix debuginfo package generation for binaries without build-id
-------------------------------------------------------------------
Fri Jul 24 11:39:04 CEST 2009 - rguenther@suse.de

View File

@ -27,7 +27,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions
AutoReqProv: on
Summary: The RPM Package Manager
Version: 4.4.2.3
Release: 44
Release: 45
Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
@ -102,6 +102,8 @@ Patch68: disttag-macro.diff
Patch69: buildidprov.diff
Patch70: xz.diff
Patch71: debugsubpkg.diff
Patch72: debuglink.diff
Patch73: elfflagreqprov.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
# avoid bootstrapping problem
@ -188,6 +190,8 @@ rm -f rpmdb/db.h
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 70
%patch71 -p1
%patch72 -p1
%patch73 -p1
chmod 755 scripts/find-supplements{,.ksyms}
chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
chmod 755 scripts/firmware.prov
@ -339,7 +343,7 @@ Summary: A C library for parsing command line parameters
License: LGPL v2.1 or later
Group: System/Libraries
Version: 1.7
Release: 492
Release: 493
# bug437293
%ifarch ppc64
Obsoletes: popt-64bit
@ -367,7 +371,7 @@ Summary: C Library for Parsing Command Line Parameters
License: LGPL v2.1 or later
Group: System/Libraries
Version: 1.7
Release: 492
Release: 493
Requires: popt = 1.7
Requires: glibc-devel
# bug437293