summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2009-11-09 13:55:20 +0100
committerKarel Klic <kklic@redhat.com>2009-11-09 13:55:20 +0100
commit19f406b4930c931a932dc6930762e8e12e29ce8b (patch)
treeb08468bf9a010cbce0ecd000a0279222f0d4b4e7
parent801ab58f32f2cb7dca3352b721a07c83705a0287 (diff)
parent8fa9a6ecd247454ab758efecf818d8067455c778 (diff)
downloadabrt-19f406b4930c931a932dc6930762e8e12e29ce8b.tar.gz
abrt-19f406b4930c931a932dc6930762e8e12e29ce8b.tar.xz
abrt-19f406b4930c931a932dc6930762e8e12e29ce8b.zip
merge
-rw-r--r--abrt.spec67
-rw-r--r--configure.ac10
-rw-r--r--inc/ABRTException.h37
-rw-r--r--inc/abrtlib.h101
-rw-r--r--lib/Plugins/Bugzilla.cpp839
-rw-r--r--lib/Plugins/Bugzilla.h32
-rw-r--r--lib/Plugins/CCpp.conf13
-rw-r--r--lib/Plugins/CCpp.cpp298
-rw-r--r--lib/Plugins/CCpp.h12
-rw-r--r--lib/Plugins/Catcut.GTKBuilder184
-rw-r--r--lib/Plugins/Catcut.conf8
-rw-r--r--lib/Plugins/Catcut.cpp368
-rw-r--r--lib/Plugins/Catcut.h27
-rw-r--r--lib/Plugins/FileTransfer.cpp157
-rw-r--r--lib/Plugins/FileTransfer.h12
-rw-r--r--lib/Plugins/Kerneloops.conf2
-rw-r--r--lib/Plugins/Kerneloops.cpp4
-rw-r--r--lib/Plugins/Kerneloops.h9
-rw-r--r--lib/Plugins/KerneloopsReporter.cpp29
-rw-r--r--lib/Plugins/KerneloopsReporter.h3
-rw-r--r--lib/Plugins/KerneloopsScanner.cpp72
-rw-r--r--lib/Plugins/KerneloopsScanner.h18
-rw-r--r--lib/Plugins/KerneloopsSysLog.cpp247
-rw-r--r--lib/Plugins/KerneloopsSysLog.h26
-rw-r--r--lib/Plugins/Logger.cpp93
-rw-r--r--lib/Plugins/Logger.h3
-rw-r--r--lib/Plugins/Mailx.cpp17
-rw-r--r--lib/Plugins/Mailx.h3
-rw-r--r--lib/Plugins/Makefile.am78
-rw-r--r--lib/Plugins/Python.cpp6
-rw-r--r--lib/Plugins/Python.h7
-rw-r--r--lib/Plugins/RunApp.cpp31
-rw-r--r--lib/Plugins/RunApp.h6
-rw-r--r--lib/Plugins/SOSreport.cpp91
-rw-r--r--lib/Plugins/SOSreport.h15
-rw-r--r--lib/Plugins/SQLite3.cpp36
-rw-r--r--lib/Plugins/SQLite3.h2
-rw-r--r--lib/Plugins/TicketUploader.cpp388
-rw-r--r--lib/Plugins/TicketUploader.h41
-rw-r--r--lib/Utils/Action.h6
-rw-r--r--lib/Utils/Analyzer.h6
-rw-r--r--lib/Utils/CommLayerInner.cpp57
-rw-r--r--lib/Utils/CommLayerInner.h16
-rw-r--r--lib/Utils/DBusCommon.h6
-rw-r--r--lib/Utils/DebugDump.cpp280
-rw-r--r--lib/Utils/DebugDump.h16
-rw-r--r--lib/Utils/Makefile.am9
-rw-r--r--lib/Utils/Observer.h4
-rw-r--r--lib/Utils/Plugin.cpp13
-rw-r--r--lib/Utils/Plugin.h27
-rw-r--r--lib/Utils/Reporter.h1
-rw-r--r--lib/Utils/copyfd.cpp22
-rw-r--r--lib/Utils/encbase64.cpp78
-rw-r--r--lib/Utils/logging.cpp46
-rw-r--r--lib/Utils/make_descr.cpp133
-rw-r--r--lib/Utils/skip_whitespace.cpp22
-rw-r--r--lib/Utils/time.cpp65
-rw-r--r--lib/Utils/xconnect.cpp416
-rw-r--r--lib/Utils/xfuncs.cpp63
-rw-r--r--po/ast.po551
-rw-r--r--po/da.po72
-rw-r--r--po/de.po501
-rw-r--r--po/el.po566
-rw-r--r--po/es.po282
-rw-r--r--po/fi.po214
-rw-r--r--po/nl.po209
-rw-r--r--po/pa.po494
-rw-r--r--po/pl.po200
-rw-r--r--po/pt.po203
-rw-r--r--po/pt_BR.po189
-rwxr-xr-xscripts/dbg_mkrpm27
-rwxr-xr-xscripts/dbg_rpmbuildlocal11
-rwxr-xr-xscripts/dbg_rpminst23
-rwxr-xr-xscripts/dbg_unpkrpm8
-rw-r--r--src/Applet/Applet.cpp26
-rw-r--r--src/CLI/CLI.cpp118
-rw-r--r--src/CLI/dbus.cpp79
-rw-r--r--src/CLI/report.cpp50
-rw-r--r--src/CLI/run-command.cpp62
-rw-r--r--src/CLI/run-command.h2
-rw-r--r--src/Daemon/CommLayerServer.h2
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp53
-rw-r--r--src/Daemon/CommLayerServerDBus.h2
-rw-r--r--src/Daemon/CommLayerServerSocket.cpp23
-rw-r--r--src/Daemon/CrashWatcher.cpp66
-rw-r--r--src/Daemon/CrashWatcher.h8
-rw-r--r--src/Daemon/Daemon.cpp351
-rw-r--r--src/Daemon/Daemon.h2
-rw-r--r--src/Daemon/Makefile.am6
-rw-r--r--src/Daemon/MiddleWare.cpp194
-rw-r--r--src/Daemon/MiddleWare.h45
-rw-r--r--src/Daemon/PluginManager.cpp5
-rw-r--r--src/Daemon/Settings.cpp52
-rwxr-xr-xsrc/Daemon/abrt-debuginfo-install144
-rw-r--r--src/Daemon/abrt.conf17
-rw-r--r--src/Daemon/com.redhat.abrt.service3
-rw-r--r--src/Gui/ABRTExceptions.py8
-rw-r--r--src/Gui/ABRTPlugin.py27
-rw-r--r--src/Gui/CCMainWindow.py16
-rw-r--r--src/Gui/CCReporterDialog.py38
-rw-r--r--src/Gui/CC_gui_functions.py2
-rw-r--r--src/Gui/CellRenderers.py5
-rw-r--r--src/Gui/ConfBackend.py23
-rw-r--r--src/Gui/Makefile.am6
-rw-r--r--src/Gui/PluginsSettingsDialog.py4
-rw-r--r--src/Gui/SettingsDialog.py12
-rw-r--r--src/Gui/abrt.desktop2
-rw-r--r--src/Gui/abrt.pngbin0 -> 2791 bytes
-rw-r--r--src/Gui/report.glade36
-rw-r--r--src/Gui/settings_wizard.glade2
-rw-r--r--src/Hooks/CCpp.cpp35
-rw-r--r--src/Hooks/abrt-pyhook-helper.cpp174
-rw-r--r--src/Hooks/abrt_exception_handler.py.in89
-rw-r--r--src/Hooks/dumpoops.cpp54
114 files changed, 6630 insertions, 3441 deletions
diff --git a/abrt.spec b/abrt.spec
index 51f72bb2..97861f69 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -3,7 +3,7 @@
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
Summary: Automatic bug detection and reporting tool
Name: abrt
-Version: 0.0.10
+Version: 0.0.11
Release: 1%{?dist}
License: GPLv2+
Group: Applications/System
@@ -68,7 +68,9 @@ GTK+ wizard for convenient bug reporting.
%package addon-ccpp
Summary: %{name}'s C/C++ addon
Group: System Environment/Libraries
-Requires: gdb
+Requires: gdb >= 7.0-3
+Requires: elfutils
+Requires: yum-utils
Requires: %{name} = %{version}-%{release}
%description addon-ccpp
@@ -148,6 +150,14 @@ Requires: %{name} = %{version}-%{release}
%description plugin-bugzilla
Plugin to report bugs into the bugzilla.
+%package plugin-catcut
+Summary: %{name}'s catcut plugin
+Group: System Environment/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description plugin-catcut
+Plugin to report bugs into the catcut.
+
%package plugin-ticketuploader
Summary: %{name}'s ticketuploader plugin
Group: System Environment/Libraries
@@ -186,8 +196,9 @@ the sockets.
Summary: Virtual package to install all necessary packages for usage from desktop environment
Group: User Interface/Desktops
Requires: %{name} = %{version}-%{release}
-Requires: %{name}-plugin-sqlite3, %{name}-plugin-bugzilla
-Requires: %{name}-gui, %{name}-addon-kerneloops
+Requires: %{name}-plugin-sqlite3, %{name}-plugin-bugzilla, %{name}-plugin-logger
+Requires: %{name}-gui
+Requires: %{name}-addon-kerneloops
Requires: %{name}-addon-ccpp, %{name}-addon-python
%description desktop
@@ -214,10 +225,14 @@ find $RPM_BUILD_ROOT -name '*.la' -or -name '*.a' | xargs rm -f
mkdir -p ${RPM_BUILD_ROOT}/%{_initrddir}
install -m 755 %SOURCE1 ${RPM_BUILD_ROOT}/%{_initrddir}/abrtd
mkdir -p $RPM_BUILD_ROOT/var/cache/%{name}
+mkdir -p $RPM_BUILD_ROOT/var/cache/%{name}-di
+mkdir -p $RPM_BUILD_ROOT/var/run/%{name}
desktop-file-install \
--dir ${RPM_BUILD_ROOT}%{_datadir}/applications \
- src/Gui/%{name}.desktop
+ --vendor fedora \
+ --delete-original \
+ ${RPM_BUILD_ROOT}%{_datadir}/applications/%{name}.desktop
desktop-file-install \
--dir ${RPM_BUILD_ROOT}%{_sysconfdir}/xdg/autostart \
@@ -239,6 +254,11 @@ fi
%postun libs -p /sbin/ldconfig
+%posttrans
+if [ "$1" -eq "0" ]; then
+ service %{name}d condrestart >/dev/null 2>&1 || :
+fi
+
%files -f %{name}.lang
%defattr(-,root,root,-)
%doc README COPYING
@@ -248,6 +268,8 @@ fi
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/dbus-%{name}.conf
%{_initrddir}/%{name}d
%dir /var/cache/%{name}
+%dir /var/cache/%{name}-di
+%dir /var/run/%{name}
%dir %{_sysconfdir}/%{name}
%dir %{_sysconfdir}/%{name}/plugins
%dir %{_libdir}/%{name}
@@ -270,7 +292,8 @@ fi
%defattr(-,root,root,-)
%{_bindir}/%{name}-gui
%{_datadir}/%{name}
-%{_datadir}/applications/%{name}.desktop
+%{_datadir}/applications/fedora-%{name}.desktop
+%{_datadir}/pixmaps/abrt.png
%{_bindir}/%{name}-applet
%{_sysconfdir}/xdg/autostart/%{name}-applet.desktop
@@ -282,6 +305,7 @@ fi
%files addon-kerneloops
%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/%{name}/plugins/Kerneloops.conf
%config(noreplace) %{_sysconfdir}/%{name}/plugins/KerneloopsScanner.conf
%{_bindir}/dumpoops
%{_libdir}/%{name}/libKerneloops.so*
@@ -331,6 +355,13 @@ fi
%{_libdir}/%{name}/Bugzilla.GTKBuilder
%{_mandir}/man7/%{name}-Bugzilla.7.gz
+%files plugin-catcut
+%defattr(-,root,root,-)
+%config(noreplace) %{_sysconfdir}/%{name}/plugins/Catcut.conf
+%{_libdir}/%{name}/libCatcut.so*
+%{_libdir}/%{name}/Catcut.GTKBuilder
+#%{_mandir}/man7/%{name}-Catcut.7.gz
+
%files plugin-ticketuploader
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/%{name}/plugins/TicketUploader.conf
@@ -362,6 +393,30 @@ fi
%defattr(-,root,root,-)
%changelog
+* Mon Nov 2 2009 Jiri Moskovcak <jmoskovc@redhat.com> 0.0.11-1
+- re-enabled kerneloops
+- abrt-debuginfo-install: download packages one-by-one - better logging (vda.linux@googlemail.com)
+- do not report empty fields (vda.linux@googlemail.com)
+- Added abrt.png, fixed rhbz#531181 (jmoskovc@redhat.com)
+- added option DebugInfoCacheMB to limit size of unpacked debuginfos (vda.linux@googlemail.com)
+- fixed the problem with overwriting the default plugin settings (jmoskovc@redhat.com)
+- disabled kerneloops in config file (jmoskovc@redhat.com)
+- added dependency to gdb >= 7.0 (jmoskovc@redhat.com)
+- better format of report text (vda.linux@googlemail.com)
+- Python backtrace size limited to 1 MB (kklic@redhat.com)
+- lib/Plugins/Bugzilla: better message at login failure (vda.linux@googlemail.com)
+- build fixes, added plugin-logger to abrt-desktop (jmoskovc@redhat.com)
+- blacklisted nspluginwrapper, because it causes too many useless reports (jmoskovc@redhat.com)
+- GUI: Wrong settings window is not shown behind the reporter dialog rhbz#531119 (jmoskovc@redhat.com)
+- Normal user can see kerneloops and report it Bugzilla memory leaks fix (npajkovs@redhat.com)
+- dumpoops: add -s option to dump results to stdout (vda.linux@googlemail.com)
+- removed kerneloops from abrt-desktop rhbz#528395 (jmoskovc@redhat.com)
+- GUI: fixed exception when enabling plugin rhbz#530495 (jmoskovc@redhat.com)
+- Improved abrt-cli (kklic@redhat.com)
+- Added backtrace rating to CCpp analyzer (dnovotny@redhat.com)
+- GUI improvements (jmoskovc@redhat.com)
+- Added abrt-pyhook-helper (kklic@redhat.com)
+
* Thu Oct 15 2009 Jiri Moskovcak <jmoskovc@redhat.com> 0.0.10-1
- new version
- added more logging (vda.linux@googlemail.com)
diff --git a/configure.ac b/configure.ac
index aa9579ba..ca76f447 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([abrt], [0.0.10], [jmoskovc@redhat.com])
+AC_INIT([abrt], [0.0.11], [jmoskovc@redhat.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
@@ -28,8 +28,8 @@ PKG_CHECK_MODULES([RPM], [rpm])
PKG_CHECK_MODULES([CURL], [libcurl])
PKG_CHECK_MODULES([LIBNOTIFY], [libnotify])
PKG_CHECK_MODULES([NSS], [nss])
-PKG_CHECK_MODULES([XMLRPC_CPP], [xmlrpc++])
-PKG_CHECK_MODULES([XMLRPC_CLIENT_CPP], [xmlrpc_client++])
+PKG_CHECK_MODULES([XMLRPC], [xmlrpc])
+PKG_CHECK_MODULES([XMLRPC_CLIENT], [xmlrpc_client])
PKG_CHECK_MODULES([POLKIT],[polkit-gobject-1])
PKG_CHECK_MODULES([ZIP],[libzip])
@@ -39,10 +39,6 @@ AC_CHECK_HEADER([libtar.h], [],
AC_CHECK_HEADER([sys/inotify.h], [],
[AC_MSG_ERROR([sys/inotify.h is needed to build abrt])])
-AC_CHECK_HEADER([magic.h], [],
- [AC_MSG_ERROR([magic.h is needed to build abrt])])
-
-
CONF_DIR='${sysconfdir}/${PACKAGE_NAME}'
VAR_RUN='${localstatedir}/run'
PLUGINS_CONF_DIR='${sysconfdir}/${PACKAGE_NAME}/plugins'
diff --git a/inc/ABRTException.h b/inc/ABRTException.h
index 730faf3b..173f45fc 100644
--- a/inc/ABRTException.h
+++ b/inc/ABRTException.h
@@ -3,33 +3,40 @@
#include <string>
-typedef enum {EXCEP_UNKNOW,
- EXCEP_DD_OPEN,
- EXCEP_DD_LOAD,
- EXCEP_DD_SAVE,
- EXCEP_DD_DELETE,
- EXCEP_DL,
- EXCEP_PLUGIN,
- EXCEP_ERROR,
- EXCEP_FATAL} abrt_exception_t;
+typedef enum {
+ EXCEP_UNKNOW,
+ EXCEP_DD_OPEN,
+ EXCEP_DD_LOAD,
+ EXCEP_DD_SAVE,
+ EXCEP_DD_DELETE,
+ EXCEP_DL,
+ EXCEP_PLUGIN,
+ EXCEP_ERROR,
+ EXCEP_FATAL,
+} abrt_exception_t;
-class CABRTException : public std::exception
+/* std::exception is a class with virtual members.
+ * deriving from it makes our ctor/dtor much more heavy,
+ * and those are inlined in every throw and catch site!
+ */
+class CABRTException /*: public std::exception*/
{
private:
std::string m_sWhat;
abrt_exception_t m_Type;
+
public:
- virtual ~CABRTException() throw() {}
- CABRTException(const abrt_exception_t& pType, const char* pWhat) :
+ /* virtual ~CABRTException() throw() {} */
+ CABRTException(abrt_exception_t pType, const char* pWhat) :
m_sWhat(pWhat),
m_Type(pType)
{}
- CABRTException(const abrt_exception_t& pType, const std::string& pWhat) :
+ CABRTException(abrt_exception_t pType, const std::string& pWhat) :
m_sWhat(pWhat),
m_Type(pType)
{}
abrt_exception_t type() { return m_Type; }
- std::string what() { return m_sWhat; }
+ const char* what() const { return m_sWhat.c_str(); }
};
-#endif /* ABRTEXCEPTION_H_ */
+#endif
diff --git a/inc/abrtlib.h b/inc/abrtlib.h
index 02906f2f..f9228d31 100644
--- a/inc/abrtlib.h
+++ b/inc/abrtlib.h
@@ -25,6 +25,7 @@
#include <sys/time.h>
#include <sys/types.h>
#include <sys/wait.h>
+#include <arpa/inet.h> /* sockaddr_in, sockaddr_in6 etc */
#include <termios.h>
#include <time.h>
#include <unistd.h>
@@ -57,31 +58,29 @@ enum {
LOGMODE_STDIO = (1 << 0),
LOGMODE_SYSLOG = (1 << 1),
LOGMODE_BOTH = LOGMODE_SYSLOG + LOGMODE_STDIO,
+ LOGMODE_CUSTOM = (1 << 2),
};
+extern void (*g_custom_logger)(const char*);
extern const char *msg_prefix;
extern const char *msg_eol;
extern int logmode;
extern int xfunc_error_retval;
-extern void xfunc_die(void) NORETURN;
-extern void die_out_of_memory(void) NORETURN;
-extern void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
-extern void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
-extern void perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
-extern void simple_perror_msg(const char *s);
-extern void perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
-extern void simple_perror_msg_and_die(const char *s) NORETURN;
-extern void perror_nomsg_and_die(void) NORETURN;
-extern void perror_nomsg(void);
-extern void verror_msg(const char *s, va_list p, const char *strerr);
-/* error_msg() and log() do the same thing:
- * they log a message on stderr, syslog, etc.
- * They are only semantically different: error_msg() implies that
- * the logged event is a warning/error, while log() does not.
- * Another reason is that log() is such a short and nice name. :)
- * It's a macro, not function, since it collides with log() from math.h
- */
+void xfunc_die(void) NORETURN;
+void log_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
+/* It's a macro, not function, since it collides with log() from math.h */
#undef log
-#define log(...) error_msg(__VA_ARGS__)
+#define log(...) log_msg(__VA_ARGS__)
+/* error_msg family will use g_custom_logger. log_msg does not. */
+void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
+void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
+void perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
+void simple_perror_msg(const char *s);
+void perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
+void simple_perror_msg_and_die(const char *s) NORETURN;
+void perror_nomsg_and_die(void) NORETURN;
+void perror_nomsg(void);
+void verror_msg(const char *s, va_list p, const char *strerr);
+void die_out_of_memory(void) NORETURN;
/* Verbosity level */
extern int g_verbose;
@@ -100,6 +99,9 @@ void* xzalloc(size_t size);
char* xstrdup(const char *s);
char* xstrndup(const char *s, int n);
+char* skip_whitespace(const char *s);
+char* skip_non_whitespace(const char *s);
+
extern ssize_t safe_read(int fd, void *buf, size_t count);
// NB: will return short read on error, not -1,
// if some data was read before error occurred
@@ -131,6 +133,9 @@ void xstat(const char *name, struct stat *stat_buf);
int is_regular_file(struct dirent *dent, const char *dirname);
void xmove_fd(int from, int to);
+int ndelay_on(int fd);
+int ndelay_off(int fd);
+int close_on_exec_on(int fd);
char* xasprintf(const char *format, ...);
int xopen(const char *pathname, int flags);
@@ -141,15 +146,71 @@ void xunlink(const char *pathname);
off_t copyfd_eof(int src_fd, int dst_fd);
off_t copyfd_size(int src_fd, int dst_fd, off_t size);
void copyfd_exact_size(int src_fd, int dst_fd, off_t size);
+off_t copy_file(const char *src_name, const char *dst_name);
+
+
+unsigned long long monotonic_ns(void);
+unsigned long long monotonic_us(void);
+unsigned monotonic_sec(void);
+
+/* networking helpers */
+typedef struct len_and_sockaddr {
+ socklen_t len;
+ union {
+ struct sockaddr sa;
+ struct sockaddr_in sin;
+ struct sockaddr_in6 sin6;
+ } u;
+} len_and_sockaddr;
+enum {
+ LSA_LEN_SIZE = offsetof(len_and_sockaddr, u),
+ LSA_SIZEOF_SA = sizeof(struct sockaddr) > sizeof(struct sockaddr_in6) ?
+ sizeof(struct sockaddr) : sizeof(struct sockaddr_in6),
+};
+void setsockopt_reuseaddr(int fd);
+int setsockopt_broadcast(int fd);
+int setsockopt_bindtodevice(int fd, const char *iface);
+len_and_sockaddr* get_sock_lsa(int fd);
+void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen);
+unsigned lookup_port(const char *port, const char *protocol, unsigned default_port);
+int get_nport(const struct sockaddr *sa);
+void set_nport(len_and_sockaddr *lsa, unsigned port);
+len_and_sockaddr* host_and_af2sockaddr(const char *host, int port, sa_family_t af);
+len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t af);
+len_and_sockaddr* host2sockaddr(const char *host, int port);
+len_and_sockaddr* xhost2sockaddr(const char *host, int port);
+len_and_sockaddr* xdotted2sockaddr(const char *host, int port);
+int xsocket_type(len_and_sockaddr **lsap, int family, int sock_type);
+int xsocket_stream(len_and_sockaddr **lsap);
+int create_and_bind_stream_or_die(const char *bindaddr, int port);
+int create_and_bind_dgram_or_die(const char *bindaddr, int port);
+int create_and_connect_stream_or_die(const char *peer, int port);
+int xconnect_stream(const len_and_sockaddr *lsa);
+char* xmalloc_sockaddr2host(const struct sockaddr *sa);
+char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa);
+char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa);
+char* xmalloc_sockaddr2dotted(const struct sockaddr *sa);
+char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa);
+
+
+/* Random utility functions */
+
+/* Returns malloc'ed block */
+char *encode_base64(const void *src, int length);
+bool dot_or_dotdot(const char *filename);
+char *last_char_is(const char *s, int c);
+bool string_to_bool(const char *s);
+
/* C++ style stuff */
std::string ssprintf(const char *format, ...);
std::string get_home_dir(int uid);
+std::string concat_path_file(const char *path, const char *filename);
template <class T>
std::string
-to_string( T x )
+to_string(T x)
{
std::ostringstream o;
o << x;
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index 48c5eb55..ecd4dd67 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -1,456 +1,590 @@
-
-#include <xmlrpc-c/base.hpp>
+#include <xmlrpc-c/base.h>
+#include <xmlrpc-c/client.h>
#include "abrtlib.h"
#include "Bugzilla.h"
#include "CrashTypes.h"
#include "DebugDump.h"
#include "ABRTException.h"
#include "CommLayerInner.h"
+#ifdef HAVE_CONFIG_H
+ #include <config.h>
+#endif
#define XML_RPC_SUFFIX "/xmlrpc.cgi"
-CReporterBugzilla::CReporterBugzilla() :
- m_pXmlrpcTransport(NULL),
- m_pXmlrpcClient(NULL),
- m_pCarriageParm(NULL),
- m_sBugzillaURL("https://bugzilla.redhat.com"),
- m_sBugzillaXMLRPC("https://bugzilla.redhat.com" + std::string(XML_RPC_SUFFIX)),
- m_bNoSSLVerify(false),
- m_bLoggedIn(false)
-{}
-CReporterBugzilla::~CReporterBugzilla()
-{}
-
-void CReporterBugzilla::NewXMLRPCClient()
-{
- m_pXmlrpcTransport = new xmlrpc_c::clientXmlTransport_curl(
- xmlrpc_c::clientXmlTransport_curl::constrOpt()
- .no_ssl_verifyhost(m_bNoSSLVerify)
- .no_ssl_verifypeer(m_bNoSSLVerify)
- );
- m_pXmlrpcClient = new xmlrpc_c::client_xml(m_pXmlrpcTransport);
- m_pCarriageParm = new xmlrpc_c::carriageParm_curl0(m_sBugzillaXMLRPC);
-}
-
-void CReporterBugzilla::DeleteXMLRPCClient()
+static void get_product_and_version(const std::string& pRelease,
+ std::string& pProduct,
+ std::string& pVersion)
{
- if (m_pCarriageParm != NULL)
+ if (pRelease.find("Rawhide") != std::string::npos)
{
- delete m_pCarriageParm;
- m_pCarriageParm = NULL;
+ pProduct = "Fedora";
+ pVersion = "rawhide";
+ return;
}
- if (m_pXmlrpcClient != NULL)
+ if (pRelease.find("Fedora") != std::string::npos)
{
- delete m_pXmlrpcClient;
- m_pXmlrpcClient = NULL;
+ pProduct = "Fedora";
}
- if (m_pXmlrpcTransport != NULL)
+ else if (pRelease.find("Red Hat Enterprise Linux") != std::string::npos)
{
- delete m_pXmlrpcTransport;
- m_pXmlrpcTransport = NULL;
+ pProduct = "Red Hat Enterprise Linux ";
}
-}
-
-PRInt32 CReporterBugzilla::Base64Encode_cb(void *arg, const char *obuf, PRInt32 size)
-{
- CReporterBugzilla* bz = static_cast<CReporterBugzilla*>(arg);
- int ii;
- for (ii = 0; ii < size; ii++)
+ std::string::size_type pos = pRelease.find("release");
+ pos = pRelease.find(" ", pos) + 1;
+ while (pRelease[pos] != ' ')
{
- if (isprint(obuf[ii]))
+ pVersion += pRelease[pos];
+ if (pProduct == "Red Hat Enterprise Linux ")
{
- bz->m_sAttchmentInBase64 += obuf[ii];
+ pProduct += pRelease[pos];
}
+ pos++;
}
- return 1;
}
-void CReporterBugzilla::Login()
+static void create_new_bug_description(const map_crash_report_t& pCrashReport, std::string& pDescription)
{
- xmlrpc_c::paramList paramList;
- map_xmlrpc_params_t loginParams;
- map_xmlrpc_params_t ret;
- loginParams["login"] = xmlrpc_c::value_string(m_sLogin);
- loginParams["password"] = xmlrpc_c::value_string(m_sPassword);
- paramList.add(xmlrpc_c::value_struct(loginParams));
- xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("User.login", paramList));
- try
- {
- if( (m_sLogin == "") && (m_sPassword=="") )
- {
- log("Empty login and password");
- throw std::string(_("Empty login and password. Please check Bugzilla.conf"));
- }
- rpc->call(m_pXmlrpcClient, m_pCarriageParm);
- ret = xmlrpc_c::value_struct(rpc->getResult());
- std::stringstream ss;
- ss << xmlrpc_c::value_int(ret["id"]);
- log("Login id: %s", ss.str().c_str());
- }
- catch (std::exception& e)
- {
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Login(): ") + e.what());
- }
- catch (std::string& s)
- {
- throw CABRTException(EXCEP_PLUGIN, s);
- }
+ pDescription = "abrt detected a crash.\n\n";
+ pDescription += make_description_bz(pCrashReport);
}
-void CReporterBugzilla::Logout()
+// FIXME: we still leak memory if this function detects a fault:
+// many instances when we leave non-freed or non-xmlrpc_DECREF'ed data behind.
+static void throw_if_xml_fault_occurred(xmlrpc_env *env)
{
- xmlrpc_c::paramList paramList;
- paramList.add(xmlrpc_c::value_string(""));
- xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("User.logout", paramList));
- try
- {
- rpc->call(m_pXmlrpcClient, m_pCarriageParm);
- }
- catch (std::exception& e)
+ if (env->fault_occurred)
{
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Logout(): ") + e.what());
+ std::string errmsg = ssprintf("XML-RPC Fault: %s(%d)", env->fault_string, env->fault_code);
+ xmlrpc_env_clean(env); // this is needed ONLY if fault_occurred
+ xmlrpc_env_init(env); // just in case user catches ex and _continues_ to use env
+ error_msg("%s", errmsg.c_str()); // show error in daemon log
+ throw CABRTException(EXCEP_PLUGIN, errmsg);
}
}
-bool CReporterBugzilla::CheckCCAndReporter(const std::string& pBugId)
+
+/*
+ * Static namespace for xmlrpc stuff.
+ * Used mainly to ensure we always destroy xmlrpc client and server_info.
+ */
+
+namespace {
+
+struct ctx {
+ xmlrpc_client* client;
+ xmlrpc_server_info* server_info;
+
+ ctx(const char* url, bool no_ssl_verify) { new_xmlrpc_client(url, no_ssl_verify); }
+ ~ctx() { destroy_xmlrpc_client(); }
+
+ void new_xmlrpc_client(const char* url, bool no_ssl_verify);
+ void destroy_xmlrpc_client();
+
+ void login(const char* login, const char* passwd);
+ void logout();
+ int32_t check_uuid_in_bugzilla(const char* component, const char* UUID);
+ bool check_cc_and_reporter(uint32_t bug_id, const char* login);
+ void add_plus_one_cc(uint32_t bug_id, const char* login);
+ uint32_t new_bug(const map_crash_report_t& pCrashReport);
+ void add_attachments(const char* bug_id_str, const map_crash_report_t& pCrashReport);
+};
+
+void ctx::new_xmlrpc_client(const char* url, bool no_ssl_verify)
{
- xmlrpc_c::paramList paramList;
- map_xmlrpc_params_t ret;
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
+
+ /* This should be done at program startup, once.
+ * We do it in abrtd's main */
+ /* xmlrpc_client_setup_global_const(&env); */
+
+ struct xmlrpc_curl_xportparms curlParms;
+ memset(&curlParms, 0, sizeof(curlParms));
+ /* curlParms.network_interface = NULL; - done by memset */
+ curlParms.no_ssl_verifypeer = no_ssl_verify;
+ curlParms.no_ssl_verifyhost = no_ssl_verify;
+#ifdef VERSION
+ curlParms.user_agent = PACKAGE_NAME"/"VERSION;
+#else
+ curlParms.user_agent = "abrt";
+#endif
+
+ struct xmlrpc_clientparms clientParms;
+ memset(&clientParms, 0, sizeof(clientParms));
+ clientParms.transport = "curl";
+ clientParms.transportparmsP = &curlParms;
+ clientParms.transportparm_size = XMLRPC_CXPSIZE(user_agent);
+
+ client = NULL;
+ xmlrpc_client_create(&env, XMLRPC_CLIENT_NO_FLAGS,
+ PACKAGE_NAME, VERSION,
+ &clientParms, XMLRPC_CPSIZE(transportparm_size),
+ &client);
+ throw_if_xml_fault_occurred(&env);
+
+ server_info = xmlrpc_server_info_new(&env, url);
+ if (env.fault_occurred)
+ {
+ xmlrpc_client_destroy(client);
+ client = NULL;
+ }
+ throw_if_xml_fault_occurred(&env);
+}
- paramList.add(xmlrpc_c::value_string(pBugId));
- xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("bugzilla.getBug", paramList));
- try
- {
- rpc->call(m_pXmlrpcClient, m_pCarriageParm);
- ret = xmlrpc_c::value_struct(rpc->getResult());
- }
- catch (std::exception& e)
+void ctx::destroy_xmlrpc_client()
+{
+ if (server_info)
{
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::CheckCCAndReporter(): ") + e.what());
+ xmlrpc_server_info_free(server_info);
+ server_info = NULL;
}
- std::string reporter = xmlrpc_c::value_string(ret["reporter"]);
- if (reporter == m_sLogin)
+ if (client)
{
- return true;
+ xmlrpc_client_destroy(client);
+ client = NULL;
}
- std::vector<xmlrpc_c::value> ccs = xmlrpc_c::value_array(ret["cc"]).vectorValueValue();
- int ii;
- for (ii = 0; ii < ccs.size(); ii++)
- {
- std::string cc = xmlrpc_c::value_string(ccs[ii]);
- if (cc == m_sLogin)
- {
- return true;
- }
- }
- return false;
}
-void CReporterBugzilla::AddPlusOneCC(const std::string& pBugId)
+void ctx::login(const char* login, const char* passwd)
{
- xmlrpc_c::paramList paramList;
- map_xmlrpc_params_t addCCParams;
- map_xmlrpc_params_t ret;
- map_xmlrpc_params_t updates;
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
- std::vector<xmlrpc_c::value> CCList;
- CCList.push_back(xmlrpc_c::value_string(m_sLogin));
- updates["add_cc"] = xmlrpc_c::value_array(CCList);
+ xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s,s:s})", "login", login, "password", passwd);
+ throw_if_xml_fault_occurred(&env);
- addCCParams["ids"] = xmlrpc_c::value_int(atoi(pBugId.c_str()));
- addCCParams["updates"] = xmlrpc_c::value_struct(updates);
+ xmlrpc_value* result = NULL;
+ xmlrpc_client_call2(&env, client, server_info, "User.login", param, &result);
+ xmlrpc_DECREF(param);
+ if (result)
+ xmlrpc_DECREF(result);
- paramList.add(xmlrpc_c::value_struct(addCCParams));
- xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("Bug.update", paramList));
- try
- {
- rpc->call(m_pXmlrpcClient, m_pCarriageParm);
- }
- catch (std::exception& e)
+ if (env.fault_occurred)
{
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::AddPlusOneComment(): ") + e.what());
+ std::string errmsg = ssprintf("Can't login. Check Edit->Plugins->Bugzilla and /etc/abrt/plugins/Bugzilla.conf. Server said: %s", env.fault_string);
+ xmlrpc_env_clean(&env);
+ error_msg("%s", errmsg.c_str()); // show error in daemon log
+ throw CABRTException(EXCEP_PLUGIN, errmsg);
}
- ret = xmlrpc_c::value_struct(rpc->getResult());
}
-std::string CReporterBugzilla::CheckUUIDInBugzilla(const std::string& pComponent, const std::string& pUUID)
+void ctx::logout()
{
- xmlrpc_c::paramList paramList;
- map_xmlrpc_params_t searchParams;
- map_xmlrpc_params_t ret;
- std::string quicksearch = "ALL component:\""+ pComponent +"\" statuswhiteboard:\""+ pUUID + "\"";
- searchParams["quicksearch"] = xmlrpc_c::value_string(quicksearch.c_str());
- paramList.add(xmlrpc_c::value_struct(searchParams));
- xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("Bug.search", paramList));
- try
- {
- rpc->call(m_pXmlrpcClient, m_pCarriageParm);
- }
- catch (std::exception& e)
- {
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::CheckUUIDInBugzilla(): ") + e.what());
- }
- ret = xmlrpc_c::value_struct(rpc->getResult());
- std::vector<xmlrpc_c::value> bugs = xmlrpc_c::value_array(ret["bugs"]).vectorValueValue();
- if (bugs.size() > 0)
- {
- map_xmlrpc_params_t bug;
- std::stringstream ss;
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
+
+ xmlrpc_value* param = xmlrpc_build_value(&env, "(s)", "");
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_value* result = NULL;
+ xmlrpc_client_call2(&env, client, server_info, "User.logout", param, &result);
+ xmlrpc_DECREF(param);
+ if (result)
+ xmlrpc_DECREF(result);
+ throw_if_xml_fault_occurred(&env);
+}
- bug = xmlrpc_c::value_struct(bugs[0]);
- ss << xmlrpc_c::value_int(bug["bug_id"]);
+bool ctx::check_cc_and_reporter(uint32_t bug_id, const char* login)
+{
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
- log("Bug is already reported: %s", ss.str().c_str());
- update_client(_("Bug is already reported: ") + ss.str());
+ xmlrpc_value* param = xmlrpc_build_value(&env, "(s)", to_string(bug_id).c_str());
+ throw_if_xml_fault_occurred(&env);
- return ss.str();
- }
- return "";
-}
+ xmlrpc_value* result = NULL;
+ xmlrpc_client_call2(&env, client, server_info, "bugzilla.getBug", param, &result);
+ throw_if_xml_fault_occurred(&env);
+ xmlrpc_DECREF(param);
-void CReporterBugzilla::CreateNewBugDescription(const map_crash_report_t& pCrashReport, std::string& pDescription)
-{
- std::string howToReproduce;
- std::string comment;
+ xmlrpc_value* reporter_member = NULL;
+ xmlrpc_struct_find_value(&env, result, "reporter", &reporter_member);
+ throw_if_xml_fault_occurred(&env);
- if (pCrashReport.find(CD_REPRODUCE) != pCrashReport.end())
+ if (reporter_member)
{
- howToReproduce = "\n\nHow to reproduce\n"
- "-----\n" +
- pCrashReport.find(CD_REPRODUCE)->second[CD_CONTENT];
- }
- if (pCrashReport.find(CD_COMMENT) != pCrashReport.end())
- {
- comment = "\n\nComment\n"
- "-----\n" +
- pCrashReport.find(CD_COMMENT)->second[CD_CONTENT];
+ const char* reporter = NULL;
+ xmlrpc_read_string(&env, reporter_member, &reporter);
+ throw_if_xml_fault_occurred(&env);
+
+ bool eq = (strcmp(reporter, login) == 0);
+ free((void*)reporter);
+ xmlrpc_DECREF(reporter_member);
+ if (eq)
+ {
+ xmlrpc_DECREF(result);
+ return true;
+ }
}
- pDescription = "\nabrt detected a crash.\n" +
- howToReproduce +
- comment +
- "\n\nAdditional information\n"
- "======\n";
-
- map_crash_report_t::const_iterator it;
- for (it = pCrashReport.begin(); it != pCrashReport.end(); it++)
+
+ xmlrpc_value* cc_member = NULL;
+ xmlrpc_struct_find_value(&env, result, "cc", &cc_member);
+ throw_if_xml_fault_occurred(&env);
+
+ if (cc_member)
{
- if (it->second[CD_TYPE] == CD_TXT)
+ uint32_t array_size = xmlrpc_array_size(&env, cc_member);
+
+ for (uint32_t i = 0; i < array_size; i++)
{
- if (it->first != CD_UUID &&
- it->first != FILENAME_ARCHITECTURE &&
- it->first != FILENAME_RELEASE &&
- it->first != CD_REPRODUCE &&
- it->first != CD_COMMENT)
+ xmlrpc_value* item = NULL;
+ xmlrpc_array_read_item(&env, cc_member, i, &item); // Correct
+ throw_if_xml_fault_occurred(&env);
+
+ const char* cc = NULL;
+ xmlrpc_read_string(&env, item, &cc);
+ throw_if_xml_fault_occurred(&env);
+
+ bool eq = (strcmp(cc, login) == 0);
+ free((void*)cc);
+ xmlrpc_DECREF(item);
+ if (eq)
{
- pDescription += "\n" + it->first + "\n";
- pDescription += "-----\n";
- pDescription += it->second[CD_CONTENT] + "\n\n";
+ xmlrpc_DECREF(cc_member);
+ xmlrpc_DECREF(result);
+ return true;
}
}
- else if (it->second[CD_TYPE] == CD_ATT)
- {
- pDescription += "\n\nAttached files\n"
- "----\n";
- pDescription += it->first + "\n";
- }
- else if (it->second[CD_TYPE] == CD_BIN)
- {
- char buffer[1024];
- snprintf(buffer, 1024, _("Binary file %s will not be reported."), it->first.c_str());
- warn_client(std::string(buffer));
- //update_client(_("Binary file ")+it->first+_(" will not be reported."));
- }
+ xmlrpc_DECREF(cc_member);
}
+
+ xmlrpc_DECREF(result);
+ return false;
}
-void CReporterBugzilla::GetProductAndVersion(const std::string& pRelease,
- std::string& pProduct,
- std::string& pVersion)
+void ctx::add_plus_one_cc(uint32_t bug_id, const char* login)
{
- if (pRelease.find("Rawhide") != std::string::npos)
- {
- pProduct = "Fedora";
- pVersion = "rawhide";
- return;
- }
- if (pRelease.find("Fedora") != std::string::npos)
- {
- pProduct = "Fedora";
- }
- else if (pRelease.find("Red Hat Enterprise Linux") != std::string::npos)
- {
- pProduct = "Red Hat Enterprise Linux ";
- }
- std::string::size_type pos = pRelease.find("release");
- pos = pRelease.find(" ", pos) + 1;
- while (pRelease[pos] != ' ')
+ 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);
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_value* result = NULL;
+ xmlrpc_client_call2(&env, client, server_info, "Bug.update", param, &result);
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_DECREF(result);
+ xmlrpc_DECREF(param);
+}
+
+int32_t ctx::check_uuid_in_bugzilla(const char* component, const char* UUID)
+{
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
+
+ std::string query = ssprintf("ALL component:\"%s\" statuswhiteboard:\"%s\"", component, UUID);
+
+ xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s})", "quicksearch", query.c_str());
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_value* result = NULL;
+ xmlrpc_client_call2(&env, client, server_info, "Bug.search", param, &result);
+ throw_if_xml_fault_occurred(&env);
+ xmlrpc_DECREF(param);
+
+ xmlrpc_value* bugs_member = NULL;
+ xmlrpc_struct_find_value(&env, result, "bugs", &bugs_member);
+ throw_if_xml_fault_occurred(&env);
+
+ if (bugs_member)
{
- pVersion += pRelease[pos];
- if (pProduct == "Red Hat Enterprise Linux ")
+ // when array size is equal 0 that means no bug reported
+ uint32_t array_size = xmlrpc_array_size(&env, bugs_member);
+ throw_if_xml_fault_occurred(&env);
+ if (array_size == 0)
{
- pProduct += pRelease[pos];
+ xmlrpc_DECREF(bugs_member);
+ xmlrpc_DECREF(result);
+ return -1;
}
- pos++;
+
+ xmlrpc_value* item = NULL;
+ xmlrpc_array_read_item(&env, bugs_member, 0, &item); // Correct
+ throw_if_xml_fault_occurred(&env);
+ xmlrpc_value* bug = NULL;
+ xmlrpc_struct_find_value(&env, item, "bug_id", &bug);
+ throw_if_xml_fault_occurred(&env);
+
+ if (bug)
+ {
+ xmlrpc_int bug_id;
+ xmlrpc_read_int(&env, bug, &bug_id);
+ log("Bug is already reported: %i", (int)bug_id);
+ update_client(_("Bug is already reported: %i"), (int)bug_id);
+
+ xmlrpc_DECREF(bug);
+ xmlrpc_DECREF(item);
+ xmlrpc_DECREF(bugs_member);
+ xmlrpc_DECREF(result);
+ return bug_id;
+ }
+ xmlrpc_DECREF(item);
+ xmlrpc_DECREF(bugs_member);
}
+
+ xmlrpc_DECREF(result);
+ return -1;
}
-std::string CReporterBugzilla::NewBug(const map_crash_report_t& pCrashReport)
+uint32_t ctx::new_bug(const map_crash_report_t& pCrashReport)
{
- xmlrpc_c::paramList paramList;
- map_xmlrpc_params_t bugParams;
- map_xmlrpc_params_t ret;
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
+
std::string package = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT];
std::string component = pCrashReport.find(FILENAME_COMPONENT)->second[CD_CONTENT];
+ std::string release = pCrashReport.find(FILENAME_RELEASE)->second[CD_CONTENT];
+ std::string arch = pCrashReport.find(FILENAME_ARCHITECTURE)->second[CD_CONTENT];
+ std::string uuid = pCrashReport.find(CD_UUID)->second[CD_CONTENT];
+
+ std::string summary = "[abrt] crash detected in " + package;
+ std::string status_whiteboard = "abrt_hash:" + uuid;
+
std::string description;
- std::string release = pCrashReport.find(FILENAME_RELEASE)->second[CD_CONTENT];;
+ create_new_bug_description(pCrashReport, description);
+
std::string product;
std::string version;
- std::stringstream bugId;
- CreateNewBugDescription(pCrashReport, description);
- GetProductAndVersion(release, product, version);
-
- bugParams["product"] = xmlrpc_c::value_string(product);
- bugParams["component"] = xmlrpc_c::value_string(component);
- bugParams["version"] = xmlrpc_c::value_string(version);
- //bugParams["op_sys"] = xmlrpc_c::value_string("Linux");
- bugParams["summary"] = xmlrpc_c::value_string("[abrt] crash detected in " + package);
- bugParams["description"] = xmlrpc_c::value_string(description);
- bugParams["status_whiteboard"] = xmlrpc_c::value_string("abrt_hash:" + pCrashReport.find(CD_UUID)->second[CD_CONTENT]);
- bugParams["platform"] = xmlrpc_c::value_string(pCrashReport.find(FILENAME_ARCHITECTURE)->second[CD_CONTENT]);
- paramList.add(xmlrpc_c::value_struct(bugParams));
-
- xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("Bug.create", paramList));
- try
- {
- rpc->call(m_pXmlrpcClient, m_pCarriageParm);
- ret = xmlrpc_c::value_struct(rpc->getResult());
- bugId << xmlrpc_c::value_int(ret["id"]);
- log("New bug id: %s", bugId.str().c_str());
- update_client(_("New bug id: ") + bugId.str());
- }
- catch (std::exception& e)
- {
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::NewBug(): ") + e.what());
- }
- return bugId.str();
+ get_product_and_version(release, product, version);
+
+ xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s,s:s,s:s,s:s,s:s,s:s,s:s})",
+ "product", product.c_str(),
+ "component", component.c_str(),
+ "version", version.c_str(),
+ "summary", summary.c_str(),
+ "description", description.c_str(),
+ "status_whiteboard", status_whiteboard.c_str(),
+ "platform", arch.c_str()
+ );
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_value* result;
+ xmlrpc_client_call2(&env, client, server_info, "Bug.create", param, &result);
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_value* id;
+ xmlrpc_struct_find_value(&env, result, "id", &id);
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_int bug_id = -1;
+ if (id)
+ {
+ xmlrpc_read_int(&env, id, &bug_id);
+ throw_if_xml_fault_occurred(&env);
+ log("New bug id: %i", bug_id);
+ update_client(_("New bug id: %i"), bug_id);
+ }
+
+ xmlrpc_DECREF(result);
+ xmlrpc_DECREF(param);
+ xmlrpc_DECREF(id);
+ return bug_id;
}
-void CReporterBugzilla::AddAttachments(const std::string& pBugId, const map_crash_report_t& pCrashReport)
+void ctx::add_attachments(const char* bug_id_str, const map_crash_report_t& pCrashReport)
{
- xmlrpc_c::paramList paramList;
- map_xmlrpc_params_t attachmentParams;
- std::vector<xmlrpc_c::value> ret;
- NSSBase64Encoder* base64;
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
- map_crash_report_t::const_iterator it;
- for (it = pCrashReport.begin(); it != pCrashReport.end(); it++)
+ xmlrpc_value* result = NULL;
+
+ map_crash_report_t::const_iterator it = pCrashReport.begin();
+ for (; it != pCrashReport.end(); it++)
{
if (it->second[CD_TYPE] == CD_ATT)
{
- m_sAttchmentInBase64 = "";
- base64 = NSSBase64Encoder_Create(Base64Encode_cb, this);
- if (!base64)
- {
- throw CABRTException(EXCEP_PLUGIN, "CReporterBugzilla::AddAttachemnt(): cannot initialize base64.");
- }
-
- NSSBase64Encoder_Update(base64,
- reinterpret_cast<const unsigned char*>(it->second[CD_CONTENT].c_str()),
- it->second[CD_CONTENT].length());
- NSSBase64Encoder_Destroy(base64, PR_FALSE);
-
- paramList.add(xmlrpc_c::value_string(pBugId));
- attachmentParams["description"] = xmlrpc_c::value_string("File: " + it->first);
- attachmentParams["filename"] = xmlrpc_c::value_string(it->first);
- attachmentParams["contenttype"] = xmlrpc_c::value_string("text/plain");
- attachmentParams["data"] = xmlrpc_c::value_string(m_sAttchmentInBase64);
- paramList.add(xmlrpc_c::value_struct(attachmentParams));
- xmlrpc_c::rpcPtr rpc(new xmlrpc_c::rpc("bugzilla.addAttachment", paramList));
- try
- {
- rpc->call(m_pXmlrpcClient, m_pCarriageParm);
- ret = xmlrpc_c::value_array(rpc->getResult()).vectorValueValue();
- std::stringstream ss;
- ss << xmlrpc_c::value_int(ret[0]);
- log("New attachment id: %s", ss.str().c_str());
- }
- catch (std::exception& e)
- {
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::AddAttachemnt(): ") + e.what());
- }
+ std::string description = "File: " + it->first;
+ const std::string& to_encode = it->second[CD_CONTENT];
+ char *encoded64 = encode_base64(to_encode.c_str(), to_encode.length());
+ xmlrpc_value* param = xmlrpc_build_value(&env,"(s{s:s,s:s,s:s,s:s})",
+ bug_id_str,
+ "description", description.c_str(),
+ "filename", it->first.c_str(),
+ "contenttype", "text/plain",
+ "data", encoded64
+ );
+ free(encoded64);
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_client_call2(&env, client, server_info, "bugzilla.addAttachment", param, &result);
+ throw_if_xml_fault_occurred(&env);
+ xmlrpc_DECREF(result);
+ xmlrpc_DECREF(param);
}
}
}
-std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs)
-{
- std::string package = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT];
- std::string component = pCrashReport.find(FILENAME_COMPONENT)->second[CD_CONTENT];
- std::string uuid = pCrashReport.find(CD_UUID)->second[CD_CONTENT];
- std::string bugId;
+} /* namespace */
- NewXMLRPCClient();
+/*
+ * CReporterBugzilla
+ */
- m_bLoggedIn = false;
+CReporterBugzilla::CReporterBugzilla() :
+ m_bNoSSLVerify(false),
+ m_sBugzillaURL("https://bugzilla.redhat.com"),
+ m_sBugzillaXMLRPC("https://bugzilla.redhat.com"XML_RPC_SUFFIX)
+{}
+
+CReporterBugzilla::~CReporterBugzilla()
+{}
+
+std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
+ const std::string& pArgs)
+{
+ int32_t bug_id = -1;
+ std::string Login;
+ std::string Password;
+ std::string BugzillaXMLRPC;
+ std::string BugzillaURL;
+ bool NoSSLVerify;
+ map_plugin_settings_t settings = parse_settings(pSettings);
+ /* if parse_settings fails it returns an empty map so we need to use defaults*/
+ if(!settings.empty())
+ {
+ Login = settings["Login"];
+ Password = settings["Password"];
+ BugzillaXMLRPC = settings["BugzillaXMLRPC"];
+ BugzillaURL = settings["BugzillaURL"];
+ NoSSLVerify = settings["NoSSLVerify"] == "yes";
+ }
+ else
+ {
+ Login = m_sLogin;
+ Password = m_sPassword;
+ BugzillaXMLRPC = m_sBugzillaXMLRPC;
+ BugzillaURL = m_sBugzillaURL;
+ NoSSLVerify = m_bNoSSLVerify;
+ }
+
+ std::string component = pCrashReport.find(FILENAME_COMPONENT)->second[CD_CONTENT];
+ std::string uuid = pCrashReport.find(CD_UUID)->second[CD_CONTENT];
try
{
+ ctx bz_server(BugzillaXMLRPC.c_str(), NoSSLVerify);
+
update_client(_("Checking for duplicates..."));
- bugId = CheckUUIDInBugzilla(component, uuid);
- if ( bugId != "" ) {
- update_client(_("Logging into bugzilla..."));
- Login();
- m_bLoggedIn = true;
+ bug_id = bz_server.check_uuid_in_bugzilla(component.c_str(), uuid.c_str());
+
+ update_client(_("Logging into bugzilla..."));
+ if ((Login == "") && (Password == ""))
+ {
+ VERB3 log("Empty login and password");
+ throw CABRTException(EXCEP_PLUGIN, std::string(_("Empty login and password. Please check Bugzilla.conf")));
+ }
+ bz_server.login(Login.c_str(), Password.c_str());
+
+ if (bug_id > 0)
+ {
update_client(_("Checking CC..."));
- if (!CheckCCAndReporter(bugId) && m_bLoggedIn)
+ if (!bz_server.check_cc_and_reporter(bug_id, Login.c_str()))
{
- AddPlusOneCC(bugId);
+ bz_server.add_plus_one_cc(bug_id, Login.c_str());
}
- DeleteXMLRPCClient();
- return m_sBugzillaURL + "/show_bug.cgi?id=" + bugId;
+ bz_server.logout();
+ return BugzillaURL + "/show_bug.cgi?id=" + to_string(bug_id);
}
- update_client(_("Logging into bugzilla..."));
- Login();
- m_bLoggedIn = true;
+
+ update_client(_("Creating new bug..."));
+ bug_id = bz_server.new_bug(pCrashReport);
+ bz_server.add_attachments(to_string(bug_id).c_str(), pCrashReport);
+
+ update_client(_("Logging out..."));
+ bz_server.logout();
}
catch (CABRTException& e)
{
- DeleteXMLRPCClient();
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Report(): ") + e.what());
- return "";
+ throw CABRTException(EXCEP_PLUGIN, e.what());
}
+ if (bug_id > 0)
+ {
+ return BugzillaURL + "/show_bug.cgi?id=" + to_string(bug_id);
+ }
- update_client(_("Creating new bug..."));
- try
+ return BugzillaURL + "/show_bug.cgi?id=";
+}
+
+map_plugin_settings_t CReporterBugzilla::parse_settings(const map_plugin_settings_t& pSettings)
+{
+ map_plugin_settings_t plugin_settings;
+ map_plugin_settings_t::const_iterator it;
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+
+ it = pSettings.find("BugzillaURL");
+ if (it != end)
{
- bugId = NewBug(pCrashReport);
- AddAttachments(bugId, pCrashReport);
- update_client(_("Logging out..."));
- Logout();
+ std::string BugzillaURL = it->second;
+ //remove the /xmlrpc.cgi part from old settings
+ //FIXME: can be removed after users are informed about new config format
+ std::string::size_type pos = BugzillaURL.find(XML_RPC_SUFFIX);
+ if (pos != std::string::npos)
+ {
+ BugzillaURL.erase(pos);
+ }
+ //remove the trailing '/'
+ while (BugzillaURL[BugzillaURL.length() - 1] == '/')
+ {
+ BugzillaURL.erase(BugzillaURL.length() - 1);
+ }
+ plugin_settings["BugzillaXMLRPC"] = BugzillaURL + XML_RPC_SUFFIX;
+ plugin_settings["BugzillaURL"] = BugzillaURL;
}
- catch (CABRTException& e)
+
+ it = pSettings.find("Login");
+ if (it == end)
{
- DeleteXMLRPCClient();
- throw CABRTException(EXCEP_PLUGIN, std::string("CReporterBugzilla::Report(): ") + e.what());
+ /* if any of the option is not set we use the defaults for everything */
+ plugin_settings.clear();
+ return plugin_settings;
}
+ plugin_settings["Login"] = it->second;
+ it = pSettings.find("Password");
+ if (it == end)
+ {
+ plugin_settings.clear();
+ return plugin_settings;
+ }
+ plugin_settings["Password"] = it->second;
- DeleteXMLRPCClient();
- return m_sBugzillaURL + "/show_bug.cgi?id=" + bugId;
+ it = pSettings.find("NoSSLVerify");
+ if (it == end)
+ {
+ plugin_settings.clear();
+ return plugin_settings;
+ }
+ plugin_settings["NoSSLVerify"] = it->second;
+ VERB1 log("User settings ok, using them instead of defaults");
+ return plugin_settings;
}
void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("BugzillaURL") != pSettings.end())
+//BUG! This gets called when user's keyring contains login data,
+//then it takes precedence over /etc/abrt/plugins/Bugzilla.conf.
+//I got a case when keyring had a STALE password, and there was no way
+//for me to know that it is being used. Moreover, when I discovered it
+//(by hacking abrt source!), I don't know how to purge it from the keyring.
+//At the very least, log("SOMETHING") here.
+
+ map_plugin_settings_t::const_iterator it;
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+
+ it = pSettings.find("BugzillaURL");
+ if (it != end)
{
- m_sBugzillaURL = pSettings.find("BugzillaURL")->second;
+ m_sBugzillaURL = it->second;
//remove the /xmlrpc.cgi part from old settings
//FIXME: can be removed after users are informed about new config format
std::string::size_type pos = m_sBugzillaURL.find(XML_RPC_SUFFIX);
- if(pos != std::string::npos)
+ if (pos != std::string::npos)
{
m_sBugzillaURL.erase(pos);
}
@@ -465,40 +599,41 @@ void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings)
m_sBugzillaURL.erase(--m_sBugzillaURL.end());
}
*/
- m_sBugzillaXMLRPC = m_sBugzillaURL + std::string(XML_RPC_SUFFIX);
+ m_sBugzillaXMLRPC = m_sBugzillaURL + XML_RPC_SUFFIX;
}
- if (pSettings.find("Login") != pSettings.end())
+ it = pSettings.find("Login");
+ if (it != end)
{
- m_sLogin = pSettings.find("Login")->second;
+ m_sLogin = it->second;
}
- if (pSettings.find("Password") != pSettings.end())
+ it = pSettings.find("Password");
+ if (it != end)
{
- m_sPassword = pSettings.find("Password")->second;
+ m_sPassword = it->second;
}
- if (pSettings.find("NoSSLVerify") != pSettings.end())
+ it = pSettings.find("NoSSLVerify");
+ if (it != end)
{
- m_bNoSSLVerify = pSettings.find("NoSSLVerify")->second == "yes";
+ m_bNoSSLVerify = (it->second == "yes");
}
}
-map_plugin_settings_t CReporterBugzilla::GetSettings()
+const map_plugin_settings_t& CReporterBugzilla::GetSettings()
{
- map_plugin_settings_t ret;
-
- ret["BugzillaURL"] = m_sBugzillaURL;
- ret["Login"] = m_sLogin;
- ret["Password"] = m_sPassword;
- ret["NoSSLVerify"] = m_bNoSSLVerify ? "yes" : "no";
+ m_pSettings["BugzillaURL"] = m_sBugzillaURL;
+ m_pSettings["Login"] = m_sLogin;
+ m_pSettings["Password"] = m_sPassword;
+ m_pSettings["NoSSLVerify"] = m_bNoSSLVerify ? "yes" : "no";
- return ret;
+ return m_pSettings;
}
PLUGIN_INFO(REPORTER,
CReporterBugzilla,
"Bugzilla",
- "0.0.3",
+ "0.0.4",
"Check if a bug isn't already reported in a bugzilla "
"and if not, report it.",
- "zprikryl@redhat.com",
+ "npajkovs@redhat.com",
"https://fedorahosted.org/abrt/wiki",
PLUGINS_LIB_DIR"/Bugzilla.GTKBuilder");
diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h
index f6a8976f..55a5f5f0 100644
--- a/lib/Plugins/Bugzilla.h
+++ b/lib/Plugins/Bugzilla.h
@@ -3,48 +3,26 @@
#include "Plugin.h"
#include "Reporter.h"
-#include <xmlrpc-c/client.hpp>
-
-#include <nssb64.h>
class CReporterBugzilla : public CReporter
{
private:
- typedef std::map<std::string, xmlrpc_c::value> map_xmlrpc_params_t;
-
- void NewXMLRPCClient();
- void DeleteXMLRPCClient();
- static PRInt32 Base64Encode_cb(void *arg, const char *obuf, PRInt32 size);
- void Login();
- void Logout();
- bool CheckCCAndReporter(const std::string& pBugId);
- void AddPlusOneCC(const std::string& pBugId);
- std::string CheckUUIDInBugzilla(const std::string& pComponent, const std::string& pUUID);
- std::string NewBug(const map_crash_report_t& pCrashReport);
- void AddAttachments(const std::string& pBugId, const map_crash_report_t& pCrashReport);
- void CreateNewBugDescription(const map_crash_report_t& pCrashReport,
- std::string& pDescription);
- void GetProductAndVersion(const std::string& pRelease,
- std::string& pProduct,
- std::string& pVersion);
-
- xmlrpc_c::clientXmlTransport_curl* m_pXmlrpcTransport;
- xmlrpc_c::client_xml* m_pXmlrpcClient;
- xmlrpc_c::carriageParm_curl0 *m_pCarriageParm;
+ bool m_bNoSSLVerify;
std::string m_sBugzillaURL;
std::string m_sBugzillaXMLRPC;
std::string m_sLogin;
std::string m_sPassword;
std::string m_sAttchmentInBase64;
- bool m_bNoSSLVerify;
- bool m_bLoggedIn;
+
+ map_plugin_settings_t parse_settings(const map_plugin_settings_t& pSettings);
public:
CReporterBugzilla();
virtual ~CReporterBugzilla();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+ virtual const map_plugin_settings_t& GetSettings();
virtual std::string Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
const std::string& pArgs);
};
diff --git a/lib/Plugins/CCpp.conf b/lib/Plugins/CCpp.conf
index 02c6c1ab..988ddf32 100644
--- a/lib/Plugins/CCpp.conf
+++ b/lib/Plugins/CCpp.conf
@@ -1,14 +1,17 @@
# Configuration file for CCpp add-on
-# NONE OF THESE OPTIONS IS SUPPORTED
-# generate memory map too
+# generate memory map too (IGNORED FOR NOW)
MemoryMap = no
# how to get debug-info: install, mount
## install - download and install debug-info packages
## mount - mount fedora NFS with debug info
+## (IGNORED FOR NOW)
DebugInfo = install
-# With this option set to "yes"
-# will be installed debuginfo
-InstallDebuginfo = yes
+# If this option is set to "yes",
+# debuginfos will be installed to @@LOCALSTATEDIR@@/cache/abrt-di
+InstallDebugInfo = yes
+# Keep @@LOCALSTATEDIR@@/cache/abrt-di
+# from growing out-of-bounds.
+DebugInfoCacheMB = 4000
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 0e0eb3b3..6d6edd56 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -33,28 +33,21 @@
#include "CommLayerInner.h"
#include "Polkit.h"
-#define CORE_PATTERN_IFACE "/proc/sys/kernel/core_pattern"
-#define CORE_PATTERN "|"CCPP_HOOK_PATH" "DEBUG_DUMPS_DIR" %p %s %u"
+#define CORE_PATTERN_IFACE "/proc/sys/kernel/core_pattern"
+#define CORE_PATTERN "|"CCPP_HOOK_PATH" "DEBUG_DUMPS_DIR" %p %s %u"
#define FILENAME_COREDUMP "coredump"
#define FILENAME_BACKTRACE "backtrace"
#define FILENAME_MEMORYMAP "memorymap"
+#define DEBUGINFO_CACHE_DIR LOCALSTATEDIR"/cache/abrt-di"
+
CAnalyzerCCpp::CAnalyzerCCpp() :
- m_bMemoryMap(false), m_bInstallDebuginfo(true)
+ m_bMemoryMap(false),
+ m_bInstallDebugInfo(true),
+ m_nDebugInfoCacheMB(4000)
{}
-static bool is_hexstr(const char* str)
-{
- while (*str)
- {
- if (!isxdigit(*str))
- return false;
- str++;
- }
- return true;
-}
-
static std::string CreateHash(const std::string& pInput)
{
std::string ret = "";
@@ -102,7 +95,6 @@ static std::string concat_str_vector(char **strings)
static pid_t ExecVP(char** pArgs, uid_t uid, std::string& pOutput)
{
int pipeout[2];
- char buff[1024];
pid_t child;
struct passwd* pw = getpwuid(uid);
@@ -144,6 +136,7 @@ static pid_t ExecVP(char** pArgs, uid_t uid, std::string& pOutput)
close(pipeout[1]); /* write side of the pipe */
int r;
+ char buff[1024];
while ((r = read(pipeout[0], buff, sizeof(buff) - 1)) > 0)
{
buff[r] = '\0';
@@ -156,7 +149,96 @@ static pid_t ExecVP(char** pArgs, uid_t uid, std::string& pOutput)
return 0;
}
-static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktrace)
+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 LineRating rate_line(const char *line)
+{
+#define FOUND(x) (strstr(line, x) != NULL)
+ /* see the "enum LineRating" comments for possible combinations */
+ const char *function = strstr(line, " in ");
+ if (function)
+ {
+ if (function[4] == '?') /* " in ??" does not count */
+ {
+ function = NULL;
+ }
+ else
+ {
+ bool source_file = FOUND(" at ");
+ if (source_file)
+ return Good;
+ }
+ }
+ 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;
+
+ /* 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] == '#') /* this separates frames from each other */
+ {
+ std::string s(backtrace + i + 1, len);
+ multiplier++;
+ rating += rate_line(s.c_str()) * multiplier;
+ best_possible_rating += BestRating * multiplier;
+ 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;
+}
+
+static void GetBacktrace(const char *pDebugDumpDir, std::string& pBacktrace)
{
update_client(_("Getting backtrace..."));
@@ -174,13 +256,13 @@ static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktra
unsetenv("TERM");
putenv((char*)"TERM=dumb");
- char* args[9];
+ char* args[11];
args[0] = (char*)"gdb";
args[1] = (char*)"-batch";
// when/if gdb supports it:
// (https://bugzilla.redhat.com/show_bug.cgi?id=528668):
- //args[2] = (char*)"-ex";
- //args[3] = "set debug-file-directory /usr/lib/debug/.build-id:/var/cache/abrt-di/usr/lib/debug/.build-id";
+ args[2] = (char*)"-ex";
+ args[3] = (char*)"set debug-file-directory /usr/lib/debug:" DEBUGINFO_CACHE_DIR"/usr/lib/debug";
/*
* Unfortunately, "file BINARY_FILE" doesn't work well if BINARY_FILE
* was deleted (as often happens during system updates):
@@ -188,18 +270,18 @@ static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktra
* even if it is completely unrelated to the coredump
* See https://bugzilla.redhat.com/show_bug.cgi?id=525721
*/
- args[2] = (char*)"-ex";
- args[3] = xasprintf("file %s", executable.c_str());
args[4] = (char*)"-ex";
- args[5] = xasprintf("core-file %s/"FILENAME_COREDUMP, pDebugDumpDir.c_str());
+ args[5] = xasprintf("file %s", executable.c_str());
args[6] = (char*)"-ex";
- args[7] = (char*)"thread apply all backtrace full";
- args[8] = NULL;
+ args[7] = xasprintf("core-file %s/"FILENAME_COREDUMP, pDebugDumpDir);
+ args[8] = (char*)"-ex";
+ args[9] = (char*)"thread apply all backtrace full";
+ args[10] = NULL;
ExecVP(args, atoi(UID.c_str()), pBacktrace);
- free(args[3]);
free(args[5]);
+ free(args[7]);
}
static std::string GetIndependentBacktrace(const std::string& pBacktrace)
@@ -353,7 +435,7 @@ static void GetIndependentBuildIdPC(const std::string& pBuildIdPC, std::string&
}
}
-static std::string run_unstrip_n(const std::string& pDebugDumpDir)
+static std::string run_unstrip_n(const char *pDebugDumpDir)
{
std::string UID;
{
@@ -364,7 +446,7 @@ static std::string run_unstrip_n(const std::string& pDebugDumpDir)
char* args[4];
args[0] = (char*)"eu-unstrip";
- args[1] = xasprintf("--core=%s/"FILENAME_COREDUMP, pDebugDumpDir.c_str());
+ args[1] = xasprintf("--core=%s/"FILENAME_COREDUMP, pDebugDumpDir);
args[2] = (char*)"-n";
args[3] = NULL;
@@ -376,7 +458,19 @@ static std::string run_unstrip_n(const std::string& pDebugDumpDir)
return output;
}
-static void InstallDebugInfos(const std::string& pDebugDumpDir, std::string& build_ids)
+#if 0
+/* older code */
+static bool is_hexstr(const char* str)
+{
+ while (*str)
+ {
+ if (!isxdigit(*str))
+ return false;
+ str++;
+ }
+ return true;
+}
+static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids)
{
log("Getting module names, file names, build IDs from core file");
std::string unstrip_list = run_unstrip_n(pDebugDumpDir);
@@ -531,8 +625,8 @@ Another application is holding the yum lock, cannot continue
if (last >= 0 && buff[last] == '\n')
buff[last] = '\0';
- /* log(buff); - update_client logs it too */
- update_client(buff); /* maybe only if buff != ""? */
+ log("%s", buff);
+ update_client("%s", buff); /* maybe only if buff != ""? */
#ifdef COMPLAIN_IF_NO_DEBUGINFO
if (already_installed == false)
@@ -565,43 +659,44 @@ Another application is holding the yum lock, cannot continue
fclose(pipeout_fp);
wait(NULL);
}
-#if 0
-/* Needs gdb feature from here: https://bugzilla.redhat.com/show_bug.cgi?id=528668 */
-static void InstallDebugInfos(const std::string& pDebugDumpDir, std::string& build_ids)
+#endif
+/* Needs gdb feature from here: https://bugzilla.redhat.com/show_bug.cgi?id=528668
+ * It is slated to be in F12/RHEL6.
+ */
+static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids)
{
update_client(_("Searching for debug-info packages..."));
- int pipein[2], pipeout[2]; //TODO: get rid of pipein. Can we use ExecVP?
- xpipe(pipein);
+ int pipeout[2]; //TODO: can we use ExecVP?
xpipe(pipeout);
pid_t child = fork();
if (child < 0)
{
- /*close(pipein[0]); close(pipeout[0]); - why bother */
- /*close(pipein[1]); close(pipeout[1]); */
+ /*close(pipeout[0]); - why bother */
+ /*close(pipeout[1]); */
perror_msg_and_die("fork");
}
if (child == 0)
{
- close(pipein[1]);
close(pipeout[0]);
- xmove_fd(pipein[0], STDIN_FILENO);
xmove_fd(pipeout[1], STDOUT_FILENO);
+ close(STDIN_FILENO);
+ xopen("/dev/null", O_RDONLY);
/* Not a good idea, we won't see any error messages */
/*close(STDERR_FILENO);*/
setsid();
- char *coredump = xasprintf("%s/"FILENAME_COREDUMP, pDebugDumpDir.c_str());
- char *tempdir = xasprintf("/tmp/abrt-%u-%lu", (int)getpid(), (long)time(NULL));
+ char *coredump = xasprintf("%s/"FILENAME_COREDUMP, pDebugDumpDir);
+ /* SELinux guys are not happy with /tmp, using /var/run/abrt */
+ char *tempdir = xasprintf(LOCALSTATEDIR"/run/abrt/tmp-%u-%lu", (int)getpid(), (long)time(NULL));
/* log() goes to stderr/syslog, it's ok to use it here */
- VERB1 log("Executing: %s %s %s %s", "abrt-debuginfo-install", coredump, tempdir, "/var/cache/abrt-di");
- execlp("abrt-debuginfo-install", "abrt-debuginfo-install", coredump, tempdir, "/var/cache/abrt-di", NULL);
+ VERB1 log("Executing: %s %s %s %s", "abrt-debuginfo-install", coredump, tempdir, DEBUGINFO_CACHE_DIR);
+ execlp("abrt-debuginfo-install", "abrt-debuginfo-install", coredump, tempdir, DEBUGINFO_CACHE_DIR, NULL);
exit(1);
}
- close(pipein[0]);
close(pipeout[1]);
update_client(_("Downloading and installing debug-info packages..."));
@@ -635,17 +730,79 @@ static void InstallDebugInfos(const std::string& pDebugDumpDir, std::string& bui
}
if (*p)
{
- /* log(buff); - update_client logs it too */
- update_client(buff);
+ log("%s", buff);
+ update_client("%s", buff);
}
}
fclose(pipeout_fp);
wait(NULL);
}
-#endif
-std::string CAnalyzerCCpp::GetLocalUUID(const std::string& pDebugDumpDir)
+static double get_dir_size(const char *dirname, std::string *worst_file, double *maxsz)
+{
+ DIR *dp = opendir(dirname);
+ if (dp == NULL)
+ return 0;
+
+ struct dirent *ep;
+ struct stat stats;
+ double size = 0;
+ while ((ep = readdir(dp)) != NULL)
+ {
+ if (dot_or_dotdot(ep->d_name))
+ continue;
+ std::string dname = concat_path_file(dirname, ep->d_name);
+ if (lstat(dname.c_str(), &stats) != 0)
+ continue;
+ if (S_ISDIR(stats.st_mode))
+ {
+ double sz = get_dir_size(dname.c_str(), worst_file, maxsz);
+ size += sz;
+ }
+ else if (S_ISREG(stats.st_mode))
+ {
+ double sz = stats.st_size;
+ size += sz;
+
+ if (worst_file)
+ {
+ /* Calculate "weighted" size and age
+ * w = sz_kbytes * age_mins */
+ sz /= 1024;
+ long age = (time(NULL) - stats.st_mtime) / 60;
+ if (age > 0)
+ sz *= age;
+
+ if (sz > *maxsz)
+ {
+ *maxsz = sz;
+ *worst_file = dname;
+ }
+ }
+ }
+ }
+ closedir(dp);
+ return size;
+}
+
+static void trim_debuginfo_cache(unsigned max_mb)
+{
+ while (1)
+ {
+ std::string worst_file;
+ double maxsz = 0;
+ double cache_sz = get_dir_size(DEBUGINFO_CACHE_DIR, &worst_file, &maxsz);
+ if (cache_sz / (1024 * 1024) < max_mb)
+ break;
+ VERB1 log("%s is %.0f bytes (over %u MB), deleting '%s'",
+ DEBUGINFO_CACHE_DIR, cache_sz, max_mb, worst_file.c_str());
+ if (unlink(worst_file.c_str()) != 0)
+ perror_msg("Can't unlink '%s'", worst_file.c_str());
+ }
+}
+
+std::string CAnalyzerCCpp::GetLocalUUID(const char *pDebugDumpDir)
{
log(_("Getting local universal unique identification..."));
@@ -664,7 +821,7 @@ std::string CAnalyzerCCpp::GetLocalUUID(const std::string& pDebugDumpDir)
return CreateHash(package + executable + independentBuildIdPC);
}
-std::string CAnalyzerCCpp::GetGlobalUUID(const std::string& pDebugDumpDir)
+std::string CAnalyzerCCpp::GetGlobalUUID(const char *pDebugDumpDir)
{
log(_("Getting global universal unique identification..."));
@@ -709,7 +866,7 @@ static bool DebuginfoCheckPolkit(int uid)
return false;
}
-void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir, int force)
+void CAnalyzerCCpp::CreateReport(const char *pDebugDumpDir, int force)
{
update_client(_("Starting report creation..."));
@@ -734,10 +891,9 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir, int force)
dd.Close(); /* do not keep dir locked longer than needed */
std::string build_ids;
- map_plugin_settings_t settings = GetSettings();
- if (settings["InstallDebuginfo"] == "yes" &&
- DebuginfoCheckPolkit(atoi(UID.c_str())) )
- {
+ if (m_bInstallDebugInfo && DebuginfoCheckPolkit(atoi(UID.c_str()))) {
+ if (m_nDebugInfoCacheMB > 0)
+ trim_debuginfo_cache(m_nDebugInfoCacheMB);
InstallDebugInfos(pDebugDumpDir, build_ids);
}
else
@@ -748,12 +904,13 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir, int force)
GetBacktrace(pDebugDumpDir, backtrace);
dd.Open(pDebugDumpDir);
- dd.SaveText(FILENAME_BACKTRACE, build_ids + backtrace);
-log("BACKTRACE:'%s'", (build_ids + backtrace).c_str());
+ dd.SaveText(FILENAME_BACKTRACE, (build_ids + backtrace).c_str());
if (m_bMemoryMap)
{
dd.SaveText(FILENAME_MEMORYMAP, "memory map of the crashed C/C++ application, not implemented yet");
}
+ dd.SaveText(FILENAME_RATING, to_string(rate_backtrace(backtrace.c_str())).c_str());
+ dd.Close();
}
void CAnalyzerCCpp::Init()
@@ -805,8 +962,11 @@ void CAnalyzerCCpp::DeInit()
void CAnalyzerCCpp::SetSettings(const map_plugin_settings_t& pSettings)
{
+ m_pSettings = pSettings;
+
map_plugin_settings_t::const_iterator end = pSettings.end();
- map_plugin_settings_t::const_iterator it = pSettings.find("MemoryMap");
+ map_plugin_settings_t::const_iterator it;
+ it = pSettings.find("MemoryMap");
if (it != end)
{
m_bMemoryMap = it->second == "yes";
@@ -816,22 +976,28 @@ void CAnalyzerCCpp::SetSettings(const map_plugin_settings_t& pSettings)
{
m_sDebugInfo = it->second;
}
- it = pSettings.find("InstallDebuginfo");
+ it = pSettings.find("DebugInfoCacheMB");
if (it != end)
{
- m_bInstallDebuginfo = it->second == "yes";
+ m_nDebugInfoCacheMB = atoi(it->second.c_str());
+ }
+ it = pSettings.find("InstallDebugInfo");
+ if (it == end) //compat, remove after 0.0.11
+ it = pSettings.find("InstallDebuginfo");
+ if (it != end)
+ {
+ m_bInstallDebugInfo = it->second == "yes";
}
}
-map_plugin_settings_t CAnalyzerCCpp::GetSettings()
+const map_plugin_settings_t& CAnalyzerCCpp::GetSettings()
{
- map_plugin_settings_t ret;
-
- ret["MemoryMap"] = m_bMemoryMap ? "yes" : "no";
- ret["DebugInfo"] = m_sDebugInfo;
- ret["InstallDebuginfo"] = m_bInstallDebuginfo ? "yes" : "no";
+ m_pSettings["MemoryMap"] = m_bMemoryMap ? "yes" : "no";
+ m_pSettings["DebugInfo"] = m_sDebugInfo;
+ m_pSettings["DebugInfoCacheMB"] = to_string(m_nDebugInfoCacheMB);
+ m_pSettings["InstallDebugInfo"] = m_bInstallDebugInfo ? "yes" : "no";
- return ret;
+ return m_pSettings;
}
PLUGIN_INFO(ANALYZER,
diff --git a/lib/Plugins/CCpp.h b/lib/Plugins/CCpp.h
index 3fbe0b9e..e2abdece 100644
--- a/lib/Plugins/CCpp.h
+++ b/lib/Plugins/CCpp.h
@@ -31,18 +31,20 @@ class CAnalyzerCCpp : public CAnalyzer
{
private:
bool m_bMemoryMap;
- bool m_bInstallDebuginfo;
+ bool m_bInstallDebugInfo;
+ unsigned m_nDebugInfoCacheMB;
std::string m_sOldCorePattern;
std::string m_sDebugInfo;
+
public:
CAnalyzerCCpp();
- virtual std::string GetLocalUUID(const std::string& pDebugDumpDir);
- virtual std::string GetGlobalUUID(const std::string& pDebugDumpDir);
- virtual void CreateReport(const std::string& pDebugDumpDir, int force);
+ virtual std::string GetLocalUUID(const char *pDebugDumpDir);
+ virtual std::string GetGlobalUUID(const char *pDebugDumpDir);
+ virtual void CreateReport(const char *pDebugDumpDir, int force);
virtual void Init();
virtual void DeInit();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+ virtual const map_plugin_settings_t& GetSettings();
};
#endif /* CCPP */
diff --git a/lib/Plugins/Catcut.GTKBuilder b/lib/Plugins/Catcut.GTKBuilder
new file mode 100644
index 00000000..b8c7c313
--- /dev/null
+++ b/lib/Plugins/Catcut.GTKBuilder
@@ -0,0 +1,184 @@
+<?xml version="1.0"?>
+<interface>
+ <requires lib="gtk+" version="2.16"/>
+ <!-- interface-naming-policy project-wide -->
+ <object class="GtkDialog" id="PluginDialog">
+ <property name="border_width">5</property>
+ <property name="modal">True</property>
+ <property name="window_position">center-on-parent</property>
+ <property name="type_hint">normal</property>
+ <property name="has_separator">False</property>
+ <child internal-child="vbox">
+ <object class="GtkVBox" id="dialog-vbox3">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">2</property>
+ <child>
+ <object class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Catcut plugin configuration</property>
+ </object>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">4</property>
+ <property name="n_columns">2</property>
+ <child>
+ <object class="GtkLabel" id="lCatcutURL">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Catcut URL</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lLogin">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Login</property>
+ </object>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="lPassword">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Password</property>
+ </object>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_CatcutURL">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Login">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="conf_Password">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
+ <property name="invisible_char">&#x25CF;</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="cb_Password">
+ <property name="label" translatable="yes">Show password</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ </packing>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="conf_NoSSLVerify">
+ <property name="label" translatable="yes">No SSL verify</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <object class="GtkHButtonBox" id="dialog-action_area3">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="bApply">
+ <property name="label">gtk-apply</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="button2">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="-10">bApply</action-widget>
+ <action-widget response="-6">button2</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/lib/Plugins/Catcut.conf b/lib/Plugins/Catcut.conf
new file mode 100644
index 00000000..456d7f82
--- /dev/null
+++ b/lib/Plugins/Catcut.conf
@@ -0,0 +1,8 @@
+# Catcut URL
+CatcutURL = http://127.0.0.1:8080/catcut/xmlrpc
+# yes means that ssl certificates will not be checked
+NoSSLVerify = no
+# your login has to exist, if you don have any, please create one
+Login = gavin
+# your password
+Password = junk
diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp
new file mode 100644
index 00000000..13fa8a41
--- /dev/null
+++ b/lib/Plugins/Catcut.cpp
@@ -0,0 +1,368 @@
+#include <xmlrpc-c/base.h>
+#include <xmlrpc-c/client.h>
+
+#include "abrtlib.h"
+#include "Catcut.h"
+#include "CrashTypes.h"
+#include "DebugDump.h"
+#include "ABRTException.h"
+#include "CommLayerInner.h"
+#ifdef HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+using namespace std;
+
+static xmlrpc_env env;
+static xmlrpc_client* client = NULL;
+static struct xmlrpc_clientparms clientParms;
+static struct xmlrpc_curl_xportparms curlParms;
+static xmlrpc_server_info* server_info = NULL;
+
+
+static string login(const char* login, const char* passwd);
+//static void logout();
+static void new_xmlrpc_client(const char* url, bool no_ssl_verify);
+static void destroy_xmlrpc_client();
+static void create_new_bug_description(const map_crash_report_t& pCrashReport, string& pDescription);
+static void get_product_and_version(const string& pRelease,
+ string& pProduct,
+ string& pVersion);
+
+
+static void throw_if_xml_fault_occurred()
+{
+ if (env.fault_occurred)
+ {
+ string errmsg = ssprintf("XML-RPC Fault: %s(%d)", env.fault_string, env.fault_code);
+ error_msg("%s", errmsg.c_str()); // show error in daemon log
+ throw CABRTException(EXCEP_PLUGIN, errmsg);
+ }
+}
+
+static void new_xmlrpc_client(const char* url, bool no_ssl_verify)
+{
+ xmlrpc_env_init(&env);
+
+ /* This should be done at program startup, once.
+ * We do it in abrtd's main */
+ /* xmlrpc_client_setup_global_const(&env); */
+
+ curlParms.network_interface = NULL;
+ curlParms.no_ssl_verifypeer = no_ssl_verify;
+ curlParms.no_ssl_verifyhost = no_ssl_verify;
+#ifdef VERSION
+ curlParms.user_agent = PACKAGE_NAME"/"VERSION;
+#else
+ curlParms.user_agent = "abrt";
+#endif
+
+ clientParms.transport = "curl";
+ clientParms.transportparmsP = &curlParms;
+ clientParms.transportparm_size = XMLRPC_CXPSIZE(user_agent);
+
+ xmlrpc_client_create(&env, XMLRPC_CLIENT_NO_FLAGS, PACKAGE_NAME, VERSION, &clientParms, XMLRPC_CPSIZE(transportparm_size),
+ &client);
+ throw_if_xml_fault_occurred();
+
+ server_info = xmlrpc_server_info_new(&env, url);
+ throw_if_xml_fault_occurred();
+}
+
+static void destroy_xmlrpc_client()
+{
+ xmlrpc_server_info_free(server_info);
+ xmlrpc_env_clean(&env);
+ xmlrpc_client_destroy(client);
+}
+
+static string login(const char* login, const char* passwd)
+{
+ xmlrpc_value* param = xmlrpc_build_value(&env, "(ss)", login, passwd);
+ throw_if_xml_fault_occurred();
+
+ xmlrpc_value* result;
+ xmlrpc_client_call2(&env, client, server_info, "Catcut.auth", param, &result);
+ throw_if_xml_fault_occurred();
+ xmlrpc_DECREF(param);
+
+ xmlrpc_value *cookie_xml;
+ const char *cookie;
+ string cookie_str;
+ xmlrpc_struct_find_value(&env, result, "cookie", &cookie_xml);
+ throw_if_xml_fault_occurred();
+ xmlrpc_read_string(&env, cookie_xml, &cookie);
+ throw_if_xml_fault_occurred();
+ cookie_str = cookie;
+ /* xmlrpc_read_string returns *malloc'ed ptr*.
+ * doc is not very clear on it, but I looked in xmlrpc sources. */
+ free((void*)cookie);
+ xmlrpc_DECREF(cookie_xml);
+
+ xmlrpc_DECREF(result);
+
+ return cookie_str;
+}
+
+// catcut does not have it (yet?)
+//static void logout()
+//{
+// xmlrpc_value* param = xmlrpc_build_value(&env, "(s)", "");
+// throw_if_xml_fault_occurred();
+//
+// xmlrpc_value* result = NULL; /* paranoia */
+// xmlrpc_client_call2(&env, client, server_info, "User.logout", param, &result);
+// throw_if_xml_fault_occurred();
+//}
+
+static void create_new_bug_description(const map_crash_report_t& pCrashReport, string& pDescription)
+{
+ string howToReproduce;
+ string comment;
+
+ if (pCrashReport.find(CD_REPRODUCE) != pCrashReport.end())
+ {
+ howToReproduce = "\n\nHow to reproduce\n"
+ "-----\n" +
+ pCrashReport.find(CD_REPRODUCE)->second[CD_CONTENT];
+ }
+ if (pCrashReport.find(CD_COMMENT) != pCrashReport.end())
+ {
+ comment = "\n\nComment\n"
+ "-----\n" +
+ pCrashReport.find(CD_COMMENT)->second[CD_CONTENT];
+ }
+ pDescription = "\nabrt detected a crash.\n" +
+ howToReproduce +
+ comment +
+ "\n\nAdditional information\n"
+ "======\n";
+
+ map_crash_report_t::const_iterator it;
+ for (it = pCrashReport.begin(); it != pCrashReport.end(); it++)
+ {
+ if (it->second[CD_TYPE] == CD_TXT)
+ {
+ if (it->first != CD_UUID &&
+ it->first != FILENAME_ARCHITECTURE &&
+ it->first != FILENAME_RELEASE &&
+ it->first != CD_REPRODUCE &&
+ it->first != CD_COMMENT)
+ {
+ pDescription += "\n" + it->first + "\n";
+ pDescription += "-----\n";
+ pDescription += it->second[CD_CONTENT] + "\n\n";
+ }
+ }
+ else if (it->second[CD_TYPE] == CD_ATT)
+ {
+ pDescription += "\n\nAttached files\n"
+ "----\n";
+ pDescription += it->first + "\n";
+ }
+ else if (it->second[CD_TYPE] == CD_BIN)
+ {
+ error_msg(_("Binary file %s will not be reported"), it->first.c_str());
+ }
+ }
+}
+
+static void get_product_and_version(const string& pRelease,
+ string& pProduct,
+ string& pVersion)
+{
+ if (pRelease.find("Rawhide") != string::npos)
+ {
+ pProduct = "Fedora";
+ pVersion = "rawhide";
+ return;
+ }
+ if (pRelease.find("Fedora") != string::npos)
+ {
+ pProduct = "Fedora";
+ }
+ else if (pRelease.find("Red Hat Enterprise Linux") != string::npos)
+ {
+ pProduct = "Red Hat Enterprise Linux ";
+ }
+ string::size_type pos = pRelease.find("release");
+ pos = pRelease.find(" ", pos) + 1;
+ while (pRelease[pos] != ' ')
+ {
+ pVersion += pRelease[pos];
+ if (pProduct == "Red Hat Enterprise Linux ")
+ {
+ pProduct += pRelease[pos];
+ }
+ pos++;
+ }
+}
+
+static string new_bug(const char *auth_cookie, const map_crash_report_t& pCrashReport)
+{
+ string package = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT];
+ string component = pCrashReport.find(FILENAME_COMPONENT)->second[CD_CONTENT];
+ string release = pCrashReport.find(FILENAME_RELEASE)->second[CD_CONTENT];
+ string arch = pCrashReport.find(FILENAME_ARCHITECTURE)->second[CD_CONTENT];
+ string uuid = pCrashReport.find(CD_UUID)->second[CD_CONTENT];
+
+ string summary = "[abrt] crash detected in " + package;
+ string status_whiteboard = "abrt_hash:" + uuid;
+
+ string description;
+ create_new_bug_description(pCrashReport, description);
+
+ string product;
+ string version;
+ get_product_and_version(release, product, version);
+
+ xmlrpc_value *param = xmlrpc_build_value(&env, "(s{s:s,s:s,s:s,s:s,s:s,s:s,s:s})",
+ auth_cookie,
+ "product", product.c_str(),
+ "component", component.c_str(),
+ "version", version.c_str(),
+ "summary", summary.c_str(),
+ "description", description.c_str(),
+ "status_whiteboard", status_whiteboard.c_str(),
+ "platform", arch.c_str()
+ );
+ throw_if_xml_fault_occurred();
+
+ xmlrpc_value *result;
+ xmlrpc_client_call2(&env, client, server_info, "Catcut.createTicket", param, &result);
+ throw_if_xml_fault_occurred();
+ xmlrpc_DECREF(param);
+
+ xmlrpc_value *bug_id_xml;
+ const char *bug_id;
+ string bug_id_str;
+ xmlrpc_struct_find_value(&env, result, "ticket", &bug_id_xml);
+ throw_if_xml_fault_occurred();
+ xmlrpc_read_string(&env, bug_id_xml, &bug_id);
+ throw_if_xml_fault_occurred();
+ bug_id_str = bug_id;
+ log("New bug id: %s", bug_id);
+ update_client(_("New bug id: %s"), bug_id);
+ free((void*)bug_id);
+ xmlrpc_DECREF(bug_id_xml);
+
+ xmlrpc_DECREF(result);
+
+ return bug_id_str;
+}
+
+//static
+//void add_attachments(const string& pBugId, const map_crash_report_t& pCrashReport)
+//{
+// xmlrpc_value* result = NULL;
+//
+// map_crash_report_t::const_iterator it = pCrashReport.begin();
+// for (; it != pCrashReport.end(); it++)
+// {
+// if (it->second[CD_TYPE] == CD_ATT)
+// {
+// string description = "File: " + it->first;
+// const string& to_encode = it->second[CD_CONTENT];
+// char *encoded64 = encode_base64(to_encode.c_str(), to_encode.length());
+// xmlrpc_value* param = xmlrpc_build_value(&env,"(s{s:s,s:s,s:s,s:s})",
+// pBugId.c_str(),
+// "description", description.c_str(),
+// "filename", it->first.c_str(),
+// "contenttype", "text/plain",
+// "data", encoded64
+// );
+// free(encoded64);
+// throw_if_xml_fault_occurred();
+//
+//// catcut has this API:
+//// struct response requestUpload(string cookie, string ticket, string filename, string description)
+////response MUST include "errno", "errmsg" members; if an upload is approved,
+////a "URL" MUST be returned in the response. The description string
+////should include a brief description of the file.
+////
+////The client should upload the file via HTTP PUT to the provided
+////URL. The provided URL may be absolute or relative, if relative it must
+////be combined with the base URL of the XML-RPC server using the usual
+////rules for relative URL's (RFC 3986).
+// xmlrpc_client_call2(&env, client, server_info, "catcut.addAttachment", param, &result);
+// throw_if_xml_fault_occurred();
+// }
+// }
+//}
+
+CReporterCatcut::CReporterCatcut() :
+ m_sCatcutURL("http://127.0.0.1:8080/catcut/xmlrpc"),
+ m_bNoSSLVerify(false)
+{}
+
+CReporterCatcut::~CReporterCatcut()
+{}
+
+string CReporterCatcut::Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings, const string& pArgs)
+{
+ update_client(_("Creating new bug..."));
+ try
+ {
+ new_xmlrpc_client(m_sCatcutURL.c_str(), m_bNoSSLVerify);
+ string auth_cookie = login(m_sLogin.c_str(), m_sPassword.c_str());
+ string bug_id = (auth_cookie != "") ? new_bug(auth_cookie.c_str(), pCrashReport) : "";
+// add_attachments(to_string(bug_id), pCrashReport);
+// update_client(_("Logging out..."));
+// logout();
+ destroy_xmlrpc_client();
+ return "New catcut bug ID: " + bug_id;
+
+ }
+ catch (CABRTException& e)
+ {
+ destroy_xmlrpc_client();
+ throw CABRTException(EXCEP_PLUGIN, string("CReporterCatcut::Report(): ") + e.what());
+ }
+}
+
+void CReporterCatcut::SetSettings(const map_plugin_settings_t& pSettings)
+{
+ map_plugin_settings_t::const_iterator it;
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+
+ it = pSettings.find("CatcutURL");
+ if (it != end)
+ {
+ m_sCatcutURL = it->second;
+ }
+ it = pSettings.find("Login");
+ if (it != end)
+ {
+ m_sLogin = it->second;
+ }
+ it = pSettings.find("Password");
+ if (it != end)
+ {
+ m_sPassword = it->second;
+ }
+ it = pSettings.find("NoSSLVerify");
+ if (it != end)
+ {
+ m_bNoSSLVerify = it->second == "yes";
+ }
+}
+
+const map_plugin_settings_t& CReporterCatcut::GetSettings()
+{
+ m_pSettings["CatcutURL"] = m_sCatcutURL;
+ m_pSettings["Login"] = m_sLogin;
+ m_pSettings["Password"] = m_sPassword;
+ m_pSettings["NoSSLVerify"] = m_bNoSSLVerify ? "yes" : "no";
+
+ return m_pSettings;
+}
+
+PLUGIN_INFO(REPORTER,
+ CReporterCatcut,
+ "Catcut",
+ "0.0.1",
+ "Test plugin to report bugs to catcut and if not, report it.",
+ "dvlasenk@redhat.com",
+ "https://fedorahosted.org/abrt/wiki",
+ PLUGINS_LIB_DIR"/Catcut.GTKBuilder");
diff --git a/lib/Plugins/Catcut.h b/lib/Plugins/Catcut.h
new file mode 100644
index 00000000..15efdc1d
--- /dev/null
+++ b/lib/Plugins/Catcut.h
@@ -0,0 +1,27 @@
+#ifndef CATCUT_H_
+#define CATCUT_H_
+
+#include "Plugin.h"
+#include "Reporter.h"
+
+class CReporterCatcut : public CReporter
+{
+ private:
+ std::string m_sCatcutURL;
+ std::string m_sLogin;
+ std::string m_sPassword;
+ bool m_bNoSSLVerify;
+
+ public:
+ CReporterCatcut();
+ virtual ~CReporterCatcut();
+
+ virtual void SetSettings(const map_plugin_settings_t& pSettings);
+ virtual const map_plugin_settings_t& GetSettings();
+
+ virtual std::string Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
+ const std::string& pArgs);
+};
+
+#endif /* CATCUT_H_ */
diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp
index 3492156f..72b3b16e 100644
--- a/lib/Plugins/FileTransfer.cpp
+++ b/lib/Plugins/FileTransfer.cpp
@@ -42,8 +42,8 @@
#include "ABRTException.h"
#include "CommLayerInner.h"
-
using namespace std;
+
#define HBLEN 255
#define FILETRANSFER_DIRLIST DEBUG_DUMPS_DIR "/FileTransferDirlist.txt"
@@ -55,75 +55,51 @@ CFileTransfer::CFileTransfer()
{
}
-void CFileTransfer::SendFile(const std::string& pURL,
- const std::string& pFilename)
+void CFileTransfer::SendFile(const char *pURL, const char *pFilename)
{
- if (pURL == "")
+ int len = strlen(pURL);
+ if (len == 0)
{
- warn_client(_("FileTransfer: URL not specified"));
+ error_msg(_("FileTransfer: URL not specified"));
return;
}
- int len = pURL.length();
- int i = 0;
- std::string protocol;
- while (pURL[i] != ':')
- {
- protocol += pURL[i];
- i++;
- if (i == len)
- {
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): malformed URL, does not contain protocol");
- }
- }
+ update_client(_("Sending archive %s to %s"), pFilename, pURL);
- char buffer[1024];
- snprintf(buffer, 1024, _("Sending archive %s via %s"), pFilename.c_str(), protocol.c_str());
- update_client(buffer);
-
- std::string wholeURL;
- if (pURL[len-1] == '/')
- {
- wholeURL = pURL + pFilename;
- }
- else
- {
- wholeURL = pURL + "/" + pFilename;
- }
+ string wholeURL = concat_path_file(pURL, pFilename);
int result;
int count = m_nRetryCount;
do
{
- FILE * f;
+ FILE *f;
struct stat buf;
- CURL * curl;
+ CURL *curl;
- f = fopen(pFilename.c_str(), "r");
+ f = fopen(pFilename, "r");
if (!f)
{
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): cannot open archive file "+pFilename);
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't open archive file '%s'", pFilename));
}
if (fstat(fileno(f), &buf) == -1)
{
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): cannot stat archive file "+pFilename);
+ fclose(f);
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't stat archive file '%s'", pFilename));
}
curl = curl_easy_init();
if (!curl)
{
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): Curl library error.");
+ throw CABRTException(EXCEP_PLUGIN, "Curl library init error");
}
/* enable uploading */
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* specify target */
curl_easy_setopt(curl, CURLOPT_URL, wholeURL.c_str());
- /*file handle: passed to the default callback, it will fread() it*/
+ /* FILE handle: passed to the default callback, it will fread() it */
curl_easy_setopt(curl, CURLOPT_READDATA, f);
- /*get file size*/
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buf.st_size);
- /*everything is done here; result 0 means success*/
+ /* everything is done here; result 0 means success */
result = curl_easy_perform(curl);
- /*goodbye*/
curl_easy_cleanup(curl);
fclose(f);
}
@@ -223,7 +199,7 @@ static void create_targz(const char * archive_name, const char * directory)
if (gz == NULL)
{
fclose(f);
- free(name_without_gz);
+ free(name_without_gz);
return;
}
@@ -286,84 +262,81 @@ static void create_tarbz2(const char * archive_name, const char * directory)
free(name_without_bz2);
}
-void CFileTransfer::CreateArchive(const std::string& pArchiveName,
- const std::string& pDir)
+void CFileTransfer::CreateArchive(const char *pArchiveName, const char *pDir)
{
if (m_sArchiveType == ".tar")
{
- create_tar(pArchiveName.c_str(), pDir.c_str());
+ create_tar(pArchiveName, pDir);
}
else if (m_sArchiveType == ".tar.gz")
{
- create_targz(pArchiveName.c_str(), pDir.c_str());
+ create_targz(pArchiveName, pDir);
}
else if (m_sArchiveType == ".tar.bz2")
{
- create_tarbz2(pArchiveName.c_str(), pDir.c_str());
+ create_tarbz2(pArchiveName, pDir);
}
else if (m_sArchiveType == ".zip")
{
- create_zip(pArchiveName.c_str(), pDir.c_str());
+ create_zip(pArchiveName, pDir);
}
else
{
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::CreateArchive(): unknown/unsupported archive type "+m_sArchiveType);
+ throw CABRTException(EXCEP_PLUGIN, "Unknown/unsupported archive type " + m_sArchiveType);
}
}
-/*returns the last component of the directory path*/
-static std::string DirBase(const std::string& pStr)
+/* Returns the last component of the directory path.
+ * Careful to not return "" on "/path/path2/", but "path2".
+ */
+static string DirBase(const char *pStr)
{
- int i = pStr.length() - 1;
- if (i > 0 && pStr[i] == '/')
+ int end = strlen(pStr);
+ if (end > 1 && pStr[end-1] == '/')
{
- i--;
+ end--;
}
- std::string result;
- for (; i >= 0 && pStr[i] != '/'; i--)
+ int beg = end;
+ while (beg > 0 && pStr[beg-1] != '/')
{
- result = pStr[i] + result;
+ beg--;
}
- return result;
+ return string(pStr + beg, end - beg);
}
-void CFileTransfer::Run(const std::string& pActiveDir, const std::string& pArgs)
+void CFileTransfer::Run(const char *pActionDir, const char *pArgs)
{
- fstream dirlist;
- std::string dirname, archivename;
- char hostname[HBLEN];
-
update_client(_("File Transfer: Creating a report..."));
- if (pArgs == "store")
+ char hostname[HBLEN];
+ gethostname(hostname, HBLEN-1);
+ hostname[HBLEN-1] = '\0';
+
+ fstream dirlist;
+ if (strcmp(pArgs, "store") == 0)
{
/* store pActiveDir for later sending */
- dirlist.open(FILETRANSFER_DIRLIST, fstream::out | fstream::app );
- dirlist << pActiveDir << endl;
+ dirlist.open(FILETRANSFER_DIRLIST, fstream::out | fstream::app);
+ dirlist << pActionDir << endl;
dirlist.close();
}
- else if (pArgs == "one")
+ else if (strcmp(pArgs, "one") == 0)
{
/* just send one archive */
- gethostname(hostname, HBLEN);
- archivename = std::string(hostname) + "-"
- + DirBase(pActiveDir) + m_sArchiveType;
+ string archivename = ssprintf("%s-%s%s", hostname, DirBase(pActionDir).c_str(), m_sArchiveType.c_str());
try
{
- CreateArchive(archivename, pActiveDir);
- SendFile(m_sURL, archivename);
+ CreateArchive(archivename.c_str(), pActionDir);
+ SendFile(m_sURL.c_str(), archivename.c_str());
}
catch (CABRTException& e)
{
- warn_client(_("CFileTransfer::Run(): Cannot create and send an archive: ") + e.what());
- //update_client("CFileTransfer::Run(): Cannot create and send an archive: " + e.what());
+ error_msg(_("Can't create and send an archive: %s"), e.what());
}
unlink(archivename.c_str());
}
else
{
- gethostname(hostname, HBLEN);
-
dirlist.open(FILETRANSFER_DIRLIST, fstream::in);
if (dirlist.fail())
{
@@ -372,19 +345,18 @@ void CFileTransfer::Run(const std::string& pActiveDir, const std::string& pArgs)
return;
}
+ string dirname;
while (getline(dirlist, dirname), dirlist.good())
{
- archivename = std::string(hostname) + "-"
- + DirBase(dirname) + m_sArchiveType;
+ string archivename = ssprintf("%s-%s%s", hostname, DirBase(dirname.c_str()).c_str(), m_sArchiveType.c_str());
try
{
- CreateArchive(archivename, dirname);
- SendFile(m_sURL, archivename);
+ CreateArchive(archivename.c_str(), dirname.c_str());
+ SendFile(m_sURL.c_str(), archivename.c_str());
}
catch (CABRTException& e)
{
- warn_client(_("CFileTransfer::Run(): Cannot create and send an archive: ") + e.what());
-// update_client("CFileTransfer::Run(): Cannot create and send an archive: " + e.what());
+ error_msg(_("Can't create and send an archive %s"), e.what());
}
unlink(archivename.c_str());
}
@@ -406,7 +378,7 @@ void CFileTransfer::SetSettings(const map_plugin_settings_t& pSettings)
}
else
{
- warn_client(_("FileTransfer: URL not specified"));
+ error_msg(_("FileTransfer: URL not specified"));
}
it = pSettings.find("RetryCount");
@@ -428,24 +400,19 @@ void CFileTransfer::SetSettings(const map_plugin_settings_t& pSettings)
m_sArchiveType = it->second;
if (m_sArchiveType[0] != '.')
{
- m_sArchiveType = "." + m_sArchiveType;
+ m_sArchiveType = "." + m_sArchiveType;
}
}
}
-map_plugin_settings_t CFileTransfer::GetSettings()
+const map_plugin_settings_t& CFileTransfer::GetSettings()
{
- map_plugin_settings_t ret;
- std::stringstream ss;
- ret["URL"] = m_sURL;
- ss << m_nRetryCount;
- ret["RetryCount"] = ss.str();
- ss.str("");
- ss << m_nRetryDelay;
- ret["RetryDelay"] = ss.str();
- ret["ArchiveType"] = m_sArchiveType;
-
- return ret;
+ m_pSettings["URL"] = m_sURL;
+ m_pSettings["RetryCount"] = to_string(m_nRetryCount);
+ m_pSettings["RetryDelay"] = to_string(m_nRetryDelay);
+ m_pSettings["ArchiveType"] = m_sArchiveType;
+
+ return m_pSettings;
}
PLUGIN_INFO(ACTION,
diff --git a/lib/Plugins/FileTransfer.h b/lib/Plugins/FileTransfer.h
index 2f230c65..9caa2567 100644
--- a/lib/Plugins/FileTransfer.h
+++ b/lib/Plugins/FileTransfer.h
@@ -35,18 +35,14 @@ class CFileTransfer : public CAction
int m_nRetryCount;
int m_nRetryDelay;
- void CreateArchive(const std::string& pArchiveName,
- const std::string& pDir);
-
- void SendFile(const std::string& pURL,
- const std::string& pFilename);
+ void CreateArchive(const char *pArchiveName, const char *pDir);
+ void SendFile(const char *pURL, const char *pFilename);
public:
CFileTransfer();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
- virtual void Run(const std::string& pActiveDir,
- const std::string& pArgs);
+ virtual const map_plugin_settings_t& GetSettings();
+ virtual void Run(const char *pActionDir, const char *pArgs);
};
#endif /* FILETRANSFER_H_ */
diff --git a/lib/Plugins/Kerneloops.conf b/lib/Plugins/Kerneloops.conf
new file mode 100644
index 00000000..47b242ff
--- /dev/null
+++ b/lib/Plugins/Kerneloops.conf
@@ -0,0 +1,2 @@
+# compatibility with kerneloops.org tool
+InformAllUsers = yes
diff --git a/lib/Plugins/Kerneloops.cpp b/lib/Plugins/Kerneloops.cpp
index e01bb426..b99183c3 100644
--- a/lib/Plugins/Kerneloops.cpp
+++ b/lib/Plugins/Kerneloops.cpp
@@ -32,7 +32,7 @@
#define FILENAME_KERNELOOPS "kerneloops"
-std::string CAnalyzerKerneloops::GetLocalUUID(const std::string& pDebugDumpDir)
+std::string CAnalyzerKerneloops::GetLocalUUID(const char *pDebugDumpDir)
{
log(_("Getting local universal unique identification"));
@@ -58,7 +58,7 @@ std::string CAnalyzerKerneloops::GetLocalUUID(const std::string& pDebugDumpDir)
return to_string(hash);
}
-std::string CAnalyzerKerneloops::GetGlobalUUID(const std::string& pDebugDumpDir)
+std::string CAnalyzerKerneloops::GetGlobalUUID(const char *pDebugDumpDir)
{
return GetLocalUUID(pDebugDumpDir);
}
diff --git a/lib/Plugins/Kerneloops.h b/lib/Plugins/Kerneloops.h
index 13fb0098..9e2010c7 100644
--- a/lib/Plugins/Kerneloops.h
+++ b/lib/Plugins/Kerneloops.h
@@ -29,17 +29,14 @@
#include "Plugin.h"
#include "Analyzer.h"
-
#include <string>
-#include "KerneloopsSysLog.h"
-
class CAnalyzerKerneloops : public CAnalyzer
{
public:
- virtual std::string GetLocalUUID(const std::string& pDebugDumpDir);
- virtual std::string GetGlobalUUID(const std::string& pDebugDumpDir);
- virtual void CreateReport(const std::string& pDebugDumpDir, int force) {}
+ virtual std::string GetLocalUUID(const char *pDebugDumpDir);
+ virtual std::string GetGlobalUUID(const char *pDebugDumpDir);
+ virtual void CreateReport(const char *pDebugDumpDir, int force) {}
};
#endif
diff --git a/lib/Plugins/KerneloopsReporter.cpp b/lib/Plugins/KerneloopsReporter.cpp
index e9967fd5..cfb4e050 100644
--- a/lib/Plugins/KerneloopsReporter.cpp
+++ b/lib/Plugins/KerneloopsReporter.cpp
@@ -93,15 +93,15 @@ CKerneloopsReporter::CKerneloopsReporter() :
m_sSubmitURL("http://submit.kerneloops.org/submitoops.php")
{}
-std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs)
+std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
+ const std::string& pArgs)
{
int ret = -1;
- map_crash_report_t::const_iterator it;
update_client(_("Creating and submitting a report..."));
- it = pCrashReport.begin();
- it = pCrashReport.find(FILENAME_KERNELOOPS);
+ map_crash_report_t::const_iterator it = pCrashReport.find(FILENAME_KERNELOOPS);
if (it != pCrashReport.end()) {
ret = http_post_to_kerneloops_site(
m_sSubmitURL.c_str(),
@@ -109,29 +109,26 @@ std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
);
}
- if (ret)
- {
+ if (ret) {
/* FIXME: be more informative */
- throw CABRTException(EXCEP_PLUGIN, std::string("CKerneloopsReporter::Report(): Report has not been sent..."));
+ throw CABRTException(EXCEP_PLUGIN, std::string("CKerneloopsReporter::Report(): Report has not been sent..."));
}
- return "Kernel oops report was uploaded to :" + m_sSubmitURL;
+ return "Kernel oops report was uploaded to: " + m_sSubmitURL;
}
void CKerneloopsReporter::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("SubmitURL") != pSettings.end())
- {
- m_sSubmitURL = pSettings.find("SubmitURL")->second;
+ map_plugin_settings_t::const_iterator it = pSettings.find("SubmitURL");
+ if (it != pSettings.end()) {
+ m_sSubmitURL = it->second;
}
}
-map_plugin_settings_t CKerneloopsReporter::GetSettings()
+const map_plugin_settings_t& CKerneloopsReporter::GetSettings()
{
- map_plugin_settings_t ret;
+ m_pSettings["SubmitURL"] = m_sSubmitURL;
- ret["SubmitURL"] = m_sSubmitURL;
-
- return ret;
+ return m_pSettings;
}
PLUGIN_INFO(REPORTER,
diff --git a/lib/Plugins/KerneloopsReporter.h b/lib/Plugins/KerneloopsReporter.h
index f1b427f8..7f6ab8cc 100644
--- a/lib/Plugins/KerneloopsReporter.h
+++ b/lib/Plugins/KerneloopsReporter.h
@@ -41,8 +41,9 @@ class CKerneloopsReporter : public CReporter
CKerneloopsReporter();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+ virtual const map_plugin_settings_t& GetSettings();
virtual std::string Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
const std::string& pArgs);
};
diff --git a/lib/Plugins/KerneloopsScanner.cpp b/lib/Plugins/KerneloopsScanner.cpp
index 60fa92e4..8c8cd4b9 100644
--- a/lib/Plugins/KerneloopsScanner.cpp
+++ b/lib/Plugins/KerneloopsScanner.cpp
@@ -31,8 +31,10 @@
#include "DebugDump.h"
#include "ABRTException.h"
#include "CommLayerInner.h"
+#include "KerneloopsSysLog.h"
#include "KerneloopsScanner.h"
+#include <limits.h>
#define FILENAME_KERNELOOPS "kerneloops"
@@ -41,7 +43,6 @@
CKerneloopsScanner::CKerneloopsScanner()
{
int cnt_FoundOopses;
- m_sSysLogFile = "/var/log/messages";
/* Scan dmesg, on first call only */
cnt_FoundOopses = ScanDmesg();
@@ -49,19 +50,23 @@ CKerneloopsScanner::CKerneloopsScanner()
SaveOopsToDebugDump();
}
-void CKerneloopsScanner::Run(const std::string& pActionDir,
- const std::string& pArgs)
+void CKerneloopsScanner::Run(const char *pActionDir, const char *pArgs)
{
- int cnt_FoundOopses;
+ const char *syslog_file = "/var/log/messages";
+ map_plugin_settings_t::const_iterator it = m_pSettings.find("SysLogFile");
+ if (it != m_pSettings.end())
+ {
+ syslog_file = it->second.c_str();
+ }
- cnt_FoundOopses = ScanSysLogFile(m_sSysLogFile.c_str());
+ int cnt_FoundOopses = ScanSysLogFile(syslog_file);
if (cnt_FoundOopses > 0) {
SaveOopsToDebugDump();
/*
* This marker in syslog file prevents us from
* re-parsing old oopses (any oops before it is
* ignored by ScanSysLogFile()). The only problem
- * is that we can't be sure here that m_sSysLogFile
+ * is that we can't be sure here that syslog_file
* is the file where syslog(xxx) stuff ends up.
*/
openlog("abrt", 0, LOG_KERN);
@@ -78,26 +83,29 @@ void CKerneloopsScanner::SaveOopsToDebugDump()
{
update_client(_("Creating kernel oops crash reports..."));
+ int countdown = 16; /* do not report hundreds of oopses */
time_t t = time(NULL);
- std::list<COops> oopsList = m_pSysLog.GetOopsList();
- m_pSysLog.ClearOopsList();
-
- while (!oopsList.empty()) {
- char path[PATH_MAX];
- snprintf(path, sizeof(path), "%s/kerneloops-%lu-%lu",
- DEBUG_DUMPS_DIR, (long)t, (long)oopsList.size());
-
- COops oops = oopsList.back();
-
+ vector_string_t oopsList = m_pOopsList;
+ m_pOopsList.clear();
+
+ while (!oopsList.empty() && --countdown != 0) {
+ char path[sizeof(DEBUG_DUMPS_DIR"/kerneloops-%lu-%lu") + 2 * sizeof(long)*3];
+ sprintf(path, DEBUG_DUMPS_DIR"/kerneloops-%lu-%lu",
+ (long)t, (long)oopsList.size());
+
+ std::string oops = oopsList.back();
+ const char *first_line = oops.c_str();
+ char *second_line = (char*)strchr(first_line, '\n'); /* never NULL */
+ *second_line++ = '\0';
try
{
CDebugDump debugDump;
debugDump.Create(path, 0);
debugDump.SaveText(FILENAME_ANALYZER, "Kerneloops");
debugDump.SaveText(FILENAME_EXECUTABLE, "kernel");
- debugDump.SaveText(FILENAME_KERNEL, oops.m_sVersion);
+ debugDump.SaveText(FILENAME_KERNEL, first_line);
debugDump.SaveText(FILENAME_PACKAGE, "not_applicable");
- debugDump.SaveText(FILENAME_KERNELOOPS, oops.m_sData);
+ debugDump.SaveText(FILENAME_KERNELOOPS, second_line);
}
catch (CABRTException& e)
{
@@ -118,7 +126,8 @@ int CKerneloopsScanner::ScanDmesg()
buffer = (char*)xzalloc(pagesz + 1);
syscall(__NR_syslog, 3, buffer, pagesz);
- cnt_FoundOopses = m_pSysLog.ExtractOops(buffer, strlen(buffer));
+ m_pOopsList.clear();
+ cnt_FoundOopses = extract_oopses(m_pOopsList, buffer, strlen(buffer));
free(buffer);
return cnt_FoundOopses;
@@ -162,30 +171,15 @@ int CKerneloopsScanner::ScanSysLogFile(const char *filename)
close(fd);
cnt_FoundOopses = 0;
- if (sz > 0)
- cnt_FoundOopses = m_pSysLog.ExtractOops(buffer, sz);
+ if (sz > 0) {
+ m_pOopsList.clear();
+ cnt_FoundOopses = extract_oopses(m_pOopsList, buffer, sz);
+ }
free(buffer);
return cnt_FoundOopses;
}
-void CKerneloopsScanner::SetSettings(const map_plugin_settings_t& pSettings)
-{
- if (pSettings.find("SysLogFile") != pSettings.end())
- {
- m_sSysLogFile = pSettings.find("SysLogFile")->second;
- }
-}
-
-map_plugin_settings_t CKerneloopsScanner::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["SysLogFile"] = m_sSysLogFile;
-
- return ret;
-}
-
PLUGIN_INFO(ACTION,
CKerneloopsScanner,
"KerneloopsScanner",
@@ -195,7 +189,7 @@ PLUGIN_INFO(ACTION,
"http://people.redhat.com/aarapov",
"");
-/* for dumpoops tool */
+/* For "dumpoops" tool */
extern "C" {
int scan_syslog_file(CKerneloopsScanner *This, const char *filename)
diff --git a/lib/Plugins/KerneloopsScanner.h b/lib/Plugins/KerneloopsScanner.h
index 981f187a..9f00df21 100644
--- a/lib/Plugins/KerneloopsScanner.h
+++ b/lib/Plugins/KerneloopsScanner.h
@@ -27,28 +27,26 @@
#ifndef KERNELOOPSSCANNER_H_
#define KERNELOOPSSCANNER_H_
-#include "KerneloopsSysLog.h"
+#include "abrt_types.h"
#include "Plugin.h"
#include "Action.h"
class CKerneloopsScanner : public CAction
{
- private:
- std::string m_sSysLogFile;
- CSysLog m_pSysLog;
+ /* For "dumpoops" tool */
+ public:
+ vector_string_t m_pOopsList;
+ /* For "dumpoops" tool */
public:
- /* For standalone oops processor */
void SaveOopsToDebugDump();
int ScanDmesg();
int ScanSysLogFile(const char *filename);
/* Plugin interface */
+ public:
CKerneloopsScanner();
- virtual void Run(const std::string& pActionDir,
- const std::string& pArgs);
- virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+ virtual void Run(const char *pActionDir, const char *pArgs);
};
-#endif /* KERNELOOPSSCANNER_H_ */
+#endif
diff --git a/lib/Plugins/KerneloopsSysLog.cpp b/lib/Plugins/KerneloopsSysLog.cpp
index b1171cf6..d28ce399 100644
--- a/lib/Plugins/KerneloopsSysLog.cpp
+++ b/lib/Plugins/KerneloopsSysLog.cpp
@@ -26,91 +26,70 @@
#include "abrtlib.h"
#include "KerneloopsSysLog.h"
-
-#include <list>
#include <assert.h>
-/*
- * This limits the number of oopses we'll submit per session;
- * it's important that this is bounded to avoid feedback loops
- * for the scenario where submitting an oopses causes a warning/oops
- */
-#define MAX_OOPS 16
-
-struct line_info {
- char *ptr;
- char level;
-};
-
-static struct line_info *lines_info;
-static int lines_info_alloc;
-static int linecount;
-
-#define REALLOC_CHUNK 1000
-
-static int set_line_info(int index, char *linepointer, char linelevel)
+static void queue_oops(vector_string_t &vec, const char *data, const char *version)
{
- if (index >= lines_info_alloc) {
- struct line_info *new_info;
- new_info = (line_info*)realloc(lines_info,
- (lines_info_alloc + REALLOC_CHUNK) * sizeof(struct line_info));
- if (!new_info)
- return -1;
- lines_info_alloc += REALLOC_CHUNK;
- lines_info = new_info;
- }
-
- lines_info[index].ptr = linepointer;
- lines_info[index].level = linelevel;
- return 0;
+ vec.push_back(ssprintf("%s\n%s", version, data));
}
-CSysLog::CSysLog() :
- m_nFoundOopses(0)
-{}
-
-void CSysLog::QueueOops(char *data, char *version)
+/*
+ * extract_version tries to find the kernel version in given data
+ */
+static int extract_version(const char *linepointer, char *version)
{
- COops m_NewOops;
-
- if (m_nFoundOopses > MAX_OOPS)
- return;
+ int ret;
- m_NewOops.m_sData = data;
- m_NewOops.m_sVersion = version;
+ ret = 0;
+ if ((strstr(linepointer, "Pid") != NULL)
+ || (strstr(linepointer, "comm") != NULL)
+ || (strstr(linepointer, "CPU") != NULL)
+ || (strstr(linepointer, "REGS") != NULL)
+ || (strstr(linepointer, "EFLAGS") != NULL)
+ ) {
+ char* start;
+ char* end;
- m_OopsQueue.push_back(m_NewOops);
- m_nFoundOopses++;
-}
+ start = strstr((char*)linepointer, "2.6.");
+ if (start) {
+ end = strchrnul(start, ' ');
+ strncpy(version, start, end-start);
+ ret = 1;
+ }
+ }
-void CSysLog::ClearOopsList()
-{
- m_OopsQueue.clear();
-}
+ if (!ret)
+ strncpy(version, "undefined", 9);
-const std::list<COops>& CSysLog::GetOopsList()
-{
- return m_OopsQueue;
+ return ret;
}
/*
- * This function splits the dmesg buffer data into lines
- * (null terminated).
+ * extract_oops tries to find oops signatures in a log
*/
-int CSysLog::FillLinePointers(char *buffer, size_t buflen)
+struct line_info {
+ char *ptr;
+ char level;
+};
+#define REALLOC_CHUNK 1000
+int extract_oopses(vector_string_t &oopses, char *buffer, size_t buflen)
{
- char *c, *linepointer, linelevel;
+ char *c;
enum { maybe, no, yes } syslog_format = maybe;
- linecount = 0;
+ int linecount = 0;
+ int lines_info_alloc = 0;
+ struct line_info *lines_info = NULL;
+
+ /* Split buffer into lines */
- if (!buflen)
- return 0;
- buffer[buflen - 1] = '\n'; /* the buffer usually ends with \n, but let's make sure */
+ if (buflen != 0)
+ buffer[buflen - 1] = '\n'; /* the buffer usually ends with \n, but let's make sure */
c = buffer;
while (c < buffer + buflen) {
- char v;
+ char v, linelevel;
int len = 0;
char *c9;
+ char *linepointer;
c9 = (char*)memchr(c, '\n', buffer + buflen - c); /* a \n will always be found */
assert(c9);
@@ -183,68 +162,32 @@ int CSysLog::FillLinePointers(char *buffer, size_t buflen)
/* if we see our own marker, we know we submitted everything upto here already */
if (len >= 4 && memmem(linepointer, len, "Abrt", 4)) {
linecount = 0;
- lines_info[0].ptr = NULL;
+ lines_info_alloc = 0;
+ free(lines_info);
+ lines_info = NULL;
+ }
+
+ if (linecount >= lines_info_alloc) {
+ lines_info_alloc += REALLOC_CHUNK;
+ lines_info = (line_info*)xrealloc(lines_info,
+ lines_info_alloc * sizeof(struct line_info));
}
- if (set_line_info(linecount, linepointer, linelevel) < 0)
- return -1;
+ lines_info[linecount].ptr = linepointer;
+ lines_info[linecount].level = linelevel;
linecount++;
next_line:
c = c9 + 1;
}
- return 0;
-}
-
-/*
- * extract_version tries to find the kernel version in given data
- */
-int CSysLog::ExtractVersion(char *linepointer, char *version)
-{
- int ret;
-
- ret = 0;
- if ((strstr(linepointer, "Pid") != NULL) ||
- (strstr(linepointer, "comm") != NULL) ||
- (strstr(linepointer, "CPU") != NULL) ||
- (strstr(linepointer, "REGS") != NULL) ||
- (strstr(linepointer, "EFLAGS") != NULL))
- {
- char* start;
- char* end;
-
- start = strstr(linepointer, "2.6.");
- if (start) {
- end = strchrnul(start, ' ');
- strncpy(version, start, end-start);
- ret = 1;
- }
- }
-
- if (!ret)
- strncpy(version, "undefined", 9);
- return ret;
-}
+ /* Analyze lines */
-/*
- * extract_oops tries to find oops signatures in a log
- */
-int CSysLog::ExtractOops(char *buffer, size_t buflen)
-{
int i;
char prevlevel = 0;
int oopsstart = -1;
- int oopsend;
+ int oopsend = linecount;
int inbacktrace = 0;
int oopsesfound = 0;
- lines_info = NULL;
- lines_info_alloc = 0;
-
- if (FillLinePointers(buffer, buflen) < 0)
- goto fail;
-
- oopsend = linecount;
-
i = 0;
while (i < linecount) {
char *c = lines_info[i].ptr;
@@ -257,36 +200,36 @@ int CSysLog::ExtractOops(char *buffer, size_t buflen)
/* find start-of-oops markers */
if (strstr(c, "general protection fault:"))
oopsstart = i;
- if (strstr(c, "BUG:"))
+ else if (strstr(c, "BUG:"))
oopsstart = i;
- if (strstr(c, "kernel BUG at"))
+ else if (strstr(c, "kernel BUG at"))
oopsstart = i;
- if (strstr(c, "do_IRQ: stack overflow:"))
+ else if (strstr(c, "do_IRQ: stack overflow:"))
oopsstart = i;
- if (strstr(c, "RTNL: assertion failed"))
+ else if (strstr(c, "RTNL: assertion failed"))
oopsstart = i;
- if (strstr(c, "Eeek! page_mapcount(page) went negative!"))
+ else if (strstr(c, "Eeek! page_mapcount(page) went negative!"))
oopsstart = i;
- if (strstr(c, "near stack overflow (cur:"))
+ else if (strstr(c, "near stack overflow (cur:"))
oopsstart = i;
- if (strstr(c, "double fault:"))
+ else if (strstr(c, "double fault:"))
oopsstart = i;
- if (strstr(c, "Badness at"))
+ else if (strstr(c, "Badness at"))
oopsstart = i;
- if (strstr(c, "NETDEV WATCHDOG"))
+ else if (strstr(c, "NETDEV WATCHDOG"))
oopsstart = i;
- if (strstr(c, "WARNING:") &&
- !strstr(c, "appears to be on the same physical disk"))
+ else if (strstr(c, "WARNING:") &&
+ !strstr(c, "appears to be on the same physical disk"))
oopsstart = i;
- if (strstr(c, "Unable to handle kernel"))
+ else if (strstr(c, "Unable to handle kernel"))
oopsstart = i;
- if (strstr(c, "sysctl table check failed"))
+ else if (strstr(c, "sysctl table check failed"))
oopsstart = i;
- if (strstr(c, "------------[ cut here ]------------"))
+ else if (strstr(c, "------------[ cut here ]------------"))
oopsstart = i;
- if (strstr(c, "list_del corruption."))
+ else if (strstr(c, "list_del corruption."))
oopsstart = i;
- if (strstr(c, "list_add corruption."))
+ else if (strstr(c, "list_add corruption."))
oopsstart = i;
if (strstr(c, "Oops:") && i >= 3)
oopsstart = i-3;
@@ -323,26 +266,33 @@ int CSysLog::ExtractOops(char *buffer, size_t buflen)
c1 = strstr(lines_info[i].ptr, ">]");
c2 = strstr(lines_info[i].ptr, "+0x");
c3 = strstr(lines_info[i].ptr, "/0x");
- if (lines_info[i].ptr[0] == ' ' && lines_info[i].ptr[1] == '[' && lines_info[i].ptr[2] == '<' && c1 && c2 && c3)
+ if (lines_info[i].ptr[0] == ' '
+ && lines_info[i].ptr[1] == '['
+ && lines_info[i].ptr[2] == '<'
+ && c1 && c2 && c3
+ ) {
inbacktrace = 1;
- } else
+ }
+ }
/* try to see if we're at the end of an oops */
- if (oopsstart >= 0 && inbacktrace > 0) {
+ else if (oopsstart >= 0 && inbacktrace > 0) {
char c2, c3;
c2 = lines_info[i].ptr[0];
c3 = lines_info[i].ptr[1];
/* line needs to start with " [" or have "] ["*/
- if ((c2 != ' ' || c3 != '[') &&
- strstr(lines_info[i].ptr, "] [") == NULL &&
- strstr(lines_info[i].ptr, "--- Exception") == NULL &&
- strstr(lines_info[i].ptr, " LR =") == NULL &&
- strstr(lines_info[i].ptr, "<#DF>") == NULL &&
- strstr(lines_info[i].ptr, "<IRQ>") == NULL &&
- strstr(lines_info[i].ptr, "<EOI>") == NULL &&
- strstr(lines_info[i].ptr, "<<EOE>>") == NULL)
+ if ((c2 != ' ' || c3 != '[')
+ && strstr(lines_info[i].ptr, "] [") == NULL
+ && strstr(lines_info[i].ptr, "--- Exception") == NULL
+ && strstr(lines_info[i].ptr, " LR =") == NULL
+ && strstr(lines_info[i].ptr, "<#DF>") == NULL
+ && strstr(lines_info[i].ptr, "<IRQ>") == NULL
+ && strstr(lines_info[i].ptr, "<EOI>") == NULL
+ && strstr(lines_info[i].ptr, "<<EOE>>") == NULL
+ ) {
oopsend = i-1;
+ }
/* oops lines are always more than 8 long */
if (strlen(lines_info[i].ptr) < 8)
@@ -381,13 +331,15 @@ int CSysLog::ExtractOops(char *buffer, size_t buflen)
is_version = 0;
for (q = oopsstart; q <= oopsend; q++) {
if (!is_version)
- is_version = ExtractVersion(lines_info[q].ptr, version);
- strcat(oops, lines_info[q].ptr);
- strcat(oops, "\n");
+ is_version = extract_version(lines_info[q].ptr, version);
+ if (lines_info[q].ptr[0]) {
+ strcat(oops, lines_info[q].ptr);
+ strcat(oops, "\n");
+ }
}
/* too short oopses are invalid */
if (strlen(oops) > 100) {
- QueueOops(oops, version);
+ queue_oops(oopses, oops, version);
oopsesfound++;
}
oopsstart = -1;
@@ -431,13 +383,13 @@ int CSysLog::ExtractOops(char *buffer, size_t buflen)
is_version = 0;
for (q = oopsstart; q <= oopsend; q++) {
if (!is_version)
- is_version = ExtractVersion(lines_info[q].ptr, version);
+ is_version = extract_version(lines_info[q].ptr, version);
strcat(oops, lines_info[q].ptr);
strcat(oops, "\n");
}
/* too short oopses are invalid */
if (strlen(oops) > 100) {
- QueueOops(oops, version);
+ queue_oops(oopses, oops, version);
oopsesfound++;
}
oopsstart = -1;
@@ -446,8 +398,7 @@ int CSysLog::ExtractOops(char *buffer, size_t buflen)
free(oops);
free(version);
}
-fail:
+
free(lines_info);
- lines_info = NULL;
return oopsesfound;
}
diff --git a/lib/Plugins/KerneloopsSysLog.h b/lib/Plugins/KerneloopsSysLog.h
index c2e8c2d0..a67b33d4 100644
--- a/lib/Plugins/KerneloopsSysLog.h
+++ b/lib/Plugins/KerneloopsSysLog.h
@@ -27,30 +27,8 @@
#ifndef __INCLUDE_GUARD_KERNELOOPSSYSLOG_H_
#define __INCLUDE_GUARD_KERNELOOPSSYSLOG_H_
-#include <string>
-#include <list>
+#include "abrt_types.h"
-class COops
-{
- public:
- std::string m_sData;
- std::string m_sVersion;
-};
-
-class CSysLog
-{
- private:
- void QueueOops(char *data, char *version);
- int ExtractVersion(char *linepointer, char *version);
- int FillLinePointers(char *buffer, size_t buflen);
- std::list<COops> m_OopsQueue;
- int m_nFoundOopses;
-
- public:
- CSysLog();
- const std::list<COops>& GetOopsList();
- void ClearOopsList();
- int ExtractOops(char *buffer, size_t buflen);
-};
+int extract_oopses(vector_string_t &oopses, char *buffer, size_t buflen);
#endif
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index ff7bbb8f..b2ac1ade 100644
--- a/lib/Plugins/Logger.cpp
+++ b/lib/Plugins/Logger.cpp
@@ -43,99 +43,40 @@ void CLogger::SetSettings(const map_plugin_settings_t& pSettings)
}
}
-map_plugin_settings_t CLogger::GetSettings()
+const map_plugin_settings_t& CLogger::GetSettings()
{
- map_plugin_settings_t ret;
+ m_pSettings["LogPath"] = m_sLogPath;
+ m_pSettings["AppendLogs"] = m_bAppendLogs ? "yes" : "no";
- ret["LogPath"] = m_sLogPath;
- ret["AppendLogs"] = m_bAppendLogs ? "yes" : "no";
-
- return ret;
+ return m_pSettings;
}
-std::string CLogger::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs)
+std::string CLogger::Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings, const std::string& pArgs)
{
update_client(_("Creating a report..."));
- std::stringstream binaryFiles, commonFiles, bigTextFiles, additionalFiles, UUIDFile;
- std::ofstream fOut;
-
- map_crash_report_t::const_iterator it;
- for (it = pCrashReport.begin(); it != pCrashReport.end(); it++)
- {
- if (it->second[CD_TYPE] == CD_TXT)
- {
- if (it->first != CD_UUID &&
- it->first != FILENAME_ARCHITECTURE &&
- it->first != FILENAME_KERNEL &&
- it->first != FILENAME_PACKAGE)
- {
- additionalFiles << it->first << std::endl;
- additionalFiles << "-----" << std::endl;
- additionalFiles << it->second[CD_CONTENT] << std::endl << std::endl;
- }
- else if (it->first == CD_UUID)
- {
- UUIDFile << it->first << std::endl;
- UUIDFile << "-----" << std::endl;
- UUIDFile << it->second[CD_CONTENT] << std::endl << std::endl;
- }
- else
- {
- commonFiles << it->first << std::endl;
- commonFiles << "-----" << std::endl;
- commonFiles << it->second[CD_CONTENT] << std::endl << std::endl;
- }
- }
- if (it->second[CD_TYPE] == CD_ATT)
- {
- bigTextFiles << it->first << std::endl;
- bigTextFiles << "-----" << std::endl;
- bigTextFiles << it->second[CD_CONTENT] << std::endl << std::endl;
- }
- if (it->second[CD_TYPE] == CD_BIN)
- {
- binaryFiles << it->first << std::endl;
- binaryFiles << "-----" << std::endl;
- binaryFiles << it->second[CD_CONTENT] << std::endl << std::endl;
- }
- }
-
+ std::string description = make_description_logger(pCrashReport);
+ description += "\n\n\n";
+ FILE *fOut;
if (m_bAppendLogs)
{
- fOut.open(m_sLogPath.c_str(), std::ios::app);
+ fOut = fopen(m_sLogPath.c_str(), "a");
}
else
{
- fOut.open(m_sLogPath.c_str());
+ fOut = fopen(m_sLogPath.c_str(), "w");
}
- if (fOut.is_open())
- {
- fOut << "Duplicity check" << std::endl;
- fOut << "======" << std::endl << std::endl;
- fOut << UUIDFile.str() << std::endl;
- fOut << "Common information" << std::endl;
- fOut << "======" << std::endl << std::endl;
- fOut << commonFiles.str() << std::endl;
- fOut << "Additional information" << std::endl;
- fOut << "======" << std::endl << std::endl;
- fOut << additionalFiles.str() << std::endl;
- fOut << "Big Text Files" << std::endl;
- fOut << "======" << std::endl;
- fOut << bigTextFiles.str() << std::endl;
- fOut << "Binary files" << std::endl;
- fOut << "======" << std::endl;
- fOut << binaryFiles.str() << std::endl;
- fOut << std::endl;
- fOut.close();
- }
- else
+ if (fOut)
{
- throw CABRTException(EXCEP_PLUGIN, "CLogger::Report(): Cannot open file: " + m_sLogPath);
+ fputs(description.c_str(), fOut);
+ fclose(fOut);
+ return "file://" + m_sLogPath;
}
- return "file://" + m_sLogPath;
+
+ throw CABRTException(EXCEP_PLUGIN, "CLogger::Report(): Cannot open file: " + m_sLogPath);
}
PLUGIN_INFO(REPORTER,
diff --git a/lib/Plugins/Logger.h b/lib/Plugins/Logger.h
index 60c76e4a..0969bea6 100644
--- a/lib/Plugins/Logger.h
+++ b/lib/Plugins/Logger.h
@@ -35,8 +35,9 @@ class CLogger : public CReporter
CLogger();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+ virtual const map_plugin_settings_t& GetSettings();
virtual std::string Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
const std::string& pArgs);
};
diff --git a/lib/Plugins/Mailx.cpp b/lib/Plugins/Mailx.cpp
index f7a86fd0..f0834049 100644
--- a/lib/Plugins/Mailx.cpp
+++ b/lib/Plugins/Mailx.cpp
@@ -118,7 +118,8 @@ void CMailx::SendEmail(const std::string& pSubject, const std::string& pText, co
ExecMailx(atoi(pUID.c_str()), pText);
}
-std::string CMailx::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs)
+std::string CMailx::Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings, const std::string& pArgs)
{
update_client(_("Creating a report..."));
@@ -218,16 +219,14 @@ void CMailx::SetSettings(const map_plugin_settings_t& pSettings)
}
}
-map_plugin_settings_t CMailx::GetSettings()
+const map_plugin_settings_t& CMailx::GetSettings()
{
- map_plugin_settings_t ret;
+ m_pSettings["Subject"] = m_sSubject;
+ m_pSettings["EmailFrom"] = m_sEmailFrom;
+ m_pSettings["EmailTo"] = m_sEmailTo;
+ m_pSettings["SendBinaryData"] = m_bSendBinaryData ? "yes" : "no";
- ret["Subject"] = m_sSubject;
- ret["EmailFrom"] = m_sEmailFrom;
- ret["EmailTo"] = m_sEmailTo;
- ret["SendBinaryData"] = m_bSendBinaryData ? "yes" : "no";
-
- return ret;
+ return m_pSettings;
}
PLUGIN_INFO(REPORTER,
diff --git a/lib/Plugins/Mailx.h b/lib/Plugins/Mailx.h
index fd00bb8b..7af11885 100644
--- a/lib/Plugins/Mailx.h
+++ b/lib/Plugins/Mailx.h
@@ -47,8 +47,9 @@ class CMailx : public CReporter
CMailx();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+ virtual const map_plugin_settings_t& GetSettings();
virtual std::string Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
const std::string& pArgs);
};
diff --git a/lib/Plugins/Makefile.am b/lib/Plugins/Makefile.am
index bc032d74..0502f5e1 100644
--- a/lib/Plugins/Makefile.am
+++ b/lib/Plugins/Makefile.am
@@ -1,28 +1,44 @@
AM_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils
pluginslibdir=$(PLUGINS_LIB_DIR)
-pluginslib_LTLIBRARIES = libCCpp.la \
- libMailx.la \
- libSQLite3.la \
- libLogger.la \
- libKerneloopsScanner.la\
- libKerneloopsReporter.la\
- libKerneloops.la \
- libRunApp.la \
- libSOSreport.la \
- libBugzilla.la \
- libTicketUploader.la \
- libPython.la \
- libFileTransfer.la
-
-dist_pluginslib_DATA = KerneloopsReporter.GTKBuilder Logger.GTKBuilder Mailx.GTKBuilder Bugzilla.GTKBuilder TicketUploader.GTKBuilder
-
-pluginsconfdir=$(PLUGINS_CONF_DIR)
-dist_pluginsconf_DATA = CCpp.conf Mailx.conf SQLite3.conf Logger.conf KerneloopsScanner.conf KerneloopsReporter.conf Bugzilla.conf TicketUploader.conf FileTransfer.conf
-
-
-man_MANS = abrt-FileTransfer.7 abrt-Bugzilla.7 abrt-KerneloopsReporter.7\
- abrt-KerneloopsScanner.7 abrt-Logger.7 abrt-Mailx.7 abrt-plugins.7\
+pluginslib_LTLIBRARIES = \
+ libCCpp.la \
+ libMailx.la \
+ libSQLite3.la \
+ libLogger.la \
+ libKerneloopsScanner.la\
+ libKerneloopsReporter.la\
+ libKerneloops.la \
+ libRunApp.la \
+ libSOSreport.la \
+ libBugzilla.la \
+ libCatcut.la \
+ libTicketUploader.la \
+ libPython.la \
+ libFileTransfer.la
+
+dist_pluginslib_DATA = \
+ KerneloopsReporter.GTKBuilder Logger.GTKBuilder \
+ Mailx.GTKBuilder Bugzilla.GTKBuilder \
+ TicketUploader.GTKBuilder Catcut.GTKBuilder
+
+pluginsconfdir = $(PLUGINS_CONF_DIR)
+dist_pluginsconf_DATA = \
+ CCpp.conf \
+ Mailx.conf \
+ SQLite3.conf \
+ Logger.conf \
+ Kerneloops.conf \
+ KerneloopsScanner.conf \
+ KerneloopsReporter.conf \
+ Bugzilla.conf \
+ Catcut.conf \
+ TicketUploader.conf \
+ FileTransfer.conf
+
+man_MANS = abrt-FileTransfer.7 abrt-Bugzilla.7 abrt-KerneloopsReporter.7 \
+ abrt-KerneloopsScanner.7 abrt-Logger.7 abrt-Mailx.7 abrt-plugins.7 \
abrt-SQLite3.7 abrt-RunApp.7 abrt-TicketUploader.7
+# + abrt-Catcut.7
EXTRA_DIST = $(man_MANS)
@@ -36,7 +52,11 @@ install-data-hook:
libCCpp_la_SOURCES = CCpp.cpp CCpp.h
libCCpp_la_LDFLAGS = -avoid-version
libCCpp_la_LIBADD = $(NSS_LIBS)
-libCCpp_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DCCPP_HOOK_PATH=\"${libexecdir}/hookCCpp\" -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" $(NSS_CFLAGS)
+libCCpp_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils \
+ -DCCPP_HOOK_PATH=\"${libexecdir}/hookCCpp\" \
+ -DDEBUG_DUMPS_DIR=\"$(DEBUG_DUMPS_DIR)\" \
+ -DLOCALSTATEDIR='"$(localstatedir)"' \
+ $(NSS_CFLAGS)
# Kerneloops
libKerneloops_la_SOURCES = Kerneloops.cpp Kerneloops.h
@@ -57,7 +77,7 @@ libKerneloopsScanner_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils -D
# Mailx
libMailx_la_SOURCES = Mailx.cpp Mailx.h
libMailx_la_LDFLAGS = -avoid-version
-libMailx_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
+libMailx_la_CPPFLAGS = -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\" -DLOCALSTATEDIR='"$(localstatedir)"'
# SQLite3
libSQLite3_la_SOURCES = SQLite3.cpp SQLite3.h
@@ -80,9 +100,15 @@ libSOSreport_la_LDFLAGS = -avoid-version
# Bugzilla
libBugzilla_la_SOURCES = Bugzilla.h Bugzilla.cpp
-libBugzilla_la_LIBADD = $(XMLRPC_CPP_LIBS) $(XMLRPC_CLIENT_CPP_LIBS) $(NSS_LIBS)
+libBugzilla_la_LIBADD = $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS)
libBugzilla_la_LDFLAGS = -avoid-version
-libBugzilla_la_CPPFLAGS = $(XMLRPC_CPP_CFLAGS) $(XMLRPC_CLIENT_CPP_CFLAGS) $(NSS_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
+libBugzilla_la_CPPFLAGS = $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
+
+# Catcut
+libCatcut_la_SOURCES = Catcut.h Catcut.cpp
+libCatcut_la_LIBADD = $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS)
+libCatcut_la_LDFLAGS = -avoid-version
+libCatcut_la_CPPFLAGS = $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) -I$(srcdir)/../../inc -I$(srcdir)/../Utils -DPLUGINS_LIB_DIR=\"$(PLUGINS_LIB_DIR)\"
# TicketUploader
libTicketUploader_la_SOURCES = TicketUploader.h TicketUploader.cpp
diff --git a/lib/Plugins/Python.cpp b/lib/Plugins/Python.cpp
index 9be76b3b..9fb78808 100644
--- a/lib/Plugins/Python.cpp
+++ b/lib/Plugins/Python.cpp
@@ -6,7 +6,7 @@
#define FILENAME_BACKTRACE "backtrace"
#define PYHOOK_CONFIG "/etc/abrt/pyhook.conf"
-std::string CAnalyzerPython::CreateHash(const std::string& pDebugDumpDir)
+static std::string CreateHash(const char *pDebugDumpDir)
{
std::string uuid;
CDebugDump dd;
@@ -15,11 +15,11 @@ std::string CAnalyzerPython::CreateHash(const std::string& pDebugDumpDir)
return uuid;
}
-std::string CAnalyzerPython::GetLocalUUID(const std::string& pDebugDumpDir)
+std::string CAnalyzerPython::GetLocalUUID(const char *pDebugDumpDir)
{
return CreateHash(pDebugDumpDir);
}
-std::string CAnalyzerPython::GetGlobalUUID(const std::string& pDebugDumpDir)
+std::string CAnalyzerPython::GetGlobalUUID(const char *pDebugDumpDir)
{
return GetLocalUUID(pDebugDumpDir);
}
diff --git a/lib/Plugins/Python.h b/lib/Plugins/Python.h
index b54de8dc..82f52c05 100644
--- a/lib/Plugins/Python.h
+++ b/lib/Plugins/Python.h
@@ -8,12 +8,11 @@
class CAnalyzerPython : public CAnalyzer
{
public:
- virtual std::string GetLocalUUID(const std::string& pDebugDumpDir);
- virtual std::string GetGlobalUUID(const std::string& pDebugDumpDir);
- virtual void CreateReport(const std::string& pDebugDumpDir, int force) {}
+ virtual std::string GetLocalUUID(const char *pDebugDumpDir);
+ virtual std::string GetGlobalUUID(const char *pDebugDumpDir);
+ virtual void CreateReport(const char *pDebugDumpDir, int force) {}
virtual void Init();
virtual void DeInit();
- virtual std::string CreateHash(const std::string& pInput);
};
#endif /* PYTHON_H_ */
diff --git a/lib/Plugins/RunApp.cpp b/lib/Plugins/RunApp.cpp
index 5a5c1d44..f816dc23 100644
--- a/lib/Plugins/RunApp.cpp
+++ b/lib/Plugins/RunApp.cpp
@@ -29,41 +29,41 @@
#define COMMAND 0
#define FILENAME 1
-void CActionRunApp::ParseArgs(const std::string& psArgs, vector_string_t& pArgs)
+/* TODO: do not duplicate: SOSreport.cpp has same function too */
+static void ParseArgs(const char *psArgs, vector_string_t& pArgs)
{
- unsigned int ii;
+ unsigned ii;
bool is_quote = false;
- std::string item = "";
- for (ii = 0; ii < psArgs.length(); ii++)
+ std::string item;
+
+ for (ii = 0; psArgs[ii]; ii++)
{
- if (psArgs[ii] == '\"')
+ if (psArgs[ii] == '"')
{
- is_quote = is_quote == true ? false : true;
+ is_quote = !is_quote;
}
else if (psArgs[ii] == ',' && !is_quote)
{
pArgs.push_back(item);
- item = "";
+ item.clear();
}
else
{
item += psArgs[ii];
}
}
- if (item != "")
+
+ if (item.size() != 0)
{
pArgs.push_back(item);
}
}
-void CActionRunApp::Run(const std::string& pActionDir,
- const std::string& pArgs)
+void CActionRunApp::Run(const char *pActionDir, const char *pArgs)
{
update_client(_("Executing RunApp plugin..."));
- char line[1024];
- std::string output = "";
-
+ std::string output;
vector_string_t args;
ParseArgs(pArgs, args);
@@ -71,8 +71,9 @@ void CActionRunApp::Run(const std::string& pActionDir,
FILE *fp = popen(args[COMMAND].c_str(), "r");
if (fp == NULL)
{
- throw CABRTException(EXCEP_PLUGIN, "CActionRunApp::Run(): cannot execute " + args[COMMAND]);
+ throw CABRTException(EXCEP_PLUGIN, "Can't execute " + args[COMMAND]);
}
+ char line[1024];
while (fgets(line, 1024, fp) != NULL)
{
output += line;
@@ -83,7 +84,7 @@ void CActionRunApp::Run(const std::string& pActionDir,
{
CDebugDump dd;
dd.Open(pActionDir);
- dd.SaveText(args[FILENAME].c_str(), output);
+ dd.SaveText(args[FILENAME].c_str(), output.c_str());
}
}
diff --git a/lib/Plugins/RunApp.h b/lib/Plugins/RunApp.h
index 23315f1d..939feaa5 100644
--- a/lib/Plugins/RunApp.h
+++ b/lib/Plugins/RunApp.h
@@ -28,12 +28,8 @@
class CActionRunApp : public CAction
{
- private:
- void ParseArgs(const std::string& psArgs, vector_string_t& pArgs);
-
public:
- virtual void Run(const std::string& pActionDir,
- const std::string& pArgs);
+ virtual void Run(const char *pActionDir, const char *pArgs);
};
#endif
diff --git a/lib/Plugins/SOSreport.cpp b/lib/Plugins/SOSreport.cpp
index ab6125c4..fedc51ab 100644
--- a/lib/Plugins/SOSreport.cpp
+++ b/lib/Plugins/SOSreport.cpp
@@ -18,41 +18,26 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <stdio.h>
-#include <string.h>
#include <ext/stdio_filebuf.h>
#include <fstream>
#include <sstream>
+#include "abrtlib.h"
+#include "abrt_types.h"
+#include "ABRTException.h"
#include "SOSreport.h"
#include "DebugDump.h"
#include "ABRTException.h"
#include "CommLayerInner.h"
-void CActionSOSreport::CopyFile(const std::string& pSourceName, const std::string& pDestName)
-{
- std::ifstream source(pSourceName.c_str(), std::fstream::binary);
-
- if (!source)
- {
- throw CABRTException(EXCEP_PLUGIN, "CActionSOSreport::CopyFile(): could not open input sosreport filename:" + pSourceName);
- }
- std::ofstream dest(pDestName.c_str(),std::fstream::trunc|std::fstream::binary);
- if (!dest)
- {
- throw CABRTException(EXCEP_PLUGIN, "CActionSOSreport::CopyFile(): could not open output sosreport filename:" + pDestName);
- }
- dest << source.rdbuf();
-}
-
-void CActionSOSreport::ErrorCheck(const index_type pI)
+static void ErrorCheck(int pos)
{
- if (pI == std::string::npos)
+ if (pos < 0)
{
- throw CABRTException(EXCEP_PLUGIN, std::string("CActionSOSreport::ErrorCheck(): could not find filename in sosreport output"));
+ throw CABRTException(EXCEP_PLUGIN, "Can't find filename in sosreport output");
}
}
-std::string CActionSOSreport::ParseFilename(const std::string& pOutput)
+static std::string ParseFilename(const std::string& pOutput)
{
/*
the sosreport's filename is embedded in sosreport's output.
@@ -63,83 +48,85 @@ std::string CActionSOSreport::ParseFilename(const std::string& pOutput)
static const char sosreport_filename_marker[] =
"Your sosreport has been generated and saved in:";
- index_type p = pOutput.find(sosreport_filename_marker);
+ int p = pOutput.find(sosreport_filename_marker);
ErrorCheck(p);
- p += strlen(sosreport_filename_marker);
+ p += sizeof(sosreport_filename_marker)-1;
- index_type filename_start = pOutput.find_first_not_of(" \n\t", p);
+ int filename_start = pOutput.find_first_not_of(" \n\t", p);
ErrorCheck(p);
- index_type line_end = pOutput.find_first_of('\n',filename_start);
+ int line_end = pOutput.find_first_of('\n',filename_start);
ErrorCheck(p);
- index_type filename_end = pOutput.find_last_not_of(" \n\t",line_end);
+ int filename_end = pOutput.find_last_not_of(" \n\t", line_end);
ErrorCheck(p);
- return pOutput.substr(filename_start,(filename_end-filename_start)+1);
+ return pOutput.substr(filename_start, filename_end - filename_start + 1);
}
-void CActionSOSreport::ParseArgs(const std::string& psArgs, vector_args_t& pArgs)
+/* TODO: do not duplicate: RunApp.cpp has same function too */
+static void ParseArgs(const char *psArgs, vector_string_t& pArgs)
{
- unsigned int ii;
+ unsigned ii;
bool is_quote = false;
- std::string item = "";
- for (ii = 0; ii < psArgs.length(); ii++)
+ std::string item;
+
+ for (ii = 0; psArgs[ii]; ii++)
{
- if (psArgs[ii] == '\"')
+ if (psArgs[ii] == '"')
{
- is_quote = is_quote == true ? false : true;
+ is_quote = !is_quote;
}
else if (psArgs[ii] == ',' && !is_quote)
{
pArgs.push_back(item);
- item = "";
+ item.clear();
}
else
{
item += psArgs[ii];
}
}
- if (item != "")
+
+ if (item.size() != 0)
{
pArgs.push_back(item);
}
}
-void CActionSOSreport::Run(const std::string& pActionDir,
- const std::string& pArgs)
+void CActionSOSreport::Run(const char *pActionDir, const char *pArgs)
{
update_client(_("Executing SOSreport plugin..."));
- const char command_default[] = "sosreport --batch --no-progressbar --only=anaconda --only=bootloader"
+ static const char command_default[] = "sosreport --batch --no-progressbar --only=anaconda --only=bootloader"
" --only=devicemapper --only=filesys --only=hardware --only=kernel"
" --only=libraries --only=memory --only=networking --only=nfsserver"
" --only=pam --only=process --only=rpm -k rpm.rpmva=off --only=ssh"
" --only=startup --only=yum 2>&1";
- const char command_prefix[] = "sosreport --batch --no-progressbar";
+ static const char command_prefix[] = "sosreport --batch --no-progressbar";
std::string command;
- vector_args_t args;
+ vector_string_t args;
ParseArgs(pArgs, args);
if (args.size() == 0 || args[0] == "")
{
- command = std::string(command_default);
+ command = command_default;
}
else
{
- command = std::string(command_prefix) + ' ' + args[0] + " 2>&1";
+ command = ssprintf("%s %s 2>&1", command_prefix, args[0].c_str());
}
- update_client(_("running sosreport: ") + command);
+ update_client(_("running sosreport: %s"), command.c_str());
FILE *fp = popen(command.c_str(), "r");
-
if (fp == NULL)
{
- throw CABRTException(EXCEP_PLUGIN, std::string("CActionSOSreport::Run(): cannot execute ") + command);
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't execute '%s'", command.c_str()));
}
+//vda TODO: fix this mess
std::ostringstream output_stream;
__gnu_cxx::stdio_filebuf<char> command_output_buffer(fp, std::ios_base::in);
@@ -152,13 +139,21 @@ void CActionSOSreport::Run(const std::string& pActionDir,
std::string output = output_stream.str();
std::string sosreport_filename = ParseFilename(output);
- std::string sosreport_dd_filename = pActionDir + "/sosreport.tar.bz2";
+ std::string sosreport_dd_filename = concat_path_file(pActionDir, "sosreport.tar.bz2");
CDebugDump dd;
dd.Open(pActionDir);
//Not useful
//dd.SaveText("sosreportoutput", output);
- CopyFile(sosreport_filename,sosreport_dd_filename);
+ if (copy_file(sosreport_filename.c_str(), sosreport_dd_filename.c_str()) < 0)
+ {
+ throw CABRTException(EXCEP_PLUGIN,
+ ssprintf("Can't copy '%s' to '%s'",
+ sosreport_filename.c_str(),
+ sosreport_dd_filename.c_str()
+ )
+ );
+ }
}
PLUGIN_INFO(ACTION,
diff --git a/lib/Plugins/SOSreport.h b/lib/Plugins/SOSreport.h
index 1a352876..d4e0d733 100644
--- a/lib/Plugins/SOSreport.h
+++ b/lib/Plugins/SOSreport.h
@@ -22,24 +22,11 @@
#define SOSREPORT_H_
#include "Action.h"
-#include <string>
-#include <vector>
class CActionSOSreport : public CAction
{
- private:
- typedef std::string::size_type index_type;
-
- void CopyFile(const std::string& pSourceName, const std::string& pDestName);
- void ErrorCheck(const index_type pI);
- std::string ParseFilename(const std::string& pOutput);
-
- typedef std::vector<std::string> vector_args_t;
- void ParseArgs(const std::string& psArgs, vector_args_t& pArgs);
-
public:
- virtual void Run(const std::string& pActionDir,
- const std::string& pArgs);
+ virtual void Run(const char *pActionDir, const char *pArgs);
};
#endif
diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp
index a2dc426f..ab39d040 100644
--- a/lib/Plugins/SQLite3.cpp
+++ b/lib/Plugins/SQLite3.cpp
@@ -24,7 +24,8 @@
#include <stdlib.h>
#include "SQLite3.h"
#include "ABRTException.h"
-
+#include <limits.h>
+#include <abrtlib.h>
#define ABRT_TABLE_VERSION 2
#define ABRT_TABLE_VERSION_STR "2"
@@ -96,8 +97,10 @@ bool CSQLite3::Exist(const std::string& pUUID, const std::string& pUID)
{
vector_database_rows_t table;
GetTable("SELECT "DATABASE_COLUMN_REPORTED" FROM "ABRT_TABLE" WHERE "
- DATABASE_COLUMN_UUID" = '"+pUUID+"' AND "
- DATABASE_COLUMN_UID" = '"+pUID+"';", table);
+ DATABASE_COLUMN_UUID" = '"+pUUID+"' "
+ "AND ("DATABASE_COLUMN_UID" = '"+pUID+"' "
+ "OR "DATABASE_COLUMN_UID" = '-1');"
+ , table);
if (table.empty())
{
return false;
@@ -311,7 +314,8 @@ void CSQLite3::Delete(const std::string& pUUID, const std::string& pUID)
{
Exec("DELETE FROM "ABRT_TABLE" "
"WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' "
- "AND "DATABASE_COLUMN_UID" = '"+pUID+"';");
+ "AND "DATABASE_COLUMN_UID" = '"+pUID+"' "
+ "OR "DATABASE_COLUMN_UID" = '-1';");
}
else
{
@@ -321,7 +325,7 @@ void CSQLite3::Delete(const std::string& pUUID, const std::string& pUID)
void CSQLite3::SetReported(const std::string& pUUID, const std::string& pUID, const std::string& pMessage)
{
- if(pUID == "0")
+ if (pUID == "0")
{
Exec("UPDATE "ABRT_TABLE" "
"SET "DATABASE_COLUMN_REPORTED" = 1 "
@@ -335,15 +339,17 @@ void CSQLite3::SetReported(const std::string& pUUID, const std::string& pUID, co
Exec("UPDATE "ABRT_TABLE" "
"SET "DATABASE_COLUMN_REPORTED" = 1 "
"WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' "
- "AND "DATABASE_COLUMN_UID" = '"+pUID+"';");
+ "AND ("DATABASE_COLUMN_UID" = '"+pUID+"' "
+ "OR "DATABASE_COLUMN_UID" = '-1');");
Exec("UPDATE "ABRT_TABLE" "
"SET "DATABASE_COLUMN_MESSAGE" = '" + pMessage + "' "
"WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' "
- "AND "DATABASE_COLUMN_UID" = '"+pUID+"';");
+ "AND ("DATABASE_COLUMN_UID" = '"+pUID+"' "
+ "OR "DATABASE_COLUMN_UID" = '-1');");
}
else
{
- throw CABRTException(EXCEP_PLUGIN, "CSQLite3::SetReported(): UUID is not found in DB.");
+ throw CABRTException(EXCEP_PLUGIN, "CSQLite3::SetReported(): UUID"+pUID+" is not found in DB.");
}
}
@@ -357,7 +363,8 @@ vector_database_rows_t CSQLite3::GetUIDData(const std::string& pUID)
else
{
GetTable("SELECT * FROM "ABRT_TABLE
- " WHERE "DATABASE_COLUMN_UID" = '"+pUID+"';",
+ " WHERE "DATABASE_COLUMN_UID" = '"+pUID+"' "
+ "OR "DATABASE_COLUMN_UID" = '-1';",
table);
}
return table;
@@ -377,7 +384,8 @@ database_row_t CSQLite3::GetUUIDData(const std::string& pUUID, const std::string
{
GetTable("SELECT * FROM "ABRT_TABLE" "
"WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' "
- "AND "DATABASE_COLUMN_UID" = '"+pUID+"';",
+ "AND ("DATABASE_COLUMN_UID" = '"+pUID+"' "
+ "OR "DATABASE_COLUMN_UID" = '-1');",
table);
}
@@ -396,13 +404,11 @@ void CSQLite3::SetSettings(const map_plugin_settings_t& pSettings)
}
}
-map_plugin_settings_t CSQLite3::GetSettings()
+const map_plugin_settings_t& CSQLite3::GetSettings()
{
- map_plugin_settings_t ret;
-
- ret["DBPath"] = m_sDBPath;
+ m_pSettings["DBPath"] = m_sDBPath;
- return ret;
+ return m_pSettings;
}
PLUGIN_INFO(DATABASE,
diff --git a/lib/Plugins/SQLite3.h b/lib/Plugins/SQLite3.h
index e7ca8ae2..0eb3d086 100644
--- a/lib/Plugins/SQLite3.h
+++ b/lib/Plugins/SQLite3.h
@@ -58,7 +58,7 @@ class CSQLite3 : public CDatabase
virtual database_row_t GetUUIDData(const std::string& pUUID, const std::string& pUID);
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+ virtual const map_plugin_settings_t& GetSettings();
};
#endif /* SQLITE3_H_ */
diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp
index 69243cd9..e380de09 100644
--- a/lib/Plugins/TicketUploader.cpp
+++ b/lib/Plugins/TicketUploader.cpp
@@ -17,26 +17,20 @@
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 <fstream>
+#include <sstream>
+#include <curl/curl.h>
+#include "abrtlib.h"
#include "TicketUploader.h"
#include "DebugDump.h"
#include "ABRTException.h"
#include "CommLayerInner.h"
-#include <stdlib.h>
-#include <sys/stat.h>
-
-#include <string>
-#include <fstream>
-#include <sstream>
-#include <ext/stdio_filebuf.h>
-#include <curl/curl.h>
+using namespace std;
CTicketUploader::CTicketUploader() :
- m_sCustomer(""),
- m_sTicket(""),
- m_sURL(""),
m_bEncrypt(false),
m_bUpload(false),
m_nRetryCount(3),
@@ -47,196 +41,131 @@ CTicketUploader::~CTicketUploader()
{}
-
-void CTicketUploader::Error(string func, string msg)
-{
- update_client(msg);
- throw CABRTException(EXCEP_PLUGIN, func + msg);
-}
-
-void CTicketUploader::CopyFile(const std::string& pSourceName, const std::string& pDestName)
+static void Error(const char *msg)
{
- std::ifstream source(pSourceName.c_str(), std::fstream::binary);
-
- if (!source)
- {
- throw CABRTException(EXCEP_PLUGIN, "CActionSOSreport::CopyFile(): could not open input sosreport filename:" + pSourceName);
- }
- std::ofstream dest(pDestName.c_str(),std::fstream::trunc|std::fstream::binary);
- if (!dest)
- {
- throw CABRTException(EXCEP_PLUGIN, "CActionSOSreport::CopyFile(): could not open output sosreport filename:" + pDestName);
- }
- dest << source.rdbuf();
+ update_client("%s", msg);
+ throw CABRTException(EXCEP_PLUGIN, msg);
}
-void CTicketUploader::RunCommand(string cmd)
+static void RunCommand(const char *cmd)
{
- int retcode = system(cmd.c_str());
- if (retcode == -1)
- {
- Error("TicketUploader::RunCommand:", "error: could not start subshell: " + cmd);
- }
+ int retcode = system(cmd);
if (retcode)
{
- std::ostringstream msg;
- msg << "error: subshell failed (rc=" << retcode << "):" << cmd;
- Error("TicketUploader::RunCommand:", msg.str());
+ Error(ssprintf("'%s' exited with %d", cmd, retcode).c_str());
}
}
-string CTicketUploader::ReadCommand(string cmd)
+static string ReadCommand(const char *cmd)
{
- FILE* fp = popen(cmd.c_str(),"r");
+ FILE* fp = popen(cmd, "r");
if (!fp)
{
- Error("TicketUploader::ReadCommand:", "error: could not start subshell: " + cmd);
+ Error(ssprintf("error running '%s'", cmd).c_str());
}
- __gnu_cxx::stdio_filebuf<char> command_output_buffer(fp, std::ios_base::in);
- std::ostringstream output_stream;
- output_stream << &command_output_buffer;
+ string result;
+ char buff[1024];
+ while (fgets(buff, sizeof(buff), fp) != NULL)
+ {
+ result += buff;
+ }
int retcode = pclose(fp);
if (retcode)
{
- std::ostringstream msg;
- msg << "error: subshell failed (rc=" << retcode << "):" << cmd;
- Error("TicketUploader::ReadCommand:", msg.str());
+ Error(ssprintf("'%s' exited with %d", cmd, retcode).c_str());
}
- return output_stream.str();
+ return result;
}
-void CTicketUploader::WriteCommand(string cmd,string input)
+static void WriteCommand(const char *cmd, const char *input)
{
- FILE* fp = popen(cmd.c_str(),"w");
+ FILE* fp = popen(cmd, "w");
if (!fp)
{
- Error("TicketUploader::WriteCommand:", "error: could not start subshell: " + cmd);
+ Error(ssprintf("error running '%s'", cmd).c_str());
}
- size_t input_length = input.length();
- size_t check = fwrite(input.c_str(),1,input_length,fp);
- if (input_length != check)
- {
- Error("TicketUploader::WriteCommand:", "error: could not send input to subshell: " + cmd);
- }
+ /* Hoping it's not too big to get us forever blocked... */
+ fputs(input, fp);
int retcode = pclose(fp);
if (retcode)
{
- std::ostringstream msg;
- msg << "error: subshell failed (rc=" << retcode << "):" << cmd;
- Error("TicketUploader::ReadCommand:", msg.str());
+ Error(ssprintf("'%s' exited with %d", cmd, retcode).c_str());
}
-
}
-void CTicketUploader::SendFile(const std::string& pURL,
- const std::string& pFilename)
+void CTicketUploader::SendFile(const char *pURL, const char *pFilename)
{
- FILE * f;
- struct stat buf;
- CURL * curl;
- std::string wholeURL, protocol;
- int result, i, count = m_nRetryCount;
- int len = pURL.length();
- std::string file;
-
- if (pURL == "")
+ if (pURL[0] == '\0')
{
- warn_client(_("FileTransfer: URL not specified"));
+ error_msg(_("FileTransfer: URL not specified"));
return;
}
- protocol = "";
- i = 0;
- while(pURL[i] != ':')
- {
- protocol += pURL[i];
- i++;
- if(i == len)
- {
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): malformed URL, does not contain protocol");
- }
- }
- file = pFilename.substr(pFilename.rfind("/") + 1, pFilename.length());
-
- if( pURL[len-1] == '/' )
- {
- wholeURL = pURL + file;
- }
- else
- {
- wholeURL = pURL + "/" + file;
- }
-
- update_client(_("Sending archive ") + pFilename + _(" via ") + protocol + _(" to ") + pURL);
+ update_client(_("Sending archive %s to %s"), pFilename, pURL);
+ const char *base = (strrchr(pFilename, '/') ? : pFilename-1) + 1;
+ string wholeURL = concat_path_file(pURL, base);
+ int count = m_nRetryCount;
+ int result;
do
{
- f = fopen(pFilename.c_str(),"r");
- if(!f)
+ FILE* f = fopen(pFilename, "r");
+ if (!f)
{
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): cannot open archive file "+pFilename);
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't open archive file '%s'", pFilename));
}
- if (stat(pFilename.c_str(), &buf) == -1)
+ struct stat buf;
+ if (fstat(fileno(f), &buf) == -1)
{
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): cannot stat archive file "+pFilename);
+ throw CABRTException(EXCEP_PLUGIN, ssprintf("Can't stat archive file '%s'", pFilename));
}
- curl = curl_easy_init();
- if(!curl)
+ CURL* curl = curl_easy_init();
+ if (!curl)
{
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): Curl library error.");
+ throw CABRTException(EXCEP_PLUGIN, "Curl library init error");
}
/* enable uploading */
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
/* specify target */
curl_easy_setopt(curl, CURLOPT_URL, wholeURL.c_str());
- /*file handle: passed to the default callback, it will fread() it*/
curl_easy_setopt(curl, CURLOPT_READDATA, f);
- /*get file size*/
curl_easy_setopt(curl, CURLOPT_INFILESIZE, buf.st_size);
- /*everything is done here; result 0 means success*/
+ /* everything is done here; result 0 means success */
result = curl_easy_perform(curl);
- /*goodbye*/
+ /* goodbye */
curl_easy_cleanup(curl);
fclose(f);
if (result != 0)
{
- update_client(_("Sending failed, try it again: ") + std::string(curl_easy_strerror((CURLcode)result)));
+ update_client(_("Sending failed, trying again. %s"), curl_easy_strerror((CURLcode)result));
}
}
/*retry the upload if not succesful, wait a bit before next try*/
- while( result!=0 && --count != 0 && (sleep(m_nRetryDelay),1) );
+ while (result != 0 && --count != 0 && (sleep(m_nRetryDelay), 1));
if (count <= 0 && result != 0)
{
- throw CABRTException(EXCEP_PLUGIN, "CFileTransfer::SendFile(): Curl can not send a ticket.");
+ throw CABRTException(EXCEP_PLUGIN, "Curl can not send a ticket");
}
}
-string CTicketUploader::Report(const map_crash_report_t& pCrashReport, const std::string& pArgs)
+string CTicketUploader::Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings, const string& pArgs)
{
- string ret;
update_client(_("Creating an TicketUploader report..."));
-
-
// Get ticket name, customer name, and do_encrypt from config settings
- string ticket_name;
- string customer_name;
- string upload_url;
- bool do_encrypt = false;
- bool do_upload = false;
-
- customer_name = m_sCustomer;
- ticket_name = m_sTicket;
- upload_url = m_sURL;
- do_encrypt = m_bEncrypt;
- do_upload = m_bUpload;
+ string customer_name = m_sCustomer;
+ string ticket_name = m_sTicket;
+ string upload_url = m_sURL;
+ bool do_encrypt = m_bEncrypt;
+ bool do_upload = m_bUpload;
bool have_ticket_name = false;
if (ticket_name == "")
@@ -248,238 +177,221 @@ string CTicketUploader::Report(const map_crash_report_t& pCrashReport, const std
have_ticket_name = true;
}
-
-
// Format the time to add to the file name
const int timebufmax = 256;
char timebuf[timebufmax];
time_t curtime = time(NULL);
- if (!strftime(timebuf,timebufmax,"-%G%m%d%k%M%S",gmtime(&curtime)))
+ if (!strftime(timebuf, timebufmax, "-%G%m%d%k%M%S", gmtime(&curtime)))
{
- Error("TicketUploader::Report:","could not format time");
+ Error("Can't format time");
}
-
-
// Create a tmp work directory, and within that the directory
// that will be the root of the tarball
string file_name = ticket_name + timebuf;
- char TEMPLATE[] = "/tmp/rhuploadXXXXXX";
- string tmpdir_name = mkdtemp(TEMPLATE);
- string tmptar_name = tmpdir_name + '/' + file_name;
+ char tmpdir_name[] = "/tmp/rhuploadXXXXXX";
+ if (mkdtemp(tmpdir_name) == NULL)
+ {
+ Error("Can't mkdir a temporary directory in /tmp");
+ }
+ string tmptar_name = concat_path_file(tmpdir_name, file_name.c_str());
if (mkdir(tmptar_name.c_str(),S_IRWXU))
{
- Error("TicketUploader::Report:","error: could not mkdir: " + tmptar_name);
+ Error(ssprintf("Can't mkdir '%s'", tmptar_name.c_str()).c_str());
}
-
-
// Copy each entry into the tarball root,
// files are simply copied, strings are written to a file
map_crash_report_t::const_iterator it;
for (it = pCrashReport.begin(); it != pCrashReport.end(); it++)
{
- if (it->second[CD_TYPE] == CD_TXT)
- {
- string ofile_name = tmptar_name + '/' + it->first;
- std::ofstream ofile(ofile_name.c_str(),std::fstream::trunc|std::fstream::binary);
+ if (it->second[CD_TYPE] == CD_TXT
+ || it->second[CD_TYPE] == CD_ATT
+ ) {
+ string ofile_name = concat_path_file(tmptar_name.c_str(), it->first.c_str());
+ ofstream ofile(ofile_name.c_str(), fstream::trunc|fstream::binary);
if (!ofile)
{
- Error("TicketUploader::Report:","error: could not open: " + ofile_name);
+ Error(ssprintf("Can't open '%s'", ofile_name.c_str()).c_str());
}
- ofile << it->second[CD_CONTENT] << std::endl;
+ ofile << it->second[CD_CONTENT] << endl;
ofile.close();
}
- if (it->second[CD_TYPE] == CD_ATT)
+ else if (it->second[CD_TYPE] == CD_BIN)
{
- string ofile_name = tmptar_name + '/' + it->first;
- std::ofstream ofile(ofile_name.c_str(),std::fstream::trunc|std::fstream::binary);
- if (!ofile)
+ string ofile_name = concat_path_file(tmptar_name.c_str(), it->first.c_str());
+ if (copy_file(it->second[CD_CONTENT].c_str(), ofile_name.c_str()) < 0)
{
- Error("TicketUploader::Report:","error: could not open: " + ofile_name);
+ throw CABRTException(EXCEP_PLUGIN,
+ ssprintf("Can't copy '%s' to '%s'",
+ it->second[CD_CONTENT].c_str(),
+ ofile_name.c_str()
+ )
+ );
}
- ofile << it->second[CD_CONTENT] << std::endl;
- ofile.close();
- }
- if (it->second[CD_TYPE] == CD_BIN)
- {
- string ofile_name = tmptar_name + '/' + it->first;
- CopyFile(it->second[CD_CONTENT],ofile_name);
}
}
-
-
// add ticket_name and customer name to tarball
if (have_ticket_name)
{
string ofile_name = tmptar_name + "/TICKET";
- std::ofstream ofile(ofile_name.c_str(),std::fstream::trunc|std::fstream::binary);
+ ofstream ofile(ofile_name.c_str(), fstream::trunc|fstream::binary);
if (!ofile)
{
- Error("TicketUploader::Report:","error: could not open: " + ofile_name);
+ Error(ssprintf("Can't open '%s'", ofile_name.c_str()).c_str());
}
- ofile << ticket_name << std::endl;
+ ofile << ticket_name << endl;
ofile.close();
}
if (customer_name != "")
{
string ofile_name = tmptar_name + "/CUSTOMER";
- std::ofstream ofile(ofile_name.c_str(),std::fstream::trunc|std::fstream::binary);
+ ofstream ofile(ofile_name.c_str(), fstream::trunc|fstream::binary);
if (!ofile)
{
- Error("TicketUploader::Report:","error: could not open: " + ofile_name);
+ Error(ssprintf("Can't open '%s'", ofile_name.c_str()).c_str());
}
- ofile << customer_name << std::endl;
+ ofile << customer_name << endl;
ofile.close();
}
-
-
// Create the compressed tarball
string outfile_basename = file_name + ".tar.gz";
- string outfile_name = tmpdir_name + '/' + outfile_basename;
- string cmd = string("tar -C ") + tmpdir_name +
- " --create --gzip --file=" + outfile_name + ' ' + file_name;
- RunCommand(cmd);
-
-
-
+ string outfile_name = concat_path_file(tmpdir_name, outfile_basename.c_str());
+ string cmd = ssprintf("tar -C %s --create --gzip --file=%s %s", tmpdir_name, outfile_name.c_str(), file_name.c_str());
+ RunCommand(cmd.c_str());
// encrypt if requested
string key;
if (do_encrypt)
{
- cmd = string("openssl rand -base64 48");
- key = ReadCommand(cmd);
+ key = ReadCommand("openssl rand -base64 48");
string infile_name = outfile_name;
outfile_basename += ".aes";
outfile_name += ".aes";
- cmd = string("openssl aes-128-cbc -in ") + infile_name +
- " -out " + outfile_name + " -pass stdin";
- WriteCommand(cmd,key);
+ cmd = ssprintf("openssl aes-128-cbc -in %s -out %s -pass stdin", infile_name.c_str(), outfile_name.c_str());
+ WriteCommand(cmd.c_str(), key.c_str());
}
-
-
// generate md5sum
- cmd = string("cd ") + tmpdir_name + string("; md5sum ") + outfile_basename;
- string md5sum = ReadCommand(cmd);
-
-
+ cmd = ssprintf("cd %s; md5sum %s", tmpdir_name, outfile_basename.c_str());
+ string md5sum = ReadCommand(cmd.c_str());
// upload or cp to /tmp
if (do_upload)
{
// FIXME: SendFile isn't working sometime (scp)
- SendFile(upload_url,outfile_name);
+ SendFile(upload_url.c_str(), outfile_name.c_str());
}
else
{
- cmd = string("cp ") + outfile_name + " /tmp/";
- RunCommand(cmd);
+ cmd = ssprintf("cp %s /tmp/", outfile_name.c_str());
+ RunCommand(cmd.c_str());
}
-
-
// generate a reciept telling md5sum and encryption key
- std::ostringstream msgbuf;
+ ostringstream msgbuf;
if (have_ticket_name)
- msgbuf << _("Please copy this into ticket: ") << ticket_name << std::endl;
+ msgbuf << _("Please copy this into ticket: ") << ticket_name << endl;
else
- msgbuf << _("Please send this to your technical support: ") << std::endl;
+ msgbuf << _("Please send this to your technical support: ") << endl;
if (do_upload)
- msgbuf << _("RHUPLOAD: This report was sent to ") + upload_url << std::endl;
+ msgbuf << _("RHUPLOAD: This report was sent to ") + upload_url << endl;
else
- msgbuf << _("RHUPLOAD: This report was copied into /tmp/: ") << std::endl;
+ msgbuf << _("RHUPLOAD: This report was copied into /tmp/: ") << endl;
if (have_ticket_name)
- msgbuf << _("TICKET: ") << ticket_name << std::endl;
- msgbuf << _("FILE: ") << outfile_basename << std::endl;
- msgbuf << _("MD5SUM: ") << std::endl;
+ msgbuf << _("TICKET: ") << ticket_name << endl;
+ msgbuf << _("FILE: ") << outfile_basename << endl;
+ msgbuf << _("MD5SUM: ") << endl;
msgbuf << md5sum;
if (do_encrypt)
{
- msgbuf << _("KEY: aes-128-cbc") << std::endl;
+ msgbuf << _("KEY: aes-128-cbc") << endl;
msgbuf << key;
}
- msgbuf << _("END: ") << std::endl;
+ msgbuf << _("END: ") << endl;
- warn_client(msgbuf.str());
+ error_msg("%s", msgbuf.str().c_str());
+ string ret;
if (do_upload)
{
string xx = _("report sent to ") + upload_url + '/' + outfile_basename;
- update_client(xx);
+ update_client("%s", xx.c_str());
ret = xx;
}
else
{
string xx = _("report copied to /tmp/") + outfile_basename;
- update_client(xx);
+ update_client("%s", xx.c_str());
ret = xx;
}
// delete the temporary directory
- cmd = string("rm -rf ") + tmpdir_name;
- RunCommand(cmd);
+ cmd = ssprintf("rm -rf %s", tmpdir_name);
+ RunCommand(cmd.c_str());
return ret;
}
void CTicketUploader::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("Customer") != pSettings.end())
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
+
+ it = pSettings.find("Customer");
+ if (it != end)
{
- m_sCustomer = pSettings.find("Customer")->second;
+ m_sCustomer = it->second;
}
- if (pSettings.find("Ticket") != pSettings.end())
+ it = pSettings.find("Ticket");
+ if (it != end)
{
- m_sTicket = pSettings.find("Ticket")->second;
+ m_sTicket = it->second;
}
- if (pSettings.find("URL") != pSettings.end())
+ it = pSettings.find("URL");
+ if (it != end)
{
- m_sURL = pSettings.find("URL")->second;
+ m_sURL = it->second;
}
- if (pSettings.find("Encrypt") != pSettings.end())
+ it = pSettings.find("Encrypt");
+ if (it != end)
{
- m_bEncrypt = pSettings.find("Encrypt")->second == "yes";
+ m_bEncrypt = it->second == "yes";
}
- if (pSettings.find("Upload") != pSettings.end())
+ it = pSettings.find("Upload");
+ if (it != end)
{
- m_bUpload = pSettings.find("Upload")->second == "yes";
+ m_bUpload = it->second == "yes";
}
- if (pSettings.find("RetryCount") != pSettings.end())
+ it = pSettings.find("RetryCount");
+ if (it != end)
{
- m_nRetryCount = atoi(pSettings.find("RetryCount")->second.c_str());
+ m_nRetryCount = atoi(it->second.c_str());
}
- if (pSettings.find("RetryDelay") != pSettings.end())
+ it = pSettings.find("RetryDelay");
+ if (it != end)
{
- m_nRetryDelay = atoi(pSettings.find("RetryDelay")->second.c_str());
+ m_nRetryDelay = atoi(it->second.c_str());
}
}
-map_plugin_settings_t CTicketUploader::GetSettings()
+const map_plugin_settings_t& CTicketUploader::GetSettings()
{
- map_plugin_settings_t ret;
-
- ret["Customer"] = m_sCustomer;
- ret["Ticket"] = m_sTicket;
- ret["URL"] = m_sURL;
- ret["Encrypt"] = m_bEncrypt ? "yes" : "no";
- ret["Upload"] = m_bEncrypt ? "yes" : "no";
-
- std::stringstream ss;
- ss << m_nRetryCount;
- ret["RetryCount"] = ss.str();
- ss.str("");
- ss << m_nRetryDelay;
- ret["RetryDelay"] = ss.str();
-
- return ret;
+ m_pSettings["Customer"] = m_sCustomer;
+ m_pSettings["Ticket"] = m_sTicket;
+ m_pSettings["URL"] = m_sURL;
+ m_pSettings["Encrypt"] = m_bEncrypt ? "yes" : "no";
+ m_pSettings["Upload"] = m_bEncrypt ? "yes" : "no";
+ m_pSettings["RetryCount"] = to_string(m_nRetryCount);
+ m_pSettings["RetryDelay"] = to_string(m_nRetryDelay);
+
+ return m_pSettings;
}
PLUGIN_INFO(REPORTER,
diff --git a/lib/Plugins/TicketUploader.h b/lib/Plugins/TicketUploader.h
index 68a29638..9ae3478f 100644
--- a/lib/Plugins/TicketUploader.h
+++ b/lib/Plugins/TicketUploader.h
@@ -29,45 +29,28 @@
#include "Reporter.h"
#include "CrashTypes.h"
-typedef std::string string;
-
class CTicketUploader : public CReporter
{
private:
- string m_sCustomer;
- string m_sTicket;
- string m_sURL;
- bool m_bEncrypt;
- bool m_bUpload;
-
- int m_nRetryCount;
- int m_nRetryDelay;
-
- void Error(string func, string msg);
- void CopyFile(const std::string& pSourceName, const std::string& pDestName);
- // Wrappers around popen/system
- // the wrapper in each case handles errors,
- // and converts from string->char*
- // RunCommand - a wrapper around system(cmd)
- void RunCommand(string cmd);
- // ReadCommand - a wrapper around popen(cmd,"r")
- string ReadCommand(string cmd);
- // WriteCommand - a wrapper around popen(cmd,"w")
- void WriteCommand(string cmd, string input );
+ std::string m_sCustomer;
+ std::string m_sTicket;
+ std::string m_sURL;
+ bool m_bEncrypt;
+ bool m_bUpload;
+ int m_nRetryCount;
+ int m_nRetryDelay;
- void SendFile(const std::string& pURL,
- const std::string& pFilename);
+ void SendFile(const char *pURL, const char *pFilename);
public:
CTicketUploader();
virtual ~CTicketUploader();
- virtual map_plugin_settings_t GetSettings();
+ virtual const map_plugin_settings_t& GetSettings();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual string Report(const map_crash_report_t& pCrashReport,
+ virtual std::string Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
const std::string& pArgs);
-
-
};
-#endif /* TICKETUPLOADER_H_ */
+#endif
diff --git a/lib/Utils/Action.h b/lib/Utils/Action.h
index 1286feba..5992cbff 100644
--- a/lib/Utils/Action.h
+++ b/lib/Utils/Action.h
@@ -22,7 +22,6 @@
#ifndef ACTION_H_
#define ACTION_H_
-#include <string>
#include "Plugin.h"
/**
@@ -40,8 +39,7 @@ class CAction : public CPlugin
* @param pActionDir An actual directory.
* @param pArgs Plugin's arguments.
*/
- virtual void Run(const std::string& pActionDir,
- const std::string& pArgs) = 0;
+ virtual void Run(const char *pActionDir, const char *pArgs) = 0;
};
-#endif /*ACTION_H_*/
+#endif
diff --git a/lib/Utils/Analyzer.h b/lib/Utils/Analyzer.h
index e5bda574..9108a914 100644
--- a/lib/Utils/Analyzer.h
+++ b/lib/Utils/Analyzer.h
@@ -37,20 +37,20 @@ class CAnalyzer : public CPlugin
* @param pDebugDumpPath A debugdump dir containing all necessary data.
* @return A local UUID.
*/
- virtual std::string GetLocalUUID(const std::string& pDebugDumpPath) = 0;
+ virtual std::string GetLocalUUID(const char *pDebugDumpDir) = 0;
/**
* A method, which gets a global UUID of particular crash.
* @param pDebugDumpPath A debugdump dir containing all necessary data.
* @return A global UUID.
*/
- virtual std::string GetGlobalUUID(const std::string& pDebugDumpPath) = 0;
+ virtual std::string GetGlobalUUID(const char *pDebugDumpDir) = 0;
/**
* A method, which takes care of getting all additional data needed
* for computing UUIDs and creating a report. This report could be send
* somewhere afterwards.
* @param pDebugDumpPath A debugdump dir containing all necessary data.
*/
- virtual void CreateReport(const std::string& pDebugDumpPath, int force) = 0;
+ virtual void CreateReport(const char *pDebugDumpDir, int force) = 0;
};
#endif /*ANALYZER_H_*/
diff --git a/lib/Utils/CommLayerInner.cpp b/lib/Utils/CommLayerInner.cpp
index b5b8db78..307fe66d 100644
--- a/lib/Utils/CommLayerInner.cpp
+++ b/lib/Utils/CommLayerInner.cpp
@@ -10,29 +10,48 @@ static map_uint_str_t s_mapClientID;
static pthread_mutex_t s_map_mutex;
static bool s_map_mutex_inited;
+/* called via [p]error_msg() */
+static void warn_client(const char *msg)
+{
+ if (!s_pObs)
+ return;
+
+ uint64_t key = uint64_t(pthread_self());
+
+ pthread_mutex_lock(&s_map_mutex);
+ map_uint_str_t::const_iterator ki = s_mapClientID.find(key);
+ const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL);
+ pthread_mutex_unlock(&s_map_mutex);
+
+ if (peer)
+ s_pObs->Warning(msg, peer, key);
+}
+
void init_daemon_logging(CObserver *pObs)
{
s_pObs = pObs;
if (!s_map_mutex_inited)
{
- pthread_mutex_init(&s_map_mutex, NULL);
s_map_mutex_inited = true;
+ pthread_mutex_init(&s_map_mutex, NULL);
+ g_custom_logger = &warn_client;
}
}
-void set_client_name(const char* name)
+void set_client_name(const char *name)
{
uint64_t key = uint64_t(pthread_self());
pthread_mutex_lock(&s_map_mutex);
- if (!name)
+ if (!name) {
s_mapClientID.erase(key);
- else
+ } else {
s_mapClientID[key] = name;
+ }
pthread_mutex_unlock(&s_map_mutex);
}
-void warn_client(const std::string& pMessage)
+void update_client(const char *fmt, ...)
{
if (!s_pObs)
return;
@@ -44,26 +63,16 @@ void warn_client(const std::string& pMessage)
const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL);
pthread_mutex_unlock(&s_map_mutex);
- if (peer)
- s_pObs->Warning(pMessage, peer, key);
- else /* Bug: someone tries to warn_client() without set_client_name()!? */
- log("Hmm, stray %s: '%s'", __func__, pMessage.c_str());
-}
-
-void update_client(const std::string& pMessage)
-{
- if (!s_pObs)
+ if (!peer)
return;
- uint64_t key = uint64_t(pthread_self());
+ va_list p;
+ va_start(p, fmt);
+ char *msg;
+ int used = vasprintf(&msg, fmt, p);
+ va_end(p);
+ if (used < 0)
+ return;
- pthread_mutex_lock(&s_map_mutex);
- map_uint_str_t::const_iterator ki = s_mapClientID.find(key);
- const char* peer = (ki != s_mapClientID.end() ? ki->second.c_str() : NULL);
- pthread_mutex_unlock(&s_map_mutex);
-
- if (peer)
- s_pObs->Status(pMessage, peer, key);
- else
- log("Hmm, stray %s: '%s'", __func__, pMessage.c_str());
+ s_pObs->Status(msg, peer, key);
}
diff --git a/lib/Utils/CommLayerInner.h b/lib/Utils/CommLayerInner.h
index d161cfc7..9c22968a 100644
--- a/lib/Utils/CommLayerInner.h
+++ b/lib/Utils/CommLayerInner.h
@@ -9,15 +9,19 @@ void init_daemon_logging(CObserver *pObs);
* Set client's name (dbus ID). NULL unsets it.
*/
void set_client_name(const char* name);
-/* Ask a client to warn the user about a non-fatal, but unexpected condition.
+
+/*
+ * Ask a client to warn the user about a non-fatal, but unexpected condition.
* In GUI, it will usually be presented as a popup message.
+ * Usually there is no need to call it directly, just use [p]error_msg().
*/
-void warn_client(const std::string& pMessage);
-/* Logs a message to a client.
+//now static: void warn_client(const char *msg);
+
+/*
+ * Logs a message to a client.
* In UI, it will usually appear as a new status line message in GUI,
* or as a new message line in CLI.
*/
-void update_client(const std::string& pMessage);
-
-#endif /* COMMLAYERINNER_H_ */
+void update_client(const char *fmt, ...);
+#endif
diff --git a/lib/Utils/DBusCommon.h b/lib/Utils/DBusCommon.h
index b3e3af2c..2e3ed8a5 100644
--- a/lib/Utils/DBusCommon.h
+++ b/lib/Utils/DBusCommon.h
@@ -22,8 +22,8 @@
#include "CrashTypes.h"
-#define CC_DBUS_NAME "com.redhat.abrt"
-#define CC_DBUS_PATH "/com/redhat/abrt"
-#define CC_DBUS_IFACE "com.redhat.abrt"
+#define ABRTD_DBUS_NAME "com.redhat.abrt"
+#define ABRTD_DBUS_PATH "/com/redhat/abrt"
+#define ABRTD_DBUS_IFACE "com.redhat.abrt"
#endif
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp
index 43eb3244..bf793bbf 100644
--- a/lib/Utils/DebugDump.cpp
+++ b/lib/Utils/DebugDump.cpp
@@ -23,45 +23,41 @@
#include <iostream>
#include <sstream>
#include <sys/utsname.h>
-#include <magic.h>
+//#include <magic.h>
#include "abrtlib.h"
#include "DebugDump.h"
#include "ABRTException.h"
#include "CommLayerInner.h"
-/* Is it "." or ".."? */
-/* abrtlib candidate */
-static bool dot_or_dotdot(const char *filename)
-{
- if (filename[0] != '.') return false;
- if (filename[1] == '\0') return true;
- if (filename[1] != '.') return false;
- if (filename[2] == '\0') return true;
- return false;
-}
-
static bool isdigit_str(const char *str)
{
- while (*str)
+ do
{
if (*str < '0' || *str > '9') return false;
str++;
- }
+ } while (*str);
return true;
}
-static std::string RemoveBackSlashes(const std::string& pDir);
+static std::string RemoveBackSlashes(const char *pDir)
+{
+ unsigned len = strlen(pDir);
+ while (len != 0 && pDir[len-1] == '/')
+ len--;
+ return std::string(pDir, len);
+}
+
static bool ExistFileDir(const char* pPath);
-static void LoadTextFile(const std::string& pPath, std::string& pData);
+static void LoadTextFile(const char *pPath, std::string& pData);
CDebugDump::CDebugDump() :
m_sDebugDumpDir(""),
- m_bOpened(false),
m_pGetNextFileDir(NULL),
- m_nLockfileFD(-1)
+ m_bOpened(false),
+ m_bLocked(false)
{}
-void CDebugDump::Open(const std::string& pDir)
+void CDebugDump::Open(const char *pDir)
{
if (m_bOpened)
{
@@ -70,7 +66,7 @@ void CDebugDump::Open(const std::string& pDir)
m_sDebugDumpDir = RemoveBackSlashes(pDir);
if (!ExistFileDir(m_sDebugDumpDir.c_str()))
{
- throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::CDebugDump(): "+m_sDebugDumpDir+" does not exist.");
+ throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::CDebugDump(): " + m_sDebugDumpDir + " does not exist.");
}
Lock();
m_bOpened = true;
@@ -96,10 +92,49 @@ static bool ExistFileDir(const char* pPath)
return false;
}
-static int GetAndSetLock(const char* pLockFile, const char* pPID)
+static bool GetAndSetLock(const char* pLockFile, const char* pPID)
{
- int fd;
+ while (symlink(pPID, pLockFile) != 0)
+ {
+ if (errno != EEXIST)
+ perror_msg_and_die("Can't create lock file '%s'", pLockFile);
+ char pid_buf[sizeof(pid_t)*3 + 4];
+ ssize_t r = readlink(pLockFile, pid_buf, sizeof(pid_buf) - 1);
+ if (r < 0)
+ perror_msg_and_die("Can't read lock file '%s'", pLockFile);
+ pid_buf[r] = '\0';
+
+ if (strcmp(pid_buf, pPID) == 0)
+ {
+ log("Lock file '%s' is already locked by us", pLockFile);
+ return false;
+ }
+ if (isdigit_str(pid_buf))
+ {
+ if (access(ssprintf("/proc/%s", pid_buf).c_str(), F_OK) == 0)
+ {
+ log("Lock file '%s' is locked by process %s", pLockFile, pid_buf);
+ return false;
+ }
+ log("Lock file '%s' was locked by process %s, but it crashed?", pLockFile, pid_buf);
+ }
+ /* The file may be deleted by now by other process. Ignore ENOENT */
+ if (unlink(pLockFile) != 0 && errno != ENOENT)
+ {
+ perror_msg_and_die("Can't remove stale lock file '%s'", pLockFile);
+ }
+ }
+
+ VERB1 log("Locked '%s'", pLockFile);
+ return true;
+
+#if 0
+/* Old code was using ordinary files instead of symlinks,
+ * but it had a race window between open and write, during which file was
+ * empty. It was seen to happen in practice.
+ */
+ int fd;
while ((fd = open(pLockFile, O_WRONLY | O_CREAT | O_EXCL, 0640)) < 0)
{
if (errno != EEXIST)
@@ -148,20 +183,22 @@ static int GetAndSetLock(const char* pLockFile, const char* pPID)
/* close(fd); - not needed, exiting does it too */
perror_msg_and_die("Can't write lock file '%s'", pLockFile);
}
+ close(fd);
VERB1 log("Locked '%s'", pLockFile);
- return fd;
+ return true;
+#endif
}
void CDebugDump::Lock()
{
- if (m_nLockfileFD >= 0)
+ if (m_bLocked)
error_msg_and_die("Locking bug on '%s'", m_sDebugDumpDir.c_str());
std::string lockFile = m_sDebugDumpDir + ".lock";
char pid_buf[sizeof(int)*3 + 2];
sprintf(pid_buf, "%u", (unsigned)getpid());
- while ((m_nLockfileFD = GetAndSetLock(lockFile.c_str(), pid_buf)) < 0)
+ while ((m_bLocked = GetAndSetLock(lockFile.c_str(), pid_buf)) != true)
{
usleep(500000);
}
@@ -169,27 +206,26 @@ void CDebugDump::Lock()
void CDebugDump::UnLock()
{
- if (m_nLockfileFD >= 0)
+ if (m_bLocked)
{
+ m_bLocked = false;
std::string lockFile = m_sDebugDumpDir + ".lock";
- close(m_nLockfileFD);
- m_nLockfileFD = -1;
xunlink(lockFile.c_str());
VERB1 log("UnLocked '%s'", lockFile.c_str());
}
}
-void CDebugDump::Create(const std::string& pDir, uid_t uid)
+void CDebugDump::Create(const char *pDir, int64_t uid)
{
if (m_bOpened)
{
- throw CABRTException(EXCEP_ERROR, "CDebugDump::CDebugDump(): DebugDump is already opened.");
+ throw CABRTException(EXCEP_ERROR, "DebugDump is already opened");
}
m_sDebugDumpDir = RemoveBackSlashes(pDir);
if (ExistFileDir(m_sDebugDumpDir.c_str()))
{
- throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::CDebugDump(): "+m_sDebugDumpDir+" already exists.");
+ throw CABRTException(EXCEP_DD_OPEN, ssprintf("'%s' already exists", m_sDebugDumpDir.c_str()));
}
Lock();
@@ -199,13 +235,13 @@ void CDebugDump::Create(const std::string& pDir, uid_t uid)
{
UnLock();
m_bOpened = false;
- throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::Create(): Cannot create dir: " + pDir);
+ throw CABRTException(EXCEP_DD_OPEN, ssprintf("Can't create dir '%s'", pDir));
}
if (chmod(m_sDebugDumpDir.c_str(), 0700) == -1)
{
UnLock();
m_bOpened = false;
- throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::Create(): Cannot change permissions, dir: " + pDir);
+ throw CABRTException(EXCEP_DD_OPEN, ssprintf("Can't change mode of '%s'", pDir));
}
struct passwd* pw = getpwuid(uid);
gid_t gid = pw ? pw->pw_gid : uid;
@@ -216,14 +252,15 @@ void CDebugDump::Create(const std::string& pDir, uid_t uid)
perror_msg("can't change '%s' ownership to %u:%u", m_sDebugDumpDir.c_str(), (int)uid, (int)gid);
}
- SaveText(FILENAME_UID, ssprintf("%u", (int)uid));
+ SaveText(FILENAME_UID, to_string(uid).c_str());
SaveKernelArchitectureRelease();
- SaveTime();
+ time_t t = time(NULL);
+ SaveText(FILENAME_TIME, to_string(t).c_str());
}
-static void DeleteFileDir(const std::string& pDir)
+static void DeleteFileDir(const char *pDir)
{
- DIR *dir = opendir(pDir.c_str());
+ DIR *dir = opendir(pDir);
if (!dir)
return;
@@ -232,26 +269,28 @@ static void DeleteFileDir(const std::string& pDir)
{
if (dot_or_dotdot(dent->d_name))
continue;
- std::string fullPath = pDir + "/" + dent->d_name;
+ std::string fullPath = concat_path_file(pDir, dent->d_name);
if (unlink(fullPath.c_str()) == -1)
{
if (errno != EISDIR)
{
closedir(dir);
- throw CABRTException(EXCEP_DD_DELETE, std::string(__func__) + ": Cannot remove file: " + fullPath);
+ throw CABRTException(EXCEP_DD_DELETE, ssprintf("Can't remove dir %s", fullPath.c_str()));
}
- DeleteFileDir(fullPath);
+ DeleteFileDir(fullPath.c_str());
}
}
closedir(dir);
- if (remove(pDir.c_str()) == -1)
+ if (remove(pDir) == -1)
{
- throw CABRTException(EXCEP_DD_DELETE, std::string(__func__) + ": Cannot remove dir: " + pDir);
+ throw CABRTException(EXCEP_DD_DELETE, ssprintf("Can't remove dir %s", pDir));
}
}
-static bool IsTextFile(const std::string& pName)
+static bool IsTextFile(const char *name)
{
+/* This idiotic library thinks that file containing just "0" is not text (!!)
+
magic_t m = magic_open(MAGIC_MIME_TYPE);
if (m == NULL)
@@ -280,16 +319,24 @@ static bool IsTextFile(const std::string& pName)
magic_close(m);
return isText;
-}
+ */
+ int fd = open(name, O_RDONLY);
+ if (fd < 0)
+ return false;
-static std::string RemoveBackSlashes(const std::string& pDir)
-{
- std::string ret = pDir;
- while (ret[ret.length() - 1] == '/')
+ unsigned char buf[4*1024];
+ int r = full_read(fd, buf, sizeof(buf));
+ close(fd);
+
+ while (--r >= 0)
{
- ret = ret.substr(0, ret.length() - 2);
+ if (buf[r] >= 0x7f)
+ return false;
+ /* Among control chars, only '\t','\n' etc are allowed */
+ if (buf[r] < ' ' && !isspace(buf[r]))
+ return false;
}
- return ret;
+ return true;
}
void CDebugDump::Delete()
@@ -298,7 +345,7 @@ void CDebugDump::Delete()
{
return;
}
- DeleteFileDir(m_sDebugDumpDir);
+ DeleteFileDir(m_sDebugDumpDir.c_str());
}
void CDebugDump::Close()
@@ -322,100 +369,47 @@ void CDebugDump::SaveKernelArchitectureRelease()
}
std::string release;
LoadTextFile("/etc/redhat-release", release);
- SaveText(FILENAME_RELEASE, release);
+ const char *release_ptr = release.c_str();
+ unsigned len_1st_str = strchrnul(release_ptr, '\n') - release_ptr;
+ release.erase(len_1st_str); /* usually simply removes trailing '\n' */
+ SaveText(FILENAME_RELEASE, release.c_str());
}
-void CDebugDump::SaveTime()
+static void LoadTextFile(const char *pPath, std::string& pData)
{
- time_t t = time(NULL);
- SaveText(FILENAME_TIME, to_string(t));
-}
-
-static void LoadTextFile(const std::string& pPath, std::string& pData)
-{
- std::ifstream fIn;
+ FILE *fp = fopen(pPath, "r");
+ if (!fp)
+ {
+ throw CABRTException(EXCEP_DD_LOAD, ssprintf("Can't open file '%s'", pPath));
+ }
pData = "";
- fIn.open(pPath.c_str());
- if (fIn.is_open())
+ int ch;
+ while ((ch = fgetc(fp)) != EOF)
{
- // TODO: rewrite this
- int ch;
- while ((ch = fIn.get())!= EOF)
+ if (ch == '\0')
{
- if (ch == 0)
- {
- pData += " ";
- }
- else if (isspace(ch) || (isascii(ch) && !iscntrl(ch)))
- {
- pData += ch;
- }
+ pData += ' ';
}
- fIn.close();
- }
- else
- {
- throw CABRTException(EXCEP_DD_LOAD, std::string(__func__) + ": Cannot open file " + pPath);
- }
-}
-
-static void LoadBinaryFile(const std::string& pPath, char** pData, unsigned int* pSize)
-{
- std::ifstream fIn;
- fIn.open(pPath.c_str(), std::ios::binary | std::ios::ate);
- unsigned int size;
- if (fIn.is_open())
- {
- size = fIn.tellg();
- char *data = new char [size];
- fIn.read(data, size);
-
- *pData = data;
- *pSize = size;
-
- fIn.close();
- }
- else
- {
- throw CABRTException(EXCEP_DD_LOAD, std::string(__func__) + ": Cannot open file " + pPath);
- }
-}
-
-static void SaveTextFile(const std::string& pPath, const std::string& pData)
-{
- std::ofstream fOut;
- fOut.open(pPath.c_str());
- if (fOut.is_open())
- {
- fOut << pData;
- if (!fOut.good())
+ else if (isspace(ch) || (isascii(ch) && !iscntrl(ch)))
{
- throw CABRTException(EXCEP_DD_SAVE, std::string(__func__) + ": Cannot save file " + pPath);
+ pData += ch;
}
- fOut.close();
- }
- else
- {
- throw CABRTException(EXCEP_DD_SAVE, std::string(__func__) + ": Cannot open file " + pPath);
}
+ fclose(fp);
}
-static void SaveBinaryFile(const std::string& pPath, const char* pData, const unsigned pSize)
+static void SaveBinaryFile(const char *pPath, const char* pData, unsigned pSize)
{
- std::ofstream fOut;
- fOut.open(pPath.c_str(), std::ios::binary);
- if (fOut.is_open())
+ int fd = open(pPath, O_WRONLY | O_TRUNC | O_CREAT, 0666);
+ if (fd < 0)
{
- fOut.write(pData, pSize);
- if (!fOut.good())
- {
- throw CABRTException(EXCEP_DD_SAVE, std::string(__func__) + ": Cannot save file " + pPath);
- }
- fOut.close();
+ throw CABRTException(EXCEP_DD_SAVE, ssprintf("Can't open file '%s'", pPath));
}
- else
+ unsigned r = full_write(fd, pData, pSize);
+ close(fd);
+ if (r != pSize)
{
- throw CABRTException(EXCEP_DD_SAVE, std::string(__func__) + ": Cannot open file " + pPath);
+ throw CABRTException(EXCEP_DD_SAVE, ssprintf("Can't save file '%s'", pPath));
}
}
@@ -425,36 +419,27 @@ void CDebugDump::LoadText(const char* pName, std::string& pData)
{
throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::LoadText(): DebugDump is not opened.");
}
- std::string fullPath = m_sDebugDumpDir + "/" + pName;
- LoadTextFile(fullPath, pData);
-}
-void CDebugDump::LoadBinary(const char* pName, char** pData, unsigned int* pSize)
-{
- if (!m_bOpened)
- {
- throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::LoadBinary(): DebugDump is not opened.");
- }
- std::string fullPath = m_sDebugDumpDir + "/" + pName;
- LoadBinaryFile(fullPath, pData, pSize);
+ std::string fullPath = m_sDebugDumpDir + '/' + pName;
+ LoadTextFile(fullPath.c_str(), pData);
}
-void CDebugDump::SaveText(const char* pName, const std::string& pData)
+void CDebugDump::SaveText(const char* pName, const char* pData)
{
if (!m_bOpened)
{
throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::SaveText(): DebugDump is not opened.");
}
std::string fullPath = m_sDebugDumpDir + "/" + pName;
- SaveTextFile(fullPath, pData);
+ SaveBinaryFile(fullPath.c_str(), pData, strlen(pData));
}
-void CDebugDump::SaveBinary(const char* pName, const char* pData, const unsigned int pSize)
+void CDebugDump::SaveBinary(const char* pName, const char* pData, unsigned pSize)
{
if (!m_bOpened)
{
throw CABRTException(EXCEP_DD_OPEN, "CDebugDump::SaveBinary(): DebugDump is not opened.");
}
std::string fullPath = m_sDebugDumpDir + "/" + pName;
- SaveBinaryFile(fullPath, pData, pSize);
+ SaveBinaryFile(fullPath.c_str(), pData, pSize);
}
void CDebugDump::InitGetNextFile()
@@ -486,17 +471,17 @@ bool CDebugDump::GetNextFile(std::string& pFileName, std::string& pContent, bool
{
if (is_regular_file(dent, m_sDebugDumpDir.c_str()))
{
- std::string fullname = m_sDebugDumpDir + "/" + dent->d_name;
+ std::string fullname = m_sDebugDumpDir + '/' + dent->d_name;
pFileName = dent->d_name;
- if (IsTextFile(fullname))
+ if (IsTextFile(fullname.c_str()))
{
LoadText(dent->d_name, pContent);
pIsTextFile = true;
}
else
{
- pContent = "";
+ pContent.clear();
pIsTextFile = false;
}
return true;
@@ -506,4 +491,3 @@ bool CDebugDump::GetNextFile(std::string& pFileName, std::string& pContent, bool
m_pGetNextFileDir = NULL;
return false;
}
-
diff --git a/lib/Utils/DebugDump.h b/lib/Utils/DebugDump.h
index d6ff4f9f..b48a386d 100644
--- a/lib/Utils/DebugDump.h
+++ b/lib/Utils/DebugDump.h
@@ -25,6 +25,7 @@
#include <string>
#include <dirent.h>
+#include <stdint.h>
#define FILENAME_ARCHITECTURE "architecture"
#define FILENAME_KERNEL "kernel"
@@ -39,17 +40,17 @@
#define FILENAME_REASON "reason"
#define FILENAME_COMMENT "comment"
#define FILENAME_REPRODUCE "reproduce"
+#define FILENAME_RATING "rating"
class CDebugDump
{
private:
std::string m_sDebugDumpDir;
- bool m_bOpened;
DIR* m_pGetNextFileDir;
- int m_nLockfileFD;
+ bool m_bOpened;
+ bool m_bLocked;
void SaveKernelArchitectureRelease();
- void SaveTime();
void Lock();
void UnLock();
@@ -58,18 +59,17 @@ class CDebugDump
CDebugDump();
~CDebugDump() { Close(); }
- void Open(const std::string& pDir);
- void Create(const std::string& pDir, uid_t nUID);
+ void Open(const char *pDir);
+ void Create(const char *pDir, int64_t uid);
void Delete();
void Close();
bool Exist(const char* pFileName);
void LoadText(const char* pName, std::string& pData);
- void LoadBinary(const char* pName, char** pData, unsigned int* pSize);
- void SaveText(const char* pName, const std::string& pData);
- void SaveBinary(const char* pName, const char* pData, const unsigned int pSize);
+ void SaveText(const char* pName, const char *pData);
+ void SaveBinary(const char* pName, const char* pData, unsigned pSize);
void InitGetNextFile();
bool GetNextFile(std::string& pFileName, std::string& pContent, bool& pIsTextFile);
diff --git a/lib/Utils/Makefile.am b/lib/Utils/Makefile.am
index 713fe868..68c925fd 100644
--- a/lib/Utils/Makefile.am
+++ b/lib/Utils/Makefile.am
@@ -1,15 +1,21 @@
lib_LTLIBRARIES = libABRTUtils.la
+# Not used just yet:
+# time.cpp
+# xconnect.cpp
+
libABRTUtils_la_SOURCES = \
xfuncs.cpp \
+ encbase64.cpp \
read_write.cpp \
logging.cpp \
copyfd.cpp \
+ skip_whitespace.cpp \
CrashTypesSocket.cpp \
DebugDump.h DebugDump.cpp \
CommLayerInner.h CommLayerInner.cpp \
abrt_dbus.h abrt_dbus.cpp \
- Plugin.h Plugin.cpp \
+ Plugin.h Plugin.cpp make_descr.cpp \
Polkit.h Polkit.cpp \
Action.h Database.h Reporter.h Analyzer.h \
Observer.h \
@@ -31,7 +37,6 @@ libABRTUtils_la_LDFLAGS = \
$(DL_LIBS) \
$(DBUS_LIBS)
libABRTUtils_la_LIBADD = \
- -lmagic \
$(POLKIT_LIBS)
install-data-local:
diff --git a/lib/Utils/Observer.h b/lib/Utils/Observer.h
index d6ec6f35..db748659 100644
--- a/lib/Utils/Observer.h
+++ b/lib/Utils/Observer.h
@@ -8,8 +8,8 @@
class CObserver {
public:
virtual ~CObserver() {}
- virtual void Status(const std::string& pMessage, const char* peer, uint64_t pDest) = 0;
- virtual void Warning(const std::string& pMessage, const char* peer, uint64_t pDest) = 0;
+ virtual void Status(const char *pMessage, const char* peer, uint64_t pDest) = 0;
+ virtual void Warning(const char *pMessage, const char* peer, uint64_t pDest) = 0;
};
#endif
diff --git a/lib/Utils/Plugin.cpp b/lib/Utils/Plugin.cpp
index 161ead8a..4d561b46 100644
--- a/lib/Utils/Plugin.cpp
+++ b/lib/Utils/Plugin.cpp
@@ -19,9 +19,18 @@
#include "Plugin.h"
+CPlugin::CPlugin() {}
+
/* class CPlugin's virtuals */
CPlugin::~CPlugin() {}
void CPlugin::Init() {}
void CPlugin::DeInit() {}
-void CPlugin::SetSettings(const map_plugin_settings_t& pSettings) {}
-map_plugin_settings_t CPlugin::GetSettings() {return map_plugin_settings_t();}
+void CPlugin::SetSettings(const map_plugin_settings_t& pSettings)
+{
+ m_pSettings = pSettings;
+}
+
+const map_plugin_settings_t& CPlugin::GetSettings()
+{
+ return m_pSettings;
+}
diff --git a/lib/Utils/Plugin.h b/lib/Utils/Plugin.h
index 39290231..f93f7e7b 100644
--- a/lib/Utils/Plugin.h
+++ b/lib/Utils/Plugin.h
@@ -24,17 +24,10 @@
#define PLUGIN_H_
#include "abrt_types.h"
-
-#define PLUGINS_MAGIC_NUMBER 6
-
-#define PLUGINS_CONF_EXTENSION "conf"
-#define PLUGINS_LIB_EXTENSION "so"
-#define PLUGINS_LIB_PREFIX "lib"
-
+#include "CrashTypes.h"
#if HAVE_CONFIG_H
#include <config.h>
#endif
-
#if ENABLE_NLS
#include <libintl.h>
#define _(S) gettext(S)
@@ -42,13 +35,23 @@
#define _(S) (S)
#endif
+#define PLUGINS_MAGIC_NUMBER 6
+
+#define PLUGINS_CONF_EXTENSION "conf"
+#define PLUGINS_LIB_EXTENSION "so"
+#define PLUGINS_LIB_PREFIX "lib"
+
/**
* An abstract class. The class defines a common plugin interface. If a plugin
* has some settings, then a *Settings(*) method has to be written.
*/
class CPlugin
{
+ protected:
+ map_plugin_settings_t m_pSettings;
+
public:
+ CPlugin();
/**
* A destructor.
*/
@@ -70,7 +73,7 @@ class CPlugin
* A method, which return current settings. It is not mandatory method.
* @return Plugin's settings
*/
- virtual map_plugin_settings_t GetSettings();
+ virtual const map_plugin_settings_t& GetSettings();
};
/**
@@ -115,4 +118,8 @@ typedef struct SPluginInfo
PLUGINS_MAGIC_NUMBER,\
};
-#endif /* PLUGIN_H_ */
+/* helper finctions */
+std::string make_description_bz(const map_crash_report_t& pCrashReport);
+std::string make_description_logger(const map_crash_report_t& pCrashReport);
+
+#endif
diff --git a/lib/Utils/Reporter.h b/lib/Utils/Reporter.h
index c74a10c3..f2788993 100644
--- a/lib/Utils/Reporter.h
+++ b/lib/Utils/Reporter.h
@@ -41,6 +41,7 @@ class CReporter : public CPlugin
* @retun A message which can be displayed after a report is created.
*/
virtual std::string Report(const map_crash_report_t& pCrashReport,
+ const map_plugin_settings_t& pSettings,
const std::string& pArgs) = 0;
};
diff --git a/lib/Utils/copyfd.cpp b/lib/Utils/copyfd.cpp
index cda52b03..9abe7522 100644
--- a/lib/Utils/copyfd.cpp
+++ b/lib/Utils/copyfd.cpp
@@ -105,3 +105,25 @@ off_t copyfd_eof(int fd1, int fd2)
{
return full_fd_action(fd1, fd2, 0);
}
+
+off_t copy_file(const char *src_name, const char *dst_name)
+{
+ off_t r;
+ int src = open(src_name, O_RDONLY);
+ if (src < 0)
+ {
+ perror_msg("Can't open '%s'", src_name);
+ return -1;
+ }
+ int dst = open(dst_name, O_WRONLY | O_TRUNC | O_CREAT, 0666);
+ if (dst < 0)
+ {
+ close(src);
+ perror_msg("Can't open '%s'", dst_name);
+ return -1;
+ }
+ r = copyfd_eof(src, dst);
+ close(src);
+ close(dst);
+ return r;
+}
diff --git a/lib/Utils/encbase64.cpp b/lib/Utils/encbase64.cpp
new file mode 100644
index 00000000..6a6f1f75
--- /dev/null
+++ b/lib/Utils/encbase64.cpp
@@ -0,0 +1,78 @@
+/*
+ * Copyright 2006 Rob Landley <rob@landley.net>
+ *
+ * Licensed under GPLv2 or later.
+ */
+#include "abrtlib.h" /* xmalloc */
+
+/* Conversion table for base 64 */
+static const char tbl_base64[65 /*+ 2*/] = {
+ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+ 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+ 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X',
+ 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
+ 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
+ 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
+ 'w', 'x', 'y', 'z', '0', '1', '2', '3',
+ '4', '5', '6', '7', '8', '9', '+', '/',
+ '=' /* termination character */,
+ // '\n', '\0' /* needed for uudecode.c */
+};
+
+/* Conversion table for uuencode
+const char tbl_uuencode[65] ALIGN1 = {
+ '`', '!', '"', '#', '$', '%', '&', '\'',
+ '(', ')', '*', '+', ',', '-', '.', '/',
+ '0', '1', '2', '3', '4', '5', '6', '7',
+ '8', '9', ':', ';', '<', '=', '>', '?',
+ '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+ 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
+ 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
+ 'X', 'Y', 'Z', '[', '\\', ']', '^', '_',
+ '`'
+};
+*/
+
+/*
+ * Encode bytes at S of length LENGTH.
+ * Result will be 0-terminated, and must point to a writable
+ * buffer of at least 1+BASE64_LENGTH(length) bytes,
+ * where BASE64_LENGTH(len) = 4 * ((LENGTH + 2) / 3)
+ */
+static void encode_64bit(char *p, const void *src, int length, const char *tbl)
+{
+ const unsigned char *s = (const unsigned char *)src;
+
+ /* Transform the 3x8 bits to 4x6 bits */
+ while (length > 0) {
+ unsigned s1, s2;
+
+ /* Are s[1], s[2] valid or should be assumed 0? */
+ s1 = s2 = 0;
+ length -= 3; /* can be >=0, -1, -2 */
+ if (length >= -1) {
+ s1 = s[1];
+ if (length >= 0)
+ s2 = s[2];
+ }
+ *p++ = tbl[s[0] >> 2];
+ *p++ = tbl[((s[0] & 3) << 4) + (s1 >> 4)];
+ *p++ = tbl[((s1 & 0xf) << 2) + (s2 >> 6)];
+ *p++ = tbl[s2 & 0x3f];
+ s += 3;
+ }
+ /* Zero-terminate */
+ *p = '\0';
+ /* If length is -2 or -1, pad last char or two */
+ while (length) {
+ *--p = tbl[64];
+ length++;
+ }
+}
+
+char *encode_base64(const void *src, int length)
+{
+ char *dst = (char *)xmalloc(4 * ((length + 2) / 3) + 1);
+ encode_64bit(dst, src, length, tbl_base64);
+ return dst;
+}
diff --git a/lib/Utils/logging.cpp b/lib/Utils/logging.cpp
index f70d23f3..cae609bc 100644
--- a/lib/Utils/logging.cpp
+++ b/lib/Utils/logging.cpp
@@ -7,19 +7,18 @@
#include <syslog.h>
int xfunc_error_retval = EXIT_FAILURE;
-
int g_verbose;
+int logmode = LOGMODE_STDIO;
+const char *msg_prefix = "";
+const char *msg_eol = "\n";
+void (*g_custom_logger)(const char*);
void xfunc_die(void)
{
exit(xfunc_error_retval);
}
-const char *msg_prefix = "";
-const char *msg_eol = "\n";
-int logmode = LOGMODE_STDIO;
-
-void verror_msg(const char *s, va_list p, const char* strerr)
+static void verror_msg_helper(const char *s, va_list p, const char* strerr, int flags)
{
char *msg;
int prefix_len, strerr_len, msgeol_len, used;
@@ -27,9 +26,6 @@ void verror_msg(const char *s, va_list p, const char* strerr)
if (!logmode)
return;
- if (!s) /* nomsg[_and_die] uses NULL fmt */
- s = ""; /* some libc don't like printf(NULL) */
-
used = vasprintf(&msg, s, p);
if (used < 0)
return;
@@ -51,7 +47,7 @@ void verror_msg(const char *s, va_list p, const char* strerr)
memcpy(msg, msg_prefix, prefix_len);
}
if (strerr) {
- if (s[0]) { /* not perror_nomsg? */
+ if (s[0]) {
msg[used++] = ':';
msg[used++] = ' ';
}
@@ -60,24 +56,26 @@ void verror_msg(const char *s, va_list p, const char* strerr)
}
strcpy(&msg[used], msg_eol);
- if (logmode & LOGMODE_STDIO) {
+ if (flags & LOGMODE_STDIO) {
fflush(stdout);
full_write(STDERR_FILENO, msg, used + msgeol_len);
}
- if (logmode & LOGMODE_SYSLOG) {
+ if (flags & LOGMODE_SYSLOG) {
syslog(LOG_ERR, "%s", msg + prefix_len);
}
+ if ((flags & LOGMODE_CUSTOM) && g_custom_logger) {
+ g_custom_logger(msg + prefix_len);
+ }
free(msg);
}
-void error_msg_and_die(const char *s, ...)
+void log_msg(const char *s, ...)
{
va_list p;
va_start(p, s);
- verror_msg(s, p, NULL);
+ verror_msg_helper(s, p, NULL, logmode);
va_end(p);
- xfunc_die();
}
void error_msg(const char *s, ...)
@@ -85,8 +83,18 @@ void error_msg(const char *s, ...)
va_list p;
va_start(p, s);
- verror_msg(s, p, NULL);
+ verror_msg_helper(s, p, NULL, (logmode | LOGMODE_CUSTOM));
+ va_end(p);
+}
+
+void error_msg_and_die(const char *s, ...)
+{
+ va_list p;
+
+ va_start(p, s);
+ verror_msg_helper(s, p, NULL, (logmode | LOGMODE_CUSTOM));
va_end(p);
+ xfunc_die();
}
void perror_msg_and_die(const char *s, ...)
@@ -95,7 +103,7 @@ void perror_msg_and_die(const char *s, ...)
va_start(p, s);
/* Guard against "<error message>: Success" */
- verror_msg(s, p, errno ? strerror(errno) : NULL);
+ verror_msg_helper(s, p, errno ? strerror(errno) : NULL, (logmode | LOGMODE_CUSTOM));
va_end(p);
xfunc_die();
}
@@ -106,7 +114,7 @@ void perror_msg(const char *s, ...)
va_start(p, s);
/* Guard against "<error message>: Success" */
- verror_msg(s, p, errno ? strerror(errno) : NULL);
+ verror_msg_helper(s, p, errno ? strerror(errno) : NULL, (logmode | LOGMODE_CUSTOM));
va_end(p);
}
@@ -122,5 +130,5 @@ void simple_perror_msg(const char *s)
void die_out_of_memory(void)
{
- error_msg_and_die("Out of memory, exiting");
+ error_msg_and_die("Out of memory, exiting");
}
diff --git a/lib/Utils/make_descr.cpp b/lib/Utils/make_descr.cpp
new file mode 100644
index 00000000..1352149e
--- /dev/null
+++ b/lib/Utils/make_descr.cpp
@@ -0,0 +1,133 @@
+#include "abrtlib.h"
+//#include "abrt_types.h"
+#include "CrashTypes.h"
+#include "DebugDump.h" /* FILENAME_ARCHITECTURE etc */
+
+using namespace std;
+
+static void add_content(bool &was_multiline, string& description, const char *header, const char *content)
+{
+ /* We separate multiline contents with emply line */
+ if (was_multiline)
+ description += '\n';
+
+ while (content[0] == '\n')
+ content++;
+
+ if (strchr(content, '\n') == NULL)
+ {
+ if (skip_whitespace(content)[0] == '\0')
+ {
+ /* empty, dont report at all */
+ return;
+ }
+ /* one string value, like OS release */
+ description += header;
+ description += ": ";
+ description += content;
+ description += '\n';
+ was_multiline = 0;
+ }
+ else
+ {
+ /* multi-string value, like backtrace */
+ if (!was_multiline && description.size() != 0) /* if wasn't yet separated */
+ description += '\n'; /* do it now */
+ description += header;
+ description += "\n-----\n";
+ description += content;
+ if (content[strlen(content) - 1] != '\n')
+ description += '\n';
+ was_multiline = 1;
+ }
+}
+
+string make_description_bz(const map_crash_report_t& pCrashReport)
+{
+ string description;
+
+ map_crash_report_t::const_iterator it;
+ map_crash_report_t::const_iterator end = pCrashReport.end();
+
+ bool was_multiline = 0;
+ it = pCrashReport.find(CD_REPRODUCE);
+ if (it != end && it->second[CD_CONTENT] != "1.\n2.\n3.\n")
+ {
+ add_content(was_multiline, description, "How to reproduce", it->second[CD_CONTENT].c_str());
+ }
+
+ it = pCrashReport.find(CD_COMMENT);
+ if (it != end)
+ {
+ add_content(was_multiline, description, "Comment", it->second[CD_CONTENT].c_str());
+ }
+
+ it = pCrashReport.begin();
+ for (; it != end; it++)
+ {
+ const string &filename = it->first;
+ const string &type = it->second[CD_TYPE];
+ const string &content = it->second[CD_CONTENT];
+ if (type == CD_TXT)
+ {
+ if (filename != CD_UUID
+ && filename != FILENAME_ARCHITECTURE
+ && filename != FILENAME_RELEASE
+ && filename != CD_REPRODUCE
+ && filename != CD_COMMENT
+ ) {
+ add_content(was_multiline, description, filename.c_str(), content.c_str());
+ }
+ }
+ else if (type == CD_ATT)
+ {
+ add_content(was_multiline, description, "Attached file", filename.c_str());
+ }
+ }
+
+ return description;
+}
+
+string make_description_logger(const map_crash_report_t& pCrashReport)
+{
+ string description;
+ string long_description;
+
+ map_crash_report_t::const_iterator it = pCrashReport.begin();
+ for (; it != pCrashReport.end(); it++)
+ {
+ const string &filename = it->first;
+ const string &type = it->second[CD_TYPE];
+ const string &content = it->second[CD_CONTENT];
+ if (type == CD_TXT
+ || type == CD_ATT
+ || type == CD_BIN
+ ) {
+ if (content == "1.\n2.\n3.\n")
+ continue; /* user did not change default "How to reproduce" */
+
+ bool was_multiline = 0;
+ string tmp;
+ add_content(was_multiline, tmp, filename.c_str(), content.c_str());
+
+ if (was_multiline)
+ {
+ if (long_description.size() != 0)
+ long_description += '\n';
+ long_description += tmp;
+ }
+ else
+ {
+ description += tmp;
+ }
+ }
+ }
+
+ if (description.size() != 0 && long_description.size() != 0)
+ {
+ description += '\n';
+ description += long_description;
+ }
+
+ return description;
+}
diff --git a/lib/Utils/skip_whitespace.cpp b/lib/Utils/skip_whitespace.cpp
new file mode 100644
index 00000000..816928bf
--- /dev/null
+++ b/lib/Utils/skip_whitespace.cpp
@@ -0,0 +1,22 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
+ *
+ * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
+ */
+#include "abrtlib.h"
+
+char* skip_whitespace(const char *s)
+{
+ /* NB: isspace('\0') returns 0 */
+ while (isspace(*s)) ++s;
+
+ return (char *) s;
+}
+
+char* skip_non_whitespace(const char *s)
+{
+ while (*s && !isspace(*s)) ++s;
+
+ return (char *) s;
+}
diff --git a/lib/Utils/time.cpp b/lib/Utils/time.cpp
new file mode 100644
index 00000000..37ade2cc
--- /dev/null
+++ b/lib/Utils/time.cpp
@@ -0,0 +1,65 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Utility routines.
+ *
+ * Licensed under GPL version 2, see file LICENSE in this tarball for details.
+ */
+#include "abrtlib.h"
+
+#define ENABLE_MONOTONIC_SYSCALL 1
+
+#if ENABLE_MONOTONIC_SYSCALL
+
+#include <sys/syscall.h>
+/* Old glibc (< 2.3.4) does not provide this constant. We use syscall
+ * directly so this definition is safe. */
+#ifndef CLOCK_MONOTONIC
+#define CLOCK_MONOTONIC 1
+#endif
+
+/* libc has incredibly messy way of doing this,
+ * typically requiring -lrt. We just skip all this mess */
+static void get_mono(struct timespec *ts)
+{
+ if (syscall(__NR_clock_gettime, CLOCK_MONOTONIC, ts))
+ error_msg_and_die("clock_gettime(MONOTONIC) failed");
+}
+unsigned long long monotonic_ns(void)
+{
+ struct timespec ts;
+ get_mono(&ts);
+ return ts.tv_sec * 1000000000ULL + ts.tv_nsec;
+}
+unsigned long long monotonic_us(void)
+{
+ struct timespec ts;
+ get_mono(&ts);
+ return ts.tv_sec * 1000000ULL + ts.tv_nsec/1000;
+}
+unsigned monotonic_sec(void)
+{
+ struct timespec ts;
+ get_mono(&ts);
+ return ts.tv_sec;
+}
+
+#else
+
+unsigned long long monotonic_ns(void)
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000;
+}
+unsigned long long monotonic_us(void)
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return tv.tv_sec * 1000000ULL + tv.tv_usec;
+}
+unsigned monotonic_sec(void)
+{
+ return time(NULL);
+}
+
+#endif
diff --git a/lib/Utils/xconnect.cpp b/lib/Utils/xconnect.cpp
new file mode 100644
index 00000000..746edd63
--- /dev/null
+++ b/lib/Utils/xconnect.cpp
@@ -0,0 +1,416 @@
+/* vi: set sw=4 ts=4: */
+/*
+ * Utility routines.
+ *
+ * Connect to host at port using address resolution from getaddrinfo
+ *
+ * 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>
+#include <net/if.h>
+#include <sys/un.h>
+#include <netdb.h>
+
+#define ENABLE_FEATURE_IPV6 1
+#define ENABLE_FEATURE_PREFER_IPV4_ADDRESS 1
+
+static const int const_int_1 = 1;
+
+void setsockopt_reuseaddr(int fd)
+{
+ setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &const_int_1, sizeof(const_int_1));
+}
+int setsockopt_broadcast(int fd)
+{
+ return setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &const_int_1, sizeof(const_int_1));
+}
+int setsockopt_bindtodevice(int fd, const char *iface)
+{
+ int r;
+ struct ifreq ifr;
+ strncpy(ifr.ifr_name, iface, IFNAMSIZ);
+ /* NB: passing (iface, strlen(iface) + 1) does not work!
+ * (maybe it works on _some_ kernels, but not on 2.6.26)
+ * Actually, ifr_name is at offset 0, and in practice
+ * just giving char[IFNAMSIZ] instead of struct ifreq works too.
+ * But just in case it's not true on some obscure arch... */
+ r = setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, &ifr, sizeof(ifr));
+ if (r)
+ perror_msg("can't bind to interface %s", iface);
+ return r;
+}
+
+len_and_sockaddr* get_sock_lsa(int fd)
+{
+ len_and_sockaddr lsa;
+ len_and_sockaddr *lsa_ptr;
+
+ lsa.len = LSA_SIZEOF_SA;
+ if (getsockname(fd, &lsa.u.sa, &lsa.len) != 0)
+ return NULL;
+
+ lsa_ptr = (len_and_sockaddr *)xzalloc(LSA_LEN_SIZE + lsa.len);
+ if (lsa.len > LSA_SIZEOF_SA) { /* rarely (if ever) happens */
+ lsa_ptr->len = lsa.len;
+ getsockname(fd, &lsa_ptr->u.sa, &lsa_ptr->len);
+ } else {
+ memcpy(lsa_ptr, &lsa, LSA_LEN_SIZE + lsa.len);
+ }
+ return lsa_ptr;
+}
+
+void xconnect(int s, const struct sockaddr *s_addr, socklen_t addrlen)
+{
+ if (connect(s, s_addr, addrlen) < 0) {
+ close(s);
+ if (s_addr->sa_family == AF_INET)
+ perror_msg_and_die("%s (%s)",
+ "cannot connect to remote host",
+ inet_ntoa(((struct sockaddr_in *)s_addr)->sin_addr));
+ perror_msg_and_die("cannot connect to remote host");
+ }
+}
+
+/* Return port number for a service.
+ * If "port" is a number use it as the port.
+ * If "port" is a name it is looked up in /etc/services,
+ * if it isnt found return default_port
+ */
+unsigned lookup_port(const char *port, const char *protocol, unsigned default_port)
+{
+ unsigned port_nr = default_port;
+ if (port) {
+ int old_errno;
+ char *end;
+
+ /* Since this is a lib function, we're not allowed to reset errno to 0.
+ * Doing so could break an app that is deferring checking of errno. */
+ old_errno = errno;
+ errno = 0;
+ port_nr = strtoul(port, &end, 10);
+ if (errno || *end || port_nr > 65535) {
+ struct servent *tserv = getservbyname(port, protocol);
+ port_nr = default_port;
+ if (tserv)
+ port_nr = ntohs(tserv->s_port);
+ }
+ errno = old_errno;
+ }
+ return (uint16_t)port_nr;
+}
+
+int get_nport(const struct sockaddr *sa)
+{
+#if ENABLE_FEATURE_IPV6
+ if (sa->sa_family == AF_INET6) {
+ return ((struct sockaddr_in6*)sa)->sin6_port;
+ }
+#endif
+ if (sa->sa_family == AF_INET) {
+ return ((struct sockaddr_in*)sa)->sin_port;
+ }
+ /* What? UNIX socket? IPX?? :) */
+ return -1;
+}
+
+void set_nport(len_and_sockaddr *lsa, unsigned port)
+{
+#if ENABLE_FEATURE_IPV6
+ if (lsa->u.sa.sa_family == AF_INET6) {
+ lsa->u.sin6.sin6_port = port;
+ return;
+ }
+#endif
+ if (lsa->u.sa.sa_family == AF_INET) {
+ lsa->u.sin.sin_port = port;
+ return;
+ }
+ /* What? UNIX socket? IPX?? :) */
+}
+
+/* We hijack this constant to mean something else */
+/* It doesn't hurt because we will remove this bit anyway */
+#define DIE_ON_ERROR AI_CANONNAME
+
+/* host: "1.2.3.4[:port]", "www.google.com[:port]"
+ * port: if neither of above specifies port # */
+static len_and_sockaddr* str2sockaddr(
+ const char *host, int port,
+ sa_family_t af,
+ int ai_flags)
+{
+ int rc;
+ len_and_sockaddr *r;
+ struct addrinfo *result = NULL;
+ struct addrinfo *used_res;
+ const char *org_host = host; /* only for error msg */
+ const char *cp;
+ struct addrinfo hint;
+
+ r = NULL;
+
+ /* Ugly parsing of host:addr */
+ if (ENABLE_FEATURE_IPV6 && host[0] == '[') {
+ /* Even uglier parsing of [xx]:nn */
+ host++;
+ cp = strchr(host, ']');
+ if (!cp || (cp[1] != ':' && cp[1] != '\0')) {
+ /* Malformed: must be [xx]:nn or [xx] */
+ error_msg("bad address '%s'", org_host);
+ if (ai_flags & DIE_ON_ERROR)
+ xfunc_die();
+ return NULL;
+ }
+ } else {
+ cp = strrchr(host, ':');
+ if (ENABLE_FEATURE_IPV6 && cp && strchr(host, ':') != cp) {
+ /* There is more than one ':' (e.g. "::1") */
+ cp = NULL; /* it's not a port spec */
+ }
+ }
+ if (cp) { /* points to ":" or "]:" */
+ int sz = cp - host + 1;
+ char *hbuf = (char*)alloca(sz);
+ hbuf[--sz] = '\0';
+ host = strncpy(hbuf, host, sz);
+ if (ENABLE_FEATURE_IPV6 && *cp != ':') {
+ cp++; /* skip ']' */
+ if (*cp == '\0') /* [xx] without port */
+ goto skip;
+ }
+ cp++; /* skip ':' */
+ char *end;
+ errno = 0;
+ port = strtoul(cp, &end, 10);
+ if (errno || *end || (unsigned)port > 0xffff) {
+ error_msg("bad port spec '%s'", org_host);
+ if (ai_flags & DIE_ON_ERROR)
+ xfunc_die();
+ return NULL;
+ }
+ skip: ;
+ }
+
+ memset(&hint, 0 , sizeof(hint));
+#if !ENABLE_FEATURE_IPV6
+ hint.ai_family = AF_INET; /* do not try to find IPv6 */
+#else
+ hint.ai_family = af;
+#endif
+ /* Needed. Or else we will get each address thrice (or more)
+ * for each possible socket type (tcp,udp,raw...): */
+ hint.ai_socktype = SOCK_STREAM;
+ hint.ai_flags = ai_flags & ~DIE_ON_ERROR;
+ rc = getaddrinfo(host, NULL, &hint, &result);
+ if (rc || !result) {
+ error_msg("bad address '%s'", org_host);
+ if (ai_flags & DIE_ON_ERROR)
+ xfunc_die();
+ goto ret;
+ }
+ used_res = result;
+#if ENABLE_FEATURE_PREFER_IPV4_ADDRESS
+ while (1) {
+ if (used_res->ai_family == AF_INET)
+ break;
+ used_res = used_res->ai_next;
+ if (!used_res) {
+ used_res = result;
+ break;
+ }
+ }
+#endif
+ r = (len_and_sockaddr *)xmalloc(offsetof(len_and_sockaddr, u.sa) + used_res->ai_addrlen);
+ r->len = used_res->ai_addrlen;
+ memcpy(&r->u.sa, used_res->ai_addr, used_res->ai_addrlen);
+ set_nport(r, htons(port));
+ ret:
+ freeaddrinfo(result);
+ return r;
+}
+#if !ENABLE_FEATURE_IPV6
+#define str2sockaddr(host, port, af, ai_flags) str2sockaddr(host, port, ai_flags)
+#endif
+
+#if ENABLE_FEATURE_IPV6
+len_and_sockaddr* host_and_af2sockaddr(const char *host, int port, sa_family_t af)
+{
+ return str2sockaddr(host, port, af, 0);
+}
+
+len_and_sockaddr* xhost_and_af2sockaddr(const char *host, int port, sa_family_t af)
+{
+ return str2sockaddr(host, port, af, DIE_ON_ERROR);
+}
+#endif
+
+len_and_sockaddr* host2sockaddr(const char *host, int port)
+{
+ return str2sockaddr(host, port, AF_UNSPEC, 0);
+}
+
+len_and_sockaddr* xhost2sockaddr(const char *host, int port)
+{
+ return str2sockaddr(host, port, AF_UNSPEC, DIE_ON_ERROR);
+}
+
+len_and_sockaddr* xdotted2sockaddr(const char *host, int port)
+{
+ return str2sockaddr(host, port, AF_UNSPEC, AI_NUMERICHOST | DIE_ON_ERROR);
+}
+
+#undef xsocket_type
+int xsocket_type(len_and_sockaddr **lsap, int family, int sock_type)
+{
+ len_and_sockaddr *lsa;
+ int fd;
+ int len;
+
+#if ENABLE_FEATURE_IPV6
+ if (family == AF_UNSPEC) {
+ fd = socket(AF_INET6, sock_type, 0);
+ if (fd >= 0) {
+ family = AF_INET6;
+ goto done;
+ }
+ family = AF_INET;
+ }
+#endif
+ fd = xsocket(family, sock_type, 0);
+ len = sizeof(struct sockaddr_in);
+#if ENABLE_FEATURE_IPV6
+ if (family == AF_INET6) {
+ done:
+ len = sizeof(struct sockaddr_in6);
+ }
+#endif
+ lsa = (len_and_sockaddr *)xzalloc(offsetof(len_and_sockaddr, u.sa) + len);
+ lsa->len = len;
+ lsa->u.sa.sa_family = family;
+ *lsap = lsa;
+ return fd;
+}
+
+int xsocket_stream(len_and_sockaddr **lsap)
+{
+ return xsocket_type(lsap, AF_UNSPEC, SOCK_STREAM);
+}
+
+static int create_and_bind_or_die(const char *bindaddr, int port, int sock_type)
+{
+ int fd;
+ len_and_sockaddr *lsa;
+
+ if (bindaddr && bindaddr[0]) {
+ lsa = xdotted2sockaddr(bindaddr, port);
+ /* user specified bind addr dictates family */
+ fd = xsocket(lsa->u.sa.sa_family, sock_type, 0);
+ } else {
+ fd = xsocket_type(&lsa, AF_UNSPEC, sock_type);
+ set_nport(lsa, htons(port));
+ }
+ setsockopt_reuseaddr(fd);
+ xbind(fd, &lsa->u.sa, lsa->len);
+ free(lsa);
+ return fd;
+}
+
+int create_and_bind_stream_or_die(const char *bindaddr, int port)
+{
+ return create_and_bind_or_die(bindaddr, port, SOCK_STREAM);
+}
+
+int create_and_bind_dgram_or_die(const char *bindaddr, int port)
+{
+ return create_and_bind_or_die(bindaddr, port, SOCK_DGRAM);
+}
+
+
+int create_and_connect_stream_or_die(const char *peer, int port)
+{
+ int fd;
+ len_and_sockaddr *lsa;
+
+ lsa = xhost2sockaddr(peer, port);
+ fd = xsocket(lsa->u.sa.sa_family, SOCK_STREAM, 0);
+ setsockopt_reuseaddr(fd);
+ xconnect(fd, &lsa->u.sa, lsa->len);
+ free(lsa);
+ return fd;
+}
+
+int xconnect_stream(const len_and_sockaddr *lsa)
+{
+ int fd = xsocket(lsa->u.sa.sa_family, SOCK_STREAM, 0);
+ xconnect(fd, &lsa->u.sa, lsa->len);
+ return fd;
+}
+
+/* We hijack this constant to mean something else */
+/* It doesn't hurt because we will add this bit anyway */
+#define IGNORE_PORT NI_NUMERICSERV
+static char* sockaddr2str(const struct sockaddr *sa, int flags)
+{
+ char host[128];
+ char serv[16];
+ int rc;
+ socklen_t salen;
+
+ salen = LSA_SIZEOF_SA;
+#if ENABLE_FEATURE_IPV6
+ if (sa->sa_family == AF_INET)
+ salen = sizeof(struct sockaddr_in);
+ if (sa->sa_family == AF_INET6)
+ salen = sizeof(struct sockaddr_in6);
+#endif
+ rc = getnameinfo(sa, salen,
+ host, sizeof(host),
+ /* can do ((flags & IGNORE_PORT) ? NULL : serv) but why bother? */
+ serv, sizeof(serv),
+ /* do not resolve port# into service _name_ */
+ flags | NI_NUMERICSERV
+ );
+ if (rc)
+ return NULL;
+ if (flags & IGNORE_PORT)
+ return xstrdup(host);
+#if ENABLE_FEATURE_IPV6
+ if (sa->sa_family == AF_INET6) {
+ if (strchr(host, ':')) /* heh, it's not a resolved hostname */
+ return xasprintf("[%s]:%s", host, serv);
+ /*return xasprintf("%s:%s", host, serv);*/
+ /* - fall through instead */
+ }
+#endif
+ /* For now we don't support anything else, so it has to be INET */
+ /*if (sa->sa_family == AF_INET)*/
+ return xasprintf("%s:%s", host, serv);
+ /*return xstrdup(host);*/
+}
+
+char* xmalloc_sockaddr2host(const struct sockaddr *sa)
+{
+ return sockaddr2str(sa, 0);
+}
+
+char* xmalloc_sockaddr2host_noport(const struct sockaddr *sa)
+{
+ return sockaddr2str(sa, IGNORE_PORT);
+}
+
+char* xmalloc_sockaddr2hostonly_noport(const struct sockaddr *sa)
+{
+ return sockaddr2str(sa, NI_NAMEREQD | IGNORE_PORT);
+}
+char* xmalloc_sockaddr2dotted(const struct sockaddr *sa)
+{
+ return sockaddr2str(sa, NI_NUMERICHOST);
+}
+
+char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa)
+{
+ return sockaddr2str(sa, NI_NUMERICHOST | IGNORE_PORT);
+}
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp
index d256c195..97c2f763 100644
--- a/lib/Utils/xfuncs.cpp
+++ b/lib/Utils/xfuncs.cpp
@@ -5,6 +5,22 @@
*/
#include "abrtlib.h"
+/* Turn on nonblocking I/O on a fd */
+int ndelay_on(int fd)
+{
+ return fcntl(fd, F_SETFL, fcntl(fd,F_GETFL) | O_NONBLOCK);
+}
+
+int ndelay_off(int fd)
+{
+ return fcntl(fd, F_SETFL, fcntl(fd,F_GETFL) & ~O_NONBLOCK);
+}
+
+int close_on_exec_on(int fd)
+{
+ return fcntl(fd, F_SETFD, FD_CLOEXEC);
+}
+
// Die if we can't allocate size bytes of memory.
void* xmalloc(size_t size)
{
@@ -305,3 +321,50 @@ int is_regular_file(struct dirent *dent, const char *dirname)
return r == 0 && S_ISREG(statbuf.st_mode);
}
+
+/* Is it "." or ".."? */
+/* abrtlib candidate */
+bool dot_or_dotdot(const char *filename)
+{
+ if (filename[0] != '.') return false;
+ if (filename[1] == '\0') return true;
+ if (filename[1] != '.') return false;
+ if (filename[2] == '\0') return true;
+ return false;
+}
+
+/* Find out if the last character of a string matches the one given.
+ * Don't underrun the buffer if the string length is 0.
+ */
+char *last_char_is(const char *s, int c)
+{
+ if (s && *s) {
+ s += strlen(s) - 1;
+ if ((unsigned char)*s == c)
+ return (char*)s;
+ }
+ return NULL;
+}
+
+std::string concat_path_file(const char *path, const char *filename)
+{
+ char *lc;
+
+ while (*filename == '/')
+ filename++;
+ lc = last_char_is(path, '/');
+ return ssprintf("%s%s%s", path, (lc==NULL ? "/" : ""), filename);
+}
+
+bool string_to_bool(const char *s)
+{
+ if (s[0] == '1' && s[1] == '\0')
+ return true;
+ if (strcasecmp(s, "on") == 0)
+ return true;
+ if (strcasecmp(s, "yes") == 0)
+ return true;
+ if (strcasecmp(s, "true") == 0)
+ return true;
+ return false;
+}
diff --git a/po/ast.po b/po/ast.po
new file mode 100644
index 00000000..e6e4d7b1
--- /dev/null
+++ b/po/ast.po
@@ -0,0 +1,551 @@
+# translation of abrt.master.ast.po to Asturian
+# Astur <malditoastur@gmail.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: abrt.master.ast\n"
+"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
+"POT-Creation-Date: 2009-10-24 09:37+0000\n"
+"PO-Revision-Date: 2009-10-24 21:43+0100\n"
+"Last-Translator: Marcos Alvarez Costales <marcos.alvarez.costales@gmail.com>\n"
+"Language-Team: Asturian <alministradores@softastur.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Asturian\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: ../src/Gui/ABRTExceptions.py:6
+msgid "Another client is already running, trying to wake it."
+msgstr "Otru veceru yá ta executándose, intentando llevantalu."
+
+#: ../src/Gui/ABRTExceptions.py:13
+msgid "Got unexpected data from daemon (is the database properly updated?)."
+msgstr "Algamáronse datos inesperaos dende'l degorriu (¿ta la Base de Datos correutamente anovada?)"
+
+#: ../src/Gui/ABRTPlugin.py:55
+msgid "Analyzer plugins"
+msgstr "Complementos analizadores"
+
+#: ../src/Gui/ABRTPlugin.py:56
+msgid "Action plugins"
+msgstr "Complementos d'aición"
+
+#: ../src/Gui/ABRTPlugin.py:57
+msgid "Reporter plugins"
+msgstr "Complementos d'informes"
+
+#: ../src/Gui/ABRTPlugin.py:58
+msgid "Database plugins"
+msgstr "Complementos de Bases de Datos"
+
+#: ../src/Gui/ABRTPlugin.py:97
+msgid "Plugin name is not set, can't load it's settings"
+msgstr "Nun ta puestu'l nome del complementu, nun pudo cargase la configuración"
+
+#: ../src/Gui/CCDBusBackend.py:74
+#: ../src/Gui/CCDBusBackend.py:97
+msgid "Can't connect to system dbus"
+msgstr "Nun ye dable coneutase con system dbus"
+
+#: ../src/Gui/CCDBusBackend.py:100
+#: ../src/Gui/CCDBusBackend.py:103
+msgid "Please check if abrt daemon is running"
+msgstr "Por favor, compreba si'l degorriu abrt ta executándose"
+
+#: ../src/Gui/CCDBusBackend.py:155
+msgid ""
+"Daemon did't return valid report info\n"
+"Debuginfo is missing?"
+msgstr ""
+"El degorriu nun devuelve un informe válidu\n"
+"¿Falta la información de la depuración?"
+
+#: ../src/Gui/ccgui.glade.h:1
+msgid " "
+msgstr " "
+
+#: ../src/Gui/ccgui.glade.h:2
+msgid "(C) 2009 Red Hat, Inc."
+msgstr "(C) 2009 Red Hat, Inc."
+
+#: ../src/Gui/ccgui.glade.h:3
+#: ../src/Gui/CCMainWindow.py:244
+msgid "<b>Not reported!</b>"
+msgstr "<b>¡Non informáu!</b>"
+
+#: ../src/Gui/ccgui.glade.h:4
+msgid "<span color=\"white\">Description</span>"
+msgstr "<span color=\"white\">Descripción</span>"
+
+#: ../src/Gui/ccgui.glade.h:5
+msgid "About ABRT"
+msgstr "Tocante a ABRT"
+
+#: ../src/Gui/ccgui.glade.h:6
+msgid "Automatic Bug Reporting Tool"
+msgstr "Ferramienta d'Informe de Fallos Automática"
+
+#: ../src/Gui/ccgui.glade.h:7
+msgid "Delete"
+msgstr "Desaniciar"
+
+#: ../src/Gui/ccgui.glade.h:8
+msgid "Please wait.."
+msgstr "Por favor, espera..."
+
+#: ../src/Gui/ccgui.glade.h:9
+msgid "Plugins"
+msgstr "Complementos"
+
+#: ../src/Gui/ccgui.glade.h:10
+#: ../src/Gui/report.glade.h:2
+msgid "Report"
+msgstr "Informe"
+
+#: ../src/Gui/ccgui.glade.h:11
+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 Software Foundation; either version 2 of the License, or (at your option) any later version.\n"
+"\n"
+"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.\n"
+"\n"
+"You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>."
+msgstr ""
+"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.\n"
+"\n"
+"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.\n"
+"\n"
+"You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>."
+
+#: ../src/Gui/ccgui.glade.h:16
+msgid "Working..."
+msgstr "Trabayando..."
+
+#: ../src/Gui/ccgui.glade.h:17
+msgid "_Edit"
+msgstr "_Editar"
+
+#: ../src/Gui/ccgui.glade.h:18
+msgid "_File"
+msgstr "_Ficheru"
+
+#: ../src/Gui/ccgui.glade.h:19
+msgid "_Help"
+msgstr "Ai_da"
+
+# Revisar si hay que traducir.
+# Ver como referencia los botones gtk que no habia que traducirlos
+#. add pixbuff separatelly
+#: ../src/Gui/CCMainWindow.py:80
+msgid "Icon"
+msgstr "Iconu"
+
+#: ../src/Gui/CCMainWindow.py:88
+msgid "Package"
+msgstr "Paquete"
+
+#: ../src/Gui/CCMainWindow.py:89
+msgid "Application"
+msgstr "Aplicación"
+
+#: ../src/Gui/CCMainWindow.py:90
+msgid "Date"
+msgstr "Data"
+
+#: ../src/Gui/CCMainWindow.py:91
+msgid "Crash Rate"
+msgstr "Tasa de cayíes"
+
+#: ../src/Gui/CCMainWindow.py:93
+msgid "User"
+msgstr "Usuariu"
+
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Nun pudo amosase'l diálogu de configuración\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
+#, python-format
+msgid ""
+"Unable to finish current task!\n"
+"%s"
+msgstr ""
+"¡Nun pudo finase la xera actual!\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:198
+#, python-format
+msgid ""
+"Error while loading the dumplist, please check if abrt daemon is running\n"
+" %s"
+msgstr ""
+"Fallu intentando cargar la llista de volcáu, por favor compreba si'l degorriu abrt ta executándose\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:208
+#, python-format
+msgid "Can't get username for uid %s"
+msgstr "Nun pudo algamase'l nome d'usuariu pal uid %s"
+
+#: ../src/Gui/CCMainWindow.py:236
+msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
+msgstr "<b>Esta cayía yá se reportó, puedes alcontrar l'informe en:</b>\n"
+
+#: ../src/Gui/CCMainWindow.py:296
+msgid ""
+"Unable to get report!\n"
+"Debuginfo is missing?"
+msgstr ""
+"Nun foi dable algamar l'informe!\n"
+"¿Falta la información de la depuración?"
+
+#: ../src/Gui/CCMainWindow.py:314
+#, python-format
+msgid ""
+"Reporting failed!\n"
+"%s"
+msgstr ""
+"¡L'informe falló!\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:333
+#: ../src/Gui/CCMainWindow.py:360
+#, python-format
+msgid "Error getting the report: %s"
+msgstr "Fallu al algamar l'informe: %s"
+
+#: ../src/Gui/CCReporterDialog.py:167
+msgid "Brief description how to reproduce this or what you did..."
+msgstr "Breve descripción de cómo reproducir esto o lo que ficisti..."
+
+#: ../src/Gui/CCReporterDialog.py:211
+#, python-format
+msgid ""
+"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
+"Do you really want to send <b>%s</b>?\n"
+msgstr ""
+"<b>ALVERTENCIA</b>, ¡tas por unviar datos que pueden caltener información sensible!\n"
+"¿De xuru que quies unviar <b>%s</b>?\n"
+
+#: ../src/Gui/dialogs.glade.h:1
+msgid "Report done"
+msgstr "Informe fináu"
+
+# NO TRADUCIR, hacen referencia al boton gkt
+#: ../src/Gui/dialogs.glade.h:2
+#: ../src/Gui/settings.glade.h:27
+msgid "gtk-ok"
+msgstr "gtk-ok"
+
+#: ../src/Gui/PluginSettingsUI.py:18
+msgid "Can't find PluginDialog widget in UI description!"
+msgstr "Nun s'alcuentra'l control visual de PluginDialog na descripción de la interface del usuariu."
+
+#. we shouldn't get here, but just to be safe
+#: ../src/Gui/PluginSettingsUI.py:24
+#, python-format
+msgid "No UI for plugin %s"
+msgstr "Nun hai interface del usuariu pal complementu %s"
+
+#: ../src/Gui/PluginSettingsUI.py:55
+#: ../src/Gui/PluginSettingsUI.py:81
+msgid "combo box is not implemented"
+msgstr "La llista estenderexable nun ta fecha"
+
+#: ../src/Gui/PluginSettingsUI.py:64
+msgid "Nothing to hydrate!"
+msgstr "¡Res pa hidratar!"
+
+#: ../src/Gui/report.glade.h:1
+msgid "Comment"
+msgstr "Comentariu"
+
+#: ../src/Gui/report.glade.h:3
+msgid "Send"
+msgstr "Unviar"
+
+# NO TRADUCIR, hacen referencia al boton gkt
+#: ../src/Gui/report.glade.h:4
+#: ../src/Gui/settings.glade.h:25
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
+
+# NO TRADUCIR, hacen referencia al boton gkt
+#: ../src/Gui/report.glade.h:5
+msgid "gtk-refresh"
+msgstr "gtk-refresh"
+
+#: ../src/Gui/SettingsDialog.py:33
+#: ../src/Gui/SettingsDialog.py:50
+msgid "<b>Select plugin</b>"
+msgstr "<b>Seleiciona un complementu</b>"
+
+#: ../src/Gui/SettingsDialog.py:36
+msgid "<b>Select database backend</b>"
+msgstr "<b>Seleiciona la base de datos de fondu</b>"
+
+#: ../src/Gui/SettingsDialog.py:165
+msgid "Remove this job"
+msgstr "Desaniciar esti trabayu"
+
+#: ../src/Gui/SettingsDialog.py:208
+msgid "Remove this action"
+msgstr "Desaniciar esta aición"
+
+#: ../src/Gui/settings.glade.h:1
+msgid "<b>Analyzer plugin</b>"
+msgstr "<b>Complementos analizadores</b>"
+
+#: ../src/Gui/settings.glade.h:2
+msgid "<b>Associated action</b>"
+msgstr "<b>Aición asociada</b>"
+
+#: ../src/Gui/settings.glade.h:3
+msgid "<b>Plugin</b>"
+msgstr "<b>Complementu</b>"
+
+#: ../src/Gui/settings.glade.h:4
+msgid "<b>Time (or period)</b>"
+msgstr "<b>Tiempu (o periodu)</b>"
+
+#: ../src/Gui/settings.glade.h:5
+msgid "Analyzers, Actions, Reporters"
+msgstr "Analizadores, Aiciones, Informadores"
+
+#: ../src/Gui/settings.glade.h:6
+msgid "Author:"
+msgstr "Autor:"
+
+#: ../src/Gui/settings.glade.h:7
+msgid "Blacklisted packages: "
+msgstr "Paquetes na Blacklist"
+
+#: ../src/Gui/settings.glade.h:8
+msgid "C_onfigure plugin"
+msgstr "C_onfigurar Complementu"
+
+#: ../src/Gui/settings.glade.h:9
+msgid "Check package GPG signature"
+msgstr "Compreba la robla GPG del paquete"
+
+#: ../src/Gui/settings.glade.h:10
+msgid "Common"
+msgstr "Común"
+
+#: ../src/Gui/settings.glade.h:11
+msgid "Cron"
+msgstr "Cron"
+
+#: ../src/Gui/settings.glade.h:12
+msgid "Database backend: "
+msgstr "Backend de la Base de Datos"
+
+#: ../src/Gui/settings.glade.h:13
+msgid "Edit blacklisted packages"
+msgstr "Edita los paquetes de la Blacklist"
+
+#: ../src/Gui/settings.glade.h:14
+msgid "GPG Keys"
+msgstr "Llaves GPG"
+
+#: ../src/Gui/settings.glade.h:15
+msgid "GPG keys: "
+msgstr "Llaves GPG:"
+
+#: ../src/Gui/settings.glade.h:16
+msgid "Global Settings"
+msgstr "Preferencies globales"
+
+#: ../src/Gui/settings.glade.h:17
+msgid "Max coredump storage size(MB):"
+msgstr "Capacidá másima d'almacenamientu del volcáu del núcleu (MB):"
+
+#: ../src/Gui/settings.glade.h:18
+msgid "Nothing selected"
+msgstr "Na esbillao"
+
+#: ../src/Gui/settings.glade.h:19
+msgid "Plugin Details"
+msgstr "Detalles de Complementu"
+
+#: ../src/Gui/settings.glade.h:20
+msgid "Settings"
+msgstr "Preferencies"
+
+#: ../src/Gui/settings.glade.h:21
+msgid "This function is not implemented yet!"
+msgstr "¡Esta función entá nun ta implementada!"
+
+#: ../src/Gui/settings.glade.h:22
+msgid "Version:"
+msgstr "Versión:"
+
+#: ../src/Gui/settings.glade.h:23
+msgid "Web Site:"
+msgstr "Páxina Web:"
+
+# NO TRADUCIR, hacen referencia al boton gkt
+#: ../src/Gui/settings.glade.h:24
+msgid "gtk-add"
+msgstr "gtk-add"
+
+# NO TRADUCIR, hacen referencia al boton gkt
+#: ../src/Gui/settings.glade.h:26
+msgid "gtk-close"
+msgstr "gtk-close"
+
+# NO TRADUCIR, hacen referencia al boton gkt
+#: ../src/Gui/settings.glade.h:28
+msgid "gtk-remove"
+msgstr "gtk-remove"
+
+#: ../src/Applet/Applet.cpp:71
+#, c-format
+msgid "A crash in package %s has been detected"
+msgstr "Deteutóse una cayía nel paquete %s."
+
+#: ../src/Applet/Applet.cpp:130
+msgid "ABRT service has been started"
+msgstr "Executáu serviciu ABRT"
+
+#: ../src/Applet/Applet.cpp:132
+#: ../src/Applet/Applet.cpp:246
+msgid "ABRT service is not running"
+msgstr "El serviciu ABRT nun ta executándose"
+
+#: ../src/Applet/CCApplet.cpp:185
+msgid "Warning"
+msgstr "Avisu"
+
+#: ../src/Daemon/Daemon.cpp:542
+msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."
+msgstr "El tamañu del informe escede la cuota. Por favor, verifica'l valor de MaxCrashReportsSize del sistema n'abrt.conf."
+
+#: ../lib/Plugins/Bugzilla.cpp:83
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Usuariu y contraseña ermos. Por favor, compreba'l ficheru Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:205
+msgid "Bug is already reported: "
+msgstr "Yá s'informó d'esti fallu (bug):"
+
+#: ../lib/Plugins/Bugzilla.cpp:260
+#, c-format
+msgid "Binary file %s will not be reported."
+msgstr "Nun s'informará del ficheru binariu %s."
+
+#: ../lib/Plugins/Bugzilla.cpp:330
+msgid "New bug id: "
+msgstr "Nuevu id del fallu:"
+
+#: ../lib/Plugins/Bugzilla.cpp:399
+msgid "Checking for duplicates..."
+msgstr "Chequeando si hai duplicaos..."
+
+#: ../lib/Plugins/Bugzilla.cpp:402
+#: ../lib/Plugins/Bugzilla.cpp:413
+msgid "Logging into bugzilla..."
+msgstr "Entrando en bugzilla..."
+
+#: ../lib/Plugins/Bugzilla.cpp:405
+msgid "Checking CC..."
+msgstr "Chequeando CC..."
+
+#: ../lib/Plugins/Bugzilla.cpp:425
+msgid "Creating new bug..."
+msgstr "Criando un nuevu informe..."
+
+#: ../lib/Plugins/Bugzilla.cpp:430
+msgid "Logging out..."
+msgstr "Colando..."
+
+#: ../lib/Plugins/Kerneloops.cpp:37
+msgid "Getting local universal unique identification"
+msgstr "Algamando la identificación única universal llocal"
+
+#: ../lib/Plugins/CCpp.cpp:246
+msgid "Getting backtrace..."
+msgstr "Algamando'l backtrace..."
+
+#: ../lib/Plugins/CCpp.cpp:532
+#: ../lib/Plugins/CCpp.cpp:657
+msgid "Searching for debug-info packages..."
+msgstr "Guetando paquetes d'información del depurador..."
+
+#: ../lib/Plugins/CCpp.cpp:594
+#: ../lib/Plugins/CCpp.cpp:690
+msgid "Downloading and installing debug-info packages..."
+msgstr "Baxando ya instalando paquetes d'información del depurador..."
+
+#: ../lib/Plugins/CCpp.cpp:733
+msgid "Getting local universal unique identification..."
+msgstr "Algamando la identificación única universal llocal..."
+
+#: ../lib/Plugins/CCpp.cpp:752
+msgid "Getting global universal unique identification..."
+msgstr "Algamando la identificación única universal global..."
+
+#: ../lib/Plugins/CCpp.cpp:797
+msgid "Starting report creation..."
+msgstr "Aniciando la criación del informe..."
+
+#: ../lib/Plugins/CCpp.cpp:828
+msgid "Skipping debuginfo installation"
+msgstr "Omite la instalación de la información de depuración"
+
+#: ../lib/Plugins/KerneloopsReporter.cpp:101
+msgid "Creating and submitting a report..."
+msgstr "Criando y unviando un informe..."
+
+#: ../lib/Plugins/Logger.cpp:58
+#: ../lib/Plugins/Mailx.cpp:123
+msgid "Creating a report..."
+msgstr "Criando un informe..."
+
+#: ../lib/Plugins/RunApp.cpp:62
+msgid "Executing RunApp plugin..."
+msgstr "Executando complementu RunApp..."
+
+#: ../lib/Plugins/FileTransfer.cpp:63
+#: ../lib/Plugins/FileTransfer.cpp:409
+msgid "FileTransfer: URL not specified"
+msgstr "Tresferencia de ficheru: URL nun especificada"
+
+#: ../lib/Plugins/FileTransfer.cpp:81
+#, c-format
+msgid "Sending archive %s via %s"
+msgstr "Unviando ficheru %s vía %s"
+
+#: ../lib/Plugins/FileTransfer.cpp:336
+msgid "File Transfer: Creating a report..."
+msgstr "Tresferencia de ficheru: Criando un informe..."
+
+#: ../lib/Plugins/FileTransfer.cpp:358
+#: ../lib/Plugins/FileTransfer.cpp:386
+msgid "CFileTransfer::Run(): Cannot create and send an archive: "
+msgstr "CFileTransfer::Run(): nun pudo criase y unviase un ficheru: "
+
+#: ../lib/Plugins/KerneloopsScanner.cpp:79
+msgid "Creating kernel oops crash reports..."
+msgstr "Criando un informe de colingue de kernel oops..."
+
+#: ../lib/Plugins/Mailx.cpp:109
+msgid "Sending an email..."
+msgstr "Unviando un corréu..."
+
+#: ../lib/Plugins/SOSreport.cpp:113
+msgid "Executing SOSreport plugin..."
+msgstr "Executando complementu SOSreport..."
+
+#: ../lib/Plugins/SOSreport.cpp:135
+msgid "running sosreport: "
+msgstr "llanzando sosreport:"
+
+#: ../lib/Plugins/SOSreport.cpp:150
+msgid "done running sosreport"
+msgstr "Sosreport executándose"
+
diff --git a/po/da.po b/po/da.po
index f2f6aa20..4c15e22c 100644
--- a/po/da.po
+++ b/po/da.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-15 09:50+0000\n"
-"PO-Revision-Date: 2009-10-16 22:53+0200\n"
+"POT-Creation-Date: 2009-10-26 00:22+0000\n"
+"PO-Revision-Date: 2009-10-26 02:42+0100\n"
"Last-Translator: Kris Thomsen <lakristho@gmail.com>\n"
"Language-Team: Danish <dansk@dansk-gruppen.dk>\n"
"MIME-Version: 1.0\n"
@@ -23,25 +23,27 @@ msgstr "En anden klient kører allerede, prøver at vække den."
msgid "Got unexpected data from daemon (is the database properly updated?)."
msgstr "Modtog uventede data fra dæmon (er databasen opdateret rigtigt?)."
-#: ../src/Gui/ABRTPlugin.py:48
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "Analyseringsudvidelsesmoduler"
-#: ../src/Gui/ABRTPlugin.py:49
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "Handlingsudvidelsesmoduler"
-#: ../src/Gui/ABRTPlugin.py:50
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "Rapporteringsudvidelsesmoduler"
-#: ../src/Gui/ABRTPlugin.py:51
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "Databaseudvidelsesmoduler"
-#: ../src/Gui/ABRTPlugin.py:90
+#: ../src/Gui/ABRTPlugin.py:97
msgid "Plugin name is not set, can't load it's settings"
-msgstr "Navn for udvidelsesmodul er ikke indstillet, kan ikke indlæse dets indstillinger"
+msgstr ""
+"Navn for udvidelsesmodul er ikke indstillet, kan ikke indlæse dets "
+"indstillinger"
#: ../src/Gui/CCDBusBackend.py:74 ../src/Gui/CCDBusBackend.py:97
msgid "Can't connect to system dbus"
@@ -67,7 +69,7 @@ msgstr " "
msgid "(C) 2009 Red Hat, Inc."
msgstr "(C) 2009 Red Hat, Inc."
-#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:240
+#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244
msgid "<b>Not reported!</b>"
msgstr "<b>Ikke rapporteret!</b>"
@@ -168,7 +170,16 @@ msgstr "Nedbrudsrate"
msgid "User"
msgstr "Bruger"
-#: ../src/Gui/CCMainWindow.py:178
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Kan ikke vise indstillingsdialogen\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -177,7 +188,7 @@ msgstr ""
"Kunne ikke afslutte nuværende handling!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:195
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
@@ -187,17 +198,17 @@ msgstr ""
"kører\n"
" %s"
-#: ../src/Gui/CCMainWindow.py:205
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "Kan ikke hente brugernavn for uid %s"
-#: ../src/Gui/CCMainWindow.py:232
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
msgstr ""
"<b>Dette nedbrud er blevet rapporteret, du kan finde rapporten på: </b>\n"
-#: ../src/Gui/CCMainWindow.py:292
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -205,7 +216,7 @@ msgstr ""
"Kunne ikke hente rapport!\n"
"Mangler fejlsøgningsinformation?"
-#: ../src/Gui/CCMainWindow.py:310
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -214,7 +225,7 @@ msgstr ""
"Rapportering fejlede!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:329 ../src/Gui/CCMainWindow.py:356
+#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "Fejl under hentning af rapporten: %s"
@@ -277,19 +288,19 @@ msgstr "gtk-cancel"
msgid "gtk-refresh"
msgstr "gtk-refresh"
-#: ../src/Gui/SettingsDialog.py:34 ../src/Gui/SettingsDialog.py:51
+#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Vælg udvidelsesmodul</b>"
-#: ../src/Gui/SettingsDialog.py:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Vælg databasebackend</b>"
-#: ../src/Gui/SettingsDialog.py:168
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
msgstr "Fjern dette job"
-#: ../src/Gui/SettingsDialog.py:211
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "Fjern denne handling"
@@ -463,31 +474,31 @@ msgstr "Logger ud..."
msgid "Getting local universal unique identification"
msgstr "Henter lokal, universal, unik identifikation"
-#: ../lib/Plugins/CCpp.cpp:153
+#: ../lib/Plugins/CCpp.cpp:246
msgid "Getting backtrace..."
msgstr "Henter backtrace..."
-#: ../lib/Plugins/CCpp.cpp:434
+#: ../lib/Plugins/CCpp.cpp:532 ../lib/Plugins/CCpp.cpp:657
msgid "Searching for debug-info packages..."
msgstr "Søger efter pakker med fejlsøgningsinformation..."
-#: ../lib/Plugins/CCpp.cpp:496
+#: ../lib/Plugins/CCpp.cpp:594 ../lib/Plugins/CCpp.cpp:690
msgid "Downloading and installing debug-info packages..."
msgstr "Henter og installerer pakker med fejlsøgningsinformation..."
-#: ../lib/Plugins/CCpp.cpp:558
+#: ../lib/Plugins/CCpp.cpp:733
msgid "Getting local universal unique identification..."
msgstr "Henter lokal, universal, unik identifikation..."
-#: ../lib/Plugins/CCpp.cpp:577
+#: ../lib/Plugins/CCpp.cpp:752
msgid "Getting global universal unique identification..."
msgstr "Henter global, universal, unik identifikation..."
-#: ../lib/Plugins/CCpp.cpp:628
+#: ../lib/Plugins/CCpp.cpp:797
msgid "Starting report creation..."
msgstr "Starter rapportoprettelse..."
-#: ../lib/Plugins/CCpp.cpp:659
+#: ../lib/Plugins/CCpp.cpp:828
msgid "Skipping debuginfo installation"
msgstr "Springer over fejlsøgningsinfo-installation"
@@ -575,13 +586,6 @@ msgstr "færdig med at køre sosreport"
#~ "\n"
#~ "%s"
-#~ msgid ""
-#~ "Can't save plugin settings:\n"
-#~ " %s"
-#~ msgstr ""
-#~ "Kan ikke gemme indstillinger for udvidelsesmoduler:\n"
-#~ " %s"
-
#~ msgid "unknown response from settings dialog"
#~ msgstr "ukendt svar fra indstillingsdialog"
diff --git a/po/de.po b/po/de.po
index 75b1de8d..65cab68b 100644
--- a/po/de.po
+++ b/po/de.po
@@ -12,9 +12,9 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt.master.de\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-09-29 14:46+0200\n"
-"PO-Revision-Date: 2009-09-22 18:00+0200\n"
-"Last-Translator: Marcus Nitzschke <kenda@fedoraproject.org>\n"
+"POT-Creation-Date: 2009-10-30 10:16+0000\n"
+"PO-Revision-Date: 2009-10-30 14:53+0100\n"
+"Last-Translator: Fabian Affolter <fab@fedoraproject.org>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -22,41 +22,45 @@ msgstr ""
"X-Poedit-Language: German\n"
"X-Generator: KBabel 1.11.4\n"
-#: src/Gui/ABRTExceptions.py:4
+#: ../src/Gui/ABRTExceptions.py:6
msgid "Another client is already running, trying to wake it."
msgstr "Ein anderer Client läuft bereits, versuche ihn zu wecken."
-#: src/Gui/ABRTExceptions.py:10
+#: ../src/Gui/ABRTExceptions.py:13
msgid "Got unexpected data from daemon (is the database properly updated?)."
-msgstr ""
-"Unerwartete Daten vom Daemon erhalten (ist die Datenbank korrekt "
-"aktualisisert?)"
+msgstr "Unerwartete Daten vom Daemon erhalten (ist die Datenbank korrekt aktualisisert?)"
-#: src/Gui/ABRTPlugin.py:26
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "Analyse-Plugins"
-#: src/Gui/ABRTPlugin.py:27
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "Aktion-Plugins"
-#: src/Gui/ABRTPlugin.py:28
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "Bericht-Plugins"
-#: src/Gui/ABRTPlugin.py:29
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "Datenbank-Plugins"
-#: src/Gui/CCDBusBackend.py:143
-msgid "Can't connect to dbus"
-msgstr "Kann nicht mit dbus verbinden"
+#: ../src/Gui/ABRTPlugin.py:97
+msgid "Plugin name is not set, can't load it's settings"
+msgstr "Plugin-Name nicht gesetzt, kann die Einstellungen nicht laden"
+
+#: ../src/Gui/CCDBusBackend.py:74
+#: ../src/Gui/CCDBusBackend.py:97
+msgid "Can't connect to system dbus"
+msgstr "Kann nicht mit System-Dbus verbinden"
-#: src/Gui/CCDBusBackend.py:169
-msgid "Please check if abrt daemon is running."
-msgstr "Bitte überprüfen Sie, ob der abrt-Daemon läuft."
+#: ../src/Gui/CCDBusBackend.py:100
+#: ../src/Gui/CCDBusBackend.py:103
+msgid "Please check if abrt daemon is running"
+msgstr "Bitte überprüfen Sie, ob der abrt-Daemon läuft"
-#: src/Gui/CCDBusBackend.py:187
+#: ../src/Gui/CCDBusBackend.py:155
msgid ""
"Daemon did't return valid report info\n"
"Debuginfo is missing?"
@@ -64,116 +68,113 @@ msgstr ""
"Daemon lieferte keine gültige Berichtsinfo\n"
"Fehlt Debuginfo?"
-#: src/Gui/ccgui.glade:6
-msgid "Please wait.."
-msgstr "Bitte warten ..."
-
-#: src/Gui/ccgui.glade:16
-msgid "Working..."
-msgstr "Verarbeite ..."
-
-#: src/Gui/ccgui.glade:49
+#: ../src/Gui/ccgui.glade.h:1
msgid " "
msgstr " "
-#: src/Gui/ccgui.glade:68
+#: ../src/Gui/ccgui.glade.h:2
+msgid "(C) 2009 Red Hat, Inc."
+msgstr "(C) 2009 Red Hat, Inc."
+
+#: ../src/Gui/ccgui.glade.h:3
+#: ../src/Gui/CCMainWindow.py:244
+msgid "<b>Not reported!</b>"
+msgstr "<b>Nicht berichtet!</b>"
+
+#: ../src/Gui/ccgui.glade.h:4
+msgid "<span color=\"white\">Description</span>"
+msgstr "<span color=\"white\">Beschreibung</span>"
+
+#: ../src/Gui/ccgui.glade.h:5
msgid "About ABRT"
msgstr "Über ABRT"
-#: src/Gui/ccgui.glade:74
-msgid "(C) 2009 Red Hat, Inc."
-msgstr "(C) 2009 Red Hat, Inc."
+#: ../src/Gui/ccgui.glade.h:6
+msgid "Automatic Bug Reporting Tool"
+msgstr "Automatic Bug Reporting Tool"
-#: src/Gui/ccgui.glade:75
+#: ../src/Gui/ccgui.glade.h:7
+msgid "Delete"
+msgstr "Löschen"
+
+#: ../src/Gui/ccgui.glade.h:8
+msgid "Please wait.."
+msgstr "Bitte warten ..."
+
+#: ../src/Gui/ccgui.glade.h:9
+msgid "Plugins"
+msgstr "Plugins"
+
+#: ../src/Gui/ccgui.glade.h:10
+#: ../src/Gui/report.glade.h:2
+msgid "Report"
+msgstr "Bericht"
+
+#: ../src/Gui/ccgui.glade.h:11
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 "
-"Software Foundation; either version 2 of the License, or (at your option) "
-"any later version.\n"
+"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.\n"
"\n"
-"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.\n"
+"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.\n"
"\n"
-"You should have received a copy of the GNU General Public License along with "
-"this program. If not, see <http://www.gnu.org/licenses/>."
+"You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>."
msgstr ""
-"Dieses Programm ist freie Software. Sie können es unter den Bedingungen der "
-"GNU General Public License, wie von der Free Software Foundation "
-"veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß Version 2 "
-"der Lizenz oder (nach Ihrer Option) jeder späteren Version.\n"
+"Dieses Programm ist freie Software. Sie können es unter den Bedingungen der GNU General Public License, wie von der Free Software Foundation veröffentlicht, weitergeben und/oder modifizieren, entweder gemäß Version 2 der Lizenz oder (nach Ihrer Option) jeder späteren Version.\n"
"\n"
-"Die Veröffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen "
-"von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die "
-"implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN "
-"BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.\n"
+"Die Veröffentlichung dieses Programms erfolgt in der Hoffnung, dass es Ihnen von Nutzen sein wird, aber OHNE IRGENDEINE GARANTIE, sogar ohne die implizite Garantie der MARKTREIFE oder der VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK. Details finden Sie in der GNU General Public License.\n"
"\n"
-"Sie sollten ein Exemplar der GNU General Public License zusammen mit diesem "
-"Programm erhalten haben. Falls nicht, siehe <http://www.gnu.org/licenses/>."
-
-#: src/Gui/ccgui.glade:106
-msgid "Automatic Bug Reporting Tool"
-msgstr "Automatic Bug Reporting Tool"
+"Sie sollten ein Exemplar der GNU General Public License zusammen mit diesem Programm erhalten haben. Falls nicht, siehe <http://www.gnu.org/licenses/>."
-#: src/Gui/ccgui.glade:118
-msgid "_File"
-msgstr "_Datei"
+#: ../src/Gui/ccgui.glade.h:16
+msgid "Working..."
+msgstr "Verarbeite ..."
-#: src/Gui/ccgui.glade:138
+#: ../src/Gui/ccgui.glade.h:17
msgid "_Edit"
msgstr "_Bearbeiten"
-#: src/Gui/ccgui.glade:146
-msgid "Plugins"
-msgstr "Plugins"
+#: ../src/Gui/ccgui.glade.h:18
+msgid "_File"
+msgstr "_Datei"
-#: src/Gui/ccgui.glade:164
+#: ../src/Gui/ccgui.glade.h:19
msgid "_Help"
msgstr "_Hilfe"
-#: src/Gui/ccgui.glade:194 src/Gui/ccgui.glade:195
-msgid "Delete"
-msgstr "Löschen"
-
-#: src/Gui/ccgui.glade:207 src/Gui/ccgui.glade:208 src/Gui/ccgui.glade:335
-#: src/Gui/report.glade:7 src/Gui/report.glade:24
-msgid "Report"
-msgstr "Bericht"
-
-#: src/Gui/ccgui.glade:255
-msgid "<span color=\"white\">Description</span>"
-msgstr "<span color=\"white\">Beschreibung</span>"
-
-#: src/Gui/ccgui.glade:297 src/Gui/CCMainWindow.py:239
-msgid "<b>Not reported!</b>"
-msgstr "<b>Nicht berichtet!</b>"
-
-#: src/Gui/CCMainWindow.py:80
+#. add pixbuff separatelly
+#: ../src/Gui/CCMainWindow.py:80
msgid "Icon"
msgstr "Symbol"
-#: src/Gui/CCMainWindow.py:88
+#: ../src/Gui/CCMainWindow.py:88
msgid "Package"
msgstr "Paket"
-#: src/Gui/CCMainWindow.py:89
+#: ../src/Gui/CCMainWindow.py:89
msgid "Application"
msgstr "Anwendung"
-#: src/Gui/CCMainWindow.py:90
+#: ../src/Gui/CCMainWindow.py:90
msgid "Date"
msgstr "Datum"
-#: src/Gui/CCMainWindow.py:91
+#: ../src/Gui/CCMainWindow.py:91
msgid "Crash Rate"
msgstr "Absturzrate"
-#: src/Gui/CCMainWindow.py:93
+#: ../src/Gui/CCMainWindow.py:93
msgid "User"
msgstr "Benutzer"
-#: src/Gui/CCMainWindow.py:177
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Der Einstellungsdialog kann nicht angezeigt werden\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -182,27 +183,25 @@ msgstr ""
"Konnte aktuelle Aufgabe nicht abschließen!\n"
"%s"
-#: src/Gui/CCMainWindow.py:194
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
" %s"
msgstr ""
-"Fehler beim Laden der Dump-Liste. Bitte überprüfen Sie, ob der abrt-Daemon "
-"läuft\n"
+"Fehler beim Laden der Dump-Liste. Bitte überprüfen Sie, ob der abrt-Daemon läuft\n"
" %s"
-#: src/Gui/CCMainWindow.py:204
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "Benutzername für UID %s kann nicht ermittelt werden"
-#: src/Gui/CCMainWindow.py:231
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
-msgstr ""
-"<b>Dieser Absturz wurde gemeldet, der Bericht befindet sich unter:</b>\n"
+msgstr "<b>Dieser Absturz wurde gemeldet, der Bericht befindet sich unter:</b>\n"
-#: src/Gui/CCMainWindow.py:291
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -210,7 +209,7 @@ msgstr ""
"Konnte Bericht nicht abrufen!\n"
"Fehlt Debuginfo?"
-#: src/Gui/CCMainWindow.py:306
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -219,362 +218,362 @@ msgstr ""
"Berichterstellung fehlgeschlagen!\n"
"%s"
-#: src/Gui/CCMainWindow.py:338
+#: ../src/Gui/CCMainWindow.py:333
+#: ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "Fehler beim Abrufen des Berichts: %s"
-#: src/Gui/CCReporterDialog.py:98
+#: ../src/Gui/CCReporterDialog.py:171
+msgid "Brief description how to reproduce this or what you did..."
+msgstr "Kurze Beschreibung, wie dies reproduziert werden kann bzw. was Sie taten ..."
+
+#: ../src/Gui/CCReporterDialog.py:215
#, python-format
msgid ""
-"<b>WARNING</b>, you're about to send data which might contain sensitive "
-"information.\n"
+"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
"Do you really want to send <b>%s</b>?\n"
msgstr ""
-"<b>WARNUNG</b>, Sie sind im Begriff, möglicherweise sensible Daten zu "
-"senden.\n"
+"<b>WARNUNG</b>, Sie sind im Begriff, möglicherweise sensible Daten zu senden.\n"
"Möchten Sie wirklich senden<b>%s</b>?\n"
-#: src/Gui/CCReporterDialog.py:111
-msgid "Brief description how to reproduce this or what you did..."
-msgstr ""
-"Kurze Beschreibung, wie dies reproduziert werden kann bzw. was Sie taten ..."
-
-#: src/Gui/dialogs.glade:7
+#: ../src/Gui/dialogs.glade.h:1
msgid "Report done"
msgstr "Bericht fertiggestellt"
-#: src/Gui/dialogs.glade:47 src/Gui/settings.glade:695
-#: src/Gui/settings.glade:785
+#: ../src/Gui/dialogs.glade.h:2
+#: ../src/Gui/settings.glade.h:27
msgid "gtk-ok"
msgstr "gtk-ok"
-#: src/Gui/PluginSettingsUI.py:17
+#: ../src/Gui/PluginSettingsUI.py:18
msgid "Can't find PluginDialog widget in UI description!"
msgstr "Kann PluginDialog-Widget nicht in UI-Beschreibung finden!"
-#: src/Gui/PluginSettingsUI.py:21
+#. we shouldn't get here, but just to be safe
+#: ../src/Gui/PluginSettingsUI.py:24
#, python-format
msgid "No UI for plugin %s"
msgstr "Kein UI für Plugin %s"
-#: src/Gui/PluginSettingsUI.py:38 src/Gui/PluginSettingsUI.py:64
+#: ../src/Gui/PluginSettingsUI.py:55
+#: ../src/Gui/PluginSettingsUI.py:81
msgid "combo box is not implemented"
msgstr "Combo-Box ist nicht implementiert"
-#: src/Gui/PluginSettingsUI.py:47
+#: ../src/Gui/PluginSettingsUI.py:64
msgid "Nothing to hydrate!"
msgstr "Nichts zum Hydrieren!"
-#: src/Gui/report.glade:64
+#: ../src/Gui/report.glade.h:1
msgid "Comment"
msgstr "Kommentar"
-#: src/Gui/report.glade:104 src/Gui/settings.glade:682
-#: src/Gui/settings.glade:797
+#: ../src/Gui/report.glade.h:3
+msgid "Send"
+msgstr "Senden"
+
+#: ../src/Gui/report.glade.h:4
+#: ../src/Gui/settings.glade.h:25
msgid "gtk-cancel"
msgstr "gtk-cancel"
-#: src/Gui/report.glade:119
-msgid "Send"
-msgstr "Senden"
+#: ../src/Gui/report.glade.h:5
+msgid "gtk-refresh"
+msgstr "gtk-refresh"
-#: src/Gui/SettingsDialog.py:34 src/Gui/SettingsDialog.py:51
+#: ../src/Gui/SettingsDialog.py:33
+#: ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Plugin wählen</b>"
-#: src/Gui/SettingsDialog.py:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Datenbank-Backend wählen</b>"
-#: src/Gui/SettingsDialog.py:165
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
msgstr "Diesen Job löschen"
-#: src/Gui/SettingsDialog.py:208
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "Diese Aktion löschen"
-#: src/Gui/settings.glade:6
-msgid "Settings"
-msgstr "Einstellungen"
+#: ../src/Gui/settings.glade.h:1
+msgid "<b>Analyzer plugin</b>"
+msgstr "<b>Analyse-Plugin</b>"
-#: src/Gui/settings.glade:46 src/Gui/settings.glade:55
-#: src/Gui/settings.glade:107 src/Gui/settings.glade:120
-#: src/Gui/settings.glade:133
-msgid "Nothing selected"
-msgstr "Nichts ausgewählt"
+#: ../src/Gui/settings.glade.h:2
+msgid "<b>Associated action</b>"
+msgstr "<b>zugehörige Aktionen</b>"
-#: src/Gui/settings.glade:72
-msgid "Web Site:"
-msgstr "Webseite:"
+#: ../src/Gui/settings.glade.h:3
+msgid "<b>Plugin</b>"
+msgstr "<b>Plugin</b>"
-#: src/Gui/settings.glade:84
+#: ../src/Gui/settings.glade.h:4
+msgid "<b>Time (or period)</b>"
+msgstr "<b>Zeit (oder Zeitraum)</b>"
+
+#: ../src/Gui/settings.glade.h:5
+msgid "Analyzers, Actions, Reporters"
+msgstr "Analysierer, Aktionen, Berichterstatter"
+
+#: ../src/Gui/settings.glade.h:6
msgid "Author:"
msgstr "Autor:"
-#: src/Gui/settings.glade:97
-msgid "Version:"
-msgstr "Version"
-
-#: src/Gui/settings.glade:152
-msgid "Plugin Details"
-msgstr "Plugin-Details"
+#: ../src/Gui/settings.glade.h:7
+msgid "Blacklisted packages: "
+msgstr "Pakete auf der schwarzen Liste:"
-#: src/Gui/settings.glade:179
+#: ../src/Gui/settings.glade.h:8
msgid "C_onfigure plugin"
msgstr "Plugin _konfigurieren"
-#: src/Gui/settings.glade:191
-msgid "gtk-close"
-msgstr "gtk-close"
-
-#: src/Gui/settings.glade:221
-msgid "Global Settings"
-msgstr "Globale Einstellungen"
-
-#: src/Gui/settings.glade:240
+#: ../src/Gui/settings.glade.h:9
msgid "Check package GPG signature"
msgstr "Überprüfe GPG-Signatur des Pakets"
-#: src/Gui/settings.glade:256
+#: ../src/Gui/settings.glade.h:10
+msgid "Common"
+msgstr "Allgemein"
+
+#: ../src/Gui/settings.glade.h:11
+msgid "Cron"
+msgstr "Cron"
+
+#: ../src/Gui/settings.glade.h:12
msgid "Database backend: "
msgstr "Datenbank-Backend"
-#: src/Gui/settings.glade:281
-msgid "Blacklisted packages: "
-msgstr "Pakete auf der schwarzen Liste:"
+#: ../src/Gui/settings.glade.h:13
+msgid "Edit blacklisted packages"
+msgstr "Pakete auf schwarzer Liste bearbeiten"
-#: src/Gui/settings.glade:294
-msgid "Max coredump storage size(MB):"
-msgstr "Max. Speicherplatz für Coredumps (in MB):"
+#: ../src/Gui/settings.glade.h:14
+msgid "GPG Keys"
+msgstr "GPG-Schlüssel"
-#: src/Gui/settings.glade:307
+#: ../src/Gui/settings.glade.h:15
msgid "GPG keys: "
msgstr "GPG-Schlüssel:"
-#: src/Gui/settings.glade:349
-msgid "Edit blacklisted packages"
-msgstr "Pakete auf schwarzer Liste bearbeiten"
-
-#: src/Gui/settings.glade:408
-msgid "Common"
-msgstr "Allgemein"
+#: ../src/Gui/settings.glade.h:16
+msgid "Global Settings"
+msgstr "Globale Einstellungen"
-#: src/Gui/settings.glade:438
-msgid "<b>Plugin</b>"
-msgstr "<b>Plugin</b>"
+#: ../src/Gui/settings.glade.h:17
+msgid "Max coredump storage size(MB):"
+msgstr "Max. Speicherplatz für Coredumps (in MB):"
-#: src/Gui/settings.glade:448
-msgid "<b>Time (or period)</b>"
-msgstr "<b>Zeit (oder Zeitraum)</b>"
+#: ../src/Gui/settings.glade.h:18
+msgid "Nothing selected"
+msgstr "Nichts ausgewählt"
-#: src/Gui/settings.glade:510 src/Gui/settings.glade:624
-#: src/Gui/settings.glade:761
-msgid "gtk-add"
-msgstr "gtk-add"
+#: ../src/Gui/settings.glade.h:19
+msgid "Plugin Details"
+msgstr "Plugin-Details"
-#: src/Gui/settings.glade:534
-msgid "Cron"
-msgstr "Cron"
+#: ../src/Gui/settings.glade.h:20
+msgid "Settings"
+msgstr "Einstellungen"
-#: src/Gui/settings.glade:551
-msgid "<b>Analyzer plugin</b>"
-msgstr "<b>Analyse-Plugin</b>"
+#: ../src/Gui/settings.glade.h:21
+msgid "This function is not implemented yet!"
+msgstr "Diese Funktion ist noch nicht implementiert!"
-#: src/Gui/settings.glade:561
-msgid "<b>Associated action</b>"
-msgstr "<b>zugehörige Aktionen</b>"
+#: ../src/Gui/settings.glade.h:22
+msgid "Version:"
+msgstr "Version"
-#: src/Gui/settings.glade:648
-msgid "Analyzers, Actions, Reporters"
-msgstr "Analysierer, Aktionen, Berichterstatter"
+#: ../src/Gui/settings.glade.h:23
+msgid "Web Site:"
+msgstr "Webseite:"
-#: src/Gui/settings.glade:700
-msgid "This function is not implemented yet!"
-msgstr "Diese Funktion ist noch nicht implementiert!"
+#: ../src/Gui/settings.glade.h:24
+msgid "gtk-add"
+msgstr "gtk-add"
-#: src/Gui/settings.glade:738
-msgid "GPG Keys"
-msgstr "GPG-Schlüssel"
+#: ../src/Gui/settings.glade.h:26
+msgid "gtk-close"
+msgstr "gtk-close"
-#: src/Gui/settings.glade:773
+#: ../src/Gui/settings.glade.h:28
msgid "gtk-remove"
msgstr "gtk-remove"
-#: src/Applet/Applet.cpp:71
+#: ../src/Applet/Applet.cpp:76
#, c-format
msgid "A crash in package %s has been detected"
msgstr "In Paket %s wurde ein Absturz entdeckt!"
-#: src/Applet/Applet.cpp:130
+#: ../src/Applet/Applet.cpp:135
msgid "ABRT service has been started"
msgstr "ABRT-Dienst wurde gestartet"
-#: src/Applet/Applet.cpp:132 src/Applet/Applet.cpp:246
+#: ../src/Applet/Applet.cpp:137
+#: ../src/Applet/Applet.cpp:251
msgid "ABRT service is not running"
msgstr "ABRT-Dienst wird nicht ausgeführt."
-#: src/Applet/CCApplet.cpp:185
+#: ../src/Applet/CCApplet.cpp:185
msgid "Warning"
msgstr "Warnung"
-#: src/Daemon/Daemon.cpp:546
-msgid ""
-"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
-"value in abrt.conf."
-msgstr ""
-"Berichtgröße überschreitet die maximale Größe. Bitte überprüfen Sie Ihren "
-"MaxCrashReportsSize-Wert in abrt.conf."
-
-#: lib/Plugins/Bugzilla.cpp:83
-msgid "Empty login and password. Please check Bugzilla.conf"
-msgstr "Leerer Benutzername und Passwort. Bitte überprüfen Sie Bugzilla.conf."
+#: ../src/Daemon/Daemon.cpp:543
+msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."
+msgstr "Berichtgröße überschreitet die maximale Größe. Bitte überprüfen Sie Ihren MaxCrashReportsSize-Wert in abrt.conf."
-#: lib/Plugins/Bugzilla.cpp:227
+#: ../lib/Plugins/Bugzilla.cpp:253
msgid "Bug is already reported: "
msgstr "Fehler wurde bereits gemeldet:"
-#: lib/Plugins/Bugzilla.cpp:282
+#: ../lib/Plugins/Bugzilla.cpp:317
#, c-format
msgid "Binary file %s will not be reported."
msgstr "Binärdatei %s wird nicht gemeldet."
-#: lib/Plugins/Bugzilla.cpp:352
+#: ../lib/Plugins/Bugzilla.cpp:398
msgid "New bug id: "
msgstr "Neue Fehler-ID:"
-#: lib/Plugins/Bugzilla.cpp:421
+#: ../lib/Plugins/Bugzilla.cpp:447
msgid "Checking for duplicates..."
msgstr "Auf Duplikate überprüfen ..."
-#: lib/Plugins/Bugzilla.cpp:424 lib/Plugins/Bugzilla.cpp:436
+#: ../lib/Plugins/Bugzilla.cpp:450
msgid "Logging into bugzilla..."
msgstr "Bei Bugzilla anmelden ..."
-#: lib/Plugins/Bugzilla.cpp:427
-msgid "Check CC and add coment +1..."
-msgstr "CC überprüfen und Kommentar hinzufügen +1 ..."
+#: ../lib/Plugins/Bugzilla.cpp:454
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Leerer Benutzername und Passwort. Bitte überprüfen Sie Bugzilla.conf."
+
+#: ../lib/Plugins/Bugzilla.cpp:460
+msgid "Checking CC..."
+msgstr "CC überprüfen ..."
-#: lib/Plugins/Bugzilla.cpp:448
+#: ../lib/Plugins/Bugzilla.cpp:469
msgid "Creating new bug..."
msgstr "Neuen Fehlerbericht erstellen ..."
-#: lib/Plugins/Bugzilla.cpp:453
+#: ../lib/Plugins/Bugzilla.cpp:473
msgid "Logging out..."
msgstr "Abmelden ..."
-#: lib/Plugins/Kerneloops.cpp:37
+#: ../lib/Plugins/Kerneloops.cpp:37
msgid "Getting local universal unique identification"
msgstr "Rufe lokale, universelle, eindeutige Identifikation ab"
-#: lib/Plugins/CCpp.cpp:146
+#: ../lib/Plugins/CCpp.cpp:235
msgid "Getting backtrace..."
msgstr "Backtrace abrufen ..."
-#: lib/Plugins/CCpp.cpp:410
+#: ../lib/Plugins/CCpp.cpp:523
+#: ../lib/Plugins/CCpp.cpp:650
msgid "Searching for debug-info packages..."
msgstr "debug-info-Pakete suchen ..."
-#: lib/Plugins/CCpp.cpp:444
+#: ../lib/Plugins/CCpp.cpp:585
+#: ../lib/Plugins/CCpp.cpp:683
msgid "Downloading and installing debug-info packages..."
msgstr "debug-info-Pakete herunterladen und installieren ..."
-#: lib/Plugins/CCpp.cpp:506
+#: ../lib/Plugins/CCpp.cpp:725
msgid "Getting local universal unique identification..."
msgstr "Lokale, universelle, eindeutige Identifikation abrufen ..."
-#: lib/Plugins/CCpp.cpp:525
+#: ../lib/Plugins/CCpp.cpp:744
msgid "Getting global universal unique identification..."
msgstr "Globale, universelle, eindeutige Identifikation abrufen ..."
-#: lib/Plugins/CCpp.cpp:576
+#: ../lib/Plugins/CCpp.cpp:789
msgid "Starting report creation..."
msgstr "Berichterstellung beginnen ..."
-#: lib/Plugins/CCpp.cpp:605
+#: ../lib/Plugins/CCpp.cpp:820
msgid "Skipping debuginfo installation"
msgstr "debuginfo-Installation wird übersprungen"
-#: lib/Plugins/KerneloopsReporter.cpp:101
+#: ../lib/Plugins/KerneloopsReporter.cpp:101
msgid "Creating and submitting a report..."
msgstr "Einen Bericht erstellen und einreichen ..."
-#: lib/Plugins/Logger.cpp:58 lib/Plugins/Mailx.cpp:123
+#: ../lib/Plugins/Logger.cpp:58
+#: ../lib/Plugins/Mailx.cpp:123
msgid "Creating a report..."
msgstr "Einen Bericht erstellen ..."
-#: lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:62
msgid "Executing RunApp plugin..."
msgstr "RunApp-Plugin ausführen ..."
-#: lib/Plugins/FileTransfer.cpp:60 lib/Plugins/FileTransfer.cpp:355
+#: ../lib/Plugins/FileTransfer.cpp:63
+#: ../lib/Plugins/FileTransfer.cpp:408
msgid "FileTransfer: URL not specified"
msgstr "Dateiübertragung: URL nicht angegeben"
-#: lib/Plugins/FileTransfer.cpp:77
+#: ../lib/Plugins/FileTransfer.cpp:80
#, c-format
msgid "Sending archive %s via %s"
msgstr "Archiv %s via %s senden"
-#: lib/Plugins/FileTransfer.cpp:284
+#: ../lib/Plugins/FileTransfer.cpp:335
msgid "File Transfer: Creating a report..."
msgstr "Dateiübertragung: Einen Bericht erstellen ..."
-#: lib/Plugins/FileTransfer.cpp:305 lib/Plugins/FileTransfer.cpp:334
+#: ../lib/Plugins/FileTransfer.cpp:357
+#: ../lib/Plugins/FileTransfer.cpp:385
msgid "CFileTransfer::Run(): Cannot create and send an archive: "
msgstr "CFileTransfer::Run(): Kann kein Archiv erzeugen und senden: "
-#: lib/Plugins/KerneloopsScanner.cpp:79
+#: ../lib/Plugins/KerneloopsScanner.cpp:81
msgid "Creating kernel oops crash reports..."
msgstr "Kernel-Oops-Crash-Berichte erzeugen ..."
-#: lib/Plugins/Mailx.cpp:109
+#: ../lib/Plugins/Mailx.cpp:109
msgid "Sending an email..."
msgstr "Eine E-Mail senden ..."
-#: lib/Plugins/SOSreport.cpp:113
+#: ../lib/Plugins/SOSreport.cpp:113
msgid "Executing SOSreport plugin..."
msgstr "SOSreport-Plugin ausführen ..."
-#: lib/Plugins/SOSreport.cpp:135
+#: ../lib/Plugins/SOSreport.cpp:135
msgid "running sosreport: "
msgstr "sosreport ausführen: "
-#: lib/Plugins/SOSreport.cpp:150
+#: ../lib/Plugins/SOSreport.cpp:150
msgid "done running sosreport"
msgstr "Ausführung von sosreport abgeschlossen"
+#~ msgid "Check CC and add coment +1..."
+#~ msgstr "CC überprüfen und Kommentar hinzufügen +1 ..."
#~ msgid "Pending events: %i"
#~ msgstr "Ausstehende Ereignisse: %i"
-
#~ msgid "Can't create menu from the description, popup won't be available!\n"
#~ msgstr ""
#~ "Kann kein Menü aus der Beschreibung erzeugen, Popup wird nicht verfügbar "
#~ "sein!\n"
-
#~ msgid "Creating an archive..."
#~ msgstr "Ein Archiv erzeugen ..."
-
#~ msgid "Applet is already running."
#~ msgstr "Applet wird beläuft ausgeführt bereits."
-
#~ msgid ""
#~ "This is default handler, you should register your own with "
#~ "ConnectCrashHandler"
#~ msgstr ""
#~ "Dies ist der Standard-Handler, Sie sollten Ihren eigenen mittels "
#~ "ConnectCrashHandler registrieren"
-
#~ msgid ""
#~ "This is default handler, you should register your own with "
#~ "ConnectQuotaExceedHandler"
#~ msgstr ""
#~ "Dies ist der Standard-Handler, Sie sollten Ihren eigenen mittels "
#~ "ConnectQuotaExceedHandler registrieren"
-
#~ msgid "Out of memory"
#~ msgstr "Nicht genug Speicher"
-
#~ msgid "Getting local/global universal unique identification..."
#~ msgstr "Lokale/globale, universelle, eindeutige Identifikation abrufen ..."
+
diff --git a/po/el.po b/po/el.po
new file mode 100644
index 00000000..d89dd1c8
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,566 @@
+# Translation of abrt.master in Greek by Fedora Greek team
+# Copyright (C) 2009 authors below.
+# This file is distributed under the same license as the Abrt package.
+#
+# Pierros Papadeas <ppapadeas@gmail.com>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: abrt.master\n"
+"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
+"POT-Creation-Date: 2009-11-08 04:03+0000\n"
+"PO-Revision-Date: 2009-11-08 11:25+0200\n"
+"Last-Translator: Kostas Papadimas <pkst@gnome.org>\n"
+"Language-Team: Greek Fedora team <fedora-trans-el@redhat.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Greek\n"
+
+#: ../src/Gui/ABRTExceptions.py:6
+msgid "Another client is already running, trying to wake it."
+msgstr "Εκτελείται μια άλλη διεργασία, γίνεται προσπάθεια αφύπνισης της."
+
+#: ../src/Gui/ABRTExceptions.py:13
+msgid "Got unexpected data from daemon (is the database properly updated?)."
+msgstr "Έγινε λήψη απρόσμενων δεδομένων από την υπηρεσία (είναι η βάση δεδομένων σωστά ενημερωμένη;)"
+
+#: ../src/Gui/ABRTPlugin.py:55
+msgid "Analyzer plugins"
+msgstr "Πρόσθετες λειτουργίες αναλυτή"
+
+#: ../src/Gui/ABRTPlugin.py:56
+msgid "Action plugins"
+msgstr "Πρόσθετες λειτουργίες ενέργειας"
+
+#: ../src/Gui/ABRTPlugin.py:57
+msgid "Reporter plugins"
+msgstr "Πρόσθετες λειτουργίες αναφοράς"
+
+#: ../src/Gui/ABRTPlugin.py:58
+msgid "Database plugins"
+msgstr "Πρόσθετες λειτουργίες βάσης δεδομένων"
+
+#: ../src/Gui/ABRTPlugin.py:97
+msgid "Plugin name is not set, can't load it's settings"
+msgstr "Το όνομα πρόσθετης λειτουργίας δεν έχει οριστεί, αδυναμία φόρτωσης των ρυθμίσεων της"
+
+#: ../src/Gui/CCDBusBackend.py:74
+#: ../src/Gui/CCDBusBackend.py:97
+msgid "Can't connect to system dbus"
+msgstr "Αδυναμία σύνδεσης με το dbus συστήματος"
+
+#: ../src/Gui/CCDBusBackend.py:100
+#: ../src/Gui/CCDBusBackend.py:103
+msgid "Please check if abrt daemon is running"
+msgstr "Παρακαλώ ελέγξτε αν εκτελείται η υπηρεσία abrt"
+
+#: ../src/Gui/CCDBusBackend.py:155
+msgid ""
+"Daemon did't return valid report info\n"
+"Debuginfo is missing?"
+msgstr ""
+"Η υπηρεσία δεν επέστρεψε έγκυρες πληροφορίες αναφοράς\n"
+"Μήπως λείπει το Debuginfo;"
+
+#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/report.glade.h:1
+msgid " "
+msgstr " "
+
+#: ../src/Gui/ccgui.glade.h:2
+msgid "(C) 2009 Red Hat, Inc."
+msgstr "(C) 2009 Red Hat, Inc."
+
+#: ../src/Gui/ccgui.glade.h:3
+#: ../src/Gui/CCMainWindow.py:244
+msgid "<b>Not reported!</b>"
+msgstr "<b>Δεν έγινε αναφορά!</b>"
+
+#: ../src/Gui/ccgui.glade.h:4
+msgid "<span color=\"white\">Description</span>"
+msgstr "<span color=\"white\">Περιγραφή</span>"
+
+#: ../src/Gui/ccgui.glade.h:5
+msgid "About ABRT"
+msgstr "Περί ABRT"
+
+#: ../src/Gui/ccgui.glade.h:6
+msgid "Automatic Bug Reporting Tool"
+msgstr "Εργαλείο αυτόματης αναφοράς σφαλμάτων"
+
+#: ../src/Gui/ccgui.glade.h:7
+msgid "Delete"
+msgstr "Διαγραφή"
+
+#: ../src/Gui/ccgui.glade.h:8
+msgid "Please wait.."
+msgstr "Παρακαλώ περιμένετε..."
+
+#: ../src/Gui/ccgui.glade.h:9
+msgid "Plugins"
+msgstr "Πρόσθετες λειτουργίες"
+
+#: ../src/Gui/ccgui.glade.h:10
+#: ../src/Gui/report.glade.h:3
+msgid "Report"
+msgstr "Αναφορά"
+
+#: ../src/Gui/ccgui.glade.h:11
+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 Software Foundation; either version 2 of the License, or (at your option) any later version.\n"
+"\n"
+"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.\n"
+"\n"
+"You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>."
+msgstr ""
+"Αυτό το πρόγραμμα είναι ελεύθερο λογισμικό· επιτρέπεται η αναδιανομή ή/και η τροποποίησή του υπό τους όρους της Γενικής Άδειας Δημόσιας Χρήσης GNU (GPL), όπως αυτή έχει δημοσιευτεί από το Ίδρυμα Ελεύθερου Λογισμικού (FSF) — είτε της έκδοσης 2 της Άδειας, είτε (κατ' επιλογήν σας) οποιασδήποτε μεταγενέστερης έκδοσης.\n"
+"\n"
+"Το πρόγραμμα διανέμεται με την ελπίδα ότι θα αποδειχθεί χρήσιμο, παρόλα αυτά ΧΩΡΙΣ ΚΑΜΙΑ ΕΓΓΥΗΣΗ — χωρίς ούτε και την σιωπηρή εγγύηση ΕΜΠΟΡΕΥΣΙΜΟΤΗΤΑΣ ή ΚΑΤΑΛΛΗΛΟΤΗΤΑΣ ΓΙΑ ΕΙΔΙΚΟ ΣΚΟΠΟ. Για περισσότερες λεπτομέρειες ανατρέξτε στη Γενική Άδεια Δημόσιας Χρήσης GNU (GPL).\n"
+"\n"
+" Θα πρέπει να έχετε λάβει αντίγραφο της Γενικής Άδειας Δημόσιας Χρήσης GNU (GPL) μαζί με το πρόγραμμα. Αν όχι, γράψτε στο Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
+
+#: ../src/Gui/ccgui.glade.h:16
+msgid "Working..."
+msgstr "Σε λειτουργία..."
+
+#: ../src/Gui/ccgui.glade.h:17
+msgid "_Edit"
+msgstr "_Επεξεργασία"
+
+#: ../src/Gui/ccgui.glade.h:18
+msgid "_File"
+msgstr "_Αρχείο"
+
+#: ../src/Gui/ccgui.glade.h:19
+msgid "_Help"
+msgstr "_Βοήθεια"
+
+#. add pixbuff separatelly
+#: ../src/Gui/CCMainWindow.py:80
+msgid "Icon"
+msgstr "Εικονίδιο"
+
+#: ../src/Gui/CCMainWindow.py:88
+msgid "Package"
+msgstr "Πακέτο"
+
+#: ../src/Gui/CCMainWindow.py:89
+msgid "Application"
+msgstr "Εφαρμογή"
+
+#: ../src/Gui/CCMainWindow.py:90
+msgid "Date"
+msgstr "Ημερομηνία"
+
+#: ../src/Gui/CCMainWindow.py:91
+msgid "Crash Rate"
+msgstr "Συχνότητα καταρρεύσεων"
+
+#: ../src/Gui/CCMainWindow.py:93
+msgid "User"
+msgstr "Χρήστης"
+
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Αδυναμία προβολής του διαλόγου ρυθμίσεων\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
+#, python-format
+msgid ""
+"Unable to finish current task!\n"
+"%s"
+msgstr ""
+"Αδυναμία ολοκλήρωσης της τρέχουσας εργασίας!\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:198
+#, python-format
+msgid ""
+"Error while loading the dumplist, please check if abrt daemon is running\n"
+" %s"
+msgstr ""
+"Σφάλμα κατά τη φόρτωση της dumplist, παρακαλώ ελέγξτε αν εκτελείται ο abrt daemon\n"
+" %s"
+
+#: ../src/Gui/CCMainWindow.py:208
+#, python-format
+msgid "Can't get username for uid %s"
+msgstr "Αδυναμία λήψης ονόματος χρήστη για uid %s"
+
+#: ../src/Gui/CCMainWindow.py:236
+msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
+msgstr "<b>Αυτή η κατάρρευση έχει αναφερθεί, μπορείτε να βρείτε τις αναφορές στο:</b>\n"
+
+#: ../src/Gui/CCMainWindow.py:296
+msgid ""
+"Unable to get report!\n"
+"Debuginfo is missing?"
+msgstr ""
+"Αδυναμία λήψης αναφοράς!\n"
+"Μήπως λείπει το Debuginfo;"
+
+#: ../src/Gui/CCMainWindow.py:314
+#, python-format
+msgid ""
+"Reporting failed!\n"
+"%s"
+msgstr ""
+"Η αναφορά απέτυχε!\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:333
+#: ../src/Gui/CCMainWindow.py:360
+#, python-format
+msgid "Error getting the report: %s"
+msgstr "Σφάλμα λήψης της αναφοράς: %s"
+
+#: ../src/Gui/CCReporterDialog.py:173
+msgid "Brief description how to reproduce this or what you did..."
+msgstr "Μια σύντομη περιγραφή για το πως θα αναπαραχθεί το σφάλμα ή τι κάνατε όταν συνέβηκε..."
+
+#: ../src/Gui/CCReporterDialog.py:201
+#, python-format
+msgid ""
+"Reporting disabled because the backtrace is unusable!\n"
+"Please try to install debuginfo manually using command:<span color=\"blue\"> debuginfo-install %s </span>\n"
+"then use Refresh button to regenerate the backtrace."
+msgstr ""
+"Η αναφορά σφάλματος έχει απενεργοποιηθεί επειδή το bactrace δεν μπορεί χρησιμοποιηθεί!\n"
+"Παρακαλώ προσπαθήστε να επανεγκαταστήσετε το debuginfo με τη χρήση της εντολής <span color=\"blue\"> debuginfo-install %s </span>\n"
+"και μετά πατήστε το κουμπί Ανανέωση για την επαναδημιουργία του backtrace."
+
+#: ../src/Gui/CCReporterDialog.py:203
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "Το bactrace δεν μπορεί χρησιμοποιηθεί, δεν μπορείτε να το στείλετε!"
+
+#: ../src/Gui/CCReporterDialog.py:209
+msgid "The bactrace is incomplete, please make sure you provide good steps to reproduce."
+msgstr "Το bactrace είναι ημιτελές, βεβαιωθείτε ότι αναφέρετε τα βήματα για την αναπαραγωγή του."
+
+#: ../src/Gui/CCReporterDialog.py:247
+#, python-format
+msgid ""
+"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
+"Do you really want to send <b>%s</b>?\n"
+msgstr ""
+"<b>ΠΡΟΕΙΔΟΠΟΙΗΣΗ</b>, πρόκειται να αποστείλετε δεδομένα που πιθανώς να περιέχουν ευαίσθητες πληροφορίες.\n"
+"Είστε σίγουροι ότι θέλετε να στείλετε το <b>%s</b>?\n"
+
+#: ../src/Gui/dialogs.glade.h:1
+msgid "Report done"
+msgstr "Η αναφορά ολοκληρώθηκε"
+
+#: ../src/Gui/dialogs.glade.h:2
+#: ../src/Gui/settings.glade.h:27
+msgid "gtk-ok"
+msgstr "gtk-ok"
+
+#: ../src/Gui/PluginSettingsUI.py:18
+msgid "Can't find PluginDialog widget in UI description!"
+msgstr "Αδυναμία εύρεσης γραφικού συστατικού PluginDialog στην περιγραφή UI!"
+
+#. we shouldn't get here, but just to be safe
+#: ../src/Gui/PluginSettingsUI.py:24
+#, python-format
+msgid "No UI for plugin %s"
+msgstr "Δεν υπάρχει UI για την πρόσθετη λειτουργία %s"
+
+#: ../src/Gui/PluginSettingsUI.py:55
+#: ../src/Gui/PluginSettingsUI.py:81
+msgid "combo box is not implemented"
+msgstr "το πεδίο συνδυασμού combo δεν έχει εφαρμοστεί"
+
+#: ../src/Gui/PluginSettingsUI.py:64
+msgid "Nothing to hydrate!"
+msgstr "Δεν υπάρχουν δεδομένα για εμφάνιση!"
+
+#: ../src/Gui/report.glade.h:2
+msgid "Comment"
+msgstr "Σχόλιο:"
+
+#: ../src/Gui/report.glade.h:4
+msgid "Send"
+msgstr "Αποστολή"
+
+#: ../src/Gui/SettingsDialog.py:33
+#: ../src/Gui/SettingsDialog.py:50
+msgid "<b>Select plugin</b>"
+msgstr "<b>Επιλογή πρόσθετης λειτουργίας</b>"
+
+#: ../src/Gui/SettingsDialog.py:36
+msgid "<b>Select database backend</b>"
+msgstr "<b>Επιλογή backend βάσης δεδομένων</b>"
+
+#: ../src/Gui/SettingsDialog.py:165
+msgid "Remove this job"
+msgstr "Απομάκρυνση αυτής της εργασίας"
+
+#: ../src/Gui/SettingsDialog.py:208
+msgid "Remove this action"
+msgstr "Απομάκρυνση αυτής της ενέργειας"
+
+#: ../src/Gui/settings.glade.h:1
+msgid "<b>Analyzer plugin</b>"
+msgstr "<b>Πρόσθετη λειτουργία αναλυτή</b>"
+
+#: ../src/Gui/settings.glade.h:2
+msgid "<b>Associated action</b>"
+msgstr "<b>Συσχετιζόμενη ενέργεια</b>"
+
+#: ../src/Gui/settings.glade.h:3
+msgid "<b>Plugin</b>"
+msgstr "<b>Πρόσθετη λειτουργία</b>"
+
+#: ../src/Gui/settings.glade.h:4
+msgid "<b>Time (or period)</b>"
+msgstr "<b>Χρόνος (ή περίοδος)</b>"
+
+#: ../src/Gui/settings.glade.h:5
+msgid "Analyzers, Actions, Reporters"
+msgstr "Αναλυτές, Ενέργειες, Αναφορές"
+
+#: ../src/Gui/settings.glade.h:6
+msgid "Author:"
+msgstr "Συγγραφέας:"
+
+#: ../src/Gui/settings.glade.h:7
+msgid "Blacklisted packages: "
+msgstr "Πακέτα σε μαύρη λίστα: "
+
+#: ../src/Gui/settings.glade.h:8
+msgid "C_onfigure plugin"
+msgstr "Ρύ_θμιση πρόσθετης λειτουργίας"
+
+#: ../src/Gui/settings.glade.h:9
+msgid "Check package GPG signature"
+msgstr "έλεγχος υπογραφής GPG πακέτου"
+
+#: ../src/Gui/settings.glade.h:10
+msgid "Common"
+msgstr "Κοινά"
+
+#: ../src/Gui/settings.glade.h:11
+msgid "Cron"
+msgstr "Cron"
+
+#: ../src/Gui/settings.glade.h:12
+msgid "Database backend: "
+msgstr "Backend βάσης δεδομένων"
+
+#: ../src/Gui/settings.glade.h:13
+msgid "Edit blacklisted packages"
+msgstr "Επεξεργασία πακέτων της μαύρης λίστας"
+
+#: ../src/Gui/settings.glade.h:14
+msgid "GPG Keys"
+msgstr "Κλειδιά GPG"
+
+#: ../src/Gui/settings.glade.h:15
+msgid "GPG keys: "
+msgstr "Κλειδιά GPG:"
+
+#: ../src/Gui/settings.glade.h:16
+msgid "Global Settings"
+msgstr "Καθολικές ρυθμίσεις"
+
+#: ../src/Gui/settings.glade.h:17
+msgid "Max coredump storage size(MB):"
+msgstr "Μέγιστο μέγεθος αποθηκευτικού χώρου coredump (MB):"
+
+#: ../src/Gui/settings.glade.h:18
+msgid "Nothing selected"
+msgstr "Καμία επιλογή"
+
+#: ../src/Gui/settings.glade.h:19
+msgid "Plugin Details"
+msgstr "Λεπτομέρειες πρόσθετης λειτουργίας"
+
+#: ../src/Gui/settings.glade.h:20
+msgid "Settings"
+msgstr "Ρυθμίσεις"
+
+#: ../src/Gui/settings.glade.h:21
+msgid "This function is not implemented yet!"
+msgstr "Αυτή η λειτουργία δεν έχει ακόμα εφαρμοστεί!"
+
+#: ../src/Gui/settings.glade.h:22
+msgid "Version:"
+msgstr "Έκδοση:"
+
+#: ../src/Gui/settings.glade.h:23
+msgid "Web Site:"
+msgstr "Ιστοσελίδα:"
+
+#: ../src/Gui/settings.glade.h:24
+msgid "gtk-add"
+msgstr "gtk-add"
+
+#: ../src/Gui/settings.glade.h:25
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
+
+#: ../src/Gui/settings.glade.h:26
+msgid "gtk-close"
+msgstr "gtk-close"
+
+#: ../src/Gui/settings.glade.h:28
+msgid "gtk-remove"
+msgstr "gtk-remove"
+
+#: ../src/Applet/Applet.cpp:79
+#, c-format
+msgid "A crash in package %s has been detected"
+msgstr "Εντοπίστηκε μια κατάρρευση στην εφαρμογή %s"
+
+#: ../src/Applet/Applet.cpp:138
+msgid "ABRT service has been started"
+msgstr "Η υπηρεσία ABRT έχει ξεκινήσει"
+
+#: ../src/Applet/Applet.cpp:140
+#: ../src/Applet/Applet.cpp:254
+msgid "ABRT service is not running"
+msgstr "Η υπηρεσία ABRT δεν εκτελείται"
+
+#: ../src/Applet/CCApplet.cpp:185
+msgid "Warning"
+msgstr "Προειδοποίηση"
+
+#: ../src/Daemon/Daemon.cpp:531
+msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."
+msgstr "Το μέγεθος της αναφοράς έχει υπερβεί το όριο, Παρακαλώ ελέγξτε την τιμή του MaxCrashReportsSize στο abrt.conf."
+
+#: ../lib/Plugins/Bugzilla.cpp:316
+#, c-format
+msgid "Bug is already reported: %i"
+msgstr "Το σφάλμα έχει ήδη αναφερθεί %i"
+
+#: ../lib/Plugins/Bugzilla.cpp:378
+#, c-format
+msgid "New bug id: %i"
+msgstr "Νέο id σφάλματος;%i"
+
+#: ../lib/Plugins/Bugzilla.cpp:471
+msgid "Checking for duplicates..."
+msgstr "Έλεγχος για ίδια σφάλματα"
+
+#: ../lib/Plugins/Bugzilla.cpp:474
+msgid "Logging into bugzilla..."
+msgstr "Σύνδεση στον bugzilla..."
+
+#: ../lib/Plugins/Bugzilla.cpp:478
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Κενό όνομα χρήστη και κωδικός. Παρακαλώ ελέγξτε το Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:484
+msgid "Checking CC..."
+msgstr "Έλεγχος CC..."
+
+#: ../lib/Plugins/Bugzilla.cpp:493
+msgid "Creating new bug..."
+msgstr "Δημιουργία νέας αναφοράς σφάλματος..."
+
+#: ../lib/Plugins/Bugzilla.cpp:497
+msgid "Logging out..."
+msgstr "Αποσύνδεση..."
+
+#: ../lib/Plugins/Kerneloops.cpp:37
+msgid "Getting local universal unique identification"
+msgstr "Λήψη τοπικού μοναδικού αναγνωριστικού"
+
+#: ../lib/Plugins/CCpp.cpp:228
+msgid "Getting backtrace..."
+msgstr "Λήψη backtrace..."
+
+#: ../lib/Plugins/CCpp.cpp:526
+#: ../lib/Plugins/CCpp.cpp:653
+msgid "Searching for debug-info packages..."
+msgstr "Αναζήτηση για πακέτα debug-info..."
+
+#: ../lib/Plugins/CCpp.cpp:588
+#: ../lib/Plugins/CCpp.cpp:687
+msgid "Downloading and installing debug-info packages..."
+msgstr "Λήψη και εγκατάσταση πακέτων debug-info..."
+
+#: ../lib/Plugins/CCpp.cpp:792
+msgid "Getting local universal unique identification..."
+msgstr "Λήψη τοπικού μοναδικού αναγνωριστικού..."
+
+#: ../lib/Plugins/CCpp.cpp:811
+msgid "Getting global universal unique identification..."
+msgstr "Λήψη καθολικού μοναδικού αναγνωριστικού..."
+
+#: ../lib/Plugins/CCpp.cpp:856
+msgid "Starting report creation..."
+msgstr "Εκκίνηση δημιουργίας αναφοράς..."
+
+#: ../lib/Plugins/CCpp.cpp:886
+msgid "Skipping debuginfo installation"
+msgstr "Παράκαμψη εγκατάστασης debuginfo "
+
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
+msgid "Creating and submitting a report..."
+msgstr "Δημιουργία και υποβολή αναφοράς..."
+
+#: ../lib/Plugins/Logger.cpp:57
+#: ../lib/Plugins/Mailx.cpp:124
+msgid "Creating a report..."
+msgstr "Δημιουργία αναφοράς..."
+
+#: ../lib/Plugins/RunApp.cpp:64
+msgid "Executing RunApp plugin..."
+msgstr "Εκτέλεση πρόσθετης λειτουργίας RunApp..."
+
+#: ../lib/Plugins/FileTransfer.cpp:63
+#: ../lib/Plugins/FileTransfer.cpp:381
+msgid "FileTransfer: URL not specified"
+msgstr "Μεταφορά αρχείου: Δεν έχει καθοριστεί URL"
+
+#: ../lib/Plugins/FileTransfer.cpp:67
+#, c-format
+msgid "Sending archive %s to %s"
+msgstr "Αποστολή αρχείου %s στο %s"
+
+#: ../lib/Plugins/FileTransfer.cpp:309
+msgid "File Transfer: Creating a report..."
+msgstr "Μεταφορά αρχείου: Δημιουργία αναφοράς..."
+
+#: ../lib/Plugins/FileTransfer.cpp:334
+#, c-format
+msgid "Can't create and send an archive: %s"
+msgstr "Αδυναμία δημιουργίας και αποστολής αρχείου: %s "
+
+#: ../lib/Plugins/FileTransfer.cpp:359
+#, c-format
+msgid "Can't create and send an archive %s"
+msgstr "Αδυναμία δημιουργίας και αποστολής αρχείου: %s"
+
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
+msgid "Creating kernel oops crash reports..."
+msgstr "Δημιουργία αναφορών κατάρρευσης kernel oops..."
+
+#: ../lib/Plugins/Mailx.cpp:109
+msgid "Sending an email..."
+msgstr "Αποστολή ενός email..."
+
+#: ../lib/Plugins/SOSreport.cpp:100
+msgid "Executing SOSreport plugin..."
+msgstr "Εκτέλεση πρόσθετης λειτουργίας SOSreport..."
+
+#: ../lib/Plugins/SOSreport.cpp:122
+#, c-format
+msgid "running sosreport: %s"
+msgstr "εκτέλεση sosreport: %s "
+
+#: ../lib/Plugins/SOSreport.cpp:137
+msgid "done running sosreport"
+msgstr "ολοκληρώθηκε η εκτέλεση του sosreport"
+
+#~ msgid "gtk-refresh"
+#~ msgstr "gtk-refresh"
+
diff --git a/po/es.po b/po/es.po
index 1589f200..6c146928 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt.master.es\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-22 09:44+0000\n"
-"PO-Revision-Date: 2009-10-22 09:16-0300\n"
+"POT-Creation-Date: 2009-11-07 09:49+0000\n"
+"PO-Revision-Date: 2009-11-07 09:31-0300\n"
"Last-Translator: Domingo Becker <domingobecker@gmail.com>\n"
"Language-Team: Spanish <fedora-trans-es@redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -25,23 +25,23 @@ msgstr "Otro cliente ya está siendo ejecutado, intentando despertarlo."
msgid "Got unexpected data from daemon (is the database properly updated?)."
msgstr "Se obtienen datos inesperados desde el demonio (¿está la Base de Datos correctamente actualizada?)"
-#: ../src/Gui/ABRTPlugin.py:48
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "Complementos analizadores"
-#: ../src/Gui/ABRTPlugin.py:49
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "Complementos de acción"
-#: ../src/Gui/ABRTPlugin.py:50
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "Complementos de informes"
-#: ../src/Gui/ABRTPlugin.py:51
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "Complementos de Bases de Datos"
-#: ../src/Gui/ABRTPlugin.py:90
+#: ../src/Gui/ABRTPlugin.py:97
msgid "Plugin name is not set, can't load it's settings"
msgstr "No se puso el nombre del complemento, no se puede cargar su configuración"
@@ -64,6 +64,7 @@ msgstr ""
"¿Falta la información de la depuración?"
#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -72,7 +73,7 @@ msgid "(C) 2009 Red Hat, Inc."
msgstr "(C) 2009 Red Hat, Inc."
#: ../src/Gui/ccgui.glade.h:3
-#: ../src/Gui/CCMainWindow.py:240
+#: ../src/Gui/CCMainWindow.py:244
msgid "<b>Not reported!</b>"
msgstr "<b>¡No informado!</b>"
@@ -86,7 +87,7 @@ msgstr "Acerca de ABRT"
#: ../src/Gui/ccgui.glade.h:6
msgid "Automatic Bug Reporting Tool"
-msgstr "Acerca de la Herramienta de Informe de Errores Automática"
+msgstr "Herramienta de Informe de Errores Automática"
#: ../src/Gui/ccgui.glade.h:7
msgid "Delete"
@@ -101,7 +102,7 @@ msgid "Plugins"
msgstr "Complementos"
#: ../src/Gui/ccgui.glade.h:10
-#: ../src/Gui/report.glade.h:2
+#: ../src/Gui/report.glade.h:3
msgid "Report"
msgstr "Informe"
@@ -136,10 +137,12 @@ msgstr "_Archivo"
msgid "_Help"
msgstr "Ay_uda"
+# Revisar si hay que traducir.
+# Ver como referencia los botones gtk que no habia que traducirlos
#. add pixbuff separatelly
#: ../src/Gui/CCMainWindow.py:80
msgid "Icon"
-msgstr "icono"
+msgstr "Icono"
#: ../src/Gui/CCMainWindow.py:88
msgid "Package"
@@ -161,7 +164,16 @@ msgstr "Tasa de caídas"
msgid "User"
msgstr "Usuario"
-#: ../src/Gui/CCMainWindow.py:178
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"No se puede mostrar el diálogo de configuración\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -170,7 +182,7 @@ msgstr ""
"¡No se pudo finalizar la tarea actual!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:195
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
@@ -179,16 +191,16 @@ msgstr ""
"Error intentando cargar la lista de volcado, por favor compruebe si el demonio abrt está siendo ejecutado\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:205
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "No se pudo obtener nombre de usuario para el uid %s"
-#: ../src/Gui/CCMainWindow.py:232
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
msgstr "<b> Esta caída ha sido reportada, usted puede encontrar el informe en:</b>\n"
-#: ../src/Gui/CCMainWindow.py:292
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -196,7 +208,7 @@ msgstr ""
"Incapaz de conseguir el informe!\n"
"¿Falta la información de la depuración?"
-#: ../src/Gui/CCMainWindow.py:310
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -205,17 +217,37 @@ msgstr ""
"¡El informe falló!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:329
-#: ../src/Gui/CCMainWindow.py:356
+#: ../src/Gui/CCMainWindow.py:333
+#: ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "Error al obtener el informe: %s"
-#: ../src/Gui/CCReporterDialog.py:167
+#: ../src/Gui/CCReporterDialog.py:173
msgid "Brief description how to reproduce this or what you did..."
msgstr "Breve descripción de cómo reproducir esto o lo que hizo..."
-#: ../src/Gui/CCReporterDialog.py:211
+#: ../src/Gui/CCReporterDialog.py:201
+#, python-format
+msgid ""
+"Reporting disabled because the backtrace is unusable!\n"
+"Please try to install debuginfo manually using command:<span color=\"blue\"> debuginfo-install %s </span>\n"
+"then use Refresh button to regenerate the backtrace."
+msgstr ""
+"¡El informe está deshabilitado porque el trazado es inútil!\n"
+"Por favor, intente instalar el paquete debuginfo manualmente\n"
+"usando el comando <span color=\"blue\"> debuginfo-install %s </span>\n"
+"y luego use el botón Actualizar para regenerar el trazado."
+
+#: ../src/Gui/CCReporterDialog.py:203
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "¡El trazado es inútil, no puede informar esto!"
+
+#: ../src/Gui/CCReporterDialog.py:209
+msgid "The bactrace is incomplete, please make sure you provide good steps to reproduce."
+msgstr "El trazado está incompleto, por favor, asegúrese de proveer bien los pasos para reproducir el error."
+
+#: ../src/Gui/CCReporterDialog.py:247
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
@@ -226,8 +258,9 @@ msgstr ""
#: ../src/Gui/dialogs.glade.h:1
msgid "Report done"
-msgstr "Informe hecho"
+msgstr "Informe terminado"
+# NO TRADUCIR, hacen referencia al boton gkt
#: ../src/Gui/dialogs.glade.h:2
#: ../src/Gui/settings.glade.h:27
msgid "gtk-ok"
@@ -252,37 +285,28 @@ msgstr "el combo box no está implementado"
msgid "Nothing to hydrate!"
msgstr "¡Nada para hidratar!"
-#: ../src/Gui/report.glade.h:1
+#: ../src/Gui/report.glade.h:2
msgid "Comment"
msgstr "Comentario"
-#: ../src/Gui/report.glade.h:3
+#: ../src/Gui/report.glade.h:4
msgid "Send"
msgstr "Enviar"
-#: ../src/Gui/report.glade.h:4
-#: ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
-
-#: ../src/Gui/report.glade.h:5
-msgid "gtk-refresh"
-msgstr "gtk-refresh"
-
-#: ../src/Gui/SettingsDialog.py:34
-#: ../src/Gui/SettingsDialog.py:51
+#: ../src/Gui/SettingsDialog.py:33
+#: ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Seleccione un complemento</b>"
-#: ../src/Gui/SettingsDialog.py:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Seleccione la base de datos de fondo</b>"
-#: ../src/Gui/SettingsDialog.py:168
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
msgstr "Eliminar este trabajo"
-#: ../src/Gui/SettingsDialog.py:211
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "Eliminar esta acción"
@@ -316,7 +340,7 @@ msgstr "Paquetes en la Blacklist"
#: ../src/Gui/settings.glade.h:8
msgid "C_onfigure plugin"
-msgstr "C_onfigure Complemento"
+msgstr "C_onfigurar Complemento"
#: ../src/Gui/settings.glade.h:9
msgid "Check package GPG signature"
@@ -344,7 +368,7 @@ msgstr "LLaves GPG"
#: ../src/Gui/settings.glade.h:15
msgid "GPG keys: "
-msgstr "LLaves GPG"
+msgstr "LLaves GPG:"
#: ../src/Gui/settings.glade.h:16
msgid "Global Settings"
@@ -378,29 +402,37 @@ msgstr "Version:"
msgid "Web Site:"
msgstr "Página Web:"
+# NO TRADUCIR, hacen referencia al boton gkt
#: ../src/Gui/settings.glade.h:24
msgid "gtk-add"
msgstr "gtk-add"
+# NO TRADUCIR, hacen referencia al boton gkt
+#: ../src/Gui/settings.glade.h:25
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
+
+# NO TRADUCIR, hacen referencia al boton gkt
#: ../src/Gui/settings.glade.h:26
msgid "gtk-close"
-msgstr "gtk-cerrado"
+msgstr "gtk-close"
+# NO TRADUCIR, hacen referencia al boton gkt
#: ../src/Gui/settings.glade.h:28
msgid "gtk-remove"
-msgstr "gtk-borra"
+msgstr "gtk-remove"
-#: ../src/Applet/Applet.cpp:71
+#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Ha sido detectado una caída en el paquete %s."
-#: ../src/Applet/Applet.cpp:130
+#: ../src/Applet/Applet.cpp:138
msgid "ABRT service has been started"
msgstr "El servicio ABRT ha sido ejecutado"
-#: ../src/Applet/Applet.cpp:132
-#: ../src/Applet/Applet.cpp:246
+#: ../src/Applet/Applet.cpp:140
+#: ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "El servicio ABRT no se está ejecutando"
@@ -408,45 +440,41 @@ msgstr "El servicio ABRT no se está ejecutando"
msgid "Warning"
msgstr "Aviso"
-#: ../src/Daemon/Daemon.cpp:542
+#: ../src/Daemon/Daemon.cpp:531
msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."
msgstr "El tamaño del informe excede la cuota. Por favor, verifique el valor de MaxCrashReportsSize del sistema en abrt.conf."
-#: ../lib/Plugins/Bugzilla.cpp:83
-msgid "Empty login and password. Please check Bugzilla.conf"
-msgstr "Usuario y contraseña vacios. Por favor compruebe el archivo Bugzilla.conf"
-
-#: ../lib/Plugins/Bugzilla.cpp:205
-msgid "Bug is already reported: "
-msgstr "El error ya ha sido informado:"
-
-#: ../lib/Plugins/Bugzilla.cpp:260
+#: ../lib/Plugins/Bugzilla.cpp:316
#, c-format
-msgid "Binary file %s will not be reported."
-msgstr "El archivo binario %s no será informado."
+msgid "Bug is already reported: %i"
+msgstr "El error ya ha sido informado: %i"
-#: ../lib/Plugins/Bugzilla.cpp:330
-msgid "New bug id: "
-msgstr "Nuevo id del error:"
+#: ../lib/Plugins/Bugzilla.cpp:378
+#, c-format
+msgid "New bug id: %i"
+msgstr "Nuevo id del error: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:471
msgid "Checking for duplicates..."
msgstr "Chequeando si hay duplicados..."
-#: ../lib/Plugins/Bugzilla.cpp:402
-#: ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:474
msgid "Logging into bugzilla..."
msgstr "Ingresando a bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:478
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Usuario y contraseña vacios. Por favor compruebe el archivo Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:484
msgid "Checking CC..."
msgstr "Chequeando CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:493
msgid "Creating new bug..."
msgstr "Creando un nuevo informe..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:497
msgid "Logging out..."
msgstr "Saliendo..."
@@ -454,69 +482,74 @@ msgstr "Saliendo..."
msgid "Getting local universal unique identification"
msgstr "Obteniendo la identificación única universal local"
-#: ../lib/Plugins/CCpp.cpp:161
+#: ../lib/Plugins/CCpp.cpp:228
msgid "Getting backtrace..."
msgstr "Obteniendo el backtrace..."
-#: ../lib/Plugins/CCpp.cpp:447
-#: ../lib/Plugins/CCpp.cpp:572
+#: ../lib/Plugins/CCpp.cpp:526
+#: ../lib/Plugins/CCpp.cpp:653
msgid "Searching for debug-info packages..."
msgstr "Buscando paquetes de información del depurador..."
-#: ../lib/Plugins/CCpp.cpp:509
-#: ../lib/Plugins/CCpp.cpp:607
+#: ../lib/Plugins/CCpp.cpp:588
+#: ../lib/Plugins/CCpp.cpp:687
msgid "Downloading and installing debug-info packages..."
msgstr "Descargando e instalando paquetes de información del depurador..."
-#: ../lib/Plugins/CCpp.cpp:650
+#: ../lib/Plugins/CCpp.cpp:792
msgid "Getting local universal unique identification..."
msgstr "Obteniendo la identificación única universal local..."
-#: ../lib/Plugins/CCpp.cpp:669
+#: ../lib/Plugins/CCpp.cpp:811
msgid "Getting global universal unique identification..."
msgstr "Obteniendo la identificación única universal global..."
-#: ../lib/Plugins/CCpp.cpp:714
+#: ../lib/Plugins/CCpp.cpp:856
msgid "Starting report creation..."
msgstr "Iniciando la creación del informe..."
-#: ../lib/Plugins/CCpp.cpp:745
+#: ../lib/Plugins/CCpp.cpp:886
msgid "Skipping debuginfo installation"
msgstr "Omita la instalación de la información de depuración"
-#: ../lib/Plugins/KerneloopsReporter.cpp:101
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
msgid "Creating and submitting a report..."
msgstr "Creando y enviando un informe..."
-#: ../lib/Plugins/Logger.cpp:58
-#: ../lib/Plugins/Mailx.cpp:123
+#: ../lib/Plugins/Logger.cpp:57
+#: ../lib/Plugins/Mailx.cpp:124
msgid "Creating a report..."
msgstr "Creando un informe..."
-#: ../lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:64
msgid "Executing RunApp plugin..."
msgstr "Ejecutando complemento RunApp..."
#: ../lib/Plugins/FileTransfer.cpp:63
-#: ../lib/Plugins/FileTransfer.cpp:409
+#: ../lib/Plugins/FileTransfer.cpp:381
msgid "FileTransfer: URL not specified"
-msgstr "FileTransfer: URL no especificada"
+msgstr "Transferencia de archivo: URL no especificada"
-#: ../lib/Plugins/FileTransfer.cpp:81
+#: ../lib/Plugins/FileTransfer.cpp:67
#, c-format
-msgid "Sending archive %s via %s"
-msgstr "Enviando archivo %s vía %s"
+msgid "Sending archive %s to %s"
+msgstr "Enviando archivo %s a %s"
-#: ../lib/Plugins/FileTransfer.cpp:336
+#: ../lib/Plugins/FileTransfer.cpp:309
msgid "File Transfer: Creating a report..."
msgstr "Transferencia de archivo: Creando un informe..."
-#: ../lib/Plugins/FileTransfer.cpp:358
-#: ../lib/Plugins/FileTransfer.cpp:386
-msgid "CFileTransfer::Run(): Cannot create and send an archive: "
-msgstr "CFileTransfer::Run(): no se puede crear y enviar un archivo: "
+#: ../lib/Plugins/FileTransfer.cpp:334
+#, c-format
+msgid "Can't create and send an archive: %s"
+msgstr "No se puede crear y enviar un archivo: %s"
-#: ../lib/Plugins/KerneloopsScanner.cpp:79
+#: ../lib/Plugins/FileTransfer.cpp:359
+#, c-format
+msgid "Can't create and send an archive %s"
+msgstr "No se puede crear y enviar un archivo %s"
+
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "Creando un informe de cuelgue de kernel oops..."
@@ -524,69 +557,16 @@ msgstr "Creando un informe de cuelgue de kernel oops..."
msgid "Sending an email..."
msgstr "Enviando un correo..."
-#: ../lib/Plugins/SOSreport.cpp:113
+#: ../lib/Plugins/SOSreport.cpp:100
msgid "Executing SOSreport plugin..."
msgstr "Ejecutando complemento SOSreport..."
-#: ../lib/Plugins/SOSreport.cpp:135
-msgid "running sosreport: "
-msgstr "lanzando.sosreport"
+#: ../lib/Plugins/SOSreport.cpp:122
+#, c-format
+msgid "running sosreport: %s"
+msgstr "ejecutando sosreport: %s"
-#: ../lib/Plugins/SOSreport.cpp:150
+#: ../lib/Plugins/SOSreport.cpp:137
msgid "done running sosreport"
-msgstr "Sosreport.corriendo"
-
-#~ msgid "Check CC and add coment +1..."
-#~ msgstr "Compruebe CC y añada un comentario +1"
-#~ msgid "Pending events: %i"
-#~ msgstr "Eventos pendientes: %i"
-#~ msgid "Can't create menu from the description, popup won't be available!\n"
-#~ msgstr ""
-#~ "No se puede crear un menú desde la descripción, la ventana emergente no "
-#~ "está disponible!\n"
-#~ msgid "Creating an archive..."
-#~ msgstr "Creando un archivo..."
-#~ msgid ""
-#~ "Error while opening plugin settings UI: \n"
-#~ "\n"
-#~ "%s"
-#~ msgstr ""
-#~ "Error intentando abrir las preferencias del complemento de interfaz de "
-#~ "usuario:\n"
-#~ "\n"
-#~ "%s"
-#~ msgid ""
-#~ "Can't save plugin settings:\n"
-#~ " %s"
-#~ msgstr ""
-#~ "No se pueden salvar las preferencias del complemento:\n"
-#~ "%s"
-#~ msgid "unknown response from settings dialog"
-#~ msgstr "Respuesta desconocida del diálogo de preferencias"
-#~ msgid "Applet is already running."
-#~ msgstr "La aplicación ya se está ejecutando."
-#~ msgid ""
-#~ "This is default handler, you should register your own with "
-#~ "ConnectCrashHandler"
-#~ msgstr ""
-#~ "Este es el controlador por defecto, usted puede registrarse con "
-#~ "ConnectCrashHandler"
-#~ msgid ""
-#~ "This is default handler, you should register your own with "
-#~ "ConnectQuotaExceedHandler"
-#~ msgstr ""
-#~ "Este es el controlador por defecto, debe registrar el suyo con "
-#~ "ConnectQuotaExceedHandler"
-#~ msgid "Out of memory"
-#~ msgstr "Sin memoria"
-#~ msgid "Getting local/global universal unique identification..."
-#~ msgstr "Obteniendo la identificación única universal local/global..."
-#~ msgid "Can't load gui description for SettingsDialog!"
-#~ msgstr "No se puede cargar interfaz gráfico de usuario para SettingsDialog!"
-#~ msgid "Name"
-#~ msgstr "Nombre"
-#~ msgid "Enabled"
-#~ msgstr "Habilitado"
-#~ msgid "Can't get plugin description"
-#~ msgstr "No se pudo obtener la descripción del complemento"
+msgstr "Sosreport corriendo"
diff --git a/po/fi.po b/po/fi.po
index 3adf33db..ccd1e70b 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -6,16 +6,14 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-09 16:26+0000\n"
-"PO-Revision-Date: 2009-10-09 20:52+0300\n"
+"POT-Creation-Date: 2009-11-08 20:52+0000\n"
+"PO-Revision-Date: 2009-11-08 23:07+0200\n"
"Last-Translator: Ville-Pekka Vainio <vpivaini@cs.helsinki.fi>\n"
"Language-Team: Finnish <laatu@lokalisointi.org>\n"
-"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Virtaal 0.4.0\n"
#: ../src/Gui/ABRTExceptions.py:6
msgid "Another client is already running, trying to wake it."
@@ -26,23 +24,23 @@ msgid "Got unexpected data from daemon (is the database properly updated?)."
msgstr ""
"Saatiin odottamatonta dataa taustaprosessilta (onko tietokanta päivitetty?)"
-#: ../src/Gui/ABRTPlugin.py:48
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "Analysaattoriliitännäiset"
-#: ../src/Gui/ABRTPlugin.py:49
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "Toimintoliitännäiset"
-#: ../src/Gui/ABRTPlugin.py:50
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "Raportointiliitännäiset"
-#: ../src/Gui/ABRTPlugin.py:51
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "Tietokantaliitännäiset"
-#: ../src/Gui/ABRTPlugin.py:90
+#: ../src/Gui/ABRTPlugin.py:97
msgid "Plugin name is not set, can't load it's settings"
msgstr "Liitännäisen nimeä ei ole asetettu, sen asetuksia ei voida ladata"
@@ -62,7 +60,7 @@ msgstr ""
"Taustaprosessi ei palauttanut kelvollista raporttitietoa\n"
"Puuttuuko debuginfo?"
-#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/ccgui.glade.h:1 ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -70,7 +68,7 @@ msgstr " "
msgid "(C) 2009 Red Hat, Inc."
msgstr "(C) 2009 Red Hat, Inc."
-#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:240
+#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244
msgid "<b>Not reported!</b>"
msgstr "<b>Ei raportoitu!</b>"
@@ -98,7 +96,7 @@ msgstr "Odota hetki..."
msgid "Plugins"
msgstr "Liitännäiset"
-#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:2
+#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:3
msgid "Report"
msgstr "Raportti"
@@ -170,7 +168,16 @@ msgstr "Kaatumisaste"
msgid "User"
msgstr "Käyttäjä"
-#: ../src/Gui/CCMainWindow.py:178
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Asetusikkunaa ei voida näyttää\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -179,7 +186,7 @@ msgstr ""
"Nykyistä tehtävää ei saatu valmiiksi!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:195
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
@@ -189,17 +196,17 @@ msgstr ""
"käynnissä\n"
" %s"
-#: ../src/Gui/CCMainWindow.py:205
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "Käyttäjänumeron %s käyttäjänimeä ei saatu selville"
-#: ../src/Gui/CCMainWindow.py:232
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
msgstr ""
"<b>Tämä kaatuminen on raportoitu, raportit on nähtävillä osoitteessa:</b>\n"
-#: ../src/Gui/CCMainWindow.py:292
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -207,7 +214,7 @@ msgstr ""
"Raporttia ei saatu!\n"
"Puuttuuko debuginfo?"
-#: ../src/Gui/CCMainWindow.py:308
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -216,12 +223,44 @@ msgstr ""
"Raportin tekeminen epäonnistui!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:340
+#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "Raportin noutaminen epäonnistui: %s"
-#: ../src/Gui/CCReporterDialog.py:98
+#: ../src/Gui/CCReporterDialog.py:173
+msgid "Brief description how to reproduce this or what you did..."
+msgstr ""
+"Lyhyt kuvaus siitä, miten tämän pystyy toistamaan tai mitä olit tekemässä..."
+
+#: ../src/Gui/CCReporterDialog.py:201
+#, python-format
+msgid ""
+"Reporting disabled because the backtrace is unusable!\n"
+"Please try to install debuginfo manually using command:<span color=\"blue\"> "
+"debuginfo-install %s </span>\n"
+"then use Refresh button to regenerate the backtrace."
+msgstr ""
+"Raportointi on poistettu käytöstä, koska virheenjäljitystiedot ovat "
+"hyödyttömät!\n"
+"Yritä asentaa debuginfo manuaalisesti komennolla:<span color=\"blue\"> "
+"debuginfo-install %s </span>\n"
+"Käytä sitten Päivitä-painiketta virheenjäljitystietojen generoimiseksi "
+"uudelleen."
+
+#: ../src/Gui/CCReporterDialog.py:203
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "Virheenjäljitystiedot ovat hyödyttömät, tätä ei voi raportoida!"
+
+#: ../src/Gui/CCReporterDialog.py:209
+msgid ""
+"The bactrace is incomplete, please make sure you provide good steps to "
+"reproduce."
+msgstr ""
+"Virheenjäljitystiedot ovat epätäydelliset, varmista että olet kertonut "
+"tarkat vaiheet virheen toistamiseen."
+
+#: ../src/Gui/CCReporterDialog.py:247
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive "
@@ -232,11 +271,6 @@ msgstr ""
"yksityisiä tietoja!\n"
"Haluatko todella lähettää <b>%s</b>?\n"
-#: ../src/Gui/CCReporterDialog.py:111
-msgid "Brief description how to reproduce this or what you did..."
-msgstr ""
-"Lyhyt kuvaus siitä, miten tämän pystyy toistamaan tai mitä olit tekemässä..."
-
#: ../src/Gui/dialogs.glade.h:1
msgid "Report done"
msgstr "Raportti on valmis"
@@ -261,33 +295,29 @@ msgstr "alasvetovalikkoa ei ole toteutettu"
#: ../src/Gui/PluginSettingsUI.py:64
msgid "Nothing to hydrate!"
-msgstr ""
+msgstr "Graafista käyttöliittymää ei voi näyttää!"
-#: ../src/Gui/report.glade.h:1
+#: ../src/Gui/report.glade.h:2
msgid "Comment"
msgstr "Kommentti"
-#: ../src/Gui/report.glade.h:3
+#: ../src/Gui/report.glade.h:4
msgid "Send"
msgstr "Lähetä"
-#: ../src/Gui/report.glade.h:4 ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
-
-#: ../src/Gui/SettingsDialog.py:34 ../src/Gui/SettingsDialog.py:51
+#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Valitse liitännäinen</b>"
-#: ../src/Gui/SettingsDialog.py:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Valitse tietokannan taustajärjestelmä</b>"
-#: ../src/Gui/SettingsDialog.py:168
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
msgstr "Poista tämä työ"
-#: ../src/Gui/SettingsDialog.py:211
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "Poista tämä toiminto"
@@ -387,6 +417,10 @@ msgstr "Verkkosivu:"
msgid "gtk-add"
msgstr "gtk-add"
+#: ../src/Gui/settings.glade.h:25
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
+
#: ../src/Gui/settings.glade.h:26
msgid "gtk-close"
msgstr "gtk-close"
@@ -395,16 +429,16 @@ msgstr "gtk-close"
msgid "gtk-remove"
msgstr "gtk-remove"
-#: ../src/Applet/Applet.cpp:71
+#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Paketissa %s on huomattu kaatuminen"
-#: ../src/Applet/Applet.cpp:130
+#: ../src/Applet/Applet.cpp:138
msgid "ABRT service has been started"
msgstr "ABRT-palvelu on käynnistetty"
-#: ../src/Applet/Applet.cpp:132 ../src/Applet/Applet.cpp:246
+#: ../src/Applet/Applet.cpp:140 ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "ABRT-palvelu ei ole käytössä"
@@ -412,7 +446,7 @@ msgstr "ABRT-palvelu ei ole käytössä"
msgid "Warning"
msgstr "Varoitus"
-#: ../src/Daemon/Daemon.cpp:542
+#: ../src/Daemon/Daemon.cpp:531
msgid ""
"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
"value in abrt.conf."
@@ -420,40 +454,37 @@ msgstr ""
"Raportin koko ylitti sille annetun rajan. Tarkista järjestelmän "
"MaxCrashReportsSize-arvo abrt.conf-tiedostossa."
-#: ../lib/Plugins/Bugzilla.cpp:83
-msgid "Empty login and password. Please check Bugzilla.conf"
-msgstr "Käyttäjätunnus ja salasana ovat tyhjiä. Tarkista Bugzilla.conf"
-
-#: ../lib/Plugins/Bugzilla.cpp:205
-msgid "Bug is already reported: "
-msgstr "Ohjelmavirheestä on jo tehty ilmoitus:"
-
-#: ../lib/Plugins/Bugzilla.cpp:260
+#: ../lib/Plugins/Bugzilla.cpp:316
#, c-format
-msgid "Binary file %s will not be reported."
-msgstr "Binääritiedostoa %s ei raportoida."
+msgid "Bug is already reported: %i"
+msgstr "Ohjelmavirheestä on jo tehty ilmoitus: %i"
-#: ../lib/Plugins/Bugzilla.cpp:330
-msgid "New bug id: "
-msgstr "Uuden ohjelmavirheilmoituksen tunnus:"
+#: ../lib/Plugins/Bugzilla.cpp:378
+#, c-format
+msgid "New bug id: %i"
+msgstr "Uuden ohjelmavirheilmoituksen tunnus: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:471
msgid "Checking for duplicates..."
msgstr "Etsitään samanlaisia..."
-#: ../lib/Plugins/Bugzilla.cpp:402 ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:474
msgid "Logging into bugzilla..."
msgstr "Kirjaudutaan bugzillaan..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:478
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Käyttäjätunnus ja salasana ovat tyhjiä. Tarkista Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:484
msgid "Checking CC..."
msgstr "Tarkistetaan CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:493
msgid "Creating new bug..."
msgstr "Luodaan uusi ohjelmavirheilmoitus..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:497
msgid "Logging out..."
msgstr "Kirjaudutaan ulos..."
@@ -461,64 +492,70 @@ msgstr "Kirjaudutaan ulos..."
msgid "Getting local universal unique identification"
msgstr "Haetaan paikallinen ainutkertainen tunnus"
-#: ../lib/Plugins/CCpp.cpp:153
+#: ../lib/Plugins/CCpp.cpp:228
msgid "Getting backtrace..."
msgstr "Haetaan pinolistausta..."
-#: ../lib/Plugins/CCpp.cpp:425
+#: ../lib/Plugins/CCpp.cpp:526 ../lib/Plugins/CCpp.cpp:653
msgid "Searching for debug-info packages..."
msgstr "Etsitään debug-info-paketteja..."
-#: ../lib/Plugins/CCpp.cpp:487
+#: ../lib/Plugins/CCpp.cpp:588 ../lib/Plugins/CCpp.cpp:687
msgid "Downloading and installing debug-info packages..."
msgstr "Ladataan ja asennetaan debug-info-paketteja..."
-#: ../lib/Plugins/CCpp.cpp:549
+#: ../lib/Plugins/CCpp.cpp:792
msgid "Getting local universal unique identification..."
msgstr "Haetaan paikallinen ainutkertainen tunnus..."
-#: ../lib/Plugins/CCpp.cpp:568
+#: ../lib/Plugins/CCpp.cpp:811
msgid "Getting global universal unique identification..."
msgstr "Haetaan yleinen ainutkertainen tunnus..."
-#: ../lib/Plugins/CCpp.cpp:619
+#: ../lib/Plugins/CCpp.cpp:856
msgid "Starting report creation..."
msgstr "Aloitetaan ilmoituksen tekeminen..."
-#: ../lib/Plugins/CCpp.cpp:649
+#: ../lib/Plugins/CCpp.cpp:886
msgid "Skipping debuginfo installation"
msgstr "Ohitetaan debuginfon asennus"
-#: ../lib/Plugins/KerneloopsReporter.cpp:101
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
msgid "Creating and submitting a report..."
msgstr "Luodaan ja lähetetään ilmoitus..."
-#: ../lib/Plugins/Logger.cpp:58 ../lib/Plugins/Mailx.cpp:123
+#: ../lib/Plugins/Logger.cpp:57 ../lib/Plugins/Mailx.cpp:124
msgid "Creating a report..."
msgstr "Luodaan ilmoitus..."
-#: ../lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:64
msgid "Executing RunApp plugin..."
msgstr "Suoritetaan RunApp-liitännäinen..."
-#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:409
+#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:381
msgid "FileTransfer: URL not specified"
msgstr "FileTransfer: URL:ää ei ole määritelty"
-#: ../lib/Plugins/FileTransfer.cpp:81
+#: ../lib/Plugins/FileTransfer.cpp:67
#, c-format
-msgid "Sending archive %s via %s"
-msgstr "Lähetetään arkisto %s protokollan %s avulla"
+msgid "Sending archive %s to %s"
+msgstr "Lähetetään arkisto %s osoitteeseen %s"
-#: ../lib/Plugins/FileTransfer.cpp:336
+#: ../lib/Plugins/FileTransfer.cpp:309
msgid "File Transfer: Creating a report..."
msgstr "Tiedostonsiirto: Luodaan ilmoitusta..."
-#: ../lib/Plugins/FileTransfer.cpp:358 ../lib/Plugins/FileTransfer.cpp:386
-msgid "CFileTransfer::Run(): Cannot create and send an archive: "
-msgstr "CFileTransfer::Run(): Ei voitu luoda ja lähettää arkistoa:"
+#: ../lib/Plugins/FileTransfer.cpp:334
+#, c-format
+msgid "Can't create and send an archive: %s"
+msgstr "Ei voitu luoda ja lähettää arkistoa: %s"
+
+#: ../lib/Plugins/FileTransfer.cpp:359
+#, c-format
+msgid "Can't create and send an archive %s"
+msgstr "Ei voitu luoda ja lähettää arkistoa %s"
-#: ../lib/Plugins/KerneloopsScanner.cpp:79
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "Luodaan kernel oops -kaatumisilmoituksia..."
@@ -526,18 +563,22 @@ msgstr "Luodaan kernel oops -kaatumisilmoituksia..."
msgid "Sending an email..."
msgstr "Lähetetään sähköpostia..."
-#: ../lib/Plugins/SOSreport.cpp:113
+#: ../lib/Plugins/SOSreport.cpp:100
msgid "Executing SOSreport plugin..."
msgstr "Suoritetaan SOSreport-liitännäinen..."
-#: ../lib/Plugins/SOSreport.cpp:135
-msgid "running sosreport: "
-msgstr "suoritetaan sosreport:"
+#: ../lib/Plugins/SOSreport.cpp:122
+#, c-format
+msgid "running sosreport: %s"
+msgstr "suoritetaan sosreport: %s"
-#: ../lib/Plugins/SOSreport.cpp:150
+#: ../lib/Plugins/SOSreport.cpp:137
msgid "done running sosreport"
msgstr "sosreportin suoritus valmistui"
+#~ msgid "Binary file %s will not be reported."
+#~ msgstr "Binääritiedostoa %s ei raportoida."
+
#~ msgid "Check CC and add coment +1..."
#~ msgstr "Tarkista CC ja lisää kommentti +1..."
@@ -561,13 +602,6 @@ msgstr "sosreportin suoritus valmistui"
#~ "\n"
#~ "%s"
-#~ msgid ""
-#~ "Can't save plugin settings:\n"
-#~ " %s"
-#~ msgstr ""
-#~ "Liitännäisen asetuksia ei voida tallentaa:\n"
-#~ " %s"
-
#~ msgid "unknown response from settings dialog"
#~ msgstr "asetusikkuna antoi tuntemattoman vastauksen"
diff --git a/po/nl.po b/po/nl.po
index 12f8903b..5fc9cb8a 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -9,10 +9,10 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-16 16:11+0000\n"
-"PO-Revision-Date: 2009-10-16 21:12+0200\n"
+"POT-Creation-Date: 2009-11-07 09:49+0000\n"
+"PO-Revision-Date: 2009-11-07 15:35+0100\n"
"Last-Translator: Geert Warrink <geert.warrink@onsnet.nu>\n"
-"Language-Team: nl <nl@li.org>\n"
+"Language-Team: nl <fedora-trans-list@redhat.com>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -26,23 +26,23 @@ 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:48
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "Analyse plugins"
-#: ../src/Gui/ABRTPlugin.py:49
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "Actie plugins"
-#: ../src/Gui/ABRTPlugin.py:50
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "Rapporteer plugins"
-#: ../src/Gui/ABRTPlugin.py:51
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "Databse plugins"
-#: ../src/Gui/ABRTPlugin.py:90
+#: ../src/Gui/ABRTPlugin.py:97
msgid "Plugin name is not set, can't load it's settings"
msgstr "Plugin naam is niet opgegeven, kan zijn instellingen niet laden"
@@ -62,7 +62,7 @@ msgstr ""
"Daemon gaf geen geldige rapport info terug\n"
"Mist debuginfo?"
-#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/ccgui.glade.h:1 ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -70,7 +70,7 @@ msgstr " "
msgid "(C) 2009 Red Hat, Inc."
msgstr "(C) 2009 Red Hat, Inc."
-#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:240
+#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244
msgid "<b>Not reported!</b>"
msgstr "<b>Niet gerapporteerd!</b>"
@@ -98,7 +98,7 @@ msgstr "Wacht a.u.b..."
msgid "Plugins"
msgstr "Plugins"
-#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:2
+#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:3
msgid "Report"
msgstr "Rapport"
@@ -171,7 +171,16 @@ msgstr "Crash rate"
msgid "User"
msgstr "Gebruiker"
-#: ../src/Gui/CCMainWindow.py:178
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Kan de instellingen dialoog niet tonen\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -180,7 +189,7 @@ msgstr ""
"Kan huidige taak niet afmaken!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:195
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
@@ -190,16 +199,16 @@ msgstr ""
"draait\n"
" %s"
-#: ../src/Gui/CCMainWindow.py:205
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "Kan geen gebruikersnaam voor uid %s krijgen"
-#: ../src/Gui/CCMainWindow.py:232
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
msgstr "<b>Deze crash is gerapporteerd, je kunt het rapport vinden op:</b>\n"
-#: ../src/Gui/CCMainWindow.py:292
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -207,7 +216,7 @@ msgstr ""
"Kan geen rapport krijgen!\n"
"Mist debuginfo?"
-#: ../src/Gui/CCMainWindow.py:310
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -216,16 +225,41 @@ msgstr ""
"Rapporteren mislukte!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:329 ../src/Gui/CCMainWindow.py:356
+#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "Fout tijdens het verkrijgen van het rapport: %s"
-#: ../src/Gui/CCReporterDialog.py:167
+#: ../src/Gui/CCReporterDialog.py:173
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:211
+#: ../src/Gui/CCReporterDialog.py:201
+#, python-format
+msgid ""
+"Reporting disabled because the backtrace is unusable!\n"
+"Please try to install debuginfo manually using command:<span color=\"blue\"> "
+"debuginfo-install %s </span>\n"
+"then use Refresh button to regenerate the backtrace."
+msgstr ""
+"Rapportage afgebroken omdat de backtrace onbruikbaar is!\n"
+"Probeer a.u.b. debuginfo handmatig te installeren met: <span color=\"blue\"> "
+"debuginfo-install %s </span>\n"
+"en gebruik dan de Verversen knop om de backtrace "
+
+#: ../src/Gui/CCReporterDialog.py:203
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "De backtrace in niet bruikbaar, je kunt dit niet rapporteren!"
+
+#: ../src/Gui/CCReporterDialog.py:209
+msgid ""
+"The bactrace is incomplete, please make sure you provide good steps to "
+"reproduce."
+msgstr ""
+"De backtrace is niet compleet, wees er zeker van om voor het genereren de "
+"juiste stappen op te volgen."
+
+#: ../src/Gui/CCReporterDialog.py:247
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive "
@@ -262,35 +296,27 @@ msgstr "combo box is niet geïmplementeertd"
msgid "Nothing to hydrate!"
msgstr "Kan het niet hard maken!"
-#: ../src/Gui/report.glade.h:1
+#: ../src/Gui/report.glade.h:2
msgid "Comment"
msgstr "Commentaar"
-#: ../src/Gui/report.glade.h:3
+#: ../src/Gui/report.glade.h:4
msgid "Send"
msgstr "Verzenden"
-#: ../src/Gui/report.glade.h:4 ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
-
-#: ../src/Gui/report.glade.h:5
-msgid "gtk-refresh"
-msgstr "gtk-refresh"
-
-#: ../src/Gui/SettingsDialog.py:34 ../src/Gui/SettingsDialog.py:51
+#: ../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:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Selecteer database back-end</b>"
-#: ../src/Gui/SettingsDialog.py:168
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
msgstr "Verwijder deze taak"
-#: ../src/Gui/SettingsDialog.py:211
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "Verwijder deze actie"
@@ -390,6 +416,10 @@ msgstr "Website:"
msgid "gtk-add"
msgstr "gtk-add"
+#: ../src/Gui/settings.glade.h:25
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
+
#: ../src/Gui/settings.glade.h:26
msgid "gtk-close"
msgstr "gtk-close"
@@ -398,16 +428,16 @@ msgstr "gtk-close"
msgid "gtk-remove"
msgstr "gtk-remove"
-#: ../src/Applet/Applet.cpp:71
+#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Een crash in pakket %s is ontdekt"
-#: ../src/Applet/Applet.cpp:130
+#: ../src/Applet/Applet.cpp:138
msgid "ABRT service has been started"
msgstr "ABRT service is gestart"
-#: ../src/Applet/Applet.cpp:132 ../src/Applet/Applet.cpp:246
+#: ../src/Applet/Applet.cpp:140 ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "ABRT service draait niet"
@@ -415,7 +445,7 @@ msgstr "ABRT service draait niet"
msgid "Warning"
msgstr "Waarschuwing"
-#: ../src/Daemon/Daemon.cpp:542
+#: ../src/Daemon/Daemon.cpp:531
msgid ""
"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
"value in abrt.conf."
@@ -423,40 +453,37 @@ msgstr ""
"Rapport grootte overschreed quota. Controleer a.u.b. MaxCrashReportsSize "
"waarde van het systeem in abrt.conf."
-#: ../lib/Plugins/Bugzilla.cpp:83
-msgid "Empty login and password. Please check Bugzilla.conf"
-msgstr "Leeg login en wachtwoord. Check a.u.b. Bugzilla.conf"
-
-#: ../lib/Plugins/Bugzilla.cpp:205
-msgid "Bug is already reported: "
-msgstr "Bug is al aangemeld: "
-
-#: ../lib/Plugins/Bugzilla.cpp:260
+#: ../lib/Plugins/Bugzilla.cpp:316
#, c-format
-msgid "Binary file %s will not be reported."
-msgstr "Binair bestand %s wordt niet gerapporteerd."
+msgid "Bug is already reported: %i"
+msgstr "Bug is al aangemeld: %i"
-#: ../lib/Plugins/Bugzilla.cpp:330
-msgid "New bug id: "
-msgstr "Nieuwe bug id: "
+#: ../lib/Plugins/Bugzilla.cpp:378
+#, c-format
+msgid "New bug id: %i"
+msgstr "Nieuwe bug id: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:471
msgid "Checking for duplicates..."
msgstr "Controleren voor dubbele..."
-#: ../lib/Plugins/Bugzilla.cpp:402 ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:474
msgid "Logging into bugzilla..."
msgstr "Inloggen bij bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:478
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Leeg login en wachtwoord. Check a.u.b. Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:484
msgid "Checking CC..."
msgstr "Controleren van CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:493
msgid "Creating new bug..."
msgstr "Nieuwe bug aanmaken..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:497
msgid "Logging out..."
msgstr "Uitloggen..."
@@ -464,64 +491,70 @@ msgstr "Uitloggen..."
msgid "Getting local universal unique identification"
msgstr "Verkrijgen van locale universele unieke identificatie"
-#: ../lib/Plugins/CCpp.cpp:161
+#: ../lib/Plugins/CCpp.cpp:228
msgid "Getting backtrace..."
msgstr "Backtrace ophalen..."
-#: ../lib/Plugins/CCpp.cpp:442
+#: ../lib/Plugins/CCpp.cpp:526 ../lib/Plugins/CCpp.cpp:653
msgid "Searching for debug-info packages..."
msgstr "Zoeken naar debug-info pakketten..."
-#: ../lib/Plugins/CCpp.cpp:504
+#: ../lib/Plugins/CCpp.cpp:588 ../lib/Plugins/CCpp.cpp:687
msgid "Downloading and installing debug-info packages..."
msgstr "Downloaden en installeren van debug-info pakketten..."
-#: ../lib/Plugins/CCpp.cpp:566
+#: ../lib/Plugins/CCpp.cpp:792
msgid "Getting local universal unique identification..."
msgstr "Verkrijgen van locale universele unieke identificatie..."
-#: ../lib/Plugins/CCpp.cpp:585
+#: ../lib/Plugins/CCpp.cpp:811
msgid "Getting global universal unique identification..."
msgstr "Verkrijgen van golbale universele unieke identificatie..."
-#: ../lib/Plugins/CCpp.cpp:630
+#: ../lib/Plugins/CCpp.cpp:856
msgid "Starting report creation..."
msgstr "Beginnen met rapport aanmaken..."
-#: ../lib/Plugins/CCpp.cpp:661
+#: ../lib/Plugins/CCpp.cpp:886
msgid "Skipping debuginfo installation"
msgstr "Sla debuginfo installatie over"
-#: ../lib/Plugins/KerneloopsReporter.cpp:101
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
msgid "Creating and submitting a report..."
msgstr "Aanmaken en indienen van rapport..."
-#: ../lib/Plugins/Logger.cpp:58 ../lib/Plugins/Mailx.cpp:123
+#: ../lib/Plugins/Logger.cpp:57 ../lib/Plugins/Mailx.cpp:124
msgid "Creating a report..."
msgstr "Rapport aanmaken..."
-#: ../lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:64
msgid "Executing RunApp plugin..."
msgstr "RunApp plugin draaien..."
-#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:409
+#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:381
msgid "FileTransfer: URL not specified"
msgstr "Bestandsoverdracht: URL niet opgegeven"
-#: ../lib/Plugins/FileTransfer.cpp:81
+#: ../lib/Plugins/FileTransfer.cpp:67
#, c-format
-msgid "Sending archive %s via %s"
-msgstr "Versturen van archief %s via %s"
+msgid "Sending archive %s to %s"
+msgstr "Versturen van archief %s naar %s"
-#: ../lib/Plugins/FileTransfer.cpp:336
+#: ../lib/Plugins/FileTransfer.cpp:309
msgid "File Transfer: Creating a report..."
msgstr "Bestandsoverdracht: Een rapport maken..."
-#: ../lib/Plugins/FileTransfer.cpp:358 ../lib/Plugins/FileTransfer.cpp:386
-msgid "CFileTransfer::Run(): Cannot create and send an archive: "
-msgstr "CFileTransfer::Run(): Kan geen archief maken en versturen: "
+#: ../lib/Plugins/FileTransfer.cpp:334
+#, c-format
+msgid "Can't create and send an archive: %s"
+msgstr "Kan geen archief maken en versturen: %s"
+
+#: ../lib/Plugins/FileTransfer.cpp:359
+#, 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:84
msgid "Creating kernel oops crash reports..."
msgstr "Aanmaken van kernel oops crash rapporten..."
@@ -529,18 +562,25 @@ msgstr "Aanmaken van kernel oops crash rapporten..."
msgid "Sending an email..."
msgstr "Versturen van email..."
-#: ../lib/Plugins/SOSreport.cpp:113
+#: ../lib/Plugins/SOSreport.cpp:100
msgid "Executing SOSreport plugin..."
msgstr "Uitvoeren van SOSreport plugin..."
-#: ../lib/Plugins/SOSreport.cpp:135
-msgid "running sosreport: "
-msgstr "sosreport draaien: "
+#: ../lib/Plugins/SOSreport.cpp:122
+#, c-format
+msgid "running sosreport: %s"
+msgstr "sosreport draaien: %s"
-#: ../lib/Plugins/SOSreport.cpp:150
+#: ../lib/Plugins/SOSreport.cpp:137
msgid "done running sosreport"
msgstr "klaar met het draaien van sosreport"
+#~ msgid "gtk-refresh"
+#~ msgstr "gtk-refresh"
+
+#~ msgid "Binary file %s will not be reported."
+#~ msgstr "Binair bestand %s wordt niet gerapporteerd."
+
#~ msgid "Check CC and add coment +1..."
#~ msgstr "Controleer CC en voeg commentaar toe +1..."
@@ -567,13 +607,6 @@ msgstr "klaar met het draaien van sosreport"
#~ "\n"
#~ "%s"
-#~ msgid ""
-#~ "Can't save plugin settings:\n"
-#~ " %s"
-#~ msgstr ""
-#~ "Kan plugin instellingen niet opslaan:\n"
-#~ " %s"
-
#~ msgid "unknown response from settings dialog"
#~ msgstr "onbekende reactie van de instellingen dialoog"
diff --git a/po/pa.po b/po/pa.po
index 6ef5bacf..4054a158 100644
--- a/po/pa.po
+++ b/po/pa.po
@@ -8,8 +8,8 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt.master.pa\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-09-29 14:46+0200\n"
-"PO-Revision-Date: 2009-09-25 06:24+0530\n"
+"POT-Creation-Date: 2009-11-07 09:49+0000\n"
+"PO-Revision-Date: 2009-11-07 18:51+0530\n"
"Last-Translator: A S Alam <aalam@users.sf.net>\n"
"Language-Team: Punjabi/Panjabi <punjabi-users@lists.sf.net>\n"
"MIME-Version: 1.0\n"
@@ -18,39 +18,43 @@ msgstr ""
"X-Generator: Lokalize 1.0\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-#: src/Gui/ABRTExceptions.py:4
+#: ../src/Gui/ABRTExceptions.py:6
msgid "Another client is already running, trying to wake it."
msgstr "ਹੋਰ ਕਲਾਇਟ ਪਹਿਲਾਂ ਹੀ ਚੱਲ ਰਿਹਾ ਹੈ, ਇਸ ਨੂੰ ਸਰਗਰਮ ਕਰਨ ਦੀ ਕੋਸ਼ਿਸ਼ ਕਰੋ।"
-#: src/Gui/ABRTExceptions.py:10
+#: ../src/Gui/ABRTExceptions.py:13
msgid "Got unexpected data from daemon (is the database properly updated?)."
msgstr "ਡੈਮਨ ਤੋਂ ਅਣਜਾਣ ਡਾਟਾ ਮਿਲਿਆ ਹੈ (ਕੀ ਡਾਟਾਬੇਸ ਠੀਕ ਤਰਾਂ ਅੱਪਡੇਟ ਹੋਇਆ ਹੈ?)।"
-#: src/Gui/ABRTPlugin.py:26
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "ਜਾਂਚਕਾਰ ਪਲੱਗਇਨ"
-#: src/Gui/ABRTPlugin.py:27
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "ਕਾਰਵਾਈ ਪਲੱਗਇਨ"
-#: src/Gui/ABRTPlugin.py:28
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "ਰਿਪੋਰਟਰ ਪਲੱਗਇਨ"
-#: src/Gui/ABRTPlugin.py:29
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "ਡਾਟਾਬੇਸ ਪਲੱਗਇਨ"
-#: src/Gui/CCDBusBackend.py:143
-msgid "Can't connect to dbus"
-msgstr "ਡੀਬੱਸ ਨਾਲ ਜੁੜ ਨਹੀਂ ਸਕਿਆ"
+#: ../src/Gui/ABRTPlugin.py:97
+msgid "Plugin name is not set, can't load it's settings"
+msgstr "ਪਲੱਗਇਨ ਨਾਂ ਸੈੱਟ ਨਹੀਂ ਹੈ, ਇਸ ਦੀ ਸੈਟਿੰਗ ਨਹੀਂ ਕੀਤੀ ਜਾ ਸਕਦੀ"
-#: src/Gui/CCDBusBackend.py:169
-msgid "Please check if abrt daemon is running."
-msgstr "ਚੈੱਕ ਕਰੋ ਕੀ abrt ਡੈਮਨ ਚੱਲ ਰਿਹਾ ਹੈ।"
+#: ../src/Gui/CCDBusBackend.py:74 ../src/Gui/CCDBusBackend.py:97
+msgid "Can't connect to system dbus"
+msgstr "ਸਿਸਟਮ ਡੀਬੱਸ ਨਾਲ ਕੁਨੈਕਟ ਨਹੀਂ ਕੀਤਾ ਜਾ ਸਕਦਾ"
-#: src/Gui/CCDBusBackend.py:187
+#: ../src/Gui/CCDBusBackend.py:100 ../src/Gui/CCDBusBackend.py:103
+msgid "Please check if abrt daemon is running"
+msgstr "ਚੈੱਕ ਕਰੋ ਕਿ ਕੀ abrt ਡੈਮਨ ਚੱਲ ਰਹੀ ਹੈ"
+
+#: ../src/Gui/CCDBusBackend.py:155
msgid ""
"Daemon did't return valid report info\n"
"Debuginfo is missing?"
@@ -58,27 +62,47 @@ msgstr ""
"ਡੈਮਨ ਨੇ ਠੀਕ ਰਿਪੋਰਟ ਜਾਣਕਾਰੀ ਨਹੀਂ ਭੇਜੀ\n"
"ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਉਪਲੱਬਧ ਨਹੀਂ ਹੈ?"
-#: src/Gui/ccgui.glade:6
-msgid "Please wait.."
-msgstr "ਉਡੀਕ ਜੀ..."
-
-#: src/Gui/ccgui.glade:16
-msgid "Working..."
-msgstr "ਕੰਮ ਕਰ ਰਿਹਾ ਹੈ..."
-
-#: src/Gui/ccgui.glade:49
+#: ../src/Gui/ccgui.glade.h:1 ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
-#: src/Gui/ccgui.glade:68
+#: ../src/Gui/ccgui.glade.h:2
+msgid "(C) 2009 Red Hat, Inc."
+msgstr "(C) ੨੦੦੯ Red Hat, Inc."
+
+#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244
+msgid "<b>Not reported!</b>"
+msgstr "<b>ਰਿਪੋਰਟ ਨਹੀਂ ਕੀਤਾ!</b>"
+
+#: ../src/Gui/ccgui.glade.h:4
+msgid "<span color=\"white\">Description</span>"
+msgstr "<span color=\"white\">ਵੇਰਵਾ</span>"
+
+#: ../src/Gui/ccgui.glade.h:5
msgid "About ABRT"
msgstr "ABRT ਬਾਰੇ"
-#: src/Gui/ccgui.glade:74
-msgid "(C) 2009 Red Hat, Inc."
-msgstr "(C) ੨੦੦੯ Red Hat, Inc."
+#: ../src/Gui/ccgui.glade.h:6
+msgid "Automatic Bug Reporting Tool"
+msgstr "ਆਟੋਮੈਟਿਕ ਬੱਗ ਰਿਪੋਰਟਿੰਗ ਟੂਲ"
+
+#: ../src/Gui/ccgui.glade.h:7
+msgid "Delete"
+msgstr "ਹਟਾਓ"
-#: src/Gui/ccgui.glade:75
+#: ../src/Gui/ccgui.glade.h:8
+msgid "Please wait.."
+msgstr "ਉਡੀਕੋ ਜੀ..."
+
+#: ../src/Gui/ccgui.glade.h:9
+msgid "Plugins"
+msgstr "ਪਲੱਗਇਨ"
+
+#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:3
+msgid "Report"
+msgstr "ਰਿਪੋਰਟ"
+
+#: ../src/Gui/ccgui.glade.h:11
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 "
@@ -104,68 +128,57 @@ msgstr ""
"ਤੁਹਾਨੂੰ ਇਸ ਪਰੋਗਰਾਮ ਨਾਲ GNU ਜਨਰਲ ਪਬਲਿਕ ਲਾਈਸੈਂਸ ਦੀ ਕਾਪੀ ਵੀ ਮਿਲਣੀ ਚਾਹੀਦੀ ਹੈ। ਜੇ ਨਹੀਂ, "
"ਤਾਂ <http://www.gnu.org/licenses/> ਵੇਖੋ।"
-#: src/Gui/ccgui.glade:106
-msgid "Automatic Bug Reporting Tool"
-msgstr "ਆਟੋਮੈਟਿਕ ਬੱਗ ਰਿਪੋਰਟਿੰਗ ਟੂਲ"
-
-#: src/Gui/ccgui.glade:118
-msgid "_File"
-msgstr "ਫਾਇਲ(_F)"
+#: ../src/Gui/ccgui.glade.h:16
+msgid "Working..."
+msgstr "ਕੰਮ ਕਰ ਰਿਹਾ ਹੈ..."
-#: src/Gui/ccgui.glade:138
+#: ../src/Gui/ccgui.glade.h:17
msgid "_Edit"
msgstr "ਸੋਧ(_E)"
-#: src/Gui/ccgui.glade:146
-msgid "Plugins"
-msgstr "ਪਲੱਗਇਨ"
+#: ../src/Gui/ccgui.glade.h:18
+msgid "_File"
+msgstr "ਫਾਇਲ(_F)"
-#: src/Gui/ccgui.glade:164
+#: ../src/Gui/ccgui.glade.h:19
msgid "_Help"
msgstr "ਮੱਦਦ(_H)"
-#: src/Gui/ccgui.glade:194 src/Gui/ccgui.glade:195
-msgid "Delete"
-msgstr "ਹਟਾਓ"
-
-#: src/Gui/ccgui.glade:207 src/Gui/ccgui.glade:208 src/Gui/ccgui.glade:335
-#: src/Gui/report.glade:7 src/Gui/report.glade:24
-msgid "Report"
-msgstr "ਰਿਪੋਰਟ"
-
-#: src/Gui/ccgui.glade:255
-msgid "<span color=\"white\">Description</span>"
-msgstr "<span color=\"white\">ਵੇਰਵਾ</span>"
-
-#: src/Gui/ccgui.glade:297 src/Gui/CCMainWindow.py:239
-msgid "<b>Not reported!</b>"
-msgstr "<b>ਰਿਪੋਰਟ ਨਹੀਂ ਕੀਤਾ!</b>"
-
-#: src/Gui/CCMainWindow.py:80
+#. add pixbuff separatelly
+#: ../src/Gui/CCMainWindow.py:80
msgid "Icon"
msgstr "ਆਈਕਾਨ"
-#: src/Gui/CCMainWindow.py:88
+#: ../src/Gui/CCMainWindow.py:88
msgid "Package"
msgstr "ਪੈਕੇਜ"
-#: src/Gui/CCMainWindow.py:89
+#: ../src/Gui/CCMainWindow.py:89
msgid "Application"
msgstr "ਐਪਲੀਕੇਸ਼ਨ"
-#: src/Gui/CCMainWindow.py:90
+#: ../src/Gui/CCMainWindow.py:90
msgid "Date"
msgstr "ਮਿਤੀ"
-#: src/Gui/CCMainWindow.py:91
+#: ../src/Gui/CCMainWindow.py:91
msgid "Crash Rate"
msgstr "ਕਰੈਸ਼ ਰੇਟ"
-#: src/Gui/CCMainWindow.py:93
+#: ../src/Gui/CCMainWindow.py:93
msgid "User"
msgstr "ਯੂਜ਼ਰ"
-#: src/Gui/CCMainWindow.py:177
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"%s\n"
+"ਸੈਟਿੰਗ ਡਾਈਲਾਗ ਨਹੀਂ ਵੇਖਾਇਆ ਜਾ ਸਕਦਾ"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -174,7 +187,7 @@ msgstr ""
"ਮੌਜੂਦਾ ਕਾਰਜ ਮੁਕੰਮਲ ਕਰਨ ਵਿੱਚ ਅਸਫਲ!\n"
"%s"
-#: src/Gui/CCMainWindow.py:194
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
@@ -183,16 +196,16 @@ msgstr ""
"ਡੰਪ-ਲਿਸਟ ਲੋਡ ਕਰਨ ਵੇਲੇ ਗਲਤੀ, ਚੈੱਕ ਕਰੋ ਕਿ ਕੀ abrt ਡੈਮਨ ਚੱਲ ਰਿਹਾ ਹੈ\n"
" %s"
-#: src/Gui/CCMainWindow.py:204
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "uid %s ਲਈ ਯੂਜ਼ਰ-ਨਾਂ ਨਹੀਂ ਲੈ ਸਕਿਆ"
-#: src/Gui/CCMainWindow.py:231
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
msgstr "<b> ਇਹ ਕਰੈਸ਼ ਰਿਪੋਰਟ ਕੀਤਾ ਗਿਆ ਹੈ, ਤੁਸੀਂ ਰਿਪੋਰਟ ਇੱਥੇ ਲੱਭ ਸਕਦੇ ਹੋ:</b>\n"
-#: src/Gui/CCMainWindow.py:291
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -200,7 +213,7 @@ msgstr ""
"ਰਿਪਰੋਟ ਲੈਣ ਵਿੱਚ ਅਸਮਰੱਥ!\n"
"ਕੀ ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਮੌਜੂਦ ਨਹੀਂ ਹੈ?"
-#: src/Gui/CCMainWindow.py:306
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -209,12 +222,39 @@ msgstr ""
"ਰਿਪੋਰਟਿੰਗ ਫੇਲ੍ਹ ਹੋਈ!\n"
"%s"
-#: src/Gui/CCMainWindow.py:338
+#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "ਰਿਪੋਰਟ ਲੈਣ ਵੇਲੇ ਗਲਤੀ: %s"
-#: src/Gui/CCReporterDialog.py:98
+#: ../src/Gui/CCReporterDialog.py:173
+msgid "Brief description how to reproduce this or what you did..."
+msgstr "ਇਸ ਨੂੰ ਪੈਦਾ ਕਰਨ ਬਾਰੇ ਸੰਖੇਪ ਜਾਣਕਾਰੀ ਜਾਂ ਤੁਸੀਂ ਕੀ ਕੀਤਾ ਹੈ..."
+
+#: ../src/Gui/CCReporterDialog.py:201
+#, python-format
+msgid ""
+"Reporting disabled because the backtrace is unusable!\n"
+"Please try to install debuginfo manually using command:<span color=\"blue\"> "
+"debuginfo-install %s </span>\n"
+"then use Refresh button to regenerate the backtrace."
+msgstr ""
+"ਰਿਪੋਰਟ ਦੇਣੀ ਆਯੋਗ ਹੈ, ਕਿਉਂਕਿ ਬੈਕਟਰੇਸ ਬੇਕਾਰ ਹੈ!\n"
+"<span color=\"blue\"> debuginfo-install %s </span>: ਕਮਾਂਡ ਦੀ ਵਰਤੋਂ "
+"ਕਰਕੇ ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਇੰਸਟਾਲ ਕਰਕੇ ਕੋਸ਼ਿਸ਼ ਕਰੋ ਜੀ\n"
+"ਤਦ ਬੈਕਟਰੇਸ ਮੁੜ-ਬਣਾਉਣ ਲਈ ਤਾਜ਼ਾ ਕਰੋ ਬਟਨ ਵਰਤੋਂ।"
+
+#: ../src/Gui/CCReporterDialog.py:203
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "ਬੈਕਟਰੇਸ ਬੇਕਾਰ ਹੈ, ਤੁਸੀਂ ਇਹ ਰਿਪੋਰਟ ਨਹੀਂ ਭੇਜ ਸਕਦੇ ਹੋ!"
+
+#: ../src/Gui/CCReporterDialog.py:209
+msgid ""
+"The bactrace is incomplete, please make sure you provide good steps to "
+"reproduce."
+msgstr "ਬੈਕਟਰੇਸ ਅਧੂਰਾ ਹੈ, ਯਕੀਨੀ ਬਣਾਉ ਕਿ ਤੁਸੀਂ ਇਹ ਬਣਾਉਣ ਲਈ ਠੀਕ ਕਦਮ ਚੁੱਕੇ ਹਨ।"
+
+#: ../src/Gui/CCReporterDialog.py:247
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive "
@@ -224,190 +264,182 @@ msgstr ""
"<b>ਚੇਤਾਵਨੀ</b>, ਤੁਸੀਂ ਡਾਟਾ ਭੇਜ ਰਹੇ ਹੋ ਜਿਸ ਵਿੱਚ ਜਰੂਰੀ ਜਾਣਕਾਰੀ ਹੋ ਸਕਦੀ ਹੈ।\n"
"ਕੀ ਤੁਸੀਂ ਯਕੀਨਨ ਭੇਜਣਾ ਚਾਹੁੰਦੇ ਹੋ <b>%s</b>?\n"
-#: src/Gui/CCReporterDialog.py:111
-msgid "Brief description how to reproduce this or what you did..."
-msgstr "ਇਸ ਨੂੰ ਪੈਦਾ ਕਰਨ ਬਾਰੇ ਸੰਖੇਪ ਜਾਣਕਾਰੀ ਜਾਂ ਤੁਸੀਂ ਕੀ ਕੀਤਾ ਹੈ..."
-
-#: src/Gui/dialogs.glade:7
+#: ../src/Gui/dialogs.glade.h:1
msgid "Report done"
msgstr "ਰਿਪੋਰਟ ਮੁਕੰਮਲ"
-#: src/Gui/dialogs.glade:47 src/Gui/settings.glade:695
-#: src/Gui/settings.glade:785
+#: ../src/Gui/dialogs.glade.h:2 ../src/Gui/settings.glade.h:27
msgid "gtk-ok"
msgstr "gtk-ok"
-#: src/Gui/PluginSettingsUI.py:17
+#: ../src/Gui/PluginSettingsUI.py:18
msgid "Can't find PluginDialog widget in UI description!"
msgstr "UI ਵੇਰਵੇ ਵਿੱਚ ਪਲੱਗਇਨਡਾਇਲਾਗ ਵਿਦਜੈਟ ਲੱਭ ਨਹੀਂ ਸਕਿਆ!"
-#: src/Gui/PluginSettingsUI.py:21
+#. we shouldn't get here, but just to be safe
+#: ../src/Gui/PluginSettingsUI.py:24
#, python-format
msgid "No UI for plugin %s"
msgstr "ਪਲੱਗਇਨ %s ਲਈ ਕੋਈ UI ਨਹੀਂ ਹੈ"
-#: src/Gui/PluginSettingsUI.py:38 src/Gui/PluginSettingsUI.py:64
+#: ../src/Gui/PluginSettingsUI.py:55 ../src/Gui/PluginSettingsUI.py:81
msgid "combo box is not implemented"
msgstr "ਕੰਬੋ ਬਾਕਸ ਸਥਾਪਤ ਨਹੀਂ"
-#: src/Gui/PluginSettingsUI.py:47
+#: ../src/Gui/PluginSettingsUI.py:64
msgid "Nothing to hydrate!"
msgstr "ਹਾਈਡਰੇਟ ਕਰਨ ਲਈ ਕੁਝ ਨਹੀਂ!"
-#: src/Gui/report.glade:64
+#: ../src/Gui/report.glade.h:2
msgid "Comment"
msgstr "ਟਿੱਪਣੀ"
-#: src/Gui/report.glade:104 src/Gui/settings.glade:682
-#: src/Gui/settings.glade:797
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
-
-#: src/Gui/report.glade:119
+#: ../src/Gui/report.glade.h:4
msgid "Send"
msgstr "ਭੇਜੋ"
-#: src/Gui/SettingsDialog.py:34 src/Gui/SettingsDialog.py:51
+#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>ਪਲੱਗਇਨ ਚੁਣੋ</b>"
-#: src/Gui/SettingsDialog.py:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>ਡਾਟਾਬੇਸ ਬੈਕਐਂਡ ਚੁਣੋ</b>"
-#: src/Gui/SettingsDialog.py:165
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
-msgstr "ਇਹ ਜੌਬ ਹਟਾਓ"
+msgstr "ਇਹ ਜਾਬ ਹਟਾਓ"
-#: src/Gui/SettingsDialog.py:208
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "ਇਹ ਕਾਰਵਾਈ ਹਟਾਓ"
-#: src/Gui/settings.glade:6
-msgid "Settings"
-msgstr "ਸੈਟਿੰਗ"
+#: ../src/Gui/settings.glade.h:1
+msgid "<b>Analyzer plugin</b>"
+msgstr "<b>ਜਾਂਚਕਾਰ ਪਲੱਗਇਨ</b>"
-#: src/Gui/settings.glade:46 src/Gui/settings.glade:55
-#: src/Gui/settings.glade:107 src/Gui/settings.glade:120
-#: src/Gui/settings.glade:133
-msgid "Nothing selected"
-msgstr "ਕੁਝ ਨਹੀਂ ਚੁਣਿਆ"
+#: ../src/Gui/settings.glade.h:2
+msgid "<b>Associated action</b>"
+msgstr "<b>ਸਬੰਧਤ ਕਾਰਵਾਈ</b>"
-#: src/Gui/settings.glade:72
-msgid "Web Site:"
-msgstr "ਵੈੱਬ ਸਾਈਟ:"
+#: ../src/Gui/settings.glade.h:3
+msgid "<b>Plugin</b>"
+msgstr "<b>ਪਲੱਗਇਨ</b>"
-#: src/Gui/settings.glade:84
+#: ../src/Gui/settings.glade.h:4
+msgid "<b>Time (or period)</b>"
+msgstr "<b>ਟਾਈਮ (ਜਾਂ ਅੰਤਰਾਲ)</b>"
+
+#: ../src/Gui/settings.glade.h:5
+msgid "Analyzers, Actions, Reporters"
+msgstr "ਜਾਂਚਕਾਰ, ਕਾਰਵਾਈਆਂ, ਰਿਪੋਰਟਰ"
+
+#: ../src/Gui/settings.glade.h:6
msgid "Author:"
msgstr "ਲੇਖਕ:"
-#: src/Gui/settings.glade:97
-msgid "Version:"
-msgstr "ਵਰਜਨ:"
-
-#: src/Gui/settings.glade:152
-msgid "Plugin Details"
-msgstr "ਪਲੱਗਇਨ ਵੇਰਵਾ"
+#: ../src/Gui/settings.glade.h:7
+msgid "Blacklisted packages: "
+msgstr "ਬਲੈਕਲਿਸਟ ਕੀਤੇ ਪੈਕੇਜ: "
-#: src/Gui/settings.glade:179
+#: ../src/Gui/settings.glade.h:8
msgid "C_onfigure plugin"
msgstr "ਪਲੱਗਇਨ ਸੰਰਚਨਾ(_O)"
-#: src/Gui/settings.glade:191
-msgid "gtk-close"
-msgstr "gtk-close"
-
-#: src/Gui/settings.glade:221
-msgid "Global Settings"
-msgstr "ਗਲੋਬਲ ਸੈਟਿੰਗ"
-
-#: src/Gui/settings.glade:240
+#: ../src/Gui/settings.glade.h:9
msgid "Check package GPG signature"
msgstr "ਪੈਕੇਜ GPG ਦਸਤਖਤ ਚੈੱਕ ਕਰੋ"
-#: src/Gui/settings.glade:256
+#: ../src/Gui/settings.glade.h:10
+msgid "Common"
+msgstr "ਆਮ"
+
+#: ../src/Gui/settings.glade.h:11
+msgid "Cron"
+msgstr "Cron"
+
+#: ../src/Gui/settings.glade.h:12
msgid "Database backend: "
msgstr "ਡਾਟਾਬੇਸ ਬੈਕਐਂਡ: "
-#: src/Gui/settings.glade:281
-msgid "Blacklisted packages: "
-msgstr "ਬਲੈਕਲਿਸਟ ਕੀਤੇ ਪੈਕੇਜ: "
+#: ../src/Gui/settings.glade.h:13
+msgid "Edit blacklisted packages"
+msgstr "ਬਲੈਕਲਿਸ ਕੀਤੇ ਪੈਕੇਜ ਸੋਧੋ"
-#: src/Gui/settings.glade:294
-msgid "Max coredump storage size(MB):"
-msgstr "ਵੱਧ-ਤੋਂ-ਵੱਧ ਕੋਰਡੰਪ ਸਟੋਰੇਜ਼ ਅਕਾਰ(MB):"
+#: ../src/Gui/settings.glade.h:14
+msgid "GPG Keys"
+msgstr "GPG ਕੁੰਜੀਆਂ"
-#: src/Gui/settings.glade:307
+#: ../src/Gui/settings.glade.h:15
msgid "GPG keys: "
msgstr "GPG ਕੁੰਜੀਆਂ: "
-#: src/Gui/settings.glade:349
-msgid "Edit blacklisted packages"
-msgstr "ਬਲੈਕਲਿਸ ਕੀਤੇ ਪੈਕੇਜ ਸੋਧੋ"
+#: ../src/Gui/settings.glade.h:16
+msgid "Global Settings"
+msgstr "ਗਲੋਬਲ ਸੈਟਿੰਗ"
-#: src/Gui/settings.glade:408
-msgid "Common"
-msgstr "ਆਮ"
+#: ../src/Gui/settings.glade.h:17
+msgid "Max coredump storage size(MB):"
+msgstr "ਵੱਧ-ਤੋਂ-ਵੱਧ ਕੋਰਡੰਪ ਸਟੋਰੇਜ਼ ਅਕਾਰ(MB):"
-#: src/Gui/settings.glade:438
-msgid "<b>Plugin</b>"
-msgstr "<b>ਪਲੱਗਇਨ</b>"
+#: ../src/Gui/settings.glade.h:18
+msgid "Nothing selected"
+msgstr "ਕੁਝ ਨਹੀਂ ਚੁਣਿਆ"
-#: src/Gui/settings.glade:448
-msgid "<b>Time (or period)</b>"
-msgstr "<b>ਟਾਈਮ (ਜਾਂ ਅੰਤਰਾਲ)</b>"
+#: ../src/Gui/settings.glade.h:19
+msgid "Plugin Details"
+msgstr "ਪਲੱਗਇਨ ਵੇਰਵਾ"
-#: src/Gui/settings.glade:510 src/Gui/settings.glade:624
-#: src/Gui/settings.glade:761
-msgid "gtk-add"
-msgstr "gtk-add"
+#: ../src/Gui/settings.glade.h:20
+msgid "Settings"
+msgstr "ਸੈਟਿੰਗ"
-#: src/Gui/settings.glade:534
-msgid "Cron"
-msgstr "Cron"
+#: ../src/Gui/settings.glade.h:21
+msgid "This function is not implemented yet!"
+msgstr "ਇਹ ਫੰਕਸ਼ਨ ਹਾਲੇ ਲਾਗੂ ਨਹੀਂ ਕੀਤਾ ਹੈ!"
-#: src/Gui/settings.glade:551
-msgid "<b>Analyzer plugin</b>"
-msgstr "<b>ਜਾਂਚਕਾਰ ਪਲੱਗਇਨ</b>"
+#: ../src/Gui/settings.glade.h:22
+msgid "Version:"
+msgstr "ਵਰਜਨ:"
-#: src/Gui/settings.glade:561
-msgid "<b>Associated action</b>"
-msgstr "<b>ਸੰਬੰਧਿਤ ਕਾਰਵਾਈ</b>"
+#: ../src/Gui/settings.glade.h:23
+msgid "Web Site:"
+msgstr "ਵੈੱਬ ਸਾਈਟ:"
-#: src/Gui/settings.glade:648
-msgid "Analyzers, Actions, Reporters"
-msgstr "ਜਾਂਚਕਾਰ, ਕਾਰਵਾਈਆਂ, ਰਿਪੋਰਟਰ"
+#: ../src/Gui/settings.glade.h:24
+msgid "gtk-add"
+msgstr "gtk-add"
-#: src/Gui/settings.glade:700
-msgid "This function is not implemented yet!"
-msgstr "ਇਹ ਫੰਕਸ਼ਨ ਹਾਲੇ ਲਾਗੂ ਨਹੀਂ ਕੀਤਾ ਹੈ!"
+#: ../src/Gui/settings.glade.h:25
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
-#: src/Gui/settings.glade:738
-msgid "GPG Keys"
-msgstr "GPG ਕੁੰਜੀਆਂ"
+#: ../src/Gui/settings.glade.h:26
+msgid "gtk-close"
+msgstr "gtk-close"
-#: src/Gui/settings.glade:773
+#: ../src/Gui/settings.glade.h:28
msgid "gtk-remove"
msgstr "gtk-remove"
-#: src/Applet/Applet.cpp:71
+#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "ਪੈਕੇਜ %s ਵਿੱਚ ਇੱਕ ਕਰੈਸ ਮਿਲਿਆ"
-#: src/Applet/Applet.cpp:130
+#: ../src/Applet/Applet.cpp:138
msgid "ABRT service has been started"
msgstr "ABRT ਸਰਵਿਸ ਚਾਲੂ ਹੋ ਗਈ ਹੈ"
-#: src/Applet/Applet.cpp:132 src/Applet/Applet.cpp:246
+#: ../src/Applet/Applet.cpp:140 ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "ABRT ਸਰਵਿਸ ਨਹੀਂ ਚੱਲ ਰਹੀ ਹੈ"
-#: src/Applet/CCApplet.cpp:185
+#: ../src/Applet/CCApplet.cpp:185
msgid "Warning"
msgstr "ਚੇਤਾਵਨੀ"
-#: src/Daemon/Daemon.cpp:546
+#: ../src/Daemon/Daemon.cpp:531
msgid ""
"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
"value in abrt.conf."
@@ -415,123 +447,127 @@ msgstr ""
"ਰਿਪੋਰਟ ਅਕਾਰ ਦਾ ਕੋਟਾ ਖਤਮ ਹੋ ਗਿਆ ਹੈ। abrt.conf ਵਿੱਚ ਸਿਸਟਮ MaxCrashReportsSize ਮੁੱਲ ਚੈੱਕ "
"ਕਰੋ ਜੀ।"
-#: lib/Plugins/Bugzilla.cpp:83
-msgid "Empty login and password. Please check Bugzilla.conf"
-msgstr "ਖਾਲੀ ਲਾਗਇਨ ਅਤੇ ਪਾਸਵਰਡ। Bugzilla.conf ਵੇਖੋ ਜੀ।"
+#: ../lib/Plugins/Bugzilla.cpp:316, c-format
+msgid "Bug is already reported: %i"
+msgstr "ਬੱਗ ਪਹਿਲਾਂ ਹੀ ਰਿਪੋਰਟ ਕੀਤਾ ਹੈ: %i"
-#: lib/Plugins/Bugzilla.cpp:227
-msgid "Bug is already reported: "
-msgstr "ਬੱਗ ਪਹਿਲਾਂ ਹੀ ਰਿਪੋਰਟ ਕੀਤਾ ਹੈ: "
+#: ../lib/Plugins/Bugzilla.cpp:378, c-format
+msgid "New bug id: %i"
+msgstr "ਨਵਾਂ ਬੱਗ id: %i"
-#: lib/Plugins/Bugzilla.cpp:282
-#, c-format
-msgid "Binary file %s will not be reported."
-msgstr "ਬਾਇਨਰੀ ਫਾਇਲ %s ਦੀ ਰਿਪੋਰਟ ਨਹੀਂ ਕੀਤੀ ਜਾਵੇਗੀ।"
-
-#: lib/Plugins/Bugzilla.cpp:352
-msgid "New bug id: "
-msgstr "ਨਵਾਂ ਬੱਗ id: "
-
-#: lib/Plugins/Bugzilla.cpp:421
+#: ../lib/Plugins/Bugzilla.cpp:471
msgid "Checking for duplicates..."
msgstr "ਡੁਪਲੀਕੇਟ ਲਈ ਜਾਂਚ ਜਾਰੀ..."
-#: lib/Plugins/Bugzilla.cpp:424 lib/Plugins/Bugzilla.cpp:436
+#: ../lib/Plugins/Bugzilla.cpp:474
msgid "Logging into bugzilla..."
msgstr "ਬੱਗਜ਼ੀਲਾ ਉੱਤੇ ਲਾਗਇਨ ਕੀਤਾ ਜਾਂਦਾ ਹੈ..."
-#: lib/Plugins/Bugzilla.cpp:427
-msgid "Check CC and add coment +1..."
-msgstr "CC ਚੁਣੋ ਅਤੇ +1 ਟਿੱਪਣੀ ਜੋੜੋ..."
+#: ../lib/Plugins/Bugzilla.cpp:478
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "ਖਾਲੀ ਲਾਗਇਨ ਅਤੇ ਪਾਸਵਰਡ। Bugzilla.conf ਵੇਖੋ ਜੀ।"
+
+#: ../lib/Plugins/Bugzilla.cpp:484
+msgid "Checking CC..."
+msgstr "CC ਚੈੱਕ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..."
-#: lib/Plugins/Bugzilla.cpp:448
+#: ../lib/Plugins/Bugzilla.cpp:493
msgid "Creating new bug..."
msgstr "ਨਵਾਂ ਬੱਗ ਬਣਾ ਰਿਹਾ ਹੈ..."
-#: lib/Plugins/Bugzilla.cpp:453
+#: ../lib/Plugins/Bugzilla.cpp:497
msgid "Logging out..."
msgstr "ਲਾਗਆਉਟ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ..."
-#: lib/Plugins/Kerneloops.cpp:37
+#: ../lib/Plugins/Kerneloops.cpp:37
msgid "Getting local universal unique identification"
-msgstr "ਲੋਕਲ ਯੂਨੀਵਰਸਲ ਯੂਨੀਕ ਇਡੈਂਟੀਫਿਕੇਸ਼ਨ ਲੈ ਰਿਹਾ ਹੈ"
+msgstr "ਲੋਕਲ ਯੂਨੀਵਰਸਲ ਵਿਲੱਖਣ ਪਛਾਣ ਲਈ ਜਾ ਰਹੀ ਹੈ"
-#: lib/Plugins/CCpp.cpp:146
+#: ../lib/Plugins/CCpp.cpp:228
msgid "Getting backtrace..."
msgstr "ਬੈਕਟਰੇਸ ਲੈ ਰਿਹਾ..."
-#: lib/Plugins/CCpp.cpp:410
+#: ../lib/Plugins/CCpp.cpp:526 ../lib/Plugins/CCpp.cpp:653
msgid "Searching for debug-info packages..."
-msgstr "ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਪੈਕੇਜ ਖੋਜ ਰਿਹਾ ਹੈ..."
+msgstr "ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਪੈਕੇਜ ਲਈ ਖੋਜ ਜਾਰੀ..."
-#: lib/Plugins/CCpp.cpp:444
+#: ../lib/Plugins/CCpp.cpp:588 ../lib/Plugins/CCpp.cpp:687
msgid "Downloading and installing debug-info packages..."
-msgstr "ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਪੈਕੇਜ ਡਾਊਨਲੋਡ ਅਤੇ ਇੰਸਟਾਲ ਕਰ ਰਿਹਾ ਹੈ..."
+msgstr "ਡੀਬੱਗ-ਜਾਣਕਾਰੀ ਪੈਕੇਜ ਡਾਊਨਲੋਡ ਤੇ ਇੰਸਟਾਲ ਕੀਤੇ ਜਾ ਰਹੇ ਹਨ..."
-#: lib/Plugins/CCpp.cpp:506
+#: ../lib/Plugins/CCpp.cpp:792
msgid "Getting local universal unique identification..."
-msgstr "ਲੋਕਲ ਯੂਨੀਵਰਸਲ ਯੂਨੀਕ ਇਡੈਂਟੀਫਿਕੇਸ਼ ਲੈ ਰਿਹਾ ਹੈ..."
+msgstr "ਲੋਕਲ ਯੂਨੀਵਰਸਲ ਵਿਲੱਖਣ ਪਛਾਣ ਲਈ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/CCpp.cpp:525
+#: ../lib/Plugins/CCpp.cpp:811
msgid "Getting global universal unique identification..."
-msgstr "ਗਲੋਬਲ ਯੂਨੀਵਰਸਲ ਯੂਨੀਕ ਇਡੈਂਟੀਫਿਕੇਸ਼ ਲੈ ਰਿਹਾ ਹੈ..."
+msgstr "ਗਲੋਬਲ ਯੂਨੀਵਰਸਲ ਵਿਲੱਕਣ ਪਛਾਣ ਲਈ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/CCpp.cpp:576
+#: ../lib/Plugins/CCpp.cpp:856
msgid "Starting report creation..."
msgstr "ਰਿਪੋਰਟ ਬਣਾਉਣੀ ਸ਼ੁਰੂ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/CCpp.cpp:605
+#: ../lib/Plugins/CCpp.cpp:886
msgid "Skipping debuginfo installation"
msgstr "debuginfo ਇੰਸਟਾਲੇਸ਼ਨ ਛੱਡੀ ਜਾ ਰਹੀ ਹੈ"
-#: lib/Plugins/KerneloopsReporter.cpp:101
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
msgid "Creating and submitting a report..."
msgstr "ਇੱਕ ਰਿਪੋਰਟ ਬਣਾਈ ਅਤੇ ਭੇਜੀ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/Logger.cpp:58 lib/Plugins/Mailx.cpp:123
+#: ../lib/Plugins/Logger.cpp:57 ../lib/Plugins/Mailx.cpp:124
msgid "Creating a report..."
-msgstr "ਰਿਪੋਰਟ ਬਣਾਓ..."
+msgstr "ਰਿਪੋਰਟ ਬਣਾਈ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:64
msgid "Executing RunApp plugin..."
msgstr "RunApp ਪਲੱਗਇਨ ਚਲਾਈ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/FileTransfer.cpp:60 lib/Plugins/FileTransfer.cpp:355
+#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:381
msgid "FileTransfer: URL not specified"
msgstr "ਫਾਇਲਟਰਾਂਸਫਰ: URL ਨਹੀਂ ਦਿੱਤਾ"
-#: lib/Plugins/FileTransfer.cpp:77
-#, c-format
-msgid "Sending archive %s via %s"
-msgstr "ਅਕਾਇਵ %s %s ਰਾਹੀਂ ਭੇਜਿਆ ਜਾ ਰਿਹਾ ਹੈ"
+#: ../lib/Plugins/FileTransfer.cpp:67, c-format
+msgid "Sending archive %s to %s"
+msgstr "%s ਅਕਾਇਵ %s ਨੂੰ ਭੇਜਿਆ ਜਾ ਰਿਹਾ ਹੈ"
-#: lib/Plugins/FileTransfer.cpp:284
+#: ../lib/Plugins/FileTransfer.cpp:309
msgid "File Transfer: Creating a report..."
msgstr "ਫਾਇਲ ਟਰਾਂਸਫਰ: ਰਿਪੋਰਟ ਬਣਾਈ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/FileTransfer.cpp:305 lib/Plugins/FileTransfer.cpp:334
-msgid "CFileTransfer::Run(): Cannot create and send an archive: "
-msgstr "CFileTransfer::Run(): Cannot create and send an archive: "
+#: ../lib/Plugins/FileTransfer.cpp:334, c-format
+msgid "Can't create and send an archive: %s"
+msgstr "%s :ਅਕਾਇਵ ਬਣਾਇਆ ਅਤੇ ਭੇਜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ"
+
+#: ../lib/Plugins/FileTransfer.cpp:359, c-format
+msgid "Can't create and send an archive %s"
+msgstr "%s ਅਕਾਇਵ ਬਣਾਇਆ ਅਤੇ ਭੇਜਿਆ ਨਹੀਂ ਜਾ ਸਕਦਾ"
-#: lib/Plugins/KerneloopsScanner.cpp:79
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "ਕਰਨਲ oops ਕਰੈਸ਼ ਰਿਪੋਰਟਾਂ ਬਣਾਈਆਂ ਜਾ ਰਹੀਆਂ ਹਨ..."
-#: lib/Plugins/Mailx.cpp:109
+#: ../lib/Plugins/Mailx.cpp:109
msgid "Sending an email..."
-msgstr "ਮੇਲ ਭੇਜੀ ਜਾ ਰਹੀ ਹੈ..."
+msgstr "ਈਮੇਲ ਭੇਜੀ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/SOSreport.cpp:113
+#: ../lib/Plugins/SOSreport.cpp:100
msgid "Executing SOSreport plugin..."
msgstr "SOSreport ਪਲੱਗਇਨ ਚਲਾਈ ਜਾ ਰਹੀ ਹੈ..."
-#: lib/Plugins/SOSreport.cpp:135
-msgid "running sosreport: "
-msgstr "sosreport ਚਲਾ ਰਿਹਾ ਹੈ: "
+#: ../lib/Plugins/SOSreport.cpp:122, c-format
+msgid "running sosreport: %s"
+msgstr "sosreport ਚਲਾਈ ਜਾ ਰਹੀ ਹੈ: %s "
-#: lib/Plugins/SOSreport.cpp:150
+#: ../lib/Plugins/SOSreport.cpp:137
msgid "done running sosreport"
-msgstr "sosreport ਚਲਾ ਦਿੱਤਾ ਹੈ"
+msgstr "sosreport ਚਲਾਉਣਾ ਮੁਕੰਮਲ"
+
+#~ msgid "Binary file %s will not be reported."
+#~ msgstr "ਬਾਇਨਰੀ ਫਾਇਲ %s ਦੀ ਰਿਪੋਰਟ ਨਹੀਂ ਕੀਤੀ ਜਾਵੇਗੀ।"
+
+#~ msgid "Check CC and add coment +1..."
+#~ msgstr "CC ਚੁਣੋ ਅਤੇ +1 ਟਿੱਪਣੀ ਜੋੜੋ..."
#~ msgid "Pending events: %i"
#~ msgstr "ਅਧੂਰੀਆਂ ਕਾਰਵਾਈਆਂ: %i"
diff --git a/po/pl.po b/po/pl.po
index ec18c064..f4836ab1 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-08 17:38+0000\n"
-"PO-Revision-Date: 2009-10-08 19:40+0200\n"
+"POT-Creation-Date: 2009-11-07 09:22+0000\n"
+"PO-Revision-Date: 2009-11-07 10:45+0100\n"
"Last-Translator: Piotr Drąg <piotrdrag@gmail.com>\n"
"Language-Team: Polish <fedora-trans-pl@redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -24,23 +24,23 @@ msgstr ""
"Otrzymano nieoczekiwane dane od demona (czy baza danych została właściwie "
"zaktualizowana?)."
-#: ../src/Gui/ABRTPlugin.py:48
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "Wtyczki analizy"
-#: ../src/Gui/ABRTPlugin.py:49
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "Wtyczki działań"
-#: ../src/Gui/ABRTPlugin.py:50
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "Wtyczki zgłaszania"
-#: ../src/Gui/ABRTPlugin.py:51
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "Wtyczki baz danych"
-#: ../src/Gui/ABRTPlugin.py:90
+#: ../src/Gui/ABRTPlugin.py:97
msgid "Plugin name is not set, can't load it's settings"
msgstr "Nie ustawiono nazwy wtyczki, nie można wczytać jej ustawień"
@@ -60,7 +60,7 @@ msgstr ""
"Demon nie zwrócił prawidłowych informacji o raporcie\n"
"Brak pakietów debuginfo?"
-#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/ccgui.glade.h:1 ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -68,7 +68,7 @@ msgstr " "
msgid "(C) 2009 Red Hat, Inc."
msgstr "(C) 2009 Red Hat, Inc."
-#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:240
+#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244
msgid "<b>Not reported!</b>"
msgstr "<b>Nie zgłoszono.</b>"
@@ -96,7 +96,7 @@ msgstr "Proszę czekać..."
msgid "Plugins"
msgstr "Wtyczki"
-#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:2
+#: ../src/Gui/ccgui.glade.h:10 ../src/Gui/report.glade.h:3
msgid "Report"
msgstr "Zgłoś"
@@ -171,7 +171,16 @@ msgstr "Częstotliwość awarii"
msgid "User"
msgstr "Użytkownik"
-#: ../src/Gui/CCMainWindow.py:178
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Nie można wyświetlić okna dialogowego ustawień\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -180,7 +189,7 @@ msgstr ""
"Nie można ukończyć bieżącego zadania.\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:195
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
@@ -190,16 +199,16 @@ msgstr ""
"jest uruchomiony\n"
" %s"
-#: ../src/Gui/CCMainWindow.py:205
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "Nie można uzyskać nazwy użytkownika dla UID %s"
-#: ../src/Gui/CCMainWindow.py:232
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
msgstr "<b>Ta awaria została już zgłoszona. Raporty można znaleźć na:</b>\n"
-#: ../src/Gui/CCMainWindow.py:292
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -207,7 +216,7 @@ msgstr ""
"Nie można uzyskać raportu.\n"
"Brak pakietów debuginfo?"
-#: ../src/Gui/CCMainWindow.py:308
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -216,12 +225,43 @@ msgstr ""
"Zgłoszenie nie powiodło się.\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:340
+#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "Błąd podczas uzyskiwania raportu: %s"
-#: ../src/Gui/CCReporterDialog.py:98
+#: ../src/Gui/CCReporterDialog.py:173
+msgid "Brief description how to reproduce this or what you did..."
+msgstr ""
+"Krótki opis, jak ponownie wywołać tę awarię lub co robił użytkownik (w "
+"języku angielskim)..."
+
+#: ../src/Gui/CCReporterDialog.py:201
+#, python-format
+msgid ""
+"Reporting disabled because the backtrace is unusable!\n"
+"Please try to install debuginfo manually using command:<span color=\"blue\"> "
+"debuginfo-install %s </span>\n"
+"then use Refresh button to regenerate the backtrace."
+msgstr ""
+"Zgłaszanie zostało wyłączone, ponieważ nie można użyć tego wyjątku.\n"
+"Proszę spróbować ręcznie zainstalować pakiet debuginfo używając "
+"polecenia:<span color=\"blue\"> debuginfo-install %s </span>\n"
+"a następnie nacisnąć przycisk Odśwież, aby ponownie utworzyć wyjątek."
+
+#: ../src/Gui/CCReporterDialog.py:203
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "Nie można użyć tego wyjątku. Nie można tego zgłosić."
+
+#: ../src/Gui/CCReporterDialog.py:209
+msgid ""
+"The bactrace is incomplete, please make sure you provide good steps to "
+"reproduce."
+msgstr ""
+"Wyjątek jest niepełny. Proszę upewnić się, że podano właściwe kroki "
+"ponownego wywołania awarii."
+
+#: ../src/Gui/CCReporterDialog.py:247
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive "
@@ -232,12 +272,6 @@ msgstr ""
"poufne informacje.\n"
"Na pewno wysłać <b>%s</b>?\n"
-#: ../src/Gui/CCReporterDialog.py:111
-msgid "Brief description how to reproduce this or what you did..."
-msgstr ""
-"Krótki opis, jak ponownie wywołać tę awarię lub co robił użytkownik (w "
-"języku angielskim)..."
-
#: ../src/Gui/dialogs.glade.h:1
msgid "Report done"
msgstr "Raport ukończony"
@@ -265,31 +299,27 @@ msgstr "pole kombinowane nie jest zaimplementowane"
msgid "Nothing to hydrate!"
msgstr "Brak danych do wyświetlenia."
-#: ../src/Gui/report.glade.h:1
+#: ../src/Gui/report.glade.h:2
msgid "Comment"
msgstr "Komentarz"
-#: ../src/Gui/report.glade.h:3
+#: ../src/Gui/report.glade.h:4
msgid "Send"
msgstr "Wyślij"
-#: ../src/Gui/report.glade.h:4 ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
-
-#: ../src/Gui/SettingsDialog.py:34 ../src/Gui/SettingsDialog.py:51
+#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Wybór wtyczki</b>"
-#: ../src/Gui/SettingsDialog.py:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Wybór zaplecza bazy danych</b>"
-#: ../src/Gui/SettingsDialog.py:168
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
msgstr "Usuń te zadanie"
-#: ../src/Gui/SettingsDialog.py:211
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "Usuń tę czynność"
@@ -389,6 +419,10 @@ msgstr "Strona WWW:"
msgid "gtk-add"
msgstr "gtk-add"
+#: ../src/Gui/settings.glade.h:25
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
+
#: ../src/Gui/settings.glade.h:26
msgid "gtk-close"
msgstr "gtk-close"
@@ -397,16 +431,16 @@ msgstr "gtk-close"
msgid "gtk-remove"
msgstr "gtk-remove"
-#: ../src/Applet/Applet.cpp:71
+#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Wykryto awarię pakietu %s"
-#: ../src/Applet/Applet.cpp:130
+#: ../src/Applet/Applet.cpp:138
msgid "ABRT service has been started"
msgstr "Usługa ABRT została uruchomiona"
-#: ../src/Applet/Applet.cpp:132 ../src/Applet/Applet.cpp:246
+#: ../src/Applet/Applet.cpp:140 ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "Usługa ABRT nie jest uruchomiona"
@@ -414,7 +448,7 @@ msgstr "Usługa ABRT nie jest uruchomiona"
msgid "Warning"
msgstr "Ostrzeżenie"
-#: ../src/Daemon/Daemon.cpp:546
+#: ../src/Daemon/Daemon.cpp:531
msgid ""
"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
"value in abrt.conf."
@@ -422,40 +456,37 @@ msgstr ""
"Wielkość raportu przekroczyła dozwolone ograniczenie. Proszę sprawdzić "
"wartość zmiennej MaxCrashReportsSize w pliku abrt.conf"
-#: ../lib/Plugins/Bugzilla.cpp:83
-msgid "Empty login and password. Please check Bugzilla.conf"
-msgstr "Pola login i hasło są puste. Proszę sprawdzić plik Bugzilla.conf"
-
-#: ../lib/Plugins/Bugzilla.cpp:205
-msgid "Bug is already reported: "
-msgstr "Błąd został już wcześniej zgłoszony: "
-
-#: ../lib/Plugins/Bugzilla.cpp:260
+#: ../lib/Plugins/Bugzilla.cpp:316
#, c-format
-msgid "Binary file %s will not be reported."
-msgstr "Plik binarny %s nie zostanie zgłoszony."
+msgid "Bug is already reported: %i"
+msgstr "Błąd został już wcześniej zgłoszony: %i"
-#: ../lib/Plugins/Bugzilla.cpp:330
-msgid "New bug id: "
-msgstr "Identyfikator nowego błędu: "
+#: ../lib/Plugins/Bugzilla.cpp:378
+#, c-format
+msgid "New bug id: %i"
+msgstr "Identyfikator nowego błędu: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:471
msgid "Checking for duplicates..."
msgstr "Sprawdzanie duplikatów..."
-#: ../lib/Plugins/Bugzilla.cpp:402 ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:474
msgid "Logging into bugzilla..."
msgstr "Logowanie do Bugzilli..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:478
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Pola login i hasło są puste. Proszę sprawdzić plik Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:484
msgid "Checking CC..."
msgstr "Sprawdzanie listy CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:493
msgid "Creating new bug..."
msgstr "Dodawanie nowego błędu..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:497
msgid "Logging out..."
msgstr "Wylogowywanie..."
@@ -463,64 +494,70 @@ msgstr "Wylogowywanie..."
msgid "Getting local universal unique identification"
msgstr "Uzyskiwanie lokalnego uniwersalnego, unikalnego identyfikatora"
-#: ../lib/Plugins/CCpp.cpp:146
+#: ../lib/Plugins/CCpp.cpp:228
msgid "Getting backtrace..."
msgstr "Uzyskiwanie wyjątku..."
-#: ../lib/Plugins/CCpp.cpp:415
+#: ../lib/Plugins/CCpp.cpp:526 ../lib/Plugins/CCpp.cpp:653
msgid "Searching for debug-info packages..."
msgstr "Wyszukiwanie pakietów debuginfo..."
-#: ../lib/Plugins/CCpp.cpp:451
+#: ../lib/Plugins/CCpp.cpp:588 ../lib/Plugins/CCpp.cpp:687
msgid "Downloading and installing debug-info packages..."
msgstr "Pobieranie i instalowanie pakietów debuginfo..."
-#: ../lib/Plugins/CCpp.cpp:513
+#: ../lib/Plugins/CCpp.cpp:792
msgid "Getting local universal unique identification..."
msgstr "Uzyskiwanie lokalnego uniwersalnego, unikalnego identyfikatora..."
-#: ../lib/Plugins/CCpp.cpp:532
+#: ../lib/Plugins/CCpp.cpp:811
msgid "Getting global universal unique identification..."
msgstr "Uzyskiwanie globalnego uniwersalnego, unikalnego identyfikatora..."
-#: ../lib/Plugins/CCpp.cpp:583
+#: ../lib/Plugins/CCpp.cpp:856
msgid "Starting report creation..."
msgstr "Uruchamianie tworzenia raportu..."
-#: ../lib/Plugins/CCpp.cpp:612
+#: ../lib/Plugins/CCpp.cpp:886
msgid "Skipping debuginfo installation"
msgstr "Pomijanie instalacji pakietu debuginfo"
-#: ../lib/Plugins/KerneloopsReporter.cpp:101
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
msgid "Creating and submitting a report..."
msgstr "Tworzenie i wysyłanie raportu..."
-#: ../lib/Plugins/Logger.cpp:58 ../lib/Plugins/Mailx.cpp:123
+#: ../lib/Plugins/Logger.cpp:57 ../lib/Plugins/Mailx.cpp:124
msgid "Creating a report..."
msgstr "Tworzenie raportu..."
-#: ../lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:64
msgid "Executing RunApp plugin..."
msgstr "Wykonywanie wtyczki RunApp..."
-#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:409
+#: ../lib/Plugins/FileTransfer.cpp:63 ../lib/Plugins/FileTransfer.cpp:381
msgid "FileTransfer: URL not specified"
msgstr "Wtyczka przesyłania plików: nie podano adresu URL"
-#: ../lib/Plugins/FileTransfer.cpp:81
+#: ../lib/Plugins/FileTransfer.cpp:67
#, c-format
-msgid "Sending archive %s via %s"
-msgstr "Wysyłanie archiwum %s przez %s"
+msgid "Sending archive %s to %s"
+msgstr "Wysyłanie archiwum %s do %s"
-#: ../lib/Plugins/FileTransfer.cpp:336
+#: ../lib/Plugins/FileTransfer.cpp:309
msgid "File Transfer: Creating a report..."
msgstr "Wtyczka przesyłania plików: tworzenie raportu..."
-#: ../lib/Plugins/FileTransfer.cpp:358 ../lib/Plugins/FileTransfer.cpp:386
-msgid "CFileTransfer::Run(): Cannot create and send an archive: "
-msgstr "CFileTransfer::Run(): nie można utworzyć i wysłać archiwum: "
+#: ../lib/Plugins/FileTransfer.cpp:334
+#, c-format
+msgid "Can't create and send an archive: %s"
+msgstr "Nie można utworzyć i wysłać archiwum: %s"
-#: ../lib/Plugins/KerneloopsScanner.cpp:79
+#: ../lib/Plugins/FileTransfer.cpp:359
+#, c-format
+msgid "Can't create and send an archive %s"
+msgstr "Nie można utworzyć i wysłać archiwum %s"
+
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "Tworzenie raportów awarii \"kernel oops\""
@@ -528,14 +565,15 @@ msgstr "Tworzenie raportów awarii \"kernel oops\""
msgid "Sending an email..."
msgstr "Wysłanie wiadomości e-mail..."
-#: ../lib/Plugins/SOSreport.cpp:113
+#: ../lib/Plugins/SOSreport.cpp:100
msgid "Executing SOSreport plugin..."
msgstr "Wykonywanie wtyczki SOSreport..."
-#: ../lib/Plugins/SOSreport.cpp:135
-msgid "running sosreport: "
-msgstr "wykonywanie sosreport: "
+#: ../lib/Plugins/SOSreport.cpp:122
+#, c-format
+msgid "running sosreport: %s"
+msgstr "wykonywanie sosreport: %s"
-#: ../lib/Plugins/SOSreport.cpp:150
+#: ../lib/Plugins/SOSreport.cpp:137
msgid "done running sosreport"
msgstr "ukończono wykonywanie sosreport"
diff --git a/po/pt.po b/po/pt.po
index bf562b05..01130673 100644
--- a/po/pt.po
+++ b/po/pt.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-08 21:21+0000\n"
+"POT-Creation-Date: 2009-11-08 20:52+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: Rui Gouveia <rui.gouveia@globaltek.pt>\n"
"Language-Team: PT <fedora-trans-pt@redhat.com>\n"
@@ -20,23 +20,23 @@ msgstr "Outro cliente já está em execução. A tentar despertá-lo."
msgid "Got unexpected data from daemon (is the database properly updated?)."
msgstr "Obteve-se dados inesperados do serviço (a base de dados está actualizada?)"
-#: ../src/Gui/ABRTPlugin.py:48
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "Plugins de análise"
-#: ../src/Gui/ABRTPlugin.py:49
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "Plugins de acções"
-#: ../src/Gui/ABRTPlugin.py:50
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "Plugins de relatórios"
-#: ../src/Gui/ABRTPlugin.py:51
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "Plugins de bases de dados"
-#: ../src/Gui/ABRTPlugin.py:90
+#: ../src/Gui/ABRTPlugin.py:97
msgid "Plugin name is not set, can't load it's settings"
msgstr "Nome do plugin não está definido, incapaz de carregar configurações"
@@ -59,6 +59,7 @@ msgstr ""
"Debuginfo está em falta?"
#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -67,7 +68,7 @@ msgid "(C) 2009 Red Hat, Inc."
msgstr "(C) 2009 Red Hat, Inc."
#: ../src/Gui/ccgui.glade.h:3
-#: ../src/Gui/CCMainWindow.py:240
+#: ../src/Gui/CCMainWindow.py:244
msgid "<b>Not reported!</b>"
msgstr "<b>Não reportado!</b>"
@@ -96,7 +97,7 @@ msgid "Plugins"
msgstr "Plugins"
#: ../src/Gui/ccgui.glade.h:10
-#: ../src/Gui/report.glade.h:2
+#: ../src/Gui/report.glade.h:3
msgid "Report"
msgstr "Relatório"
@@ -155,7 +156,16 @@ msgstr "Taxa de Crash"
msgid "User"
msgstr "Utilizador"
-#: ../src/Gui/CCMainWindow.py:178
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Impossível mostrar a janela de definições\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -164,7 +174,7 @@ msgstr ""
"Impossível terminar a tarefa actual!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:195
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
@@ -173,16 +183,16 @@ msgstr ""
"Erro ao carregar a lista de dump, por favor, verifique se o serviço abrt está a correr\n"
" %s"
-#: ../src/Gui/CCMainWindow.py:205
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "Incapaz de obter o nome de utilizador para o uid %s"
-#: ../src/Gui/CCMainWindow.py:232
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
msgstr "<b>Este crash foi reportado. Pode encontrar o(s) relatório(s) em:</b>\n"
-#: ../src/Gui/CCMainWindow.py:292
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -190,7 +200,7 @@ msgstr ""
"Não foi possível obter o relatório!\n"
"Debuginfo está em falta?"
-#: ../src/Gui/CCMainWindow.py:308
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -199,12 +209,36 @@ msgstr ""
"Relatório falhou!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:340
+#: ../src/Gui/CCMainWindow.py:333
+#: ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "Erro ao obter o relatório: %s"
-#: ../src/Gui/CCReporterDialog.py:98
+#: ../src/Gui/CCReporterDialog.py:173
+msgid "Brief description how to reproduce this or what you did..."
+msgstr "Breve descrição de como reproduzir isto ou o que fez..."
+
+#: ../src/Gui/CCReporterDialog.py:201
+#, python-format
+msgid ""
+"Reporting disabled because the backtrace is unusable!\n"
+"Please try to install debuginfo manually using command:<span color=\"blue\"> debuginfo-install %s </span>\n"
+"then use Refresh button to regenerate the backtrace."
+msgstr ""
+"Relatórios desactivados porque a traçagem não é usável!\n"
+"Por favor, tente instalar o debuginfo manualmente utilizando o comando:<span color=\"blue\"> debuginfo-install %s </span>\n"
+"depois utilize o botão Recarregar para gerar uma nova traçagem."
+
+#: ../src/Gui/CCReporterDialog.py:203
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "A traçagem não é usável. Você não pode reportar isto!"
+
+#: ../src/Gui/CCReporterDialog.py:209
+msgid "The bactrace is incomplete, please make sure you provide good steps to reproduce."
+msgstr "A traçagem está incompleta. Por favor, garanta que fornece passos adequados para reproduzir."
+
+#: ../src/Gui/CCReporterDialog.py:247
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
@@ -213,10 +247,6 @@ msgstr ""
"<b>AVISO</b>, você está prestes a enviar dados que podem conter informação sensível.\n"
"Deseja mesmo enviar <b>%s</b>?\n"
-#: ../src/Gui/CCReporterDialog.py:111
-msgid "Brief description how to reproduce this or what you did..."
-msgstr "Breve descrição de como reproduzir isto ou o que fez..."
-
#: ../src/Gui/dialogs.glade.h:1
msgid "Report done"
msgstr "Relatório terminado"
@@ -245,33 +275,28 @@ msgstr "caixa de combinação não está implementada"
msgid "Nothing to hydrate!"
msgstr "Nada para fazer!"
-#: ../src/Gui/report.glade.h:1
+#: ../src/Gui/report.glade.h:2
msgid "Comment"
msgstr "Comentário"
-#: ../src/Gui/report.glade.h:3
+#: ../src/Gui/report.glade.h:4
msgid "Send"
msgstr "Enviar"
-#: ../src/Gui/report.glade.h:4
-#: ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
-
-#: ../src/Gui/SettingsDialog.py:34
-#: ../src/Gui/SettingsDialog.py:51
+#: ../src/Gui/SettingsDialog.py:33
+#: ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Seleccione plugin</b>"
-#: ../src/Gui/SettingsDialog.py:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Seleccione base de dados</b>"
-#: ../src/Gui/SettingsDialog.py:168
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
msgstr "Remover esta tarefa"
-#: ../src/Gui/SettingsDialog.py:211
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "Remover esta acção"
@@ -372,6 +397,10 @@ msgid "gtk-add"
msgstr "gtk-add"
#: ../src/Gui/settings.glade.h:26
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
+
+#: ../src/Gui/settings.glade.h:26
msgid "gtk-close"
msgstr "gtk-close"
@@ -379,17 +408,17 @@ msgstr "gtk-close"
msgid "gtk-remove"
msgstr "gtk-remove"
-#: ../src/Applet/Applet.cpp:71
+#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Foi detectado um crash no pacote %s"
-#: ../src/Applet/Applet.cpp:130
+#: ../src/Applet/Applet.cpp:138
msgid "ABRT service has been started"
msgstr "O serviço ABRT foi iniciado"
-#: ../src/Applet/Applet.cpp:132
-#: ../src/Applet/Applet.cpp:246
+#: ../src/Applet/Applet.cpp:140
+#: ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "O serviço ABRT não está a correr"
@@ -397,45 +426,41 @@ msgstr "O serviço ABRT não está a correr"
msgid "Warning"
msgstr "Aviso"
-#: ../src/Daemon/Daemon.cpp:546
+#: ../src/Daemon/Daemon.cpp:531
msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."
msgstr "O relatório excedeu a cota. Por favor, verifique o valor MaxCrashReportsSize em abrt.conf."
-#: ../lib/Plugins/Bugzilla.cpp:83
-msgid "Empty login and password. Please check Bugzilla.conf"
-msgstr "Nome de utilizador e senha vazios. Por favor, verifique Bugzilla.conf"
-
-#: ../lib/Plugins/Bugzilla.cpp:205
-msgid "Bug is already reported: "
-msgstr "Erro já foi reportado: "
-
-#: ../lib/Plugins/Bugzilla.cpp:260
+#: ../lib/Plugins/Bugzilla.cpp:316
#, c-format
-msgid "Binary file %s will not be reported."
-msgstr "Ficheiro binário %s não será reportado."
+msgid "Bug is already reported: %i"
+msgstr "Erro já foi reportado: %i"
-#: ../lib/Plugins/Bugzilla.cpp:330
-msgid "New bug id: "
-msgstr "Criar novo ID de erro: "
+#: ../lib/Plugins/Bugzilla.cpp:378
+#, c-format
+msgid "New bug id: %i"
+msgstr "Novo ID de erro: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:471
msgid "Checking for duplicates..."
msgstr "A procurar por duplicados..."
-#: ../lib/Plugins/Bugzilla.cpp:402
-#: ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:474
msgid "Logging into bugzilla..."
msgstr "A iniciar sessão no bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:478
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Nome de utilizador e senha vazios. Por favor, verifique Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:484
msgid "Checking CC..."
msgstr "A verificar CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:493
msgid "Creating new bug..."
msgstr "A criar novo erro..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:497
msgid "Logging out..."
msgstr "A Terminar Sessão..."
@@ -443,67 +468,74 @@ msgstr "A Terminar Sessão..."
msgid "Getting local universal unique identification"
msgstr "A obter identificador único universal local"
-#: ../lib/Plugins/CCpp.cpp:146
+#: ../lib/Plugins/CCpp.cpp:228
msgid "Getting backtrace..."
msgstr "A obter dados do processo..."
-#: ../lib/Plugins/CCpp.cpp:415
+#: ../lib/Plugins/CCpp.cpp:526
+#: ../lib/Plugins/CCpp.cpp:653
msgid "Searching for debug-info packages..."
msgstr "A pesquisar por pacotes debug-info..."
-#: ../lib/Plugins/CCpp.cpp:451
+#: ../lib/Plugins/CCpp.cpp:588
+#: ../lib/Plugins/CCpp.cpp:687
msgid "Downloading and installing debug-info packages..."
msgstr "A transferir e instalar pacotes debug-info..."
-#: ../lib/Plugins/CCpp.cpp:513
+#: ../lib/Plugins/CCpp.cpp:792
msgid "Getting local universal unique identification..."
msgstr "A obter identificador único universal local..."
-#: ../lib/Plugins/CCpp.cpp:532
+#: ../lib/Plugins/CCpp.cpp:811
msgid "Getting global universal unique identification..."
msgstr "A obter identificador único universal global..."
-#: ../lib/Plugins/CCpp.cpp:583
+#: ../lib/Plugins/CCpp.cpp:856
msgid "Starting report creation..."
msgstr "A iniciar a criação do relatório..."
-#: ../lib/Plugins/CCpp.cpp:612
+#: ../lib/Plugins/CCpp.cpp:886
msgid "Skipping debuginfo installation"
msgstr "A passar à frente a instalação do debuginfo"
-#: ../lib/Plugins/KerneloopsReporter.cpp:101
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
msgid "Creating and submitting a report..."
msgstr "A criar e enviar relatório..."
-#: ../lib/Plugins/Logger.cpp:58
-#: ../lib/Plugins/Mailx.cpp:123
+#: ../lib/Plugins/Logger.cpp:57
+#: ../lib/Plugins/Mailx.cpp:124
msgid "Creating a report..."
msgstr "A criar relatório..."
-#: ../lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:64
msgid "Executing RunApp plugin..."
msgstr "A executar plugin RunApp..."
#: ../lib/Plugins/FileTransfer.cpp:63
-#: ../lib/Plugins/FileTransfer.cpp:409
+#: ../lib/Plugins/FileTransfer.cpp:381
msgid "FileTransfer: URL not specified"
msgstr "FileTransfer: URL não especificado"
-#: ../lib/Plugins/FileTransfer.cpp:81
+#: ../lib/Plugins/FileTransfer.cpp:67
#, c-format
-msgid "Sending archive %s via %s"
-msgstr "A enviar arquivo %s via %s"
+msgid "Sending archive %s to %s"
+msgstr "A enviar arquivo %s para %s"
-#: ../lib/Plugins/FileTransfer.cpp:336
+#: ../lib/Plugins/FileTransfer.cpp:309
msgid "File Transfer: Creating a report..."
msgstr "Transferência de Ficheiro: A criar relatório..."
-#: ../lib/Plugins/FileTransfer.cpp:358
-#: ../lib/Plugins/FileTransfer.cpp:386
-msgid "CFileTransfer::Run(): Cannot create and send an archive: "
-msgstr "CFileTransfer::Run(): Não foi possível criar e enviar um arquivo: "
+#: ../lib/Plugins/FileTransfer.cpp:334
+#, c-format
+msgid "Can't create and send an archive: %s"
+msgstr "Não foi possível criar e enviar um arquivo: %s"
-#: ../lib/Plugins/KerneloopsScanner.cpp:79
+#: ../lib/Plugins/FileTransfer.cpp:359
+#, c-format
+msgid "Can't create and send an archive %s"
+msgstr "Não foi possível criar e enviar um arquivo %s"
+
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "A criar relatório oops de crash do kernel..."
@@ -511,18 +543,23 @@ msgstr "A criar relatório oops de crash do kernel..."
msgid "Sending an email..."
msgstr "A enviar E-mail..."
-#: ../lib/Plugins/SOSreport.cpp:113
+#: ../lib/Plugins/SOSreport.cpp:100
msgid "Executing SOSreport plugin..."
msgstr "A executar plugin do SOSreport..."
-#: ../lib/Plugins/SOSreport.cpp:135
-msgid "running sosreport: "
-msgstr "A executar sosreport: "
+#: ../lib/Plugins/SOSreport.cpp:122
+#, c-format
+msgid "running sosreport: %s"
+msgstr "A executar sosreport: %s"
-#: ../lib/Plugins/SOSreport.cpp:150
+#: ../lib/Plugins/SOSreport.cpp:137
msgid "done running sosreport"
msgstr "execução do sosreport terminou"
+#~ msgid "gtk-refresh"
+#~ msgstr "gtk-refresh"
+#~ msgid "Binary file %s will not be reported."
+#~ msgstr "Ficheiro binário %s não será reportado."
#~ msgid "Check CC and add coment +1..."
#~ msgstr "Verifique o campo CC e adicione o comentário +1..."
#~ msgid "Pending events: %i"
diff --git a/po/pt_BR.po b/po/pt_BR.po
index ceb8b0a2..d59875c7 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -1,14 +1,13 @@
# Brazilian Portuguese translation of ABRT.
# This file is distributed under the same license as the ABRT package.
-#
# Igor Pires Soares <igor@projetofedora.org>, 2009.
#
msgid ""
msgstr ""
"Project-Id-Version: ABRT\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-17 16:06+0000\n"
-"PO-Revision-Date: 2009-10-17 15:59-0300\n"
+"POT-Creation-Date: 2009-11-06 15:36+0000\n"
+"PO-Revision-Date: 2009-11-06 17:43-0300\n"
"Last-Translator: Igor Pires Soares <igor@projetofedora.org>\n"
"Language-Team: Brazilian Portuguese <fedora-trans-pt_br@redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -26,23 +25,23 @@ msgstr "Outro cliente já está em execução, tentando acordá-lo."
msgid "Got unexpected data from daemon (is the database properly updated?)."
msgstr "Dados inesperados obtidos do daemon (o banco de dados está devidamente atualizado?)."
-#: ../src/Gui/ABRTPlugin.py:48
+#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
msgstr "Plugins de análise"
-#: ../src/Gui/ABRTPlugin.py:49
+#: ../src/Gui/ABRTPlugin.py:56
msgid "Action plugins"
msgstr "Plugins de ação"
-#: ../src/Gui/ABRTPlugin.py:50
+#: ../src/Gui/ABRTPlugin.py:57
msgid "Reporter plugins"
msgstr "Plugins de relato"
-#: ../src/Gui/ABRTPlugin.py:51
+#: ../src/Gui/ABRTPlugin.py:58
msgid "Database plugins"
msgstr "Plugins de banco de dados"
-#: ../src/Gui/ABRTPlugin.py:90
+#: ../src/Gui/ABRTPlugin.py:97
msgid "Plugin name is not set, can't load it's settings"
msgstr "O nome do plugin não está definido, não é possível carregar as configurações dele"
@@ -65,6 +64,7 @@ msgstr ""
"O debuginfo está faltando?"
#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -73,7 +73,7 @@ msgid "(C) 2009 Red Hat, Inc."
msgstr "(C) 2009 Red Hat, Inc."
#: ../src/Gui/ccgui.glade.h:3
-#: ../src/Gui/CCMainWindow.py:240
+#: ../src/Gui/CCMainWindow.py:244
msgid "<b>Not reported!</b>"
msgstr "<b>Não relatado!</b>"
@@ -102,7 +102,7 @@ msgid "Plugins"
msgstr "Plugins"
#: ../src/Gui/ccgui.glade.h:10
-#: ../src/Gui/report.glade.h:2
+#: ../src/Gui/report.glade.h:3
msgid "Report"
msgstr "Relatar"
@@ -161,7 +161,16 @@ msgstr "Taxa de travamento"
msgid "User"
msgstr "Usuário"
-#: ../src/Gui/CCMainWindow.py:178
+#: ../src/Gui/CCMainWindow.py:160
+#, python-format
+msgid ""
+"Can't show the settings dialog\n"
+"%s"
+msgstr ""
+"Não foi possível mostrar o diálogo de configurações\n"
+"%s"
+
+#: ../src/Gui/CCMainWindow.py:181
#, python-format
msgid ""
"Unable to finish current task!\n"
@@ -170,7 +179,7 @@ msgstr ""
"Não foi possível finalizar a tarefa atual!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:195
+#: ../src/Gui/CCMainWindow.py:198
#, python-format
msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
@@ -179,16 +188,16 @@ msgstr ""
"Erro ao carregar a lista de despejo, por favor, verifique se o daemon do abrt está em execução\n"
" %s"
-#: ../src/Gui/CCMainWindow.py:205
+#: ../src/Gui/CCMainWindow.py:208
#, python-format
msgid "Can't get username for uid %s"
msgstr "Não foi possível obter o nome de usuário para o uid %s"
-#: ../src/Gui/CCMainWindow.py:232
+#: ../src/Gui/CCMainWindow.py:236
msgid "<b>This crash has been reported, you can find the report(s) at:</b>\n"
msgstr "<b>Este travamento foi relatado, você pode localizar o(s) relatório(s) em:</b>\n"
-#: ../src/Gui/CCMainWindow.py:292
+#: ../src/Gui/CCMainWindow.py:296
msgid ""
"Unable to get report!\n"
"Debuginfo is missing?"
@@ -196,7 +205,7 @@ msgstr ""
"Não foi possível obter o relatório!\n"
"O debuginfo está faltando?"
-#: ../src/Gui/CCMainWindow.py:310
+#: ../src/Gui/CCMainWindow.py:314
#, python-format
msgid ""
"Reporting failed!\n"
@@ -205,17 +214,36 @@ msgstr ""
"Falha no relato!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:329
-#: ../src/Gui/CCMainWindow.py:356
+#: ../src/Gui/CCMainWindow.py:333
+#: ../src/Gui/CCMainWindow.py:360
#, python-format
msgid "Error getting the report: %s"
msgstr "Erro ao obter o relatório: %s"
-#: ../src/Gui/CCReporterDialog.py:167
+#: ../src/Gui/CCReporterDialog.py:173
msgid "Brief description how to reproduce this or what you did..."
msgstr "Breve descrição sobre como reproduzir isto ou o que você fazia..."
-#: ../src/Gui/CCReporterDialog.py:211
+#: ../src/Gui/CCReporterDialog.py:201
+#, python-format
+msgid ""
+"Reporting disabled because the backtrace is unusable!\n"
+"Please try to install debuginfo manually using command:<span color=\"blue\"> debuginfo-install %s </span>\n"
+"then use Refresh button to regenerate the backtrace."
+msgstr ""
+"Relato desabilitado porque o backtrace é inutilizável!\n"
+"Por favor, tente instalar o debuginfo manualmente usando o comando:<span color=\"blue\"> debuginfo-install %s </span>\n"
+"e depois use o botão Atualizar para regerar o backtrace."
+
+#: ../src/Gui/CCReporterDialog.py:203
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "O backtrace é inutilizável, você não pode reportá-lo!"
+
+#: ../src/Gui/CCReporterDialog.py:209
+msgid "The bactrace is incomplete, please make sure you provide good steps to reproduce."
+msgstr "O backtrace está incompleto. Por favor, certifique-se de fornecer bons passos para a reprodução."
+
+#: ../src/Gui/CCReporterDialog.py:247
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
@@ -252,37 +280,28 @@ msgstr "caixa de combinação não implementada"
msgid "Nothing to hydrate!"
msgstr "Nada a ser hidratado!"
-#: ../src/Gui/report.glade.h:1
+#: ../src/Gui/report.glade.h:2
msgid "Comment"
msgstr "Comentário"
-#: ../src/Gui/report.glade.h:3
+#: ../src/Gui/report.glade.h:4
msgid "Send"
msgstr "Enviar"
-#: ../src/Gui/report.glade.h:4
-#: ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
-
-#: ../src/Gui/report.glade.h:5
-msgid "gtk-refresh"
-msgstr "gtk-refresh"
-
-#: ../src/Gui/SettingsDialog.py:34
-#: ../src/Gui/SettingsDialog.py:51
+#: ../src/Gui/SettingsDialog.py:33
+#: ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Selecionar plugin</b>"
-#: ../src/Gui/SettingsDialog.py:37
+#: ../src/Gui/SettingsDialog.py:36
msgid "<b>Select database backend</b>"
msgstr "<b>Selecione o backend de banco de dados</b>"
-#: ../src/Gui/SettingsDialog.py:168
+#: ../src/Gui/SettingsDialog.py:165
msgid "Remove this job"
msgstr "Remover este trabalho"
-#: ../src/Gui/SettingsDialog.py:211
+#: ../src/Gui/SettingsDialog.py:208
msgid "Remove this action"
msgstr "Remover esta ação"
@@ -382,6 +401,10 @@ msgstr "Web site:"
msgid "gtk-add"
msgstr "gtk-add"
+#: ../src/Gui/settings.glade.h:25
+msgid "gtk-cancel"
+msgstr "gtk-cancel"
+
#: ../src/Gui/settings.glade.h:26
msgid "gtk-close"
msgstr "gtk-close"
@@ -390,17 +413,17 @@ msgstr "gtk-close"
msgid "gtk-remove"
msgstr "gtk-remove"
-#: ../src/Applet/Applet.cpp:71
+#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Um travamento no pacote %s foi detectado"
-#: ../src/Applet/Applet.cpp:130
+#: ../src/Applet/Applet.cpp:138
msgid "ABRT service has been started"
msgstr "O serviço ABRT foi iniciado"
-#: ../src/Applet/Applet.cpp:132
-#: ../src/Applet/Applet.cpp:246
+#: ../src/Applet/Applet.cpp:140
+#: ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "O serviço do ABRT não está em execução"
@@ -408,45 +431,39 @@ msgstr "O serviço do ABRT não está em execução"
msgid "Warning"
msgstr "Aviso"
-#: ../src/Daemon/Daemon.cpp:542
+#: ../src/Daemon/Daemon.cpp:531
msgid "Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."
msgstr "O tamanho do relatório excedeu a cota. Por favor, verifique o valor MaxCrashReportsSize do sistema no abrt.conf."
-#: ../lib/Plugins/Bugzilla.cpp:83
-msgid "Empty login and password. Please check Bugzilla.conf"
-msgstr "Nome de usuário e senha vazios. Por favor, verifique o Bugzilla.conf"
-
-#: ../lib/Plugins/Bugzilla.cpp:205
+#: ../lib/Plugins/Bugzilla.cpp:316
msgid "Bug is already reported: "
msgstr "O erro já foi relatado: "
-#: ../lib/Plugins/Bugzilla.cpp:260
-#, c-format
-msgid "Binary file %s will not be reported."
-msgstr "O arquivo binário %s não será relatado."
-
-#: ../lib/Plugins/Bugzilla.cpp:330
+#: ../lib/Plugins/Bugzilla.cpp:378
msgid "New bug id: "
msgstr "Novo id do erro: "
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:471
msgid "Checking for duplicates..."
msgstr "Verificando duplicatas..."
-#: ../lib/Plugins/Bugzilla.cpp:402
-#: ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:474
msgid "Logging into bugzilla..."
msgstr "Autenticando no bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:478
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Nome de usuário e senha vazios. Por favor, verifique o Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:484
msgid "Checking CC..."
msgstr "Verificando CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:493
msgid "Creating new bug..."
msgstr "Criando novo erro..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:497
msgid "Logging out..."
msgstr "Encerrando sessão..."
@@ -454,67 +471,69 @@ msgstr "Encerrando sessão..."
msgid "Getting local universal unique identification"
msgstr "Obtendo identificação universal local única"
-#: ../lib/Plugins/CCpp.cpp:161
+#: ../lib/Plugins/CCpp.cpp:228
msgid "Getting backtrace..."
msgstr "Obtendo backtrace..."
-#: ../lib/Plugins/CCpp.cpp:442
+#: ../lib/Plugins/CCpp.cpp:526
+#: ../lib/Plugins/CCpp.cpp:653
msgid "Searching for debug-info packages..."
msgstr "Pesquisando por pacotes debug-info..."
-#: ../lib/Plugins/CCpp.cpp:504
+#: ../lib/Plugins/CCpp.cpp:588
+#: ../lib/Plugins/CCpp.cpp:687
msgid "Downloading and installing debug-info packages..."
msgstr "Baixando e instalando pacotes debug-info..."
-#: ../lib/Plugins/CCpp.cpp:566
+#: ../lib/Plugins/CCpp.cpp:792
msgid "Getting local universal unique identification..."
msgstr "Obtendo identificação universal local única..."
-#: ../lib/Plugins/CCpp.cpp:585
+#: ../lib/Plugins/CCpp.cpp:811
msgid "Getting global universal unique identification..."
msgstr "Obtendo identificação universal global única..."
-#: ../lib/Plugins/CCpp.cpp:630
+#: ../lib/Plugins/CCpp.cpp:856
msgid "Starting report creation..."
msgstr "Iniciando a criação do relatório..."
-#: ../lib/Plugins/CCpp.cpp:661
+#: ../lib/Plugins/CCpp.cpp:886
msgid "Skipping debuginfo installation"
msgstr "Pulando instalação do debuginfo"
-#: ../lib/Plugins/KerneloopsReporter.cpp:101
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
msgid "Creating and submitting a report..."
msgstr "Criando e enviando um relatório..."
-#: ../lib/Plugins/Logger.cpp:58
-#: ../lib/Plugins/Mailx.cpp:123
+#: ../lib/Plugins/Logger.cpp:59
+#: ../lib/Plugins/Mailx.cpp:124
msgid "Creating a report..."
msgstr "Criando um relatório..."
-#: ../lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:64
msgid "Executing RunApp plugin..."
msgstr "Executando o plugin RunApp..."
#: ../lib/Plugins/FileTransfer.cpp:63
-#: ../lib/Plugins/FileTransfer.cpp:409
+#: ../lib/Plugins/FileTransfer.cpp:384
msgid "FileTransfer: URL not specified"
msgstr "FileTransfer: URL não especificada"
-#: ../lib/Plugins/FileTransfer.cpp:81
+#: ../lib/Plugins/FileTransfer.cpp:67
#, c-format
-msgid "Sending archive %s via %s"
-msgstr "Enviando o pacote %s via %s"
+msgid "Sending archive %s to %s"
+msgstr "Enviando o pacote %s para %s"
-#: ../lib/Plugins/FileTransfer.cpp:336
+#: ../lib/Plugins/FileTransfer.cpp:310
msgid "File Transfer: Creating a report..."
msgstr "File Transfer: Criando um relatório..."
-#: ../lib/Plugins/FileTransfer.cpp:358
-#: ../lib/Plugins/FileTransfer.cpp:386
+#: ../lib/Plugins/FileTransfer.cpp:335
+#: ../lib/Plugins/FileTransfer.cpp:361
msgid "CFileTransfer::Run(): Cannot create and send an archive: "
msgstr "CFileTransfer::Run(): Não foi possível criar e enviar o pacote: "
-#: ../lib/Plugins/KerneloopsScanner.cpp:79
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "Criando relatórios de oops do kernel no travamento..."
@@ -522,18 +541,22 @@ msgstr "Criando relatórios de oops do kernel no travamento..."
msgid "Sending an email..."
msgstr "Enviando email..."
-#: ../lib/Plugins/SOSreport.cpp:113
+#: ../lib/Plugins/SOSreport.cpp:100
msgid "Executing SOSreport plugin..."
msgstr "Executando o plugin SOSreport..."
-#: ../lib/Plugins/SOSreport.cpp:135
+#: ../lib/Plugins/SOSreport.cpp:122
msgid "running sosreport: "
msgstr "executando o sosreport: "
-#: ../lib/Plugins/SOSreport.cpp:150
+#: ../lib/Plugins/SOSreport.cpp:137
msgid "done running sosreport"
msgstr "Execução do sosreport realizada"
+#~ msgid "gtk-refresh"
+#~ msgstr "gtk-refresh"
+#~ msgid "Binary file %s will not be reported."
+#~ msgstr "O arquivo binário %s não será relatado."
#~ msgid "Check CC and add coment +1..."
#~ msgstr "Verifique o CC e adicione o comentário +1..."
#~ msgid "Pending events: %i"
@@ -554,12 +577,6 @@ msgstr "Execução do sosreport realizada"
#~ "Erro ao abrir a interface de usuário das configurações do plugin: \n"
#~ "\n"
#~ "%s"
-#~ msgid ""
-#~ "Can't save plugin settings:\n"
-#~ " %s"
-#~ msgstr ""
-#~ "Não foi possível salvar as configurações do plugin:\n"
-#~ " %s"
#~ msgid "unknown response from settings dialog"
#~ msgstr "resposta desconhecida do diálogo de configurações"
#~ msgid "Applet is already running."
diff --git a/scripts/dbg_mkrpm b/scripts/dbg_mkrpm
new file mode 100755
index 00000000..28b040e5
--- /dev/null
+++ b/scripts/dbg_mkrpm
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+test -f abrt.spec || exit 1
+ABRTVER=`grep ^Version: abrt.spec | head -n1 | sed 's/.* //'`
+
+if ! test -f configure; then
+ echo "Autogenerating configure"
+ ./autogen.sh || { rm -f configure; exit 1; }
+fi
+
+
+T=/tmp/$$_$RANDOM
+test -d "$T" && exit 1
+
+rm -rf BUILDROOT "abrt-$ABRTVER" "abrt-$ABRTVER".tar "abrt-$ABRTVER".tar.gz \
+ abrt*.rpm \
+ 2>/dev/null
+
+mkdir -p "$T"/"abrt-$ABRTVER" || exit
+cp -a * "$T"/"abrt-$ABRTVER" || exit
+(cd "$T" && tar -c "abrt-$ABRTVER") >"abrt-$ABRTVER".tar || exit
+rm -rf "$T" || exit
+
+gzip "abrt-$ABRTVER".tar || exit
+
+
+./dbg_rpmbuildlocal -bb abrt.spec 2>&1 | tee -a "$0.log"
diff --git a/scripts/dbg_rpmbuildlocal b/scripts/dbg_rpmbuildlocal
new file mode 100755
index 00000000..e0ed7add
--- /dev/null
+++ b/scripts/dbg_rpmbuildlocal
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+exec rpmbuild \
+--define "_topdir $PWD" \
+--define "_builddir $PWD" \
+--define "_rpmdir $PWD" \
+--define "_sourcedir $PWD" \
+--define "_specdir $PWD" \
+--define "_srcrpmdir $PWD" \
+--define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" \
+"$@"
diff --git a/scripts/dbg_rpminst b/scripts/dbg_rpminst
new file mode 100755
index 00000000..8255777a
--- /dev/null
+++ b/scripts/dbg_rpminst
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+while rpm -qa | grep abrt >/dev/null; do
+ rpm -qa | grep abrt | while read package; do
+ echo "$package: rpm -e `basename "$package" .rpm`"
+ rpm -e "`basename "$package" .rpm`"
+ done
+done
+
+while true; do
+ r=0
+ for package in *.rpm; do
+ test -f "$package" || continue
+ # Is it installed?
+ rpm -q "`basename "$package" .rpm`" >/dev/null && continue
+ # Try to install, record failure
+ echo "$package: rpm -i `basename "$package" .rpm`"
+ rpm -i "$package" || r=1
+ done
+ test $r = 0 && break
+done
+
+killall -HUP dbus-daemon
diff --git a/scripts/dbg_unpkrpm b/scripts/dbg_unpkrpm
new file mode 100755
index 00000000..143d4afa
--- /dev/null
+++ b/scripts/dbg_unpkrpm
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+rm -rf UNPACKED
+mkdir -p UNPACKED
+
+for rpm in *.rpm; do
+ rpm2cpio "$rpm" | ( cd UNPACKED && cpio -i --make-directories)
+done
diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp
index 9d7be5fc..2eed556a 100644
--- a/src/Applet/Applet.cpp
+++ b/src/Applet/Applet.cpp
@@ -20,6 +20,7 @@
#include <dbus/dbus-shared.h>
#include <dbus/dbus-glib.h>
#include <dbus/dbus-glib-lowlevel.h>
+#include <limits.h>
#if HAVE_CONFIG_H
#include <config.h>
#endif
@@ -48,13 +49,12 @@ static void Crash(DBusMessage* signal)
dbus_message_iter_init(signal, &in_iter);
const char* progname;
r = load_val(&in_iter, progname);
- if (r != ABRT_DBUS_MORE_FIELDS)
+ /* Optional 2nd param: uid */
+ const char* uid_str = NULL;
+ if (r == ABRT_DBUS_MORE_FIELDS)
{
- error_msg("dbus signal %s: parameter type mismatch", __func__);
- return;
+ r = load_val(&in_iter, uid_str);
}
- const char* uid_str;
- r = load_val(&in_iter, uid_str);
if (r != ABRT_DBUS_LAST_FIELD)
{
error_msg("dbus signal %s: parameter type mismatch", __func__);
@@ -63,10 +63,18 @@ static void Crash(DBusMessage* signal)
//if (m_pSessionDBus->has_name("com.redhat.abrt.gui"))
// return;
- uid_t uid_num = atoi(uid_str);
+// uid_t uid_num = atol(uid_str);
- if (uid_num != getuid())
- return;
+ if (uid_str != NULL)
+ {
+ char *end;
+ errno = 0;
+ unsigned long uid_num = strtoul(uid_str, &end, 10);
+ if (errno || *end != '\0' || uid_num != getuid())
+ {
+ return;
+ }
+ }
const char* message = _("A crash in package %s has been detected");
//applet->AddEvent(uid, progname);
@@ -241,7 +249,7 @@ int main(int argc, char** argv)
"Problem connecting to dbus, or applet is already running");
/* Show disabled icon if daemon is not running */
- if (!dbus_bus_name_has_owner(system_conn, CC_DBUS_NAME, &err))
+ if (!dbus_bus_name_has_owner(system_conn, ABRTD_DBUS_NAME, &err))
{
const char* msg = _("ABRT service is not running");
puts(msg);
diff --git a/src/CLI/CLI.cpp b/src/CLI/CLI.cpp
index 18e99dcf..edc8df00 100644
--- a/src/CLI/CLI.cpp
+++ b/src/CLI/CLI.cpp
@@ -24,16 +24,16 @@
#include "report.h"
#include "dbus.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
/* Program options */
@@ -56,31 +56,31 @@ static void print_crash_infos(vector_crash_infos_t& pCrashInfos, int pMode)
map_crash_info_t& info = pCrashInfos[ii];
if (pMode == OPT_GET_LIST_FULL || info.find(CD_REPORTED)->second[CD_CONTENT] != "1")
{
- const char *timestr = info[CD_TIME][CD_CONTENT].c_str();
- long time = strtol(timestr, 0, 10);
- if (time == 0)
- error_msg_and_die("Error while converting time string.");
-
- char timeloc[256];
- int success = strftime(timeloc, 128, "%c", localtime(&time));
- if (!success)
- error_msg_and_die("Error while converting time to string.");
-
- printf(_("%u.\n"
- "\tUID : %s\n"
- "\tUUID : %s\n"
- "\tPackage : %s\n"
- "\tExecutable : %s\n"
- "\tCrash Time : %s\n"
- "\tCrash Count: %s\n"),
- ii,
- info[CD_UID][CD_CONTENT].c_str(),
- info[CD_UUID][CD_CONTENT].c_str(),
- info[CD_PACKAGE][CD_CONTENT].c_str(),
- info[CD_EXECUTABLE][CD_CONTENT].c_str(),
- timeloc,
- info[CD_COUNT][CD_CONTENT].c_str()
- );
+ const char *timestr = info[CD_TIME][CD_CONTENT].c_str();
+ long time = strtol(timestr, NULL, 10);
+ if (time == 0)
+ error_msg_and_die("Error while converting time string.");
+
+ char timeloc[256];
+ int success = strftime(timeloc, 128, "%c", localtime(&time));
+ if (!success)
+ error_msg_and_die("Error while converting time to string.");
+
+ printf(_("%u.\n"
+ "\tUID : %s\n"
+ "\tUUID : %s\n"
+ "\tPackage : %s\n"
+ "\tExecutable : %s\n"
+ "\tCrash Time : %s\n"
+ "\tCrash Count: %s\n"),
+ ii,
+ info[CD_UID][CD_CONTENT].c_str(),
+ info[CD_UUID][CD_CONTENT].c_str(),
+ info[CD_PACKAGE][CD_CONTENT].c_str(),
+ info[CD_EXECUTABLE][CD_CONTENT].c_str(),
+ timeloc,
+ info[CD_COUNT][CD_CONTENT].c_str()
+ );
}
}
}
@@ -111,21 +111,21 @@ static char *progname(char *argv0)
/* Prints abrt-cli version and some help text. */
static void usage(char *argv0)
{
- char *name = progname(argv0);
- printf("%s " VERSION "\n\n", name);
-
- /* Message has embedded tabs. */
- printf(_("Usage: %s [OPTION]\n\n"
- "Startup:\n"
- " -V, --version display the version of %s and exit\n"
- " -?, --help print this help\n\n"
- "Actions:\n"
- " --get-list print list of crashes which are not reported yet\n"
- " --get-list-full print list of all crashes\n"
- " --report UUID create and send a report\n"
- " --report-always UUID create and send a report without asking\n"
- " --delete UUID remove crash\n"),
- name, name);
+ char *name = progname(argv0);
+ printf("%s " VERSION "\n\n", name);
+
+ /* Message has embedded tabs. */
+ printf(_("Usage: %s [OPTION]\n\n"
+ "Startup:\n"
+ " -V, --version display the version of %s and exit\n"
+ " -?, --help print this help\n\n"
+ "Actions:\n"
+ " --get-list print list of crashes which are not reported yet\n"
+ " --get-list-full print list of all crashes\n"
+ " --report UUID create and send a report\n"
+ " --report-always UUID create and send a report without asking\n"
+ " --delete UUID remove crash\n"),
+ name, name);
}
int main(int argc, char** argv)
@@ -154,21 +154,21 @@ int main(int argc, char** argv)
case OPT_GET_LIST_FULL:
if (op == -1)
break;
- error_msg(_("You must specify exactly one operation."));
+ error_msg(_("You must specify exactly one operation."));
return 1;
- case -1: /* end of options */
- if (op != -1) /* if some operation was specified... */
- break;
+ case -1: /* end of options */
+ if (op != -1) /* if some operation was specified... */
+ break;
/* fall through */
default:
- case '?':
+ case '?':
case OPT_HELP:
- usage(argv[0]);
- return 1;
+ usage(argv[0]);
+ return 1;
case 'V':
- case OPT_VERSION:
- printf("%s " VERSION "\n", progname(argv[0]));
- return 0;
+ case OPT_VERSION:
+ printf("%s " VERSION "\n", progname(argv[0]));
+ return 0;
}
if (c == -1)
break;
@@ -195,11 +195,11 @@ int main(int argc, char** argv)
break;
}
case OPT_REPORT:
- report(uuid, false);
- break;
+ report(uuid, false);
+ break;
case OPT_REPORT_ALWAYS:
- report(uuid, true);
- break;
+ report(uuid, true);
+ break;
case OPT_DELETE:
{
call_DeleteDebugDump(uuid);
diff --git a/src/CLI/dbus.cpp b/src/CLI/dbus.cpp
index 42222d15..50ca651b 100644
--- a/src/CLI/dbus.cpp
+++ b/src/CLI/dbus.cpp
@@ -27,7 +27,7 @@ DBusConnection* s_dbus_conn;
/* helpers */
static DBusMessage* new_call_msg(const char* method)
{
- DBusMessage* msg = dbus_message_new_method_call(CC_DBUS_NAME, CC_DBUS_PATH, CC_DBUS_IFACE, method);
+ DBusMessage* msg = dbus_message_new_method_call(ABRTD_DBUS_NAME, ABRTD_DBUS_PATH, ABRTD_DBUS_IFACE, method);
if (!msg)
die_out_of_memory();
return msg;
@@ -35,18 +35,73 @@ static DBusMessage* new_call_msg(const char* method)
static DBusMessage* send_get_reply_and_unref(DBusMessage* msg)
{
- DBusError err;
- dbus_error_init(&err);
- DBusMessage *reply;
- reply = dbus_connection_send_with_reply_and_block(s_dbus_conn,
- msg, /*timeout*/ -1, &err);
- if (reply == NULL)
- {
- //TODO: analyse err
+ dbus_uint32_t serial;
+ if (TRUE != dbus_connection_send(s_dbus_conn, msg, &serial))
error_msg_and_die("Error sending DBus message");
- }
dbus_message_unref(msg);
- return reply;
+
+ while (true)
+ {
+ DBusMessage *received = dbus_connection_pop_message(s_dbus_conn);
+ if (!received)
+ {
+ if (FALSE == dbus_connection_read_write(s_dbus_conn, -1))
+ error_msg_and_die("DBus connection closed");
+ continue;
+ }
+
+ /* Debugging */
+ /*
+ const char *sender = dbus_message_get_sender(received);
+ if (sender)
+ printf("sender: %s\n", sender);
+ const char *path = dbus_message_get_path(received);
+ if (path)
+ printf("path: %s\n", path);
+ const char *member = dbus_message_get_member(received);
+ if (member)
+ printf("member: %s\n", member);
+ const char *interface = dbus_message_get_interface(received);
+ if (interface)
+ printf("interface: %s\n", interface);
+ const char *destination = dbus_message_get_destination(received);
+ if (destination)
+ printf("destination: %s\n", destination);
+ */
+
+ DBusError err;
+ dbus_error_init(&err);
+
+ if (dbus_message_is_signal(received, ABRTD_DBUS_IFACE, "Update"))
+ {
+ const char *update_msg;
+ if (!dbus_message_get_args(received, &err,
+ DBUS_TYPE_STRING, &update_msg,
+ DBUS_TYPE_INVALID))
+ {
+ error_msg_and_die("dbus Update message: arguments mismatch");
+ }
+ printf(">> %s\n", update_msg);
+ }
+ else if (dbus_message_is_signal(received, ABRTD_DBUS_IFACE, "Warning"))
+ {
+ const char *warning_msg;
+ if (!dbus_message_get_args(received, &err,
+ DBUS_TYPE_STRING, &warning_msg,
+ DBUS_TYPE_INVALID))
+ {
+ error_msg_and_die("dbus Update message: arguments mismatch");
+ }
+ printf(">! %s\n", warning_msg);
+ }
+ else if (dbus_message_get_type(received) == DBUS_MESSAGE_TYPE_METHOD_RETURN &&
+ dbus_message_get_reply_serial(received) == serial)
+ {
+ return received;
+ }
+
+ dbus_message_unref(received);
+ }
}
vector_crash_infos_t call_GetCrashInfos()
@@ -141,5 +196,5 @@ void handle_dbus_err(bool error_flag, DBusError *err)
error_msg_and_die(
"error requesting DBus name %s, possible reasons: "
"abrt run by non-root; dbus config is incorrect",
- CC_DBUS_NAME);
+ ABRTD_DBUS_NAME);
}
diff --git a/src/CLI/report.cpp b/src/CLI/report.cpp
index b9a13914..ac80e481 100644
--- a/src/CLI/report.cpp
+++ b/src/CLI/report.cpp
@@ -21,13 +21,13 @@
#include "abrtlib.h"
#include "DebugDump.h" // FILENAME_* defines
#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
/* Field separator for the crash report file that is edited by user. */
@@ -45,7 +45,7 @@ char *trim(char *str)
// Remove leading spaces.
char *ibuf;
for (ibuf = str; *ibuf && isspace(*ibuf); ++ibuf)
- ;
+ continue;
if (str != ibuf)
memmove(str, ibuf, ibuf - str);
@@ -79,7 +79,7 @@ static char *escape(const char *str)
{
if (*ptr == '#')
++count;
- if (*ptr == '\\' && *(ptr + 1) == '#')
+ if (*ptr == '\\' && ptr[1] == '#')
++count;
}
@@ -89,9 +89,7 @@ static char *escape(const char *str)
// Copy the input string to the resultant string, and escape all
// occurences of \# and #.
- char *result = (char*)malloc(strlen(str) + 1 + count);
- if (!result)
- error_msg_and_die("Memory error while escaping a field.");
+ char *result = (char*)xmalloc(strlen(str) + 1 + count);
const char *src = str;
char *dest = result;
@@ -136,10 +134,9 @@ static void remove_comments_and_unescape(char *str)
++src;
continue;
}
- else if (*src == '\\' &&
- (*(src + 1) == '#' ||
- (*(src + 1) == '\\' && *(src + 2) == '#')))
- {
+ if (*src == '\\'
+ && (src[1] == '#' || (src[1] == '\\' && src[2] == '#'))
+ ) {
++src; // Unescape escaped char.
}
}
@@ -189,7 +186,7 @@ static void write_crash_report_field(FILE *fp, const map_crash_report_t &report,
* If the report is successfully stored to the file, a zero value is returned.
* On failure, nonzero value is returned.
*/
-static int write_crash_report(const map_crash_report_t &report, FILE *fp)
+static void write_crash_report(const map_crash_report_t &report, FILE *fp)
{
fprintf(fp, "# Please check this report. Lines starting with '#' will be ignored.\n"
"# Lines starting with '%%----' separate fields, please do not delete them.\n\n");
@@ -210,8 +207,6 @@ static int write_crash_report(const map_crash_report_t &report, FILE *fp)
write_crash_report_field(fp, report, FILENAME_PACKAGE, _("# Package"));
write_crash_report_field(fp, report, FILENAME_REASON, _("# Reason of crash"));
write_crash_report_field(fp, report, FILENAME_RELEASE, _("# Release string of the operating system"));
-
- return 0;
}
/*
@@ -303,7 +298,7 @@ static int read_crash_report(map_crash_report_t &report, const char *text)
}
/* Runs external editor. */
-int launch_editor(const char *path)
+static int launch_editor(const char *path)
{
const char *editor, *terminal;
@@ -323,9 +318,10 @@ int launch_editor(const char *path)
if (!editor)
editor = "vi";
- const char *args[6];
- args[0] = editor;
- args[1] = path;
+ char *args[3];
+ args[0] = (char*)editor;
+ args[1] = (char*)path;
+ args[2] = NULL;
run_command(args);
return 0;
@@ -349,14 +345,14 @@ int report(const char *uuid, bool always)
int fd = mkstemp(filename);
if (fd == -1)
{
- error_msg("could not generate temporary file name");
+ error_msg("can't generate temporary file name");
return 1;
}
FILE *fp = fdopen(fd, "w");
if (!fp)
{
- error_msg("could not open '%s' to save the crash report", filename);
+ error_msg("can't open '%s' to save the crash report", filename);
return 1;
}
@@ -364,7 +360,7 @@ int report(const char *uuid, bool always)
if (fclose(fp))
{
- error_msg("could not close '%s'", filename);
+ error_msg("can't close '%s'", filename);
return 2;
}
@@ -375,7 +371,7 @@ int report(const char *uuid, bool always)
fp = fopen(filename, "r");
if (!fp)
{
- error_msg("could not open '%s' to read the crash report", filename);
+ error_msg("can't open '%s' to read the crash report", filename);
return 1;
}
@@ -383,10 +379,10 @@ int report(const char *uuid, bool always)
long size = ftell(fp);
fseek(fp, 0, SEEK_SET);
- char *text = (char*)malloc(size + 1);
+ char *text = (char*)xmalloc(size + 1);
if (fread(text, 1, size, fp) != size)
{
- error_msg("could not read '%s'", filename);
+ error_msg("can't read '%s'", filename);
return 1;
}
text[size] = '\0';
@@ -403,7 +399,7 @@ int report(const char *uuid, bool always)
free(text);
if (unlink(filename) != 0) // Delete the tempfile.
- error_msg("could not unlink %s: %s", filename, strerror(errno));
+ perror_msg("can't unlink %s", filename);
// Report only if the user is sure.
printf(_("Do you want to send the report? [y/N]: "));
diff --git a/src/CLI/run-command.cpp b/src/CLI/run-command.cpp
index 80184cfa..8f9d63ec 100644
--- a/src/CLI/run-command.cpp
+++ b/src/CLI/run-command.cpp
@@ -23,65 +23,51 @@
http://git.kernel.org/?p=git/git.git;a=blob;f=run-command.c;hb=HEAD
*/
-struct child_process
+static pid_t start_command(char **argv)
{
- const char **argv;
- pid_t pid;
-};
-
-static int start_command(struct child_process *cmd)
-{
- cmd->pid = fork();
- if (cmd->pid == 0)
+ pid_t pid = vfork();
+ if (pid < 0)
+ {
+ perror_msg_and_die("Can't fork");
+ }
+ if (pid == 0)
{ // new process
- execvp(cmd->argv[0], (char *const*)cmd->argv);
+ execvp(argv[0], argv);
exit(127);
}
- if (cmd->pid < 0)
- {
- error_msg_and_die("Unable to fork for %s: %s", cmd->argv[0], strerror(errno));
- return -1;
- }
- return 0;
+ return pid;
}
-static int finish_command(struct child_process *cmd)
+static int finish_command(pid_t pid, char **argv)
{
pid_t waiting;
- int status, code = -1;
- while ((waiting = waitpid(cmd->pid, &status, 0)) < 0 && errno == EINTR)
- ; /* nothing */
-
+ int status;
+ while ((waiting = waitpid(pid, &status, 0)) < 0 && errno == EINTR)
+ continue;
if (waiting < 0)
- error_msg_and_die("waitpid for %s failed: %s", cmd->argv[0], strerror(errno));
- else if (waiting != cmd->pid)
- error_msg_and_die("waitpid is confused (%s)", cmd->argv[0]);
- else if (WIFSIGNALED(status))
+ perror_msg_and_die("waitpid");
+
+ int code = -1;
+ if (WIFSIGNALED(status))
{
code = WTERMSIG(status);
- error_msg("%s died of signal %d", cmd->argv[0], code);
+ error_msg("'%s' killed by signal %d", argv[0], code);
+ code += 128; /* shells use this convention for deaths by signal */
}
- else if (WIFEXITED(status))
+ else /* if (WIFEXITED(status)) */
{
code = WEXITSTATUS(status);
if (code == 127)
{
- code = -1;
- error_msg_and_die("cannot run %s: %s", cmd->argv[0], strerror(ENOENT));
+ error_msg_and_die("Can't run '%s'", argv[0]);
}
}
- else
- error_msg_and_die("waitpid is confused (%s)", cmd->argv[0]);
return code;
}
-int run_command(const char **argv)
+int run_command(char **argv)
{
- struct child_process cmd;
- cmd.argv = argv;
- int code = start_command(&cmd);
- if (code)
- return code;
- return finish_command(&cmd);
+ pid_t pid = start_command(argv);
+ return finish_command(pid, argv);
}
diff --git a/src/CLI/run-command.h b/src/CLI/run-command.h
index 45a85af5..71391579 100644
--- a/src/CLI/run-command.h
+++ b/src/CLI/run-command.h
@@ -18,6 +18,6 @@
#ifndef ABRT_CLI_RUN_COMMAND_H
#define ABRT_CLI_RUN_COMMAND_H
-int run_command(const char **argv);
+int run_command(char **argv);
#endif
diff --git a/src/Daemon/CommLayerServer.h b/src/Daemon/CommLayerServer.h
index 6ede5815..21c1b304 100644
--- a/src/Daemon/CommLayerServer.h
+++ b/src/Daemon/CommLayerServer.h
@@ -13,7 +13,7 @@ class CCommLayerServer {
virtual ~CCommLayerServer();
/* just stubs to be called when not implemented in specific comm layer */
- virtual void Crash(const std::string& progname, const std::string& uid) {}
+ virtual void Crash(const char *progname, const char *uid_str) {}
virtual void JobDone(const char* pDest, const char* pUUID) = 0;
virtual void QuotaExceed(const char* str) {}
diff --git a/src/Daemon/CommLayerServerDBus.cpp b/src/Daemon/CommLayerServerDBus.cpp
index cc98fc2c..ed7e3858 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -28,7 +28,7 @@
static DBusMessage* new_signal_msg(const char* member, const char* peer = NULL)
{
/* path, interface, member name */
- DBusMessage* msg = dbus_message_new_signal(CC_DBUS_PATH, CC_DBUS_IFACE, member);
+ DBusMessage* msg = dbus_message_new_signal(ABRTD_DBUS_PATH, ABRTD_DBUS_IFACE, member);
if (!msg)
die_out_of_memory();
/* Send unicast dbus signal if peer is known */
@@ -46,16 +46,24 @@ static void send_flush_and_unref(DBusMessage* msg)
}
/* Notify the clients (UI) about a new crash */
-void CCommLayerServerDBus::Crash(const std::string& progname, const std::string& uid)
+void CCommLayerServerDBus::Crash(const char *progname, const char *uid_str)
{
DBusMessage* msg = new_signal_msg("Crash");
- const char* c_progname = progname.c_str();
- const char* c_uid = uid.c_str();
- dbus_message_append_args(msg,
- DBUS_TYPE_STRING, &c_progname,
- DBUS_TYPE_STRING, &c_uid,
- DBUS_TYPE_INVALID);
- VERB2 log("Sending signal Crash('%s','%s')", c_progname, c_uid);
+ if (uid_str)
+ {
+ dbus_message_append_args(msg,
+ DBUS_TYPE_STRING, &progname,
+ DBUS_TYPE_STRING, &uid_str,
+ DBUS_TYPE_INVALID);
+ VERB2 log("Sending signal Crash('%s','%s')", progname, uid_str);
+ }
+ else
+ {
+ dbus_message_append_args(msg,
+ DBUS_TYPE_STRING, &progname,
+ DBUS_TYPE_INVALID);
+ VERB2 log("Sending signal Crash('%s')", progname);
+ }
send_flush_and_unref(msg);
}
@@ -127,7 +135,7 @@ static long get_remote_uid(DBusMessage* call, const char** ppSender = NULL)
static int handle_GetCrashInfos(DBusMessage* call, DBusMessage* reply)
{
long unix_uid = get_remote_uid(call);
- vector_crash_infos_t argout1 = GetCrashInfos(to_string(unix_uid));
+ vector_crash_infos_t argout1 = GetCrashInfos(to_string(unix_uid).c_str());
DBusMessageIter iter;
dbus_message_iter_init_append(reply, &iter);
@@ -246,16 +254,14 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply)
}
}
- const char * sender = dbus_message_get_sender(call);
+ //const char * sender = dbus_message_get_sender(call);
if (!user_conf_data.empty())
{
std::string PluginName;
- map_plugin_settings_t plugin_settings;
map_map_string_t::const_iterator it_user_conf_data = user_conf_data.begin();
for (; it_user_conf_data != user_conf_data.end(); it_user_conf_data++)
{
PluginName = it_user_conf_data->first;
- plugin_settings = it_user_conf_data->second;
#if DEBUG
std::cout << "plugin name: " << it_user_conf_data->first;
map_string_t::const_iterator it_plugin_config;
@@ -266,21 +272,21 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply)
std::cout << " key: " << it_plugin_config->first << " value: " << it_plugin_config->second << std::endl;
}
#endif
- g_pPluginManager->SetPluginSettings(PluginName, sender, plugin_settings);
+ // this would overwrite the default settings
+ //g_pPluginManager->SetPluginSettings(PluginName, sender, plugin_settings);
}
}
-//so far, user_conf_data is unused
long unix_uid = get_remote_uid(call);
report_status_t argout1;
try
{
- argout1 = Report(argin1, to_string(unix_uid));
+ argout1 = Report(argin1, user_conf_data, to_string(unix_uid).c_str());
}
catch (CABRTException &e)
{
dbus_message_unref(reply);
- reply = dbus_message_new_error(call, DBUS_ERROR_FAILED, e.what().c_str());
+ reply = dbus_message_new_error(call, DBUS_ERROR_FAILED, e.what());
if (!reply)
die_out_of_memory();
send_flush_and_unref(reply);
@@ -309,7 +315,7 @@ static int handle_DeleteDebugDump(DBusMessage* call, DBusMessage* reply)
}
long unix_uid = get_remote_uid(call);
- bool argout1 = DeleteDebugDump(argin1, to_string(unix_uid));
+ bool argout1 = DeleteDebugDump(argin1, to_string(unix_uid).c_str());
dbus_message_append_args(reply,
DBUS_TYPE_BOOLEAN, &argout1,
@@ -377,7 +383,12 @@ static int handle_SetPluginSettings(DBusMessage* call, DBusMessage* reply)
long unix_uid = get_remote_uid(call);
VERB1 log("got %s('%s',...) call from uid %ld", "SetPluginSettings", PluginName.c_str(), unix_uid);
- g_pPluginManager->SetPluginSettings(PluginName, to_string(unix_uid), plugin_settings);
+ /* Disabled, as we don't use it, we use only temporary user settings while reporting
+ this method should be used to change the default setting and thus should
+ be protected by polkit
+ */
+ //FIXME: protect with polkit
+// g_pPluginManager->SetPluginSettings(PluginName, to_string(unix_uid), plugin_settings);
send_flush_and_unref(reply);
return 0;
@@ -534,7 +545,7 @@ static void handle_dbus_err(bool error_flag, DBusError *err)
error_msg_and_die(
"Error requesting DBus name %s, possible reasons: "
"abrt run by non-root; dbus config is incorrect",
- CC_DBUS_NAME);
+ ABRTD_DBUS_NAME);
}
CCommLayerServerDBus::CCommLayerServerDBus()
@@ -550,7 +561,7 @@ CCommLayerServerDBus::CCommLayerServerDBus()
attach_dbus_conn_to_glib_main_loop(conn, "/com/redhat/abrt", message_received);
VERB3 log("dbus_bus_request_name");
- int rc = dbus_bus_request_name(conn, CC_DBUS_NAME, DBUS_NAME_FLAG_REPLACE_EXISTING, &err);
+ int rc = dbus_bus_request_name(conn, ABRTD_DBUS_NAME, DBUS_NAME_FLAG_REPLACE_EXISTING, &err);
//maybe check that r == DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER instead?
handle_dbus_err(rc < 0, &err);
VERB3 log("dbus init done");
diff --git a/src/Daemon/CommLayerServerDBus.h b/src/Daemon/CommLayerServerDBus.h
index 7b2e31d7..f159c732 100644
--- a/src/Daemon/CommLayerServerDBus.h
+++ b/src/Daemon/CommLayerServerDBus.h
@@ -11,7 +11,7 @@ class CCommLayerServerDBus
virtual ~CCommLayerServerDBus();
/* DBus signal senders */
- virtual void Crash(const std::string& progname, const std::string& uid);
+ virtual void Crash(const char *progname, const char *uid_str);
virtual void JobDone(const char* pDest, const char* pUUID);
virtual void QuotaExceed(const char* str);
diff --git a/src/Daemon/CommLayerServerSocket.cpp b/src/Daemon/CommLayerServerSocket.cpp
index 6b62928b..ee775c6d 100644
--- a/src/Daemon/CommLayerServerSocket.cpp
+++ b/src/Daemon/CommLayerServerSocket.cpp
@@ -26,7 +26,7 @@ void CCommLayerServerSocket::Send(const std::string& pData, GIOChannel *pDestina
ret = g_io_channel_write_chars(pDestination, message + offset, strlen(message + offset), &len, &err);
if (ret == G_IO_STATUS_ERROR)
{
- warn_client("Error during sending data.");
+ error_msg("Error during sending data");
}
}
@@ -72,7 +72,7 @@ gboolean CCommLayerServerSocket::client_socket_cb(GIOChannel *source, GIOConditi
ret = g_io_channel_read_chars(source, buff, 1, &len, &err);
if (ret == G_IO_STATUS_ERROR)
{
- warn_client(std::string("Error while reading data from client socket: ") + err->message);
+ error_msg("Error while reading data from client socket: %s", err->message);
return FALSE;
}
message += buff[0];
@@ -101,13 +101,13 @@ gboolean CCommLayerServerSocket::server_socket_cb(GIOChannel *source, GIOConditi
condition & G_IO_ERR ||
condition & G_IO_NVAL)
{
- warn_client("Server socket error.");
+ error_msg("Server socket error");
return FALSE;
}
if ((socket = accept(serverSocket->m_nSocket, (struct sockaddr *)&remote, &len)) == -1)
{
- warn_client("Server can not accept client.");
+ error_msg("Server can not accept client");
return TRUE;
}
log("New socket client connected");
@@ -117,7 +117,7 @@ gboolean CCommLayerServerSocket::server_socket_cb(GIOChannel *source, GIOConditi
static_cast<GIOFunc>(client_socket_cb),
data))
{
- warn_client("Can not init g_io_channel.");
+ error_msg("Can not init g_io_channel");
return TRUE;
}
serverSocket->m_mapClientChannels[socket] = gSocket;
@@ -138,7 +138,9 @@ void CCommLayerServerSocket::ProcessMessage(const std::string& pMessage, GIOChan
{
std::string message = pMessage.substr(sizeof(MESSAGE_REPORT) - 1);
map_crash_report_t report = string_to_crash_report(message);
- Report(report, UID);
+ map_plugin_settings_t plugin_settings;
+ //FIXME: another hack to make this compile
+// Report(report, plugin_settings, UID);
}
else if (!strncmp(pMessage.c_str(), MESSAGE_CREATE_REPORT, sizeof(MESSAGE_CREATE_REPORT) - 1))
{
@@ -155,7 +157,7 @@ void CCommLayerServerSocket::ProcessMessage(const std::string& pMessage, GIOChan
}
else
{
- warn_client("Received unknown message type.");
+ error_msg("Received unknown message type");
}
}
@@ -227,7 +229,12 @@ vector_crash_infos_t CCommLayerServerSocket::GetCrashInfos(const std::string &pS
report_status_t CCommLayerServerSocket::Report(const map_crash_report_t& pReport, const std::string& pSender)
{
report_status_t rs;
- rs = ::Report(pReport, pSender);
+ //FIXME: a hack to make this compile, but we don't use sockets anyway
+ /* we could probably remove the sockets and rely only on dbus,
+ as it will become mandatory even on servers, but this needs some investigation
+ and more opinions
+ */
+ //rs = ::Report(pReport, pSettings, pSender);
return rs;
}
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index 94fb9d79..e684277c 100644
--- a/src/Daemon/CrashWatcher.cpp
+++ b/src/Daemon/CrashWatcher.cpp
@@ -22,16 +22,16 @@
#include "ABRTException.h"
#include "CrashWatcher.h"
-void CCrashWatcher::Status(const std::string& pMessage, const char* peer, uint64_t pJobID)
+void CCrashWatcher::Status(const char *pMessage, const char* peer, uint64_t pJobID)
{
- VERB1 log("Update('%s'): %s", peer, pMessage.c_str());
+ VERB1 log("Update('%s'): %s", peer, pMessage);
if (g_pCommLayer != NULL)
g_pCommLayer->Update(pMessage, peer, pJobID);
}
-void CCrashWatcher::Warning(const std::string& pMessage, const char* peer, uint64_t pJobID)
+void CCrashWatcher::Warning(const char *pMessage, const char* peer, uint64_t pJobID)
{
- VERB1 log("Warning('%s'): %s", peer, pMessage.c_str());
+ VERB1 log("Warning('%s'): %s", peer, pMessage);
if (g_pCommLayer != NULL)
g_pCommLayer->Warning(pMessage, peer, pJobID);
}
@@ -44,7 +44,7 @@ CCrashWatcher::~CCrashWatcher()
{
}
-vector_crash_infos_t GetCrashInfos(const std::string &pUID)
+vector_crash_infos_t GetCrashInfos(const char *pUID)
{
vector_crash_infos_t retval;
log("Getting crash infos...");
@@ -58,25 +58,24 @@ vector_crash_infos_t GetCrashInfos(const std::string &pUID)
{
mw_result_t res;
map_crash_info_t info;
+ const char *uuid = UUIDsUIDs[ii].first.c_str();
+ const char *uid = UUIDsUIDs[ii].second.c_str();
- res = GetCrashInfo(UUIDsUIDs[ii].first, UUIDsUIDs[ii].second, info);
+ res = GetCrashInfo(uuid, uid, info);
switch (res)
{
case MW_OK:
retval.push_back(info);
break;
case MW_ERROR:
- warn_client("Can not find debug dump directory for UUID: " + UUIDsUIDs[ii].first + ", deleting from database");
- update_client("Can not find debug dump directory for UUID: " + UUIDsUIDs[ii].first + ", deleting from database");
- DeleteCrashInfo(UUIDsUIDs[ii].first, UUIDsUIDs[ii].second);
+ error_msg("Can't find dump directory for UUID %s, deleting from database", uuid);
+ DeleteCrashInfo(uuid, uid);
break;
case MW_FILE_ERROR:
+ error_msg("Can't open file in dump directory for UUID %s, deleting", uuid);
{
- std::string debugDumpDir;
- warn_client("Can not open file in debug dump directory for UUID: " + UUIDsUIDs[ii].first + ", deleting");
- update_client("Can not open file in debug dump directory for UUID: " + UUIDsUIDs[ii].first + ", deleting");
- debugDumpDir = DeleteCrashInfo(UUIDsUIDs[ii].first, UUIDsUIDs[ii].second);
- DeleteDebugDumpDir(debugDumpDir);
+ std::string debugDumpDir = DeleteCrashInfo(uuid, uid);
+ DeleteDebugDumpDir(debugDumpDir.c_str());
}
break;
default:
@@ -90,8 +89,7 @@ vector_crash_infos_t GetCrashInfos(const std::string &pUID)
{
throw e;
}
- warn_client(e.what());
- update_client(e.what());
+ error_msg("%s", e.what());
}
//retval = GetCrashInfos(pUID);
@@ -124,17 +122,17 @@ map_crash_report_t GetJobResult(const char* pUUID, const char* pUID, int force)
case MW_OK:
break;
case MW_IN_DB_ERROR:
- warn_client(std::string("Did not find crash with UUID ") + pUUID + " in database");
+ error_msg("Can't find crash with UUID %s in database", pUUID);
break;
case MW_PLUGIN_ERROR:
- warn_client("Particular analyzer plugin isn't loaded or there is an error within plugin(s)");
+ error_msg("Particular analyzer plugin isn't loaded or there is an error within plugin(s)");
break;
case MW_CORRUPTED:
case MW_FILE_ERROR:
default:
- warn_client(std::string("Corrupted crash with UUID ") + pUUID + ", deleting");
+ error_msg("Corrupted crash with UUID %s, deleting", pUUID);
std::string debugDumpDir = DeleteCrashInfo(pUUID, pUID);
- DeleteDebugDumpDir(debugDumpDir);
+ DeleteDebugDumpDir(debugDumpDir.c_str());
break;
}
return crashReport;
@@ -163,18 +161,9 @@ static void* create_report(void* arg)
}
catch (CABRTException& e)
{
- if (e.type() == EXCEP_FATAL)
- {
- set_client_name(NULL);
- /* free strduped strings */
- free(thread_data->UUID);
- free(thread_data->UID);
- free(thread_data->peer);
- free(thread_data);
- throw e;
- }
- warn_client(e.what());
+ error_msg("%s", e.what());
}
+ catch (...) {}
set_client_name(NULL);
/* free strduped strings */
@@ -193,10 +182,12 @@ int CreateReportThread(const char* pUUID, const char* pUID, int force, const cha
thread_data->UID = xstrdup(pUID);
thread_data->force = force;
thread_data->peer = xstrdup(pSender);
+
//TODO: do we need this?
//pthread_attr_t attr;
//pthread_attr_init(&attr);
//pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
int r = pthread_create(&thread_data->thread_id, NULL, create_report, thread_data);
if (r != 0)
{
@@ -208,21 +199,19 @@ int CreateReportThread(const char* pUUID, const char* pUID, int force, const cha
* or ulimit is exceeded (someone floods us with CreateReport() dbus calls?)
*/
error_msg("Can't create thread");
+ return r;
}
- else
- {
- VERB3 log("Thread %llx created", (unsigned long long)thread_data->thread_id);
- }
+ VERB3 log("Thread %llx created", (unsigned long long)thread_data->thread_id);
//pthread_attr_destroy(&attr);
return r;
}
-bool DeleteDebugDump(const std::string& pUUID, const std::string& pUID)
+bool DeleteDebugDump(const char *pUUID, const char *pUID)
{
try
{
std::string debugDumpDir = DeleteCrashInfo(pUUID, pUID);
- DeleteDebugDumpDir(debugDumpDir);
+ DeleteDebugDumpDir(debugDumpDir.c_str());
}
catch (CABRTException& e)
{
@@ -230,8 +219,7 @@ bool DeleteDebugDump(const std::string& pUUID, const std::string& pUID)
{
throw e;
}
- warn_client(e.what());
- update_client(e.what());
+ error_msg("%s", e.what());
return false;
}
return true;
diff --git a/src/Daemon/CrashWatcher.h b/src/Daemon/CrashWatcher.h
index d8c7c28a..995d2a12 100644
--- a/src/Daemon/CrashWatcher.h
+++ b/src/Daemon/CrashWatcher.h
@@ -44,13 +44,13 @@ class CCrashWatcher
public:
/* Observer methods */
- virtual void Status(const std::string& pMessage, const char* peer, uint64_t pJobID);
- virtual void Warning(const std::string& pMessage, const char* peer, uint64_t pJobID);
+ virtual void Status(const char *pMessage, const char* peer, uint64_t pJobID);
+ virtual void Warning(const char *pMessage, const char* peer, uint64_t pJobID);
};
-vector_crash_infos_t GetCrashInfos(const std::string &pUID);
+vector_crash_infos_t GetCrashInfos(const char *pUID);
int CreateReportThread(const char* pUUID, const char* pUID, int force, const char* pSender);
map_crash_report_t GetJobResult(const char* pUUID, const char* pUID, int force);
-bool DeleteDebugDump(const std::string& pUUID, const std::string& pUID);
+bool DeleteDebugDump(const char *pUUID, const char *pUID);
#endif /*CRASHWATCHER_H_*/
diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp
index d1ab188e..67e72cca 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -18,10 +18,14 @@
*/
#include <syslog.h>
-#include <sys/inotify.h>
-#include <glib.h>
#include <pthread.h>
+#include <resolv.h> /* res_init */
#include <string>
+#include <limits.h>
+#include <sys/inotify.h>
+#include <xmlrpc-c/base.h>
+#include <xmlrpc-c/client.h>
+#include <glib.h>
#if HAVE_CONFIG_H
#include <config.h>
#endif
@@ -105,24 +109,14 @@ typedef struct cron_callback_data_t
} cron_callback_data_t;
-static uint8_t s_sig_caught;
-static GMainLoop* g_pMainloop;
+static uint8_t s_sig_caught; /* must be one byte */
+static int s_signal_pipe[2];
+static int s_signal_pipe_write = -1;
+static unsigned s_timeout;
+static bool s_exiting;
CCommLayerServer* g_pCommLayer;
-pthread_mutex_t g_pJobsMutex;
-
-
-/* Is it "." or ".."? */
-/* abrtlib candidate */
-static bool dot_or_dotdot(const char *filename)
-{
- if (filename[0] != '.') return false;
- if (filename[1] == '\0') return true;
- if (filename[1] != '.') return false;
- if (filename[2] == '\0') return true;
- return false;
-}
static double GetDirSize(const std::string &pPath, std::string *worst_dir = NULL, const char *excluded = NULL)
{
@@ -171,6 +165,18 @@ static double GetDirSize(const std::string &pPath, std::string *worst_dir = NULL
return size;
}
+static bool analyzer_has_InformAllUsers(const char *analyzer_name)
+{
+ CAnalyzer* analyzer = g_pPluginManager->GetAnalyzer(analyzer_name);
+ if (!analyzer)
+ return false;
+ map_plugin_settings_t settings = analyzer->GetSettings();
+ map_plugin_settings_t::const_iterator it = settings.find("InformAllUsers");
+ if (it == settings.end())
+ return false;
+ return string_to_bool(it->second.c_str());
+}
+
static void cron_delete_callback_data_cb(gpointer data)
{
cron_callback_data_t* cronDeleteCallbackData = static_cast<cron_callback_data_t*>(data);
@@ -182,8 +188,9 @@ static gboolean cron_activation_periodic_cb(gpointer data)
cron_callback_data_t* cronPeriodicCallbackData = static_cast<cron_callback_data_t*>(data);
VERB1 log("Activating plugin: %s", cronPeriodicCallbackData->m_sPluginName.c_str());
RunAction(DEBUG_DUMPS_DIR,
- cronPeriodicCallbackData->m_sPluginName,
- cronPeriodicCallbackData->m_sPluginArgs);
+ cronPeriodicCallbackData->m_sPluginName.c_str(),
+ cronPeriodicCallbackData->m_sPluginArgs.c_str()
+ );
return TRUE;
}
static gboolean cron_activation_one_cb(gpointer data)
@@ -191,8 +198,9 @@ static gboolean cron_activation_one_cb(gpointer data)
cron_callback_data_t* cronOneCallbackData = static_cast<cron_callback_data_t*>(data);
VERB1 log("Activating plugin: %s", cronOneCallbackData->m_sPluginName.c_str());
RunAction(DEBUG_DUMPS_DIR,
- cronOneCallbackData->m_sPluginName,
- cronOneCallbackData->m_sPluginArgs);
+ cronOneCallbackData->m_sPluginName.c_str(),
+ cronOneCallbackData->m_sPluginArgs.c_str()
+ );
return FALSE;
}
static gboolean cron_activation_reshedule_cb(gpointer data)
@@ -206,7 +214,8 @@ static gboolean cron_activation_reshedule_cb(gpointer data)
cronPeriodicCallbackData->m_nTimeout,
cron_activation_periodic_cb,
static_cast<gpointer>(cronPeriodicCallbackData),
- cron_delete_callback_data_cb);
+ cron_delete_callback_data_cb
+ );
return FALSE;
}
@@ -232,7 +241,7 @@ static void SetUpMW()
vector_pair_string_string_t::iterator it_ar = g_settings_vectorActionsAndReporters.begin();
for (; it_ar != g_settings_vectorActionsAndReporters.end(); it_ar++)
{
- AddActionOrReporter(it_ar->first, it_ar->second);
+ AddActionOrReporter(it_ar->first.c_str(), it_ar->second.c_str());
}
VERB1 log("Adding analyzers, actions or reporters");
map_analyzer_actions_and_reporters_t::iterator it_aar = g_settings_mapAnalyzerActionsAndReporters.begin();
@@ -241,7 +250,7 @@ static void SetUpMW()
vector_pair_string_string_t::iterator it_ar = it_aar->second.begin();
for (; it_ar != it_aar->second.end(); it_ar++)
{
- AddAnalyzerActionOrReporter(it_aar->first, it_ar->first, it_ar->second);
+ AddAnalyzerActionOrReporter(it_aar->first.c_str(), it_ar->first.c_str(), it_ar->second.c_str());
}
}
}
@@ -322,13 +331,13 @@ static int SetUpCron()
vector_pair_string_string_t::iterator it_ar = it_c->second.begin();
for (; it_ar != it_c->second.end(); it_ar++)
{
- cron_callback_data_t* cronOneCallbackData = new cron_callback_data_t((*it_ar).first, (*it_ar).second, timeout);
+ cron_callback_data_t* cronOneCallbackData = new cron_callback_data_t(it_ar->first, it_ar->second, timeout);
g_timeout_add_seconds_full(G_PRIORITY_DEFAULT,
timeout,
cron_activation_one_cb,
static_cast<gpointer>(cronOneCallbackData),
cron_delete_callback_data_cb);
- cron_callback_data_t* cronResheduleCallbackData = new cron_callback_data_t((*it_ar).first, (*it_ar).second, 24 * 60 * 60);
+ cron_callback_data_t* cronResheduleCallbackData = new cron_callback_data_t(it_ar->first, it_ar->second, 24 * 60 * 60);
g_timeout_add_seconds_full(G_PRIORITY_DEFAULT,
timeout,
cron_activation_reshedule_cb,
@@ -375,13 +384,12 @@ static void FindNewDumps(const char* pPath)
map_crash_info_t crashinfo;
try
{
- mw_result_t res;
- res = SaveDebugDump(*itt, crashinfo);
+ mw_result_t res = SaveDebugDump(itt->c_str(), crashinfo);
switch (res)
{
case MW_OK:
VERB1 log("Saving into database (%s)", itt->c_str());
- RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT]);
+ RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT].c_str());
break;
case MW_IN_DB:
VERB1 log("Already saved in database (%s)", itt->c_str());
@@ -397,7 +405,7 @@ static void FindNewDumps(const char* pPath)
//Perhaps corrupted & bad needs to be logged unconditionally,
//already saved one - only on VERB1
VERB1 log("Corrupted, bad or already saved crash, deleting");
- DeleteDebugDumpDir(*itt);
+ DeleteDebugDumpDir(itt->c_str());
break;
}
}
@@ -407,7 +415,7 @@ static void FindNewDumps(const char* pPath)
{
throw e;
}
- error_msg("%s", e.what().c_str());
+ error_msg("%s", e.what());
}
}
}
@@ -453,63 +461,44 @@ static int Lock()
/* we leak opened lfd intentionally */
}
-static void handle_fatal_signal(int signal)
+static void handle_fatal_signal(int signo)
{
- s_sig_caught = signal;
+ s_sig_caught = signo;
+ VERB3 log("Got signal %d", signo);
+ if (s_signal_pipe_write >= 0)
+ write(s_signal_pipe_write, &s_sig_caught, 1);
}
-/* One of our event sources is s_sig_caught when it becomes != 0.
- * glib machinery we need to hook it up to the main loop:
- * prepare():
- * If the source can determine that it is ready here (without waiting
- * for the results of the poll() call) it should return TRUE. It can also
- * return a timeout_ value which should be the maximum timeout (in milliseconds)
- * which should be passed to the poll() call.
- * check():
- * Called after all the file descriptors are polled. The source should
- * return TRUE if it is ready to be dispatched.
- * dispatch():
- * Called to dispatch the event source, after it has returned TRUE
- * in either its prepare or its check function. The dispatch function
- * is passed in a callback function and data. The callback function
- * may be NULL if the source was never connected to a callback using
- * g_source_set_callback(). The dispatch function should
- * call the callback function with user_data and whatever additional
- * parameters are needed for this type of event source.
- */
-static gboolean waitsignal_prepare(GSource *source, gint *timeout_)
+/* Signal pipe handler */
+static gboolean handle_signal_cb(GIOChannel *gio, GIOCondition condition, gpointer ptr_unused)
{
- /* We depend on the fact that in Unix, poll() is interrupted
- * by caught signals (in returns EINTR). Thus we do not need to set
- * a small timeout here: infinite timeout (-1) works too */
- *timeout_ = -1;
- return s_sig_caught != 0;
-}
-static gboolean waitsignal_check(GSource *source)
-{
- return s_sig_caught != 0;
-}
-static gboolean waitsignal_dispatch(GSource *source, GSourceFunc callback, gpointer user_data)
-{
- g_main_quit(g_pMainloop);
- return 1;
+ char signo;
+ gsize len = 0;
+ g_io_channel_read(gio, &signo, 1, &len);
+ if (len == 1)
+ {
+ /* we did receive a signal */
+ VERB3 log("Got signal %d through signal pipe", signo);
+ s_exiting = 1;
+ return TRUE;
+ }
+ return FALSE;
}
/* Inotify handler */
-static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointer ptr_unused)
+static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpointer ptr_unused)
{
/* 128 simultaneous actions */
#define INOTIFY_BUFF_SIZE ((sizeof(struct inotify_event) + FILENAME_MAX)*128)
- GIOError err;
- char *buf = new char[INOTIFY_BUFF_SIZE];
+ char *buf = (char*)xmalloc(INOTIFY_BUFF_SIZE);
gsize len;
gsize i = 0;
errno = 0;
- err = g_io_channel_read(gio, buf, INOTIFY_BUFF_SIZE, &len);
+ GIOError err = g_io_channel_read(gio, buf, INOTIFY_BUFF_SIZE, &len);
if (err != G_IO_ERROR_NONE)
{
perror_msg("Error reading inotify fd");
- delete[] buf;
+ free(buf);
return FALSE;
}
/* reconstruct each event and send message to the dbus */
@@ -540,29 +529,34 @@ static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointe
) {
log("Size of '%s' >= %u MB, deleting '%s'", DEBUG_DUMPS_DIR, g_settings_nMaxCrashReportsSize, worst_dir.c_str());
g_pCommLayer->QuotaExceed(_("Report size exceeded the quota. Please check system's MaxCrashReportsSize value in abrt.conf."));
- DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + worst_dir);
+ DeleteDebugDumpDir(concat_path_file(DEBUG_DUMPS_DIR, worst_dir.c_str()).c_str());
worst_dir = "";
}
map_crash_info_t crashinfo;
try
{
- mw_result_t res;
- res = SaveDebugDump(std::string(DEBUG_DUMPS_DIR) + "/" + name, crashinfo);
+ std::string fullname = concat_path_file(DEBUG_DUMPS_DIR, name);
+
+ mw_result_t res = SaveDebugDump(fullname.c_str(), crashinfo);
switch (res)
{
case MW_OK:
- log("New crash, saving...");
- RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT]);
- /* Send dbus signal */
- g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]);
- break;
+ log("New crash, saving");
+ RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT].c_str());
+ /* Fall through to "send dbus signal" */
case MW_REPORTED:
case MW_OCCURED:
- log("Already saved crash, deleting...");
+ if (res != MW_OK)
+ log("Already saved crash, just sending dbus signal");
/* Send dbus signal */
- g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]);
- DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name);
+ {
+ const char *uid_str = analyzer_has_InformAllUsers(crashinfo[CD_MWANALYZER][CD_CONTENT].c_str())
+ ? NULL
+ : crashinfo[CD_UID][CD_CONTENT].c_str();
+ g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT].c_str(), uid_str);
+ }
+ //DeleteDebugDumpDir(fullname.c_str());
break;
case MW_BLACKLISTED:
case MW_CORRUPTED:
@@ -571,31 +565,96 @@ static gboolean handle_event_cb(GIOChannel *gio, GIOCondition condition, gpointe
case MW_IN_DB:
case MW_FILE_ERROR:
default:
- log("Corrupted or bad crash, deleting...");
- DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name);
+ log("Corrupted or bad crash, deleting");
+ DeleteDebugDumpDir(fullname.c_str());
break;
}
}
catch (CABRTException& e)
{
- warn_client(e.what());
+ error_msg(e.what());
if (e.type() == EXCEP_FATAL)
{
- delete[] buf;
+ free(buf);
return -1;
}
}
catch (...)
{
- delete[] buf;
+ free(buf);
throw;
}
} /* while */
- delete[] buf;
+ free(buf);
return TRUE;
}
+/* Run main loop with idle timeout.
+ * Basically, almost like glib's g_main_run(loop)
+ */
+static void run_main_loop(GMainLoop* loop)
+{
+ GMainContext *context = g_main_loop_get_context(loop);
+ time_t old_time = 0;
+ time_t dns_conf_hash = 0;
+
+ while (!s_exiting)
+ {
+ /* we have just a handful of sources, 32 should be ample */
+ const unsigned NUM_POLLFDS = 32;
+ GPollFD fds[NUM_POLLFDS];
+ gboolean some_ready;
+ gint max_priority;
+ gint timeout;
+
+ some_ready = g_main_context_prepare(context, &max_priority);
+ if (some_ready)
+ g_main_context_dispatch(context);
+
+ gint nfds = g_main_context_query(context, max_priority, &timeout, fds, NUM_POLLFDS);
+ if (nfds > NUM_POLLFDS)
+ error_msg_and_die("Internal error");
+
+ if (s_timeout)
+ alarm(s_timeout);
+ g_poll(fds, nfds, timeout);
+ if (s_timeout)
+ alarm(0);
+
+ /* res_init() makes glibc reread /etc/resolv.conf.
+ * I'd think libc should be clever enough to do it itself
+ * at every name resolution attempt, but no...
+ * We need to guess ourself whether we want to do it.
+ */
+ time_t now = time(NULL) >> 2;
+ if (old_time != now) /* check once in 4 seconds */
+ {
+ old_time = now;
+
+ time_t hash = 0;
+ struct stat sb;
+ if (stat("/etc/resolv.conf", &sb) == 0)
+ hash = sb.st_mtime;
+ if (stat("/etc/host.conf", &sb) == 0)
+ hash += sb.st_mtime;
+ if (stat("/etc/hosts", &sb) == 0)
+ hash += sb.st_mtime;
+ if (stat("/etc/nsswitch.conf", &sb) == 0)
+ hash += sb.st_mtime;
+ if (dns_conf_hash != hash)
+ {
+ dns_conf_hash = hash;
+ res_init();
+ }
+ }
+
+ some_ready = g_main_context_check(context, max_priority, fds, nfds);
+ if (some_ready)
+ g_main_context_dispatch(context);
+ }
+}
+
static void start_syslog_logging()
{
/* Open stdin to /dev/null */
@@ -611,23 +670,29 @@ static void start_syslog_logging()
logmode = LOGMODE_SYSLOG;
}
-static void sanitize_dump_dir_rights()
+static void ensure_root_writable_dir(const char *dir)
{
struct stat sb;
- if (mkdir(DEBUG_DUMPS_DIR, 0755) != 0 && errno != EEXIST)
- perror_msg_and_die("Can't create '%s'", DEBUG_DUMPS_DIR);
- if (stat(DEBUG_DUMPS_DIR, &sb) != 0 || !S_ISDIR(sb.st_mode))
- error_msg_and_die("'%s' is not a directory", DEBUG_DUMPS_DIR);
-
- if (sb.st_uid != 0 || sb.st_gid != 0 || chown(DEBUG_DUMPS_DIR, 0, 0) != 0)
- perror_msg_and_die("Can't set owner 0:0 on '%s'", DEBUG_DUMPS_DIR);
+ if (mkdir(dir, 0755) != 0 && errno != EEXIST)
+ perror_msg_and_die("Can't create '%s'", dir);
+ if (stat(dir, &sb) != 0 || !S_ISDIR(sb.st_mode))
+ error_msg_and_die("'%s' is not a directory", dir);
+ if ((sb.st_uid != 0 || sb.st_gid != 0) && chown(dir, 0, 0) != 0)
+ perror_msg_and_die("Can't set owner 0:0 on '%s'", dir);
/* We can't allow anyone to create dumps: otherwise users can flood
* us with thousands of bogus or malicious dumps */
/* 07000 bits are setuid, setgit, and sticky, and they must be unset */
- /* 00777 bits are usual "rwx" access rights */
- if ((sb.st_mode & 07777) != 0755 && chmod(DEBUG_DUMPS_DIR, 0755) != 0)
- perror_msg_and_die("Can't set mode rwxr-xr-x on '%s'", DEBUG_DUMPS_DIR);
+ /* 00777 bits are usual "rwxrwxrwx" access rights */
+ if ((sb.st_mode & 07777) != 0755 && chmod(dir, 0755) != 0)
+ perror_msg_and_die("Can't set mode rwxr-xr-x on '%s'", dir);
+}
+
+static void sanitize_dump_dir_rights()
+{
+ ensure_root_writable_dir(DEBUG_DUMPS_DIR);
+ ensure_root_writable_dir(DEBUG_DUMPS_DIR"-di"); /* debuginfo cache */
+ ensure_root_writable_dir(VAR_RUN"/abrt"); /* temp dir */
}
int main(int argc, char** argv)
@@ -643,8 +708,10 @@ int main(int argc, char** argv)
textdomain(PACKAGE);
#endif
- while ((opt = getopt(argc, argv, "dsv")) != -1)
+ while ((opt = getopt(argc, argv, "dsvt:")) != -1)
{
+ unsigned long ul;
+
switch (opt)
{
case 'd':
@@ -656,20 +723,32 @@ int main(int argc, char** argv)
case 'v':
g_verbose++;
break;
+ case 't':
+ char *end;
+ errno = 0;
+ s_timeout = ul = strtoul(optarg, &end, 0);
+ if (errno == 0 && *end == '\0' && ul <= INT_MAX)
+ break;
+ /* fall through to error */
default:
error_msg_and_die(
"Usage: abrtd [-dv]\n"
- "\nOptions:"
+ "\nOptions:"
"\n\t-d\tDo not daemonize"
"\n\t-s\tLog to syslog even with -d"
+ "\n\t-t SEC\tExit after SEC seconds of inactivity"
"\n\t-v\tVerbose"
);
}
}
msg_prefix = "abrtd: "; /* for log(), error_msg() and such */
+
+ xpipe(s_signal_pipe);
signal(SIGTERM, handle_fatal_signal);
- signal(SIGINT, handle_fatal_signal);
+ signal(SIGINT, handle_fatal_signal);
+ if (s_timeout)
+ signal(SIGALRM, handle_fatal_signal);
/* Daemonize unless -d */
if (daemonize)
@@ -705,7 +784,9 @@ int main(int argc, char** argv)
start_syslog_logging();
}
- GIOChannel* pGio = NULL;
+ GMainLoop* pMainloop = NULL;
+ GIOChannel* pGiochannel_inotify = NULL;
+ GIOChannel* pGiochannel_signal = NULL;
bool lockfile_created = false;
bool pidfile_created = false;
CCrashWatcher watcher;
@@ -713,17 +794,24 @@ int main(int argc, char** argv)
/* Initialization */
try
{
- pthread_mutex_init(&g_pJobsMutex, NULL); /* never fails */
init_daemon_logging(&watcher);
+
+ VERB1 log("Initializing XML-RPC library");
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
+ xmlrpc_client_setup_global_const(&env);
+ if (env.fault_occurred)
+ error_msg_and_die("XML-RPC Fault: %s(%d)", env.fault_string, env.fault_code);
VERB1 log("Creating glib main loop");
- g_pMainloop = g_main_loop_new(NULL, FALSE);
+ pMainloop = g_main_loop_new(NULL, FALSE);
/* Watching DEBUG_DUMPS_DIR for new files... */
VERB1 log("Initializing inotify");
- /*FIXME: python hook runs with ordinary user privileges,
- so it fails if everyone doesn't have write acces
- to DEBUG_DUMPS_DIR
- */
- //sanitize_dump_dir_rights();
+// Enabled again since we have new abrt-pyhook-helper, remove comment when verified to work
+ /* FIXME: python hook runs with ordinary user privileges,
+ * so it fails if everyone doesn't have write acces
+ * to DEBUG_DUMPS_DIR
+ */
+ sanitize_dump_dir_rights();
errno = 0;
int inotify_fd = inotify_init();
if (inotify_fd == -1)
@@ -738,7 +826,7 @@ int main(int argc, char** argv)
SetUpMW(); /* logging is inside */
if (SetUpCron() != 0)
throw 1;
-#ifdef ENABLE_DBUS
+#if 1 //def ENABLE_DBUS
VERB1 log("Initializing dbus");
g_pCommLayer = new CCommLayerServerDBus();
#elif ENABLE_SOCKET
@@ -747,18 +835,12 @@ int main(int argc, char** argv)
if (g_pCommLayer->m_init_error)
throw 1;
VERB1 log("Adding inotify watch to glib main loop");
- pGio = g_io_channel_unix_new(inotify_fd);
- g_io_add_watch(pGio, G_IO_IN, handle_event_cb, NULL);
+ pGiochannel_inotify = g_io_channel_unix_new(inotify_fd);
+ g_io_add_watch(pGiochannel_inotify, G_IO_IN, handle_inotify_cb, NULL);
/* Add an event source which waits for INT/TERM signal */
- VERB1 log("Adding signal watch to glib main loop");
- GSourceFuncs waitsignal_funcs;
- memset(&waitsignal_funcs, 0, sizeof(waitsignal_funcs));
- waitsignal_funcs.prepare = waitsignal_prepare;
- waitsignal_funcs.check = waitsignal_check;
- waitsignal_funcs.dispatch = waitsignal_dispatch;
- /*waitsignal_funcs.finalize = NULL; - already done */
- GSource *waitsignal_src = (GSource*) g_source_new(&waitsignal_funcs, sizeof(*waitsignal_src));
- g_source_attach(waitsignal_src, g_main_context_default());
+ VERB1 log("Adding signal pipe watch to glib main loop");
+ pGiochannel_signal = g_io_channel_unix_new(s_signal_pipe[0]);
+ g_io_add_watch(pGiochannel_signal, G_IO_IN, handle_signal_cb, NULL);
/* Mark the territory */
VERB1 log("Creating lock file");
if (Lock() != 0)
@@ -788,17 +870,20 @@ int main(int argc, char** argv)
start_syslog_logging();
}
+ /* Only now we want signal pipe to work */
+ s_signal_pipe_write = s_signal_pipe[1];
+
/* Enter the event loop */
try
{
/* This may take a while, therefore we don't do it in init section */
FindNewDumps(DEBUG_DUMPS_DIR);
log("Running...");
- g_main_run(g_pMainloop);
+ run_main_loop(pMainloop);
}
catch (CABRTException& e)
{
- error_msg("Error: %s", e.what().c_str());
+ error_msg("Error: %s", e.what());
}
catch (std::exception& e)
{
@@ -813,8 +898,12 @@ int main(int argc, char** argv)
unlink(VAR_RUN_PIDFILE);
if (lockfile_created)
unlink(VAR_RUN_LOCK_FILE);
- if (pGio)
- g_io_channel_unref(pGio);
+
+ if (pGiochannel_signal)
+ g_io_channel_unref(pGiochannel_signal);
+ if (pGiochannel_inotify)
+ g_io_channel_unref(pGiochannel_inotify);
+
delete g_pCommLayer;
if (g_pPluginManager)
{
@@ -822,13 +911,11 @@ int main(int argc, char** argv)
g_pPluginManager->UnLoadPlugins();
delete g_pPluginManager;
}
- if (g_pMainloop)
- g_main_loop_unref(g_pMainloop);
- if (pthread_mutex_destroy(&g_pJobsMutex) != 0)
- error_msg("Threading error: job mutex locked");
+ if (pMainloop)
+ g_main_loop_unref(pMainloop);
/* Exiting */
- if (s_sig_caught)
+ if (s_sig_caught && s_sig_caught != SIGALRM)
{
error_msg_and_die("Got signal %d, exiting", s_sig_caught);
signal(s_sig_caught, SIG_DFL);
diff --git a/src/Daemon/Daemon.h b/src/Daemon/Daemon.h
index c9a653ac..ac998b93 100644
--- a/src/Daemon/Daemon.h
+++ b/src/Daemon/Daemon.h
@@ -39,6 +39,4 @@ extern CPluginManager* g_pPluginManager;
*/
extern set_string_t g_setBlackList;
-extern pthread_mutex_t g_pJobsMutex;
-
#endif
diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am
index 0067e5dd..a5bb64f6 100644
--- a/src/Daemon/Makefile.am
+++ b/src/Daemon/Makefile.am
@@ -2,6 +2,7 @@ bin_SCRIPTS = abrt-debuginfo-install
sbin_PROGRAMS = abrtd
+# disabled: CommLayerServerSocket.h CommLayerServerSocket.cpp
abrtd_SOURCES = \
ABRTPlugin.h ABRTPlugin.cpp \
PluginManager.h PluginManager.cpp \
@@ -9,7 +10,6 @@ abrtd_SOURCES = \
MiddleWare.h MiddleWare.cpp \
CrashWatcher.h CrashWatcher.cpp \
CommLayerServer.h CommLayerServer.cpp \
- CommLayerServerSocket.h CommLayerServerSocket.cpp \
CommLayerServerDBus.h CommLayerServerDBus.cpp \
Daemon.h Daemon.cpp \
Settings.h Settings.cpp
@@ -24,13 +24,15 @@ abrtd_CPPFLAGS = \
-DPLUGINS_CONF_DIR=\"$(PLUGINS_CONF_DIR)\" \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
+ $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) \
$(ENABLE_SOCKET_OR_DBUS) \
-D_GNU_SOURCE
abrtd_LDADD = \
../../lib/Utils/libABRTUtils.la \
$(DL_LIBS) \
$(DBUS_LIBS) \
- $(RPM_LIBS)
+ $(RPM_LIBS) \
+ $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS)
dbusabrtconfdir = ${sysconfdir}/dbus-1/system.d/
dist_dbusabrtconf_DATA = dbus-abrt.conf
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index 2ccd5890..6a635642 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -20,6 +20,7 @@
*/
#include "abrtlib.h"
+#include "abrt_types.h"
#include "Daemon.h"
#include "Settings.h"
#include "RPM.h"
@@ -60,7 +61,7 @@ static map_analyzer_actions_and_reporters_t s_mapAnalyzerActionsAndReporters;
static vector_pair_string_string_t s_vectorActionsAndReporters;
-static void RunAnalyzerActions(const std::string& pAnalyzer, const std::string& pDebugDumpDir);
+static void RunAnalyzerActions(const char *pAnalyzer, const char *pDebugDumpDir);
/**
@@ -69,7 +70,7 @@ static void RunAnalyzerActions(const std::string& pAnalyzer, const std::string&
* @param pDebugDumpDir A debugdump dir containing all necessary data.
* @param pCrashReport A created crash report.
*/
-static void DebugDumpToCrashReport(const std::string& pDebugDumpDir, map_crash_report_t& pCrashReport)
+static void DebugDumpToCrashReport(const char *pDebugDumpDir, map_crash_report_t& pCrashReport)
{
std::string fileName;
std::string content;
@@ -84,19 +85,22 @@ static void DebugDumpToCrashReport(const std::string& pDebugDumpDir, map_crash_r
!dd.Exist(FILENAME_RELEASE) ||
!dd.Exist(FILENAME_EXECUTABLE))
{
- throw CABRTException(EXCEP_ERROR, "DebugDumpToCrashReport(): One or more of important file(s)'re missing.");
+ throw CABRTException(EXCEP_ERROR, "DebugDumpToCrashReport(): One or more of important file(s)'re missing");
}
+
pCrashReport.clear();
dd.InitGetNextFile();
while (dd.GetNextFile(fileName, content, isTextFile))
{
+ //VERB3 log(" file:'%s' text:%d", fileName.c_str(), isTextFile);
if (!isTextFile)
{
add_crash_data_to_crash_report(pCrashReport,
fileName,
CD_BIN,
CD_ISNOTEDITABLE,
- pDebugDumpDir + "/" + fileName);
+ concat_path_file(pDebugDumpDir, fileName.c_str())
+ );
}
else
{
@@ -135,8 +139,8 @@ static void DebugDumpToCrashReport(const std::string& pDebugDumpDir, map_crash_r
* @param pDebugDumpDir A debugdump dir containing all necessary data.
* @return A local UUID.
*/
-static std::string GetLocalUUID(const std::string& pAnalyzer,
- const std::string& pDebugDumpDir)
+static std::string GetLocalUUID(const char *pAnalyzer,
+ const char *pDebugDumpDir)
{
CAnalyzer* analyzer = g_pPluginManager->GetAnalyzer(pAnalyzer);
return analyzer->GetLocalUUID(pDebugDumpDir);
@@ -148,8 +152,8 @@ static std::string GetLocalUUID(const std::string& pAnalyzer,
* @param pDebugDumpDir A debugdump dir containing all necessary data.
* @return A global UUID.
*/
-static std::string GetGlobalUUID(const std::string& pAnalyzer,
- const std::string& pDebugDumpDir)
+static std::string GetGlobalUUID(const char *pAnalyzer,
+ const char *pDebugDumpDir)
{
CAnalyzer* analyzer = g_pPluginManager->GetAnalyzer(pAnalyzer);
return analyzer->GetGlobalUUID(pDebugDumpDir);
@@ -162,32 +166,32 @@ static std::string GetGlobalUUID(const std::string& pAnalyzer,
* @param pAnalyzer A name of an analyzer plugin.
* @param pDebugDumpPath A debugdump dir containing all necessary data.
*/
-static void CreateReport(const std::string& pAnalyzer,
- const std::string& pDebugDumpDir,
+static void CreateReport(const char *pAnalyzer,
+ const char *pDebugDumpDir,
int force)
{
CAnalyzer* analyzer = g_pPluginManager->GetAnalyzer(pAnalyzer);
analyzer->CreateReport(pDebugDumpDir, force);
}
-mw_result_t CreateCrashReport(const std::string& pUUID,
- const std::string& pUID,
+mw_result_t CreateCrashReport(const char *pUUID,
+ const char *pUID,
int force,
map_crash_report_t& pCrashReport)
{
- VERB2 log("CreateCrashReport('%s','%s',result)", pUUID.c_str(), pUID.c_str());
+ VERB2 log("CreateCrashReport('%s','%s',result)", pUUID, pUID);
database_row_t row;
- if (pUUID != "")
+ if (pUUID[0] != '\0')
{
CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
database->Connect();
row = database->GetUUIDData(pUUID, pUID);
database->DisConnect();
}
- if (pUUID == "" || row.m_sUUID != pUUID)
+ if (pUUID[0] == '\0' || row.m_sUUID != pUUID)
{
- warn_client("CreateCrashReport(): UUID '"+pUUID+"' is not in database");
+ error_msg("UUID '%s' is not in database", pUUID);
return MW_IN_DB_ERROR;
}
@@ -200,7 +204,7 @@ mw_result_t CreateCrashReport(const std::string& pUUID,
std::string reproduce = "1.\n2.\n3.\n";
VERB3 log(" LoadText(FILENAME_ANALYZER,'%s')", row.m_sDebugDumpDir.c_str());
- dd.Open(row.m_sDebugDumpDir);
+ dd.Open(row.m_sDebugDumpDir.c_str());
dd.LoadText(FILENAME_ANALYZER, analyzer);
if (dd.Exist(FILENAME_COMMENT))
{
@@ -213,15 +217,15 @@ mw_result_t CreateCrashReport(const std::string& pUUID,
dd.Close();
VERB3 log(" CreateReport('%s')", analyzer.c_str());
- CreateReport(analyzer, row.m_sDebugDumpDir, force);
+ CreateReport(analyzer.c_str(), row.m_sDebugDumpDir.c_str(), force);
- gUUID = GetGlobalUUID(analyzer, row.m_sDebugDumpDir);
+ gUUID = GetGlobalUUID(analyzer.c_str(), row.m_sDebugDumpDir.c_str());
VERB3 log(" GetGlobalUUID:'%s'", gUUID.c_str());
VERB3 log(" RunAnalyzerActions");
- RunAnalyzerActions(analyzer, row.m_sDebugDumpDir);
+ RunAnalyzerActions(analyzer.c_str(), row.m_sDebugDumpDir.c_str());
VERB3 log(" DebugDumpToCrashReport");
- DebugDumpToCrashReport(row.m_sDebugDumpDir, pCrashReport);
+ DebugDumpToCrashReport(row.m_sDebugDumpDir.c_str(), pCrashReport);
add_crash_data_to_crash_report(pCrashReport, CD_UUID, CD_TXT, CD_ISNOTEDITABLE, gUUID);
add_crash_data_to_crash_report(pCrashReport, CD_MWANALYZER, CD_SYS, CD_ISNOTEDITABLE, analyzer);
@@ -232,16 +236,16 @@ mw_result_t CreateCrashReport(const std::string& pUUID,
}
catch (CABRTException& e)
{
- warn_client("CreateCrashReport(): " + e.what());
+ error_msg("%s", e.what());
if (e.type() == EXCEP_DD_OPEN)
{
return MW_ERROR;
}
- else if (e.type() == EXCEP_DD_LOAD)
+ if (e.type() == EXCEP_DD_LOAD)
{
return MW_FILE_ERROR;
}
- else if (e.type() == EXCEP_PLUGIN)
+ if (e.type() == EXCEP_PLUGIN)
{
return MW_PLUGIN_ERROR;
}
@@ -251,48 +255,46 @@ mw_result_t CreateCrashReport(const std::string& pUUID,
return MW_OK;
}
-void RunAction(const std::string& pActionDir,
- const std::string& pPluginName,
- const std::string& pPluginArgs)
+void RunAction(const char *pActionDir,
+ const char *pPluginName,
+ const char *pPluginArgs)
{
try
{
CAction* action = g_pPluginManager->GetAction(pPluginName);
-
action->Run(pActionDir, pPluginArgs);
}
catch (CABRTException& e)
{
- warn_client("RunAction(): " + e.what());
- update_client("Execution of '"+pPluginName+"' was not successful: " + e.what());
+ error_msg("Execution of '%s' was not successful: %s", pPluginName, e.what());
}
}
-void RunActionsAndReporters(const std::string& pDebugDumpDir)
+void RunActionsAndReporters(const char *pDebugDumpDir)
{
vector_pair_string_string_t::iterator it_ar = s_vectorActionsAndReporters.begin();
+ map_plugin_settings_t plugin_settings;
for (; it_ar != s_vectorActionsAndReporters.end(); it_ar++)
{
try
{
- if (g_pPluginManager->GetPluginType((*it_ar).first) == REPORTER)
+ if (g_pPluginManager->GetPluginType(it_ar->first) == REPORTER)
{
- CReporter* reporter = g_pPluginManager->GetReporter((*it_ar).first);
+ CReporter* reporter = g_pPluginManager->GetReporter(it_ar->first);
map_crash_report_t crashReport;
DebugDumpToCrashReport(pDebugDumpDir, crashReport);
- reporter->Report(crashReport, (*it_ar).second);
+ reporter->Report(crashReport, plugin_settings, it_ar->second);
}
- else if (g_pPluginManager->GetPluginType((*it_ar).first) == ACTION)
+ else if (g_pPluginManager->GetPluginType(it_ar->first) == ACTION)
{
- CAction* action = g_pPluginManager->GetAction((*it_ar).first);
- action->Run(pDebugDumpDir, (*it_ar).second);
+ CAction* action = g_pPluginManager->GetAction(it_ar->first);
+ action->Run(pDebugDumpDir, it_ar->second.c_str());
}
}
catch (CABRTException& e)
{
- warn_client("RunActionsAndReporters(): " + e.what());
- update_client("Activation of plugin '"+(*it_ar).first+"' was not successful: " + e.what());
+ error_msg("Activation of plugin '%s' was not successful: %s", it_ar->first.c_str(), e.what());
}
}
}
@@ -312,6 +314,11 @@ static bool CheckReport(const map_crash_report_t& pCrashReport)
map_crash_report_t::const_iterator it_executable = pCrashReport.find(FILENAME_EXECUTABLE);
map_crash_report_t::const_iterator end = pCrashReport.end();
+
+ // FIXME: bypass the test if it's kerneloops
+ if (it_package->second[CD_CONTENT] == "kernel")
+ return true;
+
if (it_analyzer == end || it_mwuid == end ||
it_mwuuid == end || it_package == end ||
it_architecture == end || it_kernel == end ||
@@ -334,7 +341,8 @@ static bool CheckReport(const map_crash_report_t& pCrashReport)
}
report_status_t Report(const map_crash_report_t& pCrashReport,
- const std::string& pUID)
+ map_map_string_t& pSettings,
+ const char *pUID)
{
report_status_t ret;
@@ -352,18 +360,18 @@ report_status_t Report(const map_crash_report_t& pCrashReport,
// Save comments and how to reproduciton
map_crash_report_t::const_iterator it_comment = pCrashReport.find(CD_COMMENT);
map_crash_report_t::const_iterator it_reproduce = pCrashReport.find(CD_REPRODUCE);
- std::string pDumpDir = getDebugDumpDir(UUID,UID);
+ std::string pDumpDir = getDebugDumpDir(UUID.c_str(), UID.c_str());
{
CDebugDump dd;
- dd.Open(pDumpDir);
+ dd.Open(pDumpDir.c_str());
if (it_comment != pCrashReport.end())
{
- dd.SaveText(FILENAME_COMMENT, it_comment->second[CD_CONTENT]);
+ dd.SaveText(FILENAME_COMMENT, it_comment->second[CD_CONTENT].c_str());
}
if (it_reproduce != pCrashReport.end())
{
- dd.SaveText(FILENAME_REPRODUCE, it_reproduce->second[CD_CONTENT]);
+ dd.SaveText(FILENAME_REPRODUCE, it_reproduce->second[CD_CONTENT].c_str());
}
}
@@ -407,7 +415,8 @@ report_status_t Report(const map_crash_report_t& pCrashReport,
}
}
#endif
- std::string res = reporter->Report(pCrashReport, it_r->second);
+ map_plugin_settings_t plugin_settings = pSettings[pluginName];
+ std::string res = reporter->Report(pCrashReport, plugin_settings, it_r->second);
#if 0 /* Using ~user/.abrt/ is bad wrt security */
if (home != "")
@@ -424,8 +433,7 @@ report_status_t Report(const map_crash_report_t& pCrashReport,
{
ret[pluginName].push_back("0");
ret[pluginName].push_back(e.what());
- warn_client("Report(): " + e.what());
- update_client("Reporting via '" + pluginName + "' was not successful: " + e.what());
+ update_client("Reporting via %s' was not successful: %s", pluginName.c_str(), e.what());
}
}
}
@@ -438,15 +446,15 @@ report_status_t Report(const map_crash_report_t& pCrashReport,
return ret;
}
-void DeleteDebugDumpDir(const std::string& pDebugDumpDir)
+void DeleteDebugDumpDir(const char *pDebugDumpDir)
{
CDebugDump dd;
dd.Open(pDebugDumpDir);
dd.Delete();
}
-std::string DeleteCrashInfo(const std::string& pUUID,
- const std::string& pUID)
+std::string DeleteCrashInfo(const char *pUUID,
+ const char *pUID)
{
database_row_t row;
CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
@@ -466,8 +474,8 @@ std::string DeleteCrashInfo(const std::string& pUUID,
* @return It returns true if debugdump dir is already saved, otherwise
* it returns false.
*/
-static bool IsDebugDumpSaved(const std::string& pUID,
- const std::string& pDebugDumpDir)
+static bool IsDebugDumpSaved(const char *pUID,
+ const char *pDebugDumpDir)
{
CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
database->Connect();
@@ -501,19 +509,19 @@ void LoadOpenGPGPublicKey(const char* key)
* @param pDebugDumpDir A debugdump dir containing all necessary data.
* @return It return results of operation. See mw_result_t.
*/
-static mw_result_t SavePackageDescriptionToDebugDump(const std::string& pExecutable,
- const std::string& pDebugDumpDir)
+static mw_result_t SavePackageDescriptionToDebugDump(const char *pExecutable,
+ const char *pDebugDumpDir)
{
std::string package;
std::string packageName;
- if (pExecutable == "kernel")
+ if (strcmp(pExecutable, "kernel") == 0)
{
packageName = package = "kernel";
}
else
{
- package = GetPackage(pExecutable.c_str());
+ package = GetPackage(pExecutable);
packageName = package.substr(0, package.rfind("-", package.rfind("-") - 1));
if (packageName == "" ||
(g_setBlackList.find(packageName) != g_setBlackList.end()))
@@ -533,7 +541,7 @@ static mw_result_t SavePackageDescriptionToDebugDump(const std::string& pExecuta
error_msg("package isn't signed with proper key");
return MW_GPG_ERROR;
}
- if (!CheckHash(packageName.c_str(), pExecutable.c_str()))
+ if (!CheckHash(packageName.c_str(), pExecutable))
{
error_msg("executable has bad hash");
return MW_GPG_ERROR;
@@ -542,19 +550,19 @@ static mw_result_t SavePackageDescriptionToDebugDump(const std::string& pExecuta
}
std::string description = GetDescription(packageName.c_str());
- std::string component = GetComponent(pExecutable.c_str());
+ std::string component = GetComponent(pExecutable);
try
{
CDebugDump dd;
dd.Open(pDebugDumpDir);
- dd.SaveText(FILENAME_PACKAGE, package);
- dd.SaveText(FILENAME_DESCRIPTION, description);
- dd.SaveText(FILENAME_COMPONENT, component);
+ dd.SaveText(FILENAME_PACKAGE, package.c_str());
+ dd.SaveText(FILENAME_DESCRIPTION, description.c_str());
+ dd.SaveText(FILENAME_COMPONENT, component.c_str());
}
catch (CABRTException& e)
{
- warn_client("SavePackageDescriptionToDebugDump(): " + e.what());
+ error_msg("%s", e.what());
if (e.type() == EXCEP_DD_SAVE)
{
return MW_FILE_ERROR;
@@ -571,7 +579,7 @@ static mw_result_t SavePackageDescriptionToDebugDump(const std::string& pExecuta
* @param pAnalyzer A name of an analyzer plugin.
* @param pDebugDumpPath A debugdump dir containing all necessary data.
*/
-static void RunAnalyzerActions(const std::string& pAnalyzer, const std::string& pDebugDumpDir)
+static void RunAnalyzerActions(const char *pAnalyzer, const char *pDebugDumpDir)
{
map_analyzer_actions_and_reporters_t::iterator analyzer = s_mapAnalyzerActionsAndReporters.find(pAnalyzer);
if (analyzer != s_mapAnalyzerActionsAndReporters.end())
@@ -585,13 +593,12 @@ static void RunAnalyzerActions(const std::string& pAnalyzer, const std::string&
if (g_pPluginManager->GetPluginType(pluginName) == ACTION)
{
CAction* action = g_pPluginManager->GetAction(pluginName);
- action->Run(pDebugDumpDir, it_a->second);
+ action->Run(pDebugDumpDir, it_a->second.c_str());
}
}
catch (CABRTException& e)
{
- warn_client("RunAnalyzerActions(): " + e.what());
- update_client("Action performed by '" + pluginName + "' was not successful: " + e.what());
+ update_client("Action performed by '%s' was not successful: %s", pluginName.c_str(), e.what());
}
}
}
@@ -608,10 +615,10 @@ static void RunAnalyzerActions(const std::string& pAnalyzer, const std::string&
* @param pCrashInfo A filled crash info.
* @return It return results of operation. See mw_result_t.
*/
-static mw_result_t SaveDebugDumpToDatabase(const std::string& pUUID,
- const std::string& pUID,
- const std::string& pTime,
- const std::string& pDebugDumpDir,
+static mw_result_t SaveDebugDumpToDatabase(const char *pUUID,
+ const char *pUID,
+ const char *pTime,
+ const char *pDebugDumpDir,
map_crash_info_t& pCrashInfo)
{
mw_result_t res;
@@ -635,8 +642,8 @@ static mw_result_t SaveDebugDumpToDatabase(const std::string& pUUID,
return res;
}
-std::string getDebugDumpDir( const std::string& pUUID,
- const std::string& pUID)
+std::string getDebugDumpDir(const char *pUUID,
+ const char *pUID)
{
CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
database_row_t row;
@@ -646,13 +653,13 @@ std::string getDebugDumpDir( const std::string& pUUID,
return row.m_sDebugDumpDir;
}
-mw_result_t SaveDebugDump(const std::string& pDebugDumpDir)
+mw_result_t SaveDebugDump(const char *pDebugDumpDir)
{
map_crash_info_t info;
return SaveDebugDump(pDebugDumpDir, info);
}
-mw_result_t SaveDebugDump(const std::string& pDebugDumpDir,
+mw_result_t SaveDebugDump(const char *pDebugDumpDir,
map_crash_info_t& pCrashInfo)
{
std::string lUUID;
@@ -673,7 +680,7 @@ mw_result_t SaveDebugDump(const std::string& pDebugDumpDir,
}
catch (CABRTException& e)
{
- warn_client("SaveDebugDump(): " + e.what());
+ error_msg("%s", e.what());
if (e.type() == EXCEP_DD_SAVE)
{
return MW_FILE_ERROR;
@@ -681,24 +688,24 @@ mw_result_t SaveDebugDump(const std::string& pDebugDumpDir,
return MW_ERROR;
}
- if (IsDebugDumpSaved(UID, pDebugDumpDir))
+ if (IsDebugDumpSaved(UID.c_str(), pDebugDumpDir))
{
return MW_IN_DB;
}
- res = SavePackageDescriptionToDebugDump(executable, pDebugDumpDir);
+ res = SavePackageDescriptionToDebugDump(executable.c_str(), pDebugDumpDir);
if (res != MW_OK)
{
return res;
}
- lUUID = GetLocalUUID(analyzer, pDebugDumpDir);
+ lUUID = GetLocalUUID(analyzer.c_str(), pDebugDumpDir);
- return SaveDebugDumpToDatabase(lUUID, UID, time, pDebugDumpDir, pCrashInfo);
+ return SaveDebugDumpToDatabase(lUUID.c_str(), UID.c_str(), time.c_str(), pDebugDumpDir, pCrashInfo);
}
-mw_result_t GetCrashInfo(const std::string& pUUID,
- const std::string& pUID,
- map_crash_info_t& pCrashInfo)
+mw_result_t GetCrashInfo(const char *pUUID,
+ const char *pUID,
+ map_crash_info_t& pCrashInfo)
{
pCrashInfo.clear();
CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
@@ -710,18 +717,20 @@ mw_result_t GetCrashInfo(const std::string& pUUID,
std::string package;
std::string executable;
std::string description;
+ std::string analyzer;
try
{
CDebugDump dd;
- dd.Open(row.m_sDebugDumpDir);
+ dd.Open(row.m_sDebugDumpDir.c_str());
dd.LoadText(FILENAME_EXECUTABLE, executable);
dd.LoadText(FILENAME_PACKAGE, package);
dd.LoadText(FILENAME_DESCRIPTION, description);
+ dd.LoadText(FILENAME_ANALYZER, analyzer);
}
catch (CABRTException& e)
{
- warn_client("GetCrashInfo(): " + e.what());
+ error_msg("%s", e.what());
if (e.type() == EXCEP_DD_LOAD)
{
return MW_FILE_ERROR;
@@ -738,11 +747,12 @@ mw_result_t GetCrashInfo(const std::string& pUUID,
add_crash_data_to_crash_info(pCrashInfo, CD_REPORTED, row.m_sReported);
add_crash_data_to_crash_info(pCrashInfo, CD_MESSAGE, row.m_sMessage);
add_crash_data_to_crash_info(pCrashInfo, CD_MWDDD, row.m_sDebugDumpDir);
+ add_crash_data_to_crash_info(pCrashInfo, CD_MWANALYZER, analyzer);
return MW_OK;
}
-vector_pair_string_string_t GetUUIDsOfCrash(const std::string& pUID)
+vector_pair_string_string_t GetUUIDsOfCrash(const char *pUID)
{
CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
vector_database_rows_t rows;
@@ -760,15 +770,15 @@ vector_pair_string_string_t GetUUIDsOfCrash(const std::string& pUID)
return UUIDsUIDs;
}
-void AddAnalyzerActionOrReporter(const std::string& pAnalyzer,
- const std::string& pAnalyzerOrReporter,
- const std::string& pArgs)
+void AddAnalyzerActionOrReporter(const char *pAnalyzer,
+ const char *pAnalyzerOrReporter,
+ const char *pArgs)
{
- s_mapAnalyzerActionsAndReporters[pAnalyzer].push_back(make_pair(pAnalyzerOrReporter, pArgs));
+ s_mapAnalyzerActionsAndReporters[pAnalyzer].push_back(make_pair(std::string(pAnalyzerOrReporter), std::string(pArgs)));
}
-void AddActionOrReporter(const std::string& pActionOrReporter,
- const std::string& pArgs)
+void AddActionOrReporter(const char *pActionOrReporter,
+ const char *pArgs)
{
- s_vectorActionsAndReporters.push_back(make_pair(pActionOrReporter, pArgs));
+ s_vectorActionsAndReporters.push_back(make_pair(std::string(pActionOrReporter), std::string(pArgs)));
}
diff --git a/src/Daemon/MiddleWare.h b/src/Daemon/MiddleWare.h
index fab822fe..0671dd02 100644
--- a/src/Daemon/MiddleWare.h
+++ b/src/Daemon/MiddleWare.h
@@ -63,8 +63,8 @@ void LoadOpenGPGPublicKey(const char* key);
* @param pCrashReport A filled crash report.
* @return It return results of operation. See mw_result_t.
*/
-mw_result_t CreateCrashReport(const std::string& pUUID,
- const std::string& pUID,
+mw_result_t CreateCrashReport(const char *pUUID,
+ const char *pUID,
int force,
map_crash_report_t& pCrashReport);
/**
@@ -73,15 +73,15 @@ mw_result_t CreateCrashReport(const std::string& pUUID,
* @param pPluginName An action plugin name.
* @param pPluginArgs Action plugin's arguments.
*/
-void RunAction(const std::string& pActionDir,
- const std::string& pPluginName,
- const std::string& pPluginArgs);
+void RunAction(const char *pActionDir,
+ const char *pPluginName,
+ const char *pPluginArgs);
/**
* Activates all action and reporter plugins when any
* crash occurs.
* @param pDebugDumpDir A debugdump dir containing all necessary data.
*/
-void RunActionsAndReporters(const std::string& pDebugDumpDir);
+void RunActionsAndReporters(const char *pDebugDumpDir);
/**
* Reports a crash report to particular receiver. It
* takes an user uid, tries to find user config file and load it. If it
@@ -93,7 +93,8 @@ void RunActionsAndReporters(const std::string& pDebugDumpDir);
* @return A report status, which reporters ends successfuly with messages.
*/
report_status_t Report(const map_crash_report_t& pCrashReport,
- const std::string& pUID);
+ map_map_string_t& pSettings,
+ const char *pUID);
/**
* Get debugdump direcotory. If debugdump is not found
* in database it will return empty string.
@@ -101,13 +102,13 @@ report_status_t Report(const map_crash_report_t& pCrashReport,
* @param pUID An UID of an user.
* @return A debugdump directory.
*/
-std::string getDebugDumpDir( const std::string& pUUID,
- const std::string& pUID);
+std::string getDebugDumpDir( const char *pUUID,
+ const char *pUID);
/**
* Deletes particular debugdump directory.
* @param pDebugDumpDir A debugdump directory.
*/
-void DeleteDebugDumpDir(const std::string& pDebugDumpDir);
+void DeleteDebugDumpDir(const char *pDebugDumpDir);
/**
* Deletes a row from database. If a deleting is
* successfull, it returns a debugdump directort, which is not
@@ -116,14 +117,14 @@ void DeleteDebugDumpDir(const std::string& pDebugDumpDir);
* @param pUID An UID of an user.
* @return A debugdump directory.
*/
-std::string DeleteCrashInfo(const std::string& pUUID,
- const std::string& pUID);
+std::string DeleteCrashInfo(const char *pUUID,
+ const char *pUID);
/**
* Saves debugdump into database.
* @param pDebugDumpDir A debugdump directory.
* @return It return results of operation. See mw_result_t.
*/
-mw_result_t SaveDebugDump(const std::string& pDebugDumpDir);
+mw_result_t SaveDebugDump(const char *pDebugDumpDir);
/**
* Saves debugdump into database. If saving is successful,
* it fills crash info.
@@ -131,7 +132,7 @@ mw_result_t SaveDebugDump(const std::string& pDebugDumpDir);
* @param pCrashInfo A crash info.
* @return It return results of operation. See mw_result_t.
*/
-mw_result_t SaveDebugDump(const std::string& pDebugDumpDir,
+mw_result_t SaveDebugDump(const char *pDebugDumpDir,
map_crash_info_t& pCrashInfo);
/**
* Get one crash info. If getting is successful,
@@ -141,8 +142,8 @@ mw_result_t SaveDebugDump(const std::string& pDebugDumpDir,
* @param pCrashInfo A crash info.
* @return It return results of operation. See mw_result_t.
*/
-mw_result_t GetCrashInfo(const std::string& pUUID,
- const std::string& pUID,
+mw_result_t GetCrashInfo(const char *pUUID,
+ const char *pUID,
map_crash_info_t& pCrashInfo);
/**
* Gets all local UUIDs and UIDs of crashes. These crashes
@@ -150,7 +151,7 @@ mw_result_t GetCrashInfo(const std::string& pUUID,
* @param pUID an UID of an user.
* @return A vector of pairs (local UUID, UID).
*/
-vector_pair_string_string_t GetUUIDsOfCrash(const std::string& pUID);
+vector_pair_string_string_t GetUUIDsOfCrash(const char *pUID);
/**
* Adds one association among alanyzer plugin and its
* action and reporter plugins.
@@ -158,17 +159,17 @@ vector_pair_string_string_t GetUUIDsOfCrash(const std::string& pUID);
* @param pActionOrReporter A name of an action or reporter plugin.
* @param pArgs An arguments for action or reporter plugin.
*/
-void AddAnalyzerActionOrReporter(const std::string& pAnalyzer,
- const std::string& pActionOrReporter,
- const std::string& pArgs);
+void AddAnalyzerActionOrReporter(const char *pAnalyzer,
+ const char *pActionOrReporter,
+ const char *pArgs);
/**
* Add action and reporter plugins, which are activated
* when any crash occurs.
* @param pActionOrReporter A name of an action or reporter plugin.
* @param pArgs An arguments for action or reporter plugin.
*/
-void AddActionOrReporter(const std::string& pActionOrReporter,
- const std::string& pArgs);
+void AddActionOrReporter(const char *pActionOrReporter,
+ const char *pArgs);
#endif /*MIDDLEWARE_H_*/
diff --git a/src/Daemon/PluginManager.cpp b/src/Daemon/PluginManager.cpp
index 2363308a..5b871515 100644
--- a/src/Daemon/PluginManager.cpp
+++ b/src/Daemon/PluginManager.cpp
@@ -179,8 +179,7 @@ void CPluginManager::LoadPlugin(const std::string& pName)
catch (CABRTException& e)
{
delete abrtPlugin;
- warn_client("CPluginManager::LoadPlugin(): " + e.what());
- warn_client("Failed to load plugin " + pName);
+ error_msg("Failed to load plugin %s: %s", pName.c_str(), e.what());
}
}
}
@@ -218,7 +217,7 @@ void CPluginManager::RegisterPlugin(const std::string& pName)
log("Can't initialize plugin %s(%s): %s",
pName.c_str(),
plugin_type_str[abrt_plugin->second->GetType()],
- e.what().c_str()
+ e.what()
);
UnLoadPlugin(pName);
return;
diff --git a/src/Daemon/Settings.cpp b/src/Daemon/Settings.cpp
index 1eb42263..d9c9a98b 100644
--- a/src/Daemon/Settings.cpp
+++ b/src/Daemon/Settings.cpp
@@ -54,12 +54,12 @@ map_cron_t g_settings_mapCron;
* Loading
*/
-static set_string_t ParseList(const std::string& pList)
+static set_string_t ParseList(const char* pList)
{
- unsigned int ii;
- std::string item = "";
+ unsigned ii;
+ std::string item;
set_string_t set;
- for (ii = 0; ii < pList.size(); ii++)
+ for (ii = 0; pList[ii]; ii++)
{
if (pList[ii] == ',')
{
@@ -78,19 +78,19 @@ static set_string_t ParseList(const std::string& pList)
return set;
}
-static vector_pair_string_string_t ParseListWithArgs(const std::string& pValue)
+static vector_pair_string_string_t ParseListWithArgs(const char *pValue)
{
vector_pair_string_string_t pluginsWithArgs;
unsigned int ii;
- std::string item = "";
- std::string action = "";
+ std::string item;
+ std::string action;
bool is_quote = false;
bool is_arg = false;
- for (ii = 0; ii < pValue.size(); ii++)
+ for (ii = 0; pValue[ii]; ii++)
{
if (pValue[ii] == '\"')
{
- is_quote = is_quote == true ? false : true;
+ is_quote = !is_quote;
item += pValue[ii];
}
else if (pValue[ii] == '(' && !is_quote)
@@ -137,12 +137,12 @@ static void ParseCommon()
it = s_mapSectionCommon.find("OpenGPGPublicKeys");
if (it != end)
{
- g_settings_setOpenGPGPublicKeys = ParseList(it->second);
+ g_settings_setOpenGPGPublicKeys = ParseList(it->second.c_str());
}
it = s_mapSectionCommon.find("BlackList");
if (it != end)
{
- g_settings_mapBlackList = ParseList(it->second);
+ g_settings_mapBlackList = ParseList(it->second.c_str());
}
it = s_mapSectionCommon.find("Database");
if (it != end)
@@ -152,7 +152,7 @@ static void ParseCommon()
it = s_mapSectionCommon.find("EnabledPlugins");
if (it != end)
{
- g_settings_setEnabledPlugins = ParseList(it->second);
+ g_settings_setEnabledPlugins = ParseList(it->second.c_str());
}
it = s_mapSectionCommon.find("MaxCrashReportsSize");
if (it != end)
@@ -162,7 +162,7 @@ static void ParseCommon()
it = s_mapSectionCommon.find("ActionsAndReporters");
if (it != end)
{
- g_settings_vectorActionsAndReporters = ParseListWithArgs(it->second);
+ g_settings_vectorActionsAndReporters = ParseListWithArgs(it->second.c_str());
}
}
@@ -171,23 +171,23 @@ static void ParseCron()
map_string_t::iterator it = s_mapSectionCron.begin();
for (; it != s_mapSectionCron.end(); it++)
{
- vector_pair_string_string_t actionsAndReporters = ParseListWithArgs(it->second);
+ vector_pair_string_string_t actionsAndReporters = ParseListWithArgs(it->second.c_str());
g_settings_mapCron[it->first] = actionsAndReporters;
}
}
-static set_string_t ParseKey(const std::string& Key)
+static set_string_t ParseKey(const char *Key)
{
unsigned int ii;
- std::string item = "";
- std::string key = "";
+ std::string item;
+ std::string key;
set_string_t set;
bool is_quote = false;
- for (ii = 0; ii < Key.size(); ii++)
+ for (ii = 0; Key[ii]; ii++)
{
if (Key[ii] == '\"')
{
- is_quote = is_quote == true ? false : true;
+ is_quote = !is_quote;
}
else if (Key[ii] == ':' && !is_quote)
{
@@ -223,8 +223,8 @@ static void ParseAnalyzerActionsAndReporters()
map_string_t::iterator it = s_mapSectionAnalyzerActionsAndReporters.begin();
for (; it != s_mapSectionAnalyzerActionsAndReporters.end(); it++)
{
- set_string_t keys = ParseKey(it->first);
- vector_pair_string_string_t actionsAndReporters = ParseListWithArgs(it->second);
+ set_string_t keys = ParseKey(it->first.c_str());
+ vector_pair_string_string_t actionsAndReporters = ParseListWithArgs(it->second.c_str());
set_string_t::iterator it_keys = keys.begin();
for (; it_keys != keys.end(); it_keys++)
{
@@ -241,7 +241,7 @@ void LoadSettings()
if (fIn.is_open())
{
std::string line;
- std::string section = "";
+ std::string section;
while (!fIn.eof())
{
getline(fIn, line);
@@ -250,8 +250,8 @@ void LoadSettings()
bool is_key = true;
bool is_section = false;
bool is_quote = false;
- std::string key = "";
- std::string value = "";
+ std::string key;
+ std::string value;
for (ii = 0; ii < line.length(); ii++)
{
if (isspace(line[ii]) && !is_quote)
@@ -269,7 +269,7 @@ void LoadSettings()
}
else if (line[ii] == '\"')
{
- is_quote = is_quote == true ? false : true;
+ is_quote = !is_quote;
value += line[ii];
}
else if (is_section)
@@ -434,7 +434,7 @@ void SetSettings(const map_abrt_settings_t& pSettings, const char *dbus_sender)
"org.fedoraproject.abrt.change-daemon-settings");
if (polkit_result != PolkitYes)
{
- log("user %s not authorized, returned %d", dbus_sender, polkit_result);
+ error_msg("user %s not authorized, returned %d", dbus_sender, polkit_result);
return;
}
log("user %s succesfully authorized", dbus_sender);
diff --git a/src/Daemon/abrt-debuginfo-install b/src/Daemon/abrt-debuginfo-install
index fc5380ba..6070b74d 100755
--- a/src/Daemon/abrt-debuginfo-install
+++ b/src/Daemon/abrt-debuginfo-install
@@ -13,9 +13,10 @@
# If CACHEDIR is specified, debuginfos should be installed there.
# If not, debuginfos should be installed into TEMPDIR.
#
-# Currently, we are called with CACHEDIR set to "/", but in the future
-# it may be omitted or set to something else. script must be ready
-# for those cases too.
+# Currently, we are called with CACHEDIR set to "/var/cache/abrt-di",
+# but in the future it may be omitted or set to something else.
+# Script must be ready for those cases too. Consider, for example,
+# corner cases of "" and "/".
#
# Output goes to GUI as debuginfo install log. The script should be careful
# to give useful, but not overly cluttered info to stdout.
@@ -62,10 +63,6 @@ tempdir=$2
cachedir=$3
debug=false
-count_words() {
- echo $#
-}
-
exec 2>&1
test -f "$core" || exit 2
@@ -74,10 +71,41 @@ test x"$cachedir" = x"" || test -d "$cachedir" || exit 2
# tempdir must not exist
test -e "$tempdir" && exit 2
-mkdir "$tempdir" || exit 2
+mkdir -- "$tempdir" || exit 2
cd "$tempdir" || exit 2
$debug && echo "Installing rpms to $tempdir"
+
+count_words() {
+ echo $#
+}
+
+cleanup_and_report_missing() {
+# Which debuginfo files are still missing, including those we just unpacked?
+ missing_build_ids=`for build_id in $build_ids; do
+ build_id1=${build_id:0:2}
+ build_id2=${build_id:2}
+ file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug"
+ test -f "/$file" && continue
+ test -f "$cachedir/$file" && continue
+ echo -n "$build_id "
+ done`
+ $debug && echo "missing_build_ids:$missing_build_ids"
+
+ # If cachedir is specified, tempdir is just a staging area. Delete it
+ if test x"$cachedir" != x""; then
+ $debug && echo "Removing $tempdir"
+ rm -rf "$tempdir"
+ fi
+
+ for missing in $missing_build_ids; do
+ echo "MISSING:$missing"
+ done
+
+ test x"$missing_build_ids" != x"" && echo "`count_words $missing_build_ids` debuginfos can't be found"
+}
+
+
# eu-unstrip output example:
# 0x400000+0x209000 23c77451cf6adff77fc1f5ee2a01d75de6511dda@0x40024c - - [exe]
# or
@@ -86,7 +114,9 @@ $debug && echo "Installing rpms to $tempdir"
# 0x3d15600000+0x208000 20196628d1bc062279622615cc9955554e5bb227@0x3d156001a0 /usr/lib64/libnotify.so.1.1.3 /usr/lib/debug/usr/lib64/libnotify.so.1.1.3.debug libnotify.so.1
# 0x7fd8ae931000+0x62d000 dd49f44f958b5a11a1635523b2f09cb2e45c1734@0x7fd8ae9311a0 /usr/lib64/libgtk-x11-2.0.so.0.1600.6 /usr/lib/debug/usr/lib64/libgtk-x11-2.0.so.0.1600.6.debug
echo "Getting list of build IDs"
-eu_unstrip_OUT=`eu-unstrip "--core=$core" -n 2>&1`
+# Observed errors:
+# eu-unstrip: /var/cache/abrt/ccpp-1256301004-2754/coredump: Callback returned failure
+eu_unstrip_OUT=`eu-unstrip "--core=$core" -n 2>eu_unstrip.ERR`
err=$?
printf "%s\nexitcode:%s\n" "$eu_unstrip_OUT" $err >eu_unstrip.OUT
test $err = 0 || exit 2
@@ -112,24 +142,19 @@ $debug && echo "build_ids:$build_ids"
missing_debuginfo_files=`for build_id in $build_ids; do
build_id1=${build_id:0:2}
build_id2=${build_id:2}
-
file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug"
if test x"$cachedir" != x"" && test x"$cachedir" != x"/" ; then
test -f "$cachedir/$file" && continue
- if test -f "/$file"; then
- mkdir -p "$cachedir/usr/lib/debug/.build-id/$build_id1"
- # Note: this does not preserve symlinks. This is intentional
- $debug && echo Copying "$file" to "$cachedir/$file" >&2
- cp "$file" "$cachedir/$file"
- continue
- fi
fi
test -f "/$file" && continue
echo -n "/$file "
done`
$debug && echo "missing_debuginfo_files:$missing_debuginfo_files"
-test x"$missing_debuginfo_files" = x"" && exit 0
+if test x"$missing_debuginfo_files" = x""; then
+ cleanup_and_report_missing
+ exit 0
+fi
# We'll run something like:
# yum --enablerepo='*debuginfo*' --quiet provides \
@@ -162,14 +187,31 @@ $debug && echo "packages:$packages"
# yum may return "" here if it found no packages (say, if coredump is from a new,
# unreleased package fresh from koji).
-test x"$packages" = x"" && exit 1
+if test x"$packages" = x""; then
+ cleanup_and_report_missing
+ exit 1
+fi
-# Redirecting, since progress bar stuff only messes up our output
-echo "Downloading `count_words $packages` packages"
-yumdownloader --enablerepo='*debuginfo*' --quiet $packages >yumdownloader.OUT 2>&1
-err=$?
-echo "exitcode:$err" >>yumdownloader.OUT
-test $err = 0 || exit 2
+num_packages=`count_words $packages`
+echo "Downloading $num_packages packages"
+## Download with one command (too silent):
+## Redirecting, since progress bar stuff only messes up our output
+##yumdownloader --enablerepo='*debuginfo*' --quiet $packages >yumdownloader.OUT 2>&1
+##err=$?
+##echo "exitcode:$err" >>yumdownloader.OUT
+##test $err = 0 || exit 2
+>yumdownloader.OUT
+i=1
+for pkg in $packages; do
+ echo "Download $i/$num_packages: $pkg"
+ echo "Download $i/$num_packages: $pkg" >>yumdownloader.OUT
+ yumdownloader --enablerepo='*debuginfo*' --quiet $pkg >>yumdownloader.OUT 2>&1
+ err=$?
+ echo "exitcode:$err" >>yumdownloader.OUT
+ echo >>yumdownloader.OUT
+ test $err = 0 || { echo "Download of $pkg failed!"; sleep 1; }
+ : $((i++))
+done
for f in *.rpm; do
# Happens if no .rpm's were downloaded (yumdownloader problem)
@@ -180,45 +222,31 @@ for f in *.rpm; do
rpm2cpio <"$f" 2>>unpack.OUT | cpio -id >>unpack.OUT 2>&1
done
-# Which debuginfo files are still missing, including those we just unpacked?
-missing_build_ids=`for build_id in $build_ids; do
- build_id1=${build_id:0:2}
- build_id2=${build_id:2}
+# Copy debuginfo files to cachedir
+if test x"$cachedir" != x"" && test -d "$cachedir"; then
+ for build_id in $build_ids; do
+ build_id1=${build_id:0:2}
+ build_id2=${build_id:2}
- file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug"
+ file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug"
- test -f "/$file" && continue
- test x"$cachedir" != x"" \
- && test x"$cachedir" != x"/" \
- && test -f "$cachedir/$file" && continue
-
- if test -f "$file"; then
- # file is one of those we just installed.
- # Cache it if cachedir is specified.
- if test x"$cachedir" != x"" && test -d "$cachedir"; then
+ test -f "/$file" && continue
+ test x"$cachedir" != x"/" && test -f "$cachedir/$file" && continue
+
+ if test -f "$file"; then
+ # file is one of those we just installed.
+ # Cache it if cachedir is specified.
mkdir -p "$cachedir/usr/lib/debug/.build-id/$build_id1"
# Note: this does not preserve symlinks. This is intentional
- $debug && echo Copying "$file" to "$cachedir/$file" >&2
+ $debug && echo Copying2 "$file" to "$cachedir/$file" >&2
cp --remove-destination "$file" "$cachedir/$file"
+ continue
fi
- continue
- fi
- echo -n "$build_id "
-done`
-$debug && echo "missing_build_ids:$missing_build_ids"
-
-# If cachedir is specified, tempdir is just a staging area. Delete it
-if test x"$cachedir" != x""; then
- $debug && echo "Removing $tempdir"
- rm -rf "$tempdir"
+ done
fi
+$debug && echo "missing_build_ids:$missing_build_ids"
-test x"$missing_build_ids" = x"" && exit 0
-
-for missing in $missing_build_ids; do
- echo "MISSING:$missing"
-done
-
-echo "`count_words $missing_build_ids` debuginfos can't be found"
+cleanup_and_report_missing
-exit 1
+test x"$missing_build_ids" != x"" && exit 1
+exit 0
diff --git a/src/Daemon/abrt.conf b/src/Daemon/abrt.conf
index 1fe6123b..e9845e58 100644
--- a/src/Daemon/abrt.conf
+++ b/src/Daemon/abrt.conf
@@ -1,32 +1,31 @@
# test conf file. it will be generated in the future
-# common abrt settings
+# Common abrt settings
[ Common ]
# With this option set to "yes",
# only crashes in signed packages will be analyzed.
OpenGPGCheck = no
# GPG keys
OpenGPGPublicKeys = /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
-# blacklisted packages
-BlackList =
-# enabled plugins
-# there has to be exactly one database plugin
+# Blacklisted packages
+BlackList = nspluginwrapper
+# Enabled plugins. There has to be exactly one database plugin
EnabledPlugins = SQLite3, CCpp, Logger, Kerneloops, KerneloopsScanner, KerneloopsReporter, Bugzilla, Python
# Database
Database = SQLite3
-# max size for crash storage [MiB]
+# Max size for crash storage [MiB]
MaxCrashReportsSize = 1000
-# vector of actions and reporters which are activated immediately after a crash occurs
+# Vector of actions and reporters which are activated immediately after a crash occurs
# ActionsAndReporters = Mailx("[abrt] new crash was detected")
-# reporters association with analyzers
+# Reporters association with analyzers
[ AnalyzerActionsAndReporters ]
Kerneloops = KerneloopsReporter
CCpp = Bugzilla, Logger
Python = Bugzilla, Logger
# CCpp : xorg-x11-apps = RunApp("date", "RunApp")
-# repeated calling of Action plugins
+# Repeated calling of Action plugins
[ Cron ]
# h:m - at h:m an action plugin is activated
# s - every s seconds is an action plugin activated
diff --git a/src/Daemon/com.redhat.abrt.service b/src/Daemon/com.redhat.abrt.service
index 163f276c..b251ef7f 100644
--- a/src/Daemon/com.redhat.abrt.service
+++ b/src/Daemon/com.redhat.abrt.service
@@ -1,4 +1,7 @@
[D-BUS Service]
Name=com.redhat.abrt
+# For testing, you may add -t33 to use small timeout of 33 seconds.
+# This will make "abrtd exited while clients existed but were idle"
+# situations easy to trigger
Exec=/usr/sbin/abrtd -ds
User=root
diff --git a/src/Gui/ABRTExceptions.py b/src/Gui/ABRTExceptions.py
index 0d357a30..c4d6b594 100644
--- a/src/Gui/ABRTExceptions.py
+++ b/src/Gui/ABRTExceptions.py
@@ -14,11 +14,3 @@ class WrongData(Exception):
def __str__(self):
return self.what
-
-class ConfBackendInitError(Exception):
- def __init__(self, msg):
- Exception.__init__(self)
- self.what = msg
-
- def __str__(self):
- return self.what
diff --git a/src/Gui/ABRTPlugin.py b/src/Gui/ABRTPlugin.py
index 8d687f83..8483be44 100644
--- a/src/Gui/ABRTPlugin.py
+++ b/src/Gui/ABRTPlugin.py
@@ -11,12 +11,17 @@ Email
Description
"""
from abrt_utils import _
-from ConfBackend import ConfBackendGnomeKeyring
+from ConfBackend import ConfBackendGnomeKeyring, ConfBackendInitError
class PluginSettings(dict):
def __init__(self):
dict.__init__(self)
- self.conf = ConfBackendGnomeKeyring()
+ self.conf = None
+ try:
+ self.conf = ConfBackendGnomeKeyring()
+ except ConfBackendInitError, e:
+ print e
+ pass
def check(self):
for key in ["Password", "Login"]:
@@ -32,16 +37,18 @@ class PluginSettings(dict):
for key in default_settings.keys():
self[str(key)] = str(default_settings[key])
- settings = self.conf.load(name)
- # overwrite defaluts with user setting
- for key in settings.keys():
- # only rewrite keys needed by the plugin
- # e.g we don't want a pass field for logger
- if key in default_settings.keys():
- self[str(key)] = str(settings[key])
+ if self.conf:
+ settings = self.conf.load(name)
+ # overwrite defaluts with user setting
+ for key in settings.keys():
+ # only rewrite keys needed by the plugin
+ # e.g we don't want a pass field for logger
+ if key in default_settings.keys():
+ self[str(key)] = str(settings[key])
def save(self, name):
- self.conf.save(name, self)
+ if self.conf:
+ self.conf.save(name, self)
class PluginInfo():
"""Class to represent common plugin info"""
diff --git a/src/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index eee68844..d3a3abd0 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -154,9 +154,12 @@ class MainWindow():
def on_miSettings_clicked(self, widget):
dialog = SettingsDialog(self.window, self.ccdaemon)
- dialog.hydrate()
+ try:
+ dialog.hydrate()
+ except Exception, e:
+ gui_error_message(_("Can't show the settings dialog\n%s" % e))
+ return
dialog.show()
- self.ccdaemon.getSettings()
def warning_cb(self, daemon, message=None):
# try to hide the progressbar, we dont really care if it was visible ..
@@ -208,9 +211,10 @@ class MainWindow():
else:
n = self.dumpsListStore.append([icon, entry.getPackage(), entry.getExecutable(),
entry.getTime("%c"), entry.getCount(), entry.isReported(), entry])
- # activate the last row if any..
+ # activate the first row if any..
if n:
- self.dlist.set_cursor(self.dumpsListStore.get_path(n))
+ # we can use (0,) as path for the first row, but what if API changes?
+ self.dlist.set_cursor(self.dumpsListStore.get_path(self.dumpsListStore.get_iter_first()))
def filter_dumps(self, model, miter, data):
# for later..
@@ -232,7 +236,7 @@ class MainWindow():
report_label = _("<b>This crash has been reported, you can find the report(s) at:</b>\n")
for message in dump.getMessage().split('\n'):
if message:
- if "http" in message or "file:///" in message:
+ if "http" in message[0:5] or "file:///"[0:8] in message:
message = "<a href=\"%s\">%s</a>" % (message, message)
report_label += "%s\n" % message
self.wTree.get_widget("lReported").set_markup(report_label)
@@ -291,7 +295,7 @@ class MainWindow():
if not report:
gui_error_message(_("Unable to get report!\nDebuginfo is missing?"))
return
- report_dialog = ReporterDialog(report, self.ccdaemon)
+ report_dialog = ReporterDialog(report, self.ccdaemon, parent=self.window)
# (response, report)
response, result = report_dialog.run()
diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py
index eb311f73..e1d1c1bb 100644
--- a/src/Gui/CCReporterDialog.py
+++ b/src/Gui/CCReporterDialog.py
@@ -23,7 +23,7 @@ REFRESH = -50
class ReporterDialog():
"""Reporter window"""
- def __init__(self, report, daemon):
+ def __init__(self, report, daemon, parent=None):
self.editable = []
self.row_dict = {}
self.report = report
@@ -35,6 +35,9 @@ class ReporterDialog():
self.window = self.wTree.get_widget("reporter_dialog")
self.window.set_default_size(640, 480)
self.window.connect("response", self.on_response, daemon)
+ if parent:
+ self.window.set_transient_for(parent)
+ self.window.set_modal(True)
# comment textview
self.tvComment = self.wTree.get_widget("tvComment")
@@ -73,6 +76,8 @@ class ReporterDialog():
# connect the signals
self.tvReport.connect_after("size-allocate", self.on_window_resize)
self.wTree.get_widget("bSend").connect("clicked", self.on_send_clicked)
+ # start whit the warning hidden, so it's not visible when there is no rating
+ self.wTree.get_widget("ebErrors").hide()
self.hydrate()
# this callback is called when user press Cancel or Report button in Report dialog
@@ -147,6 +152,7 @@ class ReporterDialog():
vbWrongSettings.pack_start(hbox)
vbWrongSettings.show_all()
dialog.set_transient_for(self.window)
+ dialog.set_modal(True)
response = dialog.run()
dialog.destroy()
if response == gtk.RESPONSE_NO:
@@ -176,6 +182,36 @@ class ReporterDialog():
self.tvComment.set_buffer(buff)
continue
+ # if an backtrace has rating use it
+ if item == "rating":
+ try:
+ package = self.report["package"][CONTENT]
+ # if we don't have package for some reason
+ except:
+ package = None
+ ebErrors = self.wTree.get_widget("ebErrors")
+ lErrors = self.wTree.get_widget("lErrors")
+ bSend = self.wTree.get_widget("bSend")
+ # not usable report
+ if int(self.report[item][CONTENT]) < 3:
+ ebErrors.show()
+ ebErrors.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("red"))
+ if package:
+ lErrors.set_markup(
+ "<span color=\"white\">%s</span>" % _("Reporting disabled because the backtrace is unusable!\nPlease try to install debuginfo manually using command:<span color=\"blue\"> debuginfo-install %s </span>\nthen use Refresh button to regenerate the backtrace." % package[0:package.rfind('-',0,package.rfind('-'))]))
+ else:
+ lErrors.set_markup("<span color=\"white\">%s</span>" % _("The bactrace is unusable, you can't report this!"))
+ bSend.set_sensitive(False)
+ # probably usable 3
+ elif int(self.report[item][CONTENT]) < 4:
+ ebErrors.show()
+ ebErrors.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("yellow"))
+ lErrors.set_markup("<span color=\"black\">%s</span>" % _("The bactrace is incomplete, please make sure you provide good steps to reproduce."))
+ bSend.set_sensitive(True)
+ else:
+ ebErrors.hide()
+ bSend.set_sensitive(True)
+
if self.report[item][TYPE] != 's':
# item name 0| value 1| editable? 2| toggled? 3| visible?(attachment)4
if self.report[item][EDITABLE] == 'y':
diff --git a/src/Gui/CC_gui_functions.py b/src/Gui/CC_gui_functions.py
index 2f860087..a2ad70f6 100644
--- a/src/Gui/CC_gui_functions.py
+++ b/src/Gui/CC_gui_functions.py
@@ -54,7 +54,7 @@ def gui_report_dialog ( report_status_dict, parent_dialog,
if report_status_dict[plugin][0] == '0':
status_label.set_markup("<span foreground='red'>%s</span>" % report_status_dict[plugin][1])
elif report_status_dict[plugin][0] == '1':
- if "http" in report_status_dict[plugin][1] or "file://" in report_status_dict[plugin][1]:
+ if "http" in report_status_dict[plugin][1][0:4] or "file://" in report_status_dict[plugin][1][0:7]:
status_label.set_markup("<a href=\"%s\">%s</a>" % (report_status_dict[plugin][1], report_status_dict[plugin][1]))
# FIXME: make a new branch for rawhide with gtk 2.17 and remove this
if gtk.gtk_version[1] < 17:
diff --git a/src/Gui/CellRenderers.py b/src/Gui/CellRenderers.py
index 0bedf7a0..fe17b3ed 100644
--- a/src/Gui/CellRenderers.py
+++ b/src/Gui/CellRenderers.py
@@ -38,10 +38,7 @@ class MultilineCellRenderer(gtk.CellRendererText):
def _on_editor_key_press_event(self, editor, event):
if event.state & (gtk.gdk.SHIFT_MASK | gtk.gdk.CONTROL_MASK): return
- if event.keyval in (gtk.keysyms.Return, gtk.keysyms.KP_Enter):
- editor.remove_widget()
- self.emit("edited", editor.get_data("path"), editor.get_text())
- elif event.keyval == gtk.keysyms.Escape:
+ if event.keyval == gtk.keysyms.Escape:
editor.set_text(self.old_text)
editor.remove_widget()
self.emit("editing-canceled")
diff --git a/src/Gui/ConfBackend.py b/src/Gui/ConfBackend.py
index eb94b87b..c7b0450d 100644
--- a/src/Gui/ConfBackend.py
+++ b/src/Gui/ConfBackend.py
@@ -1,4 +1,3 @@
-from ABRTExceptions import ConfBackendInitError
from abrt_utils import _
#FIXME: add some backend factory
@@ -8,6 +7,15 @@ try:
except ImportError, e:
gkey = None
+# Exceptions
+class ConfBackendInitError(Exception):
+ def __init__(self, msg):
+ Exception.__init__(self)
+ self.what = msg
+
+ def __str__(self):
+ return self.what
+
class ConfBackend(object):
def __init__(self):
pass
@@ -24,9 +32,14 @@ class ConfBackend(object):
class ConfBackendGnomeKeyring(ConfBackend):
def __init__(self):
ConfBackend.__init__(self)
- self.default_key_ring = gkey.get_default_keyring_sync()
if not gkey.is_available():
- raise ConfBackendInitError(_("Can't connect do Gnome Keyring daemon"))
+ raise ConfBackendInitError(_("Can't connect to Gnome Keyring daemon"))
+ try:
+ self.default_key_ring = gkey.get_default_keyring_sync()
+ except:
+ # could happen if keyring daemon is running, but we run gui under
+ # user who is not owner is the running session - using su
+ raise ConfBackendInitError(_("Can't get default keyring"))
def save(self, name, settings):
settings_tmp = settings.copy()
@@ -36,7 +49,7 @@ class ConfBackendGnomeKeyring(ConfBackend):
item_list = []
try:
item_list = gkey.find_items_sync(gkey.ITEM_GENERIC_SECRET, {"AbrtPluginInfo":str(name)})
- except gkey.NoMatchError, ex:
+ except gkey.NoMatchError:
# nothing found
pass
@@ -59,7 +72,7 @@ class ConfBackendGnomeKeyring(ConfBackend):
item_list = None
try:
item_list = gkey.find_items_sync(gkey.ITEM_GENERIC_SECRET, {"AbrtPluginInfo":str(name)})
- except gkey.NoMatchError, ex:
+ except gkey.NoMatchError:
# nothing found
pass
diff --git a/src/Gui/Makefile.am b/src/Gui/Makefile.am
index ffdace54..87d996ca 100644
--- a/src/Gui/Makefile.am
+++ b/src/Gui/Makefile.am
@@ -10,11 +10,15 @@ PYTHON_FILES = CCDBusBackend.py CCDumpList.py CCDump.py CC_gui_functions.py \
GLADE_FILES = ccgui.glade report.glade settings.glade dialogs.glade settings_wizard.glade
-EXTRA_DIST = $(PYTHON_FILES) $(GLADE_FILES) abrt-gui abrt.desktop
+EXTRA_DIST = $(PYTHON_FILES) $(GLADE_FILES) abrt-gui abrt.desktop abrt.png
#ccguidir = $(pkgdatadir)
+applicationsdir = $(datadir)/applications
+applications_DATA = abrt.desktop
pkgdata_PYTHON = $(PYTHON_FILES)
pkgdata_DATA = $(GLADE_FILES)
+pixmapdir = $(datadir)/pixmaps
+pixmap_DATA = abrt.png
CLEANFILES := $(notdir $(wildcard *~)) $(notdir $(wildcard *\#)) $(notdir $(wildcard \.\#*)) $(notdir $(wildcard *.pyc))
diff --git a/src/Gui/PluginsSettingsDialog.py b/src/Gui/PluginsSettingsDialog.py
index a346455e..d8eac71e 100644
--- a/src/Gui/PluginsSettingsDialog.py
+++ b/src/Gui/PluginsSettingsDialog.py
@@ -79,7 +79,9 @@ class PluginsSettingsDialog:
self.ccdaemon.registerPlugin(plugin.getName())
# FIXME: create class plugin and move this into method Plugin.Enable()
plugin.Enabled = "yes"
- plugin.Settings = PluginSettings(self.ccdaemon.getPluginSettings(plugin.getName()))
+ default_settings = self.ccdaemon.getPluginSettings(plugin.getName())
+ plugin.Settings = PluginSettings()
+ plugin.Settings.load(plugin.getName(), default_settings)
model[path][1] = not model[path][1]
def filter_plugins(self, model, miter, data):
diff --git a/src/Gui/SettingsDialog.py b/src/Gui/SettingsDialog.py
index b3af501f..cf423938 100644
--- a/src/Gui/SettingsDialog.py
+++ b/src/Gui/SettingsDialog.py
@@ -1,9 +1,8 @@
import sys
import gtk
-from PluginList import getPluginInfoList, PluginInfoList
+from PluginList import getPluginInfoList
from CC_gui_functions import *
#from PluginSettingsUI import PluginSettingsUI
-from ABRTPlugin import PluginSettings, PluginInfo
from abrt_utils import _
@@ -75,11 +74,11 @@ class SettingsDialog:
try:
self.pluginlist = getPluginInfoList(self.ccdaemon, refresh=True)
except Exception, e:
- print "SettingsDialog: ", e
+ raise Exception("Comunication with daemon has failed, have you restarted the daemon after update?")
## hydrate cron jobs:
for key,val in self.settings["Cron"].iteritems():
- # actionas are separated by ','
+ # actions are separated by ','
actions = val.split(',')
self.settings["Cron"][key] = actions
for plugin in self.pluginlist.getActionPlugins():
@@ -120,11 +119,9 @@ class SettingsDialog:
self.add_AnalyzerAction(action)
def on_bCancelGPGKeys_clicked(self, button):
- print "cancel"
self.wGPGKeys.hide()
def on_bSaveGPGKeys_clicked(self, button):
- print "save"
self.wGPGKeys.hide()
def on_bAddGPGKey_clicked(self, button):
@@ -233,9 +230,6 @@ class SettingsDialog:
def on_bAddAction_clicked(self, button):
self.add_AnalyzerAction()
- def on_cancel_clicked(self,button):
- self.window.hide()
-
def dehydrate(self):
self.ccdaemon.setSettings(self.settings)
diff --git a/src/Gui/abrt.desktop b/src/Gui/abrt.desktop
index 64aeb207..5498a0aa 100644
--- a/src/Gui/abrt.desktop
+++ b/src/Gui/abrt.desktop
@@ -3,7 +3,7 @@ Encoding=UTF-8
Name=Automatic Bug Reporting Tool
Comment=View and report application crashes
Exec=abrt-gui
-Icon=
+Icon=abrt
Terminal=false
Type=Application
Categories=System;X-Red-Hat-Base;
diff --git a/src/Gui/abrt.png b/src/Gui/abrt.png
new file mode 100644
index 00000000..dc24865e
--- /dev/null
+++ b/src/Gui/abrt.png
Binary files differ
diff --git a/src/Gui/report.glade b/src/Gui/report.glade
index 48fbad0a..2ccf1690 100644
--- a/src/Gui/report.glade
+++ b/src/Gui/report.glade
@@ -5,7 +5,6 @@
<widget class="GtkDialog" id="reporter_dialog">
<property name="border_width">5</property>
<property name="title" translatable="yes">Report</property>
- <property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="default_width">400</property>
<property name="default_height">400</property>
@@ -14,10 +13,12 @@
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox4">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<widget class="GtkVBox" id="vbox5">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<child>
<widget class="GtkLabel" id="label10">
<property name="visible">True</property>
@@ -45,14 +46,35 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkEventBox" id="ebErrors">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="lErrors">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"> </property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="position">0</property>
</packing>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkVBox" id="vbox1">
<property name="visible">True</property>
+ <property name="orientation">vertical</property>
<child>
<widget class="GtkEventBox" id="eventbox1">
<property name="visible">True</property>
@@ -92,7 +114,7 @@
</widget>
<packing>
<property name="expand">False</property>
- <property name="position">2</property>
+ <property name="position">3</property>
</packing>
</child>
<child internal-child="action_area">
@@ -101,7 +123,7 @@
<property name="layout_style">end</property>
<child>
<widget class="GtkButton" id="bCancel">
- <property name="label" translatable="yes">gtk-cancel</property>
+ <property name="label">gtk-cancel</property>
<property name="response_id">-6</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -109,12 +131,14 @@
<property name="use_stock">True</property>
</widget>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<widget class="GtkButton" id="bRefresh">
- <property name="label" translatable="yes">gtk-refresh</property>
+ <property name="label">gtk-refresh</property>
<property name="response_id">-50</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
@@ -122,6 +146,8 @@
<property name="use_stock">True</property>
</widget>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
@@ -134,6 +160,8 @@
<property name="receives_default">True</property>
</widget>
<packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
diff --git a/src/Gui/settings_wizard.glade b/src/Gui/settings_wizard.glade
index 2af5d77d..feab4351 100644
--- a/src/Gui/settings_wizard.glade
+++ b/src/Gui/settings_wizard.glade
@@ -19,7 +19,7 @@
<child>
<object class="GtkLabel" id="lWrongSettingsWarning">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;WARNING:&lt;/b&gt; Wrong settings detected for some of the enabled reporter plugins, please use the buttons bellow to open respective configuration and fix it before you proceed, otherwise the reporting process can fail.
+ <property name="label" translatable="yes">&lt;b&gt;WARNING:&lt;/b&gt; Wrong settings detected for some of the enabled reporter plugins, please use the buttons below to open respective configuration and fix it before you proceed, otherwise the reporting process can fail.
</property>
<property name="use_markup">True</property>
<property name="wrap">True</property>
diff --git a/src/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp
index e6768a60..0f95d05b 100644
--- a/src/Hooks/CCpp.cpp
+++ b/src/Hooks/CCpp.cpp
@@ -54,32 +54,41 @@ static char* get_cmdline(pid_t pid)
char path[PATH_MAX];
char cmdline[COMMAND_LINE_SIZE];
snprintf(path, sizeof(path), "/proc/%u/cmdline", (int)pid);
- int dst = 0;
+ int idx = 0;
int fd = open(path, O_RDONLY);
if (fd >= 0)
{
int len = read(fd, cmdline, sizeof(cmdline) - 1);
- if (len >= 0)
+ close(fd);
+
+ if (len > 0)
{
- int src = 0;
- while (src < len)
+ /* In Linux, there is always one trailing NUL byte,
+ * prevent it from being replaced by space below.
+ */
+ if (cmdline[len - 1] == '\0')
+ len--;
+
+ while (idx < len)
{
- char ch = cmdline[src++];
+ unsigned char ch = cmdline[idx];
if (ch == '\0')
{
- cmdline[dst++] = ' ';
+ cmdline[idx++] = ' ';
}
- /* TODO: maybe just ch >= ' '? */
- else if (isspace(ch) || (isascii(ch) && !iscntrl(ch)))
+ else if (ch >= ' ' && ch <= 0x7e)
{
- cmdline[dst++] = ch;
+ cmdline[idx++] = ch;
+ }
+ else
+ {
+ cmdline[idx++] = '?';
}
}
}
- close(fd);
}
- cmdline[dst] = '\0';
+ cmdline[idx] = '\0';
return xstrdup(cmdline);
}
@@ -179,7 +188,7 @@ int main(int argc, char** argv)
dd.SaveText(FILENAME_ANALYZER, "CCpp");
dd.SaveText(FILENAME_EXECUTABLE, executable);
dd.SaveText(FILENAME_CMDLINE, cmdline);
- dd.SaveText(FILENAME_REASON, std::string("Process was terminated by signal ") + signal_str);
+ dd.SaveText(FILENAME_REASON, ssprintf("Process was terminated by signal %s", signal_str).c_str());
int len = strlen(path);
snprintf(path + len, sizeof(path) - len, "/"FILENAME_COREDUMP);
@@ -212,7 +221,7 @@ int main(int argc, char** argv)
}
catch (CABRTException& e)
{
- error_msg_and_die("%s", e.what().c_str());
+ error_msg_and_die("%s", e.what());
}
catch (std::exception& e)
{
diff --git a/src/Hooks/abrt-pyhook-helper.cpp b/src/Hooks/abrt-pyhook-helper.cpp
index e15ff684..8a5a1914 100644
--- a/src/Hooks/abrt-pyhook-helper.cpp
+++ b/src/Hooks/abrt-pyhook-helper.cpp
@@ -18,118 +18,102 @@
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include <argp.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
+
+#include <getopt.h>
+/* We can easily get rid of abrtlib (libABRTUtils.so) usage in this file,
+ * but DebugDump will pull it in anyway */
+#include "abrtlib.h"
#include "DebugDump.h"
#if HAVE_CONFIG_H
-#include <config.h>
+# include <config.h>
#endif
-
-const char *argp_program_version = "abrt-pyhook-helper " VERSION;
-const char *argp_program_bug_address = "<crash-catcher@lists.fedorahosted.org>";
-
-static char doc[] = "abrt-pyhook-helper -- stores crash data to abrt shared directory";
-static struct argp_option options[] = {
- {"pid" , 'p', "PID" , 0, "PID of process that caused the crash" },
- {"executable", 'e', "PATH" , 0, "absolute path to the program that crashed" },
- {"uuid" , 'u', "UUID" , 0, "hash generated from the backtrace"},
- {"cmdline" , 'c', "TEXT" , 0, "command line of the crashed program"},
- {"loginuid" , 'l', "UID" , 0, "login UID"},
- { 0 }
-};
+#define MAX_BT_SIZE (1024*1024)
-struct arguments
-{
- char *pid;
- char *executable;
- char *uuid;
- char *cmdline;
- char *loginuid;
-};
+static char *pid;
+static char *executable;
+static char *uuid;
+static char *cmdline;
+static char *loginuid;
-static error_t
-parse_opt (int key, char *arg, struct argp_state *state)
+int main(int argc, char** argv)
{
- /* Get the input argument from argp_parse, which we
- know is a pointer to our arguments structure. */
- struct arguments *arguments = (struct arguments*)state->input;
-
- switch (key)
+ // Parse options
+ static const struct option longopts[] = {
+ // name , has_arg , flag, val
+ { "pid" , required_argument, NULL, 'p' },
+ { "executable", required_argument, NULL, 'e' },
+ { "uuid" , required_argument, NULL, 'u' },
+ { "cmdline" , required_argument, NULL, 'c' },
+ { "loginuid" , required_argument, NULL, 'l' },
+ { 0 },
+ };
+ int opt;
+ while ((opt = getopt_long(argc, argv, "p:e:u:c:l:", longopts, NULL)) != -1)
{
- case 'p': arguments->pid = arg; break;
- case 'e': arguments->executable = arg; break;
- case 'u': arguments->uuid = arg; break;
- case 'c': arguments->cmdline = arg; break;
- case 'l': arguments->loginuid = arg; break;
-
- case ARGP_KEY_ARG:
- argp_usage(state);
- exit(1);
- break;
-
- case ARGP_KEY_END:
- if (!arguments->pid)
+ switch (opt)
{
- argp_usage(state);
- exit(1);
+ case 'p':
+ pid = optarg;
+ break;
+ case 'e':
+ executable = optarg;
+ break;
+ case 'u':
+ uuid = optarg;
+ break;
+ case 'c':
+ cmdline = optarg;
+ break;
+ case 'l':
+ loginuid = optarg;
+ break;
+ default:
+ usage:
+ error_msg_and_die(
+ "Usage: abrt-pyhook-helper [OPTIONS] <BACKTRACE\n"
+ "\nOptions:\n"
+ " -p,--pid PID PID of process that caused the crash\n"
+ " -p,--executable PATH absolute path to the program that crashed\n"
+ " -u,--uuid UUID hash generated from the backtrace\n"
+ " -c,--cmdline TEXT command line of the crashed program\n"
+ " -l,--loginuid UID login UID\n"
+ );
}
- break;
-
- default:
- return ARGP_ERR_UNKNOWN;
}
- return 0;
-}
-
-/* Our argp parser. */
-static struct argp argp = { options, parse_opt, 0, doc };
-
-int main(int argc, char** argv)
-{
- struct arguments arguments;
- argp_parse (&argp, argc, argv, 0, 0, &arguments);
+ if (!pid)
+ goto usage;
+// is it really ok if other params aren't specified? abrtd might get confused...
+
+ // Read the backtrace from stdin
+ char *bt = (char*)xmalloc(MAX_BT_SIZE);
+ ssize_t len = full_read(STDIN_FILENO, bt, MAX_BT_SIZE-1);
+ if (len < 0)
+ {
+ perror_msg_and_die("Read error");
+ }
+ bt[len] = '\0';
+ if (len == MAX_BT_SIZE-1)
+ {
+ error_msg("Backtrace size limit exceeded, trimming to 1 MB");
+ }
+ // Create directory with the debug dump
char path[PATH_MAX];
- snprintf(path, sizeof(path), "%s/pyhook-%ld-%s", DEBUG_DUMPS_DIR,
- (long)time(NULL), arguments.pid);
+ snprintf(path, sizeof(path), DEBUG_DUMPS_DIR"/pyhook-%ld-%s",
+ (long)time(NULL), pid);
CDebugDump dd;
dd.Create(path, geteuid());
dd.SaveText(FILENAME_ANALYZER, "Python");
- if (arguments.executable)
- dd.SaveText(FILENAME_EXECUTABLE, arguments.executable);
- if (arguments.cmdline)
- dd.SaveText("cmdline", arguments.cmdline);
- if (arguments.uuid)
- dd.SaveText("uuid", arguments.uuid);
- if (arguments.loginuid)
- dd.SaveText("uid", arguments.loginuid);
-
- // Read the backtrace from stdin.
- int c;
- int capacity = 1024;
- char *bt = (char*)malloc(capacity);
- char *btptr = bt;
- while ((c = getchar()) != EOF)
- {
- if (c >= 0 && c <= 255)
- *btptr++ = (char)c;
- if (btptr - bt >= capacity - 1)
- {
- capacity *= 2;
- bt = (char*)realloc(bt, capacity);
- if (!bt)
- {
- printf("Error while allocating memory for backtrace.");
- return 1;
- }
- }
- }
- *btptr = '\0';
-
+ if (executable)
+ dd.SaveText(FILENAME_EXECUTABLE, executable);
+ if (cmdline)
+ dd.SaveText("cmdline", cmdline);
+ if (uuid)
+ dd.SaveText("uuid", uuid);
+ if (loginuid)
+ dd.SaveText("uid", loginuid);
dd.SaveText("backtrace", bt);
free(bt);
dd.Close();
diff --git a/src/Hooks/abrt_exception_handler.py.in b/src/Hooks/abrt_exception_handler.py.in
index 362aaf24..010bf12d 100644
--- a/src/Hooks/abrt_exception_handler.py.in
+++ b/src/Hooks/abrt_exception_handler.py.in
@@ -181,51 +181,54 @@ def handleMyException((etype, value, tb)):
# ignore uncaught ctrl-c
if etype == KeyboardInterrupt:
return sys.__excepthook__(etype, value, tb)
-
- import os.path
- from hashlib import md5
- import traceback
-
- syslog.syslog("abrt: Pyhook: Detected unhandled exception in %s " % sys.argv[0])
- elist = traceback.format_exception (etype, value, tb)
- tblast = traceback.extract_tb(tb, limit=None)
- if len(tblast):
- tblast = tblast[len(tblast)-1]
- extxt = traceback.format_exception_only(etype, value)
- text = ""
- text = text + "Summary: TB"
- if tblast and len(tblast) > 3:
- ll = []
- ll.extend(tblast[:3])
- ll[0] = os.path.basename(tblast[0])
- tblast = ll
-
- m = md5()
- ntext = ""
- for t in tblast:
- ntext += str(t) + ":"
- m.update(str(t))
-
- tb_uuid = str(m.hexdigest())[:8]
- text += tb_uuid + " " + ntext
-
- text += extxt[0]
- text += "\n"
- text += "".join(elist)
-
- trace = tb
- while trace.tb_next:
- trace = trace.tb_next
- frame = trace.tb_frame
- text += ("\nLocal variables in innermost frame:\n")
+
try:
- for (key, val) in frame.f_locals.items():
- text += "%s: %s\n" % (key, val)
- except:
+ import os.path
+ from hashlib import md5
+ import traceback
+
+ syslog.syslog("abrt: Pyhook: Detected unhandled exception in %s " % sys.argv[0])
+ elist = traceback.format_exception (etype, value, tb)
+ tblast = traceback.extract_tb(tb, limit=None)
+ if len(tblast):
+ tblast = tblast[len(tblast)-1]
+ extxt = traceback.format_exception_only(etype, value)
+ text = ""
+ text = text + "Summary: TB"
+ if tblast and len(tblast) > 3:
+ ll = []
+ ll.extend(tblast[:3])
+ ll[0] = os.path.basename(tblast[0])
+ tblast = ll
+
+ m = md5()
+ ntext = ""
+ for t in tblast:
+ ntext += str(t) + ":"
+ m.update(str(t))
+
+ tb_uuid = str(m.hexdigest())[:8]
+ text += tb_uuid + " " + ntext
+
+ text += extxt[0]
+ text += "\n"
+ text += "".join(elist)
+
+ trace = tb
+ while trace.tb_next:
+ trace = trace.tb_next
+ frame = trace.tb_frame
+ text += ("\nLocal variables in innermost frame:\n")
+ try:
+ for (key, val) in frame.f_locals.items():
+ text += "%s: %s\n" % (key, val)
+ except:
+ pass
+
+ # add coredump saving
+ write_dump(os.getpid(), tb_uuid, text)
+ except: #silently ignore any error in this hook, to not interfere with the python scripts
pass
-
- # add coredump saving
- write_dump(os.getpid(), tb_uuid, text)
return sys.__excepthook__(etype, value, tb)
def installExceptionHandler(debug = 1):
diff --git a/src/Hooks/dumpoops.cpp b/src/Hooks/dumpoops.cpp
index eeeca7ea..b031d39c 100644
--- a/src/Hooks/dumpoops.cpp
+++ b/src/Hooks/dumpoops.cpp
@@ -25,6 +25,7 @@
*/
#include "abrtlib.h"
+#include "abrt_types.h"
#include "KerneloopsScanner.h"
#include <dlfcn.h>
@@ -38,13 +39,36 @@ do { \
int main(int argc, char **argv)
{
- if (!argv[1])
- {
- log("usage: %s FILE", argv[0]);
- return 1;
+ char *program_name = strrchr(argv[0], '/');
+ program_name = program_name ? program_name + 1 : argv[0];
+
+ /* Parse options */
+ bool opt_d = 0, opt_s = 0;
+ int opt;
+ while ((opt = getopt(argc, argv, "ds")) != -1) {
+ switch (opt) {
+ case 'd':
+ opt_d = 1;
+ break;
+ case 's':
+ opt_s = 1;
+ break;
+ default:
+ usage:
+ error_msg_and_die(
+ "Usage: %s [-ds] FILE\n\n"
+ "Options:\n"
+ "\t-d\tCreate ABRT dump for every oops found\n"
+ "\t-s\tPrint found oopses on standard output\n"
+ , program_name
+ );
+ }
}
- char *slash = strrchr(argv[0], '/');
- msg_prefix = xasprintf("%s: ", slash ? slash+1 : argv[0]);
+ argv += optind;
+ if (!argv[0])
+ goto usage;
+
+ msg_prefix = xasprintf("%s: ", program_name);
/* Load KerneloopsScanner plugin */
// const plugin_info_t *plugin_info;
@@ -67,13 +91,21 @@ int main(int argc, char **argv)
// scanner->LoadSettings(path);
/* Use it: parse and dump the oops */
- int cnt = scan_syslog_file(scanner, argv[1]);
+ int cnt = scan_syslog_file(scanner, argv[0]);
log("found oopses: %d", cnt);
- if (cnt > 0)
- {
- log("dumping oopses");
- save_oops_to_debug_dump(scanner);
+ if (cnt > 0) {
+ if (opt_s) {
+ int i = 0;
+ while (i < scanner->m_pOopsList.size()) {
+ printf("\nVersion: %s", scanner->m_pOopsList[i].c_str());
+ i++;
+ }
+ }
+ if (opt_d) {
+ log("dumping oopses");
+ save_oops_to_debug_dump(scanner);
+ }
}
/*dlclose(handle); - why bother? */