Add bug reporting library from the gnome overlay; needed for abrt.
authorAlexandre Rostovtsev <tetromino@gentoo.org>
Wed, 16 Nov 2011 07:43:57 +0000 (07:43 +0000)
committerAlexandre Rostovtsev <tetromino@gentoo.org>
Wed, 16 Nov 2011 07:43:57 +0000 (07:43 +0000)
Package-Manager: portage-2.2.0_alpha74/cvs/Linux x86_64

dev-libs/libreport/ChangeLog [new file with mode: 0644]
dev-libs/libreport/files/libreport-2.0.7-gentoo.patch [new file with mode: 0644]
dev-libs/libreport/files/libreport-2.0.7-multiple-tabs.patch [new file with mode: 0644]
dev-libs/libreport/files/libreport-2.0.7-no-bugzilla.patch [new file with mode: 0644]
dev-libs/libreport/files/libreport-2.0.7-uploader_event-syntax.patch [new file with mode: 0644]
dev-libs/libreport/libreport-2.0.7.ebuild [new file with mode: 0644]
dev-libs/libreport/metadata.xml [new file with mode: 0644]

diff --git a/dev-libs/libreport/ChangeLog b/dev-libs/libreport/ChangeLog
new file mode 100644 (file)
index 0000000..cab2647
--- /dev/null
@@ -0,0 +1,13 @@
+# ChangeLog for dev-libs/libreport
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libreport/ChangeLog,v 1.1 2011/11/16 07:43:57 tetromino Exp $
+
+*libreport-2.0.7 (16 Nov 2011)
+
+  16 Nov 2011; Alexandre Rostovtsev <tetromino@gentoo.org>
+  +libreport-2.0.7.ebuild, +files/libreport-2.0.7-gentoo.patch,
+  +files/libreport-2.0.7-multiple-tabs.patch,
+  +files/libreport-2.0.7-no-bugzilla.patch,
+  +files/libreport-2.0.7-uploader_event-syntax.patch, +metadata.xml:
+  Add bug reporting library from the gnome overlay; needed for abrt.
+
diff --git a/dev-libs/libreport/files/libreport-2.0.7-gentoo.patch b/dev-libs/libreport/files/libreport-2.0.7-gentoo.patch
new file mode 100644 (file)
index 0000000..ca97ac9
--- /dev/null
@@ -0,0 +1,154 @@
+From b3e72a475d9d4c5293c9cc875483509975754395 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Fri, 7 Oct 2011 23:25:14 -0400
+Subject: [PATCH 1/2] Replace RedHat defaults with Gentoo ones
+
+---
+ src/plugins/Makefile.am            |   36 +-----------------------------------
+ src/plugins/bugzilla.conf          |    2 +-
+ src/plugins/report_Bugzilla.conf   |    2 +-
+ src/plugins/report_Bugzilla.xml.in |    4 ++--
+ src/plugins/reporter-bugzilla.txt  |    2 +-
+ 5 files changed, 6 insertions(+), 40 deletions(-)
+
+diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
+index c5f1810..937337c 100644
+--- a/src/plugins/Makefile.am
++++ b/src/plugins/Makefile.am
+@@ -4,7 +4,6 @@ pluginslibdir = $(PLUGINS_LIB_DIR)
+ 
+ bin_PROGRAMS = \
+     reporter-bugzilla \
+-    reporter-rhtsupport \
+     reporter-kerneloops \
+     reporter-upload \
+     reporter-mailx \
+@@ -19,8 +18,7 @@ pluginsconfdir = $(PLUGINS_CONF_DIR)
+ reportpluginsconfdir = $(REPORT_PLUGINS_CONF_DIR)
+ 
+ dist_reportpluginsconf_DATA = \
+-    bugzilla.conf \
+-    rhtsupport.conf
++    bugzilla.conf
+ 
+ eventsdir = $(EVENTS_DIR)
+ 
+@@ -30,7 +28,6 @@ dist_events_DATA = \
+     report_Logger.conf \
+     report_Logger.xml \
+     report_Mailx.xml \
+-    report_RHTSupport.xml \
+     report_Kerneloops.xml \
+     report_Uploader.xml
+ if HAVE_BODHI
+@@ -45,7 +42,6 @@ dist_eventsconf_DATA = \
+     mailx_event.conf \
+     print_event.conf \
+     bugzilla_event.conf \
+-    rhtsupport_event.conf \
+     uploader_event.conf
+ if HAVE_BODHI
+ dist_eventsconf_DATA += bodhi_event.conf
+@@ -55,7 +51,6 @@ MAN_TXT = \
+     reporter-print.txt \
+     reporter-mailx.txt \
+     reporter-bugzilla.txt \
+-    reporter-rhtsupport.txt \
+     reporter-kerneloops.txt \
+     reporter-upload.txt \
+     report.txt
+@@ -80,7 +75,6 @@ EXTRA_DIST = \
+     report_Logger.conf \
+     report_Logger.xml.in \
+     report_Mailx.xml.in \
+-    report_RHTSupport.xml.in \
+     report_Kerneloops.xml.in \
+     report_Uploader.xml.in
+ if HAVE_BODHI
+@@ -112,34 +106,6 @@ reporter_bugzilla_LDADD = \
+     ../lib/libabrt_web.la \
+     ../lib/libreport.la
+ 
+-reporter_rhtsupport_SOURCES = \
+-    abrt_rh_support.h abrt_rh_support.c \
+-    reporter-rhtsupport.h \
+-    reporter-rhtsupport-parse.c \
+-    reporter-rhtsupport.c
+-reporter_rhtsupport_CPPFLAGS = \
+-    -I$(srcdir)/../include \
+-    -I$(srcdir)/../lib \
+-    -DBIN_DIR=\"$(bindir)\" \
+-    -DVAR_RUN=\"$(VAR_RUN)\" \
+-    -DCONF_DIR=\"$(CONF_DIR)\" \
+-    -DLOCALSTATEDIR='"$(localstatedir)"' \
+-    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
+-    -DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
+-    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
+-    -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
+-    $(GLIB_CFLAGS) \
+-    $(LIBREPORT_CFLAGS) \
+-    $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) \
+-    -D_GNU_SOURCE \
+-    -Wall -Wwrite-strings -Werror
+-reporter_rhtsupport_LDFLAGS = -ltar
+-reporter_rhtsupport_LDADD = \
+-    $(GLIB_LIBS) \
+-    $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS) \
+-    ../lib/libabrt_web.la \
+-    ../lib/libreport.la
+-
+ reporter_upload_SOURCES = \
+     reporter-upload.c
+ reporter_upload_CPPFLAGS = \
+diff --git a/src/plugins/bugzilla.conf b/src/plugins/bugzilla.conf
+index 18eba5a..f5afe6f 100644
+--- a/src/plugins/bugzilla.conf
++++ b/src/plugins/bugzilla.conf
+@@ -1,5 +1,5 @@
+ # Bugzilla URL
+-BugzillaURL = https://bugzilla.redhat.com/
++BugzillaURL = https://bugs.gentoo.org/
+ # yes means that ssl certificates will be checked
+ SSLVerify = yes
+ # your login has to exist, if you don have any, please create one
+diff --git a/src/plugins/report_Bugzilla.conf b/src/plugins/report_Bugzilla.conf
+index f1a77f5..9e9c7d0 100644
+--- a/src/plugins/report_Bugzilla.conf
++++ b/src/plugins/report_Bugzilla.conf
+@@ -1,4 +1,4 @@
+-Bugzilla_BugzillaURL = https://bugzilla.redhat.com
++Bugzilla_BugzillaURL = https://bugs.gentoo.org
+ Bugzilla_Login =
+ Bugzilla_Password =
+ Bugzilla_SSLVerify = yes
+diff --git a/src/plugins/report_Bugzilla.xml.in b/src/plugins/report_Bugzilla.xml.in
+index e287a50..f5f9e71 100644
+--- a/src/plugins/report_Bugzilla.xml.in
++++ b/src/plugins/report_Bugzilla.xml.in
+@@ -15,8 +15,8 @@
+             <_label>Bugzilla URL</_label>
+             <allow-empty>no</allow-empty>
+             <_description>Address of Bugzilla server</_description>
+-            <default-value>https://bugzilla.redhat.com</default-value>
+-            <_note-html>You can create bugzilla.redhat.com account &lt;a href="https://bugzilla.redhat.com/createaccount.cgi"&gt;here&lt;/a&gt;</_note-html>
++            <default-value>https://bugs.gentoo.org</default-value>
++            <_note-html>You can create a Gentoo Bugzilla account &lt;a href="https://bugs.gentoo.org/createaccount.cgi"&gt;here&lt;/a&gt;</_note-html>
+         </option>
+         <option type="text" name="Bugzilla_Login">
+             <_label>User name</_label>
+diff --git a/src/plugins/reporter-bugzilla.txt b/src/plugins/reporter-bugzilla.txt
+index 6c4d6fe..cd0f26b 100644
+--- a/src/plugins/reporter-bugzilla.txt
++++ b/src/plugins/reporter-bugzilla.txt
+@@ -41,7 +41,7 @@ Configuration file lines should have 'PARAM = VALUE' format. The parameters are:
+       Password to Bugzilla account.
+ 
+ 'BugzillaURL'::
+-      Bugzilla HTTP(S) address. (default: https://bugzilla.redhat.com)
++      Bugzilla HTTP(S) address. (default: https://bugs.gentoo.org)
+ 
+ 'SSLVerify'::
+       Use yes/true/on/1 to verify server's SSL certificate. (default: yes)
+-- 
+1.7.8.rc1
+
diff --git a/dev-libs/libreport/files/libreport-2.0.7-multiple-tabs.patch b/dev-libs/libreport/files/libreport-2.0.7-multiple-tabs.patch
new file mode 100644 (file)
index 0000000..0e7fb47
--- /dev/null
@@ -0,0 +1,46 @@
+From 5f7dd05d39cbc66154fcdc38570870d5506dddb7 Mon Sep 17 00:00:00 2001
+From: Jiri Moskovcak <jmoskovc@redhat.com>
+Date: Wed, 9 Nov 2011 21:51:11 +0100
+Subject: [PATCH] wizard: remove the old tabs from notebook before reloading
+ rhbz#751833
+
+---
+ src/gui-wizard-gtk/wizard.c |   15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c
+index 569fce3..fae0dca 100644
+--- a/src/gui-wizard-gtk/wizard.c
++++ b/src/gui-wizard-gtk/wizard.c
+@@ -1008,6 +1008,20 @@ static void save_items_from_notepad()
+     }
+ }
+ 
++static void remove_tabs_from_notebook(GtkNotebook *notebook)
++{
++    gint n_pages = gtk_notebook_get_n_pages(notebook);
++    int ii;
++
++    for (ii = 0; ii < n_pages; ii++)
++    {
++        /* removing a page changes the indices, so we always need to remove
++         * page 0
++        */
++        gtk_notebook_remove_page(notebook, 0); //we need to always the page 0
++    }
++}
++
+ static void append_item_to_ls_details(gpointer name, gpointer value, gpointer data)
+ {
+     problem_item *item = (problem_item*)value;
+@@ -1208,6 +1222,7 @@ static void update_event_checkboxes(GList **events_gui_data,
+ void update_gui_state_from_problem_data(void)
+ {
+     update_window_title();
++    remove_tabs_from_notebook(g_notebook);
+ 
+     const char *reason = get_problem_item_content_or_NULL(g_cd, FILENAME_REASON);
+     const char *not_reportable = get_problem_item_content_or_NULL(g_cd,
+-- 
+1.7.8.rc1
+
diff --git a/dev-libs/libreport/files/libreport-2.0.7-no-bugzilla.patch b/dev-libs/libreport/files/libreport-2.0.7-no-bugzilla.patch
new file mode 100644 (file)
index 0000000..54c574d
--- /dev/null
@@ -0,0 +1,80 @@
+From d30693aab920000afd5cfdcaf558f968c712b80f Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Sat, 8 Oct 2011 00:26:15 -0400
+Subject: [PATCH 2/2] Disable bugzilla plugin (requires Gentoo infrastructure
+ changes)
+
+---
+ src/plugins/Makefile.am |   28 +---------------------------
+ 1 files changed, 1 insertions(+), 27 deletions(-)
+
+diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
+index 937337c..f5ec729 100644
+--- a/src/plugins/Makefile.am
++++ b/src/plugins/Makefile.am
+@@ -3,7 +3,6 @@
+ pluginslibdir = $(PLUGINS_LIB_DIR)
+ 
+ bin_PROGRAMS = \
+-    reporter-bugzilla \
+     reporter-kerneloops \
+     reporter-upload \
+     reporter-mailx \
+@@ -17,8 +16,7 @@ pluginsconfdir = $(PLUGINS_CONF_DIR)
+ 
+ reportpluginsconfdir = $(REPORT_PLUGINS_CONF_DIR)
+ 
+-dist_reportpluginsconf_DATA = \
+-    bugzilla.conf
++dist_reportpluginsconf_DATA = 
+ 
+ eventsdir = $(EVENTS_DIR)
+ 
+@@ -41,7 +39,6 @@ eventsconfdir = $(EVENTS_CONF_DIR)
+ dist_eventsconf_DATA = \
+     mailx_event.conf \
+     print_event.conf \
+-    bugzilla_event.conf \
+     uploader_event.conf
+ if HAVE_BODHI
+ dist_eventsconf_DATA += bodhi_event.conf
+@@ -50,7 +47,6 @@ endif
+ MAN_TXT = \
+     reporter-print.txt \
+     reporter-mailx.txt \
+-    reporter-bugzilla.txt \
+     reporter-kerneloops.txt \
+     reporter-upload.txt \
+     report.txt
+@@ -84,28 +80,6 @@ endif
+ $(DESTDIR)/$(DEBUG_INFO_DIR):
+       $(mkdir_p) '$@'
+ 
+-reporter_bugzilla_SOURCES = \
+-    reporter-bugzilla.c rhbz.c rhbz.h
+-reporter_bugzilla_CPPFLAGS = \
+-    -I$(srcdir)/../include \
+-    -I$(srcdir)/../lib \
+-    -DBIN_DIR=\"$(bindir)\" \
+-    -DVAR_RUN=\"$(VAR_RUN)\" \
+-    -DCONF_DIR=\"$(CONF_DIR)\" \
+-    -DLOCALSTATEDIR='"$(localstatedir)"' \
+-    -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
+-    -DDEBUG_INFO_DIR=\"$(DEBUG_INFO_DIR)\" \
+-    -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
+-    -DPLUGINS_CONF_DIR=\"$(REPORT_PLUGINS_CONF_DIR)\" \
+-    $(GLIB_CFLAGS) \
+-    $(LIBREPORT_CFLAGS) \
+-    -D_GNU_SOURCE \
+-    -Wall -Wwrite-strings
+-reporter_bugzilla_LDADD = \
+-    $(GLIB_LIBS) \
+-    ../lib/libabrt_web.la \
+-    ../lib/libreport.la
+-
+ reporter_upload_SOURCES = \
+     reporter-upload.c
+ reporter_upload_CPPFLAGS = \
+-- 
+1.7.8.rc1
+
diff --git a/dev-libs/libreport/files/libreport-2.0.7-uploader_event-syntax.patch b/dev-libs/libreport/files/libreport-2.0.7-uploader_event-syntax.patch
new file mode 100644 (file)
index 0000000..4f43ec9
--- /dev/null
@@ -0,0 +1,19 @@
+From 88e39835f1f94eff58e6d0cc0bee20ceae10bdd2 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gentoo.org>
+Date: Wed, 16 Nov 2011 02:07:24 -0500
+Subject: [PATCH] fix uploader_event syntax
+
+---
+ src/plugins/uploader_event.conf |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/src/plugins/uploader_event.conf b/src/plugins/uploader_event.conf
+index 2406008..bd13c5e 100644
+--- a/src/plugins/uploader_event.conf
++++ b/src/plugins/uploader_event.conf
+@@ -1 +1 @@
+-EVENT=report_Uploader analyzer=libreport reporter-upload
++EVENT=report_Uploader reporter-upload
+-- 
+1.7.8.rc1
+
diff --git a/dev-libs/libreport/libreport-2.0.7.ebuild b/dev-libs/libreport/libreport-2.0.7.ebuild
new file mode 100644 (file)
index 0000000..d954e27
--- /dev/null
@@ -0,0 +1,109 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libreport/libreport-2.0.7.ebuild,v 1.1 2011/11/16 07:43:57 tetromino Exp $
+
+EAPI="4"
+PYTHON_DEPEND="2:2.6"
+
+inherit autotools eutils python
+
+DESCRIPTION="Generic library for reporting software bugs"
+HOMEPAGE="https://fedorahosted.org/abrt/"
+SRC_URI="https://fedorahosted.org/released/abrt/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+RDEPEND=">=dev-libs/glib-2.21:2
+       dev-libs/newt
+       dev-libs/nss
+       dev-libs/libtar
+       dev-libs/libxml2
+       dev-libs/xmlrpc-c
+       gnome-base/gnome-keyring
+       net-misc/curl[ssl]
+       sys-apps/dbus
+       x11-libs/gtk+:2"
+DEPEND="${RDEPEND}
+       app-text/asciidoc
+       app-text/xmlto
+       >=dev-util/intltool-0.3.50
+       >=dev-util/pkgconfig-0.9.0
+       >=sys-devel/gettext-0.17"
+
+# Tests require python-meh, which is highly redhat-specific.
+RESTRICT="test"
+
+pkg_setup() {
+       python_set_active_version 2
+       python_pkg_setup
+
+       enewgroup abrt
+       enewuser abrt -1 -1 -1 abrt
+}
+
+src_prepare() {
+       # Replace redhat-specific defaults with gentoo ones
+       epatch "${FILESDIR}/${PN}-2.0.7-gentoo.patch"
+
+       # Disable bugzilla plugin for now (requires bugs.gentoo.org infra support)
+       epatch "${FILESDIR}/${PN}-2.0.7-no-bugzilla.patch"
+
+       # Modify uploader_event so that the gui recognizes it
+       epatch "${FILESDIR}/${PN}-2.0.7-uploader_event-syntax.patch"
+
+       # https://bugzilla.redhat.com/show_bug.cgi?id=751833, in next release
+       epatch "${FILESDIR}/${P}-multiple-tabs.patch"
+
+       # -Werror should not be used by default
+       sed -e "s/-Werror\( \|$\)//" \
+               -i src/client-python/Makefile.* src/cli/Makefile.* \
+                  src/gtk-helpers/Makefile.* src/gui-wizard-gtk/Makefile.* \
+                  src/lib/Makefile.* src/plugins/Makefile.* \
+                  src/report-python/Makefile.* || die "sed failed"
+
+       # disable pyc compiling
+       ln -sfn $(type -P true) py-compile
+
+       mkdir m4
+       eautoreconf
+}
+
+src_configure() {
+       # Gentoo's xmlrpc-c does not provide a pkgconfig file
+       # XXX: this is probably cross-compile-unfriendly
+       export XMLRPC_CFLAGS=$(xmlrpc-c-config --cflags)
+       export XMLRPC_LIBS=$(xmlrpc-c-config --libs)
+       export XMLRPC_CLIENT_CFLAGS=$(xmlrpc-c-config client --cflags)
+       export XMLRPC_CLIENT_LIBS=$(xmlrpc-c-config client --libs)
+       # Configure checks for python.pc; our python-2.7 installs python-2.7.pc,
+       # while python-2.6 does not install any pkgconfig file.
+       export PYTHON_CFLAGS=$(python-config --includes)
+       export PYTHON_LIBS=$(python-config --libs)
+
+       ECONF="--disable-bodhi
+               --localstatedir=${EPREFIX}/var"
+       # --disable-debug enables debug!
+       use debug && ECONF="${ECONF} --enable-debug"
+       econf ${ECONF}
+}
+
+src_install() {
+       default
+
+       # Need to set correct ownership for use by app-admin/abrt
+       diropts -o abrt -g abrt
+       keepdir /var/spool/abrt
+
+       find "${D}" -name '*.la' -exec rm -f {} + || die
+}
+
+pkg_postinst() {
+       python_mod_optimize report reportclient
+}
+
+pkg_postrm() {
+       python_mod_cleanup report reportclient
+}
diff --git a/dev-libs/libreport/metadata.xml b/dev-libs/libreport/metadata.xml
new file mode 100644 (file)
index 0000000..da6fd63
--- /dev/null
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>