Fix librpm version 3->7 for Rawhide

(RH BZ 1249325, bugreport by Zbigniew Jędrzejewski-Szmek).
- Fix yum vs. dnf message suggestion for Rawhide
  (RH BZ 1249326, bugreport by Zbigniew Jędrzejewski-Szmek).
This commit is contained in:
Jan Kratochvil 2015-08-01 20:12:51 +02:00
parent 90127c91f8
commit ddc0fde6fd
3 changed files with 70 additions and 53 deletions

View File

@ -75,7 +75,7 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-inst
+# Move the binfile to a temporary name +# Move the binfile to a temporary name
+remote_exec build "mv $binfile ${binfile}.old" +remote_exec build "mv $binfile ${binfile}.old"
+ +
+# Reinitialize GDB and see if we get a yum warning +# Reinitialize GDB and see if we get a yum/dnf warning
+gdb_exit +gdb_exit
+gdb_start +gdb_start
+gdb_reinitialize_dir $srcdir/$subdir +gdb_reinitialize_dir $srcdir/$subdir
@ -88,8 +88,8 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-inst
+ "set debug-file-directory" + "set debug-file-directory"
+ +
+ gdb_test "core-file ${objdir}/${subdir}/gcore.test" \ + gdb_test "core-file ${objdir}/${subdir}/gcore.test" \
+ "Missing separate debuginfo for the main executable file\r\nTry: yum --enablerepo='\\*debug\\*' install $objdir/$subdir/$build_id_without_debug\r\n.*" \ + "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $objdir/$subdir/$build_id_without_debug\r\n.*" \
+ "test first yum warning" + "test first yum/dnf warning"
+} +}
+ +
+# Now we define and create our .build-id +# Now we define and create our .build-id
@ -98,7 +98,7 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-inst
+# exist. +# exist.
+remote_exec build "ln -s $binfile ${objdir}/${subdir}/${build_id_without_debug}" +remote_exec build "ln -s $binfile ${objdir}/${subdir}/${build_id_without_debug}"
+ +
+# Reinitialize GDB to get the second yum warning +# Reinitialize GDB to get the second yum/dnf warning
+gdb_exit +gdb_exit
+gdb_start +gdb_start
+gdb_reinitialize_dir $srcdir/$subdir +gdb_reinitialize_dir $srcdir/$subdir
@ -111,8 +111,8 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/gdb.base/rhbz981154-misleading-yum-inst
+ "set debug-file-directory" + "set debug-file-directory"
+ +
+ gdb_test "core-file ${objdir}/${subdir}/gcore.test" \ + gdb_test "core-file ${objdir}/${subdir}/gcore.test" \
+ "Missing separate debuginfo for the main executable file\r\nTry: yum --enablerepo='\\*debug\\*' install $binfile\r\n.*" \ + "Missing separate debuginfo for the main executable file\r\nTry: (yum|dnf) --enablerepo='\\*debug\\*' install $binfile\r\n.*" \
+ "test second yum warning" + "test second yum/dnf warning"
+} +}
+ +
+# Leaving the link there will cause breakage in the next run. +# Leaving the link there will cause breakage in the next run.

View File

