diff --git a/debugedit-canon-fix.diff b/debugedit-canon-fix.diff index c383010..2bc7a42 100644 --- a/debugedit-canon-fix.diff +++ b/debugedit-canon-fix.diff @@ -4,13 +4,22 @@ This patch fixes multiple problems with path canonicalization in debugedit. This version of debugedit is taken from the dwarftools repository. --- - tools/debugedit.c | 165 ++++++++++++++++++++++++++---------------------------- - 1 file changed, 82 insertions(+), 83 deletions(-) + tools/debugedit.c | 168 ++++++++++++++++++++++++++---------------------------- + 1 file changed, 82 insertions(+), 86 deletions(-) Index: tools/debugedit.c =================================================================== --- tools/debugedit.c.orig +++ tools/debugedit.c +@@ -157,7 +157,7 @@ strptr (DSO *dso, int sec, off_t offset) + { + if (data->d_buf + && offset >= data->d_off +- && offset < data->d_off + data->d_size) ++ && offset < data->d_off + (off_t)data->d_size) + return (const char *) data->d_buf + (offset - data->d_off); + } + } @@ -471,13 +471,13 @@ has_prefix (const char *str, { int str_len; @@ -158,11 +167,11 @@ Index: tools/debugedit.c + canonicalize_path (readptr, (char *)ptr); + len = strlen ((char *)ptr); + -+/* ++#ifdef DEBUG + if ((srcptr - readptr) > len) + error(0, 0,"canonicalization unexpectedly shrank (%lu): \"%s\"\n", + (long unsigned int)(srcptr - readptr) - len, ptr); -+*/ ++#endif + shrank -= len; ptr += len; @@ -198,7 +207,7 @@ Index: tools/debugedit.c *ptr++ = '\0'; ++srcptr; -@@ -741,21 +736,30 @@ edit_dwarf2_line (DSO *dso, uint_32 off, +@@ -741,21 +736,26 @@ edit_dwarf2_line (DSO *dso, uint_32 off, elf_flagdata (debug_sections[DEBUG_STR].elf_data, ELF_C_SET, ELF_F_DIRTY); } @@ -222,18 +231,14 @@ Index: tools/debugedit.c free (buf); } + -+ /* move the line number program */ + ptr++; -+ if (ptr != endprol) -+ memmove(ptr, endprol, endcu - endprol); -+ -+ /* fill the rest of the section with a NOP opcode */ -+ ptr += endcu - endprol; -+ memset(ptr, opcode_base - line_base, endcu - ptr); ++ /* fill the rest until the line number program starts with NOP opcode */ ++ memset(ptr, opcode_base - line_base, endprol - ptr); ++ /* don't touch the line number program */ return 0; } -@@ -767,17 +771,13 @@ edit_attributes (DSO *dso, unsigned char +@@ -767,17 +767,13 @@ edit_attributes (DSO *dso, unsigned char int i; uint_32 list_offs; int found_list_offs; @@ -242,7 +247,7 @@ Index: tools/debugedit.c - comp_dir = NULL; - list_offs = 0; - found_list_offs = 0; -+ char *comp_dir; ++ char *comp_dir = NULL; + for (i = 0; i < t->nattr; ++i) { @@ -253,7 +258,7 @@ Index: tools/debugedit.c while (1) { -@@ -791,56 +791,55 @@ edit_attributes (DSO *dso, unsigned char +@@ -791,56 +787,55 @@ edit_attributes (DSO *dso, unsigned char } if (t->attr[i].attr == DW_AT_comp_dir) @@ -332,7 +337,7 @@ Index: tools/debugedit.c else if ((t->tag == DW_TAG_compile_unit || t->tag == DW_TAG_partial_unit) && t->attr[i].attr == DW_AT_name -@@ -848,9 +847,9 @@ edit_attributes (DSO *dso, unsigned char +@@ -848,9 +843,9 @@ edit_attributes (DSO *dso, unsigned char && debug_sections[DEBUG_STR].data) { char *name; @@ -345,7 +350,7 @@ Index: tools/debugedit.c if (*name == '/' && comp_dir == NULL) { char *enddir = strrchr (name, '/'); -@@ -869,7 +868,7 @@ edit_attributes (DSO *dso, unsigned char +@@ -869,7 +864,7 @@ edit_attributes (DSO *dso, unsigned char { base_len = strlen (base_dir); dest_len = strlen (dest_dir); @@ -354,7 +359,7 @@ Index: tools/debugedit.c memcpy (name, dest_dir, dest_len); if (dest_len < base_len) { -@@ -913,7 +912,7 @@ edit_attributes (DSO *dso, unsigned char +@@ -913,7 +908,7 @@ edit_attributes (DSO *dso, unsigned char ptr += 4; break; case DW_FORM_string: @@ -363,3 +368,17 @@ Index: tools/debugedit.c break; case DW_FORM_indirect: form = read_uleb128 (ptr); +@@ -1470,10 +1465,11 @@ handle_build_id (DSO *dso, Elf_Data *bui + const unsigned char * id = build_id->d_buf + build_id_offset; + char hex[build_id_size * 2 + 1]; + int n = snprintf (hex, 3, "%02" PRIx8, id[0]); ++ size_t size; + assert (n == 2); +- for (i = 1; i < build_id_size; ++i) ++ for (size = 1; size < build_id_size; ++size) + { +- n = snprintf (&hex[i * 2], 3, "%02" PRIx8, id[i]); ++ n = snprintf (&hex[size * 2], 3, "%02" PRIx8, id[size]); + assert (n == 2); + } + puts (hex); diff --git a/fingerprint.diff b/fingerprint.diff new file mode 100644 index 0000000..bf877d4 --- /dev/null +++ b/fingerprint.diff @@ -0,0 +1,24 @@ +--- rpmio/rpmpgp.c.orig 2008-10-28 16:14:18.000000000 +0000 ++++ rpmio/rpmpgp.c 2008-10-28 16:09:51.000000000 +0000 +@@ -876,6 +876,7 @@ + const uint8_t *se, *h; + DIGEST_CTX ctx; + int rc = -1; /* assume failure. */ ++ byte in[3]; + + if (!(val & 0x80)) + return rc; +@@ -926,7 +927,12 @@ + } + + ctx = rpmDigestInit(PGPHASHALGO_SHA1, RPMDIGEST_NONE); +- (void) rpmDigestUpdate(ctx, pkt, (se-pkt)); ++ i = se - h; ++ in[0] = 0x99; ++ in[1] = i >> 8; ++ in[2] = i; ++ (void) rpmDigestUpdate(ctx, in, 3); ++ (void) rpmDigestUpdate(ctx, h, i); + (void) rpmDigestFinal(ctx, (void **)&d, &dlen, 0); + + memmove(keyid, (d + (dlen-8)), 8); diff --git a/rpm-python.spec b/rpm-python.spec index 5da3543..e79e0a9 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: 9 +Release: 10 Requires: rpm = %{version} %py_requires Source99: rpm.spec diff --git a/rpm-suse_macros b/rpm-suse_macros index 1a589f3..3aea0fb 100644 --- a/rpm-suse_macros +++ b/rpm-suse_macros @@ -40,13 +40,6 @@ rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \ %nil -# macro: %suse_update_desktop_file -# Used to add easily a category to .desktop files according to XDG -# standard. -%suse_update_desktop_file(cinrtud:D:N:C:G:) \ - /usr/lib/rpm/suse_update_desktop_file.sh %{**} || exit 1 \ - %nil - # macro: %restart_on_update() # Used to restart a service in postun section, if we are # not running from YaST2 in instsys on update. diff --git a/rpm.changes b/rpm.changes index af73afd..9c097c6 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Oct 31 18:59:25 CET 2008 - coolo@suse.de + +- moved suse_update_desktop_files to package update_desktop_files + +------------------------------------------------------------------- +Tue Oct 28 19:07:02 CET 2008 - jblunck@suse.de + +- debugedit: Don't emit NOPs at the end of the line number program but at the + beginning (bnc #433182 again) +- debugedit: Fix an uninitialized variable use that lead to segfaults from + time to time + +------------------------------------------------------------------- +Tue Oct 28 17:18:03 CET 2008 - mls@suse.de + +- fix fingerprint computation for gpg checksums + ------------------------------------------------------------------- Tue Oct 21 11:22:22 CEST 2008 - jblunck@suse.de diff --git a/rpm.spec b/rpm.spec index c6f708f..d4a9a42 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: 9 +Release: 10 Source: rpm-%{version}.tar.bz2 Source1: RPM-HOWTO.tar.bz2 Source2: RPM-Tips.html.tar.bz2 @@ -92,6 +92,7 @@ Patch58: remove-brp-strips.diff Patch59: requires-ge-macro.diff Patch60: mimetype.diff Patch61: debugedit-canon-fix.diff +Patch62: fingerprint.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # # avoid bootstrapping problem @@ -175,7 +176,7 @@ 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 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 60 -P 61 +%patch -P 60 -P 61 -P 62 chmod 755 scripts/find-supplements{,.ksyms} chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms tar -xjvf %{SOURCE1} @@ -323,7 +324,7 @@ Summary: A C library for parsing command line parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 457 +Release: 458 # %description -n popt @@ -346,7 +347,7 @@ Summary: C Library for Parsing Command Line Parameters License: LGPL v2.1 or later Group: System/Libraries Version: 1.7 -Release: 457 +Release: 458 Requires: popt = 1.7 Requires: glibc-devel @@ -381,6 +382,15 @@ Authors: %doc %{_mandir}/man3/popt.3* %changelog +* Fri Oct 31 2008 coolo@suse.de +- moved suse_update_desktop_files to package update_desktop_files +* Tue Oct 28 2008 jblunck@suse.de +- debugedit: Don't emit NOPs at the end of the line number program but at the + beginning (bnc #433182 again) +- debugedit: Fix an uninitialized variable use that lead to segfaults from + time to time +* Tue Oct 28 2008 mls@suse.de +- fix fingerprint computation for gpg checksums * Tue Oct 21 2008 jblunck@suse.de - debugedit: Fix debuginfo problems introduced by last patch (bnc #433182) * Mon Oct 20 2008 mls@suse.de @@ -429,7 +439,7 @@ Authors: * Fri May 02 2008 dmueller@suse.de - add at least one supplements prefering the right kernel flavour if no modalias could be generated (bnc#384084) -* Fri May 02 2008 agruen@suse.de +* Thu May 01 2008 agruen@suse.de - For kernel modules, require "kernel(flavor:symset) = version" instead of "kernel(symset) = version". This disambiguates the case where several kernel flavors end up with the same @@ -593,7 +603,7 @@ Authors: %%kernel_module_package_buildreq, %%kernel_module_package, and inside %%kernel_module_package, the macros %%flavors_to_build and %%kernel_source. -* Thu Oct 19 2006 mls@suse.de +* Wed Oct 18 2006 mls@suse.de - split up jumbo patch in 78 small patches - fix lua directory handling [#201518] - add /etc/rpm directory to filelist [#208762] @@ -715,7 +725,7 @@ Authors: * Tue Jan 31 2006 agruen@suse.de - rpm-suse-kernel-module-subpackage: Add version to additional Provides tag. We may need this for future Obsoletes. -* Sat Jan 28 2006 mls@suse.de +* Fri Jan 27 2006 mls@suse.de - added support for EssentialFor and Supports - enabled support for lua scripts * Fri Jan 27 2006 agruen@suse.de @@ -741,7 +751,7 @@ Authors: - don't ignore getcwd return value in build.c * Mon Dec 19 2005 mls@suse.de - fix find-lang.sh script -* Mon Dec 19 2005 mls@suse.de +* Sun Dec 18 2005 mls@suse.de - fix find-debuginfo script * Sun Dec 18 2005 mls@suse.de - don't assume root:root defattr @@ -792,7 +802,7 @@ Authors: - Fix ppc assembly syntax. * Wed Jun 08 2005 matz@suse.de - add STRIP_KEEP_SYMTAB to find-debuginfo.sh -* Sun May 22 2005 schwab@suse.de +* Sat May 21 2005 schwab@suse.de - find-debuginfo.sh: make writable before extracting debug info, simplify. * Thu May 19 2005 schwab@suse.de - Replace absolute symlinks when copying sources for debuginfo package. @@ -1094,7 +1104,7 @@ Authors: - the official arch_canon value for ppc64 is 16, not 5 * Thu Jan 16 2003 ma@suse.de - update subpackage popt to 1.6.4 -* Fri Dec 20 2002 schwab@suse.de +* Thu Dec 19 2002 schwab@suse.de - Update autogen patch. * Mon Nov 18 2002 stepan@suse.de - add m68k as chanonical architecture to configure.in @@ -1246,7 +1256,7 @@ Authors: - added requires for suse-build-key * Tue Feb 12 2002 ro@suse.de - tar option for bz2 is now "j" (re-added) -* Tue Feb 12 2002 ma@suse.de +* Mon Feb 11 2002 ma@suse.de - unk_ugname_cached.diff: Upon building a package, unpacking sources by calling tar from the spec file, may lead to files with unknown user/group names. If those files are to be included in the final @@ -1259,7 +1269,7 @@ Authors: which may cause a segmentation fault on cache lookup. This has been fixed. * Sat Jan 26 2002 ro@suse.de - apply configure-diff also on s390x -* Tue Jan 22 2002 bk@suse.de +* Mon Jan 21 2002 bk@suse.de - use RPM_OPT_FLAGS for compilation - add lib64 support for s390x - update srcdir-supplied rpm-suse_macros file to newest version @@ -1396,7 +1406,7 @@ Authors: - Fix in config.diff (use Makefile.am not Makefile.in) * Mon Apr 10 2000 schwab@suse.de - Fix config patch. -* Fri Apr 07 2000 bk@suse.de +* Thu Apr 06 2000 bk@suse.de - added /lib/libpopt.so* to filelist on s390 * Wed Apr 05 2000 bk@suse.de - uses autoconf and automake now