[PATCH] trac#524 : added dependency on crash to addon-vmcore rpm package
by Jakub Filak
---
abrt.spec.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/abrt.spec.in b/abrt.spec.in
index 55c1e2b..d550596 100644
--- a/abrt.spec.in
+++ b/abrt.spec.in
@@ -144,6 +144,7 @@ Summary: %{name}'s vmcore addon
Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release}
Requires: abrt-addon-kerneloops
+Requires: crash
%description addon-vmcore
This package contains plugin for collecting kernel crash information from vmcore files.
--
1.7.7.6
12 years, 1 month
[PATCH] corrected usage of global variable verbose
by Jakub Filak
---
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 280d815..1304260 100644
--- a/src/plugins/abrt-action-install-debuginfo.in
+++ b/src/plugins/abrt-action-install-debuginfo.in
@@ -11,7 +11,7 @@ import errno
import getopt
import reportclient
from subprocess import Popen, PIPE
-from reportclient import _, verbose, log, log1, log2, set_verbosity, error_msg_and_die, error_msg
+from reportclient import _, log, log1, log2, set_verbosity, error_msg_and_die, error_msg
import time
from reportclient.debuginfo import DebugInfoDownload, filter_installed_debuginfos, build_ids_to_path
@@ -75,7 +75,7 @@ if __name__ == "__main__":
ABRT_VERBOSE = os.getenv("ABRT_VERBOSE")
if (ABRT_VERBOSE):
try:
- verbose = int(ABRT_VERBOSE)
+ reportclient.verbose = int(ABRT_VERBOSE)
except:
pass
@@ -113,7 +113,7 @@ if __name__ == "__main__":
print help_text
exit(0)
elif opt == "-v":
- verbose += 1
+ reportclient.verbose += 1
elif opt == "-y":
noninteractive = True
elif opt == "--ids":
--
1.7.7.6
12 years, 1 month
[PATCH] rhbz#795548 - opt kernel out of showing smolt information in abrt bug reports
by Nikola Pajkovsky
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/include/internal_libreport.h | 3 +++
src/lib/make_descr.c | 44 ++++++++++++++++++++++++++++++--------
src/plugins/rhbz.c | 7 +++++-
3 files changed, 44 insertions(+), 10 deletions(-)
diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h
index d99d84c..892a70f 100644
--- a/src/include/internal_libreport.h
+++ b/src/include/internal_libreport.h
@@ -572,6 +572,7 @@ enum {
MAKEDESC_SHOW_FILES = (1 << 0),
MAKEDESC_SHOW_MULTILINE = (1 << 1),
MAKEDESC_SHOW_ONLY_LIST = (1 << 2),
+ MAKEDESC_WHITELIST = (1 << 3),
};
#define make_description libreport_make_description
char *make_description(problem_data_t *problem_data, char **names_to_skip, unsigned max_text_size, unsigned desc_flags);
@@ -579,6 +580,8 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig
char* make_description_bz(problem_data_t *problem_data, unsigned max_text_size);
#define make_description_logger libreport_make_description_logger
char* make_description_logger(problem_data_t *problem_data, unsigned max_text_size);
+#define make_description_koops libreport_make_description_koops
+char* make_description_koops(problem_data_t *problem_data, unsigned max_text_size);
//UNUSED
//#define make_description_mailx libreport_make_description_mailx
//char* make_description_mailx(problem_data_t *problem_data);
diff --git a/src/lib/make_descr.c b/src/lib/make_descr.c
index a1a9234..68133a2 100644
--- a/src/lib/make_descr.c
+++ b/src/lib/make_descr.c
@@ -18,7 +18,16 @@
*/
#include "internal_libreport.h"
-char *make_description(problem_data_t *problem_data, char **names_to_skip, unsigned max_text_size, unsigned desc_flags)
+static bool rejected_name(const char *name, char **v, int flags)
+{
+ bool r = is_in_string_list(name, v);
+ if (flags & MAKEDESC_WHITELIST)
+ r = !r;
+ return r;
+}
+
+char *make_description(problem_data_t *problem_data, char **names_to_skip,
+ unsigned max_text_size, unsigned desc_flags)
{
struct strbuf *buf_dsc = strbuf_new();
@@ -42,7 +51,8 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig
/* Skip items we are not interested in */
//TODO: optimize by doing this once, not 3 times:
- if (names_to_skip && is_in_string_list(key, names_to_skip))
+ if (names_to_skip
+ && rejected_name(key, names_to_skip, desc_flags))
continue;
struct problem_item *item = g_hash_table_lookup(problem_data, key);
@@ -87,7 +97,8 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig
l = l->next;
/* Skip items we are not interested in */
- if (names_to_skip && is_in_string_list(key, names_to_skip))
+ if (names_to_skip
+ && rejected_name(key, names_to_skip, desc_flags))
continue;
struct problem_item *item = g_hash_table_lookup(problem_data, key);
@@ -144,7 +155,8 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig
l = l->next;
/* Skip items we are not interested in */
- if (names_to_skip && is_in_string_list(key, names_to_skip))
+ if (names_to_skip
+ && rejected_name(key, names_to_skip, desc_flags))
continue;
struct problem_item *item = g_hash_table_lookup(problem_data, key);
@@ -251,11 +263,6 @@ static const char *const blacklisted_items[] = {
NULL
};
-/*
- * npajkovs: implement second part of problem (not so important)
- * https://bugzilla.redhat.com/show_bug.cgi?id=711591
- */
-
char* make_description_bz(problem_data_t *problem_data, unsigned max_text_size)
{
return make_description(
@@ -275,3 +282,22 @@ char* make_description_logger(problem_data_t *problem_data, unsigned max_text_si
MAKEDESC_SHOW_FILES | MAKEDESC_SHOW_MULTILINE
);
}
+
+/* Items we want to include to bz */
+static const char *const whitelisted_items[] = {
+ FILENAME_CMDLINE,
+ FILENAME_BACKTRACE,
+ NULL
+};
+
+char* make_description_koops(problem_data_t *problem_data, unsigned max_text_size)
+{
+ return make_description(
+ problem_data,
+ (char**)whitelisted_items,
+ max_text_size,
+ MAKEDESC_SHOW_FILES
+ | MAKEDESC_SHOW_MULTILINE
+ | MAKEDESC_WHITELIST
+ );
+}
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
index 9ed3154..a3aa2ef 100644
--- a/src/plugins/rhbz.c
+++ b/src/plugins/rhbz.c
@@ -438,7 +438,12 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
}
char *status_whiteboard = xasprintf("abrt_hash:%s", duphash);
- char *bz_dsc = make_description_bz(problem_data, CD_TEXT_ATT_SIZE_BZ);
+ char *bz_dsc;
+ if (analyzer && !strcmp(analyzer, "Kerneloops"))
+ bz_dsc = make_description_koops(problem_data, CD_TEXT_ATT_SIZE_BZ);
+ else
+ bz_dsc = make_description_bz(problem_data, CD_TEXT_ATT_SIZE_BZ);
+
char *full_dsc = xasprintf("libreport version: "VERSION"\n%s", bz_dsc);
free(bz_dsc);
--
1.7.9.3
12 years, 1 month
[PATCH] rhbz#795548 - opt kernel out of showing smolt information in abrt bug reports
by Nikola Pajkovsky
Signed-off-by: Nikola Pajkovsky <npajkovs(a)redhat.com>
---
src/include/internal_libreport.h | 5 ++++-
src/lib/is_in_string_list.c | 14 +++++++++++---
src/lib/make_descr.c | 36 +++++++++++++++++++++++++++---------
src/lib/problem_data.c | 8 ++++----
src/plugins/rhbz.c | 7 ++++++-
5 files changed, 52 insertions(+), 18 deletions(-)
diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h
index 95b600b..9011d2a 100644
--- a/src/include/internal_libreport.h
+++ b/src/include/internal_libreport.h
@@ -251,7 +251,7 @@ char *run_in_shell_and_save_output(int flags,
/* Random utility functions */
#define is_in_string_list libreport_is_in_string_list
-bool is_in_string_list(const char *name, char **v);
+bool is_in_string_list(const char *name, char **v, int flags);
#define is_in_comma_separated_list libreport_is_in_comma_separated_list
bool is_in_comma_separated_list(const char *value, const char *list);
@@ -572,6 +572,7 @@ enum {
MAKEDESC_SHOW_FILES = (1 << 0),
MAKEDESC_SHOW_MULTILINE = (1 << 1),
MAKEDESC_SHOW_ONLY_LIST = (1 << 2),
+ MAKEDESC_WHITELIST = (1 << 3),
};
#define make_description libreport_make_description
char *make_description(problem_data_t *problem_data, char **names_to_skip, unsigned max_text_size, unsigned desc_flags);
@@ -579,6 +580,8 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig
char* make_description_bz(problem_data_t *problem_data, unsigned max_text_size);
#define make_description_logger libreport_make_description_logger
char* make_description_logger(problem_data_t *problem_data, unsigned max_text_size);
+#define make_description_koops libreport_make_description_koops
+char* make_description_koops(problem_data_t *problem_data, unsigned max_text_size);
//UNUSED
//#define make_description_mailx libreport_make_description_mailx
//char* make_description_mailx(problem_data_t *problem_data);
diff --git a/src/lib/is_in_string_list.c b/src/lib/is_in_string_list.c
index 663edff..b347b2b 100644
--- a/src/lib/is_in_string_list.c
+++ b/src/lib/is_in_string_list.c
@@ -18,13 +18,21 @@
*/
#include "internal_libreport.h"
-bool is_in_string_list(const char *name, char **v)
+bool is_in_string_list(const char *name, char **v, int flags)
{
+ bool ret = false;
while (*v)
{
if (strcmp(*v, name) == 0)
- return true;
+ {
+ ret = true;
+ break;
+ }
v++;
}
- return false;
+
+ if (flags & MAKEDESC_WHITELIST)
+ ret = !ret;
+
+ return ret;
}
diff --git a/src/lib/make_descr.c b/src/lib/make_descr.c
index a1a9234..f7ac058 100644
--- a/src/lib/make_descr.c
+++ b/src/lib/make_descr.c
@@ -18,7 +18,8 @@
*/
#include "internal_libreport.h"
-char *make_description(problem_data_t *problem_data, char **names_to_skip, unsigned max_text_size, unsigned desc_flags)
+char *make_description(problem_data_t *problem_data, char **names_to_skip,
+ unsigned max_text_size, unsigned desc_flags)
{
struct strbuf *buf_dsc = strbuf_new();
@@ -42,7 +43,8 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig
/* Skip items we are not interested in */
//TODO: optimize by doing this once, not 3 times:
- if (names_to_skip && is_in_string_list(key, names_to_skip))
+ if (names_to_skip
+ && is_in_string_list(key, names_to_skip, desc_flags))
continue;
struct problem_item *item = g_hash_table_lookup(problem_data, key);
@@ -87,7 +89,8 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig
l = l->next;
/* Skip items we are not interested in */
- if (names_to_skip && is_in_string_list(key, names_to_skip))
+ if (names_to_skip
+ && is_in_string_list(key, names_to_skip, desc_flags))
continue;
struct problem_item *item = g_hash_table_lookup(problem_data, key);
@@ -144,7 +147,8 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig
l = l->next;
/* Skip items we are not interested in */
- if (names_to_skip && is_in_string_list(key, names_to_skip))
+ if (names_to_skip
+ && is_in_string_list(key, names_to_skip, desc_flags))
continue;
struct problem_item *item = g_hash_table_lookup(problem_data, key);
@@ -251,11 +255,6 @@ static const char *const blacklisted_items[] = {
NULL
};
-/*
- * npajkovs: implement second part of problem (not so important)
- * https://bugzilla.redhat.com/show_bug.cgi?id=711591
- */
-
char* make_description_bz(problem_data_t *problem_data, unsigned max_text_size)
{
return make_description(
@@ -275,3 +274,22 @@ char* make_description_logger(problem_data_t *problem_data, unsigned max_text_si
MAKEDESC_SHOW_FILES | MAKEDESC_SHOW_MULTILINE
);
}
+
+/* Items we want to include to bz */
+static const char *const whitelisted_items[] = {
+ FILENAME_CMDLINE,
+ FILENAME_BACKTRACE,
+ NULL
+};
+
+char* make_description_koops(problem_data_t *problem_data, unsigned max_text_size)
+{
+ return make_description(
+ problem_data,
+ (char**)whitelisted_items,
+ max_text_size,
+ MAKEDESC_SHOW_FILES
+ | MAKEDESC_SHOW_MULTILINE
+ | MAKEDESC_WHITELIST
+ );
+}
diff --git a/src/lib/problem_data.c b/src/lib/problem_data.c
index 2a7835a..06098de 100644
--- a/src/lib/problem_data.c
+++ b/src/lib/problem_data.c
@@ -213,7 +213,7 @@ static const char *const editable_files[] = {
};
static bool is_editable_file(const char *file_name)
{
- return is_in_string_list(file_name, (char**)editable_files);
+ return is_in_string_list(file_name, (char**)editable_files, /* flags */ 0);
}
static const char *const always_text_files[] = {
@@ -257,7 +257,7 @@ static char* is_text_file(const char *name, ssize_t *sz)
if (base)
{
base++;
- if (is_in_string_list(base, (char**)always_text_files))
+ if (is_in_string_list(base, (char**)always_text_files, /* flags */ 0))
return buf;
}
@@ -298,7 +298,7 @@ void load_problem_data_from_dump_dir(problem_data_t *problem_data, struct dump_d
dd_init_next_file(dd);
while (dd_get_next_file(dd, &short_name, &full_name))
{
- if (excluding && is_in_string_list(short_name, excluding))
+ if (excluding && is_in_string_list(short_name, excluding, /* flags */ 0))
{
//log("Excluded:'%s'", short_name);
goto next;
@@ -373,7 +373,7 @@ void load_problem_data_from_dump_dir(problem_data_t *problem_data, struct dump_d
FILENAME_COUNT ,
NULL
};
- if (is_in_string_list(short_name, (char**)list_files))
+ if (is_in_string_list(short_name, (char**)list_files, /* flags */ 0))
flags |= CD_FLAG_LIST;
if (strcmp(short_name, FILENAME_TIME) == 0)
diff --git a/src/plugins/rhbz.c b/src/plugins/rhbz.c
index 9ed3154..a3aa2ef 100644
--- a/src/plugins/rhbz.c
+++ b/src/plugins/rhbz.c
@@ -438,7 +438,12 @@ int rhbz_new_bug(struct abrt_xmlrpc *ax, problem_data_t *problem_data,
}
char *status_whiteboard = xasprintf("abrt_hash:%s", duphash);
- char *bz_dsc = make_description_bz(problem_data, CD_TEXT_ATT_SIZE_BZ);
+ char *bz_dsc;
+ if (analyzer && !strcmp(analyzer, "Kerneloops"))
+ bz_dsc = make_description_koops(problem_data, CD_TEXT_ATT_SIZE_BZ);
+ else
+ bz_dsc = make_description_bz(problem_data, CD_TEXT_ATT_SIZE_BZ);
+
char *full_dsc = xasprintf("libreport version: "VERSION"\n%s", bz_dsc);
free(bz_dsc);
--
1.7.7.2
12 years, 1 month
Fedora 17 updates
by Jiri Moskovcak
Hi guys,
I have rolled a new updates for F17, since we don't have much time left
to fix problems I would like to ask you to help with testing. You can
get the packages by running this command:
koji download-build abrt-2.0.10-1.fc17
koji download-build libreport-2.0.10-2.fc17
I tested it on F17 and so far it seems to be working ok:
- retrace server works
- local gdb works
- the only problem I can see is when running abrt-gui:
Gtk-Message: Failed to load module "pk-gtk-module"
- but it's not critical and I think it's a problem in gtk in it's
already reported against it.
Thanks,
Jirka
12 years, 1 month
uReport validator
by Michal Toman
First draft of the uReport validator. It worked for all errors I tried
(assuming the size will be limited on higher level), however the code
actually seems pretty ugly to me :). Any thoughts?
Michal
12 years, 1 month