Fix up debuginfo for various issues - inc. libc-client debuginfo (#205339)
This commit is contained in:
parent
7cfadd96d3
commit
090344880c
117
rpm-4.4.2-debugpaths.patch
Normal file
117
rpm-4.4.2-debugpaths.patch
Normal file
@ -0,0 +1,117 @@
|
||||
--- rpm-4.4.2/scripts/find-debuginfo.sh.dbgpaths 2005-07-14 16:52:31.000000000 +0100
|
||||
+++ rpm-4.4.2/scripts/find-debuginfo.sh 2006-09-07 11:27:08.000000000 +0100
|
||||
@@ -13,6 +13,11 @@
|
||||
|
||||
echo -n > $SOURCEFILE
|
||||
|
||||
+strip_to_debug()
|
||||
+{
|
||||
+ eu-strip --remove-comment -f "$1" "$2" || :
|
||||
+}
|
||||
+
|
||||
# Strip ELF binaries
|
||||
for f in `find $RPM_BUILD_ROOT ! -path "${debugdir}/*.debug" -type f \( -perm -0100 -or -perm -0010 -or -perm -0001 \) -exec file {} \; | \
|
||||
sed -n -e 's/^\(.*\):[ ]*.*ELF.*, not stripped/\1/p'`
|
||||
@@ -35,16 +40,16 @@
|
||||
|
||||
mkdir -p "${debugdn}"
|
||||
if test -w "$f"; then
|
||||
- eu-strip -f "${debugfn}" "$f" || :
|
||||
+ strip_to_debug "${debugfn}" "$f"
|
||||
else
|
||||
chmod u+w "$f"
|
||||
- eu-strip -f "${debugfn}" "$f" || :
|
||||
+ strip_to_debug "${debugfn}" "$f"
|
||||
chmod u-w "$f"
|
||||
fi
|
||||
done
|
||||
|
||||
mkdir -p ${RPM_BUILD_ROOT}/usr/src/debug
|
||||
-cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0m ${RPM_BUILD_ROOT}/usr/src/debug)
|
||||
+cat $SOURCEFILE | (cd $RPM_BUILD_DIR; LANG=C sort -z -u | cpio -pd0mL ${RPM_BUILD_ROOT}/usr/src/debug)
|
||||
# stupid cpio creates new directories in mode 0700, fixup
|
||||
find ${RPM_BUILD_ROOT}/usr/src/debug -type d -print0 | xargs -0 chmod a+rx
|
||||
|
||||
--- rpm-4.4.2/tools/debugedit.c.dbgpaths 2006-09-07 11:21:33.000000000 +0100
|
||||
+++ rpm-4.4.2/tools/debugedit.c 2006-09-07 11:26:56.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-/* Copyright (C) 2001, 2002, 2003 Red Hat, Inc.
|
||||
+/* Copyright (C) 2001, 2002, 2003, 2005 Red Hat, Inc.
|
||||
Written by Alexander Larsson <alexl@redhat.com>, 2002
|
||||
Based on code by Jakub Jelinek <jakub@redhat.com>, 2001.
|
||||
|
||||
@@ -343,13 +343,11 @@
|
||||
#define IS_DIR_SEPARATOR(c) ((c)=='/')
|
||||
|
||||
static char *
|
||||
-canonicalize_path (char *s, char *d)
|
||||
+canonicalize_path (const char *s, char *d)
|
||||
{
|
||||
char *rv = d;
|
||||
- char *sroot, *droot;
|
||||
-
|
||||
- if (d == 0)
|
||||
- rv = d = s;
|
||||
+ const char *sroot;
|
||||
+ char *droot;
|
||||
|
||||
if (IS_DIR_SEPARATOR (*s))
|
||||
{
|
||||
@@ -600,6 +598,7 @@
|
||||
unsigned char *srcptr, *buf = NULL;
|
||||
size_t base_len = strlen (base_dir);
|
||||
size_t dest_len = strlen (dest_dir);
|
||||
+ size_t shrank = 0;
|
||||
|
||||
if (dest_len == base_len)
|
||||
abs_file_cnt = 0;
|
||||
@@ -611,27 +610,40 @@
|
||||
}
|
||||
else
|
||||
ptr = srcptr = dir;
|
||||
+ unsigned char *srcstart=srcptr;
|
||||
while (*srcptr != 0)
|
||||
{
|
||||
size_t len = strlen (srcptr) + 1;
|
||||
+ const unsigned char *readptr = srcptr;
|
||||
|
||||
if (*srcptr == '/' && has_prefix (srcptr, base_dir))
|
||||
{
|
||||
- memcpy (ptr, dest_dir, dest_len);
|
||||
if (dest_len < base_len)
|
||||
- {
|
||||
- memmove (ptr + dest_len, srcptr + base_len,
|
||||
- len - base_len);
|
||||
- ptr += dest_len - base_len;
|
||||
++abs_dir_cnt;
|
||||
+ memcpy (ptr, dest_dir, dest_len);
|
||||
+ ptr += dest_len;
|
||||
+ readptr += base_len;
|
||||
}
|
||||
+ srcptr += len;
|
||||
+
|
||||
+ shrank += srcptr - readptr;
|
||||
+ canonicalize_path (readptr, ptr);
|
||||
+ len = strlen (ptr) + 1;
|
||||
+ shrank -= len;
|
||||
+ ptr += len;
|
||||
+
|
||||
elf_flagdata (debug_sections[DEBUG_STR].elf_data,
|
||||
ELF_C_SET, ELF_F_DIRTY);
|
||||
}
|
||||
- else if (ptr != srcptr)
|
||||
- memmove (ptr, srcptr, len);
|
||||
- srcptr += len;
|
||||
- ptr += len;
|
||||
+
|
||||
+ if (shrank > 0)
|
||||
+ {
|
||||
+ if (--shrank == 0)
|
||||
+ error (EXIT_FAILURE, 0,
|
||||
+ "canonicalization unexpectedly shrank by one character");
|
||||
+ memset (ptr, 'X', shrank);
|
||||
+ ptr += shrank;
|
||||
+ *ptr++ = '\0';
|
||||
}
|
||||
|
||||
if (abs_dir_cnt + abs_file_cnt != 0)
|
7
rpm.spec
7
rpm.spec
@ -20,7 +20,7 @@ Name: rpm
|
||||
%define version 4.4.2
|
||||
Version: %{version}
|
||||
%{expand: %%define rpm_version %{version}}
|
||||
Release: 31
|
||||
Release: 32
|
||||
Group: System Environment/Base
|
||||
Source: ftp://wraptastic.org/pub/rpm-4.4.x/rpm-%{rpm_version}.tar.gz
|
||||
Source1: mono-find-provides
|
||||
@ -57,6 +57,7 @@ Patch28: rpm-4.4.2-python-aslist.patch
|
||||
Patch29: rpm-4.4.2-rpmio-ipv6.patch
|
||||
Patch30: rpm-4.4.2-gnuhash.patch
|
||||
Patch31: rpm-4.4.2-debugedit-ppc-reloc.patch
|
||||
Patch32: rpm-4.4.2-debugpaths.patch
|
||||
License: GPL
|
||||
Conflicts: patch < 2.5
|
||||
%ifos linux
|
||||
@ -201,6 +202,7 @@ shell-like rules.
|
||||
%patch29 -p1 -b .ipv6
|
||||
%patch30 -p1 -b .gnuhash
|
||||
%patch31 -p0 -b .dbgppc
|
||||
%patch32 -p1 -b .dbgpaths
|
||||
|
||||
# rebuild configure for ipv6
|
||||
autoconf
|
||||
@ -597,6 +599,9 @@ exit 0
|
||||
%{__includedir}/popt.h
|
||||
|
||||
%changelog
|
||||
* Thu Sep 07 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-32
|
||||
- Various debuginfo fixes (#165434, #165418, #149113, #205339)
|
||||
|
||||
* Fri Jul 21 2006 Paul Nasrat <pnasrat@redhat.com> - 4.4.2-31
|
||||
- Apply matchpathcon patch
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user