OBS User unknown 2009-02-19 21:19:42 +00:00 committed by Git OBS Bridge
parent 1f3c5a0bbc
commit 4a08a332bf
5 changed files with 185 additions and 5 deletions

75
buildidprov.diff Normal file
View File

@ -0,0 +1,75 @@
From: Jan Blunck <jblunck@suse.de>
Subject: Let debuginfo packages provide the build-id
This patch let debuginfo packages provide build-id like follows:
debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517
Users can therefore ask zypper to install the correct debuginfo package with:
zypper install -C "debuginfo(build-id) = c63cb23876c5fa85f36beaff58f8557e1bf22517"
Signed-off-by: Jan Blunck <jblunck@suse.de>
---
autodeps/linux.prov | 8 ++++++++
macros.in | 3 ++-
scripts/debuginfo.prov | 12 ++++++++++++
3 files changed, 22 insertions(+), 1 deletion(-)
Index: autodeps/linux.prov
===================================================================
--- autodeps/linux.prov.orig
+++ autodeps/linux.prov
@@ -5,6 +5,9 @@
IFS=$'\n'
filelist=($(cat))
+debuginfolist=($(printf "%s\n" "${filelist[@]}" | grep "/usr/lib/debug/"))
+filelist=($(printf "%s\n" "${filelist[@]}" | grep -v "/usr/lib/debug/"))
+
solist=($(printf "%s\n" "${filelist[@]}" | grep "\\.so" | grep -v "^/lib/ld.so" | \
tr '\n' '\0' | xargs -0 -r file -L | grep "ELF.*shared object" | \
cut -d: -f1))
@@ -71,6 +74,11 @@ done | sort -u
printf "%s\n" "${firmwarelist[@]}" | /usr/lib/rpm/firmware.prov | sort -u
#
+# --- debuginfo files
+[ -x /usr/lib/rpm/debuginfo.prov -a -n "$debuginfolist" ] &&
+ printf "%s\n" "${debuginfolist[@]}" | /usr/lib/rpm/debuginfo.prov | sort -u
+
+#
# --- Mono exes/dlls
: ${MONO_PREFIX=/usr}
if [ -x $MONO_PREFIX/bin/mono -a -n "$monolist" ] ; then
Index: macros.in
===================================================================
--- macros.in.orig
+++ macros.in
@@ -175,7 +175,8 @@
%package debuginfo\
Summary: Debug information for package %{name}\
Group: Development/Debug\
-AutoReqProv: 0\
+AutoReq: 0\
+AutoProv: 1\
#Requires: %{?!debug_package_requires:%{name} = %{version}-%{release}}%{?debug_package_requires}\
%description debuginfo\
This package provides debug information for package %{name}.\
Index: scripts/debuginfo.prov
===================================================================
--- /dev/null
+++ scripts/debuginfo.prov
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+while read instfile ; do
+ case $instfile in
+ */usr/lib/debug/.build-id/*.debug)
+ if [ -f "$instfile" ] ; then
+ BUILDID=$(echo $instfile | sed -ne 's|.*/usr/lib/debug/.build-id/\([0-9a-f]*\)/\([0-9a-f]*\)\.debug|\1\2|p')
+ echo "debuginfo(build-id) = $BUILDID"
+ fi
+ ;;
+ esac
+done

View File

@ -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: 34 Release: 36
Requires: rpm = %{version} Requires: rpm = %{version}
%py_requires %py_requires
Source99: rpm.spec Source99: rpm.spec

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Feb 19 11:05:37 CET 2009 - schwab@suse.de
- Add support for xz compressed sources.
-------------------------------------------------------------------
Wed Feb 18 11:04:35 CET 2009 - jblunck@suse.de
- Add debuginfo.prov helper script for build-id provides.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Feb 16 17:10:31 CET 2009 - ro@suse.de Mon Feb 16 17:10:31 CET 2009 - ro@suse.de

View File

@ -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: 34 Release: 36
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
@ -99,6 +99,8 @@ Patch65: specfilemacro.diff
Patch66: rpm-filelist-bufferoverflow.diff Patch66: rpm-filelist-bufferoverflow.diff
Patch67: modalias-encode.diff Patch67: modalias-encode.diff
Patch68: disttag-macro.diff Patch68: disttag-macro.diff
Patch69: buildidprov.diff
Patch70: xz.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
# #
# avoid bootstrapping problem # avoid bootstrapping problem
@ -182,10 +184,12 @@ rm -f rpmdb/db.h
%patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39 %patch -P 30 -P 31 -P 32 -P 33 -P 34 -P 35 -P 36 -P 37 -P 38 -P 39
%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49 %patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59 %patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 %patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
%patch -P 70
chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-supplements{,.ksyms}
chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
chmod 755 scripts/firmware.prov chmod 755 scripts/firmware.prov
chmod 755 scripts/debuginfo.prov
tar -xjvf %{SOURCE1} tar -xjvf %{SOURCE1}
tar -xjvf %{SOURCE2} tar -xjvf %{SOURCE2}
if [ -s /etc/rpm/suse_macros ]; then if [ -s /etc/rpm/suse_macros ]; then
@ -248,6 +252,7 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm
install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm
install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm
install -m 755 scripts/firmware.prov $RPM_BUILD_ROOT/usr/lib/rpm install -m 755 scripts/firmware.prov $RPM_BUILD_ROOT/usr/lib/rpm
install -m 755 scripts/debuginfo.prov $RPM_BUILD_ROOT/usr/lib/rpm
rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc
mkdir -p $RPM_BUILD_ROOT/etc/rpm mkdir -p $RPM_BUILD_ROOT/etc/rpm
chmod 755 $RPM_BUILD_ROOT/etc/rpm chmod 755 $RPM_BUILD_ROOT/etc/rpm
@ -332,7 +337,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: 482 Release: 484
# bug437293 # bug437293
%ifarch ppc64 %ifarch ppc64
Obsoletes: popt-64bit Obsoletes: popt-64bit
@ -360,7 +365,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: 482 Release: 484
Requires: popt = 1.7 Requires: popt = 1.7
Requires: glibc-devel Requires: glibc-devel
# bug437293 # bug437293
@ -400,6 +405,10 @@ Authors:
%doc %{_mandir}/man3/popt.3* %doc %{_mandir}/man3/popt.3*
%changelog %changelog
* Thu Feb 19 2009 schwab@suse.de
- Add support for xz compressed sources.
* Wed Feb 18 2009 jblunck@suse.de
- Add debuginfo.prov helper script for build-id provides.
* Mon Feb 16 2009 ro@suse.de * Mon Feb 16 2009 ro@suse.de
- fix sort call in finddebuginfo again - fix sort call in finddebuginfo again
* Wed Feb 11 2009 coolo@suse.de * Wed Feb 11 2009 coolo@suse.de

