Compare commits

..

21 commits

Author SHA1 Message Date
Jiri
ac0b82b71c fixed freeze in crashing python apps rhbz#808562 2012-04-18 12:32:47 +02:00
Jiri
2c0ac49ccc forgot to update the release 2011-12-08 15:08:43 +01:00
Jiri
f00c7c9410 added abrt-cli manpage, fixed weird number formatting when showing di size 2011-12-08 15:08:41 +01:00
Jiri
676fa8e740 build fixes + few forgotten patches 2011-12-08 15:08:37 +01:00
Jiri
cea4a8486c forgot to upload new sources 2011-12-08 15:08:31 +01:00
Jiri
a64b229001 new version 2.0.7 2011-12-08 15:08:24 +01:00
Jiri Moskovcak
a5252c6499 added forgotten patch 2011-11-05 19:35:51 +01:00
Jiri Moskovcak
65ce231304 glib 2.31 build fixes 2011-11-05 19:35:48 +01:00
Jiri Moskovcak
e22db9a896 added forgotten patch 2011-11-05 19:35:37 +01:00
Jiri Moskovcak
63df47a421 new version 2.0.6
Conflicts:

	.gitignore
2011-11-05 19:34:59 +01:00
root
7b75c9be44 rhbz#749603 - abrt-ccpp not enabled when upgrading from F15 to F16
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
2011-11-02 14:46:32 +01:00
Nikola Pajkovsky
384effe0df don't file bugs when kernel is tainted
Signed-off-by: Nikola Pajkovsky <npajkovs@redhat.com>
2011-10-07 13:56:35 +02:00
Jiri Moskovcak
36fa1d0a83 install abrt-retrace-client by default (required for livecds) 2011-10-03 10:55:54 +02:00
Jiri Moskovcak
88ee3acc47 abrt-desktop should require the retrace-client, so it can be used on livecd 2011-10-03 10:51:09 +02:00
Jiri Moskovcak
8f17954b1a forgot to push abrt-vmcore.init 2011-09-23 19:12:03 +02:00
Jiri Moskovcak
13858c6d43 updated to 2.0.4.981 2011-09-23 18:46:45 +02:00
Jiri Moskovcak
f893e2f57c update to 2.0.4.980 2011-09-23 12:53:12 +02:00
Jiri Moskovcak
b5d0d7c22c minor spec file fix 2011-09-13 16:00:04 +02:00
Jiri Moskovcak
1b2e1682bd fixed 2 segvs rhbz#737961 and /var/run/privs rhbz#725974 2011-09-13 15:49:22 +02:00
Jiri Moskovcak
8c03ba1f2e fixed update from abrt1 to abrt2 2011-09-13 12:50:39 +02:00
Jiri Moskovcak
c093412464 enabled bugzilla as a target for kerneloops rhbz#725970 2011-08-19 13:20:46 +02:00
17 changed files with 1988 additions and 1934 deletions

View file

@ -1 +0,0 @@
1

78
.gitignore vendored
View file

