summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-11-11 14:14:30 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-11-11 14:14:30 +0100
commit3e50bc1750fa3ccd98a7bc79c3904ae937eb157d (patch)
treedf700ac4b861180879c8cabf743d29fc46090f8d
parente74cbbed77d3bb44b68c803633427da7225f3523 (diff)
downloadabrt-3e50bc1750fa3ccd98a7bc79c3904ae937eb157d.tar.gz
abrt-3e50bc1750fa3ccd98a7bc79c3904ae937eb157d.tar.xz
abrt-3e50bc1750fa3ccd98a7bc79c3904ae937eb157d.zip
remove "old" Bugzilla and RHTSupport plugins
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r--abrt.spec2
-rw-r--r--po/POTFILES.in2
-rw-r--r--src/daemon/MiddleWare.cpp6
-rw-r--r--src/gui/ConfBackend.py7
-rw-r--r--src/plugins/Bugzilla.cpp155
-rw-r--r--src/plugins/Bugzilla.h37
-rw-r--r--src/plugins/Makefile.am21
-rw-r--r--src/plugins/RHTSupport.cpp147
-rw-r--r--src/plugins/RHTSupport.h38
9 files changed, 6 insertions, 409 deletions
diff --git a/abrt.spec b/abrt.spec
index 7d322310..0c39e9ae 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -437,7 +437,6 @@ fi
%files plugin-bugzilla
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Bugzilla.conf
-%{_libdir}/%{name}/libBugzilla.so*
%{_libdir}/%{name}/Bugzilla.glade
%{_mandir}/man7/abrt-Bugzilla.7.gz
%{_libexecdir}/abrt-action-bugzilla
@@ -445,7 +444,6 @@ fi
%files plugin-rhtsupport
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/plugins/RHTSupport.conf
-%{_libdir}/%{name}/libRHTSupport.so*
%{_libdir}/%{name}/RHTSupport.glade
#%{_mandir}/man7/abrt-RHTSupport.7.gz
%{_libexecdir}/abrt-action-rhtsupport
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 29c6746a..493bbe43 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,6 @@
# [encoding: UTF-8]
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
-lib/plugins/Bugzilla.cpp
lib/plugins/CCpp.cpp
lib/plugins/FileTransfer.cpp
lib/plugins/Kerneloops.cpp
@@ -11,7 +10,6 @@ lib/plugins/KerneloopsSysLog.cpp
lib/plugins/Mailx.cpp
lib/plugins/Python.cpp
lib/plugins/ReportUploader.cpp
-lib/plugins/RHTSupport.cpp
lib/plugins/SOSreport.cpp
lib/plugins/SQLite3.cpp
lib/plugins/Bugzilla.glade
diff --git a/src/daemon/MiddleWare.cpp b/src/daemon/MiddleWare.cpp
index bc807d4b..a29f2f3d 100644
--- a/src/daemon/MiddleWare.cpp
+++ b/src/daemon/MiddleWare.cpp
@@ -891,9 +891,7 @@ void GetPluginsInfo(map_map_string_t &map_of_plugin_info)
void GetPluginSettings(const char *plugin_name, map_plugin_settings_t &plugin_settings)
{
char *conf_file = xasprintf(PLUGINS_CONF_DIR"/%s.conf", plugin_name);
- LoadPluginSettings(conf_file, plugin_settings);
+ if (LoadPluginSettings(conf_file, plugin_settings, /*skip w/o value:*/ false))
+ VERB3 log("Loaded %s.conf", plugin_name);
free(conf_file);
- /* If settings are empty, most likely .conf file does not exist.
- * Don't mislead the user: */
- VERB3 if (!plugin_settings.empty()) log("Loaded %s.conf", plugin_name);
}
diff --git a/src/gui/ConfBackend.py b/src/gui/ConfBackend.py
index ca362a6b..36c15ff2 100644
--- a/src/gui/ConfBackend.py
+++ b/src/gui/ConfBackend.py
@@ -93,9 +93,9 @@ class ConfBackendGnomeKeyring(ConfBackend):
try:
item_list = gkey.find_items_sync(gkey.ITEM_GENERIC_SECRET, { "AbrtPluginInfo": str(name) })
for item in item_list:
- log2("found old keyring item: ring:'%s' item_id:%s attrs:%s", item.keyring, item.item_id, str(item.attributes))
- log2("deleting it from keyring '%s'", g_default_key_ring)
- gkey.item_delete_sync(g_default_key_ring, item.item_id)
+ log2("found old keyring item: ring:'%s' item_id:%s attrs:%s", item.keyring, item.item_id, str(item.attributes))
+ log2("deleting it from keyring '%s'", g_default_key_ring)
+ gkey.item_delete_sync(g_default_key_ring, item.item_id)
except gkey.NoMatchError:
# nothing found
pass
@@ -115,6 +115,7 @@ class ConfBackendGnomeKeyring(ConfBackend):
settings_tmp, # attrs
password, # secret
True)
+ log2("saved new keyring item:%s", str(settings_tmp))
except gkey.DeniedError:
raise ConfBackendSaveError(_("Access to gnome-keyring has been denied, plugins settings will not be saved."))
diff --git a/src/plugins/Bugzilla.cpp b/src/plugins/Bugzilla.cpp
deleted file mode 100644
index 452d7a58..00000000
--- a/src/plugins/Bugzilla.cpp
+++ /dev/null
@@ -1,155 +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 "crash_types.h"
-#include "abrt_exception.h"
-#include "comm_layer_inner.h"
-#include "Bugzilla.h"
-
-using namespace std;
-
-CReporterBugzilla::CReporterBugzilla()
-{
- m_pSettings["BugzillaURL"] = "https://bugzilla.redhat.com";
- m_pSettings["Login"] = "";
- m_pSettings["Password"] = "";
- m_pSettings["SSLVerify"] = "yes";
- m_pSettings["RatingRequired"] = "yes";
-}
-
-CReporterBugzilla::~CReporterBugzilla()
-{
-}
-
-void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings)
-{
-//BUG! This gets called when user's keyring contains login data,
-//then it takes precedence over /etc/abrt/plugins/Bugzilla.conf.
-//I got a case when keyring had a STALE password, and there was no way
-//for me to know that it is being used. Moreover, when I discovered it
-//(by hacking abrt source!), I don't know how to purge it from the keyring.
-//At the very least, log("SOMETHING") here.
-
- /* Can't simply do this:
-
- m_pSettings = pSettings;
-
- * - it will erase keys which aren't present in pSettings.
- * Example: if Bugzilla.conf doesn't have "Login = foo",
- * then there's no pSettings["Login"] and m_pSettings = pSettings
- * will nuke default m_pSettings["Login"] = "",
- * making GUI think that we have no "Login" key at all
- * and thus never overriding it - even if it *has* an override!
- */
-
- map_plugin_settings_t::iterator it = m_pSettings.begin();
- while (it != m_pSettings.end())
- {
- map_plugin_settings_t::const_iterator override = pSettings.find(it->first);
- if (override != pSettings.end())
- {
- VERB3 log(" 3 settings[%s]='%s'", it->first.c_str(), it->second.c_str());
- it->second = override->second;
- }
- it++;
- }
-}
-
-string CReporterBugzilla::Report(const map_crash_data_t& crash_data,
- const map_plugin_settings_t& settings,
- const char *args)
-{
- /* abrt-action-bugzilla [-s] -c /etc/arbt/Bugzilla.conf -c - -d pCrashData.dir NULL */
- char *argv[9];
- char **pp = argv;
- *pp++ = (char*)"abrt-action-bugzilla";
-
-//We want to consume output, so don't redirect to syslog.
-// if (logmode & LOGMODE_SYSLOG)
-// *pp++ = (char*)"-s";
-//TODO: the actions<->daemon interaction will be changed anyway...
-
- *pp++ = (char*)"-c";
- *pp++ = (char*)(PLUGINS_CONF_DIR"/Bugzilla."PLUGINS_CONF_EXTENSION);
- *pp++ = (char*)"-c";
- *pp++ = (char*)"-";
- *pp++ = (char*)"-d";
- *pp++ = (char*)get_crash_data_item_content_or_NULL(crash_data, CD_DUMPDIR);
- *pp = NULL;
- int pipefds[2];
- pid_t pid = fork_execv_on_steroids(EXECFLG_INPUT + EXECFLG_OUTPUT + EXECFLG_ERR2OUT,
- argv,
- pipefds,
- /* unsetenv_vec: */ NULL,
- /* dir: */ NULL,
- /* uid(unused): */ 0
- );
-
- /* Write the configuration to stdin */
- map_plugin_settings_t::const_iterator it = settings.begin();
- while (it != settings.end())
- {
- full_write_str(pipefds[1], it->first.c_str());
- full_write_str(pipefds[1], "=");
- full_write_str(pipefds[1], it->second.c_str());
- full_write_str(pipefds[1], "\n");
- it++;
- }
- close(pipefds[1]);
-
- FILE *fp = fdopen(pipefds[0], "r");
- if (!fp)
- die_out_of_memory();
-
- /* Consume log from stdout */
- string bug_status;
- char *buf;
- while ((buf = xmalloc_fgetline(fp)) != NULL)
- {
- if (strncmp(buf, "STATUS:", 7) == 0)
- bug_status = buf + 7;
- else
- if (strncmp(buf, "EXCEPT:", 7) == 0)
- {
- CABRTException e(EXCEP_PLUGIN, "%s", buf + 7);
- free(buf);
- fclose(fp);
- waitpid(pid, NULL, 0);
- throw e;
- }
- update_client("%s", buf);
- free(buf);
- }
-
- fclose(fp); /* this also closes pipefds[0] */
- /* wait for child to actually exit, and prevent leaving a zombie behind */
- waitpid(pid, NULL, 0);
-
- return bug_status;
-}
-
-PLUGIN_INFO(REPORTER,
- CReporterBugzilla,
- "Bugzilla",
- "0.0.4",
- _("Reports bugs to bugzilla"),
- "npajkovs@redhat.com",
- "https://fedorahosted.org/abrt/wiki",
- PLUGINS_LIB_DIR"/Bugzilla.glade");
diff --git a/src/plugins/Bugzilla.h b/src/plugins/Bugzilla.h
deleted file mode 100644
index d7f3acf0..00000000
--- a/src/plugins/Bugzilla.h
+++ /dev/null
@@ -1,37 +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 BUGZILLA_H_
-#define BUGZILLA_H_
-
-#include "plugin.h"
-#include "reporter.h"
-
-class CReporterBugzilla : public CReporter
-{
- public:
- CReporterBugzilla();
- virtual ~CReporterBugzilla();
-
- 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);
-};
-
-#endif /* BUGZILLA_H_ */
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 2cb85709..269f667f 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -13,8 +13,6 @@ pluginslib_LTLIBRARIES = \
libKerneloops.la \
libKerneloopsReporter.la \
libSOSreport.la \
- libBugzilla.la \
- libRHTSupport.la \
libReportUploader.la \
libPython.la \
libFileTransfer.la
@@ -102,25 +100,6 @@ libSQLite3_la_CPPFLAGS = -I$(INC_PATH) -I$(UTILS_PATH) $(SQLITE3_CFLAGS) -DLOCAL
libSOSreport_la_SOURCES = SOSreport.cpp SOSreport.h
libSOSreport_la_LDFLAGS = -avoid-version
-# Bugzilla
-libBugzilla_la_SOURCES = Bugzilla.h Bugzilla.cpp
-libBugzilla_la_LIBADD =
-libBugzilla_la_LDFLAGS = -avoid-version
-libBugzilla_la_CPPFLAGS = \
- -I$(INC_PATH) -I$(UTILS_PATH) \
- -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\"
-
-# RHTSupport
-libRHTSupport_la_SOURCES = RHTSupport.h RHTSupport.cpp
-libRHTSupport_la_LIBADD =
-libRHTSupport_la_LDFLAGS = -avoid-version
-libRHTSupport_la_CPPFLAGS = \
- -I$(INC_PATH) -I$(UTILS_PATH) \
- -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" \
- -DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
- -DLOCALSTATEDIR='"$(localstatedir)"'
-
# ReportUploader
libReportUploader_la_SOURCES = ReportUploader.h ReportUploader.cpp
libReportUploader_la_LDFLAGS = -avoid-version
diff --git a/src/plugins/RHTSupport.cpp b/src/plugins/RHTSupport.cpp
deleted file mode 100644
index 3732afe3..00000000
--- a/src/plugins/RHTSupport.cpp
+++ /dev/null
@@ -1,147 +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 "crash_types.h"
-#include "abrt_exception.h"
-#include "comm_layer_inner.h"
-#include "RHTSupport.h"
-
-using namespace std;
-
-CReporterRHticket::CReporterRHticket()
-{
- m_pSettings["URL"] = "https://api.access.redhat.com/rs";
- m_pSettings["Login"] = "";
- m_pSettings["Password"] = "";
- m_pSettings["SSLVerify"] = "yes";
-}
-
-CReporterRHticket::~CReporterRHticket()
-{
-}
-
-void CReporterRHticket::SetSettings(const map_plugin_settings_t& pSettings)
-{
- /* Can't simply do this:
-
- m_pSettings = pSettings;
-
- * - it will erase keys which aren't present in pSettings.
- * Example: if Bugzilla.conf doesn't have "Login = foo",
- * then there's no pSettings["Login"] and m_pSettings = pSettings
- * will nuke default m_pSettings["Login"] = "",
- * making GUI think that we have no "Login" key at all
- * and thus never overriding it - even if it *has* an override!
- */
-
- map_plugin_settings_t::iterator it = m_pSettings.begin();
- while (it != m_pSettings.end())
- {
- map_plugin_settings_t::const_iterator override = pSettings.find(it->first);
- if (override != pSettings.end())
- {
- VERB3 log(" rhtsupport settings[%s]='%s'", it->first.c_str(), it->second.c_str());
- it->second = override->second;
- }
- it++;
- }
-}
-
-string CReporterRHticket::Report(const map_crash_data_t& crash_data,
- const map_plugin_settings_t& settings,
- const char *args)
-{
- /* abrt-action-rhtsupport [-s] -c /etc/arbt/RHTSupport.conf -c - -d pCrashData.dir NULL */
- char *argv[9];
- char **pp = argv;
- *pp++ = (char*)"abrt-action-rhtsupport";
-
-//We want to consume output, so don't redirect to syslog.
-// if (logmode & LOGMODE_SYSLOG)
-// *pp++ = (char*)"-s";
-//TODO: the actions<->daemon interaction will be changed anyway...
-
- *pp++ = (char*)"-c";
- *pp++ = (char*)(PLUGINS_CONF_DIR"/RHTSupport."PLUGINS_CONF_EXTENSION);
- *pp++ = (char*)"-c";
- *pp++ = (char*)"-";
- *pp++ = (char*)"-d";
- *pp++ = (char*)get_crash_data_item_content_or_NULL(crash_data, CD_DUMPDIR);
- *pp = NULL;
- int pipefds[2];
- pid_t pid = fork_execv_on_steroids(EXECFLG_INPUT + EXECFLG_OUTPUT + EXECFLG_ERR2OUT,
- argv,
- pipefds,
- /* unsetenv_vec: */ NULL,
- /* dir: */ NULL,
- /* uid(unused): */ 0
- );
-
- /* Write the configuration to stdin */
- map_plugin_settings_t::const_iterator it = settings.begin();
- while (it != settings.end())
- {
- full_write_str(pipefds[1], it->first.c_str());
- full_write_str(pipefds[1], "=");
- full_write_str(pipefds[1], it->second.c_str());
- full_write_str(pipefds[1], "\n");
- it++;
- }
- close(pipefds[1]);
-
- FILE *fp = fdopen(pipefds[0], "r");
- if (!fp)
- die_out_of_memory();
-
- /* Consume log from stdout */
- string bug_status;
- char *buf;
- while ((buf = xmalloc_fgetline(fp)) != NULL)
- {
- if (strncmp(buf, "STATUS:", 7) == 0)
- bug_status = buf + 7;
- else
- if (strncmp(buf, "EXCEPT:", 7) == 0)
- {
- CABRTException e(EXCEP_PLUGIN, "%s", buf + 7);
- free(buf);
- fclose(fp);
- waitpid(pid, NULL, 0);
- throw e;
- }
- update_client("%s", buf);
- free(buf);
- }
-
- fclose(fp); /* this also closes pipefds[0] */
- /* wait for child to actually exit, and prevent leaving a zombie behind */
- waitpid(pid, NULL, 0);
-
- return bug_status;
-}
-
-PLUGIN_INFO(REPORTER,
- CReporterRHticket,
- "RHticket",
- "0.0.4",
- _("Reports bugs to Red Hat support"),
- "Denys Vlasenko <dvlasenk@redhat.com>",
- "https://fedorahosted.org/abrt/wiki",
- PLUGINS_LIB_DIR"/RHTSupport.glade");
diff --git a/src/plugins/RHTSupport.h b/src/plugins/RHTSupport.h
deleted file mode 100644
index 2338732f..00000000
--- a/src/plugins/RHTSupport.h
+++ /dev/null
@@ -1,38 +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 RHTICKET_H_
-#define RHTICKET_H_
-
-#include "plugin.h"
-#include "reporter.h"
-
-class CReporterRHticket: public CReporter
-{
- public:
- CReporterRHticket();
- virtual ~CReporterRHticket();
-
- 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);
-};
-
-#endif