summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-02-07 23:11:00 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2010-02-07 23:11:00 +0100
commit4169595397ba962f230033b921964cae1629736d (patch)
tree94e0a25a1c6b32e8b2d475ba3ab02d7ba7eaf075
parent8569385a9a7f679e32febafda8e8bdcfdf0fa64a (diff)
parent2ce0dac4d05ce449f4d054c4725a852a43aab428 (diff)
Merge branch 'master' into rhel6
-rw-r--r--doc/HOW_TO_TEST4
-rw-r--r--inc/ABRTException.h18
-rw-r--r--inc/CrashTypesSocket.h3
-rw-r--r--inc/abrt_types.h3
-rw-r--r--inc/abrtlib.h13
-rw-r--r--lib/Plugins/Bugzilla.cpp20
-rw-r--r--lib/Plugins/Bugzilla.h18
-rw-r--r--lib/Plugins/CCpp.cpp46
-rw-r--r--lib/Plugins/CCpp.h5
-rw-r--r--lib/Plugins/Catcut.cpp18
-rw-r--r--lib/Plugins/Catcut.h18
-rw-r--r--lib/Plugins/FileTransfer.cpp3
-rw-r--r--lib/Plugins/FileTransfer.h3
-rw-r--r--lib/Plugins/Firefox.cpp5
-rw-r--r--lib/Plugins/Firefox.h3
-rw-r--r--lib/Plugins/Logger.cpp5
-rw-r--r--lib/Plugins/Logger.h3
-rw-r--r--lib/Plugins/Mailx.cpp5
-rw-r--r--lib/Plugins/Mailx.h3
-rw-r--r--lib/Plugins/Python.cpp18
-rw-r--r--lib/Plugins/Python.h18
-rw-r--r--lib/Plugins/RunApp.cpp3
-rw-r--r--lib/Plugins/RunApp.h3
-rw-r--r--lib/Plugins/SOSreport.cpp2
-rw-r--r--lib/Plugins/SOSreport.h3
-rw-r--r--lib/Plugins/SQLite3.cpp4
-rw-r--r--lib/Plugins/SQLite3.h3
-rw-r--r--lib/Plugins/TicketUploader.cpp3
-rw-r--r--lib/Plugins/TicketUploader.h3
-rw-r--r--lib/Utils/ABRTException.cpp18
-rw-r--r--lib/Utils/Action.h3
-rw-r--r--lib/Utils/Analyzer.h3
-rw-r--r--lib/Utils/CommLayerInner.cpp18
-rw-r--r--lib/Utils/CommLayerInner.h18
-rw-r--r--lib/Utils/CrashTypesSocket.cpp3
-rw-r--r--lib/Utils/DBusCommon.h3
-rw-r--r--lib/Utils/Database.h4
-rw-r--r--lib/Utils/DebugDump.cpp14
-rw-r--r--lib/Utils/DebugDump.h3
-rw-r--r--lib/Utils/Makefile.am2
-rw-r--r--lib/Utils/Observer.h18
-rw-r--r--lib/Utils/Plugin.cpp3
-rw-r--r--lib/Utils/Plugin.h3
-rw-r--r--lib/Utils/Reporter.h3
-rw-r--r--lib/Utils/abrt_dbus.cpp18
-rw-r--r--lib/Utils/abrt_dbus.h18
-rw-r--r--lib/Utils/abrt_xmlrpc.cpp18
-rw-r--r--lib/Utils/abrt_xmlrpc.h18
-rw-r--r--lib/Utils/make_descr.cpp18
-rw-r--r--lib/Utils/numtoa.cpp34
-rw-r--r--lib/Utils/parse_release.cpp18
-rw-r--r--lib/Utils/stringops.cpp18
-rw-r--r--lib/Utils/test.cpp3
-rw-r--r--lib/Utils/xconnect.cpp1
-rw-r--r--po/nl.po483
-rwxr-xr-xscripts/abrt-bz-ratingfixer146
-rwxr-xr-xscripts/abrt-bz-stats35
-rw-r--r--scripts/abrt-rate-backtrace.c183
-rw-r--r--src/Applet/Applet.cpp13
-rw-r--r--src/Applet/CCApplet.cpp11
-rw-r--r--src/Applet/CCApplet.h3
-rwxr-xr-xsrc/Backtrace/abrt-bz-dupchecker66
-rwxr-xr-xsrc/Backtrace/abrt-bz-hashchecker2
-rw-r--r--src/CLI/ABRTSocket.cpp18
-rw-r--r--src/CLI/ABRTSocket.h18
-rw-r--r--src/CLI/dbus.cpp28
-rw-r--r--src/CLI/dbus.h14
-rw-r--r--src/CLI/report.cpp55
-rw-r--r--src/Daemon/CommLayerServer.cpp18
-rw-r--r--src/Daemon/CommLayerServer.h19
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp18
-rw-r--r--src/Daemon/CommLayerServerDBus.h18
-rw-r--r--src/Daemon/CommLayerServerSocket.cpp18
-rw-r--r--src/Daemon/CommLayerServerSocket.h18
-rw-r--r--src/Daemon/CrashWatcher.cpp3
-rw-r--r--src/Daemon/CrashWatcher.h3
-rw-r--r--src/Daemon/Daemon.cpp3
-rw-r--r--src/Daemon/Daemon.h3
-rw-r--r--src/Daemon/MiddleWare.cpp3
-rw-r--r--src/Daemon/MiddleWare.h3
-rw-r--r--src/Daemon/PluginManager.cpp23
-rw-r--r--src/Daemon/PluginManager.h3
-rw-r--r--src/Daemon/RPM.cpp18
-rw-r--r--src/Daemon/RPM.h3
-rw-r--r--src/Daemon/Settings.cpp58
-rw-r--r--src/Daemon/Settings.h18
-rw-r--r--src/Daemon/abrt.conf2
87 files changed, 1421 insertions, 442 deletions
diff --git a/doc/HOW_TO_TEST b/doc/HOW_TO_TEST
index d5103dd..d11c6d8 100644
--- a/doc/HOW_TO_TEST
+++ b/doc/HOW_TO_TEST
@@ -13,7 +13,7 @@ II. Crash detection
b) edit some packaged python script to raise an exception and watch is abrt
detects it
c) use our saved kerneloopses and test detection of oopses
-
+
== 2. Advanced crash detection ==
a) crash some app that comes from unsigned package - abrt should ignore it
b) disable the gpg chcek and try repeat step a) - abrt shouldn't ignore it
@@ -21,7 +21,7 @@ II. Crash detection
III. Reporting
=============
== 1. Reporting to bugzilla ==
- a) try to report some crash to bz using gui
+ a) try to report some crash to bz using gui
- gui should ask for login+pass
- crash should be reported after filling the right credentials
b) try to report using gui without gnome-keyring
diff --git a/inc/ABRTException.h b/inc/ABRTException.h
index dc18132..b826bfa 100644
--- a/inc/ABRTException.h
+++ b/inc/ABRTException.h
@@ -1,3 +1,21 @@
+/*
+ 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 ABRTEXCEPTION_H_
#define ABRTEXCEPTION_H_
diff --git a/inc/CrashTypesSocket.h b/inc/CrashTypesSocket.h
index db3ee44..85f1456 100644
--- a/inc/CrashTypesSocket.h
+++ b/inc/CrashTypesSocket.h
@@ -17,8 +17,7 @@
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 SOCKETCRASHTYPES_H_
#define SOCKETCRASHTYPES_H_
diff --git a/inc/abrt_types.h b/inc/abrt_types.h
index d096ddd..ae22b03 100644
--- a/inc/abrt_types.h
+++ b/inc/abrt_types.h
@@ -15,8 +15,7 @@
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 ABRT_TYPES_H_
#define ABRT_TYPES_H_
diff --git a/inc/abrtlib.h b/inc/abrtlib.h
index 6b1db55..5e0dc46 100644
--- a/inc/abrtlib.h
+++ b/inc/abrtlib.h
@@ -39,8 +39,6 @@
#include <grp.h>
/* C++ bits */
#include <string>
-#include <sstream>
-#include <iostream>
#include "abrt_types.h"
@@ -261,13 +259,14 @@ double get_dirsize_find_largest_dir(
std::string *worst_dir = NULL,
const char *excluded = NULL);
+std::string unsigned_to_string(unsigned long long x);
+std::string signed_to_string(long long x);
template <class T>
-std::string
-to_string(T x)
+std::string to_string(T x)
{
- std::ostringstream o;
- o << x;
- return o.str();
+ if (T(~T(0)) < T(0)) /* T is a signed type */
+ return unsigned_to_string(x);
+ return signed_to_string(x);
}
void parse_args(const char *psArgs, vector_string_t& pArgs, int quote = -1);
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index fa6b35e..b809e34 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 <xmlrpc-c/base.h>
#include <xmlrpc-c/client.h>
#include "abrtlib.h"
@@ -185,7 +203,7 @@ void ctx::add_plus_one_cc(uint32_t bug_id, const char* login)
xmlrpc_env env;
xmlrpc_env_init(&env);
- xmlrpc_value* param = xmlrpc_build_value(&env, "({s:i,s:{s:(s)}})", "ids", bug_id, "updates", "add_cc", login);
+ xmlrpc_value* param = xmlrpc_build_value(&env, "({s:i,s:{s:(s)}})", "ids", bug_id, "updates", "add_cc", login);
throw_if_xml_fault_occurred(&env); // failed to allocate memory
xmlrpc_value* result = NULL;
diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h
index 571d0c6..7ee7b01 100644
--- a/lib/Plugins/Bugzilla.h
+++ b/lib/Plugins/Bugzilla.h
@@ -1,3 +1,21 @@
+/*
+ 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_
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 50423b7..7b3eab1 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -17,10 +17,7 @@
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 <fstream>
-#include <sstream>
+*/
#include <set>
#include <iomanip>
//#include <nss.h>
@@ -702,21 +699,21 @@ string CAnalyzerCCpp::GetGlobalUUID(const char *pDebugDumpDir)
{
perror_msg("abrt-backtrace not executed properly, "
"status: %x signal: %d", status, WIFSIGNALED(status));
- }
+ }
else
{
int exit_status = WEXITSTATUS(status);
if (exit_status == 79) /* EX_PARSINGFAILED */
{
- /* abrt-backtrace returns alternative backtrace
- representation in this case, so everything will work
+ /* abrt-backtrace returns alternative backtrace
+ representation in this case, so everything will work
as expected except worse duplication detection */
log_msg("abrt-backtrace failed to parse the backtrace");
}
else if (exit_status == 80) /* EX_THREADDETECTIONFAILED */
{
- /* abrt-backtrace returns backtrace with all threads
- in this case, so everything will work as expected
+ /* abrt-backtrace returns backtrace with all threads
+ in this case, so everything will work as expected
except worse duplication detection */
log_msg("abrt-backtrace failed to determine crash frame");
}
@@ -890,12 +887,13 @@ static int set_limits()
void CAnalyzerCCpp::Init()
{
- ifstream fInCorePattern;
- fInCorePattern.open(CORE_PATTERN_IFACE);
- if (fInCorePattern.is_open())
+ FILE *fp = fopen(CORE_PATTERN_IFACE, "r");
+ if (fp)
{
- getline(fInCorePattern, m_sOldCorePattern);
- fInCorePattern.close();
+ char line[PATH_MAX];
+ if (fgets(line, sizeof(line), fp))
+ m_sOldCorePattern = line;
+ fclose(fp);
}
if (m_sOldCorePattern[0] == '|')
{
@@ -915,28 +913,26 @@ void CAnalyzerCCpp::Init()
}
}
#ifdef HOSTILE_KERNEL
- if(set_limits() != 0)
+ if (set_limits() != 0)
log("warning: failed to set core_size limit, ABRT won't detect crashes in"
"compiled apps");
#endif
- ofstream fOutCorePattern;
- fOutCorePattern.open(CORE_PATTERN_IFACE);
- if (fOutCorePattern.is_open())
+ fp = fopen(CORE_PATTERN_IFACE, "w");
+ if (fp)
{
- fOutCorePattern << CORE_PATTERN << endl;
- fOutCorePattern.close();
+ fputs(CORE_PATTERN, fp);
+ fclose(fp);
}
}
void CAnalyzerCCpp::DeInit()
{
- ofstream fOutCorePattern;
- fOutCorePattern.open(CORE_PATTERN_IFACE);
- if (fOutCorePattern.is_open())
+ FILE *fp = fopen(CORE_PATTERN_IFACE, "w");
+ if (fp)
{
- fOutCorePattern << m_sOldCorePattern << endl;
- fOutCorePattern.close();
+ fputs(m_sOldCorePattern.c_str(), fp);
+ fclose(fp);
}
}
diff --git a/lib/Plugins/CCpp.h b/lib/Plugins/CCpp.h
index 03ba5ee..afdc2c6 100644
--- a/lib/Plugins/CCpp.h
+++ b/lib/Plugins/CCpp.h
@@ -1,6 +1,6 @@
/*
CCpp.h - header file for C/C++ analyzer plugin
- - it can ger UUID and memory maps from core files
+ - it can get UUID and memory maps from core files
Copyright (C) 2009 Zdenek Prikryl (zprikryl@redhat.com)
Copyright (C) 2009 RedHat inc.
@@ -18,8 +18,7 @@
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 CCPP_H_
#define CCPP_H_
diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp
index badca4b..4854636 100644
--- a/lib/Plugins/Catcut.cpp
+++ b/lib/Plugins/Catcut.cpp
@@ -1,3 +1,21 @@
+/*
+ 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_xmlrpc.h"
#include "Catcut.h"
diff --git a/lib/Plugins/Catcut.h b/lib/Plugins/Catcut.h
index 65c7044..427dd37 100644
--- a/lib/Plugins/Catcut.h
+++ b/lib/Plugins/Catcut.h
@@ -1,3 +1,21 @@
+/*
+ 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_
diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp
index 5479f9f..8f5bc6d 100644
--- a/lib/Plugins/FileTransfer.cpp
+++ b/lib/Plugins/FileTransfer.cpp
@@ -17,8 +17,7 @@
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 _GNU_SOURCE
# define _GNU_SOURCE
#endif
diff --git a/lib/Plugins/FileTransfer.h b/lib/Plugins/FileTransfer.h
index 2548c50..8f77223 100644
--- a/lib/Plugins/FileTransfer.h
+++ b/lib/Plugins/FileTransfer.h
@@ -18,8 +18,7 @@
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 FILETRANSFER_H_
#define FILETRANSFER_H_
diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp
index 7bee46d..3cb9c93 100644
--- a/lib/Plugins/Firefox.cpp
+++ b/lib/Plugins/Firefox.cpp
@@ -17,10 +17,7 @@
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 <fstream>
-#include <sstream>
+*/
#include <set>
#include <iomanip>
#include <nss.h>
diff --git a/lib/Plugins/Firefox.h b/lib/Plugins/Firefox.h
index dd7758d..d3f67ba 100644
--- a/lib/Plugins/Firefox.h
+++ b/lib/Plugins/Firefox.h
@@ -18,8 +18,7 @@
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 CCPP_H_
#define CCPP_H_
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index 3424d73..a0c2364 100644
--- a/lib/Plugins/Logger.cpp
+++ b/lib/Plugins/Logger.cpp
@@ -17,10 +17,7 @@
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 <fstream>
-#include <sstream>
+*/
#include "abrtlib.h"
#include "Logger.h"
#include "DebugDump.h"
diff --git a/lib/Plugins/Logger.h b/lib/Plugins/Logger.h
index 02429b2..8801dd4 100644
--- a/lib/Plugins/Logger.h
+++ b/lib/Plugins/Logger.h
@@ -18,8 +18,7 @@
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 LOGGER_H_
#define LOGGER_H_
diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp
index 2ee9645..50bc392 100644
--- a/lib/Plugins/Mailx.cpp
+++ b/lib/Plugins/Mailx.cpp
@@ -17,10 +17,7 @@
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 <stdio.h>
+*/
#include "abrtlib.h"
#include "Mailx.h"
#include "DebugDump.h"
diff --git a/lib/Plugins/Mailx.h b/lib/Plugins/Mailx.h
index 619e349..c71d83d 100644
--- a/lib/Plugins/Mailx.h
+++ b/lib/Plugins/Mailx.h
@@ -18,8 +18,7 @@
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 MAILX_H_
#define MAILX_H_
diff --git a/lib/Plugins/Python.cpp b/lib/Plugins/Python.cpp
index ad95468..cf4d81e 100644
--- a/lib/Plugins/Python.cpp
+++ b/lib/Plugins/Python.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 "Python.h"
#include "DebugDump.h"
diff --git a/lib/Plugins/Python.h b/lib/Plugins/Python.h
index 82f52c0..6de2cbb 100644
--- a/lib/Plugins/Python.h
+++ b/lib/Plugins/Python.h
@@ -1,3 +1,21 @@
+/*
+ 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 PYTHON_H_
#define PYTHON_H_
diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp
index ecbecf2..c7d5183 100644
--- a/lib/Plugins/RunApp.cpp
+++ b/lib/Plugins/RunApp.cpp
@@ -17,8 +17,7 @@
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 "RunApp.h"
#include "DebugDump.h"
diff --git a/lib/Plugins/RunApp.h b/lib/Plugins/RunApp.h
index da465f8..390b60a 100644
--- a/lib/Plugins/RunApp.h
+++ b/lib/Plugins/RunApp.h
@@ -17,8 +17,7 @@
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 RUNAPP_H_
#define RUNAPP_H_
diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp
index bc71e23..188d16d 100644
--- a/lib/Plugins/SOSreport.cpp
+++ b/lib/Plugins/SOSreport.cpp
@@ -17,8 +17,6 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-//#include <fstream>
-//#include <sstream>
#include "abrtlib.h"
#include "abrt_types.h"
#include "ABRTException.h"
diff --git a/lib/Plugins/SOSreport.h b/lib/Plugins/SOSreport.h
index bd08eee..d5c4423 100644
--- a/lib/Plugins/SOSreport.h
+++ b/lib/Plugins/SOSreport.h
@@ -16,8 +16,7 @@
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_
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp
index 80cbd82..97f99b6 100644
--- a/lib/Plugins/SQLite3.cpp
+++ b/lib/Plugins/SQLite3.cpp
@@ -17,10 +17,8 @@
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 <sqlite3.h>
-#include <string>
#include "abrtlib.h"
#include "SQLite3.h"
#include "ABRTException.h"
diff --git a/lib/Plugins/SQLite3.h b/lib/Plugins/SQLite3.h
index dfebf5d..d4b321a 100644
--- a/lib/Plugins/SQLite3.h
+++ b/lib/Plugins/SQLite3.h
@@ -17,8 +17,7 @@
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 SQLITE3_H_
#define SQLITE3_H_
diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp
index d924b91..a7151b5 100644
--- a/lib/Plugins/TicketUploader.cpp
+++ b/lib/Plugins/TicketUploader.cpp
@@ -16,8 +16,7 @@
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 <string>
+*/
#include "abrtlib.h"
#include "abrt_xmlrpc.h" /* for xcurl_easy_init */
#include "TicketUploader.h"
diff --git a/lib/Plugins/TicketUploader.h b/lib/Plugins/TicketUploader.h
index a719d0b..402e2cc 100644
--- a/lib/Plugins/TicketUploader.h
+++ b/lib/Plugins/TicketUploader.h
@@ -20,8 +20,7 @@
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 TICKETUPLOADER_H_
#define TICKETUPLOADER_H_
diff --git a/lib/Utils/ABRTException.cpp b/lib/Utils/ABRTException.cpp
index aa6c99d..a451cbd 100644
--- a/lib/Utils/ABRTException.cpp
+++ b/lib/Utils/ABRTException.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 "ABRTException.h"
CABRTException::CABRTException(abrt_exception_t type, const char* fmt, ...)
diff --git a/lib/Utils/Action.h b/lib/Utils/Action.h
index d9a68b7..fc56277 100644
--- a/lib/Utils/Action.h
+++ b/lib/Utils/Action.h
@@ -17,8 +17,7 @@
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 ACTION_H_
#define ACTION_H_
diff --git a/lib/Utils/Analyzer.h b/lib/Utils/Analyzer.h
index 9108a91..a45bd0e 100644
--- a/lib/Utils/Analyzer.h
+++ b/lib/Utils/Analyzer.h
@@ -17,8 +17,7 @@
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 ANALYZER_H_
#define ANALYZER_H_
diff --git a/lib/Utils/CommLayerInner.cpp b/lib/Utils/CommLayerInner.cpp
index 4a3b80a..bde3a71 100644
--- a/lib/Utils/CommLayerInner.cpp
+++ b/lib/Utils/CommLayerInner.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 <pthread.h>
#include <map>
#include "abrtlib.h"
diff --git a/lib/Utils/CommLayerInner.h b/lib/Utils/CommLayerInner.h
index 9c22968..353cfc7 100644
--- a/lib/Utils/CommLayerInner.h
+++ b/lib/Utils/CommLayerInner.h
@@ -1,3 +1,21 @@
+/*
+ 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 COMMLAYERINNER_H_
#define COMMLAYERINNER_H_
diff --git a/lib/Utils/CrashTypesSocket.cpp b/lib/Utils/CrashTypesSocket.cpp
index d555571..710e31e 100644
--- a/lib/Utils/CrashTypesSocket.cpp
+++ b/lib/Utils/CrashTypesSocket.cpp
@@ -17,8 +17,7 @@
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 "CrashTypesSocket.h"
diff --git a/lib/Utils/DBusCommon.h b/lib/Utils/DBusCommon.h
index 2e3ed8a..58b4c8d 100644
--- a/lib/Utils/DBusCommon.h
+++ b/lib/Utils/DBusCommon.h
@@ -15,8 +15,7 @@
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 DBUSCOMMON_H_
#define DBUSCOMMON_H_
diff --git a/lib/Utils/Database.h b/lib/Utils/Database.h
index 1691f1c..ed4ef0c 100644
--- a/lib/Utils/Database.h
+++ b/lib/Utils/Database.h
@@ -17,9 +17,7 @@
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 DATABASE_H_
#define DATABASE_H_
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp
index a0a52ab..b8f8827 100644
--- a/lib/Utils/DebugDump.cpp
+++ b/lib/Utils/DebugDump.cpp
@@ -17,11 +17,7 @@
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 <fstream>
-#include <iostream>
-#include <sstream>
+*/
#include <sys/utsname.h>
#include "abrtlib.h"
#include "DebugDump.h"
@@ -251,7 +247,7 @@ void CDebugDump::UnLock()
*
* Security: we should not allow users to write new files or write
* into existing ones, but they should be able to read them.
- *
+ *
* @param uid
* Crashed application's User Id
*
@@ -282,7 +278,7 @@ void CDebugDump::Create(const char *pDir, uid_t uid)
Lock();
m_bOpened = true;
- /* Was creating it with mode 0700 and user as the owner, but this allows
+ /* Was creating it with mode 0700 and user as the owner, but this allows
* the user to replace any file in the directory, changing security-sensitive data
* (e.g. "uid", "analyzer", "executable")
*/
@@ -302,7 +298,7 @@ void CDebugDump::Create(const char *pDir, uid_t uid)
}
/* Get ABRT's user id */
- m_uid = 0;
+ m_uid = 0;
struct passwd *pw = getpwnam("abrt");
if (pw)
m_uid = pw->pw_uid;
@@ -319,7 +315,7 @@ void CDebugDump::Create(const char *pDir, uid_t uid)
if (chown(m_sDebugDumpDir.c_str(), m_uid, m_gid) == -1)
{
- perror_msg("can't change '%s' ownership to %lu:%lu", m_sDebugDumpDir.c_str(),
+ perror_msg("can't change '%s' ownership to %lu:%lu", m_sDebugDumpDir.c_str(),
(long)m_uid, (long)m_gid);
}
diff --git a/lib/Utils/DebugDump.h b/lib/Utils/DebugDump.h
index 60d3bd3..a5de743 100644
--- a/lib/Utils/DebugDump.h
+++ b/lib/Utils/DebugDump.h
@@ -18,8 +18,7 @@
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 DEBUGDUMP_H_
#define DEBUGDUMP_H_
diff --git a/lib/Utils/Makefile.am b/lib/Utils/Makefile.am
index 5960710..6bf11da 100644
--- a/lib/Utils/Makefile.am
+++ b/lib/Utils/Makefile.am
@@ -15,7 +15,7 @@ libABRTUtils_la_SOURCES = \
copyfd.cpp \
daemon.cpp \
skip_whitespace.cpp \
- xatonum.cpp \
+ xatonum.cpp numtoa.cpp \
spawn.cpp \
stringops.cpp \
dirsize.cpp \
diff --git a/lib/Utils/Observer.h b/lib/Utils/Observer.h
index db74865..adf6844 100644
--- a/lib/Utils/Observer.h
+++ b/lib/Utils/Observer.h
@@ -1,3 +1,21 @@
+/*
+ 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 OBSERVER_H_
#define OBSERVER_H_
diff --git a/lib/Utils/Plugin.cpp b/lib/Utils/Plugin.cpp
index 4d561b4..2865027 100644
--- a/lib/Utils/Plugin.cpp
+++ b/lib/Utils/Plugin.cpp
@@ -15,8 +15,7 @@
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 "Plugin.h"
CPlugin::CPlugin() {}
diff --git a/lib/Utils/Plugin.h b/lib/Utils/Plugin.h
index e846403..c699eb3 100644
--- a/lib/Utils/Plugin.h
+++ b/lib/Utils/Plugin.h
@@ -18,8 +18,7 @@
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 PLUGIN_H_
#define PLUGIN_H_
diff --git a/lib/Utils/Reporter.h b/lib/Utils/Reporter.h
index e9445f9..4144ec3 100644
--- a/lib/Utils/Reporter.h
+++ b/lib/Utils/Reporter.h
@@ -17,8 +17,7 @@
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 REPORTER_H_
#define REPORTER_H_
diff --git a/lib/Utils/abrt_dbus.cpp b/lib/Utils/abrt_dbus.cpp
index 8423e66..6660841 100644
--- a/lib/Utils/abrt_dbus.cpp
+++ b/lib/Utils/abrt_dbus.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 <dbus/dbus.h>
#include <glib.h>
#include "abrtlib.h"
diff --git a/lib/Utils/abrt_dbus.h b/lib/Utils/abrt_dbus.h
index 25e099e..ffa4421 100644
--- a/lib/Utils/abrt_dbus.h
+++ b/lib/Utils/abrt_dbus.h
@@ -1,3 +1,21 @@
+/*
+ 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 ABRT_UTIL_DBUS_H
#define ABRT_UTIL_DBUS_H
diff --git a/lib/Utils/abrt_xmlrpc.cpp b/lib/Utils/abrt_xmlrpc.cpp
index c2d716e..3737ee1 100644
--- a/lib/Utils/abrt_xmlrpc.cpp
+++ b/lib/Utils/abrt_xmlrpc.cpp
@@ -1,3 +1,21 @@
+/*
+ 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.
+*/
#if HAVE_CONFIG_H
# include "config.h"
#endif
diff --git a/lib/Utils/abrt_xmlrpc.h b/lib/Utils/abrt_xmlrpc.h
index a0e9ca3..4d20d4e 100644
--- a/lib/Utils/abrt_xmlrpc.h
+++ b/lib/Utils/abrt_xmlrpc.h
@@ -1,3 +1,21 @@
+/*
+ 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 ABRT_XMLRPC_H_
#define ABRT_XMLRPC_H_ 1
diff --git a/lib/Utils/make_descr.cpp b/lib/Utils/make_descr.cpp
index b67dfe6..c2821a5 100644
--- a/lib/Utils/make_descr.cpp
+++ b/lib/Utils/make_descr.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 "CrashTypes.h"
#include "DebugDump.h" /* FILENAME_ARCHITECTURE etc */
diff --git a/lib/Utils/numtoa.cpp b/lib/Utils/numtoa.cpp
new file mode 100644
index 0000000..061da55
--- /dev/null
+++ b/lib/Utils/numtoa.cpp
@@ -0,0 +1,34 @@
+/*
+ Number to string conversions
+
+ 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"
+
+std::string unsigned_to_string(unsigned long long x)
+{
+ char buf[sizeof(x)*3];
+ sprintf(buf, "%llu", x);
+ return buf;
+}
+std::string signed_to_string(long long x)
+{
+ char buf[sizeof(x)*3];
+ sprintf(buf, "%lld", x);
+ return buf;
+}
diff --git a/lib/Utils/parse_release.cpp b/lib/Utils/parse_release.cpp
index 8a106b6..4f7d76e 100644
--- a/lib/Utils/parse_release.cpp
+++ b/lib/Utils/parse_release.cpp
@@ -1,3 +1,21 @@
+/*
+ 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"
#ifdef HAVE_CONFIG_H
# include "config.h"
diff --git a/lib/Utils/stringops.cpp b/lib/Utils/stringops.cpp
index dc71b5b..7bc5413 100644
--- a/lib/Utils/stringops.cpp
+++ b/lib/Utils/stringops.cpp
@@ -1,3 +1,21 @@
+/*
+ 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"
void parse_args(const char *psArgs, vector_string_t& pArgs, int quote)
diff --git a/lib/Utils/test.cpp b/lib/Utils/test.cpp
index 3711ef1..24a6276 100644
--- a/lib/Utils/test.cpp
+++ b/lib/Utils/test.cpp
@@ -17,8 +17,7 @@
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 "MiddleWare.h"
#include "DebugDump.h"
#include "CrashTypes.h"
diff --git a/lib/Utils/xconnect.cpp b/lib/Utils/xconnect.cpp
index 746edd6..0d02b1a 100644
--- a/lib/Utils/xconnect.cpp
+++ b/lib/Utils/xconnect.cpp
@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this tarball for details.
*/
-
#include "abrtlib.h"
#include <sys/socket.h> /* netinet/in.h needs it */
#include <netinet/in.h>
diff --git a/po/nl.po b/po/nl.po
index ba19df6..6603fb8 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -11,8 +11,8 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt.master\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2010-02-02 15:17+0100\n"
-"PO-Revision-Date: 2010-01-30 15:02+0100\n"
+"POT-Creation-Date: 2010-02-07 16:55+0000\n"
+"PO-Revision-Date: 2010-02-07 19:02+0100\n"
"Last-Translator: Geert Warrink <geert.warrink@onsnet.nu>\n"
"Language-Team: nl <fedora-trans-list@redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -21,44 +21,44 @@ msgstr ""
"X-Generator: KBabel 1.11.4\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: src/Gui/ABRTExceptions.py:6
+#: ../src/Gui/ABRTExceptions.py:6
msgid "Another client is already running, trying to wake it."
msgstr "Andere client draait al, probeer het te wekken."
-#: src/Gui/ABRTExceptions.py:13
+#: ../src/Gui/ABRTExceptions.py:13
msgid "Got unexpected data from daemon (is the database properly updated?)."
msgstr ""
"Kreeg niet verwachte data van daemon (is de database correct vernieuwd?)."
-#: src/Gui/ABRTPlugin.py:62
+#: ../src/Gui/ABRTPlugin.py:62
msgid "Not loaded plugins"
msgstr "Niet geladen plugins"
-#: src/Gui/ABRTPlugin.py:63
+#: ../src/Gui/ABRTPlugin.py:63
msgid "Analyzer plugins"
msgstr "Analyse plugins"
-#: src/Gui/ABRTPlugin.py:64
+#: ../src/Gui/ABRTPlugin.py:64
msgid "Action plugins"
msgstr "Actie plugins"
-#: src/Gui/ABRTPlugin.py:65
+#: ../src/Gui/ABRTPlugin.py:65
msgid "Reporter plugins"
msgstr "Aanmeld plugins"
-#: src/Gui/ABRTPlugin.py:66
+#: ../src/Gui/ABRTPlugin.py:66
msgid "Database plugins"
msgstr "Databse plugins"
-#: src/Gui/CCDBusBackend.py:74 src/Gui/CCDBusBackend.py:97
+#: ../src/Gui/CCDBusBackend.py:74 ../src/Gui/CCDBusBackend.py:97
msgid "Can't connect to system dbus"
msgstr "Kan niet verbinden met systeem dbus"
-#: src/Gui/CCDBusBackend.py:120 src/Gui/CCDBusBackend.py:123
+#: ../src/Gui/CCDBusBackend.py:120 ../src/Gui/CCDBusBackend.py:123
msgid "Please check if abrt daemon is running"
msgstr "Controleer a.u.b. of de abrt daemon draait"
-#: src/Gui/CCDBusBackend.py:175
+#: ../src/Gui/CCDBusBackend.py:175
msgid ""
"Daemon didn't return valid report info\n"
"Debuginfo is missing?"
@@ -66,23 +66,44 @@ msgstr ""
"Daemon gaf geen geldige rapport info terug\n"
"Mist debuginfo?"
-#: src/Gui/ccgui.glade:8
-msgid "Please wait.."
-msgstr "Wacht a.u.b..."
+#: ../src/Gui/ccgui.glade.h:1
+msgid "(C) 2009 Red Hat, Inc."
+msgstr "(C) 2009 Red Hat, Inc."
+
+#: ../src/Gui/ccgui.glade.h:2
+msgid "About ABRT"
+msgstr "Over ABRT"
+
+#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:8
+#: ../src/Gui/report.glade.h:15 ../src/Gui/abrt.desktop.in.h:1
+msgid "Automatic Bug Reporting Tool"
+msgstr "Automatisch bug rapporteer gereedschap"
+
+#: ../src/Gui/ccgui.glade.h:4
+msgid "Delete"
+msgstr "Verwijderen"
-#: src/Gui/ccgui.glade:60
+#: ../src/Gui/ccgui.glade.h:5
msgid "Details"
msgstr "Details"
-#: src/Gui/ccgui.glade:76
-msgid "About ABRT"
-msgstr "Over ABRT"
+#: ../src/Gui/ccgui.glade.h:6
+msgid "Not Reported"
+msgstr "Niet gerapporteerd"
-#: src/Gui/ccgui.glade:82
-msgid "(C) 2009 Red Hat, Inc."
-msgstr "(C) 2009 Red Hat, Inc."
+#: ../src/Gui/ccgui.glade.h:7
+msgid "Please wait.."
+msgstr "Wacht a.u.b..."
+
+#: ../src/Gui/ccgui.glade.h:8 ../src/Gui/settings.glade.h:19
+msgid "Plugins"
+msgstr "Plugins"
-#: src/Gui/ccgui.glade:83
+#: ../src/Gui/ccgui.glade.h:9
+msgid "Report"
+msgstr "Rapport"
+
+#: ../src/Gui/ccgui.glade.h:10
msgid ""
"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 "
@@ -110,63 +131,44 @@ msgstr ""
"Je moet een kopie van de GNU General Public License tezamen met dit "
"programma ontvangen hebben. Zo niet, zie <http://www.gnu.org/licenses/>."
-#: src/Gui/ccgui.glade:121 src/Gui/CCMainWindow.py:8 src/Gui/report.glade:7
-msgid "Automatic Bug Reporting Tool"
-msgstr "Automatisch bug rapporteer gereedschap"
-
-#: src/Gui/ccgui.glade:134
-msgid "_File"
-msgstr "_Bestand"
-
-#: src/Gui/ccgui.glade:155
+#: ../src/Gui/ccgui.glade.h:15
msgid "_Edit"
msgstr "Be_werken"
-#: src/Gui/ccgui.glade:163
-msgid "Plugins"
-msgstr "Plugins"
+#: ../src/Gui/ccgui.glade.h:16
+msgid "_File"
+msgstr "_Bestand"
-#: src/Gui/ccgui.glade:182
+#: ../src/Gui/ccgui.glade.h:17
msgid "_Help"
msgstr "_Hulp"
-#: src/Gui/ccgui.glade:214 src/Gui/ccgui.glade:215
-msgid "Delete"
-msgstr "Verwijderen"
-
-#: src/Gui/ccgui.glade:227 src/Gui/ccgui.glade:228 src/Gui/ccgui.glade:342
-msgid "Report"
-msgstr "Rapport"
-
-#: src/Gui/ccgui.glade:298
-msgid "Not Reported"
-msgstr "Niet gerapporteerd"
-
-#: src/Gui/CCMainWindow.py:74
+#. add pixbuff separatelly
+#: ../src/Gui/CCMainWindow.py:74
msgid "Icon"
msgstr "Icoon"
-#: src/Gui/CCMainWindow.py:82
+#: ../src/Gui/CCMainWindow.py:82
msgid "Package"
msgstr "Pakket"
-#: src/Gui/CCMainWindow.py:83
+#: ../src/Gui/CCMainWindow.py:83
msgid "Application"
msgstr "Toepassing"
-#: src/Gui/CCMainWindow.py:84
+#: ../src/Gui/CCMainWindow.py:84
msgid "Date"
msgstr "Datum"
-#: src/Gui/CCMainWindow.py:85
+#: ../src/Gui/CCMainWindow.py:85
msgid "Crash count"
msgstr "Crash count"
-#: src/Gui/CCMainWindow.py:86
+#: ../src/Gui/CCMainWindow.py:86
msgid "User"
msgstr "Gebruiker"
-#: src/Gui/CCMainWindow.py:154
+#: ../src/Gui/CCMainWindow.py:154
#, python-format
msgid ""
"Can't show the settings dialog\n"
@@ -175,7 +177,7 @@ msgstr ""
"Kan de instellingen dialoog niet tonen\n"
"%s"
-#: src/Gui/CCMainWindow.py:165
+#: ../src/Gui/CCMainWindow.py:165
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -184,7 +186,8 @@ msgstr ""
"Kan huidige taak niet afmaken!\n"
"%s"
-#: src/Gui/CCMainWindow.py:192
+#. there is something wrong with the daemon if we cant get the dumplist
+#: ../src/Gui/CCMainWindow.py:192
#, python-format
msgid ""
"Error while loading the dumplist.\n"
@@ -193,19 +196,19 @@ msgstr ""
"Fout tijdens het laden van de dumplijst.\n"
"%s"
-#: src/Gui/CCMainWindow.py:230
+#: ../src/Gui/CCMainWindow.py:230
msgid "This crash has been reported:\n"
msgstr "Deze crash is gerapporteerd:\n"
-#: src/Gui/CCMainWindow.py:231
+#: ../src/Gui/CCMainWindow.py:231
msgid "<b>This crash has been reported:</b>\n"
msgstr "<b>Deze crash is gerapporteerd:</b>\n"
-#: src/Gui/CCMainWindow.py:250
+#: ../src/Gui/CCMainWindow.py:250
msgid "<b>Not reported!</b>"
msgstr "<b>Niet gerapporteerd!</b>"
-#: src/Gui/CCMainWindow.py:298
+#: ../src/Gui/CCMainWindow.py:298
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -213,7 +216,7 @@ msgstr ""
"Kan geen rapport krijgen!\n"
"Mist debuginfo?"
-#: src/Gui/CCMainWindow.py:318
+#: ../src/Gui/CCMainWindow.py:318
#, python-format
msgid ""
"Reporting failed!\n"
@@ -222,20 +225,21 @@ msgstr ""
"Rapporteren mislukte!\n"
"%s"
-#: src/Gui/CCMainWindow.py:337 src/Gui/CCMainWindow.py:364
+#: ../src/Gui/CCMainWindow.py:337 ../src/Gui/CCMainWindow.py:364
#, python-format
msgid "Error getting the report: %s"
msgstr "Fout tijdens het verkrijgen van het rapport: %s"
-#: src/Gui/CCReporterDialog.py:24
+#. default texts
+#: ../src/Gui/CCReporterDialog.py:24
msgid "Brief description how to reproduce this or what you did..."
msgstr "Korte beschrijving hoe dit te reproduceren is of wat je deed..."
-#: src/Gui/CCReporterDialog.py:99
+#: ../src/Gui/CCReporterDialog.py:99
msgid "You must check backtrace for sensitive data"
msgstr "Je moet de backtrace controleren op gevoelige data"
-#: src/Gui/CCReporterDialog.py:110
+#: ../src/Gui/CCReporterDialog.py:110
#, python-format
msgid ""
"Reporting disabled because the backtrace is unusable.\n"
@@ -248,11 +252,11 @@ msgstr ""
"<b>debuginfo-install %s</b> \n"
"en gebruik dan de Verversen knop om de backtrace opnieuw te genereren."
-#: src/Gui/CCReporterDialog.py:112
+#: ../src/Gui/CCReporterDialog.py:112
msgid "The backtrace is unusable, you can't report this!"
msgstr "De backtrace in niet bruikbaar, je kunt dit niet rapporteren!"
-#: src/Gui/CCReporterDialog.py:116
+#: ../src/Gui/CCReporterDialog.py:116
msgid ""
"The backtrace is incomplete, please make sure you provide good steps to "
"reproduce."
@@ -260,7 +264,7 @@ msgstr ""
"De backtrace is niet compleet, wees er zeker van om voor het genereren de "
"juiste stappen op te volgen."
-#: src/Gui/CCReporterDialog.py:158
+#: ../src/Gui/CCReporterDialog.py:158
#, python-format
msgid ""
"Can't save plugin settings:\n"
@@ -269,233 +273,224 @@ msgstr ""
"Kan de plugin instellingen niet opslaan:\n"
" %s"
-#: src/Gui/dialogs.glade:7
-msgid "Report done"
-msgstr "Rapport klaar"
-
-#: src/Gui/dialogs.glade:78
+#: ../src/Gui/dialogs.glade.h:1
msgid "Log"
msgstr "Log"
-#: src/Gui/PluginSettingsUI.py:18
+#: ../src/Gui/dialogs.glade.h:2
+msgid "Report done"
+msgstr "Rapport klaar"
+
+#: ../src/Gui/PluginSettingsUI.py:18
msgid "Can't find PluginDialog widget in UI description!"
msgstr "Kan geen PluginDialog widget in UI beschrijving vinden!"
-#: src/Gui/PluginSettingsUI.py:24
+#. we shouldn't get here, but just to be safe
+#: ../src/Gui/PluginSettingsUI.py:24
#, python-format
msgid "No UI for plugin %s"
msgstr "Geen UI voor plugin %s"
-#: src/Gui/PluginSettingsUI.py:55 src/Gui/PluginSettingsUI.py:81
+#: ../src/Gui/PluginSettingsUI.py:55 ../src/Gui/PluginSettingsUI.py:81
msgid "combo box is not implemented"
msgstr "combo box is niet geïmplementeertd"
-#: src/Gui/PluginSettingsUI.py:64
+#: ../src/Gui/PluginSettingsUI.py:64
msgid "Nothing to hydrate!"
msgstr "Kan het niet hard maken!"
-#: src/Gui/report.glade:41
-msgid "<span fgcolor=\"blue\">Package:</span>"
-msgstr "<span fgcolor=\"blue\">Pakket:</span>"
+#: ../src/Gui/report.glade.h:1
+msgid " "
+msgstr " "
-#: src/Gui/report.glade:52
-msgid "<span fgcolor=\"blue\">Component:</span>"
-msgstr "<span fgcolor=\"blue\">Onderdeel:</span>"
+#: ../src/Gui/report.glade.h:2
+msgid "<b>Attachments</b>"
+msgstr "<b>Bijlagen</b>"
-#: src/Gui/report.glade:63
-msgid "<span fgcolor=\"blue\">Executable:</span>"
-msgstr "<span fgcolor=\"blue\">Uitvoerbaar programma:</span>"
+#: ../src/Gui/report.glade.h:3
+msgid "<b>Backtrace</b>"
+msgstr "<b>Backtrace</b>"
-#: src/Gui/report.glade:74
-msgid "<span fgcolor=\"blue\">Cmdline:</span>"
-msgstr "<span fgcolor=\"blue\">Cmdregel:</span>"
+#: ../src/Gui/report.glade.h:4
+msgid "<b>Comment</b>"
+msgstr "<b>Commentaar</b>"
-#: src/Gui/report.glade:98 src/Gui/report.glade:111 src/Gui/report.glade:124
-#: src/Gui/report.glade:137 src/Gui/report.glade:215 src/Gui/report.glade:228
-#: src/Gui/report.glade:241 src/Gui/report.glade:254
-msgid "N/A"
-msgstr "n.v.t."
+#: ../src/Gui/report.glade.h:5
+msgid "<b>How to reproduce (in a few simple steps)</b>"
+msgstr "<b>Hoe het te reproduceren (in een paar eenvoudige stappen)</b>"
-#: src/Gui/report.glade:159
+#: ../src/Gui/report.glade.h:6
+msgid "<b>Please fix the following problems</b>"
+msgstr "<b>Los a.u.b. de volgende problemen op</b>"
+
+#: ../src/Gui/report.glade.h:7
msgid "<span fgcolor=\"blue\">Architecture:</span>"
msgstr "<span fgcolor=\"blue\">Architectuur:</span>"
-#: src/Gui/report.glade:170
+#: ../src/Gui/report.glade.h:8
+msgid "<span fgcolor=\"blue\">Cmdline:</span>"
+msgstr "<span fgcolor=\"blue\">Cmdregel:</span>"
+
+#: ../src/Gui/report.glade.h:9
+msgid "<span fgcolor=\"blue\">Component:</span>"
+msgstr "<span fgcolor=\"blue\">Onderdeel:</span>"
+
+#: ../src/Gui/report.glade.h:10
+msgid "<span fgcolor=\"blue\">Executable:</span>"
+msgstr "<span fgcolor=\"blue\">Uitvoerbaar programma:</span>"
+
+#: ../src/Gui/report.glade.h:11
msgid "<span fgcolor=\"blue\">Kernel:</span>"
msgstr "<span fgcolor=\"blue\">Kernel:</span>"
-#: src/Gui/report.glade:181
-msgid "<span fgcolor=\"blue\">Release:</span>"
-msgstr "<span fgcolor=\"blue\">Vrijgave:</span>"
+#: ../src/Gui/report.glade.h:12
+msgid "<span fgcolor=\"blue\">Package:</span>"
+msgstr "<span fgcolor=\"blue\">Pakket:</span>"
-#: src/Gui/report.glade:192
+#: ../src/Gui/report.glade.h:13
msgid "<span fgcolor=\"blue\">Reason:</span>"
msgstr "<span fgcolor=\"blue\">Reden:</span>"
-#: src/Gui/report.glade:315
+#: ../src/Gui/report.glade.h:14
+msgid "<span fgcolor=\"blue\">Release:</span>"
+msgstr "<span fgcolor=\"blue\">Vrijgave:</span>"
+
+#: ../src/Gui/report.glade.h:16
msgid "I checked backtrace and removed sensitive data (passwords, etc)"
msgstr ""
"Ik heb de backtrace gecontroleerd en gevoelige data verwijderd "
"(wachtwoorden, enz.)"
-#: src/Gui/report.glade:334
-msgid "<b>Backtrace</b>"
-msgstr "<b>Backtrace</b>"
-
-#: src/Gui/report.glade:396
-msgid "<b>How to reproduce (in a few simple steps)</b>"
-msgstr "<b>Hoe het te reproduceren (in een paar eenvoudige stappen)</b>"
-
-#: src/Gui/report.glade:439
-msgid "<b>Comment</b>"
-msgstr "<b>Commentaar</b>"
-
-#: src/Gui/report.glade:487
-msgid "<b>Attachments</b>"
-msgstr "<b>Bijlagen</b>"
-
-#: src/Gui/report.glade:536
-msgid "<b>Please fix the following problems</b>"
-msgstr "<b>Los a.u.b. de volgende problemen op</b>"
+#: ../src/Gui/report.glade.h:17
+msgid "N/A"
+msgstr "n.v.t."
-#: src/Gui/report.glade:546
-msgid " "
-msgstr " "
+#: ../src/Gui/report.glade.h:18
+msgid "Send report"
+msgstr "Verstuur rapport"
-#: src/Gui/report.glade:593
+#: ../src/Gui/report.glade.h:19
msgid "Show log"
msgstr "Laat log zien"
-#: src/Gui/report.glade:635
-msgid "Send report"
-msgstr "Verstuur rapport"
-
-#: src/Gui/SettingsDialog.py:33 src/Gui/SettingsDialog.py:50
+#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Selecteer een plugin</b>"
-#: src/Gui/SettingsDialog.py:36
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Selecteer database back-end</b>"
-#: src/Gui/SettingsDialog.py:169
+#: ../src/Gui/SettingsDialog.py:169
msgid "Remove this job"
msgstr "Verwijder deze taak"
-#: src/Gui/SettingsDialog.py:213
+#: ../src/Gui/SettingsDialog.py:213
msgid "Remove this action"
msgstr "Verwijder deze actie"
-#: src/Gui/settings.glade:6
-msgid "Settings"
-msgstr "Instellingen"
+#: ../src/Gui/settings.glade.h:1
+msgid "<b>Analyzer plugin</b>"
+msgstr "<b>Analyse plugin</b>"
-#: src/Gui/settings.glade:63
-msgid "Web Site:"
-msgstr "Website:"
+#: ../src/Gui/settings.glade.h:2
+msgid "<b>Associated action</b>"
+msgstr "<b>Verbonden actie</b>"
-#: src/Gui/settings.glade:75
-msgid "Author:"
-msgstr "Schrijver:"
+#: ../src/Gui/settings.glade.h:3
+msgid "<b>Plugin details</b>"
+msgstr "<b>Plugin details</b>"
-#: src/Gui/settings.glade:87
-msgid "Version:"
-msgstr "Versie:"
+#: ../src/Gui/settings.glade.h:4
+msgid "<b>Plugin</b>"
+msgstr "<b>Plugin</b>"
-#: src/Gui/settings.glade:141
-msgid "Description:"
-msgstr "Beschrijving:"
+#: ../src/Gui/settings.glade.h:5
+msgid "<b>Time (or period)</b>"
+msgstr "<b>Tijd (of periode)</b>"
-#: src/Gui/settings.glade:153
-msgid "Name:"
-msgstr "Naam:"
+#: ../src/Gui/settings.glade.h:6
+msgid "Analyzers, Actions, Reporters"
+msgstr "Analisten, acties, aanmelders"
-#: src/Gui/settings.glade:197
-msgid "<b>Plugin details</b>"
-msgstr "<b>Plugin details</b>"
+#: ../src/Gui/settings.glade.h:7
+msgid "Author:"
+msgstr "Schrijver:"
+
+#: ../src/Gui/settings.glade.h:8
+msgid "Blacklisted packages: "
+msgstr "Pakketten op de zwarte lijst:"
-#: src/Gui/settings.glade:220
+#: ../src/Gui/settings.glade.h:9
msgid "C_onfigure plugin"
msgstr "C_onfigureer plugin"
-#: src/Gui/settings.glade:257
-msgid "Global Settings"
-msgstr "Globale instellingen"
-
-#: src/Gui/settings.glade:283
+#: ../src/Gui/settings.glade.h:10
msgid "Check package GPG signature"
msgstr "Controleer GPG ondertekening van pakket"
-#: src/Gui/settings.glade:299
+#: ../src/Gui/settings.glade.h:11
+msgid "Common"
+msgstr "Algemeen"
+
+#: ../src/Gui/settings.glade.h:12
+msgid "Cron"
+msgstr "Cron"
+
+#: ../src/Gui/settings.glade.h:13
msgid "Database backend: "
msgstr "Batabase back-end: "
-#: src/Gui/settings.glade:325
-msgid "Blacklisted packages: "
-msgstr "Pakketten op de zwarte lijst:"
+#: ../src/Gui/settings.glade.h:14
+msgid "Description:"
+msgstr "Beschrijving:"
-#: src/Gui/settings.glade:339
-msgid "Max coredump storage size(MB):"
-msgstr "Max coredump opslag grootte (MB):"
+#: ../src/Gui/settings.glade.h:15
+msgid "GPG Keys"
+msgstr "GPG sleutels"
-#: src/Gui/settings.glade:353
+#: ../src/Gui/settings.glade.h:16
msgid "GPG keys: "
msgstr "GPG sleutels: "
-#: src/Gui/settings.glade:456
-msgid "Common"
-msgstr "Algemeen"
-
-#: src/Gui/settings.glade:489
-msgid "<b>Plugin</b>"
-msgstr "<b>Plugin</b>"
-
-#: src/Gui/settings.glade:499
-msgid "<b>Time (or period)</b>"
-msgstr "<b>Tijd (of periode)</b>"
-
-#: src/Gui/settings.glade:567
-msgid "Cron"
-msgstr "Cron"
-
-#: src/Gui/settings.glade:601
-msgid "<b>Analyzer plugin</b>"
-msgstr "<b>Analyse plugin</b>"
+#: ../src/Gui/settings.glade.h:17
+msgid "Max coredump storage size(MB):"
+msgstr "Max coredump opslag grootte (MB):"
-#: src/Gui/settings.glade:611
-msgid "<b>Associated action</b>"
-msgstr "<b>Verbonden actie</b>"
+#: ../src/Gui/settings.glade.h:18
+msgid "Name:"
+msgstr "Naam:"
-#: src/Gui/settings.glade:690
-msgid "Analyzers, Actions, Reporters"
-msgstr "Analisten, acties, aanmelders"
+#: ../src/Gui/settings.glade.h:20
+msgid "Preferences"
+msgstr "Voorkeuren"
-#: src/Gui/settings.glade:709
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
+#: ../src/Gui/settings.glade.h:21
+msgid "Version:"
+msgstr "Versie:"
-#: src/Gui/settings.glade:723
-msgid "gtk-ok"
-msgstr "gtk-ok"
+#: ../src/Gui/settings.glade.h:22
+msgid "Web Site:"
+msgstr "Website:"
-#: src/Gui/settings.glade:751
-msgid "GPG Keys"
-msgstr "GPG sleutels"
+#: ../src/Gui/abrt.desktop.in.h:2
+msgid "View and report application crashes"
+msgstr "Bekijk en rapporteer crashes van toepassingen"
-#: src/Applet/Applet.cpp:78
+#: ../src/Applet/Applet.cpp:78
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Een crash in pakket %s is ontdekt"
-#: src/Applet/Applet.cpp:253
+#: ../src/Applet/Applet.cpp:253
msgid "ABRT service is not running"
msgstr "ABRT service draait niet"
-#: src/Applet/CCApplet.cpp:200
+#: ../src/Applet/CCApplet.cpp:200
msgid "Warning"
msgstr "Waarschuwing"
-#: src/Daemon/Daemon.cpp:473
+#: ../src/Daemon/Daemon.cpp:484
msgid ""
"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
"value in abrt.conf."
@@ -503,131 +498,139 @@ msgstr ""
"Rapport grootte overschreed quota. Controleer a.u.b. MaxCrashReportsSize "
"waarde van het systeem in abrt.conf."
-#: lib/Plugins/Bugzilla.cpp:124
+#: ../lib/Plugins/Bugzilla.cpp:124
msgid "Missing member 'reporter'"
msgstr "Onderdeel 'aanmelder' ontbreekt"
-#: lib/Plugins/Bugzilla.cpp:176
+#: ../lib/Plugins/Bugzilla.cpp:176
msgid "Missing member 'cc'"
msgstr "Onderdeel 'cc' ontbreekt"
-#: lib/Plugins/Bugzilla.cpp:262
+#: ../lib/Plugins/Bugzilla.cpp:262
#, c-format
msgid "Bug is already reported: %i"
msgstr "Bug is al aangemeld: %i"
-#: lib/Plugins/Bugzilla.cpp:274
+#: ../lib/Plugins/Bugzilla.cpp:274
msgid "Missing member 'bug_id'"
msgstr "Onderdeel 'bug_id' ontbreekt"
-#: lib/Plugins/Bugzilla.cpp:283
+#: ../lib/Plugins/Bugzilla.cpp:283
msgid "Missing member 'bugs'"
msgstr "Onderdeel 'bugs' ontbreekt"
-#: lib/Plugins/Bugzilla.cpp:346
+#: ../lib/Plugins/Bugzilla.cpp:346
#, c-format
msgid "New bug id: %i"
msgstr "Nieuwe bug id: %i"
-#: lib/Plugins/Bugzilla.cpp:440
+#: ../lib/Plugins/Bugzilla.cpp:440
msgid "Checking for duplicates..."
msgstr "Controleren voor dubbele..."
-#: lib/Plugins/Bugzilla.cpp:446
+#: ../lib/Plugins/Bugzilla.cpp:446
msgid "Empty login and password. Please check Bugzilla.conf"
msgstr "Leeg login en wachtwoord. Check a.u.b. Bugzilla.conf"
-#: lib/Plugins/Bugzilla.cpp:449
+#: ../lib/Plugins/Bugzilla.cpp:449
msgid "Logging into bugzilla..."
msgstr "Inloggen bij bugzilla..."
-#: lib/Plugins/Bugzilla.cpp:454
+#: ../lib/Plugins/Bugzilla.cpp:454
msgid "Checking CC..."
msgstr "Controleren van CC..."
-#: lib/Plugins/Bugzilla.cpp:465
+#: ../lib/Plugins/Bugzilla.cpp:465
msgid "Creating new bug..."
msgstr "Nieuwe bug aanmaken..."
-#: lib/Plugins/Bugzilla.cpp:469
+#: ../lib/Plugins/Bugzilla.cpp:469
msgid "Logging out..."
msgstr "Uitloggen..."
-#: lib/Plugins/Kerneloops.cpp:35
+#: ../lib/Plugins/Kerneloops.cpp:35
msgid "Getting local universal unique identification"
msgstr "Verkrijgen van locale universele unieke identificatie"
-#: lib/Plugins/CCpp.cpp:253
+#: ../lib/Plugins/CCpp.cpp:269
msgid "Generating backtrace"
msgstr "Aangemaakte backtrace"
-#: lib/Plugins/CCpp.cpp:388
+#: ../lib/Plugins/CCpp.cpp:431
msgid "Starting debuginfo installation"
msgstr "Start debuginfo installatie"
-#: lib/Plugins/CCpp.cpp:537
-msgid "Getting local universal unique identification..."
-msgstr "Verkrijgen van locale universele unieke identificatie..."
-
-#: lib/Plugins/CCpp.cpp:556
+#: ../lib/Plugins/CCpp.cpp:627
msgid "Getting global universal unique identification..."
msgstr "Verkrijgen van golbale universele unieke identificatie..."
-#: lib/Plugins/CCpp.cpp:734
+#: ../lib/Plugins/CCpp.cpp:805
msgid "Skipping debuginfo installation"
msgstr "Sla debuginfo installatie over"
-#: lib/Plugins/KerneloopsReporter.cpp:100
+#: ../lib/Plugins/KerneloopsReporter.cpp:100
msgid "Creating and submitting a report..."
msgstr "Aanmaken en indienen van rapport..."
-#: lib/Plugins/Logger.cpp:76
+#: ../lib/Plugins/Logger.cpp:76
#, c-format
msgid "Writing report to '%s'"
msgstr "Rapport schrijven naar: '%s'"
-#: lib/Plugins/FileTransfer.cpp:54
+#: ../lib/Plugins/FileTransfer.cpp:54
msgid "FileTransfer: URL not specified"
msgstr "Bestandsoverdracht: URL niet opgegeven"
-#: lib/Plugins/FileTransfer.cpp:58
+#: ../lib/Plugins/FileTransfer.cpp:58
#, c-format
msgid "Sending archive %s to %s"
msgstr "Versturen van archief %s naar %s"
-#: lib/Plugins/FileTransfer.cpp:289
+#: ../lib/Plugins/FileTransfer.cpp:289
msgid "File Transfer: Creating a report..."
msgstr "Bestandsoverdracht: Een rapport maken..."
-#: lib/Plugins/FileTransfer.cpp:323
+#: ../lib/Plugins/FileTransfer.cpp:323
#, c-format
msgid "Can't create and send an archive: %s"
msgstr "Kan geen archief maken en versturen: %s"
-#: lib/Plugins/FileTransfer.cpp:352
+#: ../lib/Plugins/FileTransfer.cpp:352
#, c-format
msgid "Can't create and send an archive %s"
msgstr "Kan archief %s niet aanmaken en versturen"
-#: lib/Plugins/KerneloopsScanner.cpp:79
+#: ../lib/Plugins/KerneloopsScanner.cpp:79
msgid "Creating kernel oops crash reports..."
msgstr "Aanmaken van kernel oops crash rapporten..."
-#: lib/Plugins/Mailx.cpp:137
+#: ../lib/Plugins/Mailx.cpp:137
msgid "Sending an email..."
msgstr "Versturen van email..."
-#: lib/Plugins/SOSreport.cpp:103
+#: ../lib/Plugins/SOSreport.cpp:103
#, c-format
msgid "Running sosreport: %s"
msgstr "Sosreport draaien: %s"
-#: lib/Plugins/SOSreport.cpp:109
+#: ../lib/Plugins/SOSreport.cpp:109
msgid "Done running sosreport"
msgstr "Klaar met het draaien van sosreport"
-#~ msgid "View and report application crashes"
-#~ msgstr "Bekijk en rapporteer crashes van toepassingen"
+#~ msgid "Settings"
+#~ msgstr "Instellingen"
+
+#~ msgid "Global Settings"
+#~ msgstr "Globale instellingen"
+
+#~ msgid "gtk-cancel"
+#~ msgstr "gtk-cancel"
+
+#~ msgid "gtk-ok"
+#~ msgstr "gtk-ok"
+
+#~ msgid "Getting local universal unique identification..."
+#~ msgstr "Verkrijgen van locale universele unieke identificatie..."
#~ msgid "You must agree with submitting the backtrace."
#~ msgstr "Je moet het goed vinden om de backtrace op te sturen."
diff --git a/scripts/abrt-bz-ratingfixer b/scripts/abrt-bz-ratingfixer
new file mode 100755
index 0000000..86f4c0c
--- /dev/null
+++ b/scripts/abrt-bz-ratingfixer
@@ -0,0 +1,146 @@
+#!/usr/bin/python
+# -*- mode:python -*-
+#
+# Please do not run this script unless it's neccessary to do so.
+# It forces Bugzilla to send data related to thousands of bug reports.
+
+from bugzilla import RHBugzilla
+from optparse import OptionParser
+import sys
+import os.path
+import subprocess
+import cPickle
+
+parser = OptionParser(version="%prog 1.0")
+parser.add_option("-u", "--user", dest="user",
+ help="Bugzilla user name (REQUIRED)", metavar="USERNAME")
+parser.add_option("-p", "--password", dest="password",
+ help="Bugzilla password (REQUIRED)", metavar="PASSWORD")
+parser.add_option("-b", "--bugzilla", dest="bugzilla",
+ help="Bugzilla URL (defaults to Red Hat Bugzilla)", metavar="URL")
+parser.add_option("-i", "--wiki", help="Generate output in wiki syntax",
+ action="store_true", default=False, dest="wiki")
+
+(options, args) = parser.parse_args()
+
+if not options.user or len(options.user) == 0:
+ parser.error("User name is required.\nTry {0} --help".format(sys.argv[0]))
+
+if not options.password or len(options.password) == 0:
+ parser.error("Password is required.\nTry {0} --help".format(sys.argv[0]))
+
+if not options.bugzilla or len(options.bugzilla) == 0:
+ options.bugzilla = "https://bugzilla.redhat.com/xmlrpc.cgi"
+
+bz = RHBugzilla()
+bz.connect(options.bugzilla)
+bz.login(options.user, options.password)
+
+buginfos = bz.query({'status_whiteboard_type':'allwordssubstr','status_whiteboard':'abrt_hash'})
+
+print "{0} bugs found.".format(len(buginfos))
+
+#
+# Load cache from previous run. Speeds up the case Bugzilla closes connection.
+# The cache should be manually removed after a day or so, because the data in it
+# are no longer valid.
+#
+ids = {}
+CACHE_FILE = "abrt-bz-ratingfixer-cache.tmp"
+if os.path.isfile(CACHE_FILE):
+ f = open(CACHE_FILE, 'r')
+ ids = cPickle.load(f)
+ f.close()
+
+def save_to_cache():
+ global database
+ f = open(CACHE_FILE, 'w')
+ cPickle.dump(ids, f, 2)
+ f.close()
+
+count = 0
+for buginfo in buginfos:
+ count += 1
+ print "{0}/{1}".format(count, len(buginfos))
+ if count % 100 == 0:
+ save_to_cache()
+
+ if ids.has_key(buginfo.bug_id):
+ continue
+
+ if not buginfo.bug_status in ["NEW", "ASSIGNED"]:
+ continue
+
+ # By default: rating 4, no comments. Do not touch strange bugs.
+ ids[buginfo.bug_id] = ( 4, 0 )
+
+ # Skip bugs with already downloaded backtraces.
+ filename = "{0}.bt".format(buginfo.bug_id)
+ if not os.path.isfile(filename):
+ # Get backtrace from bug and store it as a file.
+ downloaded = False
+ bug = bz.getbug(buginfo.bug_id)
+ for attachment in bug.attachments:
+ if attachment['filename'] == 'backtrace':
+ data = bz.openattachment(attachment['id'])
+ f = open(filename, 'w')
+ f.write(data.read())
+ f.close()
+ downloaded = True
+
+ # Silently skip bugs without backtrace.
+ # Those are usually duplicates of bugs; the duplication copies
+ # abrt_hash, but it does not copy the attachment.
+ if not downloaded:
+ continue
+
+ command = ["./abrt-rate-backtrace"]
+ command.append(filename)
+
+ helper = subprocess.Popen(command, stdout=subprocess.PIPE)
+ rating, err = helper.communicate()
+ helper.wait()
+
+ if helper.returncode != 0:
+ print "Problems with rating {0}".format(filename)
+ continue
+
+ bug = bz.getbug(buginfo.bug_id)
+ comments = 0
+ for comment in bug.longdescs:
+ # Do not count "rawhide" comments from Bug Zappers
+ if comment["body"].find("against 'rawhide' during") > 0:
+ continue
+ comments += 1
+
+ ids[buginfo.bug_id] = ( int(rating), comments )
+
+bz.logout()
+
+print "============= SUMMARY"
+count = 0
+closedcount = 0
+bugids = ids.keys()
+bugids.sort()
+if options.wiki:
+ print "{|"
+ print " ! Bug !! Backtrace rating !! Comment count"
+ print " |-"
+for bugid in bugids:
+ rating = ids[bugid]
+ if rating[0] < 3:
+ count += 1
+ if rating[1] <= 2:
+ closedcount += 1
+ if options.wiki:
+ print " | #[https://bugzilla.redhat.com/show_bug.cgi?id={0} {0}] || {1}/4 || {2}".format(bugid, rating[0], rating[1])
+ print " |-"
+ else:
+ print "#{0} has a backtrace with rating {1}/4 and {2} comments".format(bugid, rating[0], rating[1])
+
+if options.wiki:
+ print " |}"
+
+
+print "{0} bugs are included.".format(count)
+print "{0} bugs should be closed.".format(closedcount)
diff --git a/scripts/abrt-bz-stats b/scripts/abrt-bz-stats
index 5e25391..d84fd55 100755
--- a/scripts/abrt-bz-stats
+++ b/scripts/abrt-bz-stats
@@ -29,6 +29,8 @@ parser.add_option("-w", "--weekly", help="Generate weekly report instead of mont
# HTML output for blogs etc.
parser.add_option("-t", "--html", help="Generate HTML output",
action="store_true", default=False, dest="html")
+parser.add_option("-i", "--wiki", help="Generate output in wiki syntax",
+ action="store_true", default=False, dest="wiki")
# Newest stats first
parser.add_option("-r", "--reversed", help="Display the newest stats first",
action="store_true", default=False, dest="reversed")
@@ -139,7 +141,8 @@ class TimeSpan:
return int(100 * self.closed_as_waste / self.closed())
def closed_as_other_percentage(self):
- return int(100 * self.closed_as_other / self.closed())
+ return 100 - self.closed_as_useful_percentage() \
+ - self.closed_as_waste_percentage()
def closed(self):
return self.closed_as_useful + self.closed_as_waste + self.closed_as_other
@@ -151,13 +154,16 @@ class TimeSpan:
self.components[component] = 1
def add_resolution(self, resolution):
- if resolution in ["CLOSED_NOTABUG", "CLOSED_WONTFIX", "CLOSED_DEFERRED", "CLOSED_WORKSFORME"]:
- self.closed_as_other += 1
- elif resolution in ["CLOSED_CURRENTRELEASE", "CLOSED_RAWHIDE", "CLOSED_ERRATA", \
- "CLOSED_UPSTREAM", "CLOSED_NEXTRELEASE"]:
+ # Catches only resolutions starting with "CLOSED_"
+ if resolution in ["CLOSED_CURRENTRELEASE", "CLOSED_RAWHIDE", "CLOSED_ERRATA",
+ "CLOSED_UPSTREAM", "CLOSED_NEXTRELEASE"]:
self.closed_as_useful += 1
- elif resolution in ["CLOSED_DUPLICATE", "CLOSED_CANTFIX", "CLOSED_INSUFFICIENT_DATA"]:
+ elif resolution in ["CLOSED_DUPLICATE", "CLOSED_CANTFIX",
+ "CLOSED_INSUFFICIENT_DATA"]:
self.closed_as_waste += 1
+ elif resolution in ["CLOSED_NOTABUG", "CLOSED_WONTFIX",
+ "CLOSED_DEFERRED", "CLOSED_WORKSFORME"]:
+ self.closed_as_other += 1
def __str__(self):
def bug(count):
@@ -195,6 +201,19 @@ class TimeSpan:
top_crasher_item = " <li>%s: %s</li>\n"
top_crashers_end = "</ol></li>\n"
end = "</ul>\n"
+ elif options.wiki:
+ start = ""
+ bugs_reported = "* %s reported\n"
+ bugs_closed = "* %s closed\n"
+ bugs_cl_useful = "** %s (%d%%) as fixed, so ABRT was useful\n"
+ bugs_cl_notuseful = "** %s (%d%%) as duplicate, can't fix, insuf. data, so ABRT was not useful\n"
+ bugs_cl_other = "** %s (%d%%) as notabug, wontfix, worksforme\n"
+ bugs_closed_end = ""
+ top_crashers = "* top crashers:\n"
+ top_crasher_item = "*# %s: %s\n"
+ top_crashers_end = ""
+ end = ""
+
str = start
str += bugs_reported % bug(self.bugs_reported())
@@ -273,6 +292,8 @@ if not options.weekly:
m = monthly_stats[month]
if options.html:
print "<h2>Month %s</h2>" % month
+ elif options.wiki:
+ print "==Month %s==" % month
else:
print "MONTH %s" % month
print m
@@ -285,6 +306,8 @@ else:
w = weekly_stats[week]
if options.html:
print "<h2>Week %s</h2>" % week
+ elif options.wiki:
+ print "==Week %s==" % week
else:
print "WEEK %s" % week
print w
diff --git a/scripts/abrt-rate-backtrace.c b/scripts/abrt-rate-backtrace.c
new file mode 100644
index 0000000..0724823
--- /dev/null
+++ b/scripts/abrt-rate-backtrace.c
@@ -0,0 +1,183 @@
+/* -*-mode:c++;c-file-style:"bsd";c-basic-offset:4;indent-tabs-mode:nil-*-
+ * Returns rating 0-4 of backtrace file on stdout.
+ * 4 - backtrace with complete or almost-complete debuginfos
+ * 0 - useless backtrace with no debuginfos
+ * Compile:
+ * gcc abrt-rate-backtrace.c -std=c99 -o abrt-rate-backtrace
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdbool.h>
+
+// Die if we can't allocate n+1 bytes (space for the null terminator) and copy
+// the (possibly truncated to length n) string into it.
+static char* xstrndup(const char *s, int n)
+{
+ int m;
+ char *t;
+
+ /* We can just xmalloc(n+1) and strncpy into it, */
+ /* but think about xstrndup("abc", 10000) wastage! */
+ m = n;
+ t = (char*) s;
+ while (m) {
+ if (!*t) break;
+ m--;
+ t++;
+ }
+ n -= m;
+ t = (char*) malloc(n + 1);
+ t[n] = '\0';
+
+ return (char*) memcpy(t, s, n);
+}
+
+enum LineRating
+{
+ // RATING EXAMPLE
+ MissingEverything = 0, // #0 0x0000dead in ?? ()
+ MissingFunction = 1, // #0 0x0000dead in ?? () from /usr/lib/libfoobar.so.4
+ MissingLibrary = 2, // #0 0x0000dead in foobar()
+ MissingSourceFile = 3, // #0 0x0000dead in FooBar::FooBar () from /usr/lib/libfoobar.so.4
+ Good = 4, // #0 0x0000dead in FooBar::crash (this=0x0) at /home/user/foobar.cpp:204
+ BestRating = Good,
+};
+
+static enum LineRating rate_line(const char *line)
+{
+#define FOUND(x) (strstr(line, x) != NULL)
+ /* see the "enum LineRating" comments for possible combinations */
+ if (FOUND(" at "))
+ return Good;
+ const char *function = strstr(line, " in ");
+ if (function)
+ {
+ if (function[4] == '?') /* " in ??" does not count */
+ {
+ function = NULL;
+ }
+ }
+ bool library = FOUND(" from ");
+ if (function && library)
+ return MissingSourceFile;
+ if (function)
+ return MissingLibrary;
+ if (library)
+ return MissingFunction;
+
+ return MissingEverything;
+#undef FOUND
+}
+
+/* returns number of "stars" to show */
+static int rate_backtrace(const char *backtrace)
+{
+ int i, len;
+ int multiplier = 0;
+ int rating = 0;
+ int best_possible_rating = 0;
+ char last_lvl = 0;
+
+ /* We look at the frames in reversed order, since:
+ * - rate_line() checks starting from the first line of the frame
+ * (note: it may need to look at more than one line!)
+ * - we increase weight (multiplier) for every frame,
+ * so that topmost frames end up most important
+ */
+ len = 0;
+ for (i = strlen(backtrace) - 1; i >= 0; i--)
+ {
+ if (backtrace[i] == '#'
+ && (backtrace[i+1] >= '0' && backtrace[i+1] <= '9') /* #N */
+ && (i == 0 || backtrace[i-1] == '\n') /* it's at line start */
+ ) {
+ /* For one, "#0 xxx" always repeats, skip repeats */
+ if (backtrace[i+1] == last_lvl)
+ continue;
+ last_lvl = backtrace[i+1];
+
+ char *s = xstrndup(backtrace + i + 1, len);
+ /* Replace tabs with spaces, rate_line() does not expect tabs.
+ * Actually, even newlines may be there. Example of multiline frame
+ * where " at SRCFILE" is on 2nd line:
+ * #3 0x0040b35d in __libc_message (do_abort=<value optimized out>,
+ * fmt=<value optimized out>) at ../sysdeps/unix/sysv/linux/libc_fatal.c:186
+ */
+ for (char *p = s; *p; p++)
+ if (*p == '\t' || *p == '\n')
+ *p = ' ';
+ int lrate = rate_line(s);
+ multiplier++;
+ rating += lrate * multiplier;
+ best_possible_rating += BestRating * multiplier;
+ //log("lrate:%d rating:%d best_possible_rating:%d s:'%-.40s'", lrate, rating, best_possible_rating, s);
+ free(s);
+ len = 0; /* starting new line */
+ }
+ else
+ {
+ len++;
+ }
+ }
+
+ /* Bogus 'backtrace' with zero frames? */
+ if (best_possible_rating == 0)
+ return 0;
+
+ /* Returning number of "stars" to show */
+ if (rating*10 >= best_possible_rating*8) /* >= 0.8 */
+ return 4;
+ if (rating*10 >= best_possible_rating*6)
+ return 3;
+ if (rating*10 >= best_possible_rating*4)
+ return 2;
+ if (rating*10 >= best_possible_rating*2)
+ return 1;
+
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ if (argc != 2)
+ {
+ fprintf(stderr, "Usage: %s BACKTRACE_FILE\n", argv[0]);
+ return 1;
+ }
+
+ FILE *fp = fopen(argv[1], "r");
+ if (!fp)
+ {
+ fprintf(stderr, "Cannot open the input file.\n");
+ return 2;
+ }
+ fseek(fp, 0, SEEK_END);
+ size_t size = ftell(fp);
+ fseek(fp, 0, SEEK_SET);
+
+ char *file = malloc(size + 1);
+ if (!file)
+ {
+ fprintf(stderr, "Malloc error.\n");
+ return 3;
+ }
+ size_t read = fread(file, size, 1, fp);
+ if (read != 1)
+ {
+ fprintf(stderr, "Error while reading file.\n", argv[0]);
+ return 4;
+ }
+ fclose(fp);
+ file[size] = '\0';
+
+ int rating = 4;
+ /* Do not rate Python backtraces. */
+ if (NULL == strstr(file, "Local variables in innermost frame:\n"))
+ rating = rate_backtrace(file);
+
+ free(file);
+ fprintf(stdout, "%d", rating);
+ return 0;
+}
diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp
index c29a164..9398e4b 100644
--- a/src/Applet/Applet.cpp
+++ b/src/Applet/Applet.cpp
@@ -15,22 +15,21 @@
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 <dbus/dbus-shared.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
#if HAVE_CONFIG_H
- #include <config.h>
+# include <config.h>
#endif
#if HAVE_LOCALE_H
- #include <locale.h>
+# include <locale.h>
#endif
#if ENABLE_NLS
- #include <libintl.h>
- #define _(S) gettext(S)
+# include <libintl.h>
+# define _(S) gettext(S)
#else
- #define _(S) (S)
+# define _(S) (S)
#endif
#include "abrtlib.h"
#include "abrt_dbus.h"
diff --git a/src/Applet/CCApplet.cpp b/src/Applet/CCApplet.cpp
index 9817f41..13a6eb6 100644
--- a/src/Applet/CCApplet.cpp
+++ b/src/Applet/CCApplet.cpp
@@ -15,16 +15,15 @@
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.
- */
-
+*/
#if HAVE_CONFIG_H
- #include <config.h>
+# include <config.h>
#endif
#if ENABLE_NLS
- #include <libintl.h>
- #define _(S) gettext(S)
+# include <libintl.h>
+# define _(S) gettext(S)
#else
- #define _(S) (S)
+# define _(S) (S)
#endif
#include "abrtlib.h"
#include "CCApplet.h"
diff --git a/src/Applet/CCApplet.h b/src/Applet/CCApplet.h
index 48dbabc..a14498e 100644
--- a/src/Applet/CCApplet.h
+++ b/src/Applet/CCApplet.h
@@ -15,8 +15,7 @@
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 CC_APPLET_H_
#define CC_APPLET_H_
diff --git a/src/Backtrace/abrt-bz-dupchecker b/src/Backtrace/abrt-bz-dupchecker
index d7748c7..cbdafc5 100755
--- a/src/Backtrace/abrt-bz-dupchecker
+++ b/src/Backtrace/abrt-bz-dupchecker
@@ -24,6 +24,7 @@ from optparse import OptionParser
import sys
import os.path
import subprocess
+import cPickle
parser = OptionParser(version="%prog 1.0")
parser.add_option("-u", "--user", dest="user",
@@ -34,6 +35,8 @@ parser.add_option("-b", "--bugzilla", dest="bugzilla",
help="Bugzilla URL (defaults to Red Hat Bugzilla)", metavar="URL")
parser.add_option("-v", "--verbose", dest="verbose",
help="Detailed output")
+parser.add_option("-i", "--wiki", help="Generate output in wiki syntax",
+ action="store_true", default=False, dest="wiki")
(options, args) = parser.parse_args()
@@ -54,9 +57,38 @@ buginfos = bz.query({'status_whiteboard_type':'allwordssubstr','status_whiteboar
print "{0} bugs found.".format(len(buginfos))
+#
+# Load cache from previous run. Speeds up the case Bugzilla closes connection.
+# The cache should be manually removed after a day or so, because the data in it
+# are no longer valid.
+#
database = {}
-
+ids = {}
+CACHE_FILE = "abrt-bz-dupchecker-cache.tmp"
+if os.path.isfile(CACHE_FILE):
+ f = open(CACHE_FILE, 'r')
+ database = cPickle.load(f)
+ ids = cPickle.load(f)
+ f.close()
+
+def save_to_cache():
+ global database
+ f = open(CACHE_FILE, 'w')
+ cPickle.dump(database, f, 2)
+ cPickle.dump(ids, f, 2)
+ f.close()
+
+count = 0
for buginfo in buginfos:
+ count += 1
+ print "{0}/{1}".format(count, len(buginfos))
+ if count % 100 == 0:
+ save_to_cache()
+
+ if ids.has_key(buginfo.bug_id):
+ continue
+ ids[buginfo.bug_id] = True
+
if not buginfo.bug_status in ["NEW", "ASSIGNED", "MODIFIED", "VERIFIED"]:
if options.verbose:
print "Bug {0} has status {1}, skipping.".format(buginfo.bug_id, buginfo.bug_status)
@@ -127,18 +159,38 @@ print "=========================================================================
# The number of duplicates.
dupcount = 0
+# The number of duplicates that can be closed.
+dupclosecount = 0
for backtrace, components in database.items():
for component, bugitems in components.items():
- if len(bugitems) > 1:
- dupcount += len(value) - 1
-
+ dupcount += len(bugitems) - 1
+ dupclosecount += min(len(filter(lambda x: x <= 2,
+ map(lambda x: x["comments"],
+ bugitems))),
+ len(bugitems) - 1)
+
print "Total number of duplicate bugs detected: {0}".format(dupcount)
+print "Number of duplicate bugs that will be closed : {0}".format(dupclosecount)
print "------------------------------"
# Print the duplicates
for backtrace, components in database.items():
for component, bugitems in components.items():
if len(bugitems) > 1:
- print "Component: {0}".format(component)
- print "Duplicates: {0}".format(map(lambda x: "{0} ({1})".format(x['id'],x['comments']), bugitems).join(", "))
- print "Backtrace: {0}".format(backtrace)
+ if options.wiki:
+ print "----"
+ print "* component: '''{0}'''".format(component)
+ print "* duplicates: {0}".format(
+ reduce(lambda x,y: x+", "+y,
+ map(lambda x: "#[https://bugzilla.redhat.com/show_bug.cgi?id={0} {0}] ({1} comments)".format(x['id'],x['comments']),
+ bugitems)))
+ print "* backtrace:"
+ for line in backtrace.replace("Thread\n", "").splitlines():
+ print "*# {0}".format(line)
+ else:
+ print "Component: {0}".format(component)
+ print "Duplicates: {0}".format(
+ reduce(lambda x,y: x+", "+y,
+ map(lambda x: "{0} ({1})".format(x['id'],x['comments']),
+ bugitems)))
+ print "Backtrace: {0}".format(backtrace)
diff --git a/src/Backtrace/abrt-bz-hashchecker b/src/Backtrace/abrt-bz-hashchecker
index 9c4a5ff..ec7ce1a 100755
--- a/src/Backtrace/abrt-bz-hashchecker
+++ b/src/Backtrace/abrt-bz-hashchecker
@@ -56,4 +56,4 @@ bz.logout()
for hash, ids in hashes.items():
if len(ids) > 1:
- print "Duplicates found: ", ids.join(", ")
+ print "Duplicates found: ", reduce(lambda x,y: str(x)+", "+str(y), ids)
diff --git a/src/CLI/ABRTSocket.cpp b/src/CLI/ABRTSocket.cpp
index 82c304e..61618c0 100644
--- a/src/CLI/ABRTSocket.cpp
+++ b/src/CLI/ABRTSocket.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 "ABRTSocket.h"
#include "ABRTException.h"
#include "CrashTypesSocket.h"
diff --git a/src/CLI/ABRTSocket.h b/src/CLI/ABRTSocket.h
index d4905be..f8fb42b 100644
--- a/src/CLI/ABRTSocket.h
+++ b/src/CLI/ABRTSocket.h
@@ -1,3 +1,21 @@
+/*
+ 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 ABRTSOCKET_H_
#define ABRTSOCKET_H_
diff --git a/src/CLI/dbus.cpp b/src/CLI/dbus.cpp
index ffd1157..db45cd8 100644
--- a/src/CLI/dbus.cpp
+++ b/src/CLI/dbus.cpp
@@ -142,12 +142,15 @@ map_crash_data_t call_CreateReport(const char* uuid)
return argout;
}
-report_status_t call_Report(const map_crash_data_t& report)
+report_status_t call_Report(const map_crash_data_t& report,
+ const map_map_string_t &plugins)
{
DBusMessage* msg = new_call_msg(__func__ + 5);
DBusMessageIter out_iter;
dbus_message_iter_init_append(msg, &out_iter);
store_val(&out_iter, report);
+ if (!plugins.empty())
+ store_val(&out_iter, plugins);
DBusMessage *reply = send_get_reply_and_unref(msg);
@@ -184,7 +187,6 @@ int32_t call_DeleteDebugDump(const char* uuid)
return result;
}
-#ifdef UNUSED
map_map_string_t call_GetPluginsInfo()
{
DBusMessage *msg = new_call_msg(__func__ + 5);
@@ -201,7 +203,27 @@ map_map_string_t call_GetPluginsInfo()
dbus_message_unref(reply);
return argout;
}
-#endif
+
+map_plugin_settings_t call_GetPluginSettings(const char *name)
+{
+ DBusMessage *msg = new_call_msg(__func__ + 5);
+ dbus_message_append_args(msg,
+ DBUS_TYPE_STRING, &name,
+ DBUS_TYPE_INVALID);
+
+ DBusMessage *reply = send_get_reply_and_unref(msg);
+
+ DBusMessageIter in_iter;
+ dbus_message_iter_init(reply, &in_iter);
+
+ map_string_t argout;
+ int r = load_val(&in_iter, argout);
+ if (r != ABRT_DBUS_LAST_FIELD) /* more values present, or bad type */
+ error_msg_and_die("dbus call %s: return type mismatch", __func__ + 5);
+
+ dbus_message_unref(reply);
+ return argout;
+}
void handle_dbus_err(bool error_flag, DBusError *err)
{
diff --git a/src/CLI/dbus.h b/src/CLI/dbus.h
index c6fd7a4..c6c61eb 100644
--- a/src/CLI/dbus.h
+++ b/src/CLI/dbus.h
@@ -25,10 +25,19 @@ extern DBusConnection* s_dbus_conn;
vector_map_crash_data_t call_GetCrashInfos();
map_crash_data_t call_CreateReport(const char *uuid);
-report_status_t call_Report(const map_crash_data_t& report);
+
+/** Sends report using enabled Reporter plugins.
+ * @param plugins
+ * Optional settings for plugins, can be empty.
+ * Format: plugins["PluginName"]["SettingsKey"] = "SettingsValue"
+ * If it contains settings for some plugin, it must contain _all fields_
+ * obtained by call_GetPluginSettings, otherwise the plugin might ignore
+ * the settings.
+ */
+report_status_t call_Report(const map_crash_data_t& report,
+ const map_map_string_t &plugins);
int32_t call_DeleteDebugDump(const char* uuid);
-#ifdef UNUSED
/* Gets basic data about all installed plugins.
*/
map_map_string_t call_GetPluginsInfo();
@@ -38,7 +47,6 @@ map_map_string_t call_GetPluginsInfo();
* Corresponds to name obtained from call_GetPluginsInfo.
*/
map_plugin_settings_t call_GetPluginSettings(const char *name);
-#endif
void handle_dbus_err(bool error_flag, DBusError *err);
diff --git a/src/CLI/report.cpp b/src/CLI/report.cpp
index 2bcd52a..7ef33ac 100644
--- a/src/CLI/report.cpp
+++ b/src/CLI/report.cpp
@@ -412,10 +412,63 @@ int report(const char *uuid, bool always)
}
}
+ map_map_string_t pluginSettings;
+ if (!always)
+ {
+ // Get informations about all plugins.
+ map_map_string_t plugins = call_GetPluginsInfo();
+ // Check the configuration of each enabled Reporter plugin.
+ map_map_string_t::iterator it, itend = plugins.end();
+ for (it = plugins.begin(); it != itend; ++it)
+ {
+ // Skip disabled plugins.
+ if (0 != strcmp(it->second["Enabled"].c_str(), "yes"))
+ continue;
+ // Skip nonReporter plugins.
+ if (0 != strcmp(it->second["Type"].c_str(), "Reporter"))
+ continue;
+
+ map_string_t settings = call_GetPluginSettings(it->first.c_str());
+ // Login information is missing.
+ bool loginMissing = settings.find("Login") != settings.end()
+ && 0 == strcmp(settings["Login"].c_str(), "");
+ bool passwordMissing = settings.find("Password") != settings.end()
+ && 0 == strcmp(settings["Password"].c_str(), "");
+ if (!loginMissing && !passwordMissing)
+ continue;
+
+ // Copy the received settings as defaults.
+ // Plugins won't work without it, if some value is missing
+ // they use their default values for all fields.
+ pluginSettings[it->first] = settings;
+
+ printf(_("Wrong settings were detected for plugin %s.\n"), it->second["Name"].c_str());
+ if (loginMissing)
+ {
+ printf(_("Enter your login: "));
+ fflush(NULL);
+ char answer[64] = "";
+ fgets(answer, sizeof(answer), stdin);
+ if (strlen(answer) > 0)
+ pluginSettings[it->first]["Login"] = answer;
+ }
+ if (passwordMissing)
+ {
+// TODO: echo off, see http://fixunix.com/unix/84474-echo-off.html
+ printf(_("Enter your password: "));
+ fflush(NULL);
+ char answer[64] = "";
+ fgets(answer, sizeof(answer), stdin);
+ if (strlen(answer) > 0)
+ pluginSettings[it->first]["Password"] = answer;
+ }
+ }
+ }
+
int errors = 0;
int plugins = 0;
puts(_("Reporting..."));
- report_status_t r = call_Report(cr);
+ report_status_t r = call_Report(cr, pluginSettings);
report_status_t::iterator it = r.begin();
while (it != r.end())
{
diff --git a/src/Daemon/CommLayerServer.cpp b/src/Daemon/CommLayerServer.cpp
index d61da39..5e25012 100644
--- a/src/Daemon/CommLayerServer.cpp
+++ b/src/Daemon/CommLayerServer.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 "CommLayerServer.h"
#include "CrashWatcher.h"
diff --git a/src/Daemon/CommLayerServer.h b/src/Daemon/CommLayerServer.h
index 367c095..bb33a1e 100644
--- a/src/Daemon/CommLayerServer.h
+++ b/src/Daemon/CommLayerServer.h
@@ -1,7 +1,24 @@
+/*
+ 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 COMMLAYERSERVER_H_
#define COMMLAYERSERVER_H_
-#include <string>
#include "abrtlib.h"
#include "CrashTypes.h"
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index f247158..6dfc48b 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 <dbus/dbus.h>
#include "abrtlib.h"
#include "abrt_dbus.h"
diff --git a/src/Daemon/CommLayerServerDBus.h b/src/Daemon/CommLayerServerDBus.h
index 9bd7766..4fecf1b 100644
--- a/src/Daemon/CommLayerServerDBus.h
+++ b/src/Daemon/CommLayerServerDBus.h
@@ -1,3 +1,21 @@
+/*
+ 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 COMMLAYERSERVERDBUS_H_
#define COMMLAYERSERVERDBUS_H_
diff --git a/src/Daemon/CommLayerServerSocket.cpp b/src/Daemon/CommLayerServerSocket.cpp
index ab880fb..1e8bf6e 100644
--- a/src/Daemon/CommLayerServerSocket.cpp
+++ b/src/Daemon/CommLayerServerSocket.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 <sys/socket.h>
#include <sys/un.h>
#include "abrtlib.h"
diff --git a/src/Daemon/CommLayerServerSocket.h b/src/Daemon/CommLayerServerSocket.h
index c511954..40f6f89 100644
--- a/src/Daemon/CommLayerServerSocket.h
+++ b/src/Daemon/CommLayerServerSocket.h
@@ -1,3 +1,21 @@
+/*
+ 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 "CommLayerServer.h"
#include "DBusCommon.h"
#include <glib.h>
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 93365f3..4d68a81 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -15,8 +15,7 @@
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 "Daemon.h"
#include "ABRTException.h"
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h
index 31b72e0..eaf2499 100644
--- a/src/Daemon/CrashWatcher.h
+++ b/src/Daemon/CrashWatcher.h
@@ -15,8 +15,7 @@
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 CRASHWATCHER_H_
#define CRASHWATCHER_H_
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index 9921423..704d2c3 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -15,8 +15,7 @@
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 <syslog.h>
#include <pthread.h>
#include <resolv.h> /* res_init */
diff --git a/src/Daemon/Daemon.h b/src/Daemon/Daemon.h
index ac998b9..67a97ca 100644
--- a/src/Daemon/Daemon.h
+++ b/src/Daemon/Daemon.h
@@ -15,8 +15,7 @@
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 DAEMON_H_
#define DAEMON_H_
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index ebd5c0f..e0687fd 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -17,8 +17,7 @@
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_types.h"
#include "Daemon.h"
diff --git a/src/Daemon/MiddleWare.h b/src/Daemon/MiddleWare.h
index aa37e3e..94f9fb9 100644
--- a/src/Daemon/MiddleWare.h
+++ b/src/Daemon/MiddleWare.h
@@ -18,8 +18,7 @@
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 MIDDLEWARE_H_
#define MIDDLEWARE_H_
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp
index 5166c6a..e63cb3a 100644
--- a/src/Daemon/PluginManager.cpp
+++ b/src/Daemon/PluginManager.cpp
@@ -17,10 +17,7 @@
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 <fstream>
-#include <iostream>
+*/
#include <dlfcn.h>
#include "abrtlib.h"
#include "ABRTException.h"
@@ -85,23 +82,21 @@ static const char *const plugin_type_str[] = {
bool LoadPluginSettings(const char *pPath, map_plugin_settings_t& pSettings)
{
- ifstream fIn;
- fIn.open(pPath);
- if (!fIn.is_open())
+ FILE *fp = fopen(pPath, "r");
+ if (!fp)
return false;
- string line;
- while (!fIn.eof())
+ char line[512];
+ while (fgets(line, sizeof(line), fp))
{
- getline(fIn, line);
-
- int ii;
+ strchrnul(line, '\n')[0] = '\0';
+ unsigned ii;
bool is_value = false;
bool valid = false;
bool in_quote = false;
string key;
string value;
- for (ii = 0; ii < line.length(); ii++)
+ for (ii = 0; line[ii] != '\0'; ii++)
{
if (line[ii] == '"')
{
@@ -135,7 +130,7 @@ bool LoadPluginSettings(const char *pPath, map_plugin_settings_t& pSettings)
pSettings[key] = value;
}
}
- fIn.close();
+ fclose(fp);
return true;
}
diff --git a/src/Daemon/PluginManager.h b/src/Daemon/PluginManager.h
index 8eebe7d..b5dcebc 100644
--- a/src/Daemon/PluginManager.h
+++ b/src/Daemon/PluginManager.h
@@ -18,8 +18,7 @@
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 PLUGINMANAGER_H_
#define PLUGINMANAGER_H_
diff --git a/src/Daemon/RPM.cpp b/src/Daemon/RPM.cpp
index 6cc0ba6..c40f9a0 100644
--- a/src/Daemon/RPM.cpp
+++ b/src/Daemon/RPM.cpp
@@ -1,3 +1,21 @@
+/*
+ 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 "RPM.h"
#include "CommLayerInner.h"
diff --git a/src/Daemon/RPM.h b/src/Daemon/RPM.h
index fed5e43..4df868d 100644
--- a/src/Daemon/RPM.h
+++ b/src/Daemon/RPM.h
@@ -18,8 +18,7 @@
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 RPM_H_
#define RPM_H_
diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp
index 725c0d2..9b0376b 100644
--- a/src/Daemon/Settings.cpp
+++ b/src/Daemon/Settings.cpp
@@ -1,4 +1,21 @@
-#include <fstream>
+/*
+ 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 "Settings.h"
#include "abrtlib.h"
#include "abrt_types.h"
@@ -243,46 +260,45 @@ static void ParseAnalyzerActionsAndReporters()
static void LoadGPGKeys()
{
- std::ifstream fIn;
- fIn.open(CONF_DIR"/gpg_keys");
- if (fIn.is_open())
+ FILE *fp = fopen(CONF_DIR"/gpg_keys", "r");
+ if (fp)
{
- std::string line;
/* every line is one key
- FIXME: make it more robust, it doesn't handle comments
- */
- while (fIn.good())
+ * FIXME: make it more robust, it doesn't handle comments
+ */
+ char line[512];
+ while (fgets(line, sizeof(line), fp))
{
- getline(fIn, line);
if (line[0] == '/') // probably the begining of path, so let's handle it as a key
+ {
+ strchrnul(line, '\n')[0] = '\0';
g_settings_setOpenGPGPublicKeys.insert(line);
+ }
}
- fIn.close();
+ fclose(fp);
}
}
/* abrt daemon loads .conf file */
void LoadSettings()
{
- std::ifstream fIn;
- fIn.open(CONF_DIR"/abrt.conf");
- if (fIn.is_open())
+ FILE *fp = fopen(CONF_DIR"/abrt.conf", "r");
+ if (fp)
{
- std::string line;
+ char line[512];
std::string section;
- while (fIn.good())
+ while (fgets(line, sizeof(line), fp))
{
- getline(fIn, line);
-
- unsigned int ii;
+ strchrnul(line, '\n')[0] = '\0';
+ unsigned ii;
bool is_key = true;
bool is_section = false;
bool is_quote = false;
std::string key;
std::string value;
- for (ii = 0; ii < line.length(); ii++)
+ for (ii = 0; line[ii] != '\0'; ii++)
{
- if (is_quote && line[ii] == '\\' && ii+1 < line.length())
+ if (is_quote && line[ii] == '\\' && line[ii+1] != '\0')
{
value += line[ii];
ii++;
@@ -355,7 +371,7 @@ void LoadSettings()
}
}
}
- fIn.close();
+ fclose(fp);
}
ParseCommon();
ParseAnalyzerActionsAndReporters();
diff --git a/src/Daemon/Settings.h b/src/Daemon/Settings.h
index 3fdb8b9..cd3179d 100644
--- a/src/Daemon/Settings.h
+++ b/src/Daemon/Settings.h
@@ -1,3 +1,21 @@
+/*
+ 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 SETTINGS_H_
#define SETTINGS_H_
diff --git a/src/Daemon/abrt.conf b/src/Daemon/abrt.conf
index 6a3da4d..8ed5179 100644
--- a/src/Daemon/abrt.conf
+++ b/src/Daemon/abrt.conf
@@ -5,7 +5,7 @@
# in the file gpg_keys
OpenGPGCheck = yes
# Blacklisted packages
-BlackList = nspluginwrapper, valgrind, strace
+BlackList = nspluginwrapper, valgrind, strace, avant-window-navigator
# Which database plugin to use
Database = SQLite3
# Max size for crash storage [MiB]