diff options
author | Alexandre Rostovtsev <tetromino@gentoo.org> | 2011-11-16 07:44:24 +0000 |
---|---|---|
committer | Alexandre Rostovtsev <tetromino@gentoo.org> | 2011-11-16 07:44:24 +0000 |
commit | d5cf0606fe9ef28a30551ab720b000ef0cd901cd (patch) | |
tree | bfd72cb079b99fa6ea122160e12d0b72e0f9206f /app-admin/abrt/files | |
parent | Add bug reporting library from the gnome overlay; needed for abrt. (diff) | |
download | gentoo-2-d5cf0606fe9ef28a30551ab720b000ef0cd901cd.tar.gz gentoo-2-d5cf0606fe9ef28a30551ab720b000ef0cd901cd.tar.bz2 gentoo-2-d5cf0606fe9ef28a30551ab720b000ef0cd901cd.zip |
Add Fedora's automatic crash reporter tool from the gnome overlay.
(Portage version: 2.2.0_alpha74/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/abrt/files')
-rw-r--r-- | app-admin/abrt/files/abrt-2.0.5-conf | 15 | ||||
-rwxr-xr-x | app-admin/abrt/files/abrt-2.0.5-init | 57 | ||||
-rw-r--r-- | app-admin/abrt/files/abrt-2.0.6-format-security.patch | 27 | ||||
-rw-r--r-- | app-admin/abrt/files/abrt-2.0.6-gentoo.patch | 239 | ||||
-rw-r--r-- | app-admin/abrt/files/abrt-2.0.6-glib-2.31.patch | 72 |
5 files changed, 410 insertions, 0 deletions
diff --git a/app-admin/abrt/files/abrt-2.0.5-conf b/app-admin/abrt/files/abrt-2.0.5-conf new file mode 100644 index 000000000000..e35958def408 --- /dev/null +++ b/app-admin/abrt/files/abrt-2.0.5-conf @@ -0,0 +1,15 @@ +# abrtd command-line options +# Default: "" +ABRTD_OPTS="" + +# Run abrt-harvest-vmcore to make new kdump dumps available for abrtd +START_VMCORE="yes" + +# Install abrt-ccpp hook to watch for segfaults +START_CCPP="yes" + +# Start abrt-dump-oops to watch for kernel oops +START_OOPS="yes" +# abrt-dump-oops command-line options +# Default: "-rwxD /var/log/messages" +OOPS_OPTS="-rwxD /var/log/messages" diff --git a/app-admin/abrt/files/abrt-2.0.5-init b/app-admin/abrt/files/abrt-2.0.5-init new file mode 100755 index 000000000000..25769df28619 --- /dev/null +++ b/app-admin/abrt/files/abrt-2.0.5-init @@ -0,0 +1,57 @@ +#!/sbin/runscript +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-admin/abrt/files/abrt-2.0.5-init,v 1.1 2011/11/16 07:44:24 tetromino Exp $ + +description="Automated crash detection service" + +depend() { + need dbus logger +} + +start() { + ebegin "Starting abrtd" + start-stop-daemon --start --quiet --pidfile /var/run/abrtd.pid \ + --exec /usr/sbin/abrtd -- ${ABRTD_OPTS} + eend $? + + if [[ "${START_VMCORE}" = "yes" ]]; then + ebegin "Running abrt-harvest-vmcore" + /usr/sbin/abrt-harvest-vmcore + eend $? + fi + + if [[ "${START_CCPP}" = "yes" ]]; then + ebegin "Installing abrt-ccpp hook" + /usr/sbin/abrt-install-ccpp-hook install + eend $? + fi + + if [[ "${START_OOPS}" = "yes" ]]; then + ebegin "Starting abrt-dump-oops" + start-stop-daemon --start --quiet \ + --pidfile /var/run/abrt-dump-oops.pid \ + --make-pidfile --background \ + --exec /usr/bin/abrt-dump-oops -- ${OOPS_OPTS} + eend $? + fi +} + +stop() { + if [[ "${START_OOPS}" = "yes" ]]; then + ebegin "Stopping abrt-dump-oops" + start-stop-daemon --stop --quiet \ + --pidfile /var/run/abrt-dump-oops.pid + eend $? + fi + + if [[ "${START_CCPP}" = "yes" ]]; then + ebegin "Uninstalling abrt-ccpp hook" + /usr/sbin/abrt-install-ccpp-hook uninstall + eend $? + fi + + ebegin "Stopping abrtd" + start-stop-daemon --stop --quiet --pidfile /var/run/abrtd.pid + eend $? +} diff --git a/app-admin/abrt/files/abrt-2.0.6-format-security.patch b/app-admin/abrt/files/abrt-2.0.6-format-security.patch new file mode 100644 index 000000000000..6b5c8d0e3721 --- /dev/null +++ b/app-admin/abrt/files/abrt-2.0.6-format-security.patch @@ -0,0 +1,27 @@ +From d0d7954713541df4612ab5b54b2808aae9a3d6f0 Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev <tetromino@gentoo.org> +Date: Wed, 16 Nov 2011 00:41:10 -0500 +Subject: [PATCH] Don't use server response as a format string + +It's bad practice even for trusted servers, and makes gcc complain about +format-security. +--- + src/plugins/abrt-retrace-client.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c +index 0fb17a3..4c30334 100644 +--- a/src/plugins/abrt-retrace-client.c ++++ b/src/plugins/abrt-retrace-client.c +@@ -958,7 +958,7 @@ static int create(bool delete_temp_archive, + if (response_code == 500 || response_code == 507) + { + alert_server_error(); +- error_msg_and_die(http_body); ++ error_msg_and_die("%s", http_body); + } + else if (response_code == 403) + { +-- +1.7.8.rc1 + diff --git a/app-admin/abrt/files/abrt-2.0.6-gentoo.patch b/app-admin/abrt/files/abrt-2.0.6-gentoo.patch new file mode 100644 index 000000000000..62904f2f541a --- /dev/null +++ b/app-admin/abrt/files/abrt-2.0.6-gentoo.patch @@ -0,0 +1,239 @@ +From bbcd5fc8782a1a26fdbf60563b9973093e171ebf Mon Sep 17 00:00:00 2001 +From: Alexandre Rostovtsev <tetromino@gmail.com> +Date: Sat, 8 Oct 2011 03:31:56 -0400 +Subject: [PATCH] Disable code not relevant for Gentoo + +Disable code that is only relevant for an RPM-based distro or that +requires additional bugs.gentoo.org infrastructure support. +--- + configure.ac | 1 - + doc/Makefile.am | 2 -- + src/daemon/Makefile.am | 23 +---------------------- + src/daemon/abrt_event.conf | 2 +- + src/plugins/Makefile.am | 16 ---------------- + src/plugins/abrt-action-list-dsos | 18 ++++-------------- + src/plugins/ccpp_event.conf | 7 +++---- + src/plugins/koops_event.conf | 4 ++-- + src/plugins/python_event.conf | 6 +++--- + 9 files changed, 14 insertions(+), 65 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 6b0732c..a340b55 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -60,7 +60,6 @@ PKG_CHECK_MODULES([GTK], [gtk+-2.0]) + PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.21]) + PKG_CHECK_MODULES([DBUS], [dbus-1]) + PKG_CHECK_MODULES([LIBXML], [libxml-2.0]) +-PKG_CHECK_MODULES([RPM], [rpm]) + PKG_CHECK_MODULES([LIBNOTIFY], [libnotify]) + PKG_CHECK_MODULES([NSS], [nss]) + PKG_CHECK_MODULES([BTPARSER], [btparser]) +diff --git a/doc/Makefile.am b/doc/Makefile.am +index 551bc65..51fc97d 100644 +--- a/doc/Makefile.am ++++ b/doc/Makefile.am +@@ -11,12 +11,10 @@ MAN1_TXT += abrt-action-list-dsos.txt + MAN1_TXT += abrt-retrace-client.txt + MAN1_TXT += abrt-handle-upload.txt + MAN1_TXT += abrt-server.txt +-MAN1_TXT += abrt-action-save-package-data.txt + MAN1_TXT += abrt-install-ccpp-hook.txt + + MAN5_TXT = + MAN5_TXT += abrt.conf.txt +-MAN5_TXT += abrt-action-save-package-data.conf.txt + + MAN8_TXT = + MAN8_TXT += abrtd.txt +diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am +index 82ba93b..07ff6c0 100644 +--- a/src/daemon/Makefile.am ++++ b/src/daemon/Makefile.am +@@ -6,9 +6,6 @@ dist_eventsconf_DATA = \ + bin_SCRIPTS = \ + abrt-handle-upload + +-bin_PROGRAMS = \ +- abrt-action-save-package-data +- + sbin_PROGRAMS = \ + abrtd \ + abrt-server +@@ -60,30 +57,12 @@ abrt_handle_event_LDADD = \ + ../lib/libabrt.la \ + $(LIBREPORT_LIBS) + +-abrt_action_save_package_data_SOURCES = \ +- rpm.h rpm.c \ +- abrt-action-save-package-data.c +-abrt_action_save_package_data_CPPFLAGS = \ +- -I$(srcdir)/../include \ +- -I$(srcdir)/../lib \ +- -DCONF_DIR=\"$(CONF_DIR)\" \ +- $(GLIB_CFLAGS) \ +- $(LIBREPORT_CFLAGS) \ +- -D_GNU_SOURCE \ +- -Wall -Wwrite-strings -Werror +-abrt_action_save_package_data_LDADD = \ +- $(RPM_LIBS) \ +- $(LIBREPORT_LIBS) \ +- ../lib/libabrt.la +- + dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/ + dist_dbusabrtconf_DATA = dbus-abrt.conf + + daemonconfdir = $(CONF_DIR) + dist_daemonconf_DATA = \ +- abrt.conf \ +- abrt-action-save-package-data.conf \ +- gpg_keys ++ abrt.conf + + comredhatabrtservicedir = ${datadir}/dbus-1/system-services + dist_comredhatabrtservice_DATA = com.redhat.abrt.service +diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf +index dec0f0e..d2e48ff 100644 +--- a/src/daemon/abrt_event.conf ++++ b/src/daemon/abrt_event.conf +@@ -44,7 +44,7 @@ + + + # Determine in which package/component the crash happened (if not yet done): +-EVENT=post-create component= remote!=1 ++#EVENT=post-create component= remote!=1 + abrt-action-save-package-data + + +diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am +index 9a26877..ac0033d 100644 +--- a/src/plugins/Makefile.am ++++ b/src/plugins/Makefile.am +@@ -1,7 +1,6 @@ + -include ../../config.mak + + bin_SCRIPTS = \ +- abrt-action-install-debuginfo \ + abrt-action-analyze-core \ + abrt-action-analyze-vmcore \ + abrt-action-list-dsos +@@ -16,8 +15,6 @@ bin_PROGRAMS = \ + abrt-action-analyze-backtrace \ + abrt-retrace-client + +-libexec_PROGRAMS = abrt-action-install-debuginfo-to-abrt-cache +- + #dist_pluginsconf_DATA = Python.conf + + eventsdir = $(EVENTS_DIR) +@@ -49,7 +46,6 @@ dist_eventsconf_DATA = \ + + + PYTHON_FILES = \ +- abrt-action-install-debuginfo.in \ + abrt-action-list-dsos \ + abrt-action-analyze-core + +@@ -157,18 +153,6 @@ abrt_action_analyze_backtrace_LDADD = \ + $(LIBREPORT_LIBS) \ + $(BTPARSER_LIBS) + +-abrt_action_install_debuginfo_to_abrt_cache_SOURCES = \ +- abrt-action-install-debuginfo-to-abrt-cache.c +-abrt_action_install_debuginfo_to_abrt_cache_CPPFLAGS = \ +- -I$(srcdir)/../include \ +- -I$(srcdir)/../lib \ +- -D_GNU_SOURCE \ +- $(LIBREPORT_CFLAGS) \ +- -Wall -Wwrite-strings +-abrt_action_install_debuginfo_to_abrt_cache_LDADD = \ +- $(LIBREPORT_LIBS) \ +- ../lib/libabrt.la +- + abrt_retrace_client_SOURCES = \ + abrt-retrace-client.c + abrt_retrace_client_CFLAGS = \ +diff --git a/src/plugins/abrt-action-list-dsos b/src/plugins/abrt-action-list-dsos +index 81a9927..bf1491c 100644 +--- a/src/plugins/abrt-action-list-dsos ++++ b/src/plugins/abrt-action-list-dsos +@@ -5,7 +5,6 @@ + import sys + import os + import getopt +-import rpm + + def log(s): + sys.stderr.write("%s\n" % s) +@@ -68,19 +67,10 @@ if __name__ == "__main__": + try: + dso_paths = parse_maps(memfile) + for path in dso_paths: +- ts = rpm.TransactionSet() +- mi = ts.dbMatch('basenames', path) +- if len(mi): +- for h in mi: +- if outname: +- outfile = xopen(outname, "w") +- outname = None +- outfile.write("%s %s (%s) %s\n" % +- (path, +- h[rpm.RPMTAG_NEVRA], +- h[rpm.RPMTAG_VENDOR], +- h[rpm.RPMTAG_INSTALLTIME]) +- ) ++ if outname: ++ outfile = xopen(outname, "w") ++ outname = None ++ outfile.write(path) + + except Exception, ex: + error_msg_and_die("Can't get the DSO list: %s" % ex) +diff --git a/src/plugins/ccpp_event.conf b/src/plugins/ccpp_event.conf +index 7d0d78c..5d4fa74 100644 +--- a/src/plugins/ccpp_event.conf ++++ b/src/plugins/ccpp_event.conf +@@ -28,11 +28,10 @@ EVENT=collect_xsession_errors analyzer=CCpp dso_list~=.*/libX11.* + # or was this ability lost with move to python installer? + EVENT=analyze_LocalGDB analyzer=CCpp + abrt-action-analyze-core --core=coredump -o build_ids && +- /usr/libexec/abrt-action-install-debuginfo-to-abrt-cache --size_mb=4096 && + abrt-action-generate-backtrace && + abrt-action-analyze-backtrace + + # Bugzilla requires nonempty duphash +-EVENT=report_Bugzilla analyzer=CCpp duphash!= +- test -f component || abrt-action-save-package-data +- reporter-bugzilla -f -b -c /etc/libreport/plugins/Bugzilla.conf ++# EVENT=report_Bugzilla analyzer=CCpp duphash!= ++# test -f component || abrt-action-save-package-data ++# reporter-bugzilla -f -b -c /etc/libreport/plugins/Bugzilla.conf +diff --git a/src/plugins/koops_event.conf b/src/plugins/koops_event.conf +index d203e1a..83842f9 100644 +--- a/src/plugins/koops_event.conf ++++ b/src/plugins/koops_event.conf +@@ -13,5 +13,5 @@ EVENT=post-create analyzer=Kerneloops + EVENT=report_Kerneloops analyzer=Kerneloops + reporter-kerneloops + +-EVENT=report_Bugzilla analyzer=Kerneloops +- reporter-bugzilla -f -b ++# EVENT=report_Bugzilla analyzer=Kerneloops ++# reporter-bugzilla -f -b +diff --git a/src/plugins/python_event.conf b/src/plugins/python_event.conf +index 16508c1..0cd10c6 100644 +--- a/src/plugins/python_event.conf ++++ b/src/plugins/python_event.conf +@@ -1,6 +1,6 @@ + EVENT=post-create analyzer=Python + abrt-action-analyze-python + +-EVENT=report_Bugzilla analyzer=Python +- test -f component || abrt-action-save-package-data +- reporter-bugzilla -f -b -c /etc/libreport/plugins/Bugzilla.conf ++# EVENT=report_Bugzilla analyzer=Python ++# test -f component || abrt-action-save-package-data ++# reporter-bugzilla -f -b -c /etc/libreport/plugins/Bugzilla.conf +-- +1.7.8.rc1 + diff --git a/app-admin/abrt/files/abrt-2.0.6-glib-2.31.patch b/app-admin/abrt/files/abrt-2.0.6-glib-2.31.patch new file mode 100644 index 000000000000..2d3670f415cd --- /dev/null +++ b/app-admin/abrt/files/abrt-2.0.6-glib-2.31.patch @@ -0,0 +1,72 @@ +From ecfc461fd979aeb2d3ce4b9d811e4bf4a7730532 Mon Sep 17 00:00:00 2001 +From: Jiri Moskovcak <jmoskovc@redhat.com> +Date: Sat, 5 Nov 2011 18:04:54 +0100 +Subject: [PATCH] - glib 2.31 build fixes + +--- + src/applet/applet.c | 14 +++++++++++++- + src/gui-gtk/main.c | 4 ++-- + 2 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/src/applet/applet.c b/src/applet/applet.c +index 95b7091..bead61f 100644 +--- a/src/applet/applet.c ++++ b/src/applet/applet.c +@@ -766,10 +766,20 @@ int main(int argc, char** argv) + textdomain(PACKAGE); + #endif + ++ /* Glib 2.31: ++ * Major changes to threading and synchronisation ++ - threading is now always enabled in GLib ++ - support for custom thread implementations (including our own internal ++ - support for errorcheck mutexes) has been removed ++ */ ++#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 31) ++ //can't use log(), because g_verbose is not set yet ++ g_print("abrt-applet: glib < 2.31 - init threading\n"); + /* Need to be thread safe */ + g_thread_init(NULL); + gdk_threads_init(); + gdk_threads_enter(); ++#endif + + gtk_init(&argc, &argv); + +@@ -869,8 +879,10 @@ int main(int argc, char** argv) + + /* Enter main loop */ + gtk_main(); +- ++#if (GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 31) + gdk_threads_leave(); ++#endif ++ + if (notify_is_initted()) + notify_uninit(); + +diff --git a/src/gui-gtk/main.c b/src/gui-gtk/main.c +index b31509b..a24745a 100644 +--- a/src/gui-gtk/main.c ++++ b/src/gui-gtk/main.c +@@ -912,7 +912,7 @@ static gboolean handle_signal_pipe(GIOChannel *gio, GIOCondition condition, gpoi + */ + gchar buf[16]; + gsize bytes_read; +- g_io_channel_read(gio, buf, sizeof(buf), &bytes_read); ++ g_io_channel_read_chars(gio, buf, sizeof(buf), &bytes_read, NULL); + + /* Destroy zombies */ + while (safe_waitpid(-1, NULL, WNOHANG) > 0) +@@ -975,7 +975,7 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin + /* We read inotify events, but don't analyze them */ + gchar buf[sizeof(struct inotify_event) + PATH_MAX + 64]; + gsize bytes_read; +- while (g_io_channel_read(gio, buf, sizeof(buf), &bytes_read) == G_IO_ERROR_NONE ++ while (g_io_channel_read_chars(gio, buf, sizeof(buf), &bytes_read, NULL) == G_IO_STATUS_NORMAL + && bytes_read > 0 + ) { + continue; +-- +1.7.8.rc1 + |