Hello community,
here is the log from the commit of package bug-buddy
checked in at Fri Aug 24 23:16:10 CEST 2007.
--------
--- GNOME/bug-buddy/bug-buddy.changes 2007-08-06 22:33:29.000000000 +0200
+++ /mounts/work_src_done/STABLE/bug-buddy/bug-buddy.changes 2007-08-24 19:10:32.797480000 +0200
@@ -1,0 +2,10 @@
+Fri Aug 24 18:07:51 CEST 2007 - maw@suse.de
+
+- Remove includes.patch, and replace it with breakpad-arches.patch
+ (which comes out of gnome svn) (#297971)
+- Google Breakpad is now built and installed for i386; other
+ hardware architectures are still unsupported
+- Package Gnome Breakpad files on all architectures
+- But package Google Breakpad files only on i386.
+
+-------------------------------------------------------------------
Old:
----
includes.patch
New:
----
breakpad-arches.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ bug-buddy.spec ++++++
--- /var/tmp/diff_new_pack.P18567/_old 2007-08-24 23:15:31.000000000 +0200
+++ /var/tmp/diff_new_pack.P18567/_new 2007-08-24 23:15:31.000000000 +0200
@@ -15,13 +15,13 @@
License: GPL v2 or later
Group: System/GUI/GNOME
Version: 2.19.0
-Release: 4
+Release: 12
Requires: %{name}-lang = %{version}
Summary: The GNOME Desktop Bug Reporting Tool
Source: ftp://ftp.gnome.org/pub/gnome/sources/bug-buddy/2.18/%{name}-%{version}.tar.bz2
Patch1: bug-buddy-kde-menus.patch
Patch5: abuild.patch
-Patch6: includes.patch
+Patch7: breakpad-arches.patch
URL: http://www.gnome.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: gdb
@@ -44,15 +44,18 @@
%setup -q
%patch1
%patch5
-%patch6 -p1
+%patch7 -p0
%build
autoreconf -f -i
+export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
%configure
make %{?jobs:-j%jobs}
%install
%makeinstall
+rm -f $RPM_BUILD_ROOT/%{_libdir}/gtk-2.0/modules/*.*a
+rm -f $RPM_BUILD_ROOT/%{_libdir}/*.*a
%suse_update_desktop_file -N "Bug Buddy" -G "Bug Report Tool" -r bug-buddy System Feedback GNOME
%find_lang %{name}
%find_gconf_schemas
@@ -76,10 +79,25 @@
%{_datadir}/applications/*.desktop
%{_datadir}/bug-buddy
%{_datadir}/icons/hicolor/48x48/apps/bug-buddy.png
+%{_libdir}/gtk-2.0/modules/*
+# google breakpad only works on i386 at the moment
+%ifarch %ix86
+%{_bindir}/minidump_*
+%{_libdir}/libbreakpad.*
+%dir %{_datadir}/doc/breakpad-0.1
+%{_datadir}/doc/breakpad-0.1/*
+%endif
%files lang -f %{name}.lang
%changelog
+* Fri Aug 24 2007 - maw@suse.de
+- Remove includes.patch, and replace it with breakpad-arches.patch
+ (which comes out of gnome svn) (#297971)
+- Google Breakpad is now built and installed for i386; other
+ hardware architectures are still unsupported
+- Package Gnome Breakpad files on all architectures
+- But package Google Breakpad files only on i386.
* Mon Aug 06 2007 - maw@suse.de
- Split out a -lang subpackage.
* Fri Aug 03 2007 - maw@suse.de
++++++ breakpad-arches.patch ++++++
fgIndex: configure.in
Index: configure.in
===================================================================
--- configure.in.orig
+++ configure.in
@@ -2,6 +2,8 @@ dnl Configure script for bug-buddy
AC_INIT([bug-buddy],[2.19.0],[http://bugzilla.gnome.org/enter_bug.cgi?product=bug-buddy])
+AC_CANONICAL_TARGET
+
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.9 foreign no-dist-gzip dist-bzip2])
@@ -70,8 +72,36 @@ PKG_CHECK_MODULES(BUG_BUDDY,
AC_SUBST(BUG_BUDDY_CFLAGS)
AC_SUBST(BUG_BUDDY_LIBS)
+
+
AC_CHECK_LIB(elf, elf_version)
AC_CHECK_HEADERS([libelf.h],[],[AC_MSG_ERROR([libelf.h not found.])])
+AC_CHECK_HEADERS([gelf.h],[],[AC_MSG_ERROR([gelf.h not found.])])
+
+GOOGLE_BREAKPAD_SUPPORTED_OS="no"
+case $target_os in
+ solaris*) ;;
+ linux*)
+ GOOGLE_BREAKPAD_SUPPORTED_OS="yes" ;;
+esac
+
+GOOGLE_BREAKPAD_SUPPORTED_ARCH="no"
+case $target_cpu in
+ *86)
+ GOOGLE_BREAKPAD_SUPPORTED_ARCH="yes" ;;
+esac
+
+if test x$GOOGLE_BREAKPAD_SUPPORTED_OS = xyes ; then
+ if test x$GOOGLE_BREAKPAD_SUPPORTED_ARCH = xyes ; then
+ echo "OS and CPU supported: enabling google-breakpad"
+ AC_CONFIG_SUBDIRS(google-breakpad)
+ AC_DEFINE(ENABLE_GOOGLE_BREAKPAD, 1, [define if google-break is enabled])
+ use_google_breakpad=yes
+ fi
+fi
+
+AM_CONDITIONAL(USE_GOOGLE_BREAKPAD, test x$use_google_breakpad = xyes)
+
GDK_REQUIRED="gdk-2.0 >= 2.9"
PKG_CHECK_MODULES(GNOME_BREAKPAD,
[
@@ -102,8 +132,6 @@ AM_GLIB_GNU_GETTEXT
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
-AC_CONFIG_SUBDIRS(google-breakpad)
-
GNOME_COMMON_INIT
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES
Index: src/bug-buddy.h
===================================================================
--- src/bug-buddy.h.orig
+++ src/bug-buddy.h
@@ -24,8 +24,6 @@
#include "bugzilla.h"
-#include
-#include
#include
Index: Makefile.am
===================================================================
--- Makefile.am.orig
+++ Makefile.am
@@ -1,4 +1,8 @@
-SUBDIRS = po pixmaps google-breakpad gnome-breakpad src bugzilla
+if USE_GOOGLE_BREAKPAD
+GOOGLE_BREAKPAD_DIR = google-breakpad
+endif
+
+SUBDIRS = po pixmaps $(GOOGLE_BREAKPAD_DIR) gnome-breakpad src bugzilla
schemasdir = $(GCONF_SCHEMA_FILE_DIR)
schemas_in_files = bug-buddy.schemas.in
Index: MAINTAINERS
===================================================================
--- MAINTAINERS.orig
+++ MAINTAINERS
@@ -1 +1,2 @@
Email: fherrera@onirica.com
+Userid: fherrera
Index: gnome-breakpad/gnome-breakpad.cc
===================================================================
--- gnome-breakpad/gnome-breakpad.cc.orig
+++ gnome-breakpad/gnome-breakpad.cc
@@ -7,6 +7,8 @@
#include <cstring>
#include
+#include
+
#include
#include
#include
@@ -19,6 +21,8 @@
#include
#include
+#include
+
#include "client/linux/handler/exception_handler.h"
@@ -26,10 +30,12 @@ using namespace google_breakpad;
extern "C" int gtk_module_init (int *argc, char** argv[]);
static bool run_bug_buddy (const gchar *appname, pid_t pid, const gchar *minidump_path);
+static bool check_if_gdb (void *callback_context);
static gchar *bugbuddy;
+#ifdef ENABLE_GOOGLE_BREAKPAD
// Callback when minidump written.
static bool MinidumpCallback(const char *dump_path,
const char *minidump_id,
@@ -48,18 +54,78 @@ static bool MinidumpCallback(const char
g_free (minidump_file);
_exit(0);
}
+#else
+static void
+bugbuddy_segv_handle(int signum)
+{
+ static int in_segv = 0;
+ struct sigaction sa;
+ pid_t pid;
+
+ sa.sa_handler = NULL;
+ in_segv++;
-static bool
-elf_has_debug_symbols (char *filename)
+ if (in_segv > 2) {
+ /* The fprintf() was segfaulting, we are just totally hosed */
+ _exit(1);
+ } else if (in_segv > 1) {
+ /* dialog display isn't working out */
+ fprintf(stderr, "Multiple segmentation faults occurred; can't display error dialog\n");
+ _exit(1);
+ }
+
+ /* Make sure we release grabs */
+ gdk_pointer_ungrab(GDK_CURRENT_TIME);
+ gdk_keyboard_ungrab(GDK_CURRENT_TIME);
+ XUngrabServer (GDK_DISPLAY ());
+
+ gdk_flush();
+
+ check_if_gdb (NULL);
+
+ /* If we are here is because gdb couldn't be run.
+ * FIXME: Show some error? */
+
+ _exit(1);
+}
+#endif
+
+
+#define N_TRIES 3
+
+static gboolean
+find_in_debug_path (const char *filename, const char *debug_filename)
+{
+ char *dir;
+ char *tries[N_TRIES];
+ int i;
+
+ dir = g_path_get_dirname (filename);
+ tries[0] = g_build_filename (dir, debug_filename, NULL);
+ tries[1] = g_build_filename (dir, ".debug", debug_filename, NULL);
+ tries[2] = g_build_filename ("/usr", "lib", "debug", dir, debug_filename, NULL);
+
+ for (i = 0; i < N_TRIES; ++i) {
+ if (g_file_test (tries[i], G_FILE_TEST_EXISTS))
+ return true;
+ }
+
+ return false;
+}
+
+
+static gboolean
+elf_has_debug_symbols (const char *filename)
{
int fd;
Elf *elf;
- Elf_Scn* section = 0;
+ GElf_Ehdr elf_header;
+ Elf_Scn *section = 0;
int number = 0;
if (elf_version(EV_CURRENT) == EV_NONE ) {
fprintf(stderr, "Elf library out of date!n");
- return false;
+ return false;
}
fd = open(filename, O_RDONLY);
@@ -67,22 +133,43 @@ elf_has_debug_symbols (char *filename)
if ((elf = elf_begin(fd, ELF_C_READ, NULL)) == NULL){
close (fd);
return false;
- }
+ }
+ gelf_getehdr (elf, &elf_header);
while ((section = elf_nextscn(elf, section)) != 0) {
char *name = 0;
- Elf32_Shdr *shdr;
- if ((shdr = elf32_getshdr (section)) != 0) {
- if (shdr->sh_type == SHT_SYMTAB) {
+ GElf_Shdr shdr;
+
+ /* Check for stabs debug information */
+ if (gelf_getshdr (section, &shdr) != 0) {
+ if (shdr.sh_type == SHT_SYMTAB) {
+ elf_end (elf);
return true;
}
}
+
+ /* Check for .gnu_debuglink separete debug file */
+ if (shdr.sh_type == SHT_PROGBITS) {
+ char *name = elf_strptr(elf, elf_header.e_shstrndx, shdr.sh_name);
+ if (strcmp (name, ".gnu_debuglink") == 0) {
+ Elf_Data *edata;
+
+ edata = elf_getdata(section, NULL);
+ if (edata != NULL && find_in_debug_path (filename, (const char*) edata->d_buf)) {
+ elf_end (elf);
+ return true;
+ }
+ }
+ }
}
- /* no symtab */
+
+ /* no symtab neither debug file present */
+ elf_end (elf);
return false;
}
+
static bool
release_grabs (void)
{
@@ -203,8 +290,23 @@ gtk_module_init (int *argc, char** argv[
bugbuddy = g_find_program_in_path ("bug-buddy");
if (bugbuddy && !g_getenv ("GNOME_DISABLE_CRASH_DIALOG")) {
+#ifdef ENABLE_GOOGLE_BREAKPAD
static ExceptionHandler handler("/tmp", check_if_gdb,
MinidumpCallback, NULL, true);
+#else
+ static struct sigaction *setptr;
+ struct sigaction sa;
+ memset(&sa, 0, sizeof(sa));
+ setptr = &sa;
+
+ sa.sa_handler = bugbuddy_segv_handle;
+
+ sigaction(SIGSEGV, setptr, NULL);
+ sigaction(SIGABRT, setptr, NULL);
+ sigaction(SIGTRAP, setptr, NULL);
+ sigaction(SIGFPE, setptr, NULL);
+ sigaction(SIGBUS, setptr, NULL);
+#endif
}
}
Index: gnome-breakpad/Makefile.am
===================================================================
--- gnome-breakpad/Makefile.am.orig
+++ gnome-breakpad/Makefile.am
@@ -1,7 +1,6 @@
INCLUDES = -I. -I$(top_srcdir)/google-breakpad/src -DNDEBUG -D_REENTRANT $(GNOME_BREAKPAD_CFLAGS)
-
-#cc_sources = exception_handler.cc linux_thread.cc minidump_file_writer.cc minidump_generator.cc gnome-breakpad.cc string_conversion.cc convert_UTF.c
-cc_sources = gnome-breakpad.cc \
+if USE_GOOGLE_BREAKPAD
+GOOGLE_BREAPAD_CC_SOURCES = \
$(top_srcdir)/google-breakpad/src/client/linux/handler/exception_handler.cc \
$(top_srcdir)/google-breakpad/src/client/linux/handler/linux_thread.cc \
$(top_srcdir)/google-breakpad/src/client/minidump_file_writer.cc \
@@ -11,6 +10,10 @@ cc_sources = gnome-breakpad.cc \
$(top_srcdir)/google-breakpad/src/common/linux/guid_creator.cc \
$(top_srcdir)/google-breakpad/src/common/linux/file_id.cc \
$(top_srcdir)/google-breakpad/src/common/linux/md5.c
+GOOGLE_BREAKPAD_LIBS = $(top_builddir)/google-breakpad/src/libbreakpad.la -lpthread
+endif
+
+cc_sources = gnome-breakpad.cc $(GOOGLE_BREAPAD_CC_SOURCES)
module_LTLIBRARIES = libgnomebreakpad.la
@@ -18,6 +21,7 @@ moduledir = $(libdir)/gtk-2.0/modules
libgnomebreakpad_la_SOURCES = $(cc_sources)
-libgnomebreakpad_la_LIBADD = $(top_builddir)/google-breakpad/src/libbreakpad.la -lpthread $(GNOME_BREAKPAD_LIBS)
+libgnomebreakpad_la_LIBADD = $(GOOGLE_BREAKPAD_LIBS) $(GNOME_BREAKPAD_LIBS)
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org