summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-29 16:54:11 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-29 16:54:11 +0200
commit8a917423793e79b9290606ac05ba8341da871c18 (patch)
tree63abdc9617ed6a29dbc8a7f864e03b3e87abba17
parent8b2e49a8152d49831e357d1f128848d6c4dab889 (diff)
downloadabrt-8a917423793e79b9290606ac05ba8341da871c18.tar.gz
abrt-8a917423793e79b9290606ac05ba8341da871c18.tar.xz
abrt-8a917423793e79b9290606ac05ba8341da871c18.zip
remove obsolete Catcut and rhfastcheck reporters
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--abrt.spec30
-rw-r--r--lib/Plugins/Catcut.GTKBuilder210
-rw-r--r--lib/Plugins/Catcut.conf10
-rw-r--r--lib/Plugins/Catcut.cpp544
-rw-r--r--lib/Plugins/Catcut.h46
-rw-r--r--lib/Plugins/Makefile.am21
-rw-r--r--lib/Plugins/rhfastcheck.cpp132
-rw-r--r--lib/Plugins/rhfastcheck.h45
-rw-r--r--lib/Utils/Plugin.h1
-rw-r--r--lib/Utils/make_descr.cpp66
-rw-r--r--po/POTFILES.in2
11 files changed, 0 insertions, 1107 deletions
diff --git a/abrt.spec b/abrt.spec
index b4817171..620bdf35 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -149,14 +149,6 @@ Requires: %{name} = %{version}-%{release}
%description plugin-bugzilla
Plugin to report bugs into the bugzilla.
-%package plugin-rhfastcheck
-Summary: %{name}'s rhfastcheck plugin
-Group: System Environment/Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description plugin-rhfastcheck
-Plugin to quickly check RH support DB for known solution.
-
%package plugin-rhtsupport
Summary: %{name}'s RHTSupport plugin
Group: System Environment/Libraries
@@ -165,14 +157,6 @@ Requires: %{name} = %{version}-%{release}
%description plugin-rhtsupport
Plugin to report bugs into RH support system.
-%package plugin-catcut
-Summary: %{name}'s catcut plugin
-Group: System Environment/Libraries
-Requires: %{name} = %{version}-%{release}
-
-%description plugin-catcut
-Plugin to report bugs into the catcut.
-
%package plugin-ticketuploader
Summary: %{name}'s ticketuploader plugin
Group: System Environment/Libraries
@@ -413,13 +397,6 @@ fi
%{_libdir}/%{name}/Bugzilla.GTKBuilder
%{_mandir}/man7/%{name}-Bugzilla.7.gz
-%files plugin-rhfastcheck
-%defattr(-,root,root,-)
-#%config(noreplace) %{_sysconfdir}/%{name}/plugins/rhfastcheck.conf
-%{_libdir}/%{name}/librhfastcheck.so*
-#%{_libdir}/%{name}/rhfastcheck.GTKBuilder
-#%{_mandir}/man7/%{name}-rhfastcheck.7.gz
-
%files plugin-rhtsupport
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/plugins/RHTSupport.conf
@@ -427,13 +404,6 @@ fi
%{_libdir}/%{name}/RHTSupport.GTKBuilder
#%{_mandir}/man7/%{name}-RHTSupport.7.gz
-%files plugin-catcut
-%defattr(-,root,root,-)
-%config(noreplace) %{_sysconfdir}/%{name}/plugins/Catcut.conf
-%{_libdir}/%{name}/libCatcut.so*
-%{_libdir}/%{name}/Catcut.GTKBuilder
-#%{_mandir}/man7/%{name}-Catcut.7.gz
-
%files plugin-ticketuploader
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/plugins/TicketUploader.conf
diff --git a/lib/Plugins/Catcut.GTKBuilder b/lib/Plugins/Catcut.GTKBuilder
deleted file mode 100644
index 10c594d2..00000000
--- a/lib/Plugins/Catcut.GTKBuilder
+++ /dev/null
@@ -1,210 +0,0 @@
-<?xml version="1.0"?>
-<interface>
- <requires lib="gtk+" version="2.16"/>
- <!-- interface-naming-policy project-wide -->
- <object class="GtkDialog" id="PluginDialog">
- <property name="border_width">12</property>
- <property name="resizable">False</property>
- <property name="modal">True</property>
- <property name="window_position">center-on-parent</property>
- <property name="icon_name">abrt</property>
- <property name="type_hint">normal</property>
- <property name="has_separator">False</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="orientation">vertical</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="top_padding">6</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">12</property>
- <property name="row_spacing">6</property>
- <child>
- <object class="GtkLabel" id="lCatcutURL">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Catcut URL:</property>
- </object>
- <packing>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lLogin">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Login:</property>
- </object>
- <packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="lPassword">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Password:</property>
- </object>
- <packing>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_CatcutURL">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_Login">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="conf_Password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
- <property name="invisible_char">&#x25CF;</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="cb_Password">
- <property name="label" translatable="yes">Show password</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label3">
- <property name="xalign">0</property>
- </object>
- <packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="conf_NoSSLVerify">
- <property name="label" translatable="yes">No SSL verify</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Catcut plugin configuration&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="button2">
- <property name="label">gtk-cancel</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="bApply">
- <property name="label">gtk-apply</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_stock">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">button2</action-widget>
- <action-widget response="-10">bApply</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/lib/Plugins/Catcut.conf b/lib/Plugins/Catcut.conf
deleted file mode 100644
index 858d1346..00000000
--- a/lib/Plugins/Catcut.conf
+++ /dev/null
@@ -1,10 +0,0 @@
-Enabled = 0
-
-# Catcut URL
-CatcutURL = http://127.0.0.1:8080/catcut/xmlrpc
-# yes means that ssl certificates will not be checked
-NoSSLVerify = no
-# your login has to exist, if you don have any, please create one
-Login = gavin
-# your password
-Password = junk
diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp
deleted file mode 100644
index 05a93bb8..00000000
--- a/lib/Plugins/Catcut.cpp
+++ /dev/null
@@ -1,544 +0,0 @@
-/*
- Copyright (C) 2010 ABRT team
- Copyright (C) 2010 RedHat Inc
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-#include "abrtlib.h"
-#include "abrt_curl.h"
-#include "abrt_xmlrpc.h"
-#include "Catcut.h"
-#include "CrashTypes.h"
-#include "DebugDump.h"
-#include "ABRTException.h"
-#include "CommLayerInner.h"
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-using namespace std;
-
-
-static int
-put_stream(const char *pURL, FILE* f, off_t content_length)
-{
- CURL* curl = xcurl_easy_init();
- /* enable uploading */
- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
- /* specify target */
- curl_easy_setopt(curl, CURLOPT_URL, pURL);
- /* file handle: passed to the default callback, it will fread() it */
- curl_easy_setopt(curl, CURLOPT_READDATA, f);
- /* file size */
- curl_easy_setopt(curl, CURLOPT_INFILESIZE_LARGE, (curl_off_t)content_length);
- /* everything is done here; result 0 means success */
- int result = curl_easy_perform(curl);
- /* goodbye */
- curl_easy_cleanup(curl);
- return result;
-}
-
-static void
-send_string(const char *pURL,
- const char *pContent,
- int retryCount,
- int retryDelaySeconds)
-{
- if (pURL[0] == '\0')
- {
- error_msg(_("send_string: URL not specified"));
- return;
- }
-
- size_t content_length = strlen(pContent);
- while (1)
- {
- FILE* f = fmemopen((void*)pContent, content_length, "r");
- if (!f)
- {
- throw CABRTException(EXCEP_PLUGIN, "send_string: can't open string stream");
- }
- int result = put_stream(pURL, f, content_length);
- fclose(f);
- if (result == 0)
- return;
- update_client(_("Sending failed, try it again: %s"), curl_easy_strerror((CURLcode)result));
- if (--retryCount <= 0)
- break;
- /* retry the upload if not succesful, wait a bit before next try */
- sleep(retryDelaySeconds);
- }
-
- throw CABRTException(EXCEP_PLUGIN, "send_string: can't send string");
-}
-
-static void
-send_file(const char *pURL,
- const char *pFilename,
- int retryCount,
- int retryDelaySeconds)
-{
- if (pURL[0] == '\0')
- {
- error_msg(_("send_file: URL not specified"));
- return;
- }
-
- update_client(_("Sending file %s to %s"), pFilename, pURL);
-
- while (1)
- {
- FILE* f = fopen(pFilename, "r");
- if (!f)
- {
- throw CABRTException(EXCEP_PLUGIN, "send_file: can't open string stream");
- }
- struct stat buf;
- fstat(fileno(f), &buf); /* can't fail */
- int result = put_stream(pURL, f, buf.st_size);
- fclose(f);
- if (result == 0)
- return;
- update_client(_("Sending failed, try it again: %s"), curl_easy_strerror((CURLcode)result));
- if (--retryCount <= 0)
- break;
- /* retry the upload if not succesful, wait a bit before next try */
- sleep(retryDelaySeconds);
- }
-
- throw CABRTException(EXCEP_PLUGIN, "send_file: can't send file");
-}
-
-static string
-resolve_relative_url(const char *url, const char *base)
-{
- // if 'url' is relative (not absolute) combine it with 'base'
- // (which must be absolute)
- // Only works in limited cases:
- // 0) url is already absolute
- // 1) url starts with two slashes
- // 2) url starts with one slash
-
- const char *colon = strchr(url, ':');
- const char *slash = strchr(url, '/');
-
- if (colon && (!slash || colon < slash))
- {
- return url;
- }
-
- const char *end_of_protocol = strchr(base, ':');
-//TODO: why is this safe?!!
- string protocol(base, end_of_protocol - base);
-
- end_of_protocol += 3; /* skip "://" */
- const char *end_of_host = strchr(end_of_protocol, '/');
- string host(end_of_protocol, end_of_host - end_of_protocol);
-
- if (url[0] == '/')
- {
- if (url[1] == '/')
- {
- protocol += ':';
- protocol += url;
- return protocol;
- }
- protocol += "://";
- protocol += host;
- protocol += url;
- return protocol;
- }
- throw CABRTException(EXCEP_PLUGIN, "resolve_relative_url: unhandled relative url");
-}
-
-//
-// struct_find_XXXX
-// abstract all the busy work of getting a field's value from
-// a struct. XXXX is a type.
-// Return true/false = the field is in the struct
-// If true, return the field's value in 'value'.
-//
-// This function currently just assumes that the value in the
-// field can be read into the type of 'value'. This should probably
-// be fixed to either convert the fields value to the type of 'value'
-// or error specifically/usefully.
-//
-// This function probably should be converted to an overloaded function
-// (overloaded on the type of 'value'). It could also be a function
-// template.
-//
-
-static bool
-struct_find_int(xmlrpc_env* env, xmlrpc_value* result,
- const char* fieldName, int& value)
-{
- xmlrpc_value* an_xmlrpc_value;
- xmlrpc_struct_find_value(env, result, fieldName, &an_xmlrpc_value);
- throw_if_xml_fault_occurred(env);
-
- if (an_xmlrpc_value)
- {
- xmlrpc_read_int(env, an_xmlrpc_value, &value);
- throw_if_xml_fault_occurred(env);
- xmlrpc_DECREF(an_xmlrpc_value);
- return true;
- }
- return false;
-}
-
-static bool
-struct_find_string(xmlrpc_env* env, xmlrpc_value* result,
- const char* fieldName, string& value)
-{
- xmlrpc_value* an_xmlrpc_value;
- xmlrpc_struct_find_value(env, result, fieldName, &an_xmlrpc_value);
- throw_if_xml_fault_occurred(env);
- if (an_xmlrpc_value)
- {
- const char* value_s;
- xmlrpc_read_string(env, an_xmlrpc_value, &value_s);
- throw_if_xml_fault_occurred(env);
- value = value_s;
- xmlrpc_DECREF(an_xmlrpc_value);
- free((void*)value_s);
- return true;
- }
- return false;
-}
-
-
-/*
- * Static namespace for xmlrpc stuff.
- * Used mainly to ensure we always destroy xmlrpc client and server_info.
- */
-
-namespace {
-
-struct ctx: public abrt_xmlrpc_conn {
- ctx(const char* url, bool no_ssl_verify): abrt_xmlrpc_conn(url, no_ssl_verify) {}
-
- string login(const char* login, const char* passwd);
- string new_bug(const char *auth_cookie, const map_crash_data_t& pCrashData);
- string request_upload(const char* auth_cookie, const char* pTicketName,
- const char* fileName, const char* description);
- void add_attachments(const char* xmlrpc_URL,
- const char* auth_cookie,
- const char* pTicketName,
- const map_crash_data_t& pCrashData,
- int retryCount,
- int retryDelaySeconds);
-};
-
-string
-ctx::login(const char* login, const char* passwd)
-{
- xmlrpc_env env;
- xmlrpc_env_init(&env);
-
- xmlrpc_value* param = xmlrpc_build_value(&env, "(ss)", login, passwd);
- throw_if_xml_fault_occurred(&env);
-
- xmlrpc_value* result = NULL;
- xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Catcut.auth", param, &result);
- xmlrpc_DECREF(param);
- throw_if_xml_fault_occurred(&env);
-
- xmlrpc_value *cookie_xml;
- const char *cookie;
- string cookie_str;
- xmlrpc_struct_find_value(&env, result, "cookie", &cookie_xml);
- throw_if_xml_fault_occurred(&env);
- xmlrpc_read_string(&env, cookie_xml, &cookie);
- throw_if_xml_fault_occurred(&env);
- cookie_str = cookie;
- /* xmlrpc_read_string returns *malloc'ed ptr*.
- * doc is not very clear on it, but I looked in xmlrpc sources. */
- free((void*)cookie);
- xmlrpc_DECREF(cookie_xml);
-
- xmlrpc_DECREF(result);
-
- return cookie_str;
-}
-
-string
-ctx::new_bug(const char *auth_cookie, const map_crash_data_t& pCrashData)
-{
- xmlrpc_env env;
- xmlrpc_env_init(&env);
-
- const string& package = get_crash_data_item_content(pCrashData, FILENAME_PACKAGE);
- const string& component = get_crash_data_item_content(pCrashData, FILENAME_COMPONENT);
- const string& release = get_crash_data_item_content(pCrashData, FILENAME_RELEASE);
- const string& arch = get_crash_data_item_content(pCrashData, FILENAME_ARCHITECTURE);
- const string& uuid = get_crash_data_item_content(pCrashData, CD_DUPHASH);
-
- string summary = "[abrt] crash in " + package;
- string status_whiteboard = "abrt_hash:" + uuid;
-
- string description = make_description_catcut(pCrashData);
-
- char *product = NULL;
- char *version = NULL;
- parse_release(release.c_str(), &product, &version);
-
- xmlrpc_value *param = xmlrpc_build_value(&env, "(s{s:s,s:s,s:s,s:s,s:s,s:s,s:s})",
- auth_cookie,
- "product", product,
- "component", component.c_str(),
- "version", version,
- "summary", summary.c_str(),
- "description", description.c_str(),
- "status_whiteboard", status_whiteboard.c_str(),
- "platform", arch.c_str()
- );
- free(product);
- free(version);
- throw_if_xml_fault_occurred(&env);
-
- xmlrpc_value *result;
- xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Catcut.createTicket", param, &result);
- xmlrpc_DECREF(param);
- throw_if_xml_fault_occurred(&env);
-
- xmlrpc_value *bug_id_xml;
- const char *bug_id;
- string bug_id_str;
- xmlrpc_struct_find_value(&env, result, "ticket", &bug_id_xml);
- throw_if_xml_fault_occurred(&env);
- xmlrpc_read_string(&env, bug_id_xml, &bug_id);
- throw_if_xml_fault_occurred(&env);
- bug_id_str = bug_id;
- log("New bug id: %s", bug_id);
- update_client(_("New bug id: %s"), bug_id);
- free((void*)bug_id);
- xmlrpc_DECREF(bug_id_xml);
-
- xmlrpc_DECREF(result);
-
- return bug_id_str;
-}
-
-string
-ctx::request_upload(const char* auth_cookie, const char* pTicketName,
- const char* fileName, const char* description)
-{
- xmlrpc_env env;
- xmlrpc_env_init(&env);
-
- xmlrpc_value* param = xmlrpc_build_value(&env, "(ssss)",
- auth_cookie,
- pTicketName,
- fileName,
- description);
- throw_if_xml_fault_occurred(&env);
-
- xmlrpc_value* result = NULL;
- xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Catcut.requestUpload", param, &result);
- xmlrpc_DECREF(param);
- throw_if_xml_fault_occurred(&env);
-
- string URL;
- bool has_URL = struct_find_string(&env, result, "uri", URL);
- if (!has_URL || URL == "")
- {
- int err;
- bool has_errno = struct_find_int(&env, result, "errno", err);
- if (has_errno && err)
- {
- string errmsg;
- bool has_errmsg = struct_find_string(&env, result, "errmsg", errmsg);
- if (has_errmsg)
- {
- log("error returned by requestUpload: %s", errmsg.c_str());
- update_client(_("error returned by requestUpload: %s"), errmsg.c_str());
- }
- else
- {
- log("error returned by requestUpload: %d", err);
- update_client(_("error returned by requestUpload: %d"), err);
- }
- }
- else
- {
- log("no URL returned by requestUpload, and no err");
- update_client(_("no URL returned by requestUpload, and no errno"));
- }
- }
-
- log("requestUpload returned URL: %s", URL.c_str());
- update_client(_("requestUpload returned URL: %s"), URL.c_str());
-
- xmlrpc_DECREF(result);
- return URL;
-}
-
-void
-ctx::add_attachments(const char* xmlrpc_URL,
- const char* auth_cookie,
- const char* pTicketName,
- const map_crash_data_t& pCrashData,
- int retryCount,
- int retryDelaySeconds)
-{
-
- map_crash_data_t::const_iterator it = pCrashData.begin();
- for (; it != pCrashData.end(); it++)
- {
- if (it->second[CD_TYPE] == CD_TXT && it->second[CD_TYPE].size() > CD_TEXT_ATT_SIZE)
- {
- update_client(_("Attaching (text): %s"), it->first.c_str());
-
- string description = "File: " + it->first;
- string URL = request_upload(auth_cookie,
- pTicketName,
- it->first.c_str(),
- description.c_str());
-
- URL = resolve_relative_url(URL.c_str(), xmlrpc_URL);
-
- log("rebased URL: %s", URL.c_str());
- update_client(_("rebased URL: %s"), URL.c_str());
-
- send_string(URL.c_str(), it->second[CD_CONTENT].c_str(),
- retryCount, retryDelaySeconds);
- }
- else if (it->second[CD_TYPE] == CD_BIN)
- {
- update_client(_("Attaching binary: %s"), it->first.c_str());
-
- string description = "File: " + it->first;
- string URL = request_upload(auth_cookie,
- pTicketName,
- it->first.c_str(),
- description.c_str());
-
- URL = resolve_relative_url(URL.c_str(), xmlrpc_URL);
-
- log("rebased URL: %s", URL.c_str());
- update_client(_("rebased URL: %s"), URL.c_str());
-
- send_file(URL.c_str(), it->second[CD_CONTENT].c_str(),
- retryCount, retryDelaySeconds);
- }
- }
-}
-
-} /* namespace */
-
-
-/*
- * CReporterCatcut
- */
-
-CReporterCatcut::CReporterCatcut() :
- m_sCatcutURL("http://127.0.0.1:8080/catcut/xmlrpc"),
- m_bNoSSLVerify(false),
- m_nRetryCount(3),
- m_nRetryDelay(20)
-{}
-
-CReporterCatcut::~CReporterCatcut()
-{}
-
-string CReporterCatcut::Report(const map_crash_data_t& pCrashData,
- const map_plugin_settings_t& pSettings,
- const char *pArgs)
-{
- update_client(_("Creating new bug..."));
- try
- {
- ctx catcut_server(m_sCatcutURL.c_str(), m_bNoSSLVerify);
-
- string auth_cookie = catcut_server.login(m_sLogin.c_str(), m_sPassword.c_str());
- string message;
- if (auth_cookie != "")
- {
- string ticket_name = catcut_server.new_bug(auth_cookie.c_str(), pCrashData);
- if (ticket_name != "")
- {
- catcut_server.add_attachments(
- m_sCatcutURL.c_str(),
- auth_cookie.c_str(),
- ticket_name.c_str(),
- pCrashData,
- m_nRetryCount,
- m_nRetryDelay
- );
- message = "New catcut bug ID: " + ticket_name;
- }
- else
- {
- message = "Error: can't create ticket";
- }
- }
- else
- {
- message = "Error: can't create ticket";
- }
- return message;
- }
- catch (CABRTException& e)
- {
- throw CABRTException(EXCEP_PLUGIN, e.what());
- }
-}
-
-void CReporterCatcut::SetSettings(const map_plugin_settings_t& pSettings)
-{
- m_pSettings = pSettings;
-
- map_plugin_settings_t::const_iterator end = pSettings.end();
- map_plugin_settings_t::const_iterator it;
- it = pSettings.find("CatcutURL");
- if (it != end)
- {
- m_sCatcutURL = it->second;
- }
- it = pSettings.find("Login");
- if (it != end)
- {
- m_sLogin = it->second;
- }
- it = pSettings.find("Password");
- if (it != end)
- {
- m_sPassword = it->second;
- }
- it = pSettings.find("NoSSLVerify");
- if (it != end)
- {
- m_bNoSSLVerify = string_to_bool(it->second.c_str());
- }
- it = pSettings.find("RetryCount");
- if (it != end)
- {
- m_nRetryCount = xatoi_u(it->second.c_str());
- }
- it = pSettings.find("RetryDelay");
- if (it != end)
- {
- m_nRetryDelay = xatoi_u(it->second.c_str());
- }
-}
-
-PLUGIN_INFO(REPORTER,
- CReporterCatcut,
- "Catcut",
- "0.0.1",
- "Reports bugs to catcut",
- "dvlasenk@redhat.com",
- "https://fedorahosted.org/abrt/wiki",
- PLUGINS_LIB_DIR"/Catcut.GTKBuilder");
diff --git a/lib/Plugins/Catcut.h b/lib/Plugins/Catcut.h
deleted file mode 100644
index 427dd375..00000000
--- a/lib/Plugins/Catcut.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- Copyright (C) 2010 ABRT team
- Copyright (C) 2010 RedHat Inc
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-#ifndef CATCUT_H_
-#define CATCUT_H_
-
-#include "Plugin.h"
-#include "Reporter.h"
-
-class CReporterCatcut : public CReporter
-{
- private:
- std::string m_sCatcutURL;
- std::string m_sLogin;
- std::string m_sPassword;
- bool m_bNoSSLVerify;
- int m_nRetryCount;
- int m_nRetryDelay;
-
- public:
- CReporterCatcut();
- virtual ~CReporterCatcut();
-
- virtual void SetSettings(const map_plugin_settings_t& pSettings);
-
- virtual std::string Report(const map_crash_data_t& pCrashData,
- const map_plugin_settings_t& pSettings,
- const char *Args);
-};
-
-#endif /* CATCUT_H_ */
diff --git a/lib/Plugins/Makefile.am b/lib/Plugins/Makefile.am
index bb370b71..690d91de 100644
--- a/lib/Plugins/Makefile.am
+++ b/lib/Plugins/Makefile.am
@@ -11,9 +11,7 @@ pluginslib_LTLIBRARIES = \
libRunApp.la \
libSOSreport.la \
libBugzilla.la \
- librhfastcheck.la \
libRHTSupport.la \
- libCatcut.la \
libTicketUploader.la \
libPython.la \
libFileTransfer.la
@@ -24,7 +22,6 @@ dist_pluginslib_DATA = \
Bugzilla.GTKBuilder \
RHTSupport.GTKBuilder \
TicketUploader.GTKBuilder \
- Catcut.GTKBuilder \
KerneloopsReporter.GTKBuilder
pluginsconfdir = $(PLUGINS_CONF_DIR)
@@ -36,7 +33,6 @@ dist_pluginsconf_DATA = \
Kerneloops.conf \
Bugzilla.conf \
RHTSupport.conf \
- Catcut.conf \
TicketUploader.conf \
FileTransfer.conf \
Python.conf \
@@ -54,8 +50,6 @@ man_MANS = \
abrt-RunApp.7 \
abrt-TicketUploader.7
-# + abrt-Catcut.7
-
EXTRA_DIST = $(man_MANS)
$(DESTDIR)/$(DEBUG_INFO_DIR):
@@ -126,15 +120,6 @@ libBugzilla_la_CPPFLAGS = $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) \
-DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\"
-# rhfastcheck
-librhfastcheck_la_SOURCES = rhfastcheck.h rhfastcheck.cpp
-librhfastcheck_la_LIBADD =
-librhfastcheck_la_LDFLAGS = -avoid-version
-librhfastcheck_la_CPPFLAGS = \
- -I$(srcdir)/../../inc -I$(srcdir)/../Utils \
- -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\"
-
# RHTSupport
libRHTSupport_la_SOURCES = RHTSupport.h RHTSupport.cpp
libRHTSupport_la_LIBADD =
@@ -145,12 +130,6 @@ libRHTSupport_la_CPPFLAGS = \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
-DLOCALSTATEDIR='"$(localstatedir)"'
-# Catcut
-libCatcut_la_SOURCES = Catcut.h Catcut.cpp
-libCatcut_la_LIBADD = $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS)
-libCatcut_la_LDFLAGS = -avoid-version
-libCatcut_la_CPPFLAGS = $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
-
# TicketUploader
libTicketUploader_la_SOURCES = TicketUploader.h TicketUploader.cpp
libTicketUploader_la_LDFLAGS = -avoid-version
diff --git a/lib/Plugins/rhfastcheck.cpp b/lib/Plugins/rhfastcheck.cpp
deleted file mode 100644
index 1d743c2b..00000000
--- a/lib/Plugins/rhfastcheck.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- Copyright (C) 2010 ABRT team
- Copyright (C) 2010 RedHat Inc
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include "abrtlib.h"
-#include "abrt_rh_support.h"
-#include "CrashTypes.h"
-#include "DebugDump.h"
-#include "ABRTException.h"
-#include "CommLayerInner.h"
-#include "rhfastcheck.h"
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-using namespace std;
-
-/*
- * CReporterRHfastcheck
- */
-CReporterRHfastcheck::CReporterRHfastcheck() :
- m_bSSLVerify(true),
- m_sStrataURL("http://support-services-devel.gss.redhat.com:8080/Strata")
-{}
-
-CReporterRHfastcheck::~CReporterRHfastcheck()
-{}
-
-string CReporterRHfastcheck::Report(const map_crash_data_t& pCrashData,
- const map_plugin_settings_t& pSettings,
- const char *pArgs)
-{
- reportfile_t* file = new_reportfile();
-
- map_crash_data_t::const_iterator it = pCrashData.begin();
- for (; it != pCrashData.end(); it++)
- {
- if (it->first == CD_COUNT) continue;
- if (it->first == CD_DUMPDIR) continue;
- if (it->first == CD_INFORMALL) continue;
- if (it->first == CD_REPORTED) continue;
- if (it->first == CD_MESSAGE) continue; // plugin's status message (if we already reported it yesterday)
- if (it->first == FILENAME_DESCRIPTION) continue; // package description
-
- const char *content = it->second[CD_CONTENT].c_str();
- if (it->second[CD_TYPE] == CD_TXT)
- {
- reportfile_add_binding_from_string(file, it->first.c_str(), content);
- }
- else if (it->second[CD_TYPE] == CD_BIN)
- {
- reportfile_add_binding_from_namedfile(file, content, it->first.c_str(), content, /*binary:*/ 1);
- }
- }
-
- update_client(_("Creating a signature..."));
- const char* signature = reportfile_as_string(file);
- char* result = post_signature(m_sStrataURL.c_str(), signature);
-
- reportfile_free(file);
- string retval = result;
- free(result);
-
- if (strncasecmp(retval.c_str(), "error", 5) == 0)
- {
- throw CABRTException(EXCEP_PLUGIN, "%s", retval.c_str());
- }
- return retval;
-}
-
-void CReporterRHfastcheck::SetSettings(const map_plugin_settings_t& pSettings)
-{
- m_pSettings = pSettings;
-
- map_plugin_settings_t::const_iterator end = pSettings.end();
- map_plugin_settings_t::const_iterator it;
- it = pSettings.find("URL");
- if (it != end)
- {
- m_sStrataURL = it->second;
- }
- it = pSettings.find("Login");
- if (it != end)
- {
- m_sLogin = it->second;
- }
- it = pSettings.find("Password");
- if (it != end)
- {
- m_sPassword = it->second;
- }
- it = pSettings.find("SSLVerify");
- if (it != end)
- {
- m_bSSLVerify = string_to_bool(it->second.c_str());
- }
-}
-
-/* Should not be deleted (why?) */
-const map_plugin_settings_t& CReporterRHfastcheck::GetSettings()
-{
- m_pSettings["URL"] = m_sStrataURL;
- m_pSettings["Login"] = m_sLogin;
- m_pSettings["Password"] = m_sPassword;
- m_pSettings["SSLVerify"] = m_bSSLVerify ? "yes" : "no";
-
- return m_pSettings;
-}
-
-PLUGIN_INFO(REPORTER,
- CReporterRHfastcheck,
- "RHfastcheck",
- "0.0.4",
- "Reports bugs to Red Hat support",
- "Denys Vlasenko <dvlasenk@redhat.com>",
- "https://fedorahosted.org/abrt/wiki",
- "" /*PLUGINS_LIB_DIR"/RHfastcheck.GTKBuilder"*/);
diff --git a/lib/Plugins/rhfastcheck.h b/lib/Plugins/rhfastcheck.h
deleted file mode 100644
index 6cd954dd..00000000
--- a/lib/Plugins/rhfastcheck.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- Copyright (C) 2010 ABRT team
- Copyright (C) 2010 RedHat Inc
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-#ifndef RHFASKCHECK_H_
-#define RHFASKCHECK_H_
-
-#include "Plugin.h"
-#include "Reporter.h"
-
-class CReporterRHfastcheck: public CReporter
-{
- private:
- bool m_bSSLVerify;
- std::string m_sStrataURL;
- std::string m_sLogin;
- std::string m_sPassword;
-
- public:
- CReporterRHfastcheck();
- virtual ~CReporterRHfastcheck();
-
- virtual std::string Report(const map_crash_data_t& pCrashData,
- const map_plugin_settings_t& pSettings,
- const char *pArgs);
-
- virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual const map_plugin_settings_t& GetSettings();
-};
-
-#endif
diff --git a/lib/Utils/Plugin.h b/lib/Utils/Plugin.h
index 059f8006..367739ff 100644
--- a/lib/Utils/Plugin.h
+++ b/lib/Utils/Plugin.h
@@ -122,7 +122,6 @@ typedef struct SPluginInfo
std::string make_description_bz(const map_crash_data_t& pCrashData);
std::string make_description_reproduce_comment(const map_crash_data_t& pCrashData);
std::string make_description_logger(const map_crash_data_t& pCrashData);
-std::string make_description_catcut(const map_crash_data_t& pCrashData);
/**
* Loads settings and stores it in second parameter. On success it
diff --git a/lib/Utils/make_descr.cpp b/lib/Utils/make_descr.cpp
index 6f2586eb..7faafcb3 100644
--- a/lib/Utils/make_descr.cpp
+++ b/lib/Utils/make_descr.cpp
@@ -234,69 +234,3 @@ string make_description_reproduce_comment(const map_crash_data_t& pCrashData)
}
return howToReproduce + comment;
}
-
-/* This needs more work to make the result less ugly */
-string make_description_catcut(const map_crash_data_t& pCrashData)
-{
- map_crash_data_t::const_iterator end = pCrashData.end();
- map_crash_data_t::const_iterator it;
-
- string howToReproduce;
- it = pCrashData.find(FILENAME_REPRODUCE);
- if (it != end)
- {
- howToReproduce = "\n\nHow to reproduce\n"
- "-----\n";
- howToReproduce += it->second[CD_CONTENT];
- }
- string comment;
- it = pCrashData.find(FILENAME_COMMENT);
- if (it != end)
- {
- comment = "\n\nComment\n"
- "-----\n";
- comment += it->second[CD_CONTENT];
- }
-
- string pDescription = "\nabrt "VERSION" detected a crash.\n";
- pDescription += howToReproduce;
- pDescription += comment;
- pDescription += "\n\nAdditional information\n"
- "======\n";
-
- for (it = pCrashData.begin(); it != end; it++)
- {
- const string &filename = it->first;
- const string &type = it->second[CD_TYPE];
- const string &content = it->second[CD_CONTENT];
- if (type == CD_TXT)
- {
- if (content.length() <= CD_TEXT_ATT_SIZE)
- {
- if (filename != CD_DUPHASH
- && filename != FILENAME_ARCHITECTURE
- && filename != FILENAME_RELEASE
- && filename != FILENAME_REPRODUCE
- && filename != FILENAME_COMMENT
- ) {
- pDescription += '\n';
- pDescription += filename;
- pDescription += "\n-----\n";
- pDescription += content;
- pDescription += "\n\n";
- }
- } else {
- pDescription += "\n\nAttached files\n"
- "----\n";
- pDescription += filename;
- pDescription += '\n';
- }
- }
- else if (type == CD_BIN)
- {
- error_msg(_("Binary file %s will not be reported"), filename.c_str());
- }
- }
-
- return pDescription;
-}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 96f65bb5..13bb5d45 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,9 +1,7 @@
# [encoding: UTF-8]
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-lib/Plugins/Catcut.cpp
lib/Plugins/TicketUploader.cpp
-lib/Plugins/rhfastcheck.cpp
lib/Plugins/RHTSupport.cpp
lib/Utils/make_descr.cpp
src/Applet/abrt-applet.desktop.in