summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2003-01-27 17:45:53 +0000
committerjbj <devnull@localhost>2003-01-27 17:45:53 +0000
commit4cab573997627bc9210a4c345da380a3ba83d2b8 (patch)
tree0f4f85ba81c9dc2e6b1dd7eafb4f5954930432ec
parentc87fa0b0298dda7ae49e3b079a7d464934188fe2 (diff)
downloadlibrpm-tizen-4cab573997627bc9210a4c345da380a3ba83d2b8.tar.gz
librpm-tizen-4cab573997627bc9210a4c345da380a3ba83d2b8.tar.bz2
librpm-tizen-4cab573997627bc9210a4c345da380a3ba83d2b8.zip
- fix: more debugedit.c problems.
CVS patchset: 6029 CVS date: 2003/01/27 17:45:53
-rw-r--r--CHANGES1
-rw-r--r--doc/rpmbuild.82
-rw-r--r--po/cs.po2
-rw-r--r--po/da.po2
-rw-r--r--po/de.po2
-rw-r--r--po/fi.po2
-rw-r--r--po/fr.po2
-rw-r--r--po/gl.po2
-rw-r--r--po/is.po2
-rw-r--r--po/ja.po2
-rw-r--r--po/ko.po2
-rw-r--r--po/no.po2
-rw-r--r--po/pl.po2
-rw-r--r--po/pt.po2
-rw-r--r--po/pt_BR.po2
-rw-r--r--po/ro.po2
-rw-r--r--po/rpm.pot2
-rw-r--r--po/ru.po2
-rw-r--r--po/sk.po2
-rw-r--r--po/sl.po4
-rw-r--r--po/sr.po2
-rw-r--r--po/sv.po2
-rw-r--r--po/tr.po2
-rw-r--r--rpm.spec.in7
-rw-r--r--tools/debugedit.c136
25 files changed, 150 insertions, 40 deletions
diff --git a/CHANGES b/CHANGES
index d4cc159b2..bb824ea8b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -113,6 +113,7 @@
- file conflict checks with colors.
- fix: debugedit.c problem.
- permit anaconda to choose "presentation order".
+ - fix: more debugedit.c problems.
4.0.4 -> 4.1:
- loosely wire beecrypt library into rpm.
diff --git a/doc/rpmbuild.8 b/doc/rpmbuild.8
index cf39d7378..e6aa18d3f 100644
--- a/doc/rpmbuild.8
+++ b/doc/rpmbuild.8
@@ -181,7 +181,7 @@ for configuration details.
When building the package, interpret \fIPLATFORM\fR
as \fBarch-vendor-os\fR and set the macros
\fB%_target\fR,
-\fB%_target_arch\fR, and
+\fB%_target_cpu\fR, and
\fB%_target_os\fR
accordingly.
.SS "REBUILD AND RECOMPILE OPTIONS"
diff --git a/po/cs.po b/po/cs.po
index c97c2bb91..39b971f52 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2001-07-24 10:02+0100\n"
"Last-Translator: Milan Kerslager <kerslage@linux.cz>\n"
"Language-Team: Czech <cs@li.org>\n"
diff --git a/po/da.po b/po/da.po
index cc144f040..a0630dee4 100644
--- a/po/da.po
+++ b/po/da.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2001-04-05 23:03GMT\n"
"Last-Translator: Claus Hindsgaul <claus_h@image.dk>\n"
"Language-Team: Danish <dansk@klid.dk>\n"
diff --git a/po/de.po b/po/de.po
index 523099d96..35eac419e 100644
--- a/po/de.po
+++ b/po/de.po
@@ -37,7 +37,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 1998-08-03 18:02+02:00\n"
"Last-Translator: Karl Eichwalder <ke@SuSE.DE>\n"
"Language-Team: German <de@li.org>\n"
diff --git a/po/fi.po b/po/fi.po
index 76a7324d5..00de6c0b8 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 1998-05-02 21:41:47-0400\n"
"Last-Translator: Raimo Koski <rkoski@pp.weppi.fi>\n"
"Language-Team: Finnish <linux@sot.com>\n"
diff --git a/po/fr.po b/po/fr.po
index 6c29ebf88..d153403f6 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/po/gl.po b/po/gl.po
index 65dbc8071..d3fcf659e 100644
--- a/po/gl.po
+++ b/po/gl.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.1\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2001-01-13 22:31+0100\n"
"Last-Translator: Jesús Bravo Álvarez <jba@pobox.com>\n"
"Language-Team: Galician <trasno@ceu.fi.udc.es>\n"
diff --git a/po/is.po b/po/is.po
index 978955abb..0612f2e6b 100644
--- a/po/is.po
+++ b/po/is.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2001-07-12 13:25+0000\n"
"Last-Translator: Richard Allen <ra@hp.is>\n"
"Language-Team: is <kde-isl@mmedia.is>\n"
diff --git a/po/ja.po b/po/ja.po
index 54c61177f..e6e571843 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 1999-12-01 22:49 +JST\n"
"Last-Translator: Kanda Mitsuru <kanda@nn.iij4u.or.jp>\n"
"Language-Team: JRPM <jrpm@linux.or.jp>\n"
diff --git a/po/ko.po b/po/ko.po
index 1e589aaf0..84099196c 100644
--- a/po/ko.po
+++ b/po/ko.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.4\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2002-03-04 17:17+0900\n"
"Last-Translator: Jong-Hoon Ryu <redhat4u@netian.com>\n"
"Language-Team: GNU Translation project <ko@li.org>\n"
diff --git a/po/no.po b/po/no.po
index 208585e31..22c79b1f0 100644
--- a/po/no.po
+++ b/po/no.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2001-06-27 12:24+0200\n"
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
"Language-Team: Norwegian <no@li.org>\n"
diff --git a/po/pl.po b/po/pl.po
index 01f1f6774..7ed9f0fec 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -8,7 +8,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 1999-05-25 17:00+0100\n"
"Last-Translator: Pawe³ Dziekoñski <pdziekonski@mml.ch.pwr.wroc.pl>\n"
"Language-Team: Polish <pl@li.org>\n"
diff --git a/po/pt.po b/po/pt.po
index c3f2a23e9..10ea0adf8 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2002-02-14 10:51+0000\n"
"Last-Translator: José Nuno Coelho Sanarra Pires <jncp@rnl.ist.utl.pt>\n"
"Language-Team: pt <morais@kde.org\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index 4f369d071..40aca5291 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -4,7 +4,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ISO-8859-1\n"
"Content-Transfer-Encoding: 8-bit\n"
diff --git a/po/ro.po b/po/ro.po
index f386b4679..06a842bd1 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 1999-04-10 12:00+EST\n"
"Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
"Language-Team: Romanian <ro@li.org>\n"
diff --git a/po/rpm.pot b/po/rpm.pot
index ae7034f97..c9c1f5267 100644
--- a/po/rpm.pot
+++ b/po/rpm.pot
@@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
diff --git a/po/ru.po b/po/ru.po
index c7a2c7a1d..4435da455 100644
--- a/po/ru.po
+++ b/po/ru.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2002-08-27 13:36-0400\n"
"Last-Translator: Eugene Kanter, <eugene@blackcatlinux.com>\n"
"Language-Team: Black Cat Linux Team <blackcat-support@blackcatlinux.com>\n"
diff --git a/po/sk.po b/po/sk.po
index 107b408a1..9cec33aea 100644
--- a/po/sk.po
+++ b/po/sk.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 1999-04-08 21:37+02:00\n"
"Last-Translator: Stanislav Meduna <stano@eunet.sk>\n"
"Language-Team: Slovak <sk-i18n@rak.isternet.sk>\n"
diff --git a/po/sl.po b/po/sl.po
index 9a7f5f5e6..a6966771c 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -1,12 +1,12 @@
# -*- mode:po; coding:iso-latin-2; -*- Slovenian messages for Redhat pkg. mngr.
# Copyright (C) 2000 Free Software Foundation, Inc.
# Primo¾ Peterlin <primoz.peterlin@biofiz.mf.uni-lj.si>, 2000.
-# $Id: sl.po,v 1.368 2003/01/25 21:00:01 jbj Exp $
+# $Id: sl.po,v 1.369 2003/01/27 17:46:37 jbj Exp $
#
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2000-10-08 19:05+0200\n"
"Last-Translator: Grega Fajdiga <gregor.fajdiga@telemach.net>\n"
"Language-Team: Slovenian <sl@li.org>\n"
diff --git a/po/sr.po b/po/sr.po
index 22330cf6b..c3cd29436 100644
--- a/po/sr.po
+++ b/po/sr.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=iso-8859-2\n"
"Content-Transfer-Encoding: 8bit\n"
diff --git a/po/sv.po b/po/sv.po
index 429acc84d..77d90abd6 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.1\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2002-08-19 22:26+0200\n"
"Last-Translator: Göran Uddeborg <goeran@uddeborg.pp.se>\n"
"Language-Team: Swedish <sv@li.org>\n"
diff --git a/po/tr.po b/po/tr.po
index 78a17c961..0d77d87a3 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -1,7 +1,7 @@
msgid ""
msgstr ""
"Project-Id-Version: rpm 4.0.3\n"
-"POT-Creation-Date: 2003-01-25 15:52-0500\n"
+"POT-Creation-Date: 2003-01-27 12:37-0500\n"
"PO-Revision-Date: 2001-07-05 08:02+300\n"
"Last-Translator: Nilgun Belma Buguner <nilgun@technologist.com>\n"
"Language-Team: Turkish <tr@li.org>\n"
diff --git a/rpm.spec.in b/rpm.spec.in
index 953ae29f9..a2a40292e 100644
--- a/rpm.spec.in
+++ b/rpm.spec.in
@@ -20,7 +20,7 @@ Name: rpm
%define version @VERSION@
Version: %{version}
%{expand: %%define rpm_version %{version}}
-Release: 0.61
+Release: 0.62
Group: System Environment/Base
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/rpm-%{rpm_version}.tar.gz
Copyright: GPL
@@ -470,7 +470,10 @@ exit 0
%{__includedir}/popt.h
%changelog
-* Wed Jan 22 2003 Jeff Johnson <jbj@redhat.com> 4.2-0.61
+* Mon Jan 27 2003 Jeff Johnson <jbj@redhat.com> 4.2-0.67
+- fix: more debugedit.c problems.
+
+* Sat Jan 25 2003 Jeff Johnson <jbj@redhat.com> 4.2-0.61
- permit anaconda to choose "presentation order".
* Wed Jan 22 2003 Jeff Johnson <jbj@redhat.com> 4.2-0.60
diff --git a/tools/debugedit.c b/tools/debugedit.c
index cea971243..26f4f544a 100644
--- a/tools/debugedit.c
+++ b/tools/debugedit.c
@@ -38,6 +38,8 @@
#include "hashtab.h"
+#define DW_TAG_partial_unit 0x3c
+
char *base_dir = NULL;
char *dest_dir = NULL;
char *list_file = NULL;
@@ -424,6 +426,7 @@ edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase)
unsigned char opcode_base;
uint_32 value, dirt_cnt;
size_t comp_dir_len = strlen (comp_dir);
+ size_t abs_file_cnt = 0, abs_dir_cnt = 0;
if (phase != 0)
return 0;
@@ -509,7 +512,11 @@ edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase)
return 1;
}
if (*file == '/')
- memcpy (s, file, file_len + 1);
+ {
+ memcpy (s, file, file_len + 1);
+ if (dest_dir && has_prefix (file, base_dir))
+ ++abs_file_cnt;
+ }
else if (*dirt[value] == '/')
{
memcpy (s, dirt[value], dir_len);
@@ -556,28 +563,90 @@ edit_dwarf2_line (DSO *dso, uint_32 off, char *comp_dir, int phase)
read_uleb128 (ptr);
read_uleb128 (ptr);
}
+ ++ptr;
if (dest_dir)
{
- ptr = dir;
- while (*ptr != 0)
+ unsigned char *srcptr, *buf = NULL;
+ size_t base_len = strlen (base_dir);
+ size_t dest_len = strlen (dest_dir);
+
+ if (dest_len == base_len)
+ abs_file_cnt = 0;
+ if (abs_file_cnt)
+ {
+ srcptr = buf = malloc (ptr - dir);
+ memcpy (srcptr, dir, ptr - dir);
+ ptr = dir;
+ }
+ else
+ ptr = srcptr = dir;
+ while (*srcptr != 0)
{
- if (*ptr == '/' && has_prefix (ptr, base_dir))
+ size_t len = strlen (srcptr) + 1;
+
+ if (*srcptr == '/' && has_prefix (srcptr, base_dir))
{
- size_t base_len = strlen (base_dir);
- size_t dest_len = strlen (dest_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;
+ }
+ 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 (abs_dir_cnt + abs_file_cnt != 0)
+ {
+ size_t len = (abs_dir_cnt + abs_file_cnt) * (base_len - dest_len);
+ if (len == 1)
+ error (EXIT_FAILURE, 0, "-b arg has to be either the same length as -d arg, or more than 1 char shorter");
+ memset (ptr, 'X', len - 1);
+ ptr += len - 1;
+ *ptr++ = '\0';
+ }
+ *ptr++ = '\0';
+ ++srcptr;
+
+ while (*srcptr != 0)
+ {
+ size_t len = strlen (srcptr) + 1;
+
+ if (*srcptr == '/' && has_prefix (srcptr, base_dir))
+ {
memcpy (ptr, dest_dir, dest_len);
if (dest_len < base_len)
{
- memmove (ptr + dest_len, ptr + base_len,
- strlen (dir + base_len) + 1);
+ memmove (ptr + dest_len, srcptr + base_len,
+ len - base_len);
+ ptr += dest_len - base_len;
}
elf_flagdata (debug_sections[DEBUG_STR].elf_data,
ELF_C_SET, ELF_F_DIRTY);
}
- ptr = strchr (ptr, 0) + 1;
+ else if (ptr != srcptr)
+ memmove (ptr, srcptr, len);
+ srcptr += len;
+ ptr += len;
+ dir = srcptr;
+ read_uleb128 (srcptr);
+ read_uleb128 (srcptr);
+ read_uleb128 (srcptr);
+ if (ptr != dir)
+ memmove (ptr, dir, srcptr - dir);
+ ptr += srcptr - dir;
}
+ *ptr = '\0';
+ free (buf);
}
return 0;
}
@@ -613,13 +682,14 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
}
}
- if (debug_sections[DEBUG_STR].data &&
- t->attr[i].attr == DW_AT_comp_dir &&
- form == DW_FORM_strp)
+ if (t->attr[i].attr == DW_AT_comp_dir &&
+ form == DW_FORM_strp &&
+ debug_sections[DEBUG_STR].data)
{
char *dir;
dir = debug_sections[DEBUG_STR].data + do_read_32 (ptr);
+ free (comp_dir);
comp_dir = strdup (dir);
if (phase == 1 && dest_dir && has_prefix (dir, base_dir))
@@ -637,7 +707,45 @@ edit_attributes (DSO *dso, unsigned char *ptr, struct abbrev_tag *t, int phase)
ELF_C_SET, ELF_F_DIRTY);
}
}
-
+ else if ((t->tag == DW_TAG_compile_unit
+ || t->tag == DW_TAG_partial_unit)
+ && t->attr[i].attr == DW_AT_name
+ && form == DW_FORM_strp
+ && debug_sections[DEBUG_STR].data)
+ {
+ char *name;
+
+ name = debug_sections[DEBUG_STR].data + do_read_32 (ptr);
+ if (*name == '/' && comp_dir == NULL)
+ {
+ char *enddir = strrchr (name, '/');
+
+ if (enddir != name)
+ {
+ comp_dir = malloc (enddir - name + 1);
+ memcpy (comp_dir, name, enddir - name);
+ comp_dir [enddir - name] = '\0';
+ }
+ else
+ comp_dir = strdup ("/");
+ }
+
+ if (phase == 1 && dest_dir && has_prefix (name, base_dir))
+ {
+ base_len = strlen (base_dir);
+ dest_len = strlen (dest_dir);
+
+ memcpy (name, dest_dir, dest_len);
+ if (dest_len < base_len)
+ {
+ memmove (name + dest_len, name + base_len,
+ strlen (name + base_len) + 1);
+ }
+ elf_flagdata (debug_sections[DEBUG_STR].elf_data,
+ ELF_C_SET, ELF_F_DIRTY);
+ }
+ }
+
switch (form)
{
case DW_FORM_addr:
@@ -1115,5 +1223,3 @@ main (int argc, char *argv[])
return 0;
}
-
-