From 77a19250592d2411bee49379d04adbd22df7b5845a6ee7ca096ba9b8aeb5719e Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 29 Jul 2009 15:17:28 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=83 --- debuglink.diff | 14 ++++++++++++++ debugsubpkg.diff | 33 ++++++++++++++++++++++++--------- elfflagreqprov.diff | 12 ++++++++++++ rpm-python.spec | 2 +- rpm.changes | 17 +++++++++++++++++ rpm.spec | 10 +++++++--- 6 files changed, 75 insertions(+), 13 deletions(-) create mode 100644 debuglink.diff create mode 100644 elfflagreqprov.diff diff --git a/debuglink.diff b/debuglink.diff new file mode 100644 index 0000000..7b5ee79 --- /dev/null +++ b/debuglink.diff @@ -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} diff --git a/debugsubpkg.diff b/debugsubpkg.diff index dfa4cc5..bddebd4 100644 --- a/debugsubpkg.diff +++ b/debugsubpkg.diff @@ -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 diff --git a/elfflagreqprov.diff b/elfflagreqprov.diff new file mode 100644 index 0000000..b815a78 --- /dev/null +++ b/elfflagreqprov.diff @@ -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; diff --git a/rpm-python.spec b/rpm-python.spec index 90cf644..964a2e9 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -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 diff --git a/rpm.changes b/rpm.changes index f3a5499..017efe1 100644 --- a/rpm.changes +++ b/rpm.changes @@ -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 diff --git a/rpm.spec b/rpm.spec index 17cfeea..09cecd5 100644 --- a/rpm.spec +++ b/rpm.spec @@ -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