@ -1,7 +1,7 @@
Index: gdb-7.9.90.20150709/gdb/event-top.c Index: gdb-7.9.90.20150717/gdb/event-top.c
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/event-top.c 2015-07-09 18:22:45.008383794 +0200 --- gdb-7.9.90.20150717.orig/gdb/event-top.c 2015-07-17 03:59:12.000000000 +0200
+++ gdb-7.9.90.20150709/gdb/event-top.c 2015-07-09 18:22:51.401438337 +0200 +++ gdb-7.9.90.20150717/gdb/event-top.c 2015-08-01 20:07:15.822993674 +0200
@@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
#include "gdbcmd.h" /* for dont_repeat() */ #include "gdbcmd.h" /* for dont_repeat() */
#include "annotate.h" #include "annotate.h"
@ -28,10 +28,10 @@ Index: gdb-7.9.90.20150709/gdb/event-top.c
old_chain = make_cleanup (free_current_contents, &actual_gdb_prompt); old_chain = make_cleanup (free_current_contents, &actual_gdb_prompt);
/* Do not call the python hook on an explicit prompt change as /* Do not call the python hook on an explicit prompt change as
Index: gdb-7.9.90.20150709/gdb/symfile.h Index: gdb-7.9.90.20150717/gdb/symfile.h
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/symfile.h 2015-07-09 18:22:45.009383802 +0200 --- gdb-7.9.90.20150717.orig/gdb/symfile.h 2015-08-01 20:07:15.787993404 +0200
+++ gdb-7.9.90.20150709/gdb/symfile.h 2015-07-09 18:22:51.402438346 +0200 +++ gdb-7.9.90.20150717/gdb/symfile.h 2015-08-01 20:07:15.822993674 +0200
@@ -587,6 +587,8 @@ void map_symbol_filenames (symbol_filena @@ -587,6 +587,8 @@ void map_symbol_filenames (symbol_filena
/* build-id support. */ /* build-id support. */
extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr); extern struct bfd_build_id *build_id_addr_get (CORE_ADDR addr);
@ -41,10 +41,10 @@ Index: gdb-7.9.90.20150709/gdb/symfile.h
/* From dwarf2read.c */ /* From dwarf2read.c */
Index: gdb-7.9.90.20150709/gdb/testsuite/lib/gdb.exp Index: gdb-7.9.90.20150717/gdb/testsuite/lib/gdb.exp
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/testsuite/lib/gdb.exp 2015-07-09 18:22:45.010383811 +0200 --- gdb-7.9.90.20150717.orig/gdb/testsuite/lib/gdb.exp 2015-08-01 20:07:15.789993420 +0200
+++ gdb-7.9.90.20150709/gdb/testsuite/lib/gdb.exp 2015-07-09 18:22:51.403438354 +0200 +++ gdb-7.9.90.20150717/gdb/testsuite/lib/gdb.exp 2015-08-01 20:07:15.824993689 +0200
@@ -1573,7 +1573,7 @@ proc default_gdb_start { } { @@ -1573,7 +1573,7 @@ proc default_gdb_start { } {
warning "Couldn't set the width to 0." warning "Couldn't set the width to 0."
} }
@ -54,10 +54,10 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/lib/gdb.exp
send_gdb "set build-id-verbose 0\n" send_gdb "set build-id-verbose 0\n"
gdb_expect 10 { gdb_expect 10 {
-re "$gdb_prompt $" { -re "$gdb_prompt $" {
Index: gdb-7.9.90.20150709/gdb/testsuite/lib/mi-support.exp Index: gdb-7.9.90.20150717/gdb/testsuite/lib/mi-support.exp
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/testsuite/lib/mi-support.exp 2015-07-09 18:22:45.012383828 +0200 --- gdb-7.9.90.20150717.orig/gdb/testsuite/lib/mi-support.exp 2015-08-01 20:07:15.789993420 +0200
+++ gdb-7.9.90.20150709/gdb/testsuite/lib/mi-support.exp 2015-07-09 18:22:51.404438363 +0200 +++ gdb-7.9.90.20150717/gdb/testsuite/lib/mi-support.exp 2015-08-01 20:07:15.824993689 +0200
@@ -214,7 +214,7 @@ proc default_mi_gdb_start { args } { @@ -214,7 +214,7 @@ proc default_mi_gdb_start { args } {
warning "Couldn't set the width to 0." warning "Couldn't set the width to 0."
} }
@ -67,10 +67,10 @@ Index: gdb-7.9.90.20150709/gdb/testsuite/lib/mi-support.exp
send_gdb "190-gdb-set build-id-verbose 0\n" send_gdb "190-gdb-set build-id-verbose 0\n"
gdb_expect 10 { gdb_expect 10 {
-re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" { -re ".*190-gdb-set build-id-verbose 0\r\n190\\\^done\r\n$mi_gdb_prompt$" {
Index: gdb-7.9.90.20150709/gdb/tui/tui-interp.c Index: gdb-7.9.90.20150717/gdb/tui/tui-interp.c
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/tui/tui-interp.c 2015-07-09 18:22:45.012383828 +0200 --- gdb-7.9.90.20150717.orig/gdb/tui/tui-interp.c 2015-07-17 03:59:13.000000000 +0200
+++ gdb-7.9.90.20150709/gdb/tui/tui-interp.c 2015-07-09 18:22:51.404438363 +0200 +++ gdb-7.9.90.20150717/gdb/tui/tui-interp.c 2015-08-01 20:07:15.825993697 +0200
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
#include "tui/tui-io.h" #include "tui/tui-io.h"
#include "infrun.h" #include "infrun.h"
@ -79,10 +79,10 @@ Index: gdb-7.9.90.20150709/gdb/tui/tui-interp.c
static struct ui_out *tui_ui_out (struct interp *self); static struct ui_out *tui_ui_out (struct interp *self);
Index: gdb-7.9.90.20150709/gdb/aclocal.m4 Index: gdb-7.9.90.20150717/gdb/aclocal.m4
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/aclocal.m4 2015-07-09 18:22:45.013383837 +0200 --- gdb-7.9.90.20150717.orig/gdb/aclocal.m4 2015-07-17 03:59:12.000000000 +0200
+++ gdb-7.9.90.20150709/gdb/aclocal.m4 2015-07-09 18:22:51.405438371 +0200 +++ gdb-7.9.90.20150717/gdb/aclocal.m4 2015-08-01 20:07:15.825993697 +0200
@@ -11,6 +11,221 @@ @@ -11,6 +11,221 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE. # PARTICULAR PURPOSE.
@ -305,10 +305,10 @@ Index: gdb-7.9.90.20150709/gdb/aclocal.m4
# AM_AUX_DIR_EXPAND -*- Autoconf -*- # AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
Index: gdb-7.9.90.20150709/gdb/config.in Index: gdb-7.9.90.20150717/gdb/config.in
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/config.in 2015-07-09 18:22:45.013383837 +0200 --- gdb-7.9.90.20150717.orig/gdb/config.in 2015-07-17 03:59:12.000000000 +0200
+++ gdb-7.9.90.20150709/gdb/config.in 2015-07-09 18:22:51.405438371 +0200 +++ gdb-7.9.90.20150717/gdb/config.in 2015-08-01 20:07:15.826993704 +0200
@@ -33,6 +33,9 @@ @@ -33,6 +33,9 @@
/* Define to BFD's default target vector. */ /* Define to BFD's default target vector. */
#undef DEFAULT_BFD_VEC #undef DEFAULT_BFD_VEC
@ -329,10 +329,10 @@ Index: gdb-7.9.90.20150709/gdb/config.in
/* Define to 1 if you have the <libunwind-ia64.h> header file. */ /* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H #undef HAVE_LIBUNWIND_IA64_H
Index: gdb-7.9.90.20150709/gdb/configure Index: gdb-7.9.90.20150717/gdb/configure
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/configure 2015-07-09 18:22:45.020383896 +0200 --- gdb-7.9.90.20150717.orig/gdb/configure 2015-07-17 03:59:12.000000000 +0200
+++ gdb-7.9.90.20150709/gdb/configure 2015-07-09 18:22:51.410438414 +0200 +++ gdb-7.9.90.20150717/gdb/configure 2015-08-01 20:07:15.830993735 +0200
@@ -703,6 +703,11 @@ PKGVERSION @@ -703,6 +703,11 @@ PKGVERSION
HAVE_NATIVE_GCORE_TARGET HAVE_NATIVE_GCORE_TARGET
TARGET_OBS TARGET_OBS
@ -880,10 +880,10 @@ Index: gdb-7.9.90.20150709/gdb/configure
subdirs="$subdirs testsuite" subdirs="$subdirs testsuite"
Index: gdb-7.9.90.20150709/gdb/configure.ac Index: gdb-7.9.90.20150717/gdb/configure.ac
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/configure.ac 2015-07-09 18:22:45.022383913 +0200 --- gdb-7.9.90.20150717.orig/gdb/configure.ac 2015-07-17 03:59:12.000000000 +0200
+++ gdb-7.9.90.20150709/gdb/configure.ac 2015-07-09 18:22:51.411438422 +0200 +++ gdb-7.9.90.20150717/gdb/configure.ac 2015-08-01 20:07:15.831993743 +0200
@@ -177,6 +177,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap @@ -177,6 +177,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escap
[Directories safe to hold auto-loaded files.]) [Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path]) AC_MSG_RESULT([$with_auto_load_safe_path])
@ -1084,10 +1084,10 @@ Index: gdb-7.9.90.20150709/gdb/configure.ac
AC_CONFIG_SUBDIRS(testsuite) AC_CONFIG_SUBDIRS(testsuite)
# Check whether to support alternative target configurations # Check whether to support alternative target configurations
Index: gdb-7.9.90.20150709/gdb/corelow.c Index: gdb-7.9.90.20150717/gdb/corelow.c
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/corelow.c 2015-07-09 18:22:45.022383913 +0200 --- gdb-7.9.90.20150717.orig/gdb/corelow.c 2015-08-01 20:07:15.775993312 +0200
+++ gdb-7.9.90.20150709/gdb/corelow.c 2015-07-09 18:22:51.412438431 +0200 +++ gdb-7.9.90.20150717/gdb/corelow.c 2015-08-01 20:07:15.831993743 +0200
@@ -310,7 +310,7 @@ build_id_locate_exec (int from_tty) @@ -310,7 +310,7 @@ build_id_locate_exec (int from_tty)
symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED; symfile_objfile->flags |= OBJF_BUILD_ID_CORE_LOADED;
} }
@ -1097,10 +1097,10 @@ Index: gdb-7.9.90.20150709/gdb/corelow.c
do_cleanups (back_to); do_cleanups (back_to);
Index: gdb-7.9.90.20150709/gdb/build-id.c Index: gdb-7.9.90.20150717/gdb/build-id.c
=================================================================== ===================================================================
--- gdb-7.9.90.20150709.orig/gdb/build-id.c 2015-07-09 18:22:45.023383922 +0200 --- gdb-7.9.90.20150717.orig/gdb/build-id.c 2015-08-01 20:07:15.791993435 +0200
+++ gdb-7.9.90.20150709/gdb/build-id.c 2015-07-09 18:22:51.412438431 +0200 +++ gdb-7.9.90.20150717/gdb/build-id.c 2015-08-01 20:08:27.735546630 +0200
@@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
#include "elf/common.h" #include "elf/common.h"
#include "elf-bfd.h" #include "elf-bfd.h"
@ -1109,7 +1109,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c
#define BUILD_ID_VERBOSE_NONE 0 #define BUILD_ID_VERBOSE_NONE 0
#define BUILD_ID_VERBOSE_FILENAMES 1 #define BUILD_ID_VERBOSE_FILENAMES 1
@@ -669,8 +670,363 @@ build_id_to_filename (const struct bfd_b @@ -665,8 +666,363 @@ build_id_to_filename (const struct bfd_b
return result; return result;
} }
@ -1474,7 +1474,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c
avoidance. */ avoidance. */
struct missing_filepair struct missing_filepair
@@ -724,11 +1080,17 @@ missing_filepair_change (void) @@ -720,11 +1076,17 @@ missing_filepair_change (void)
/* All their memory came just from missing_filepair_OBSTACK. */ /* All their memory came just from missing_filepair_OBSTACK. */
missing_filepair_hash = NULL; missing_filepair_hash = NULL;
} }
@ -1492,7 +1492,7 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c
missing_filepair_change (); missing_filepair_change ();
} }
@@ -795,14 +1157,34 @@ debug_print_missing (const char *binary, @@ -791,14 +1153,39 @@ debug_print_missing (const char *binary,
*slot = missing_filepair; *slot = missing_filepair;
@ -1529,7 +1529,12 @@ Index: gdb-7.9.90.20150709/gdb/build-id.c
+ _("Missing separate debuginfo for %s\n"), binary); + _("Missing separate debuginfo for %s\n"), binary);
+ if (debug != NULL) + if (debug != NULL)
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"), + fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
+ "yum --enablerepo='*debug*' install", debug); +#ifdef DNF_DEBUGINFO_INSTALL
+ "dnf"
+#else
+ "yum"
+#endif
+ " --enablerepo='*debug*' install", debug);
+ } + }
} }