86
xz.diff Normal file
View File

@ -0,0 +1,86 @@
---
build/parsePrep.c | 3 +++
configure.ac | 1 +
macros.in | 1 +
rpmio/macro.c | 8 ++++++++
rpmio/rpmmacro.h | 3 ++-
5 files changed, 15 insertions(+), 1 deletion(-)
Index: build/parsePrep.c
===================================================================
--- build/parsePrep.c.orig 2008-04-01 09:28:21.000000000 +0200
+++ build/parsePrep.c 2009-02-19 10:49:23.000000000 +0100
@@ -258,6 +258,9 @@ static char *doPatch(Spec spec, int c, i
case COMPRESSED_LZMA:
t = "%{__lzma} -dc";
break;
+ case COMPRESSED_XZ:
+ t = "%{__xz} -dc";
+ break;
}
zipper = rpmGetPath(t, NULL);
buf[0] = '\0';
Index: configure.ac
===================================================================
--- configure.ac.orig 2009-02-19 10:43:13.000000000 +0100
+++ configure.ac 2009-02-19 10:50:25.000000000 +0100
@@ -247,6 +247,7 @@ AC_SUBST(__ID_U)
AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
AC_PATH_PROG(__LZMA, lzma, /usr/bin/lzma, $MYPATH)
+AC_PATH_PROG(__XZ, xz, /usr/bin/xz, $MYPATH)
AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH)
AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH)
Index: macros.in
===================================================================
--- macros.in.orig 2009-02-19 10:43:13.000000000 +0100
+++ macros.in 2009-02-19 10:51:05.000000000 +0100
@@ -49,6 +49,7 @@
%__install @__INSTALL@
%__ln_s @LN_S@
%__lzma @__LZMA@
+%__xz @__XZ@
%__make @__MAKE@
%__mkdir @__MKDIR@
%__mkdir_p @MKDIR_P@
Index: rpmio/macro.c
===================================================================
--- rpmio/macro.c.orig 2008-04-01 09:29:13.000000000 +0200
+++ rpmio/macro.c 2009-02-19 10:47:57.000000000 +0100
@@ -1184,6 +1184,9 @@ doFoo(MacroBuf mb, int negate, const cha
case COMPRESSED_LZMA:
sprintf(be, "%%_lzma -dc %s", b);
break;
+ case COMPRESSED_XZ:
+ sprintf(be, "%%_xz -dc %s", b);
+ break;
}
b = be;
} else if (STREQ("S", f, fn)) {
@@ -2120,6 +2123,11 @@ int isCompressed(const char * file, rpmC
(magic[4] == 0x41) && (magic[5] == 0x00)) {
/* new style lzma with magic */
*compressed = COMPRESSED_LZMA;
+ } else if ((magic[0] == 0xfd) && (magic[1] == 0x37) &&
+ (magic[2] == 0x7a) && (magic[3] == 0x58) &&
+ (magic[4] == 0x5a) && (magic[5] == 0x00)) {
+ /* xz */
+ *compressed = COMPRESSED_XZ;
} else if (((magic[0] == 0037) && (magic[1] == 0213)) || /* gzip */
((magic[0] == 0037) && (magic[1] == 0236)) || /* old gzip */
((magic[0] == 0037) && (magic[1] == 0036)) || /* pack */
Index: rpmio/rpmmacro.h
===================================================================
--- rpmio/rpmmacro.h.orig 2008-04-01 09:28:22.000000000 +0200
+++ rpmio/rpmmacro.h 2009-02-19 10:48:39.000000000 +0100
@@ -176,7 +176,8 @@ typedef enum rpmCompressedMagic_e {
COMPRESSED_OTHER = 1, /*!< gzip can handle */
COMPRESSED_BZIP2 = 2, /*!< bzip2 can handle */
COMPRESSED_ZIP = 3, /*!< unzip can handle */
- COMPRESSED_LZMA = 4 /*!< lzma can handle */
+ COMPRESSED_LZMA = 4, /*!< lzma can handle */
+ COMPRESSED_XZ = 5 /*!< xz can handle */
} rpmCompressedMagic;
/**