summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-11-12 12:04:21 +0100
committerDenys Vlasenko <dvlasenk@redhat.com>2010-11-12 12:04:21 +0100
commit65a7c3f41e795c93c097860e663aad1a3fa9b0c7 (patch)
tree94ffe15299e9c0e8a5fbcb8b15fa5e90452a7571
parent44d0593bd24d58ee4252a332655475bcf9f83577 (diff)
downloadabrt-65a7c3f41e795c93c097860e663aad1a3fa9b0c7.tar.gz
abrt-65a7c3f41e795c93c097860e663aad1a3fa9b0c7.tar.xz
abrt-65a7c3f41e795c93c097860e663aad1a3fa9b0c7.zip
Remove SOSreport plugin - abrt_event.conf supersedes it
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r--abrt.spec14
-rw-r--r--po/POTFILES.in3
-rw-r--r--src/daemon/abrt_event.conf2
-rw-r--r--src/plugins/Makefile.am6
-rw-r--r--src/plugins/SOSreport.conf1
-rw-r--r--src/plugins/SOSreport.cpp169
-rw-r--r--src/plugins/SOSreport.h31
-rw-r--r--src/plugins/abrt-Upload.76
8 files changed, 6 insertions, 226 deletions
diff --git a/abrt.spec b/abrt.spec
index 9918834b..71a39e68 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -133,15 +133,6 @@ Requires: mailx
The simple reporter plugin which sends a report via mailx to a specified
email address.
-%package plugin-sosreport
-Summary: %{name}'s sosreport plugin
-Group: System Environment/Libraries
-Requires: sos
-Requires: %{name} = %{version}-%{release}
-
-%description plugin-sosreport
-Plugin to include an sosreport in an abrt report.
-
%package plugin-bugzilla
Summary: %{name}'s bugzilla plugin
Group: System Environment/Libraries
@@ -420,11 +411,6 @@ fi
%{_libdir}/%{name}/Mailx.glade
%{_mandir}/man7/abrt-Mailx.7.gz
-%files plugin-sosreport
-%defattr(-,root,root,-)
-%config(noreplace) %{_sysconfdir}/%{name}/plugins/SOSreport.conf
-%{_libdir}/%{name}/libSOSreport.so*
-
%files plugin-bugzilla
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/plugins/Bugzilla.conf
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2c3a248a..0d1274ba 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -7,13 +7,12 @@ lib/plugins/KerneloopsScanner.cpp
lib/plugins/KerneloopsSysLog.cpp
lib/plugins/Mailx.cpp
lib/plugins/Python.cpp
-lib/plugins/SOSreport.cpp
lib/plugins/SQLite3.cpp
lib/plugins/Bugzilla.glade
lib/plugins/KerneloopsReporter.glade
lib/plugins/Logger.glade
lib/plugins/Mailx.glade
-lib/plugins/ReportUploader.glade
+lib/plugins/Upload.glade
lib/plugins/RHTSupport.glade
lib/utils/make_descr.cpp
lib/utils/abrt_curl.c
diff --git a/src/daemon/abrt_event.conf b/src/daemon/abrt_event.conf
index caf73f23..58126192 100644
--- a/src/daemon/abrt_event.conf
+++ b/src/daemon/abrt_event.conf
@@ -35,6 +35,8 @@ EVENT=post-create analyzer=Kerneloops abrt-action-analyze-oops
# oopses to be reported automatically and immediately without
# user interaction, uncomment this line:
#EVENT=post-create analyzer=Kerneloops abrt-action-kerneloops
+# Example: if you want to save sosreport immediately at the moment of a crash:
+#EVENT=post-create nice sosreport --tmp-dir "$DUMP_DIR" --batch --only=anaconda --only=bootloader --only=devicemapper --only=filesys --only=hardware --only=kernel --only=libraries --only=memory --only=networking --only=nfsserver --only=pam --only=process --only=rpm -k rpm.rpmva=off --only=ssh --only=startup --only=yum && { rm sosreport*.md5; mv sosreport*.tar.bz2 sosreport.tar.bz2; mv sosreport*.tar.xz sosreport.tar.xz; true; } 2>/dev/null
#TODO: implement this (or add this functionality to abrt-action-install-debuginfo):
#EVENT=analyze analyzer=CCpp backtrace= trim-debuginfo-cache /var/cache/abrt-di 4096m
diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am
index 743c8d1d..b1b9fac1 100644
--- a/src/plugins/Makefile.am
+++ b/src/plugins/Makefile.am
@@ -11,7 +11,6 @@ pluginslib_LTLIBRARIES = \
libMailx.la \
libKerneloopsScanner.la \
libKerneloops.la \
- libSOSreport.la \
libSQLite3.la
dist_pluginslib_DATA = \
@@ -32,7 +31,6 @@ dist_pluginsconf_DATA = \
Bugzilla.conf \
RHTSupport.conf \
Upload.conf \
- SOSreport.conf \
SQLite3.conf
man_MANS = \
@@ -86,10 +84,6 @@ libSQLite3_la_LDFLAGS = -avoid-version
libSQLite3_la_LIBADD = $(SQLITE3_LIBS) $(GLIB_LIBS)
libSQLite3_la_CPPFLAGS = -I$(INC_PATH) -I$(UTILS_PATH) $(SQLITE3_CFLAGS) -DLOCALSTATEDIR='"$(localstatedir)"' $(GLIB_CFLAGS)
-# SOSreport
-libSOSreport_la_SOURCES = SOSreport.cpp SOSreport.h
-libSOSreport_la_LDFLAGS = -avoid-version
-
# Python
libPython_la_SOURCES = Python.h Python.cpp
#libPython_la_LIBADD = $(NSS_LIBS)
diff --git a/src/plugins/SOSreport.conf b/src/plugins/SOSreport.conf
deleted file mode 100644
index 3201c6da..00000000
--- a/src/plugins/SOSreport.conf
+++ /dev/null
@@ -1 +0,0 @@
-Enabled = yes
diff --git a/src/plugins/SOSreport.cpp b/src/plugins/SOSreport.cpp
deleted file mode 100644
index 36a768fd..00000000
--- a/src/plugins/SOSreport.cpp
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- SOSreport.cpp
-
- Copyright (C) 2009 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_exception.h"
-#include "SOSreport.h"
-#include "abrt_exception.h"
-#include "comm_layer_inner.h"
-
-using namespace std;
-
-static char *ParseFilename(char *p)
-{
- /*
- the sosreport's filename is embedded in sosreport's output.
- It appears on the line after the string in 'sosreport_filename_marker',
- it has leading spaces, and a trailing newline. This function trims
- any leading and trailing whitespace from the filename.
- */
- static const char sosreport_filename_marker[] =
- "Your sosreport has been generated and saved in:";
-
- p = strstr(p, sosreport_filename_marker);
- if (!p)
- return p;
- p = skip_whitespace(p + sizeof(sosreport_filename_marker)-1);
- char *end = strchrnul(p, '\n');
- while (end > p && isspace(*end))
- *end-- = '\0';
- return p[0] == '/' ? p : NULL;
-}
-
-void CActionSOSreport::Run(const char *pActionDir, const char *pArgs, int force)
-{
- if (!force)
- {
- struct dump_dir *dd = dd_opendir(pActionDir, /*flags:*/ 0);
- if (!dd)
- return;
-
- bool bt_exists = dd_exist(dd, "sosreport.tar.bz2") || dd_exist(dd, "sosreport.tar.xz");
- if (bt_exists)
- {
- VERB3 log("%s already exists, not regenerating", "sosreport.tar.bz2");
- return;
- }
- dd_close(dd);
- }
-
- static const char command_default[] =
- "cd -- '%s' || exit 1;"
- "nice sosreport --tmp-dir . --batch"
- " --only=anaconda --only=bootloader"
- " --only=devicemapper --only=filesys --only=hardware --only=kernel"
- " --only=libraries --only=memory --only=networking --only=nfsserver"
- " --only=pam --only=process --only=rpm -k rpm.rpmva=off --only=ssh"
- " --only=startup --only=yum 2>&1;"
- "rm sosreport*.md5 2>/dev/null;"
- "mv sosreport*.tar.bz2 sosreport.tar.bz2 2>/dev/null;"
- "mv sosreport*.tar.xz sosreport.tar.xz 2>/dev/null;"
- ;
- static const char command_prefix[] =
- "cd -- '%s' || exit 1;"
- "nice sosreport --tmp-dir . --batch %s 2>&1;"
- "rm sosreport*.md5 2>/dev/null;"
- "mv sosreport*.tar.bz2 sosreport.tar.bz2 2>/dev/null;"
- "mv sosreport*.tar.xz sosreport.tar.xz 2>/dev/null;"
- ;
- string command;
-
- vector_string_t args;
- parse_args(pArgs, args, '"');
-
- if (args.size() == 0 || args[0] == "")
- {
- command = ssprintf(command_default, pActionDir);
- }
- else
- {
- command = ssprintf(command_prefix, pActionDir, args[0].c_str());
- }
-
- update_client(_("Running sosreport: %s"), command.c_str());
- string output = command;
- output += '\n';
- char *command_out = run_in_shell_and_save_output(/*flags:*/ 0, command.c_str(), /*dir:*/ NULL, /*size_p:*/ NULL);
- output += command_out;
- update_client(_("Finished running sosreport"));
- VERB3 log("sosreport output:'%s'", output.c_str());
-
-// Not needed: now we use "sosreport --tmp-dir DUMPDIR"
-#if 0
- // Parse:
- // "Your sosreport has been generated and saved in:
- // /tmp/sosreport-XXXX.tar.bz2"
- // Note: ParseFilename modifies its parameter and returns pointer
- // which points somewhere inside it.
- char *sosreport_filename = xstrdup(ParseFilename(command_out));
- free(command_out);
- if (!sosreport_filename)
- {
- throw CABRTException(EXCEP_PLUGIN, "Can't find filename in sosreport output");
- }
-
- char *sosreport_dd_filename = concat_path_file(pActionDir, "sosreport.tar");
- char *ext = strrchr(sosreport_filename, '.');
- if (ext && strcmp(ext, ".tar") != 0)
- {
- // Assuming it's .bz2, .gz or some such
- sosreport_dd_filename = append_to_malloced_string(sosreport_dd_filename, ext);
- }
-
- CDebugDump dd;
- if (!dd.Open(pActionDir))
- {
- VERB1 log(_("Unable to open debug dump '%s'"), pDebugDumpDir);
- free(sosreport_filename);
- free(sosreport_dd_filename);
- return;
- }
- //Not useful: dd.SaveText("sosreportoutput", output);
- off_t sz = copy_file(sosreport_filename, sosreport_dd_filename, 0644);
-
- // don't want to leave sosreport-XXXX.tar.bz2 in /tmp
- unlink(sosreport_filename);
- // sosreport-XXXX.tar.bz2.md5 too
- sosreport_filename = append_to_malloced_string(sosreport_filename, ".md5");
- unlink(sosreport_filename);
-
- dd.Close();
- if (sz < 0)
- {
- CABRTException e(EXCEP_PLUGIN,
- "Can't copy '%s' to '%s'",
- sosreport_filename, sosreport_dd_filename
- );
- free(sosreport_filename);
- free(sosreport_dd_filename);
- throw e;
- }
- free(sosreport_filename);
- free(sosreport_dd_filename);
-#endif
-}
-
-PLUGIN_INFO(ACTION,
- CActionSOSreport,
- "SOSreport",
- "0.0.2",
- _("Runs sosreport, saves the output"),
- "gavin@redhat.com",
- "https://fedorahosted.org/abrt/wiki",
- "");
diff --git a/src/plugins/SOSreport.h b/src/plugins/SOSreport.h
deleted file mode 100644
index 4b32940f..00000000
--- a/src/plugins/SOSreport.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- SOSreport.h - Attach an sosreport to a crash dump
-
- Copyright (C) 2009 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 SOSREPORT_H_
-#define SOSREPORT_H_
-
-#include "action.h"
-
-class CActionSOSreport : public CAction
-{
- public:
- virtual void Run(const char *pActionDir, const char *pArgs, int force);
-};
-
-#endif
diff --git a/src/plugins/abrt-Upload.7 b/src/plugins/abrt-Upload.7
index bd91f266..7d4ee57f 100644
--- a/src/plugins/abrt-Upload.7
+++ b/src/plugins/abrt-Upload.7
@@ -1,12 +1,12 @@
.TH abrt "7" "9 July 2009" ""
.SH NAME
-ReportUploader plugin for abrt(8)
+Upload plugin for abrt(8)
.SH DESCRIPTION
.P
.I abrt
is a daemon which watches for application crashes. When a crash occurs,
it collects the crash data and performs some actions according to
-the configuration. This manual page describes the \fIReportUploader\fP plugin
+the configuration. This manual page describes the \fIUpload\fP plugin
for \fIabrt\fP.
.P
This plugin will send a report to an anonymous FTP site. It's intended
@@ -25,7 +25,7 @@ in the ticketing system.
The plugin is invoked in the \fIabrt.conf\fP configuration file.
No parameters are necessary.
.SH CONFIGURATION
-The \fIReportUploader.conf\fP configuration file contains
+The \fIUpload.conf\fP configuration file contains
entries in a format "Option = Value". The options are:
.SS Customer
This is the customer's name or other customer identifier.