View File

@ -18,20 +18,20 @@ Summary: A GNU source-level debugger for C, C++, Fortran, Go and other languages
Name: %{?scl_prefix}gdb Name: %{?scl_prefix}gdb
# Freeze it when GDB gets branched # Freeze it when GDB gets branched
%global snapsrc 20150717 %global snapsrc 20150706
# See timestamp of source gnulib installed into gdb/gnulib/ . # See timestamp of source gnulib installed into gdb/gnulib/ .
%global snapgnulib 20121213 %global snapgnulib 20121213
%global tarname gdb-%{version} %global tarname gdb-%{version}
Version: 7.9.90.%{snapsrc} Version: 7.9.90.20150717
# The release always contains a leading reserved number, start it at 1. # The release always contains a leading reserved number, start it at 1.
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing. # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
Release: 7%{?dist} Release: 8%{?dist}
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
Group: Development/Debuggers Group: Development/Debuggers
# Do not provide URL for snapshots as the file lasts there only for 2 days. # Do not provide URL for snapshots as the file lasts there only for 2 days.
# ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz # ftp://sourceware.org/pub/gdb/releases/FIXME{tarname}.tar.xz
Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz Source: ftp://sourceware.org/pub/gdb/releases/%{tarname}.tar.xz
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
URL: http://gnu.org/software/gdb/ URL: http://gnu.org/software/gdb/
@ -73,6 +73,16 @@ Recommends: gcc-gdb-plugin%{?_isa}
Recommends: dnf-command(debuginfo-install) Recommends: dnf-command(debuginfo-install)
%endif %endif
%if 0%{?el6:1}
%global librpmver 1
%elif 0%{?el7:1}
%global librpmver 3
%else
%global librpmver 7
%endif
BuildRequires: %{_libdir}/librpm.so.%{librpmver}
Recommends: rpm-libs%{?_isa}
# GDB patches have the format `gdb-<version>-bz<red-hat-bz-#>-<desc>.patch'. # GDB patches have the format `gdb-<version>-bz<red-hat-bz-#>-<desc>.patch'.
# They should be created using patch level 1: diff -up ./gdb (or gdb-6.3/gdb). # They should be created using patch level 1: diff -up ./gdb (or gdb-6.3/gdb).
@ -528,7 +538,7 @@ BuildRequires: expat-devel%{?_isa}
%if 0%{!?rhel:1} || 0%{?rhel} > 6 %if 0%{!?rhel:1} || 0%{?rhel} > 6
BuildRequires: xz-devel%{?_isa} BuildRequires: xz-devel%{?_isa}
%endif %endif
# dlopen() no longer makes rpm-libs%{?_isa} (it's .so) a mandatory dependency. # dlopen() no longer makes rpm-libsFIXME{?_isa} (it's .so) a mandatory dependency.
BuildRequires: rpm-devel%{?_isa} BuildRequires: rpm-devel%{?_isa}
BuildRequires: zlib-devel%{?_isa} libselinux-devel%{?_isa} BuildRequires: zlib-devel%{?_isa} libselinux-devel%{?_isa}
%if 0%{!?_without_python:1} %if 0%{!?_without_python:1}
@ -915,11 +925,7 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
%else %else
--without-python \ --without-python \
%endif %endif
%if 0%{?el6:1} --with-rpm=librpm.so.%{librpmver} \
--with-rpm=librpm.so.1 \
%else
--with-rpm=librpm.so.3 \
%endif
%if 0%{!?rhel:1} || 0%{?rhel} > 6 %if 0%{!?rhel:1} || 0%{?rhel} > 6
--with-lzma \ --with-lzma \
%else %else
@ -1310,6 +1316,12 @@ then
fi fi
%changelog %changelog
* Sat Aug 1 2015 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.9.90.20150717-8.fc23
- Fix librpm version 3->7 for Rawhide
(RH BZ 1249325, bugreport by Zbigniew Jędrzejewski-Szmek).
- Fix yum vs. dnf message suggestion for Rawhide
(RH BZ 1249326, bugreport by Zbigniew Jędrzejewski-Szmek).
* Fri Jul 17 2015 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.9.90.20150717-7.fc23 * Fri Jul 17 2015 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.9.90.20150717-7.fc23
- Rebase to FSF GDB 7.9.90.20150717 (7.10 branch snapshot). - Rebase to FSF GDB 7.9.90.20150717 (7.10 branch snapshot).