summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abrt.spec1
-rw-r--r--examples/not_oops122
-rw-r--r--examples/not_oops247
-rw-r--r--examples/oops141
-rw-r--r--inc/ABRTException.h37
-rw-r--r--inc/abrtlib.h43
-rw-r--r--lib/Plugins/Bugzilla.cpp181
-rw-r--r--lib/Plugins/Bugzilla.h9
-rw-r--r--lib/Plugins/CCpp.cpp130
-rw-r--r--lib/Plugins/CCpp.h10
-rw-r--r--lib/Plugins/Catcut.cpp597
-rw-r--r--lib/Plugins/Catcut.h3
-rw-r--r--lib/Plugins/FileTransfer.cpp164
-rw-r--r--lib/Plugins/FileTransfer.h13
-rw-r--r--lib/Plugins/Kerneloops.conf2
-rw-r--r--lib/Plugins/Kerneloops.cpp4
-rw-r--r--lib/Plugins/Kerneloops.h6
-rw-r--r--lib/Plugins/KerneloopsReporter.cpp34
-rw-r--r--lib/Plugins/KerneloopsReporter.h3
-rw-r--r--lib/Plugins/KerneloopsScanner.cpp36
-rw-r--r--lib/Plugins/KerneloopsScanner.h8
-rw-r--r--lib/Plugins/KerneloopsSysLog.cpp94
-rw-r--r--lib/Plugins/Logger.cpp34
-rw-r--r--lib/Plugins/Logger.h3
-rw-r--r--lib/Plugins/Mailx.cpp45
-rw-r--r--lib/Plugins/Mailx.h3
-rw-r--r--lib/Plugins/Makefile.am62
-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.cpp26
-rw-r--r--lib/Plugins/SQLite3.h3
-rw-r--r--lib/Plugins/TicketUploader.cpp393
-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/DebugDump.cpp208
-rw-r--r--lib/Utils/DebugDump.h10
-rw-r--r--lib/Utils/Makefile.am5
-rw-r--r--lib/Utils/Observer.h4
-rw-r--r--lib/Utils/Plugin.cpp13
-rw-r--r--lib/Utils/Plugin.h6
-rw-r--r--lib/Utils/abrt_xmlrpc.cpp76
-rw-r--r--lib/Utils/abrt_xmlrpc.h27
-rw-r--r--lib/Utils/copyfd.cpp22
-rw-r--r--lib/Utils/logging.cpp46
-rw-r--r--lib/Utils/parse_release.cpp38
-rw-r--r--lib/Utils/xfuncs.cpp13
-rw-r--r--po/el.po130
-rw-r--r--po/es.po215
-rw-r--r--po/fi.po214
-rw-r--r--po/nl.po242
-rw-r--r--po/pa.po494
-rw-r--r--po/pl.po160
-rw-r--r--po/pt.po156
-rw-r--r--po/pt_BR.po255
-rwxr-xr-xscripts/dbg_mkrpm7
-rw-r--r--src/Applet/Applet.cpp23
-rw-r--r--src/Daemon/CommLayerServer.h2
-rw-r--r--src/Daemon/CommLayerServerDBus.cpp32
-rw-r--r--src/Daemon/CommLayerServerDBus.h2
-rw-r--r--src/Daemon/CommLayerServerSocket.cpp12
-rw-r--r--src/Daemon/CrashWatcher.cpp47
-rw-r--r--src/Daemon/CrashWatcher.h8
-rw-r--r--src/Daemon/Daemon.cpp117
-rw-r--r--src/Daemon/Makefile.am2
-rw-r--r--src/Daemon/MiddleWare.cpp226
-rw-r--r--src/Daemon/MiddleWare.h49
-rw-r--r--src/Daemon/PluginManager.cpp5
-rw-r--r--src/Daemon/Settings.cpp54
-rwxr-xr-xsrc/Daemon/abrt-debuginfo-install249
-rw-r--r--src/Daemon/abrt.conf15
-rw-r--r--src/Gui/CCMainWindow.py2
-rw-r--r--src/Gui/CCReporterDialog.py57
-rw-r--r--src/Gui/report.glade78
-rw-r--r--src/Hooks/CCpp.cpp4
81 files changed, 3095 insertions, 2566 deletions
diff --git a/abrt.spec b/abrt.spec
index 9a3950b7..97861f69 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -305,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*
diff --git a/examples/not_oops1 b/examples/not_oops1
new file mode 100644
index 00000000..63dba803
--- /dev/null
+++ b/examples/not_oops1
@@ -0,0 +1,22 @@
+Nov 9 10:19:35 ohm openvpn[1118]: WARNING: Make sure you understand the semantics of --tls-remote before using it (see the man page).
+Nov 9 10:19:35 ohm openvpn[1118]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
+Nov 9 10:19:35 ohm openvpn[1118]: Re-using SSL/TLS context
+Nov 9 10:19:35 ohm openvpn[1118]: LZO compression initialized
+Nov 9 10:19:35 ohm openvpn[1118]: UDPv4 link local: [undef]
+Nov 9 10:19:35 ohm openvpn[1118]: UDPv4 link remote: 216.17.180.2:5000
+Nov 9 10:19:35 ohm openvpn[1118]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:37 ohm openvpn[1122]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:37 ohm openvpn[1118]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:37 ohm restorecond: Unable to watch (/home/kevin/public_html/*) No such file or directory
+Nov 9 10:19:39 ohm openvpn[1118]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:39 ohm openvpn[1122]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:41 ohm openvpn[1118]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:42 ohm openvpn[1122]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:43 ohm openvpn[1118]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:43 ohm pulseaudio[1867]: module.c: module-hal-detect is deprecated: Please use module-udev-detect instead of module-hal-detect!
+Nov 9 10:19:43 ohm pulseaudio[1867]: module-hal-detect-compat.c: We will now load module-udev-detect. Please make sure to remove module-hal-detect from your configuration.
+Nov 9 10:19:44 ohm openvpn[1122]: write UDPv4 []: Network is unreachable (code=101)
+Nov 9 10:19:45 ohm openvpn[1122]: [UNDEF] Inactivity timeout (--ping-restart), restarting
+Nov 9 10:19:45 ohm openvpn[1122]: SIGUSR1[soft,ping-restart] received, process restarting
+Nov 9 10:19:46 ohm openvpn[1118]: [UNDEF] Inactivity timeout (--ping-restart), restarting
+Nov 9 10:19:46 ohm openvpn[1118]: SIGUSR1[soft,ping-restart] received, process restarting
diff --git a/examples/not_oops2 b/examples/not_oops2
new file mode 100644
index 00000000..5293fc1f
--- /dev/null
+++ b/examples/not_oops2
@@ -0,0 +1,47 @@
+Jan 11 22:31:37 kids1 kernel: [drm] Num pipes: 1
+Jan 11 22:31:38 kids1 kernel: [drm] Setting GART location based on new memorymap
+Jan 11 22:31:38 kids1 kernel: [drm] Loading RS690/RS740 Microcode
+Jan 11 22:31:38 kids1 kernel: [drm] Num pipes: 1
+Jan 11 22:31:38 kids1 kernel: [drm] writeback test succeeded in 1 usecs
+Jan 12 14:32:19 kids1 kernel: [drm] Num pipes: 1
+Jan 12 14:32:21 kids1 kernel: [drm] Setting GART location based on new memorymap
+Jan 12 14:32:21 kids1 kernel: [drm] Loading RS690/RS740 Microcode
+Jan 12 14:32:21 kids1 kernel: [drm] Num pipes: 1
+Jan 12 14:32:21 kids1 kernel: [drm] writeback test succeeded in 1 usecs
+Jan 12 16:12:16 kids1 kernel: [drm] Num pipes: 1
+Jan 12 19:08:41 kids1 kernel: [drm:radeon_set_igpgart] *ERROR* Unable to useIGP GART table size 32768
+Jan 12 19:08:41 kids1 kernel: [drm] Loading RS690/RS740 Microcode
+Jan 12 19:08:41 kids1 kernel: BUG: unable to handle kernel NULL pointer dereference at 00000000
+Jan 12 19:08:41 kids1 kernel: IP: [<f88dec25>] :radeon:radeon_cp_init_ring_buffer+0x90/0x302
+Jan 12 19:08:41 kids1 kernel: *pde = 6f5c6067
+Jan 12 19:08:41 kids1 kernel: Oops: 0000 [#1] SMP.
+Jan 12 19:08:41 kids1 kernel: Modules linked in: r8169 mii fuse nfsd lockd nfs_acl auth_rpcgss exportfs bridge stp bnep sco l2cap bl
+Jan 12 19:08:41 kids1 kernel: Pid: 8003, comm: Xorg Not tainted (2.6.27.9-159.fc10.i686 #1)
+Jan 12 19:08:41 kids1 kernel: EIP: 0060:[<f88dec25>] EFLAGS: 00213246 CPU: 1
+Jan 12 19:08:41 kids1 kernel: EIP is at radeon_cp_init_ring_buffer+0x90/0x302 [radeon]
+Jan 12 19:08:41 kids1 kernel: EAX: 00000000 EBX: f78b4000 ECX: f78b4000 EDX: 00000000
+Jan 12 19:08:41 kids1 kernel: ESI: f5dbe800 EDI: 00006458 EBP: f0a0cf18 ESP: f0a0cf08
+Jan 12 19:08:41 kids1 kernel: DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
+Jan 12 19:08:41 kids1 kernel: Process Xorg (pid: 8003, ti=f0a0c000 task=f2380000 task.ti=f0a0c000)
+Jan 12 19:08:41 kids1 kernel: Stack: f0a0cf18 f78b4000 f5dbe800 00006458 f0a0cf28 f88e11c7 f8911a24 00000000.
+Jan 12 19:08:41 kids1 kernel: f0a0cf4c f88745f8 f30c3ba0 f5dbe800 f88e114a f5dbe828 f890fd78 f097ac00.
+Jan 12 19:08:41 kids1 kernel: 00000000 f0a0cf68 c049b1c0 00000000 00006458 f097ac00 f097ac00 00000000.
+Jan 12 19:08:41 kids1 kernel: Call Trace:
+Jan 12 19:08:41 kids1 kernel: [<f88e11c7>] ? radeon_cp_resume+0x7d/0xbc [radeon]
+Jan 12 19:08:41 kids1 kernel: [<f88745f8>] ? drm_ioctl+0x1b0/0x225 [drm]
+Jan 12 19:08:41 kids1 kernel: [<f88e114a>] ? radeon_cp_resume+0x0/0xbc [radeon]
+Jan 12 19:08:41 kids1 kernel: [<c049b1c0>] ? vfs_ioctl+0x50/0x69
+Jan 12 19:08:41 kids1 kernel: [<c049b414>] ? do_vfs_ioctl+0x23b/0x247
+Jan 12 19:08:41 kids1 kernel: [<c0460a56>] ? audit_syscall_entry+0xf9/0x123
+Jan 12 19:08:41 kids1 kernel: [<c049b460>] ? sys_ioctl+0x40/0x5c
+Jan 12 19:08:41 kids1 kernel: [<c0403c76>] ? syscall_call+0x7/0xb
+Jan 12 19:08:41 kids1 kernel: =======================
+Jan 12 19:08:41 kids1 kernel: Code: 66 31 d2 09 c2 89 d8 e8 fc e7 ff ff 8b 83 cc 00 00 00 8b 53 34 03 10 8b 86 70 02 00 00 2b 50 44
+Jan 12 19:08:41 kids1 kernel: EIP: [<f88dec25>] radeon_cp_init_ring_buffer+0x90/0x302 [radeon] SS:ESP 0068:f0a0cf08
+Jan 12 19:08:41 kids1 kernel: ---[ end trace 81e3cf9431f7af0c ]---
+Nov 9 15:43:47 abrtd: Activating plugin: KerneloopsScanner
+Nov 9 15:43:47 abrtd: Scanning syslog...
+Nov 9 15:43:47 abrtd: Locked '/var/cache/abrt/kerneloops-1257777827-1.lock'
+Nov 9 15:43:47 abrtd: UnLocked '/var/cache/abrt/kerneloops-1257777827-1.lock'
+Nov 9 15:43:47 abrt: Kerneloops: Reported 1 kernel oopses to Abrt
+Nov 9 15:43:47 This file should not be treated as containing an oops because of the line above
diff --git a/examples/oops1 b/examples/oops1
new file mode 100644
index 00000000..e4f02d26
--- /dev/null
+++ b/examples/oops1
@@ -0,0 +1,41 @@
+Jan 11 22:31:37 kids1 kernel: [drm] Num pipes: 1
+Jan 11 22:31:38 kids1 kernel: [drm] Setting GART location based on new memorymap
+Jan 11 22:31:38 kids1 kernel: [drm] Loading RS690/RS740 Microcode
+Jan 11 22:31:38 kids1 kernel: [drm] Num pipes: 1
+Jan 11 22:31:38 kids1 kernel: [drm] writeback test succeeded in 1 usecs
+Jan 12 14:32:19 kids1 kernel: [drm] Num pipes: 1
+Jan 12 14:32:21 kids1 kernel: [drm] Setting GART location based on new memorymap
+Jan 12 14:32:21 kids1 kernel: [drm] Loading RS690/RS740 Microcode
+Jan 12 14:32:21 kids1 kernel: [drm] Num pipes: 1
+Jan 12 14:32:21 kids1 kernel: [drm] writeback test succeeded in 1 usecs
+Jan 12 16:12:16 kids1 kernel: [drm] Num pipes: 1
+Jan 12 19:08:41 kids1 kernel: [drm:radeon_set_igpgart] *ERROR* Unable to useIGP GART table size 32768
+Jan 12 19:08:41 kids1 kernel: [drm] Loading RS690/RS740 Microcode
+Jan 12 19:08:41 kids1 kernel: BUG: unable to handle kernel NULL pointer dereference at 00000000
+Jan 12 19:08:41 kids1 kernel: IP: [<f88dec25>] :radeon:radeon_cp_init_ring_buffer+0x90/0x302
+Jan 12 19:08:41 kids1 kernel: *pde = 6f5c6067
+Jan 12 19:08:41 kids1 kernel: Oops: 0000 [#1] SMP.
+Jan 12 19:08:41 kids1 kernel: Modules linked in: r8169 mii fuse nfsd lockd nfs_acl auth_rpcgss exportfs bridge stp bnep sco l2cap bl
+Jan 12 19:08:41 kids1 kernel: Pid: 8003, comm: Xorg Not tainted (2.6.27.9-159.fc10.i686 #1)
+Jan 12 19:08:41 kids1 kernel: EIP: 0060:[<f88dec25>] EFLAGS: 00213246 CPU: 1
+Jan 12 19:08:41 kids1 kernel: EIP is at radeon_cp_init_ring_buffer+0x90/0x302 [radeon]
+Jan 12 19:08:41 kids1 kernel: EAX: 00000000 EBX: f78b4000 ECX: f78b4000 EDX: 00000000
+Jan 12 19:08:41 kids1 kernel: ESI: f5dbe800 EDI: 00006458 EBP: f0a0cf18 ESP: f0a0cf08
+Jan 12 19:08:41 kids1 kernel: DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
+Jan 12 19:08:41 kids1 kernel: Process Xorg (pid: 8003, ti=f0a0c000 task=f2380000 task.ti=f0a0c000)
+Jan 12 19:08:41 kids1 kernel: Stack: f0a0cf18 f78b4000 f5dbe800 00006458 f0a0cf28 f88e11c7 f8911a24 00000000.
+Jan 12 19:08:41 kids1 kernel: f0a0cf4c f88745f8 f30c3ba0 f5dbe800 f88e114a f5dbe828 f890fd78 f097ac00.
+Jan 12 19:08:41 kids1 kernel: 00000000 f0a0cf68 c049b1c0 00000000 00006458 f097ac00 f097ac00 00000000.
+Jan 12 19:08:41 kids1 kernel: Call Trace:
+Jan 12 19:08:41 kids1 kernel: [<f88e11c7>] ? radeon_cp_resume+0x7d/0xbc [radeon]
+Jan 12 19:08:41 kids1 kernel: [<f88745f8>] ? drm_ioctl+0x1b0/0x225 [drm]
+Jan 12 19:08:41 kids1 kernel: [<f88e114a>] ? radeon_cp_resume+0x0/0xbc [radeon]
+Jan 12 19:08:41 kids1 kernel: [<c049b1c0>] ? vfs_ioctl+0x50/0x69
+Jan 12 19:08:41 kids1 kernel: [<c049b414>] ? do_vfs_ioctl+0x23b/0x247
+Jan 12 19:08:41 kids1 kernel: [<c0460a56>] ? audit_syscall_entry+0xf9/0x123
+Jan 12 19:08:41 kids1 kernel: [<c049b460>] ? sys_ioctl+0x40/0x5c
+Jan 12 19:08:41 kids1 kernel: [<c0403c76>] ? syscall_call+0x7/0xb
+Jan 12 19:08:41 kids1 kernel: =======================
+Jan 12 19:08:41 kids1 kernel: Code: 66 31 d2 09 c2 89 d8 e8 fc e7 ff ff 8b 83 cc 00 00 00 8b 53 34 03 10 8b 86 70 02 00 00 2b 50 44
+Jan 12 19:08:41 kids1 kernel: EIP: [<f88dec25>] radeon_cp_init_ring_buffer+0x90/0x302 [radeon] SS:ESP 0068:f0a0cf08
+Jan 12 19:08:41 kids1 kernel: ---[ end trace 81e3cf9431f7af0c ]---
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 63836eae..01dfc08a 100644
--- a/inc/abrtlib.h
+++ b/inc/abrtlib.h
@@ -58,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;
@@ -148,6 +146,8 @@ 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);
@@ -199,6 +199,7 @@ char* xmalloc_sockaddr2dotted_noport(const struct sockaddr *sa);
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 */
@@ -209,11 +210,13 @@ 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;
return o.str();
}
+void parse_release(const char *pRelease, std::string& pProduct, std::string& pVersion);
+
#endif
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index ca83d369..06f93342 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -1,69 +1,25 @@
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/client.h>
#include "abrtlib.h"
+#include "abrt_xmlrpc.h"
#include "Bugzilla.h"
#include "CrashTypes.h"
#include "DebugDump.h"
#include "ABRTException.h"
#include "CommLayerInner.h"
#ifdef HAVE_CONFIG_H
- #include <config.h>
+# include <config.h>
#endif
#define XML_RPC_SUFFIX "/xmlrpc.cgi"
-static void get_product_and_version(const std::string& pRelease,
- std::string& pProduct,
- std::string& pVersion)
-{
- 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] != ' ')
- {
- pVersion += pRelease[pos];
- if (pProduct == "Red Hat Enterprise Linux ")
- {
- pProduct += pRelease[pos];
- }
- pos++;
- }
-}
-
static void create_new_bug_description(const map_crash_report_t& pCrashReport, std::string& pDescription)
{
pDescription = "abrt detected a crash.\n\n";
pDescription += make_description_bz(pCrashReport);
}
-// 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)
-{
- if (env->fault_occurred)
- {
- 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);
- }
-}
-
/*
* Static namespace for xmlrpc stuff.
@@ -72,81 +28,18 @@ static void throw_if_xml_fault_occurred(xmlrpc_env *env)
namespace {
-struct ctx {
- xmlrpc_client* client;
- xmlrpc_server_info* server_info;
+struct ctx: public abrt_xmlrpc_conn {
+ ctx(const char* url, bool no_ssl_verify): abrt_xmlrpc_conn(url, no_ssl_verify) {}
- 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 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_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);
-}
-
-void ctx::destroy_xmlrpc_client()
-{
- if (server_info)
- {
- xmlrpc_server_info_free(server_info);
- server_info = NULL;
- }
- if (client)
- {
- xmlrpc_client_destroy(client);
- client = NULL;
- }
-}
-
void ctx::login(const char* login, const char* passwd)
{
xmlrpc_env env;
@@ -156,7 +49,7 @@ void ctx::login(const char* login, const char* passwd)
throw_if_xml_fault_occurred(&env);
xmlrpc_value* result = NULL;
- xmlrpc_client_call2(&env, client, server_info, "User.login", param, &result);
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "User.login", param, &result);
xmlrpc_DECREF(param);
if (result)
xmlrpc_DECREF(result);
@@ -179,7 +72,7 @@ void ctx::logout()
throw_if_xml_fault_occurred(&env);
xmlrpc_value* result = NULL;
- xmlrpc_client_call2(&env, client, server_info, "User.logout", param, &result);
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "User.logout", param, &result);
xmlrpc_DECREF(param);
if (result)
xmlrpc_DECREF(result);
@@ -195,7 +88,7 @@ bool ctx::check_cc_and_reporter(uint32_t bug_id, const char* login)
throw_if_xml_fault_occurred(&env);
xmlrpc_value* result = NULL;
- xmlrpc_client_call2(&env, client, server_info, "bugzilla.getBug", param, &result);
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "bugzilla.getBug", param, &result);
throw_if_xml_fault_occurred(&env);
xmlrpc_DECREF(param);
@@ -263,7 +156,7 @@ void ctx::add_plus_one_cc(uint32_t bug_id, const char* login)
throw_if_xml_fault_occurred(&env);
xmlrpc_value* result = NULL;
- xmlrpc_client_call2(&env, client, server_info, "Bug.update", param, &result);
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Bug.update", param, &result);
throw_if_xml_fault_occurred(&env);
xmlrpc_DECREF(result);
@@ -281,7 +174,7 @@ int32_t ctx::check_uuid_in_bugzilla(const char* component, const char* UUID)
throw_if_xml_fault_occurred(&env);
xmlrpc_value* result = NULL;
- xmlrpc_client_call2(&env, client, server_info, "Bug.search", param, &result);
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Bug.search", param, &result);
throw_if_xml_fault_occurred(&env);
xmlrpc_DECREF(param);
@@ -313,7 +206,7 @@ int32_t ctx::check_uuid_in_bugzilla(const char* component, const char* UUID)
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: ") + to_string(bug_id));
+ update_client(_("Bug is already reported: %i"), (int)bug_id);
xmlrpc_DECREF(bug);
xmlrpc_DECREF(item);
@@ -348,7 +241,7 @@ uint32_t ctx::new_bug(const map_crash_report_t& pCrashReport)
std::string product;
std::string version;
- get_product_and_version(release, product, version);
+ parse_release(release.c_str(), product, version);
xmlrpc_value* param = xmlrpc_build_value(&env, "({s:s,s:s,s:s,s:s,s:s,s:s,s:s})",
"product", product.c_str(),
@@ -362,7 +255,7 @@ uint32_t ctx::new_bug(const map_crash_report_t& pCrashReport)
throw_if_xml_fault_occurred(&env);
xmlrpc_value* result;
- xmlrpc_client_call2(&env, client, server_info, "Bug.create", param, &result);
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Bug.create", param, &result);
throw_if_xml_fault_occurred(&env);
xmlrpc_value* id;
@@ -375,7 +268,7 @@ uint32_t ctx::new_bug(const map_crash_report_t& pCrashReport)
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: ") + to_string(bug_id));
+ update_client(_("New bug id: %i"), bug_id);
}
xmlrpc_DECREF(result);
@@ -409,7 +302,7 @@ void ctx::add_attachments(const char* bug_id_str, const map_crash_report_t& pCra
free(encoded64);
throw_if_xml_fault_occurred(&env);
- xmlrpc_client_call2(&env, client, server_info, "bugzilla.addAttachment", param, &result);
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "bugzilla.addAttachment", param, &result);
throw_if_xml_fault_occurred(&env);
xmlrpc_DECREF(result);
xmlrpc_DECREF(param);
@@ -444,14 +337,14 @@ std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport,
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())
+ /* 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";
+ NoSSLVerify = string_to_bool(settings["NoSSLVerify"].c_str());
}
else
{
@@ -513,9 +406,9 @@ std::string CReporterBugzilla::Report(const map_crash_report_t& pCrashReport,
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();
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
it = pSettings.find("BugzillaURL");
if (it != end)
{
@@ -567,6 +460,8 @@ map_plugin_settings_t CReporterBugzilla::parse_settings(const map_plugin_setting
void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings)
{
+ m_pSettings = pSettings;
+
//BUG! This gets called when user's keyring contains login data,
//then it takes precedence over /etc/abrt/plugins/Bugzilla.conf.
//I got a case when keyring had a STALE password, and there was no way
@@ -574,9 +469,8 @@ void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings)
//(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();
-
+ map_plugin_settings_t::const_iterator it;
it = pSettings.find("BugzillaURL");
if (it != end)
{
@@ -614,20 +508,19 @@ void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings)
it = pSettings.find("NoSSLVerify");
if (it != end)
{
- m_bNoSSLVerify = (it->second == "yes");
+ m_bNoSSLVerify = string_to_bool(it->second.c_str());
}
}
-map_plugin_settings_t CReporterBugzilla::GetSettings()
+/* Should not be deleted (why?) */
+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,
diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h
index 702eead2..9130a698 100644
--- a/lib/Plugins/Bugzilla.h
+++ b/lib/Plugins/Bugzilla.h
@@ -8,23 +8,24 @@ class CReporterBugzilla : public CReporter
{
private:
bool m_bNoSSLVerify;
-
std::string m_sBugzillaURL;
std::string m_sBugzillaXMLRPC;
std::string m_sLogin;
std::string m_sPassword;
std::string m_sAttchmentInBase64;
-
+
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 std::string Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
const std::string& pArgs);
+
+ virtual void SetSettings(const map_plugin_settings_t& pSettings);
+ virtual const map_plugin_settings_t& GetSettings();
};
#endif /* BUGZILLA_H_ */
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 83622169..82c5677d 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -95,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);
@@ -128,6 +127,18 @@ static pid_t ExecVP(char** pArgs, uid_t uid, std::string& pOutput)
setreuid(uid, uid);
setsid();
+ /* Nuke everything which may make setlocale() switch to non-POSIX locale:
+ * we need to avoid having gdb output in some obscure language.
+ */
+ unsetenv("LANG");
+ unsetenv("LC_ALL");
+ unsetenv("LC_COLLATE");
+ unsetenv("LC_CTYPE");
+ unsetenv("LC_MESSAGES");
+ unsetenv("LC_MONETARY");
+ unsetenv("LC_NUMERIC");
+ unsetenv("LC_TIME");
+
execvp(pArgs[0], pArgs);
/* VERB1 since sometimes we expect errors here */
VERB1 perror_msg("Can't execute '%s'", pArgs[0]);
@@ -137,6 +148,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';
@@ -160,17 +172,21 @@ enum LineRating
BestRating = Good,
};
-static LineRating rate_line(const std::string & line)
+static LineRating rate_line(const char *line)
{
-#define FOUND(x) (line.find(x) != std::string::npos)
- bool function = FOUND(" in ") && !FOUND(" in ??");
- bool library = FOUND(" from ");
- bool source_file = FOUND(" at ");
-#undef FOUND
-
+#define FOUND(x) (strstr(line, x) != NULL)
/* see the "enum LineRating" comments for possible combinations */
- if (function && source_file)
+ if (FOUND(" at "))
return Good;
+ const char *function = strstr(line, " in ");
+ if (function)
+ {
+ if (function[4] == '?') /* " in ??" does not count */
+ {
+ function = NULL;
+ }
+ }
+ bool library = FOUND(" from ");
if (function && library)
return MissingSourceFile;
if (function)
@@ -179,38 +195,48 @@ static LineRating rate_line(const std::string & line)
return MissingFunction;
return MissingEverything;
+#undef FOUND
}
/* returns number of "stars" to show */
-int rate_backtrace(const std::string & backtrace)
+static int rate_backtrace(const char *backtrace)
{
- int l = backtrace.length();
- int i;
- std::string s;
+ int i, j, len;
int multiplier = 0;
int rating = 0;
int best_possible_rating = 0;
- /* We look at the frames in reversed order, since
- * - rate_line() looks at the first line of the frame
+ /* 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.
+ * so that topmost frames end up most important
*/
- for (i = l-1; i >= 0; i--)
+ 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);
+ for (j=0; j<len; j++) /* replace tabs with spaces */
+ if (s[j] == '\t')
+ s[j] = ' ';
multiplier++;
- rating += rate_line(s) * multiplier;
+ rating += rate_line(s.c_str()) * multiplier;
best_possible_rating += BestRating * multiplier;
- s = ""; /* starting new line */
- } else
+ len = 0; /* starting new line */
+ }
+ else
{
- s = backtrace[i] + s;
+ len++;
}
}
- /* returning number of "stars" to show */
+ /* 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)
@@ -223,7 +249,7 @@ int rate_backtrace(const std::string & backtrace)
return 0;
}
-static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktrace)
+static void GetBacktrace(const char *pDebugDumpDir, std::string& pBacktrace)
{
update_client(_("Getting backtrace..."));
@@ -258,7 +284,7 @@ static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktra
args[4] = (char*)"-ex";
args[5] = xasprintf("file %s", executable.c_str());
args[6] = (char*)"-ex";
- args[7] = xasprintf("core-file %s/"FILENAME_COREDUMP, pDebugDumpDir.c_str());
+ args[7] = xasprintf("core-file %s/"FILENAME_COREDUMP, pDebugDumpDir);
args[8] = (char*)"-ex";
args[9] = (char*)"thread apply all backtrace full";
args[10] = NULL;
@@ -420,7 +446,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;
{
@@ -431,7 +457,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;
@@ -455,7 +481,7 @@ static bool is_hexstr(const char* str)
}
return true;
}
-static void InstallDebugInfos(const std::string& pDebugDumpDir, std::string& build_ids)
+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);
@@ -610,8 +636,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)
@@ -648,7 +674,7 @@ Another application is holding the yum lock, cannot continue
/* 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 std::string& pDebugDumpDir, std::string& build_ids)
+static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids)
{
update_client(_("Searching for debug-info packages..."));
@@ -673,7 +699,7 @@ static void InstallDebugInfos(const std::string& pDebugDumpDir, std::string& bui
setsid();
- char *coredump = xasprintf("%s/"FILENAME_COREDUMP, pDebugDumpDir.c_str());
+ 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 */
@@ -715,8 +741,8 @@ 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);
}
}
@@ -787,7 +813,7 @@ static void trim_debuginfo_cache(unsigned max_mb)
}
}
-std::string CAnalyzerCCpp::GetLocalUUID(const std::string& pDebugDumpDir)
+std::string CAnalyzerCCpp::GetLocalUUID(const char *pDebugDumpDir)
{
log(_("Getting local universal unique identification..."));
@@ -806,7 +832,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..."));
@@ -851,7 +877,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..."));
@@ -889,13 +915,12 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir, int force)
GetBacktrace(pDebugDumpDir, backtrace);
dd.Open(pDebugDumpDir);
- dd.SaveText(FILENAME_BACKTRACE, build_ids + backtrace);
+ 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");
}
- std::string rating = ssprintf("%d", rate_backtrace(backtrace));
- dd.SaveText(FILENAME_RATING, rating);
+ dd.SaveText(FILENAME_RATING, to_string(rate_backtrace(backtrace.c_str())).c_str());
dd.Close();
}
@@ -948,12 +973,14 @@ 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;
it = pSettings.find("MemoryMap");
if (it != end)
{
- m_bMemoryMap = it->second == "yes";
+ m_bMemoryMap = string_to_bool(it->second.c_str());
}
it = pSettings.find("DebugInfo");
if (it != end)
@@ -970,21 +997,20 @@ void CAnalyzerCCpp::SetSettings(const map_plugin_settings_t& pSettings)
it = pSettings.find("InstallDebuginfo");
if (it != end)
{
- m_bInstallDebugInfo = it->second == "yes";
+ m_bInstallDebugInfo = string_to_bool(it->second.c_str());
}
}
-map_plugin_settings_t CAnalyzerCCpp::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["MemoryMap"] = m_bMemoryMap ? "yes" : "no";
- ret["DebugInfo"] = m_sDebugInfo;
- ret["DebugInfoCacheMB"] = to_string(m_nDebugInfoCacheMB);
- ret["InstallDebugInfo"] = m_bInstallDebugInfo ? "yes" : "no";
-
- return ret;
-}
+//ok to delete?
+//const map_plugin_settings_t& CAnalyzerCCpp::GetSettings()
+//{
+// 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 m_pSettings;
+//}
PLUGIN_INFO(ANALYZER,
CAnalyzerCCpp,
diff --git a/lib/Plugins/CCpp.h b/lib/Plugins/CCpp.h
index f3f911ef..3fa0d99a 100644
--- a/lib/Plugins/CCpp.h
+++ b/lib/Plugins/CCpp.h
@@ -35,15 +35,17 @@ class CAnalyzerCCpp : public CAnalyzer
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();
+//ok to delete?
+// virtual const map_plugin_settings_t& GetSettings();
};
#endif /* CCPP */
diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp
index 6bb44a9d..e6d16b4f 100644
--- a/lib/Plugins/Catcut.cpp
+++ b/lib/Plugins/Catcut.cpp
@@ -1,7 +1,8 @@
#include <xmlrpc-c/base.h>
#include <xmlrpc-c/client.h>
-
+#include <curl/curl.h>
#include "abrtlib.h"
+#include "abrt_xmlrpc.h"
#include "Catcut.h"
#include "CrashTypes.h"
#include "DebugDump.h"
@@ -13,108 +14,8 @@
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();
-//}
+//TODO: move to make_descr.cpp
static void create_new_bug_description(const map_crash_report_t& pCrashReport, string& pDescription)
{
string howToReproduce;
@@ -162,46 +63,258 @@ static void create_new_bug_description(const map_crash_report_t& pCrashReport, s
}
else if (it->second[CD_TYPE] == CD_BIN)
{
- string msg = ssprintf(_("Binary file %s will not be reported."), it->first.c_str());
- warn_client(msg);
- //update_client(_("Binary file ")+it->first+_(" will not be reported."));
+ 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)
+static int
+put_stream(const char *pURL, FILE* f, size_t content_length)
{
- if (pRelease.find("Rawhide") != string::npos)
+ CURL* curl = curl_easy_init();
+ if (!curl)
{
- pProduct = "Fedora";
- pVersion = "rawhide";
+ throw CABRTException(EXCEP_PLUGIN, "put_stream: Curl library error.");
+ }
+ /* enable uploading */
+ curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+ /* specify target */
+ curl_easy_setopt(curl, CURLOPT_URL, pURL);
+ /* file handle: passed to the default callback, it will fread() it */
+ curl_easy_setopt(curl, CURLOPT_READDATA, f);
+ /* get file size */
+ curl_easy_setopt(curl, CURLOPT_INFILESIZE, content_length);
+ /*everything is done here; result 0 means success*/
+ int result = curl_easy_perform(curl);
+ /* goodbye */
+ curl_easy_cleanup(curl);
+ return result;
+}
+
+static void
+send_string(const char *pURL,
+ const char *pContent,
+ int retryCount,
+ int retryDelaySeconds)
+{
+ if (pURL[0] == '\0')
+ {
+ error_msg(_("send_string: URL not specified"));
return;
}
- if (pRelease.find("Fedora") != string::npos)
+
+ do
{
- pProduct = "Fedora";
+ int content_length = strlen(pContent);
+ FILE* f = fmemopen((void*)pContent, content_length, "r");
+ if (!f)
+ {
+ throw CABRTException(EXCEP_PLUGIN, "send_string: could not open string stream");
+ }
+ int result = put_stream(pURL, f, content_length);
+ fclose(f);
+ if (!result)
+ return;
+ update_client(_("Sending failed, try it again: %s"), curl_easy_strerror((CURLcode)result));
}
- else if (pRelease.find("Red Hat Enterprise Linux") != string::npos)
+ /*retry the upload if not succesful, wait a bit before next try*/
+ while (--retryCount != 0 && (sleep(retryDelaySeconds), 1));
+
+ throw CABRTException(EXCEP_PLUGIN, "send_string: could not send string");
+}
+
+static void
+send_file(const char *pURL,
+ const char *pFilename,
+ int retryCount,
+ int retryDelaySeconds)
+{
+ if (pURL[0] == '\0')
{
- pProduct = "Red Hat Enterprise Linux ";
+ error_msg(_("send_file: URL not specified"));
+ return;
}
- string::size_type pos = pRelease.find("release");
- pos = pRelease.find(" ", pos) + 1;
- while (pRelease[pos] != ' ')
+
+ update_client(_("Sending file %s to %s"), pFilename, pURL);
+
+ do
{
- pVersion += pRelease[pos];
- if (pProduct == "Red Hat Enterprise Linux ")
+ FILE* f = fopen(pFilename, "r");
+ if (!f)
{
- pProduct += pRelease[pos];
+ throw CABRTException(EXCEP_PLUGIN, "send_file: could not open string stream");
}
- pos++;
+ struct stat buf;
+ fstat(fileno(f), &buf); /* can't fail */
+ int content_length = buf.st_size;
+ int result = put_stream(pURL, f, content_length);
+ fclose(f);
+ if (!result)
+ return;
+ update_client(_("Sending failed, try it again: %s"), curl_easy_strerror((CURLcode)result));
}
+ /*retry the upload if not succesful, wait a bit before next try*/
+ while (--retryCount != 0 && (sleep(retryDelaySeconds), 1));
+
+ throw CABRTException(EXCEP_PLUGIN, "send_file: could not send file");
+}
+
+static string
+resolve_relative_url(const char *url, const char *base)
+{
+ // if 'url' is relative (not absolute) combine it with 'base'
+ // (which must be absolute)
+ // Only works in limited cases:
+ // 0) url is already absolute
+ // 1) url starts with two slashes
+ // 2) url starts with one slash
+
+ const char *colon = strchr(url, ':');
+ const char *slash = strchr(url, '/');
+
+ if (colon && (!slash || colon < slash))
+ {
+ return url;
+ }
+
+ const char *end_of_protocol = strchr(base, ':');
+ string protocol(base, end_of_protocol - base);
+
+ end_of_protocol += 3; /* skip "://" */
+ const char *end_of_host = strchr(end_of_protocol, '/');
+ string host(end_of_protocol, end_of_host - end_of_protocol);
+
+ if (url[0] == '/')
+ {
+ if (url[1] == '/')
+ {
+ protocol += ':';
+ protocol += url;
+ return protocol;
+ }
+ protocol += "://";
+ protocol += host;
+ protocol += url;
+ return protocol;
+ }
+ throw CABRTException(EXCEP_PLUGIN, "resolve_relative_url: unhandled relative url");
+}
+
+//
+// struct_find_XXXX
+// abstract all the busy work of getting a field's value from
+// a struct. XXXX is a type.
+// Return true/false = the field is in the struct
+// If true, return the field's value in 'value'.
+//
+// This function currently just assumes that the value in the
+// field can be read into the type of 'value'. This should probably
+// be fixed to either convert the fields value to the type of 'value'
+// or error specifically/usefully.
+//
+// This function probably should be converted to an overloaded function
+// (overloaded on the type of 'value'). It could also be a function
+// template.
+//
+
+static bool
+struct_find_int(xmlrpc_env* env, xmlrpc_value* result,
+ const char* fieldName, int& value)
+{
+ xmlrpc_value* an_xmlrpc_value;
+ xmlrpc_struct_find_value(env, result, fieldName, &an_xmlrpc_value);
+ throw_if_xml_fault_occurred(env);
+ if (an_xmlrpc_value)
+ {
+ xmlrpc_read_int(env, an_xmlrpc_value, &value);
+ throw_if_xml_fault_occurred(env);
+ xmlrpc_DECREF(an_xmlrpc_value);
+ return true;
+ }
+ return false;
+}
+
+static bool
+struct_find_string(xmlrpc_env* env, xmlrpc_value* result,
+ const char* fieldName, string& value)
+{
+ xmlrpc_value* an_xmlrpc_value;
+ xmlrpc_struct_find_value(env, result, fieldName, &an_xmlrpc_value);
+ throw_if_xml_fault_occurred(env);
+ if (an_xmlrpc_value)
+ {
+ const char* value_s;
+ xmlrpc_read_string(env, an_xmlrpc_value, &value_s);
+ throw_if_xml_fault_occurred(env);
+ value = value_s;
+ xmlrpc_DECREF(an_xmlrpc_value);
+ free((void*)value_s);
+ return true;
+ }
+ return false;
+}
+
+
+/*
+ * Static namespace for xmlrpc stuff.
+ * Used mainly to ensure we always destroy xmlrpc client and server_info.
+ */
+
+namespace {
+
+struct ctx: public abrt_xmlrpc_conn {
+ ctx(const char* url, bool no_ssl_verify): abrt_xmlrpc_conn(url, no_ssl_verify) {}
+
+ string login(const char* login, const char* passwd);
+ string new_bug(const char *auth_cookie, const map_crash_report_t& pCrashReport);
+ string request_upload(const char* auth_cookie, const char* pTicketName,
+ const char* fileName, const char* description);
+ void add_attachments(const char* xmlrpc_URL,
+ const char* auth_cookie,
+ const char* pTicketName,
+ const map_crash_report_t& pCrashReport,
+ int retryCount,
+ int retryDelaySeconds);
+};
+
+string
+ctx::login(const char* login, const char* passwd)
+{
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
+
+ xmlrpc_value* param = xmlrpc_build_value(&env, "(ss)", login, passwd);
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_value* result;
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Catcut.auth", param, &result);
+ xmlrpc_DECREF(param);
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_value *cookie_xml;
+ const char *cookie;
+ string cookie_str;
+ xmlrpc_struct_find_value(&env, result, "cookie", &cookie_xml);
+ throw_if_xml_fault_occurred(&env);
+ xmlrpc_read_string(&env, cookie_xml, &cookie);
+ throw_if_xml_fault_occurred(&env);
+ cookie_str = cookie;
+ /* xmlrpc_read_string returns *malloc'ed ptr*.
+ * doc is not very clear on it, but I looked in xmlrpc sources. */
+ free((void*)cookie);
+ xmlrpc_DECREF(cookie_xml);
+
+ xmlrpc_DECREF(result);
+
+ return cookie_str;
}
-static string new_bug(const char *auth_cookie, const map_crash_report_t& pCrashReport)
+string
+ctx::new_bug(const char *auth_cookie, const map_crash_report_t& pCrashReport)
{
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
+
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];
@@ -216,7 +329,7 @@ static string new_bug(const char *auth_cookie, const map_crash_report_t& pCrashR
string product;
string version;
- get_product_and_version(release, product, version);
+ parse_release(release.c_str(), product, version);
xmlrpc_value *param = xmlrpc_build_value(&env, "(s{s:s,s:s,s:s,s:s,s:s,s:s,s:s})",
auth_cookie,
@@ -228,23 +341,23 @@ static string new_bug(const char *auth_cookie, const map_crash_report_t& pCrashR
"status_whiteboard", status_whiteboard.c_str(),
"platform", arch.c_str()
);
- throw_if_xml_fault_occurred();
+ throw_if_xml_fault_occurred(&env);
xmlrpc_value *result;
- xmlrpc_client_call2(&env, client, server_info, "Catcut.createTicket", param, &result);
- throw_if_xml_fault_occurred();
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Catcut.createTicket", param, &result);
xmlrpc_DECREF(param);
+ throw_if_xml_fault_occurred(&env);
xmlrpc_value *bug_id_xml;
const char *bug_id;
string bug_id_str;
xmlrpc_struct_find_value(&env, result, "ticket", &bug_id_xml);
- throw_if_xml_fault_occurred();
+ throw_if_xml_fault_occurred(&env);
xmlrpc_read_string(&env, bug_id_xml, &bug_id);
- throw_if_xml_fault_occurred();
+ throw_if_xml_fault_occurred(&env);
bug_id_str = bug_id;
log("New bug id: %s", bug_id);
- update_client(_("New bug id: ") + bug_id_str);
+ update_client(_("New bug id: %s"), bug_id);
free((void*)bug_id);
xmlrpc_DECREF(bug_id_xml);
@@ -253,81 +366,177 @@ static string new_bug(const char *auth_cookie, const map_crash_report_t& pCrashR
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();
-// }
-// }
-//}
+string
+ctx::request_upload(const char* auth_cookie, const char* pTicketName,
+ const char* fileName, const char* description)
+{
+ xmlrpc_env env;
+ xmlrpc_env_init(&env);
+
+ xmlrpc_value* param = xmlrpc_build_value(&env, "(ssss)",
+ auth_cookie,
+ pTicketName,
+ fileName,
+ description);
+ throw_if_xml_fault_occurred(&env);
+
+ xmlrpc_value* result = NULL;
+ xmlrpc_client_call2(&env, m_pClient, m_pServer_info, "Catcut.requestUpload", param, &result);
+ xmlrpc_DECREF(param);
+ throw_if_xml_fault_occurred(&env);
+
+ string URL;
+ bool has_URL = struct_find_string(&env, result, "uri", URL);
+ if (!has_URL || URL == "")
+ {
+ int err;
+ bool has_errno = struct_find_int(&env, result, "errno", err);
+ if (has_errno && err)
+ {
+ string errmsg;
+ bool has_errmsg = struct_find_string(&env, result, "errmsg", errmsg);
+ if (has_errmsg)
+ {
+ log("error returned by requestUpload: %s", errmsg.c_str());
+ update_client(_("error returned by requestUpload: %s"), errmsg.c_str());
+ }
+ else
+ {
+ log("error returned by requestUpload: %d", err);
+ update_client(_("error returned by requestUpload: %d"), err);
+ }
+ }
+ else
+ {
+ log("no URL returned by requestUpload, and no err");
+ update_client(_("no URL returned by requestUpload, and no errno"));
+ }
+ }
+
+ log("requestUpload returned URL: %s", URL.c_str());
+ update_client(_("requestUpload returned URL: %s"), URL.c_str());
+
+ xmlrpc_DECREF(result);
+ return URL;
+}
+
+void
+ctx::add_attachments(const char* xmlrpc_URL,
+ const char* auth_cookie,
+ const char* pTicketName,
+ const map_crash_report_t& pCrashReport,
+ int retryCount,
+ int retryDelaySeconds)
+{
+
+ map_crash_report_t::const_iterator it = pCrashReport.begin();
+ for (; it != pCrashReport.end(); it++)
+ {
+ if (it->second[CD_TYPE] == CD_ATT)
+ {
+ update_client(_("Attaching (CD_ATT): %s"), it->first.c_str());
+
+ string description = "File: " + it->first;
+ string URL = request_upload(auth_cookie,
+ pTicketName,
+ it->first.c_str(),
+ description.c_str());
+
+ URL = resolve_relative_url(URL.c_str(), xmlrpc_URL);
+
+ log("rebased URL: %s", URL.c_str());
+ update_client(_("rebased URL: %s"), URL.c_str());
+
+ send_string(URL.c_str(), it->second[CD_CONTENT].c_str(),
+ retryCount, retryDelaySeconds);
+ }
+ else if (it->second[CD_TYPE] == CD_BIN)
+ {
+ update_client(_("Attaching (CD_ATT): %s"), it->first.c_str());
+
+ string description = "File: " + it->first;
+ string URL = request_upload(auth_cookie,
+ pTicketName,
+ it->first.c_str(),
+ description.c_str());
+
+ URL = resolve_relative_url(URL.c_str(), xmlrpc_URL);
+
+ log("rebased URL: %s", URL.c_str());
+ update_client(_("rebased URL: %s"), URL.c_str());
+
+ send_file(URL.c_str(), it->second[CD_CONTENT].c_str(),
+ retryCount, retryDelaySeconds);
+ }
+ }
+}
+
+} /* namespace */
+
+
+/*
+ * CReporterCatcut
+ */
CReporterCatcut::CReporterCatcut() :
m_sCatcutURL("http://127.0.0.1:8080/catcut/xmlrpc"),
- m_bNoSSLVerify(false)
+ m_bNoSSLVerify(false),
+ m_nRetryCount(3),
+ m_nRetryDelay(20)
{}
CReporterCatcut::~CReporterCatcut()
{}
string CReporterCatcut::Report(const map_crash_report_t& pCrashReport,
- const map_plugin_settings_t& pSettings, const string& pArgs)
+ 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;
+ ctx catcut_server(m_sCatcutURL.c_str(), m_bNoSSLVerify);
+ string auth_cookie = catcut_server.login(m_sLogin.c_str(), m_sPassword.c_str());
+ string message;
+ if (auth_cookie != "")
+ {
+ string ticket_name = catcut_server.new_bug(auth_cookie.c_str(), pCrashReport);
+ if (ticket_name != "")
+ {
+ catcut_server.add_attachments(
+ m_sCatcutURL.c_str(),
+ auth_cookie.c_str(),
+ ticket_name.c_str(),
+ pCrashReport,
+ m_nRetryCount,
+ m_nRetryDelay
+ );
+ message = "New catcut bug ID: " + ticket_name;
+ }
+ else
+ {
+ message = "Error could not create ticket";
+ }
+ }
+ else
+ {
+ message = "Error could not create ticket";
+ }
+ return message;
}
catch (CABRTException& e)
{
- destroy_xmlrpc_client();
- throw CABRTException(EXCEP_PLUGIN, string("CReporterCatcut::Report(): ") + e.what());
+ throw CABRTException(EXCEP_PLUGIN, 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();
+ m_pSettings = pSettings;
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
it = pSettings.find("CatcutURL");
if (it != end)
{
@@ -346,20 +555,18 @@ void CReporterCatcut::SetSettings(const map_plugin_settings_t& pSettings)
it = pSettings.find("NoSSLVerify");
if (it != end)
{
- m_bNoSSLVerify = it->second == "yes";
+ m_bNoSSLVerify = string_to_bool(it->second.c_str());
+ }
+ it = pSettings.find("RetryCount");
+ if (it != end)
+ {
+ m_nRetryCount = atoi(it->second.c_str());
+ }
+ it = pSettings.find("RetryDelay");
+ if (it != end)
+ {
+ m_nRetryDelay = atoi(it->second.c_str());
}
-}
-
-map_plugin_settings_t CReporterCatcut::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["CatcutURL"] = m_sCatcutURL;
- ret["Login"] = m_sLogin;
- ret["Password"] = m_sPassword;
- ret["NoSSLVerify"] = m_bNoSSLVerify ? "yes" : "no";
-
- return ret;
}
PLUGIN_INFO(REPORTER,
diff --git a/lib/Plugins/Catcut.h b/lib/Plugins/Catcut.h
index 40ef399d..4fb89e22 100644
--- a/lib/Plugins/Catcut.h
+++ b/lib/Plugins/Catcut.h
@@ -11,13 +11,14 @@ class CReporterCatcut : public CReporter
std::string m_sLogin;
std::string m_sPassword;
bool m_bNoSSLVerify;
+ int m_nRetryCount;
+ int m_nRetryDelay;
public:
CReporterCatcut();
virtual ~CReporterCatcut();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
virtual std::string Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings,
diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp
index 66427585..868f54dd 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,74 +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);
- std::string msg = ssprintf(_("Sending archive %s via %s"), pFilename.c_str(), protocol.c_str());
- update_client(msg.c_str());
-
- 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);
}
@@ -285,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())
{
@@ -371,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());
}
@@ -397,15 +370,18 @@ void CFileTransfer::Run(const std::string& pActiveDir, const std::string& pArgs)
void CFileTransfer::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("URL");
+ map_plugin_settings_t::const_iterator it;
+ it = pSettings.find("URL");
if (it != end)
{
m_sURL = it->second;
}
else
{
- warn_client(_("FileTransfer: URL not specified"));
+ error_msg(_("FileTransfer: URL not specified"));
}
it = pSettings.find("RetryCount");
@@ -427,25 +403,21 @@ 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()
-{
- 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;
-}
+//ok to delete?
+//const map_plugin_settings_t& CFileTransfer::GetSettings()
+//{
+// 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,
CFileTransfer,
diff --git a/lib/Plugins/FileTransfer.h b/lib/Plugins/FileTransfer.h
index 2f230c65..91207f49 100644
--- a/lib/Plugins/FileTransfer.h
+++ b/lib/Plugins/FileTransfer.h
@@ -35,18 +35,15 @@ 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);
+//ok to delete?
+// 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 edd00d8b..9e2010c7 100644
--- a/lib/Plugins/Kerneloops.h
+++ b/lib/Plugins/Kerneloops.h
@@ -34,9 +34,9 @@
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 c57a1ef8..f7a6cbb8 100644
--- a/lib/Plugins/KerneloopsReporter.cpp
+++ b/lib/Plugins/KerneloopsReporter.cpp
@@ -98,12 +98,10 @@ std::string CKerneloopsReporter::Report(const map_crash_report_t& pCrashReport,
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(),
@@ -111,30 +109,32 @@ 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;
}
void CKerneloopsReporter::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("SubmitURL") != pSettings.end())
- {
- m_sSubmitURL = pSettings.find("SubmitURL")->second;
+ m_pSettings = pSettings;
+
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
+ it = pSettings.find("SubmitURL");
+ if (it != end) {
+ m_sSubmitURL = it->second;
}
}
-map_plugin_settings_t CKerneloopsReporter::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["SubmitURL"] = m_sSubmitURL;
-
- return ret;
-}
+//ok to delete?
+//const map_plugin_settings_t& CKerneloopsReporter::GetSettings()
+//{
+// m_pSettings["SubmitURL"] = m_sSubmitURL;
+//
+// return m_pSettings;
+//}
PLUGIN_INFO(REPORTER,
CKerneloopsReporter,
diff --git a/lib/Plugins/KerneloopsReporter.h b/lib/Plugins/KerneloopsReporter.h
index 3c165920..af82afbe 100644
--- a/lib/Plugins/KerneloopsReporter.h
+++ b/lib/Plugins/KerneloopsReporter.h
@@ -41,7 +41,8 @@ class CKerneloopsReporter : public CReporter
CKerneloopsReporter();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+//ok to delete?
+// 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 9e1bd535..8c8cd4b9 100644
--- a/lib/Plugins/KerneloopsScanner.cpp
+++ b/lib/Plugins/KerneloopsScanner.cpp
@@ -43,7 +43,6 @@
CKerneloopsScanner::CKerneloopsScanner()
{
int cnt_FoundOopses;
- m_sSysLogFile = "/var/log/messages";
/* Scan dmesg, on first call only */
cnt_FoundOopses = ScanDmesg();
@@ -51,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);
@@ -97,8 +100,7 @@ void CKerneloopsScanner::SaveOopsToDebugDump()
try
{
CDebugDump debugDump;
- // UID of kerneloops is -1
- debugDump.Create(path, -1);
+ debugDump.Create(path, 0);
debugDump.SaveText(FILENAME_ANALYZER, "Kerneloops");
debugDump.SaveText(FILENAME_EXECUTABLE, "kernel");
debugDump.SaveText(FILENAME_KERNEL, first_line);
@@ -178,24 +180,6 @@ int CKerneloopsScanner::ScanSysLogFile(const char *filename)
return cnt_FoundOopses;
}
-void CKerneloopsScanner::SetSettings(const map_plugin_settings_t& pSettings)
-{
- map_plugin_settings_t::const_iterator it = pSettings.find("SysLogFile");
- if (it != pSettings.end())
- {
- m_sSysLogFile = it->second;
- }
-}
-
-map_plugin_settings_t CKerneloopsScanner::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["SysLogFile"] = m_sSysLogFile;
-
- return ret;
-}
-
PLUGIN_INFO(ACTION,
CKerneloopsScanner,
"KerneloopsScanner",
diff --git a/lib/Plugins/KerneloopsScanner.h b/lib/Plugins/KerneloopsScanner.h
index 6ac0461f..9f00df21 100644
--- a/lib/Plugins/KerneloopsScanner.h
+++ b/lib/Plugins/KerneloopsScanner.h
@@ -33,9 +33,6 @@
class CKerneloopsScanner : public CAction
{
- private:
- std::string m_sSysLogFile;
-
/* For "dumpoops" tool */
public:
vector_string_t m_pOopsList;
@@ -49,10 +46,7 @@ class CKerneloopsScanner : public CAction
/* 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
diff --git a/lib/Plugins/KerneloopsSysLog.cpp b/lib/Plugins/KerneloopsSysLog.cpp
index d28ce399..cb15fccb 100644
--- a/lib/Plugins/KerneloopsSysLog.cpp
+++ b/lib/Plugins/KerneloopsSysLog.cpp
@@ -75,7 +75,6 @@ struct line_info {
int extract_oopses(vector_string_t &oopses, char *buffer, size_t buflen)
{
char *c;
- enum { maybe, no, yes } syslog_format = maybe;
int linecount = 0;
int lines_info_alloc = 0;
struct line_info *lines_info = NULL;
@@ -86,86 +85,73 @@ int extract_oopses(vector_string_t &oopses, char *buffer, size_t buflen)
buffer[buflen - 1] = '\n'; /* the buffer usually ends with \n, but let's make sure */
c = buffer;
while (c < buffer + buflen) {
- char v, linelevel;
- int len = 0;
+ char linelevel;
char *c9;
char *linepointer;
c9 = (char*)memchr(c, '\n', buffer + buflen - c); /* a \n will always be found */
assert(c9);
- len = c9 - c;
+ *c9 = '\0'; /* turn the \n into a string termination */
+ if (c9 == c)
+ goto next_line;
/* in /var/log/messages, we need to strip the first part off, upto the 3rd ':' */
- if (syslog_format == yes
- || (syslog_format == maybe
- && len > sizeof("Jul 4 11:11:41")
- && c[3] == ' ' && c[6] == ' ' && c[9] == ':' && c[12] == ':'
- && (v = (c[5] | c[7]|c[8] | c[10]|c[11] | c[13]|c[14])) <= '9'
- && v >= '0'
- && (v = (c[5] & c[7]&c[8] & c[10]&c[11] & c[13]&c[14])) <= '9'
- && v >= '0'
- )
+ /* 01234567890123456 */
+ if ((c9 - c) > sizeof("Jul 4 11:11:11 ")
+ && c[3] == ' '
+ && (c[4] == ' ' || isdigit(c[4]))
+ && isdigit(c[5])
+ && c[6] == ' '
+ && isdigit(c[7])
+ && isdigit(c[8])
+ && c[9] == ':'
+ && isdigit(c[10])
+ && isdigit(c[11])
+ && c[12] == ':'
+ && isdigit(c[13])
+ && isdigit(c[14])
+ && c[15] == ' '
) {
/* It's syslog file, not a bare dmesg */
- syslog_format = yes;
-
- char *c2;
- int i;
- /* skip non-kernel lines */
- c2 = (char*)memmem(c, len, "kernel:", 7);
- if (!c2)
- c2 = (char*)memmem(c, len, "abrt:", 5);
- if (!c2)
+ /* Skip over timestamp */
+ c += 16;
+
+ /* Skip non-kernel lines */
+ char *kernel_str = strstr(c, "kernel: ");
+ if (kernel_str == NULL) {
+ /* if we see our own marker:
+ * "hostname abrt: Kerneloops: Reported 1 kernel oopses to Abrt"
+ * we know we submitted everything upto here already */
+ if (strstr(c, "abrt:") && strstr(c, "Abrt")) {
+ linecount = 0;
+ lines_info_alloc = 0;
+ free(lines_info);
+ lines_info = NULL;
+ }
goto next_line;
-
- /* skip to message in "Jan 01 01:23:45 hostname kernel: message" */
- for (i = 0; i < 3; i++) {
- c = (char*)memchr(c, ':', len);
- if (!c)
- goto next_line;
- c++;
- len = c9 - c;
}
- c++;
- len--;
- } else if (len) {
- syslog_format = no;
+ c = kernel_str + sizeof("kernel: ")-1;
}
- linepointer = c;
linelevel = 0;
/* store and remove kernel log level */
- if (len >= 3 && *c == '<' && *(c+2) == '>') {
- linelevel = *(c+1);
+ if (*c == '<' && c[1] && c[2] == '>') {
+ linelevel = c[1];
c += 3;
- len -= 3;
- linepointer = c;
}
/* remove jiffies time stamp counter if present */
if (*c == '[') {
char *c2, *c3;
- c2 = (char*)memchr(c, '.', len);
- c3 = (char*)memchr(c, ']', len);
+ c2 = strchr(c, '.');
+ c3 = strchr(c, ']');
if (c2 && c3 && (c2 < c3) && (c3-c) < 14 && (c2-c) < 8) {
c = c3 + 1;
if (*c == ' ')
c++;
- len = c9 - c;
- linepointer = c;
}
}
-
- assert(c + len == c9);
- *c9 = '\0'; /* turn the \n into a string termination */
-
- /* 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_alloc = 0;
- free(lines_info);
- lines_info = NULL;
- }
+ linepointer = c;
if (linecount >= lines_info_alloc) {
lines_info_alloc += REALLOC_CHUNK;
diff --git a/lib/Plugins/Logger.cpp b/lib/Plugins/Logger.cpp
index 716d3a92..6babc732 100644
--- a/lib/Plugins/Logger.cpp
+++ b/lib/Plugins/Logger.cpp
@@ -19,9 +19,10 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "Logger.h"
#include <fstream>
#include <sstream>
+#include "abrtlib.h"
+#include "Logger.h"
#include "DebugDump.h"
#include "CommLayerInner.h"
#include "ABRTException.h"
@@ -33,25 +34,30 @@ CLogger::CLogger() :
void CLogger::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("LogPath") != pSettings.end())
+ m_pSettings = pSettings;
+
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
+ it = pSettings.find("LogPath");
+ if (it != end)
{
- m_sLogPath = pSettings.find("LogPath")->second;
+ m_sLogPath = it->second;
}
- if (pSettings.find("AppendLogs") != pSettings.end())
+ it = pSettings.find("AppendLogs");
+ if (it != end)
{
- m_bAppendLogs = pSettings.find("AppendLogs")->second == "yes";
+ m_bAppendLogs = string_to_bool(it->second.c_str());
}
}
-map_plugin_settings_t CLogger::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["LogPath"] = m_sLogPath;
- ret["AppendLogs"] = m_bAppendLogs ? "yes" : "no";
-
- return ret;
-}
+//ok to delete?
+//const map_plugin_settings_t& CLogger::GetSettings()
+//{
+// m_pSettings["LogPath"] = m_sLogPath;
+// m_pSettings["AppendLogs"] = m_bAppendLogs ? "yes" : "no";
+//
+// return m_pSettings;
+//}
std::string CLogger::Report(const map_crash_report_t& pCrashReport,
const map_plugin_settings_t& pSettings, const std::string& pArgs)
diff --git a/lib/Plugins/Logger.h b/lib/Plugins/Logger.h
index 33f957db..285e25ba 100644
--- a/lib/Plugins/Logger.h
+++ b/lib/Plugins/Logger.h
@@ -35,7 +35,8 @@ class CLogger : public CReporter
CLogger();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+//ok to delete?
+// 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 ef3a8d2a..1979f9e8 100644
--- a/lib/Plugins/Mailx.cpp
+++ b/lib/Plugins/Mailx.cpp
@@ -201,35 +201,42 @@ std::string CMailx::Report(const map_crash_report_t& pCrashReport,
void CMailx::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("Subject") != pSettings.end())
+ m_pSettings = pSettings;
+
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
+ it = pSettings.find("Subject");
+ if (it != end)
{
- m_sSubject = pSettings.find("Subject")->second;
+ m_sSubject = it->second;
}
- if (pSettings.find("EmailFrom") != pSettings.end())
+ it = pSettings.find("EmailFrom");
+ if (it != end)
{
- m_sEmailFrom = pSettings.find("EmailFrom")->second;
+ m_sEmailFrom = it->second;
}
- if (pSettings.find("EmailTo") != pSettings.end())
+ it = pSettings.find("EmailTo");
+ if (it != end)
{
- m_sEmailTo = pSettings.find("EmailTo")->second;
+ m_sEmailTo = it->second;
}
- if (pSettings.find("SendBinaryData") != pSettings.end())
+ it = pSettings.find("SendBinaryData");
+ if (it != end)
{
- m_bSendBinaryData = pSettings.find("SendBinaryData")->second == "yes";
+ m_bSendBinaryData = string_to_bool(it->second.c_str());
}
}
-map_plugin_settings_t CMailx::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["Subject"] = m_sSubject;
- ret["EmailFrom"] = m_sEmailFrom;
- ret["EmailTo"] = m_sEmailTo;
- ret["SendBinaryData"] = m_bSendBinaryData ? "yes" : "no";
-
- return ret;
-}
+//ok to delete?
+//const map_plugin_settings_t& CMailx::GetSettings()
+//{
+// m_pSettings["Subject"] = m_sSubject;
+// m_pSettings["EmailFrom"] = m_sEmailFrom;
+// m_pSettings["EmailTo"] = m_sEmailTo;
+// m_pSettings["SendBinaryData"] = m_bSendBinaryData ? "yes" : "no";
+//
+// return m_pSettings;
+//}
PLUGIN_INFO(REPORTER,
CMailx,
diff --git a/lib/Plugins/Mailx.h b/lib/Plugins/Mailx.h
index e3c86e73..4aa861f1 100644
--- a/lib/Plugins/Mailx.h
+++ b/lib/Plugins/Mailx.h
@@ -47,7 +47,8 @@ class CMailx : public CReporter
CMailx();
virtual void SetSettings(const map_plugin_settings_t& pSettings);
- virtual map_plugin_settings_t GetSettings();
+//ok to delete?
+// 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 428c2d67..0502f5e1 100644
--- a/lib/Plugins/Makefile.am
+++ b/lib/Plugins/Makefile.am
@@ -1,30 +1,42 @@
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 \
- 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 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\
+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
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 dc035d30..3aad0545 100644
--- a/lib/Plugins/SQLite3.cpp
+++ b/lib/Plugins/SQLite3.cpp
@@ -325,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 "
@@ -398,20 +398,24 @@ database_row_t CSQLite3::GetUUIDData(const std::string& pUUID, const std::string
void CSQLite3::SetSettings(const map_plugin_settings_t& pSettings)
{
- if (pSettings.find("DBPath") != pSettings.end())
+ m_pSettings = pSettings;
+
+ map_plugin_settings_t::const_iterator end = pSettings.end();
+ map_plugin_settings_t::const_iterator it;
+ it = pSettings.find("DBPath");
+ if (it != end)
{
- m_sDBPath = pSettings.find("DBPath")->second;
+ m_sDBPath = it->second;
}
}
-map_plugin_settings_t CSQLite3::GetSettings()
-{
- map_plugin_settings_t ret;
-
- ret["DBPath"] = m_sDBPath;
-
- return ret;
-}
+//ok to delete?
+//const map_plugin_settings_t& CSQLite3::GetSettings()
+//{
+// m_pSettings["DBPath"] = m_sDBPath;
+//
+// return m_pSettings;
+//}
PLUGIN_INFO(DATABASE,
CSQLite3,
diff --git a/lib/Plugins/SQLite3.h b/lib/Plugins/SQLite3.h
index e7ca8ae2..fc13bd73 100644
--- a/lib/Plugins/SQLite3.h
+++ b/lib/Plugins/SQLite3.h
@@ -58,7 +58,8 @@ 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();
+//ok to delete?
+// virtual const map_plugin_settings_t& GetSettings();
};
#endif /* SQLITE3_H_ */
diff --git a/lib/Plugins/TicketUploader.cpp b/lib/Plugins/TicketUploader.cpp
index 179ccc07..76bda400 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,197 +41,131 @@ CTicketUploader::~CTicketUploader()
{}
-
-void CTicketUploader::Error(string func, string msg)
+static void Error(const char *msg)
{
- update_client(msg);
- throw CABRTException(EXCEP_PLUGIN, func + msg);
-}
-
-void CTicketUploader::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();
+ 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 map_plugin_settings_t& pSettings, const std::string& pArgs)
+ 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 == "")
@@ -249,239 +177,224 @@ string CTicketUploader::Report(const map_crash_report_t& pCrashReport,
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())
+ m_pSettings = pSettings;
+
+ 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 = string_to_bool(it->second.c_str());
}
- if (pSettings.find("Upload") != pSettings.end())
+ it = pSettings.find("Upload");
+ if (it != end)
{
- m_bUpload = pSettings.find("Upload")->second == "yes";
+ m_bUpload = string_to_bool(it->second.c_str());
}
- 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()
-{
- 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;
-}
+//ok to delete?
+//const map_plugin_settings_t& CTicketUploader::GetSettings()
+//{
+// 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,
CTicketUploader,
diff --git a/lib/Plugins/TicketUploader.h b/lib/Plugins/TicketUploader.h
index 92e33872..2a7c98af 100644
--- a/lib/Plugins/TicketUploader.h
+++ b/lib/Plugins/TicketUploader.h
@@ -29,46 +29,29 @@
#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();
+//ok to delete?
+// 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/DebugDump.cpp b/lib/Utils/DebugDump.cpp
index ec9e4703..ba11d965 100644
--- a/lib/Utils/DebugDump.cpp
+++ b/lib/Utils/DebugDump.cpp
@@ -39,9 +39,16 @@ static bool isdigit_str(const char *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(""),
@@ -50,7 +57,7 @@ CDebugDump::CDebugDump() :
m_bLocked(false)
{}
-void CDebugDump::Open(const std::string& pDir)
+void CDebugDump::Open(const char *pDir)
{
if (m_bOpened)
{
@@ -59,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;
@@ -208,17 +215,17 @@ void CDebugDump::UnLock()
}
}
-void CDebugDump::Create(const std::string& pDir, int64_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();
@@ -228,13 +235,13 @@ void CDebugDump::Create(const std::string& pDir, int64_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;
@@ -245,14 +252,15 @@ void CDebugDump::Create(const std::string& pDir, int64_t uid)
perror_msg("can't change '%s' ownership to %u:%u", m_sDebugDumpDir.c_str(), (int)uid, (int)gid);
}
- SaveText(FILENAME_UID, ssprintf("%li", 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;
@@ -261,26 +269,33 @@ 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 char *name)
{
+ /* Some files in our dump directories are known to always be textual */
+ if (strcmp(name, "backtrace") == 0
+ || strcmp(name, "cmdline") == 0
+ ) {
+ return true;
+ }
+
/* This idiotic library thinks that file containing just "0" is not text (!!)
magic_t m = magic_open(MAGIC_MIME_TYPE);
@@ -320,25 +335,22 @@ static bool IsTextFile(const char *name)
int r = full_read(fd, buf, sizeof(buf));
close(fd);
+ /* Every once in a while, even a text file contains a few garbled
+ * or unexpected non-ASCII chars. We should not declare it "binary".
+ */
+ const unsigned RATIO = 50;
+ unsigned total_chars = r + RATIO;
+ unsigned bad_chars = 1; /* 1 prevents division by 0 later */
while (--r >= 0)
{
- if (buf[r] >= 0x7f)
- return false;
- /* Among control chars, only '\t','\n' etc are allowed */
- if (buf[r] < ' ' && !isspace(buf[r]))
- return false;
- }
- return true;
-}
-
-static std::string RemoveBackSlashes(const std::string& pDir)
-{
- std::string ret = pDir;
- while (ret[ret.length() - 1] == '/')
- {
- ret = ret.substr(0, ret.length() - 2);
+ if (buf[r] >= 0x7f
+ /* among control chars, only '\t','\n' etc are allowed */
+ || (buf[r] < ' ' && !isspace(buf[r]))
+ ) {
+ bad_chars++;
+ }
}
- return ret;
+ return (total_chars / bad_chars) >= RATIO;
}
void CDebugDump::Delete()
@@ -347,7 +359,7 @@ void CDebugDump::Delete()
{
return;
}
- DeleteFileDir(m_sDebugDumpDir);
+ DeleteFileDir(m_sDebugDumpDir.c_str());
}
void CDebugDump::Close()
@@ -374,100 +386,44 @@ void CDebugDump::SaveKernelArchitectureRelease()
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);
+ 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));
}
}
@@ -477,36 +433,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()
@@ -538,7 +485,7 @@ 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 = concat_path_file(m_sDebugDumpDir.c_str(), dent->d_name);
pFileName = dent->d_name;
if (IsTextFile(fullname.c_str()))
@@ -548,7 +495,7 @@ bool CDebugDump::GetNextFile(std::string& pFileName, std::string& pContent, bool
}
else
{
- pContent = "";
+ pContent.clear();
pIsTextFile = false;
}
return true;
@@ -558,4 +505,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 189b42d0..b48a386d 100644
--- a/lib/Utils/DebugDump.h
+++ b/lib/Utils/DebugDump.h
@@ -51,7 +51,6 @@ class CDebugDump
bool m_bLocked;
void SaveKernelArchitectureRelease();
- void SaveTime();
void Lock();
void UnLock();
@@ -60,18 +59,17 @@ class CDebugDump
CDebugDump();
~CDebugDump() { Close(); }
- void Open(const std::string& pDir);
- void Create(const std::string& pDir, int64_t uid);
+ 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 68c925fd..1b141bd7 100644
--- a/lib/Utils/Makefile.am
+++ b/lib/Utils/Makefile.am
@@ -11,10 +11,12 @@ libABRTUtils_la_SOURCES = \
logging.cpp \
copyfd.cpp \
skip_whitespace.cpp \
+ parse_release.cpp \
CrashTypesSocket.cpp \
DebugDump.h DebugDump.cpp \
CommLayerInner.h CommLayerInner.cpp \
abrt_dbus.h abrt_dbus.cpp \
+ abrt_xmlrpc.h abrt_xmlrpc.cpp \
Plugin.h Plugin.cpp make_descr.cpp \
Polkit.h Polkit.cpp \
Action.h Database.h Reporter.h Analyzer.h \
@@ -30,6 +32,7 @@ libABRTUtils_la_CPPFLAGS = \
-DVAR_RUN=\"$(VAR_RUN)\" \
$(GLIB_CFLAGS) \
$(DBUS_CFLAGS) \
+ $(XMLRPC_CFLAGS) $(XMLRPC_CLIENT_CFLAGS) \
$(POLKIT_CFLAGS) \
-D_GNU_SOURCE
libABRTUtils_la_LDFLAGS = \
@@ -37,8 +40,10 @@ libABRTUtils_la_LDFLAGS = \
$(DL_LIBS) \
$(DBUS_LIBS)
libABRTUtils_la_LIBADD = \
+ $(XMLRPC_LIBS) $(XMLRPC_CLIENT_LIBS) \
$(POLKIT_LIBS)
+
install-data-local:
$(mkdir_p) '$(DESTDIR)/$(DEBUG_DUMPS_DIR)'
chmod 1777 '$(DESTDIR)/$(DEBUG_DUMPS_DIR)'
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 00c7e5be..f93f7e7b 100644
--- a/lib/Utils/Plugin.h
+++ b/lib/Utils/Plugin.h
@@ -47,7 +47,11 @@
*/
class CPlugin
{
+ protected:
+ map_plugin_settings_t m_pSettings;
+
public:
+ CPlugin();
/**
* A destructor.
*/
@@ -69,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();
};
/**
diff --git a/lib/Utils/abrt_xmlrpc.cpp b/lib/Utils/abrt_xmlrpc.cpp
new file mode 100644
index 00000000..11c431b8
--- /dev/null
+++ b/lib/Utils/abrt_xmlrpc.cpp
@@ -0,0 +1,76 @@
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+#include "abrtlib.h"
+#include "abrt_xmlrpc.h"
+#include "ABRTException.h"
+
+void throw_if_xml_fault_occurred(xmlrpc_env *env)
+{
+ if (env->fault_occurred)
+ {
+ 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);
+ }
+}
+
+void abrt_xmlrpc_conn::new_xmlrpc_client(const char* url, bool no_ssl_verify)
+{
+ m_pClient = NULL;
+ m_pServer_info = NULL;
+
+ 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);
+
+ xmlrpc_client_create(&env, XMLRPC_CLIENT_NO_FLAGS,
+ PACKAGE_NAME, VERSION,
+ &clientParms, XMLRPC_CPSIZE(transportparm_size),
+ &m_pClient);
+ throw_if_xml_fault_occurred(&env);
+
+ m_pServer_info = xmlrpc_server_info_new(&env, url);
+ if (env.fault_occurred)
+ {
+ xmlrpc_client_destroy(m_pClient);
+ m_pClient = NULL;
+ }
+ throw_if_xml_fault_occurred(&env);
+}
+
+void abrt_xmlrpc_conn::destroy_xmlrpc_client()
+{
+ if (m_pServer_info)
+ {
+ xmlrpc_server_info_free(m_pServer_info);
+ m_pServer_info = NULL;
+ }
+ if (m_pClient)
+ {
+ xmlrpc_client_destroy(m_pClient);
+ m_pClient = NULL;
+ }
+}
diff --git a/lib/Utils/abrt_xmlrpc.h b/lib/Utils/abrt_xmlrpc.h
new file mode 100644
index 00000000..e67ab19a
--- /dev/null
+++ b/lib/Utils/abrt_xmlrpc.h
@@ -0,0 +1,27 @@
+#ifndef ABRT_XMLRPC_H_
+#define ABRT_XMLRPC_H_ 1
+
+#include <xmlrpc-c/base.h>
+#include <xmlrpc-c/client.h>
+
+/*
+ * Simple class holding XMLRPC connection data.
+ * Used mainly to ensure we always destroy xmlrpc client and server_info
+ * on return or throw.
+ */
+
+struct abrt_xmlrpc_conn {
+ xmlrpc_client* m_pClient;
+ xmlrpc_server_info* m_pServer_info;
+
+ abrt_xmlrpc_conn(const char* url, bool no_ssl_verify) { new_xmlrpc_client(url, no_ssl_verify); }
+ ~abrt_xmlrpc_conn() { destroy_xmlrpc_client(); }
+
+ void new_xmlrpc_client(const char* url, bool no_ssl_verify);
+ void destroy_xmlrpc_client();
+};
+
+/* Utility function */
+void throw_if_xml_fault_occurred(xmlrpc_env *env);
+
+#endif
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/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/parse_release.cpp b/lib/Utils/parse_release.cpp
new file mode 100644
index 00000000..33d3edb1
--- /dev/null
+++ b/lib/Utils/parse_release.cpp
@@ -0,0 +1,38 @@
+#include "abrtlib.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+using namespace std;
+
+void parse_release(const char *pRelease, string& pProduct, string& pVersion)
+{
+ if (strstr(pRelease, "Rawhide"))
+ {
+ pProduct = "Fedora";
+ pVersion = "rawhide";
+ return;
+ }
+ if (strstr(pRelease, "Fedora"))
+ {
+ pProduct = "Fedora";
+ }
+ else if (strstr(pRelease, "Red Hat Enterprise Linux"))
+ {
+ pProduct = "Red Hat Enterprise Linux ";
+ }
+
+ const char *release = strstr(pRelease, "release");
+ const char *space = release ? strchr(release, ' ') : NULL;
+
+ if (space++) while (*space != '\0' && *space != ' ')
+ {
+ /* Eat string like "5.2" */
+ pVersion += *space;
+ if (pProduct == "Red Hat Enterprise Linux ")
+ {
+ pProduct += *space;
+ }
+ space++;
+ }
+}
diff --git a/lib/Utils/xfuncs.cpp b/lib/Utils/xfuncs.cpp
index 533fbfa8..97c2f763 100644
--- a/lib/Utils/xfuncs.cpp
+++ b/lib/Utils/xfuncs.cpp
@@ -355,3 +355,16 @@ std::string concat_path_file(const char *path, const char *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/el.po b/po/el.po
index 2de0ac52..d89dd1c8 100644
--- a/po/el.po
+++ b/po/el.po
@@ -8,9 +8,9 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt.master\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-11-03 09:13+0000\n"
-"PO-Revision-Date: 2009-11-03 18:09+0200\n"
-"Last-Translator: \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"
@@ -64,6 +64,7 @@ msgstr ""
"Μήπως λείπει το Debuginfo;"
#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -101,7 +102,7 @@ msgid "Plugins"
msgstr "ΠÏόσθετες λειτουÏγίες"
#: ../src/Gui/ccgui.glade.h:10
-#: ../src/Gui/report.glade.h:2
+#: ../src/Gui/report.glade.h:3
msgid "Report"
msgstr "ΑναφοÏά"
@@ -219,11 +220,30 @@ msgstr ""
msgid "Error getting the report: %s"
msgstr "Σφάλμα λήψης της αναφοÏάς: %s"
-#: ../src/Gui/CCReporterDialog.py:171
+#: ../src/Gui/CCReporterDialog.py:173
msgid "Brief description how to reproduce this or what you did..."
msgstr "Μια σÏντομη πεÏιγÏαφή για το πως θα αναπαÏαχθεί το σφάλμα ή τι κάνατε όταν συνέβηκε..."
-#: ../src/Gui/CCReporterDialog.py:215
+#: ../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"
@@ -260,23 +280,14 @@ msgstr "το πεδίο ÏƒÏ…Î½Î´Ï…Î±ÏƒÎ¼Î¿Ï combo δεν έχει εφαÏμοÏ
msgid "Nothing to hydrate!"
msgstr "Δεν υπάÏχουν δεδομένα για εμφάνιση!"
-#: ../src/Gui/report.glade.h:1
+#: ../src/Gui/report.glade.h:2
msgid "Comment"
msgstr "Σχόλιο:"
-#: ../src/Gui/report.glade.h:3
+#: ../src/Gui/report.glade.h:4
msgid "Send"
msgstr "Αποστολή"
-#: ../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:33
#: ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
@@ -390,6 +401,10 @@ msgstr "Ιστοσελίδα:"
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,17 +413,17 @@ msgstr "gtk-close"
msgid "gtk-remove"
msgstr "gtk-remove"
-#: ../src/Applet/Applet.cpp:76
+#: ../src/Applet/Applet.cpp:79
#, c-format
msgid "A crash in package %s has been detected"
msgstr "Εντοπίστηκε μια κατάÏÏευση στην εφαÏμογή %s"
-#: ../src/Applet/Applet.cpp:135
+#: ../src/Applet/Applet.cpp:138
msgid "ABRT service has been started"
msgstr "Η υπηÏεσία ABRT έχει ξεκινήσει"
-#: ../src/Applet/Applet.cpp:137
-#: ../src/Applet/Applet.cpp:251
+#: ../src/Applet/Applet.cpp:140
+#: ../src/Applet/Applet.cpp:254
msgid "ABRT service is not running"
msgstr "Η υπηÏεσία ABRT δεν εκτελείται"
@@ -416,39 +431,41 @@ msgstr "Η υπηÏεσία ABRT δεν εκτελείται"
msgid "Warning"
msgstr "ΠÏοειδοποίηση"
-#: ../src/Daemon/Daemon.cpp:514
+#: ../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:314
-msgid "Bug is already reported: "
-msgstr "Το σφάλμα έχει ήδη αναφεÏθεί:"
+#: ../lib/Plugins/Bugzilla.cpp:316
+#, c-format
+msgid "Bug is already reported: %i"
+msgstr "Το σφάλμα έχει ήδη αναφεÏθεί %i"
-#: ../lib/Plugins/Bugzilla.cpp:410
-msgid "New bug id: "
-msgstr "Îέο id σφάλματος;"
+#: ../lib/Plugins/Bugzilla.cpp:378
+#, c-format
+msgid "New bug id: %i"
+msgstr "Îέο id σφάλματος;%i"
-#: ../lib/Plugins/Bugzilla.cpp:484
+#: ../lib/Plugins/Bugzilla.cpp:471
msgid "Checking for duplicates..."
msgstr "Έλεγχος για ίδια σφάλματα"
-#: ../lib/Plugins/Bugzilla.cpp:487
+#: ../lib/Plugins/Bugzilla.cpp:474
msgid "Logging into bugzilla..."
msgstr "ΣÏνδεση στον bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:491
+#: ../lib/Plugins/Bugzilla.cpp:478
msgid "Empty login and password. Please check Bugzilla.conf"
msgstr "Κενό όνομα χÏήστη και κωδικός. ΠαÏακαλώ ελέγξτε το Bugzilla.conf"
-#: ../lib/Plugins/Bugzilla.cpp:497
+#: ../lib/Plugins/Bugzilla.cpp:484
msgid "Checking CC..."
msgstr "Έλεγχος CC..."
-#: ../lib/Plugins/Bugzilla.cpp:506
+#: ../lib/Plugins/Bugzilla.cpp:493
msgid "Creating new bug..."
msgstr "ΔημιουÏγία νέας αναφοÏάς σφάλματος..."
-#: ../lib/Plugins/Bugzilla.cpp:510
+#: ../lib/Plugins/Bugzilla.cpp:497
msgid "Logging out..."
msgstr "ΑποσÏνδεση..."
@@ -486,39 +503,44 @@ msgstr "Εκκίνηση δημιουÏγίας αναφοÏάς..."
msgid "Skipping debuginfo installation"
msgstr "ΠαÏάκαμψη εγκατάστασης debuginfo "
-#: ../lib/Plugins/KerneloopsReporter.cpp:103
+#: ../lib/Plugins/KerneloopsReporter.cpp:102
msgid "Creating and submitting a report..."
msgstr "ΔημιουÏγία και υποβολή αναφοÏάς..."
-#: ../lib/Plugins/Logger.cpp:59
+#: ../lib/Plugins/Logger.cpp:57
#: ../lib/Plugins/Mailx.cpp:124
msgid "Creating a report..."
msgstr "ΔημιουÏγία αναφοÏάς..."
-#: ../lib/Plugins/RunApp.cpp:62
+#: ../lib/Plugins/RunApp.cpp:64
msgid "Executing RunApp plugin..."
msgstr "Εκτέλεση Ï€Ïόσθετης λειτουÏγίας RunApp..."
#: ../lib/Plugins/FileTransfer.cpp:63
-#: ../lib/Plugins/FileTransfer.cpp:408
+#: ../lib/Plugins/FileTransfer.cpp:381
msgid "FileTransfer: URL not specified"
msgstr "ΜεταφοÏά αÏχείου: Δεν έχει καθοÏιστεί URL"
-#: ../lib/Plugins/FileTransfer.cpp:80
+#: ../lib/Plugins/FileTransfer.cpp:67
#, c-format
-msgid "Sending archive %s via %s"
-msgstr "Αποστολή αÏχείου %s μέσω %s"
+msgid "Sending archive %s to %s"
+msgstr "Αποστολή αÏχείου %s στο %s"
-#: ../lib/Plugins/FileTransfer.cpp:335
+#: ../lib/Plugins/FileTransfer.cpp:309
msgid "File Transfer: Creating a report..."
msgstr "ΜεταφοÏά αÏχείου: ΔημιουÏγία αναφοÏάς..."
-#: ../lib/Plugins/FileTransfer.cpp:357
-#: ../lib/Plugins/FileTransfer.cpp:385
-msgid "CFileTransfer::Run(): Cannot create and send an archive: "
-msgstr "CFileTransfer::Run(): Αδυναμία δημιουÏγίας και αποστολής αÏχείου: "
+#: ../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:81
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "ΔημιουÏγία αναφοÏών κατάÏÏευσης kernel oops..."
@@ -526,15 +548,19 @@ msgstr "ΔημιουÏγία αναφοÏών κατάÏÏευσης kernel oops
msgid "Sending an email..."
msgstr "Αποστολή ενός email..."
-#: ../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"
+#~ msgid "gtk-refresh"
+#~ msgstr "gtk-refresh"
+
diff --git a/po/es.po b/po/es.po
index 56c77c1f..293101f7 100644
--- a/po/es.po
+++ b/po/es.po
@@ -7,9 +7,9 @@ msgid ""
msgstr ""
"Project-Id-Version: abrt.master.es\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-24 00:40+0000\n"
-"PO-Revision-Date: 2009-10-24 00:28-0300\n"
-"Last-Translator: Claudio Rodrigo Pereyra Diaz <claudio@pereyradiaz.com.ar>\n"
+"POT-Creation-Date: 2009-11-10 09:32+0000\n"
+"PO-Revision-Date: 2009-11-10 08: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"
"Content-Type: text/plain; charset=UTF-8\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 " "
@@ -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:4
msgid "Report"
msgstr "Informe"
@@ -156,8 +157,8 @@ msgid "Date"
msgstr "Fecha"
#: ../src/Gui/CCMainWindow.py:91
-msgid "Crash Rate"
-msgstr "Tasa de caídas"
+msgid "Crash count"
+msgstr "Cantidad de caídas"
#: ../src/Gui/CCMainWindow.py:93
msgid "User"
@@ -222,11 +223,31 @@ msgstr ""
msgid "Error getting the report: %s"
msgstr "Error al obtener el informe: %s"
-#: ../src/Gui/CCReporterDialog.py:167
+#: ../src/Gui/CCReporterDialog.py:177
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:219
+#, 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:221
+msgid "The bactrace is unusable, you can't report this!"
+msgstr "¡El trazado es inútil, no puede informar esto!"
+
+#: ../src/Gui/CCReporterDialog.py:227
+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:272
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
@@ -264,24 +285,17 @@ 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
-msgid "Send"
-msgstr "Enviar"
-
-# 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"
+msgid "How to reproduce (in a few simple steps)"
+msgstr "Como reproducirlo (en unos pocos y simples pasos)"
-# NO TRADUCIR, hacen referencia al boton gkt
#: ../src/Gui/report.glade.h:5
-msgid "gtk-refresh"
-msgstr "gtk-refresh"
+msgid "Send"
+msgstr "Enviar"
#: ../src/Gui/SettingsDialog.py:33
#: ../src/Gui/SettingsDialog.py:50
@@ -398,6 +412,11 @@ 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-close"
@@ -407,17 +426,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 "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"
@@ -425,45 +444,41 @@ msgstr "El servicio ABRT no se está ejecutando"
msgid "Warning"
msgstr "Aviso"
-#: ../src/Daemon/Daemon.cpp:542
+#: ../src/Daemon/Daemon.cpp:519
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:240
#, 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:302
+#, c-format
+msgid "New bug id: %i"
+msgstr "Nuevo id del error: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:395
msgid "Checking for duplicates..."
msgstr "Chequeando si hay duplicados..."
-#: ../lib/Plugins/Bugzilla.cpp:402
-#: ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:398
msgid "Logging into bugzilla..."
msgstr "Ingresando a bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:402
+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:408
msgid "Checking CC..."
msgstr "Chequeando CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:417
msgid "Creating new bug..."
msgstr "Creando un nuevo informe..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:421
msgid "Logging out..."
msgstr "Saliendo..."
@@ -471,69 +486,74 @@ msgstr "Saliendo..."
msgid "Getting local universal unique identification"
msgstr "Obteniendo la identificación única universal local"
-#: ../lib/Plugins/CCpp.cpp:246
+#: ../lib/Plugins/CCpp.cpp:254
msgid "Getting backtrace..."
msgstr "Obteniendo el backtrace..."
-#: ../lib/Plugins/CCpp.cpp:532
-#: ../lib/Plugins/CCpp.cpp:657
+#: ../lib/Plugins/CCpp.cpp:552
+#: ../lib/Plugins/CCpp.cpp:679
msgid "Searching for debug-info packages..."
msgstr "Buscando paquetes de información del depurador..."
-#: ../lib/Plugins/CCpp.cpp:594
-#: ../lib/Plugins/CCpp.cpp:690
+#: ../lib/Plugins/CCpp.cpp:614
+#: ../lib/Plugins/CCpp.cpp:713
msgid "Downloading and installing debug-info packages..."
msgstr "Descargando e instalando paquetes de información del depurador..."
-#: ../lib/Plugins/CCpp.cpp:733
+#: ../lib/Plugins/CCpp.cpp:818
msgid "Getting local universal unique identification..."
msgstr "Obteniendo la identificación única universal local..."
-#: ../lib/Plugins/CCpp.cpp:752
+#: ../lib/Plugins/CCpp.cpp:837
msgid "Getting global universal unique identification..."
msgstr "Obteniendo la identificación única universal global..."
-#: ../lib/Plugins/CCpp.cpp:797
+#: ../lib/Plugins/CCpp.cpp:882
msgid "Starting report creation..."
msgstr "Iniciando la creación del informe..."
-#: ../lib/Plugins/CCpp.cpp:828
+#: ../lib/Plugins/CCpp.cpp:912
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 "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/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:79
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "Creando un informe de cuelgue de kernel oops..."
@@ -541,63 +561,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 "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"
-
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 3adf27e0..2831bfd0 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -1,21 +1,25 @@
+# translation of abrt.master.po to Dutch
# abrt translation to Dutc.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
-# Geert Warrink <geert.warrink@onsnet.nu>, 2009.
#
+#: ../src/Gui/CCReporterDialog.py:191
+# Geert Warrink <geert.warrink@onsnet.nu>, 2009.
+# Richard van der Luit <nippur@fedoraproject.org>, 2009.
msgid ""
msgstr ""
-"Project-Id-Version: abrt\n"
+"Project-Id-Version: abrt.master\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-23 09:49+0000\n"
-"PO-Revision-Date: 2009-10-23 17:28+0200\n"
-"Last-Translator: Geert Warrink <geert.warrink@onsnet.nu>\n"
-"Language-Team: nl <nl@li.org>\n"
+"POT-Creation-Date: 2009-11-11 09:31+0000\n"
+"PO-Revision-Date: 2009-11-11 13:12+0100\n"
+"Last-Translator: Richard van der Luit <nippur@fedoraproject.org>\n"
+"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#: ../src/Gui/ABRTExceptions.py:6
msgid "Another client is already running, trying to wake it."
@@ -23,8 +27,7 @@ msgstr "Andere client draait al, probeer het te wekken."
#: ../src/Gui/ABRTExceptions.py:13
msgid "Got unexpected data from daemon (is the database properly updated?)."
-msgstr ""
-"Kreeg niet verwachte data van daemon (is de database correct vernieuwd?)."
+msgstr "Kreeg niet verwachte data van daemon (is de database correct vernieuwd?)."
#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
@@ -62,7 +65,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 " "
@@ -98,7 +101,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:4
msgid "Report"
msgstr "Rapport"
@@ -164,8 +167,8 @@ msgid "Date"
msgstr "Datum"
#: ../src/Gui/CCMainWindow.py:91
-msgid "Crash Rate"
-msgstr "Crash rate"
+msgid "Crash count"
+msgstr "Crash count"
#: ../src/Gui/CCMainWindow.py:93
msgid "User"
@@ -230,11 +233,36 @@ msgstr ""
msgid "Error getting the report: %s"
msgstr "Fout tijdens het verkrijgen van het rapport: %s"
-#: ../src/Gui/CCReporterDialog.py:167
+#: ../src/Gui/CCReporterDialog.py:177
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:219
+#, 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 uitgeschakeld 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 te hergenereren."
+
+#: ../src/Gui/CCReporterDialog.py:221
+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:227
+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:272
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive "
@@ -271,21 +299,17 @@ 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
-msgid "Send"
-msgstr "Verzenden"
-
-#: ../src/Gui/report.glade.h:4 ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
+msgid "How to reproduce (in a few simple steps)"
+msgstr "Hoe het te herhalen (in een paar simpele stappen)"
#: ../src/Gui/report.glade.h:5
-msgid "gtk-refresh"
-msgstr "gtk-refresh"
+msgid "Send"
+msgstr "Verzenden"
#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
@@ -399,6 +423,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"
@@ -407,16 +435,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"
@@ -424,7 +452,7 @@ msgstr "ABRT service draait niet"
msgid "Warning"
msgstr "Waarschuwing"
-#: ../src/Daemon/Daemon.cpp:542
+#: ../src/Daemon/Daemon.cpp:520
msgid ""
"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
"value in abrt.conf."
@@ -432,40 +460,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:209
#, 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:271
+#, c-format
+msgid "New bug id: %i"
+msgstr "Nieuwe bug id: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:364
msgid "Checking for duplicates..."
msgstr "Controleren voor dubbele..."
-#: ../lib/Plugins/Bugzilla.cpp:402 ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:367
msgid "Logging into bugzilla..."
msgstr "Inloggen bij bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:371
+msgid "Empty login and password. Please check Bugzilla.conf"
+msgstr "Leeg login en wachtwoord. Check a.u.b. Bugzilla.conf"
+
+#: ../lib/Plugins/Bugzilla.cpp:377
msgid "Checking CC..."
msgstr "Controleren van CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:386
msgid "Creating new bug..."
msgstr "Nieuwe bug aanmaken..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:390
msgid "Logging out..."
msgstr "Uitloggen..."
@@ -473,64 +498,70 @@ msgstr "Uitloggen..."
msgid "Getting local universal unique identification"
msgstr "Verkrijgen van locale universele unieke identificatie"
-#: ../lib/Plugins/CCpp.cpp:246
+#: ../lib/Plugins/CCpp.cpp:254
msgid "Getting backtrace..."
msgstr "Backtrace ophalen..."
-#: ../lib/Plugins/CCpp.cpp:532 ../lib/Plugins/CCpp.cpp:657
+#: ../lib/Plugins/CCpp.cpp:552 ../lib/Plugins/CCpp.cpp:679
msgid "Searching for debug-info packages..."
msgstr "Zoeken naar debug-info pakketten..."
-#: ../lib/Plugins/CCpp.cpp:594 ../lib/Plugins/CCpp.cpp:692
+#: ../lib/Plugins/CCpp.cpp:614 ../lib/Plugins/CCpp.cpp:713
msgid "Downloading and installing debug-info packages..."
msgstr "Downloaden en installeren van debug-info pakketten..."
-#: ../lib/Plugins/CCpp.cpp:735
+#: ../lib/Plugins/CCpp.cpp:818
msgid "Getting local universal unique identification..."
msgstr "Verkrijgen van locale universele unieke identificatie..."
-#: ../lib/Plugins/CCpp.cpp:754
+#: ../lib/Plugins/CCpp.cpp:837
msgid "Getting global universal unique identification..."
msgstr "Verkrijgen van golbale universele unieke identificatie..."
-#: ../lib/Plugins/CCpp.cpp:799
+#: ../lib/Plugins/CCpp.cpp:882
msgid "Starting report creation..."
msgstr "Beginnen met rapport aanmaken..."
-#: ../lib/Plugins/CCpp.cpp:830
+#: ../lib/Plugins/CCpp.cpp:912
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:65 ../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:384
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..."
@@ -538,81 +569,16 @@ 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 "Check CC and add coment +1..."
-#~ msgstr "Controleer CC en voeg commentaar toe +1..."
-
-#~ msgid "Creating an archive..."
-#~ msgstr "Aanmaken van een archief..."
-
-#~ msgid "Pending events: %i"
-#~ msgstr "Gebeurtenissen in behandeling: %i"
-
-#~ msgid "Can't create menu from the description, popup won't be available!\n"
-#~ msgstr ""
-#~ "Kan geen menu maken van de beschrijving, pop-up zal niet beschikbaar "
-#~ "zijn!\n"
-
-#~ msgid "Getting local/global universal unique identification..."
-#~ msgstr "Verkrijgen van locale/globale universele unieke identificatie..."
-
-#~ msgid ""
-#~ "Error while opening plugin settings UI: \n"
-#~ "\n"
-#~ "%s"
-#~ msgstr ""
-#~ "Fout tijdens het openen van plugin instellingen UI: \n"
-#~ "\n"
-#~ "%s"
-
-#~ msgid "unknown response from settings dialog"
-#~ msgstr "onbekende reactie van de instellingen dialoog"
-
-#~ msgid "Applet is already running."
-#~ msgstr "Applet draait al."
-
-#~ msgid ""
-#~ "This is default handler, you should register your own with "
-#~ "ConnectCrashHandler"
-#~ msgstr ""
-#~ "Dit is de standaard afhandeling, je moet je eigen registreren bij "
-#~ "ConnectCrashHandler"
-
-#~ msgid ""
-#~ "This is default handler, you should register your own with "
-#~ "ConnectQuotaExceedHandler"
-#~ msgstr ""
-#~ "Dit is de standaard afhandeling, je moet jouw eigen registreren met "
-#~ "ConnectQuotaExceedHandler"
-
-#~ msgid "Out of memory"
-#~ msgstr "Geen geheugen beschikbaar"
-
-#~ msgid "Can't load gui description for SettingsDialog!"
-#~ msgstr "Kan gui beschrijving voor SettingsDialog niet laden!"
-
-#~ msgid "Name"
-#~ msgstr "Naam"
-
-#~ msgid "Enabled"
-#~ msgstr "Aangezet"
-
-#~ msgid "Can't get plugin description"
-#~ msgstr "Kan plugin beschrijving niet krijgen."
-
-#~ msgid "Logging failed, trying to find a bug..."
-#~ msgstr "Inloggen mislukte, probeer het probleem te vinden..."
-
-#~ msgid "Daemon is not running."
-#~ msgstr "Daemon draait niet."
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 74f9eedc..a27f0811 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -2,12 +2,13 @@
# Piotr DrÄ…g <piotrdrag@gmail.com>, 2009.
# Tomasz Chrzczonowicz <chrzczonowicz@gmail.com>, 2009.
#
+#: ../src/Gui/CCReporterDialog.py:191
msgid ""
msgstr ""
"Project-Id-Version: pl\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-22 15:21+0000\n"
-"PO-Revision-Date: 2009-10-22 17:24+0200\n"
+"POT-Creation-Date: 2009-11-09 23:17+0000\n"
+"PO-Revision-Date: 2009-11-10 00:19+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"
@@ -60,7 +61,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 " "
@@ -96,7 +97,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:4
msgid "Report"
msgstr "Zgłoś"
@@ -164,8 +165,8 @@ msgid "Date"
msgstr "Data"
#: ../src/Gui/CCMainWindow.py:91
-msgid "Crash Rate"
-msgstr "Częstotliwość awarii"
+msgid "Crash count"
+msgstr "Liczba awarii"
#: ../src/Gui/CCMainWindow.py:93
msgid "User"
@@ -230,13 +231,38 @@ msgstr ""
msgid "Error getting the report: %s"
msgstr "BÅ‚Ä…d podczas uzyskiwania raportu: %s"
-#: ../src/Gui/CCReporterDialog.py:167
+#: ../src/Gui/CCReporterDialog.py:177
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:211
+#: ../src/Gui/CCReporterDialog.py:219
+#, 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:221
+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:227
+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:272
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive "
@@ -274,21 +300,19 @@ 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
-msgid "Send"
-msgstr "Wyślij"
-
-#: ../src/Gui/report.glade.h:4 ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
+msgid "How to reproduce (in a few simple steps)"
+msgstr ""
+"Jak ponownie wywołać tę awarię (w kilku prostych krokach, w języku "
+"angielskim)"
#: ../src/Gui/report.glade.h:5
-msgid "gtk-refresh"
-msgstr "gtk-refresh"
+msgid "Send"
+msgstr "Wyślij"
#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
@@ -402,6 +426,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"
@@ -410,16 +438,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"
@@ -427,7 +455,7 @@ msgstr "Usługa ABRT nie jest uruchomiona"
msgid "Warning"
msgstr "Ostrzeżenie"
-#: ../src/Daemon/Daemon.cpp:542
+#: ../src/Daemon/Daemon.cpp:519
msgid ""
"Report size exceeded the quota. Please check system's MaxCrashReportsSize "
"value in abrt.conf."
@@ -435,40 +463,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:240
#, 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:302
+#, c-format
+msgid "New bug id: %i"
+msgstr "Identyfikator nowego błędu: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:395
msgid "Checking for duplicates..."
msgstr "Sprawdzanie duplikatów..."
-#: ../lib/Plugins/Bugzilla.cpp:402 ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:398
msgid "Logging into bugzilla..."
msgstr "Logowanie do Bugzilli..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:402
+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:408
msgid "Checking CC..."
msgstr "Sprawdzanie listy CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:417
msgid "Creating new bug..."
msgstr "Dodawanie nowego błędu..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:421
msgid "Logging out..."
msgstr "Wylogowywanie..."
@@ -476,64 +501,70 @@ msgstr "Wylogowywanie..."
msgid "Getting local universal unique identification"
msgstr "Uzyskiwanie lokalnego uniwersalnego, unikalnego identyfikatora"
-#: ../lib/Plugins/CCpp.cpp:244
+#: ../lib/Plugins/CCpp.cpp:254
msgid "Getting backtrace..."
msgstr "Uzyskiwanie wyjÄ…tku..."
-#: ../lib/Plugins/CCpp.cpp:530 ../lib/Plugins/CCpp.cpp:655
+#: ../lib/Plugins/CCpp.cpp:552 ../lib/Plugins/CCpp.cpp:679
msgid "Searching for debug-info packages..."
msgstr "Wyszukiwanie pakietów debuginfo..."
-#: ../lib/Plugins/CCpp.cpp:592 ../lib/Plugins/CCpp.cpp:690
+#: ../lib/Plugins/CCpp.cpp:614 ../lib/Plugins/CCpp.cpp:713
msgid "Downloading and installing debug-info packages..."
msgstr "Pobieranie i instalowanie pakietów debuginfo..."
-#: ../lib/Plugins/CCpp.cpp:733
+#: ../lib/Plugins/CCpp.cpp:818
msgid "Getting local universal unique identification..."
msgstr "Uzyskiwanie lokalnego uniwersalnego, unikalnego identyfikatora..."
-#: ../lib/Plugins/CCpp.cpp:752
+#: ../lib/Plugins/CCpp.cpp:837
msgid "Getting global universal unique identification..."
msgstr "Uzyskiwanie globalnego uniwersalnego, unikalnego identyfikatora..."
-#: ../lib/Plugins/CCpp.cpp:797
+#: ../lib/Plugins/CCpp.cpp:882
msgid "Starting report creation..."
msgstr "Uruchamianie tworzenia raportu..."
-#: ../lib/Plugins/CCpp.cpp:828
+#: ../lib/Plugins/CCpp.cpp:912
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\""
@@ -541,14 +572,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 7acb7222..2c3741d6 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-28 21:05+0000\n"
+"POT-Creation-Date: 2009-11-09 20:50+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: Rui Gouveia <rui.gouveia@globaltek.pt>\n"
"Language-Team: PT <fedora-trans-pt@redhat.com>\n"
@@ -59,6 +59,7 @@ msgstr ""
"Debuginfo está em falta?"
#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -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:4
msgid "Report"
msgstr "Relatório"
@@ -148,8 +149,8 @@ msgid "Date"
msgstr "Data"
#: ../src/Gui/CCMainWindow.py:91
-msgid "Crash Rate"
-msgstr "Taxa de Crash"
+msgid "Crash count"
+msgstr "Contagem de crashes"
#: ../src/Gui/CCMainWindow.py:93
msgid "User"
@@ -214,11 +215,30 @@ msgstr ""
msgid "Error getting the report: %s"
msgstr "Erro ao obter o relatório: %s"
-#: ../src/Gui/CCReporterDialog.py:167
+#: ../src/Gui/CCReporterDialog.py:177
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:211
+#: ../src/Gui/CCReporterDialog.py:219
+#, 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:221
+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:227
+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:272
#, python-format
msgid ""
"<b>WARNING</b>, you're about to send data which might contain sensitive information.\n"
@@ -255,22 +275,17 @@ 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
-msgid "Send"
-msgstr "Enviar"
-
-#: ../src/Gui/report.glade.h:4
-#: ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
+msgid "How to reproduce (in a few simple steps)"
+msgstr "Como reproduzir (em poucos passos simples)"
#: ../src/Gui/report.glade.h:5
-msgid "gtk-refresh"
-msgstr "gtk-refresh"
+msgid "Send"
+msgstr "Enviar"
#: ../src/Gui/SettingsDialog.py:33
#: ../src/Gui/SettingsDialog.py:50
@@ -385,6 +400,10 @@ msgstr "Sítio Web:"
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"
@@ -393,17 +412,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"
@@ -411,44 +430,41 @@ msgstr "O serviço ABRT não está a correr"
msgid "Warning"
msgstr "Aviso"
-#: ../src/Daemon/Daemon.cpp:542
+#: ../src/Daemon/Daemon.cpp:519
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:234
-msgid "Bug is already reported: "
-msgstr "Erro já foi reportado: "
-
-#: ../lib/Plugins/Bugzilla.cpp:296
+#: ../lib/Plugins/Bugzilla.cpp:240
#, 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:377
-msgid "New bug id: "
-msgstr "Criar novo ID de erro: "
+#: ../lib/Plugins/Bugzilla.cpp:302
+#, c-format
+msgid "New bug id: %i"
+msgstr "Novo ID de erro: %i"
-#: ../lib/Plugins/Bugzilla.cpp:422
+#: ../lib/Plugins/Bugzilla.cpp:395
msgid "Checking for duplicates..."
msgstr "A procurar por duplicados..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:398
msgid "Logging into bugzilla..."
msgstr "A iniciar sessão no bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:429
+#: ../lib/Plugins/Bugzilla.cpp:402
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:435
+#: ../lib/Plugins/Bugzilla.cpp:408
msgid "Checking CC..."
msgstr "A verificar CC..."
-#: ../lib/Plugins/Bugzilla.cpp:444
+#: ../lib/Plugins/Bugzilla.cpp:417
msgid "Creating new bug..."
msgstr "A criar novo erro..."
-#: ../lib/Plugins/Bugzilla.cpp:448
+#: ../lib/Plugins/Bugzilla.cpp:421
msgid "Logging out..."
msgstr "A Terminar Sessão..."
@@ -456,69 +472,74 @@ msgstr "A Terminar Sessão..."
msgid "Getting local universal unique identification"
msgstr "A obter identificador único universal local"
-#: ../lib/Plugins/CCpp.cpp:246
+#: ../lib/Plugins/CCpp.cpp:254
msgid "Getting backtrace..."
msgstr "A obter dados do processo..."
-#: ../lib/Plugins/CCpp.cpp:532
-#: ../lib/Plugins/CCpp.cpp:657
+#: ../lib/Plugins/CCpp.cpp:552
+#: ../lib/Plugins/CCpp.cpp:679
msgid "Searching for debug-info packages..."
msgstr "A pesquisar por pacotes debug-info..."
-#: ../lib/Plugins/CCpp.cpp:594
-#: ../lib/Plugins/CCpp.cpp:690
+#: ../lib/Plugins/CCpp.cpp:614
+#: ../lib/Plugins/CCpp.cpp:713
msgid "Downloading and installing debug-info packages..."
msgstr "A transferir e instalar pacotes debug-info..."
-#: ../lib/Plugins/CCpp.cpp:733
+#: ../lib/Plugins/CCpp.cpp:818
msgid "Getting local universal unique identification..."
msgstr "A obter identificador único universal local..."
-#: ../lib/Plugins/CCpp.cpp:752
+#: ../lib/Plugins/CCpp.cpp:837
msgid "Getting global universal unique identification..."
msgstr "A obter identificador único universal global..."
-#: ../lib/Plugins/CCpp.cpp:797
+#: ../lib/Plugins/CCpp.cpp:882
msgid "Starting report creation..."
msgstr "A iniciar a criação do relatório..."
-#: ../lib/Plugins/CCpp.cpp:828
+#: ../lib/Plugins/CCpp.cpp:912
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:408
+#: ../lib/Plugins/FileTransfer.cpp:381
msgid "FileTransfer: URL not specified"
msgstr "FileTransfer: URL não especificado"
-#: ../lib/Plugins/FileTransfer.cpp:80
+#: ../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:335
+#: ../lib/Plugins/FileTransfer.cpp:309
msgid "File Transfer: Creating a report..."
msgstr "Transferência de Ficheiro: A criar relatório..."
-#: ../lib/Plugins/FileTransfer.cpp:357
-#: ../lib/Plugins/FileTransfer.cpp:385
-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..."
@@ -526,18 +547,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 58cb4aca..6a77a961 100644
--- a/po/pt_BR.po
+++ b/po/pt_BR.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: ABRT\n"
"Report-Msgid-Bugs-To: jmoskovc@redhat.com\n"
-"POT-Creation-Date: 2009-10-24 00:40+0000\n"
-"PO-Revision-Date: 2009-10-22 17:49-0300\n"
+"POT-Creation-Date: 2009-11-09 23:24+0000\n"
+"PO-Revision-Date: 2009-11-10 00:46-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"
@@ -23,9 +23,7 @@ msgstr "Outro cliente já está em execução, tentando acordá-lo."
#: ../src/Gui/ABRTExceptions.py:13
msgid "Got unexpected data from daemon (is the database properly updated?)."
-msgstr ""
-"Dados inesperados obtidos do daemon (o banco de dados está devidamente "
-"atualizado?)."
+msgstr "Dados inesperados obtidos do daemon (o banco de dados está devidamente atualizado?)."
#: ../src/Gui/ABRTPlugin.py:55
msgid "Analyzer plugins"
@@ -45,15 +43,15 @@ msgstr "Plugins de banco de dados"
#: ../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"
+msgstr "O nome do plugin não está definido, não é possível carregar as configurações dele"
-#: ../src/Gui/CCDBusBackend.py:74 ../src/Gui/CCDBusBackend.py:97
+#: ../src/Gui/CCDBusBackend.py:74
+#: ../src/Gui/CCDBusBackend.py:97
msgid "Can't connect to system dbus"
msgstr "Não foi possível conectar ao dbus do sistema"
-#: ../src/Gui/CCDBusBackend.py:100 ../src/Gui/CCDBusBackend.py:103
+#: ../src/Gui/CCDBusBackend.py:100
+#: ../src/Gui/CCDBusBackend.py:103
msgid "Please check if abrt daemon is running"
msgstr "Por favor, verifique se o daemon do abrt está em execução"
@@ -66,6 +64,7 @@ msgstr ""
"O debuginfo está faltando?"
#: ../src/Gui/ccgui.glade.h:1
+#: ../src/Gui/report.glade.h:1
msgid " "
msgstr " "
@@ -73,7 +72,8 @@ msgstr " "
msgid "(C) 2009 Red Hat, Inc."
msgstr "(C) 2009 Red Hat, Inc."
-#: ../src/Gui/ccgui.glade.h:3 ../src/Gui/CCMainWindow.py:244
+#: ../src/Gui/ccgui.glade.h:3
+#: ../src/Gui/CCMainWindow.py:244
msgid "<b>Not reported!</b>"
msgstr "<b>Não relatado!</b>"
@@ -101,37 +101,24 @@ msgstr "Por favor aguarde..."
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:4
msgid "Report"
msgstr "Relatar"
#: ../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 ""
-"Este programa é um software livre; você pode redistribuí-lo e/ou modificá-lo "
-"sob os termos da Licença Pública Geral GNU (GNU GPL) como publicada pela "
-"Free Software Foundation; tanto a versão 2 da Licença ou (a sua escolha) "
-"qualquer versão posterior.\n"
+"Este programa é um software livre; você pode redistribuí-lo e/ou modificá-lo sob os termos da Licença Pública Geral GNU (GNU GPL) como publicada pela Free Software Foundation; tanto a versão 2 da Licença ou (a sua escolha) qualquer versão posterior.\n"
"\n"
-"Este programa é distribuído na esperança de que será útil, mas SEM NENHUMA "
-"GARANTIA; até mesmo sem a garantia implícita de COMERCIALIZAÇÃO ou ADEQUAÇÃO "
-"A UM PROPÓSITO EM PARTICULAR. Veja a Licença Pública Geral GNU (GNU GPL) "
-"para mais detalhes.\n"
+"Este programa é distribuído na esperança de que será útil, mas SEM NENHUMA GARANTIA; até mesmo sem a garantia implícita de COMERCIALIZAÇÃO ou ADEQUAÇÃO A UM PROPÓSITO EM PARTICULAR. Veja a Licença Pública Geral GNU (GNU GPL) para mais detalhes.\n"
"\n"
-"Você deve ter recebido uma cópia da GNU General Public License (GPL) junto "
-"com este programa. Se não, acesse <http://www.gnu.org/licenses/>."
+"Você deve ter recebido uma cópia da GNU General Public License (GPL) junto com este programa. Se não, acesse <http://www.gnu.org/licenses/>."
#: ../src/Gui/ccgui.glade.h:16
msgid "Working..."
@@ -167,8 +154,8 @@ msgid "Date"
msgstr "Data"
#: ../src/Gui/CCMainWindow.py:91
-msgid "Crash Rate"
-msgstr "Taxa de travamento"
+msgid "Crash count"
+msgstr "Contagem de travamentos"
#: ../src/Gui/CCMainWindow.py:93
msgid "User"
@@ -198,8 +185,7 @@ msgid ""
"Error while loading the dumplist, please check if abrt daemon is running\n"
" %s"
msgstr ""
-"Erro ao carregar a lista de despejo, por favor, verifique se o daemon do "
-"abrt está em execução\n"
+"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:208
@@ -209,9 +195,7 @@ msgstr "Não foi possível obter o nome de usuário para o 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>Este travamento foi relatado, você pode localizar o(s) relatório(s) em:</"
-"b>\n"
+msgstr "<b>Este travamento foi relatado, você pode localizar o(s) relatório(s) em:</b>\n"
#: ../src/Gui/CCMainWindow.py:296
msgid ""
@@ -230,39 +214,56 @@ msgstr ""
"Falha no relato!\n"
"%s"
-#: ../src/Gui/CCMainWindow.py:333 ../src/Gui/CCMainWindow.py:360
+#: ../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:177
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:219
#, python-format
msgid ""
-"<b>WARNING</b>, you're about to send data which might contain sensitive "
-"information.\n"
+"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:221
+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:227
+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:272
+#, 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>AVISO</b>, você está prestes a enviar dados que podem conter informações "
-"delicadas.\n"
+"<b>AVISO</b>, você está prestes a enviar dados que podem conter informações delicadas.\n"
"Você realmente deseja enviar o <b>%s</b>?\n"
#: ../src/Gui/dialogs.glade.h:1
msgid "Report done"
msgstr "Relato concluído"
-#: ../src/Gui/dialogs.glade.h:2 ../src/Gui/settings.glade.h:27
+#: ../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 ""
-"Não foi possível localizar o widget PluginDialog na descrição da interface "
-"de usuário!"
+msgstr "Não foi possível localizar o widget PluginDialog na descrição da interface de usuário!"
#. we shouldn't get here, but just to be safe
#: ../src/Gui/PluginSettingsUI.py:24
@@ -270,7 +271,8 @@ msgstr ""
msgid "No UI for plugin %s"
msgstr "Nenhuma interface de usuário para o plugin %s"
-#: ../src/Gui/PluginSettingsUI.py:55 ../src/Gui/PluginSettingsUI.py:81
+#: ../src/Gui/PluginSettingsUI.py:55
+#: ../src/Gui/PluginSettingsUI.py:81
msgid "combo box is not implemented"
msgstr "caixa de combinação não implementada"
@@ -278,23 +280,20 @@ 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
-msgid "Send"
-msgstr "Enviar"
-
-#: ../src/Gui/report.glade.h:4 ../src/Gui/settings.glade.h:25
-msgid "gtk-cancel"
-msgstr "gtk-cancel"
+msgid "How to reproduce (in a few simple steps)"
+msgstr "Como reproduzir (em alguns passos simples)"
#: ../src/Gui/report.glade.h:5
-msgid "gtk-refresh"
-msgstr "gtk-refresh"
+msgid "Send"
+msgstr "Enviar"
-#: ../src/Gui/SettingsDialog.py:33 ../src/Gui/SettingsDialog.py:50
+#: ../src/Gui/SettingsDialog.py:33
+#: ../src/Gui/SettingsDialog.py:50
msgid "<b>Select plugin</b>"
msgstr "<b>Selecionar plugin</b>"
@@ -406,6 +405,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"
@@ -414,16 +417,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"
@@ -431,48 +435,41 @@ msgstr "O serviço do ABRT não está em execução"
msgid "Warning"
msgstr "Aviso"
-#: ../src/Daemon/Daemon.cpp:542
-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."
+#: ../src/Daemon/Daemon.cpp:519
+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
-msgid "Bug is already reported: "
-msgstr "O erro já foi relatado: "
-
-#: ../lib/Plugins/Bugzilla.cpp:260
+#: ../lib/Plugins/Bugzilla.cpp:240
#, c-format
-msgid "Binary file %s will not be reported."
-msgstr "O arquivo binário %s não será relatado."
+msgid "Bug is already reported: %i"
+msgstr "O erro já foi relatado: %i"
-#: ../lib/Plugins/Bugzilla.cpp:330
-msgid "New bug id: "
-msgstr "Novo id do erro: "
+#: ../lib/Plugins/Bugzilla.cpp:302
+#, c-format
+msgid "New bug id: %i"
+msgstr "Novo id do erro: %i"
-#: ../lib/Plugins/Bugzilla.cpp:399
+#: ../lib/Plugins/Bugzilla.cpp:395
msgid "Checking for duplicates..."
msgstr "Verificando duplicatas..."
-#: ../lib/Plugins/Bugzilla.cpp:402 ../lib/Plugins/Bugzilla.cpp:413
+#: ../lib/Plugins/Bugzilla.cpp:398
msgid "Logging into bugzilla..."
msgstr "Autenticando no bugzilla..."
-#: ../lib/Plugins/Bugzilla.cpp:405
+#: ../lib/Plugins/Bugzilla.cpp:402
+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:408
msgid "Checking CC..."
msgstr "Verificando CC..."
-#: ../lib/Plugins/Bugzilla.cpp:425
+#: ../lib/Plugins/Bugzilla.cpp:417
msgid "Creating new bug..."
msgstr "Criando novo erro..."
-#: ../lib/Plugins/Bugzilla.cpp:430
+#: ../lib/Plugins/Bugzilla.cpp:421
msgid "Logging out..."
msgstr "Encerrando sessão..."
@@ -480,64 +477,74 @@ msgstr "Encerrando sessão..."
msgid "Getting local universal unique identification"
msgstr "Obtendo identificação universal local única"
-#: ../lib/Plugins/CCpp.cpp:246
+#: ../lib/Plugins/CCpp.cpp:254
msgid "Getting backtrace..."
msgstr "Obtendo backtrace..."
-#: ../lib/Plugins/CCpp.cpp:532 ../lib/Plugins/CCpp.cpp:657
+#: ../lib/Plugins/CCpp.cpp:552
+#: ../lib/Plugins/CCpp.cpp:679
msgid "Searching for debug-info packages..."
msgstr "Pesquisando por pacotes debug-info..."
-#: ../lib/Plugins/CCpp.cpp:594 ../lib/Plugins/CCpp.cpp:690
+#: ../lib/Plugins/CCpp.cpp:614
+#: ../lib/Plugins/CCpp.cpp:713
msgid "Downloading and installing debug-info packages..."
msgstr "Baixando e instalando pacotes debug-info..."
-#: ../lib/Plugins/CCpp.cpp:733
+#: ../lib/Plugins/CCpp.cpp:818
msgid "Getting local universal unique identification..."
msgstr "Obtendo identificação universal local única..."
-#: ../lib/Plugins/CCpp.cpp:752
+#: ../lib/Plugins/CCpp.cpp:837
msgid "Getting global universal unique identification..."
msgstr "Obtendo identificação universal global única..."
-#: ../lib/Plugins/CCpp.cpp:797
+#: ../lib/Plugins/CCpp.cpp:882
msgid "Starting report creation..."
msgstr "Iniciando a criação do relatório..."
-#: ../lib/Plugins/CCpp.cpp:828
+#: ../lib/Plugins/CCpp.cpp:912
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:57
+#: ../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:63
+#: ../lib/Plugins/FileTransfer.cpp:381
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:309
msgid "File Transfer: Creating a report..."
msgstr "File Transfer: Criando um 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 o pacote: "
+#: ../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 o pacote: %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 o pacote %s"
+
+#: ../lib/Plugins/KerneloopsScanner.cpp:84
msgid "Creating kernel oops crash reports..."
msgstr "Criando relatórios de oops do kernel no travamento..."
@@ -545,35 +552,35 @@ 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
-msgid "running sosreport: "
-msgstr "executando o sosreport: "
+#: ../lib/Plugins/SOSreport.cpp:122
+#, c-format
+msgid "running sosreport: %s"
+msgstr "executando o sosreport: %s"
-#: ../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"
#~ msgstr "Eventos pendentes: %i"
-
#~ msgid "Can't create menu from the description, popup won't be available!\n"
#~ msgstr ""
#~ "Não foi possível criar um menu a partir da descrição, a janela "
#~ "instantânea não estará disponível!\n"
-
#~ msgid "Creating an archive..."
#~ msgstr "Criando um pacote..."
-
#~ msgid "Getting local/global universal unique identification..."
#~ msgstr "Obtendo identificação universal local/global única..."
-
#~ msgid ""
#~ "Error while opening plugin settings UI: \n"
#~ "\n"
@@ -582,13 +589,10 @@ msgstr "Execução do sosreport realizada"
#~ "Erro ao abrir a interface de usuário das configurações do plugin: \n"
#~ "\n"
#~ "%s"
-
#~ msgid "unknown response from settings dialog"
#~ msgstr "resposta desconhecida do diálogo de configurações"
-
#~ msgid "Applet is already running."
#~ msgstr "O miniaplicativo já está em execução."
-
#~ msgid ""
#~ "This is default handler, you should register your own with "
#~ "ConnectCrashHandler"
@@ -603,23 +607,18 @@ msgstr "Execução do sosreport realizada"
#~ msgstr ""
#~ "Este é o manipulador padrão, você deve registrar o seu próprio com o "
#~ "ConnectCrashHandler"
-
#~ msgid "Out of memory"
#~ msgstr "Memória insuficiente"
-
#~ msgid "Can't load gui description for SettingsDialog!"
#~ msgstr ""
#~ "Não foi possível carregar a descrição da interface gráfica de usuário "
#~ "para o SettingsDialog!"
-
#~ msgid "Name"
#~ msgstr "Nome"
-
#~ msgid "Enabled"
#~ msgstr "Habilitado"
-
#~ msgid "Can't get plugin description"
#~ msgstr "Não foi possível obter a descrição do plugin"
-
#~ msgid "Daemon is not running."
#~ msgstr "O daemon não está em execução."
+
diff --git a/scripts/dbg_mkrpm b/scripts/dbg_mkrpm
index 28b040e5..e5f0fe97 100755
--- a/scripts/dbg_mkrpm
+++ b/scripts/dbg_mkrpm
@@ -23,5 +23,8 @@ rm -rf "$T" || exit
gzip "abrt-$ABRTVER".tar || exit
-
-./dbg_rpmbuildlocal -bb abrt.spec 2>&1 | tee -a "$0.log"
+# Less ugly way to pass exitcode (without bashisms)?
+{ ./dbg_rpmbuildlocal -bb abrt.spec 2>&1; echo $? >"EXITCODE"; } | tee -a "$0.log"
+ret=`cat EXITCODE`
+rm EXITCODE
+exit "$ret"
diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp
index 327e24f5..2eed556a 100644
--- a/src/Applet/Applet.cpp
+++ b/src/Applet/Applet.cpp
@@ -49,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__);
@@ -66,13 +65,17 @@ static void Crash(DBusMessage* signal)
// return;
// uid_t uid_num = atol(uid_str);
- char* endptr;
- int64_t uid_num = strtoll(uid_str,&endptr, 10);
-
- if ((uid_num != getuid()) && (uid_num != -1))
+ if (uid_str != NULL)
{
- return;
+ 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);
applet->SetIconTooltip(message, progname);
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 2483942d..ed7e3858 100644
--- a/src/Daemon/CommLayerServerDBus.cpp
+++ b/src/Daemon/CommLayerServerDBus.cpp
@@ -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);
@@ -273,12 +281,12 @@ static int handle_Report(DBusMessage* call, DBusMessage* reply)
report_status_t argout1;
try
{
- argout1 = Report(argin1, user_conf_data, 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);
@@ -307,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,
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 7afe4b6e..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;
@@ -157,7 +157,7 @@ void CCommLayerServerSocket::ProcessMessage(const std::string& pMessage, GIOChan
}
else
{
- warn_client("Received unknown message type.");
+ error_msg("Received unknown message type");
}
}
diff --git a/src/Daemon/CrashWatcher.cpp b/src/Daemon/CrashWatcher.cpp
index ad3f37ad..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,7 +161,7 @@ static void* create_report(void* arg)
}
catch (CABRTException& e)
{
- warn_client(e.what());
+ error_msg("%s", e.what());
}
catch (...) {}
set_client_name(NULL);
@@ -208,12 +206,12 @@ int CreateReportThread(const char* pUUID, const char* pUID, int force, const cha
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)
{
@@ -221,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 af4f9dc5..3ceab47c 100644
--- a/src/Daemon/Daemon.cpp
+++ b/src/Daemon/Daemon.cpp
@@ -19,6 +19,7 @@
#include <syslog.h>
#include <pthread.h>
+#include <resolv.h> /* res_init */
#include <string>
#include <limits.h>
#include <sys/inotify.h>
@@ -175,8 +176,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)
@@ -184,8 +186,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)
@@ -199,7 +202,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;
}
@@ -225,7 +229,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();
@@ -234,7 +238,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());
}
}
}
@@ -368,29 +372,29 @@ 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]);
+ VERB1 log("Saving %s into database", itt->c_str());
+ RunActionsAndReporters(crashinfo[CD_MWDDD][CD_CONTENT].c_str());
break;
case MW_IN_DB:
- VERB1 log("Already saved in database (%s)", itt->c_str());
+ VERB1 log("%s is already saved in database", itt->c_str());
break;
case MW_REPORTED:
case MW_OCCURED:
+ VERB1 log("Already saved crash %s, deleting", itt->c_str());
+ DeleteDebugDumpDir(itt->c_str());
+ break;
case MW_BLACKLISTED:
case MW_CORRUPTED:
case MW_PACKAGE_ERROR:
case MW_GPG_ERROR:
case MW_FILE_ERROR:
default:
-//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);
+ log("Corrupted or bad crash %s (res:%d), deleting", itt->c_str(), (int)res);
+ DeleteDebugDumpDir(itt->c_str());
break;
}
}
@@ -400,7 +404,7 @@ static void FindNewDumps(const char* pPath)
{
throw e;
}
- error_msg("%s", e.what().c_str());
+ error_msg("%s", e.what());
}
}
}
@@ -514,47 +518,33 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
) {
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 */
- if(crashinfo[CD_MWANALYZER][CD_CONTENT] == "Kerneloops")
- {
- // When Kerneloops comes it will be sent uid with -1
- // Applet will detected and show normal user
- g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], to_string("-1"));
- }
- else
- {
- 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 */
- if(crashinfo[CD_MWANALYZER][CD_CONTENT] == "Kerneloops")
{
- // When Kerneloops comes it will be sent uid with -1
- // Applet will detected and show normal user
- g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], to_string("-1"));
+ 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);
}
- else
- {
- g_pCommLayer->Crash(crashinfo[CD_PACKAGE][CD_CONTENT], crashinfo[CD_UID][CD_CONTENT]);
- }
- //DeleteDebugDumpDir(std::string(DEBUG_DUMPS_DIR) + "/" + name);
break;
case MW_BLACKLISTED:
case MW_CORRUPTED:
@@ -563,14 +553,14 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
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)
{
free(buf);
@@ -594,6 +584,8 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
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)
{
@@ -618,6 +610,33 @@ static void run_main_loop(GMainLoop* loop)
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);
@@ -795,7 +814,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
@@ -852,7 +871,7 @@ int main(int argc, char** argv)
}
catch (CABRTException& e)
{
- error_msg("Error: %s", e.what().c_str());
+ error_msg("Error: %s", e.what());
}
catch (std::exception& e)
{
diff --git a/src/Daemon/Makefile.am b/src/Daemon/Makefile.am
index 4365a0c9..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
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index e30a0048..0bc358e1 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;
@@ -98,7 +99,8 @@ static void DebugDumpToCrashReport(const std::string& pDebugDumpDir, map_crash_r
fileName,
CD_BIN,
CD_ISNOTEDITABLE,
- pDebugDumpDir + "/" + fileName);
+ concat_path_file(pDebugDumpDir, fileName.c_str())
+ );
}
else
{
@@ -137,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);
@@ -150,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);
@@ -164,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;
}
@@ -202,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))
{
@@ -215,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);
@@ -234,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;
}
@@ -253,24 +255,22 @@ 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;
@@ -278,24 +278,23 @@ void RunActionsAndReporters(const std::string& pDebugDumpDir)
{
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, plugin_settings, (*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());
}
}
}
@@ -315,11 +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")
+ 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 ||
@@ -343,7 +342,7 @@ static bool CheckReport(const map_crash_report_t& pCrashReport)
report_status_t Report(const map_crash_report_t& pCrashReport,
map_map_string_t& pSettings,
- const std::string& pUID)
+ const char *pUID)
{
report_status_t ret;
@@ -361,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());
}
}
@@ -434,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());
}
}
}
@@ -448,20 +446,19 @@ 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);
database->Connect();
- row = database->GetUUIDData(pUUID, pUID);
+ database_row_t row = database->GetUUIDData(pUUID, pUID);
database->Delete(pUUID, pUID);
database->DisConnect();
@@ -476,8 +473,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();
@@ -511,19 +508,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()))
@@ -543,7 +540,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;
@@ -552,19 +549,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;
@@ -575,13 +572,28 @@ static mw_result_t SavePackageDescriptionToDebugDump(const std::string& pExecuta
return MW_OK;
}
+bool analyzer_has_InformAllUsers(const char *analyzer_name)
+{
+ CAnalyzer* analyzer = g_pPluginManager->GetAnalyzer(analyzer_name);
+ if (!analyzer)
+ {
+ VERB1 log("Strange, asked for analyzer %s but it doesn't exist?", analyzer_name);
+ 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());
+}
+
/**
* Execute all action plugins, which are associated to
* particular analyzer plugin.
* @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())
@@ -595,13 +607,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());
}
}
}
@@ -618,20 +629,18 @@ 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;
CDatabase* database = g_pPluginManager->GetDatabase(g_settings_sDatabase);
- database_row_t row;
database->Connect();
database->Insert(pUUID, pUID, pDebugDumpDir, pTime);
- row = database->GetUUIDData(pUUID, pUID);
+ database_row_t row = database->GetUUIDData(pUUID, pUID);
database->DisConnect();
- res = GetCrashInfo(pUUID, pUID, pCrashInfo);
+ mw_result_t res = GetCrashInfo(pUUID, pUID, pCrashInfo);
if (row.m_sReported == "1")
{
log("Crash is already reported");
@@ -645,33 +654,23 @@ 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;
database->Connect();
- row = database->GetUUIDData(pUUID, pUID);
+ database_row_t row = database->GetUUIDData(pUUID, pUID);
database->DisConnect();
return row.m_sDebugDumpDir;
}
-mw_result_t SaveDebugDump(const std::string& 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;
std::string UID;
std::string time;
std::string analyzer;
std::string executable;
- mw_result_t res;
-
try
{
CDebugDump dd;
@@ -683,7 +682,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;
@@ -691,41 +690,41 @@ 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);
+ mw_result_t res = SavePackageDescriptionToDebugDump(executable.c_str(), pDebugDumpDir);
if (res != MW_OK)
{
return res;
}
- lUUID = GetLocalUUID(analyzer, pDebugDumpDir);
-
- return SaveDebugDumpToDatabase(lUUID, UID, time, pDebugDumpDir, pCrashInfo);
+ std::string lUUID = GetLocalUUID(analyzer.c_str(), pDebugDumpDir);
+ const char *uid_str = analyzer_has_InformAllUsers(analyzer.c_str())
+ ? "-1"
+ : UID.c_str();
+ return SaveDebugDumpToDatabase(lUUID.c_str(), uid_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);
- database_row_t row;
database->Connect();
- row = database->GetUUIDData(pUUID, pUID);
+ database_row_t row = database->GetUUIDData(pUUID, pUID);
database->DisConnect();
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);
@@ -733,13 +732,14 @@ mw_result_t GetCrashInfo(const std::string& pUUID,
}
catch (CABRTException& e)
{
- warn_client("GetCrashInfo(): " + e.what());
+ error_msg("%s", e.what());
if (e.type() == EXCEP_DD_LOAD)
{
return MW_FILE_ERROR;
}
return MW_ERROR;
}
+
add_crash_data_to_crash_info(pCrashInfo, CD_EXECUTABLE, executable);
add_crash_data_to_crash_info(pCrashInfo, CD_PACKAGE, package);
add_crash_data_to_crash_info(pCrashInfo, CD_DESCRIPTION, description);
@@ -755,7 +755,7 @@ mw_result_t GetCrashInfo(const std::string& pUUID,
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;
@@ -773,15 +773,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 c78d4d95..ac042def 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
@@ -94,7 +94,7 @@ void RunActionsAndReporters(const std::string& pDebugDumpDir);
*/
report_status_t Report(const map_crash_report_t& pCrashReport,
map_map_string_t& pSettings,
- const std::string& pUID);
+ const char *pUID);
/**
* Get debugdump direcotory. If debugdump is not found
* in database it will return empty string.
@@ -102,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
@@ -117,14 +117,8 @@ 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);
-/**
- * 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);
+std::string DeleteCrashInfo(const char *pUUID,
+ const char *pUID);
/**
* Saves debugdump into database. If saving is successful,
* it fills crash info.
@@ -132,7 +126,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,
@@ -142,8 +136,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
@@ -151,7 +145,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.
@@ -159,17 +153,18 @@ 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);
+bool analyzer_has_InformAllUsers(const char *analyzer_name);
#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..cefd35a4 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)
@@ -132,17 +132,17 @@ static void ParseCommon()
map_string_t::const_iterator end = s_mapSectionCommon.end();
if (it != end)
{
- g_settings_bOpenGPGCheck = it->second == "yes";
+ g_settings_bOpenGPGCheck = string_to_bool(it->second.c_str());
}
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 6070b74d..dc8e595d 100755
--- a/src/Daemon/abrt-debuginfo-install
+++ b/src/Daemon/abrt-debuginfo-install
@@ -80,22 +80,39 @@ 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
+print_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`
+ done
+}
+
+print_missing_debuginfos() {
+ 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
+ fi
+ test -f "/$file" && continue
+ echo -n "/$file "
+ done
+}
+
+cleanup_and_report_missing() {
+# Which debuginfo files are still missing, including those we just unpacked?
+ missing_build_ids=`print_missing_build_ids`
$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"
+ $debug || -rf "$tempdir"
fi
for missing in $missing_build_ids; do
@@ -105,6 +122,98 @@ cleanup_and_report_missing() {
test x"$missing_build_ids" != x"" && echo "`count_words $missing_build_ids` debuginfos can't be found"
}
+# $1: iteration (1,2...)
+print_package_names() {
+ # We'll run something like:
+ # yum --enablerepo='*debuginfo*' --quiet provides \
+ # /usr/lib/debug/.build-id/bb/11528d59940983f495e9cb099cafb0cb206051.debug \
+ # /usr/lib/debug/.build-id/c5/b84c0ad3676509dc30bfa7d42191574dac5b06.debug ...
+ local yumopts=""
+ if test x"$1" = x"1"; then
+ yumopts="-C"
+ echo "`count_words $missing_debuginfo_files` missing debuginfos, getting package list from cache" >&2
+ else
+ echo "`count_words $missing_debuginfo_files` missing debuginfos, getting package list" >&2
+ fi
+ local cmd="yum $yumopts --enablerepo='*debuginfo*' --quiet provides $missing_debuginfo_files 2>&1"
+ echo "$cmd" >"yum_provides.$1.OUT"
+ local yum_provides_OUT=`$cmd`
+ local err=$?
+ printf "%s\nexitcode:%s\n" "$yum_provides_OUT" $err >>"yum_provides.$1.OUT"
+ test $err = 0 || exit 2
+
+ # The output is pretty machine-unfriendly:
+ # glibc-debuginfo-2.10.90-24.x86_64 : Debug information for package glibc
+ # Repo : rawhide-debuginfo
+ # Matched from:
+ # Filename : /usr/lib/debug/.build-id/5b/c784c8d63f87dbdeb747a773940956a18ecd2f.debug
+ #
+ # 1:dbus-debuginfo-1.2.12-2.fc11.x86_64 : Debug information for package dbus
+ # Repo : updates-debuginfo
+ # Matched from:
+ # Filename : /usr/lib/debug/.build-id/bc/da7d09eb6c9ee380dae0ed3d591d4311decc31.debug
+ # Need to massage it a lot.
+ # There can be duplicates (one package may provide many debuginfos).
+ printf "%s\n" "$yum_provides_OUT" \
+ | grep -- -debuginfo- \
+ | sed 's/^[0-9]*://' \
+ | sed -e 's/ .*//' -e 's/:.*//' \
+ | sort | uniq | xargs
+}
+
+download_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)
+ # In this case, $f is the literal "*.rpm" string
+ test -f "$f" || exit 2
+ echo "Unpacking: $f"
+ echo "Processing: $f" >>unpack.OUT
+ rpm2cpio <"$f" 2>>unpack.OUT | cpio -id >>unpack.OUT 2>&1
+ done
+
+ # 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"
+
+ 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 Copying2 "$file" to "$cachedir/$file" >&2
+ cp --remove-destination "$file" "$cachedir/$file"
+ continue
+ fi
+ done
+ fi
+}
+
# eu-unstrip output example:
# 0x400000+0x209000 23c77451cf6adff77fc1f5ee2a01d75de6511dda@0x40024c - - [exe]
@@ -138,113 +247,39 @@ build_ids=`printf "%s\n" "$eu_unstrip_OUT" \
done | sort | uniq | xargs`
$debug && echo "build_ids:$build_ids"
-# Which debuginfo files are missing?
-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
- fi
- test -f "/$file" && continue
- echo -n "/$file "
-done`
-$debug && echo "missing_debuginfo_files:$missing_debuginfo_files"
-
-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 \
-# /usr/lib/debug/.build-id/bb/11528d59940983f495e9cb099cafb0cb206051.debug \
-# /usr/lib/debug/.build-id/c5/b84c0ad3676509dc30bfa7d42191574dac5b06.debug ...
-echo "Determining list of packages for `count_words $missing_debuginfo_files` missing debuginfos"
-yum_provides_OUT=`yum --enablerepo='*debuginfo*' --quiet provides $missing_debuginfo_files 2>&1`
-err=$?
-printf "%s\nexitcode:%s\n" "$yum_provides_OUT" $err >yum_provides.OUT
-test $err = 0 || exit 2
+# We try to not run yum without -C unless absolutely necessary.
+# Therefore we loop. yum is run by print_package_names function,
+# on first iteration it is run with -C, on second - without,
+# which usually causes yum to download updated filelists,
+# which in turn takes several minutes and annoys users.
+iter=0
+while true; do
+ : $((iter++))
+ test $iter -gt 2 && break
-# The output is pretty machine-unfriendly:
-# glibc-debuginfo-2.10.90-24.x86_64 : Debug information for package glibc
-# Repo : rawhide-debuginfo
-# Matched from:
-# Filename : /usr/lib/debug/.build-id/5b/c784c8d63f87dbdeb747a773940956a18ecd2f.debug
-#
-# 1:dbus-debuginfo-1.2.12-2.fc11.x86_64 : Debug information for package dbus
-# Repo : updates-debuginfo
-# Matched from:
-# Filename : /usr/lib/debug/.build-id/bc/da7d09eb6c9ee380dae0ed3d591d4311decc31.debug
-# Need to massage it a lot.
-# There can be duplicates (one package may provide many debuginfos).
-packages=`printf "%s\n" "$yum_provides_OUT" \
-| grep -- -debuginfo- \
-| sed 's/^[0-9]*://' \
-| sed -e 's/ .*//' -e 's/:.*//' \
-| sort | uniq | xargs`
-$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).
-if test x"$packages" = x""; then
- cleanup_and_report_missing
- exit 1
-fi
-
-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
+ # Analyze $build_ids and check which debuginfos are present
+ missing_debuginfo_files=`print_missing_debuginfos`
+ $debug && echo "missing_debuginfo_files:$missing_debuginfo_files"
-for f in *.rpm; do
- # Happens if no .rpm's were downloaded (yumdownloader problem)
- # In this case, $f is the literal "*.rpm" string
- test -f "$f" || exit 2
- echo "Unpacking: $f"
- echo "Processing: $f" >>unpack.OUT
- rpm2cpio <"$f" 2>>unpack.OUT | cpio -id >>unpack.OUT 2>&1
-done
+ if test x"$missing_debuginfo_files" = x""; then
+ break
+ fi
-# 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}
+ # Map $missing_debuginfo_files to package names.
+ # yum is run here.
+ packages=`print_package_names $iter`
+ $debug && echo "packages ($iter):$packages"
- file="usr/lib/debug/.build-id/$build_id1/$build_id2.debug"
+ # yum may return "" here if it found no packages (say, if coredump
+ # is from a new, unreleased package fresh from koji).
+ if test x"$packages" = x""; then
+ continue
+ fi
- 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 Copying2 "$file" to "$cachedir/$file" >&2
- cp --remove-destination "$file" "$cachedir/$file"
- continue
- fi
- done
-fi
-$debug && echo "missing_build_ids:$missing_build_ids"
+ num_packages=`count_words $packages`
+ echo "Downloading $num_packages packages"
+ download_packages
+done
cleanup_and_report_missing
diff --git a/src/Daemon/abrt.conf b/src/Daemon/abrt.conf
index a02cef44..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
+# Blacklisted packages
BlackList = nspluginwrapper
-# enabled plugins
-# there has to be exactly one database plugin
+# 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/Gui/CCMainWindow.py b/src/Gui/CCMainWindow.py
index d3a3abd0..31ebb410 100644
--- a/src/Gui/CCMainWindow.py
+++ b/src/Gui/CCMainWindow.py
@@ -88,7 +88,7 @@ class MainWindow():
columns[0] = gtk.TreeViewColumn(_("Package"))
columns[1] = gtk.TreeViewColumn(_("Application"))
columns[2] = gtk.TreeViewColumn(_("Date"))
- columns[3] = gtk.TreeViewColumn(_("Crash Rate"))
+ columns[3] = gtk.TreeViewColumn(_("Crash count"))
if os.getuid() == 0:
column = gtk.TreeViewColumn(_("User"))
columns.append(column)
diff --git a/src/Gui/CCReporterDialog.py b/src/Gui/CCReporterDialog.py
index 9207a3e5..61e65526 100644
--- a/src/Gui/CCReporterDialog.py
+++ b/src/Gui/CCReporterDialog.py
@@ -43,6 +43,10 @@ class ReporterDialog():
self.tvComment = self.wTree.get_widget("tvComment")
self.tvComment.connect("focus-in-event", self.on_comment_focus_cb)
self.comment_changed = False
+
+ # "how to reproduce" textview
+ self.tevHowToReproduce = self.wTree.get_widget("tevHowToReproduce")
+ self.how_to_changed = False
self.tvReport = self.wTree.get_widget("tvReport")
@@ -76,6 +80,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 with 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
@@ -180,6 +186,50 @@ class ReporterDialog():
self.tvComment.set_buffer(buff)
continue
+ if item == "How to reproduce":
+ buff = gtk.TextBuffer()
+ how_to_reproduce = _("")
+ try:
+ if self.report[item][CONTENT]:
+ how_to_reproduce = self.report[item][CONTENT]
+ self.how_to_changed = True
+ except Exception, e:
+ pass
+
+ buff.set_text(how_to_reproduce)
+
+ self.tevHowToReproduce.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':
@@ -200,11 +250,18 @@ class ReporterDialog():
self.report[rowe["item"]][CONTENT] = rowe["content"]
else:
del self.report[rowe["item"]]
+ # handle comment
if self.comment_changed:
buff = self.tvComment.get_buffer()
self.report["Comment"] = ['t', 'y', buff.get_text(buff.get_start_iter(),buff.get_end_iter())]
else:
del self.report["Comment"]
+ # handle how to reproduce
+ if self.how_to_changed:
+ buff = self.tevHowToReproduce.get_buffer()
+ self.report["How to reproduce"] = ['t', 'y', buff.get_text(buff.get_start_iter(),buff.get_end_iter())]
+ else:
+ del self.report["How to reproduce"]
def on_send_clicked(self, button):
#def on_apply_clicked(self, button, treeview):
diff --git a/src/Gui/report.glade b/src/Gui/report.glade
index 9b582b22..ce21acb1 100644
--- a/src/Gui/report.glade
+++ b/src/Gui/report.glade
@@ -13,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>
@@ -44,14 +46,78 @@
<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>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <child>
+ <widget class="GtkEventBox" id="eventbox2">
+ <property name="visible">True</property>
+ <child>
+ <widget class="GtkLabel" id="lHowToReproduce">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="ypad">2</property>
+ <property name="label" translatable="yes">How to reproduce (in a few simple steps)</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkScrolledWindow" id="scrolledwindow2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hscrollbar_policy">never</property>
+ <property name="vscrollbar_policy">automatic</property>
+ <child>
+ <widget class="GtkTextView" id="tevHowToReproduce">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="wrap_mode">word</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">2</property>
+ </packing>
+ </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>
@@ -91,7 +157,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">
@@ -100,7 +166,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>
@@ -108,12 +174,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>
@@ -121,6 +189,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>
@@ -133,6 +203,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/Hooks/CCpp.cpp b/src/Hooks/CCpp.cpp
index 1c152e6c..0f95d05b 100644
--- a/src/Hooks/CCpp.cpp
+++ b/src/Hooks/CCpp.cpp
@@ -188,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);
@@ -221,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)
{