@ -9,81 +9,3 @@ abrt-1.1.13.tar.gz
/abrt-2.0.4.tar.gz
/abrt-2.0.6.tar.gz
/abrt-2.0.7.tar.gz
/abrt-2.0.9.tar.gz
/abrt-2.0.10.tar.gz
/abrt-2.0.11.tar.gz
/abrt-2.0.12.tar.gz
/abrt-2.0.13.tar.gz
/abrt-2.0.14.tar.gz
/abrt-2.0.15.tar.gz
/abrt-2.0.16.tar.gz
/abrt-2.0.17.tar.gz
/abrt-2.0.18.tar.gz
/abrt-2.0.19.tar.gz
/abrt-2.0.20.tar.gz
/abrt-2.1.0.tar.gz
/abrt-2.1.1.tar.gz
/abrt-2.1.2.tar.gz
/abrt-2.1.3.tar.gz
/abrt-2.1.4.tar.gz
/abrt-2.1.5.tar.gz
/abrt-2.1.6.tar.gz
/abrt-2.1.7.tar.gz
/abrt-2.1.8.tar.gz
/abrt-2.1.9.tar.gz
/abrt-2.1.10.tar.gz
/abrt-2.1.11.tar.gz
/abrt-2.1.12.tar.gz
/abrt-2.2.0.tar.gz
/abrt-2.2.1.tar.gz
/abrt-2.2.2.tar.gz
/abrt-2.3.0.tar.gz
/abrt-2.4.0.tar.gz
/abrt-2.5.0.tar.gz
/abrt-2.5.1.tar.gz
/abrt-2.6.0.tar.gz
/abrt-2.6.1.tar.gz
/abrt-2.6.2.tar.gz
/abrt-2.7.0.tar.gz
/abrt-2.7.1.tar.gz
/abrt-2.7.2.tar.gz
/abrt-2.8.0.tar.gz
/abrt-2.8.1.tar.gz
/abrt-2.8.2.tar.gz
/abrt-2.9.0.tar.gz
/abrt-2.10.0.tar.gz
/abrt-2.10.1.tar.gz
/abrt-2.10.2.tar.gz
/abrt-2.10.3.tar.gz
/abrt-2.10.4.tar.gz
/abrt-2.10.5.tar.gz
/abrt-2.10.6.tar.gz
/abrt-2.10.7.tar.gz
/abrt-2.10.8.tar.gz
/abrt-2.10.9.tar.gz
/abrt-2.10.10.tar.gz
/abrt-2.11.0.tar.gz
/abrt-2.11.1.tar.gz
/abrt-2.12.0.tar.gz
/abrt-2.12.1.tar.gz
/abrt-2.12.2.tar.gz
/abrt-2.13.0.tar.gz
/abrt-2.14.0.tar.gz
/abrt-2.14.1.tar.gz
/abrt-2.14.2.tar.gz
/abrt-2.14.3.tar.gz
/abrt-2.14.4.tar.gz
/abrt-2.14.5.tar.gz
/abrt-2.14.6.tar.gz
/abrt-2.15.0.tar.gz
/abrt-2.15.1.tar.gz
/abrt-2.16.0.tar.gz
/abrt-2.16.1.tar.gz
/abrt-2.17.0.tar.gz
/abrt-2.17.1.tar.gz
/abrt-2.17.2.tar.gz
/abrt-2.17.4.tar.gz
/abrt-2.17.5.tar.gz
/abrt-2.17.6.tar.gz
/abrt-2.17.7.tar.gz
/abrt-2.17.8.tar.gz

View file

@ -0,0 +1,70 @@
From f7d7f594dcd5439bc05187361d55be720f07959e Mon Sep 17 00:00:00 2001
Message-Id: <f7d7f594dcd5439bc05187361d55be720f07959e.1334151133.git.jmoskovc@redhat.com>
From: Jiri Moskovcak <jmoskovc@redhat.com>
Date: Wed, 11 Apr 2012 15:31:34 +0200
Subject: [PATCH] pyhook: add timetout to sockets rhbz#808562
---
src/hooks/abrt_exception_handler.py.in | 46 ++++++++++++++++++--------------
1 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/src/hooks/abrt_exception_handler.py.in b/src/hooks/abrt_exception_handler.py.in
index 9522a0f..cc00fc7 100644
--- a/src/hooks/abrt_exception_handler.py.in
+++ b/src/hooks/abrt_exception_handler.py.in
@@ -37,26 +37,32 @@ def write_dump(tb):
try:
import socket
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
- s.connect(@VAR_RUN@ + "/abrt/abrt.socket")
- s.sendall("PUT / HTTP/1.1\r\n\r\n")
- s.sendall("PID=%s\0" % os.getpid())
- s.sendall("EXECUTABLE=%s\0" % executable)
- s.sendall("ANALYZER=Python\0")
- s.sendall("BASENAME=pyhook\0")
- # This handler puts a short(er) crash descr in 1st line of the backtrace.
- # Example:
- # CCMainWindow.py:1:<module>:ZeroDivisionError: integer division or modulo by zero
- s.sendall("REASON=%s\0" % tb.splitlines()[0])
- s.sendall("BACKTRACE=%s\0" % tb)
- s.shutdown(socket.SHUT_WR)
-
- # Read the response and log if there's anything wrong
- response = ""
- while True:
- buf = s.recv(256)
- if not buf:
- break;
- response += buf
+ s.settimeout(5)
+ try:
+ s.connect(@VAR_RUN@ + "/abrt/abrt.socket")
+ s.sendall("PUT / HTTP/1.1\r\n\r\n")
+ s.sendall("PID=%s\0" % os.getpid())
+ s.sendall("EXECUTABLE=%s\0" % executable)
+ s.sendall("ANALYZER=Python\0")
+ s.sendall("BASENAME=pyhook\0")
+ # This handler puts a short(er) crash descr in 1st line of the backtrace.
+ # Example:
+ # CCMainWindow.py:1:<module>:ZeroDivisionError: integer division or modulo by zero
+ s.sendall("REASON=%s\0" % tb.splitlines()[0])
+ s.sendall("BACKTRACE=%s\0" % tb)
+ s.shutdown(socket.SHUT_WR)
+
+
+ # Read the response and log if there's anything wrong
+ response = ""
+ while True:
+ buf = s.recv(256)
+ if not buf:
+ break
+ response += buf
+ except socket.timeout, ex:
+ import syslog
+ syslog.syslog("communication with ABRT daemon failed: %s" % str(ex))
s.close()
parts = response.split()
--
1.7.10

View file

@ -0,0 +1,27 @@
From 3e39d5b9944536a6f4d4f266b3c4961ad8da443e Mon Sep 17 00:00:00 2001
From: Jiri <moskovcak@gmail.com>
Date: Wed, 7 Dec 2011 10:34:27 +0100
Subject: [PATCH 2/5] disabled reporting to kerneloops.org
- we get lot of complains about dead kerneloops.org and since it's
not wihtin our power to fix it -> disable it!
---
src/plugins/koops_event.conf | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/plugins/koops_event.conf b/src/plugins/koops_event.conf
index 3b80a1b..2fdccda 100644
--- a/src/plugins/koops_event.conf
+++ b/src/plugins/koops_event.conf
@@ -10,7 +10,7 @@ EVENT=post-create analyzer=Kerneloops
reporter-kerneloops
# report
-EVENT=report_Kerneloops analyzer=Kerneloops
+#EVENT=report_Kerneloops analyzer=Kerneloops
reporter-kerneloops
EVENT=report_Bugzilla analyzer=Kerneloops
--
1.7.7.3

View file

@ -0,0 +1,90 @@
From c138894ba3f3e630d7e1af398fcd93ffa862659d Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <dvlasenk@redhat.com>
Date: Wed, 7 Dec 2011 13:58:25 +0100
Subject: [PATCH 3/5] abrtd: fix potential problem with exitcode check on
"post-create"
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
src/daemon/abrtd.c | 53 ++++++++++++++++++++++++++-------------------------
1 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
index d3a759a..743e40f 100644
--- a/src/daemon/abrtd.c
+++ b/src/daemon/abrtd.c
@@ -313,9 +313,10 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
/* Prevent having zombie child process */
int status;
safe_waitpid(child, &status, 0);
- status = WEXITSTATUS(status);
+ /* status = WEXITSTATUS(status); - wrong, we need to check WIFEXITED too */
- /* exit 0 means, this is a good, non-dup dir */
+ /* exit 0 means "this is a good, non-dup dir" */
+ /* exit with 1 + "DUP_OF_DIR: dir" string => dup */
if (status != 0)
{
if (!dup_of_dir)
@@ -330,34 +331,34 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
* else: MW_ERROR
*/
mw_result_t res = MW_ERROR;
+ struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
+ if (!dd)
+ /* dd_opendir already emitted error msg */
+ goto ret;
+
+ /* Reset mode/uig/gid to correct values for all files created by event run */
+ dd_sanitize_mode_and_owner(dd);
+
+ /* Update count */
+ char *count_str = dd_load_text_ext(dd, FILENAME_COUNT, DD_FAIL_QUIETLY_ENOENT);
+ unsigned long count = strtoul(count_str, NULL, 10);
+ count++;
+ char new_count_str[sizeof(long)*3 + 2];
+ sprintf(new_count_str, "%lu", count);
+ dd_save_text(dd, FILENAME_COUNT, new_count_str);
+ dd_close(dd);
+
+ *problem_data = load_problem_data(dump_dir_name);
+ if (*problem_data != NULL)
{
- struct dump_dir *dd = dd_opendir(dump_dir_name, /*flags:*/ 0);
- if (!dd)
- goto ret;
-
- /* Reset mode/uig/gid to correct values for all files created by event run */
- dd_sanitize_mode_and_owner(dd);
-
- /* Update count */
- char *count_str = dd_load_text_ext(dd, FILENAME_COUNT, DD_FAIL_QUIETLY_ENOENT);
- unsigned long count = strtoul(count_str, NULL, 10);
- count++;
- char new_count_str[sizeof(long)*3 + 2];
- sprintf(new_count_str, "%lu", count);
- dd_save_text(dd, FILENAME_COUNT, new_count_str);
- dd_close(dd);
-
- *problem_data = load_problem_data(dump_dir_name);
- if (*problem_data != NULL)
+ res = MW_OK;
+ if (count > 1)
{
- res = MW_OK;
- if (count > 1)
- {
- log("Problem directory is a duplicate of %s", dump_dir_name);
- res = MW_OCCURRED;
- }
+ log("Problem directory is a duplicate of %s", dump_dir_name);
+ res = MW_OCCURRED;
}
}
+ /* else: load_problem_data already emitted error msg */
ret:
free(dup_of_dir);
--
1.7.7.3

View file

@ -0,0 +1,47 @@
From 26a0f776d32d0d5be2e15abe781adf5a830c24cc Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <dvlasenk@redhat.com>
Date: Wed, 7 Dec 2011 14:14:56 +0100
Subject: [PATCH 4/5] abrtd: always explain why we delete "corrupted" dir.
Closes rhbz#706131.
We were almost always explaining it, except for the case when
'post-create' was failing silently.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
src/daemon/abrtd.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
index 743e40f..b5c3d4b 100644
--- a/src/daemon/abrtd.c
+++ b/src/daemon/abrtd.c
@@ -313,14 +313,24 @@ static mw_result_t run_post_create_and_load_data(const char *dump_dir_name, prob
/* Prevent having zombie child process */
int status;
safe_waitpid(child, &status, 0);
- /* status = WEXITSTATUS(status); - wrong, we need to check WIFEXITED too */
/* exit 0 means "this is a good, non-dup dir" */
/* exit with 1 + "DUP_OF_DIR: dir" string => dup */
if (status != 0)
{
+ if (WIFSIGNALED(status))
+ {
+ log("'post-create' on '%s' killed by signal %d",
+ dump_dir_name, WTERMSIG(status));
+ return MW_ERROR;
+ }
+ /* else: it is WIFEXITED(status) */
if (!dup_of_dir)
+ {
+ log("'post-create' on '%s' exited with %d",
+ dump_dir_name, WEXITSTATUS(status));
return MW_ERROR;
+ }
dump_dir_name = dup_of_dir;
}
--
1.7.7.3

View file

@ -0,0 +1,48 @@
From 2e941ae3c1d13968bda8bb4594a5aa566aa2e5dd Mon Sep 17 00:00:00 2001
From: Jiri Moskovcak <jmoskovc@redhat.com>
Date: Wed, 7 Dec 2011 16:12:28 +0100
Subject: [PATCH 5/5] more glib2.31 fixes
---
src/daemon/abrtd.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/src/daemon/abrtd.c b/src/daemon/abrtd.c
index d3a759a..3d71e80 100644
--- a/src/daemon/abrtd.c
+++ b/src/daemon/abrtd.c
@@ -238,7 +238,7 @@ static gboolean handle_signal_cb(GIOChannel *gio, GIOCondition condition, gpoint
{
uint8_t signo;
gsize len = 0;
- g_io_channel_read(gio, (void*) &signo, 1, &len);
+ g_io_channel_read_chars(gio, (void*) &signo, 1, &len, NULL);
if (len == 1)
{
/* we did receive a signal */
@@ -382,10 +382,19 @@ static gboolean handle_inotify_cb(GIOChannel *gio, GIOCondition condition, gpoin
char *buf = (char*)xmalloc(inotify_bytes);
errno = 0;
gsize len;
- GIOError err = g_io_channel_read(gio, buf, inotify_bytes, &len);
- if (err != G_IO_ERROR_NONE)
+ GError *gerror = NULL;
+ g_io_channel_set_encoding(gio, NULL, &gerror);
+ /* need to set the encoding otherwise we get:
+ * Invalid byte sequence in conversion input
+ * according to manual "NULL" is safe for binary data
+ */
+ if (gerror)
+ perror_msg("Can't set encoding on gio channel: '%s'", gerror->message);
+
+ GIOStatus err = g_io_channel_read_chars(gio, buf, inotify_bytes, &len, &gerror);
+ if (err != G_IO_STATUS_NORMAL)
{
- perror_msg("Error reading inotify fd");
+ perror_msg("Error reading inotify fd: %s", gerror ? gerror->message : "unknown");
free(buf);
return FALSE; /* "remove this event" (huh??) */
}
--
1.7.7.3

View file

@ -0,0 +1,25 @@
From 7b937c6322c3130d9801596b93866a5e72a6da64 Mon Sep 17 00:00:00 2001
From: Jiri Moskovcak <jmoskovc@redhat.com>
Date: Wed, 7 Dec 2011 16:29:03 +0100
Subject: [PATCH 6/6] missed one more deprecated g_io_channel_read
---
src/daemon/abrt-dbus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/daemon/abrt-dbus.c b/src/daemon/abrt-dbus.c
index 756076a..16c01d0 100644
--- a/src/daemon/abrt-dbus.c
+++ b/src/daemon/abrt-dbus.c
@@ -284,7 +284,7 @@ static gboolean handle_signal_cb(GIOChannel *gio, GIOCondition condition, gpoint
{
uint8_t signo;
gsize len = 0;
- g_io_channel_read(gio, (void*) &signo, 1, &len);
+ g_io_channel_read_chars(gio, (void*) &signo, 1, &len, NULL);
if (len == 1)
{
/* we did receive a signal */
--
1.7.7.3

View file

@ -0,0 +1,33 @@
From 8f6d5316e9d1555f8b33aeef97053f04d3903759 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <dvlasenk@redhat.com>
Date: Wed, 7 Dec 2011 18:08:06 +0100
Subject: [PATCH 7/8] abrt-action-install-debuginfo: do not use scientific
notation for sizes
"Downloading 5.1e+02Mb, installed size: 2.1e+03Mb" looks weird...
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
src/plugins/abrt-action-install-debuginfo.in | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/plugins/abrt-action-install-debuginfo.in b/src/plugins/abrt-action-install-debuginfo.in
index f6d0001..7c19331 100644
--- a/src/plugins/abrt-action-install-debuginfo.in
+++ b/src/plugins/abrt-action-install-debuginfo.in
@@ -288,9 +288,9 @@ class DebugInfoDownload(YumBase):
print _("Can't find packages for {0} debuginfo files").format(len(not_found))
if verbose != 0 or total_pkgs != 0:
print _("Packages to download: {0}").format(total_pkgs)
- question = _("Downloading {0:.2}Mb, installed size: {1:.2}Mb. Continue?").format(
- todownload_size / (1024**2),
- installed_size / (1024**2)
+ question = _("Downloading {0:.2f}Mb, installed size: {1:.2f}Mb. Continue?").format(
+ todownload_size / (1024*1024),
+ installed_size / (1024*1024)
)
if noninteractive == False and not reportclient.ask_yes_no(question):
print _("Download cancelled by user")
--
1.7.7.3

View file

@ -0,0 +1,256 @@
From 383a8c804e0a492e8261309bbd0e9d3502ec6604 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <dvlasenk@redhat.com>
Date: Wed, 7 Dec 2011 23:14:46 +0100
Subject: [PATCH 8/8] abrt-cli: add man page. Closes rhbz#747624
This also regularizes help text a bit, and trims code
by about 150 bytes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
---
abrt.spec.in | 3 +--
doc/Makefile.am | 1 +
doc/abrt-cli.txt | 31 +++++++++++++++++++++++++++++++
src/cli/abrt-cli.c | 10 +++++-----
src/cli/list.c | 19 ++++++++++---------
src/cli/report.c | 16 +++++++---------
src/cli/rm.c | 10 +++++++---
7 files changed, 62 insertions(+), 28 deletions(-)
create mode 100644 doc/abrt-cli.txt
diff --git a/abrt.spec.in b/abrt.spec.in
index a5e78a1..7847ac0 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -497,8 +497,7 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%files cli
%defattr(-,root,root,-)
%{_bindir}/abrt-cli
-# provide asap
-#% {_mandir}/man1/report-cli.1.gz
+%{_mandir}/man1/abrt-cli.1.gz
%files desktop
%defattr(-,root,root,-)
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 65a8142..5025f93 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -11,6 +11,7 @@ MAN1_TXT += abrt-action-list-dsos.txt
MAN1_TXT += abrt-retrace-client.txt
MAN1_TXT += abrt-handle-upload.txt
MAN1_TXT += abrt-server.txt
+MAN1_TXT += abrt-cli.txt
MAN1_TXT += abrt-action-save-package-data.txt
MAN1_TXT += abrt-install-ccpp-hook.txt
diff --git a/doc/abrt-cli.txt b/doc/abrt-cli.txt
new file mode 100644
index 0000000..9680ad6
--- /dev/null
+++ b/doc/abrt-cli.txt
@@ -0,0 +1,31 @@
+abrt-cli(1)
+===========
+
+NAME
+----
+abrt-cli - List, remove, print, analyze, report problems
+
+SYNOPSIS
+--------
+'abrt-cli' list [-vdf] [DIR]...
+
+'abrt-cli' rm [-v] DIR...
+
+'abrt-cli' report [-v] DIR...
+
+'abrt-cli' info [-vd] DIR...
+
+OPTIONS
+-------
+-v,--verbose::
+ Be more verbose. Can be given multiple times.
+
+-d,--detailed::
+ Show detailed report
+
+-f,--full::
+ List even reported problems
+
+AUTHORS
+-------
+* ABRT team
diff --git a/src/cli/abrt-cli.c b/src/cli/abrt-cli.c
index 2ea5276..fdd3173 100644
--- a/src/cli/abrt-cli.c
+++ b/src/cli/abrt-cli.c
@@ -138,14 +138,14 @@ int main(int argc, const char **argv)
argc--;
const char *abrt_cli_usage_string = _(
- "Usage: abrt-cli [--version] COMMAND [ARGS]"
+ "Usage: abrt-cli [--version] COMMAND [DIR]..."
);
const struct cmd_struct commands[] = {
- {"list", cmd_list, _("List not yet reported problems")},
- {"rm", cmd_rm, _("Remove files from problem directory")},
- {"report", cmd_report, _("Analyze and report problem data in problem directory")},
- {"info", cmd_info, _("Print information about DUMP_DIR")},
+ {"list", cmd_list, _("List not yet reported problems [in DIRs]")},
+ {"rm", cmd_rm, _("Remove problem directory DIR")},
+ {"report", cmd_report, _("Analyze and report problem data in DIR")},
+ {"info", cmd_info, _("Print information about DIR")},
{NULL, NULL, NULL}
};
diff --git a/src/cli/list.c b/src/cli/list.c
index a9b700c..565a36f 100644
--- a/src/cli/list.c
+++ b/src/cli/list.c
@@ -87,7 +87,7 @@ static void print_crash_list(vector_of_problem_data_t *crash_list, int include_r
int cmd_list(int argc, const char **argv)
{
const char *program_usage_string = _(
- "& list [options] [<dump-dir>]..."
+ "& list [options] [DIR]..."
);
static int opt_full, opt_detailed;
@@ -101,11 +101,11 @@ int cmd_list(int argc, const char **argv)
};
parse_opts(argc, (char **)argv, program_options, program_usage_string);
+ argv += optind;
GList *D_list = NULL;
- if (optind < argc)
- while (optind < argc)
- D_list = g_list_append(D_list, xstrdup(argv[optind++]));
+ while (*argv)
+ D_list = g_list_append(D_list, xstrdup(*argv++));
if (!D_list)
{
load_abrt_conf();
@@ -130,7 +130,7 @@ int cmd_list(int argc, const char **argv)
int cmd_info(int argc, const char **argv)
{
const char *program_usage_string = _(
- "& info [options] [<dump-dir>]..."
+ "& info [options] DIR..."
);
static int opt_detailed;
@@ -143,14 +143,15 @@ int cmd_info(int argc, const char **argv)
};
parse_opts(argc, (char **)argv, program_options, program_usage_string);
+ argv += optind;
- if (optind == argc)
+ if (!argv[0])
show_usage_and_die(program_usage_string, program_options);
int errs = 0;
- while (argv[optind])
+ while (*argv)
{
- const char *dump_dir = argv[optind++];
+ const char *dump_dir = *argv++;
problem_data_t *problem = fill_crash_info(dump_dir);
if (!problem)
{
@@ -161,7 +162,7 @@ int cmd_info(int argc, const char **argv)
print_crash(problem, opt_detailed);
free_problem_data(problem);
- if (optind - argc)
+ if (*argv)
printf("\n");
}
diff --git a/src/cli/report.c b/src/cli/report.c
index 1e6c5ce..e20bb96 100644
--- a/src/cli/report.c
+++ b/src/cli/report.c
@@ -25,7 +25,7 @@
int cmd_report(int argc, const char **argv)
{
const char *program_usage_string = _(
- "& report [options] [<dump-dir>]..."
+ "& report [options] DIR..."
);
struct options program_options[] = {
@@ -34,6 +34,10 @@ int cmd_report(int argc, const char **argv)
};
parse_opts(argc, (char **)argv, program_options, program_usage_string);
+ argv += optind;
+
+ if (!argv[0])
+ show_usage_and_die(program_usage_string, program_options);
load_abrt_conf();
char *home = getenv("HOME");
@@ -43,12 +47,9 @@ int cmd_report(int argc, const char **argv)
D_list = g_list_append(D_list, xstrdup(g_settings_dump_location));
free_abrt_conf_data();
- if (!argv[optind])
- show_usage_and_die(program_usage_string, program_options);
-
- while (1)
+ while (*argv)
{
- const char *dir_name = argv[optind++];
+ const char *dir_name = *argv++;
vector_of_problem_data_t *ci = NULL;
if (*dir_name == '@')
@@ -73,9 +74,6 @@ int cmd_report(int argc, const char **argv)
free_vector_of_problem_data(ci);
if (status)
exit(status);
-
- if (!argv[optind])
- break;
}
return 0;
diff --git a/src/cli/rm.c b/src/cli/rm.c
index 4a95d93..8f185a4 100644
--- a/src/cli/rm.c
+++ b/src/cli/rm.c
@@ -28,7 +28,7 @@
int cmd_rm(int argc, const char **argv)
{
const char *program_usage_string = _(
- "& rm [options] [<dump-dir>]..."
+ "& rm [options] DIR..."
);
struct options program_options[] = {
@@ -37,12 +37,16 @@ int cmd_rm(int argc, const char **argv)
};
parse_opts(argc, (char **)argv, program_options, program_usage_string);
+ argv += optind;
+
+ if (!argv[0])
+ show_usage_and_die(program_usage_string, program_options);
int errs = 0;
- while (argv[optind])
+ while (*argv)
{
int status;
- const char *rm_dir = argv[optind++];
+ const char *rm_dir = *argv++;
status = delete_dump_dir_possibly_using_abrtd(rm_dir);
if (!status)
log("rm '%s'", rm_dir);
--
1.7.7.3

3077
abrt.spec

File diff suppressed because it is too large Load diff

115
abrt1_to_abrt2 Executable file
View file

@ -0,0 +1,115 @@
#! /usr/bin/python
#-*- coding: utf-8 -*-
import os
# abrt_v4 TABLE columns:
UUID = 0
UID = 1
INFORMALL = 2
DUMPDIR_PATH = 3
COUNT = 4
REPORTED = 5
TIME = 6
MESSAGE = 7
# abrt_v4_reportresult columns:
#UUID = 0
#UID = 1
REPORTER = 2
RESULT_MESSAGE = 3
def get_db_path():
path = "/var/spool/abrt/abrt-db"
try:
with open("/etc/abrt/plugins/SQLite3.conf") as f:
for line in f:
line = line.split('=', 1)
if len(line) == 2 and line[0].strip() == "DBPath":
path = line[1].strip()
except Exception, ex:
pass
return path
def get_url_from_text(text):
url_marks = ["http://", "https://", "ftp://", "ftps://", "file://"]
lines = text.split('\n')
url = ""
for mark in url_marks:
for line in lines:
last_mark = line.find(mark)
if last_mark != -1:
url_end = line.find(' ',last_mark)
if url_end == -1:
url_end = len(line)
url = "URL=" + line[last_mark:url_end]
return url
def format_reported_to(reported_to):
reporter = reported_to[REPORTER]
url = get_url_from_text(reported_to[RESULT_MESSAGE])
if not url:
url = reported_to[RESULT_MESSAGE]
return reporter + ": " + url
if __name__ == "__main__":
try:
from sqlite3 import dbapi2 as sqlite
db = sqlite.connect(get_db_path())
crashes = db.execute("SELECT * FROM abrt_v4")
# abrt_v4 TABLE columns:
# UUID | UID | INFORMALL | DUMPDIR_PATH | COUNT | REPORTED | TIME | MESSAGE
for crash in crashes:
# abrt_v4_reportresult columns:
# UUID | UID | REPORTER | MESSAGE
report_results = db.execute("SELECT * FROM abrt_v4_reportresult WHERE UUID='%s'" % crash[UUID])
# save count from db to file
count_file = "%s/count" % crash[DUMPDIR_PATH]
# don't overwrite
if not os.path.exists(count_file):
try:
fout = open(count_file, "w")
fout.write(str(crash[COUNT]))
fout.close()
except Exception, ex:
# silently ignore errors -> probably stalled db, but we can't
# do much about it, so it's better to not polute the rpm output
pass
# save uuid from db to file
uuid_file = "%s/uuid" % crash[DUMPDIR_PATH]
# don't overwrite
if not os.path.exists(uuid_file):
try:
fout = open(uuid_file, "w")
fout.write(str(crash[UUID]))
fout.close()
except Exception, ex:
# silently ignore errors -> probably stalled db, but we can't
# do much about it, so it's better to not polute the rpm output
pass
results = report_results.fetchall()
if results:
# save report results from db to file
reported_to_file = "%s/reported_to" % crash[DUMPDIR_PATH]
if not os.path.exists(reported_to_file):
try:
fout = open(reported_to_file, "w")
except Exception, ex:
# silently ignore errors -> probably stalled db, but we can't
# do much about it, so it's better to not polute the rpm output
continue
for report_result in results:
# print "\t", format_reported_to(report_result)
# I know, it adds a '\n' to the end, but it's not a problem
fout.write("%s\n" % format_reported_to(report_result))
fout.close()
db.close()
except Exception, ex:
# in case of any unhandled error, just ignore it, the worst, what
# can happen is that the old reports are marked as unreported
#print ex
pass

View file

@ -0,0 +1,11 @@
--- abrt-2.0.6/src/daemon/abrt-action-save-package-data.conf 2011-11-04 13:03:43.271953835 +0100
+++ abrt-2.0.6_/src/daemon/abrt-action-save-package-data.conf 2011-11-04 13:03:36.661746556 +0100
@@ -3,7 +3,7 @@
# the list of public keys used to check the signature is
# in the file gpg_keys
#
-OpenGPGCheck = yes
+OpenGPGCheck = no
# Blacklisted packages
#

17
blacklist.patch Normal file
View file

@ -0,0 +1,17 @@
--- abrt-2.0.4/src/daemon/abrt-action-save-package-data.conf 2011-07-15 13:10:46.000000000 +0200
+++ abrt-2.0.4_/src/daemon/abrt-action-save-package-data.conf 2011-07-19 15:12:43.661630657 +0200
@@ -7,7 +7,7 @@
# Blacklisted packages
#
-BlackList = nspluginwrapper,valgrind,strace
+BlackList = nspluginwrapper, valgrind, strace, mono-core
# Process crashes in executables which do not belong to any package?
#
@@ -15,4 +15,4 @@
# Blacklisted executable paths (shell patterns)
#
-BlackListedPaths = /usr/share/doc/*,*/example*
+BlackListedPaths = /usr/share/doc/*, */example*, /usr/bin/nspluginviewer, /usr/lib/xulrunner-*/plugin-container

View file

@ -1,15 +0,0 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_testing
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

View file

@ -1 +1 @@
SHA512 (abrt-2.17.8.tar.gz) = 90b74229412e0186bfa109ee940a60c9f3c0f7ce8c1216acad6f05619a1bb591e7f0bae87363143a05034312c9f14fe5ace341b84f680780ceb93a1e624705b3
3c507dd1f962f8bffca4873a37c6a932 abrt-2.0.7.tar.gz

View file

@ -1,10 +0,0 @@
summary: Basic smoke test for abrt
prepare:
how: install
# Do not attempt to install conflicting subpackages.
exclude:
- abrt-atomic
- abrt-java-connector-container
- python3-abrt-container-addon
execute:
script: abrt-action-notify --help