diff --git a/.gitignore b/.gitignore index b6c6e0f..6be2b23 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /libreport-2.0.5.tar.gz /libreport-2.0.5.980.tar.gz /libreport-2.0.5.982.tar.gz +/libreport-2.0.6.tar.gz diff --git a/0001-report-newt-add-option-to-display-version-rhbz-74159.patch b/0001-report-newt-add-option-to-display-version-rhbz-74159.patch new file mode 100644 index 0000000..2f14530 --- /dev/null +++ b/0001-report-newt-add-option-to-display-version-rhbz-74159.patch @@ -0,0 +1,47 @@ +From 6b8ba25bd3caf0065805197a3b10e2697164ae3b Mon Sep 17 00:00:00 2001 +From: Miroslav Lichvar +Date: Thu, 29 Sep 2011 17:51:20 +0200 +Subject: [PATCH 1/4] report-newt: add option to display version (rhbz#741590) + +--- + src/report-newt/report-newt.c | 13 ++++++++++++- + 1 files changed, 12 insertions(+), 1 deletions(-) + +diff --git a/src/report-newt/report-newt.c b/src/report-newt/report-newt.c +index b8cc020..b8dddbc 100644 +--- a/src/report-newt/report-newt.c ++++ b/src/report-newt/report-newt.c +@@ -357,18 +357,29 @@ int main(int argc, char **argv) + enum { + OPT_o = 1 << 0, // report only + OPT_r = 1 << 1, ++ OPT_V = 1 << 2, + }; + /* Keep enum above and order of options below in sync! */ + struct options program_options[] = { + OPT_BOOL('o', "report-only", NULL, _("Skip analyze steps, go through report steps only")), + OPT_BOOL('d', "delete", NULL, _("Remove DIR after reporting")), ++ OPT_BOOL('V', "version", NULL, _("Display version and exit")), + OPT_END() + }; + unsigned opts = parse_opts(argc, argv, program_options, program_usage_string); + argv += optind; +- if (!argv[0] || argv[1] || !(opts & OPT_o)) /* zero or >1 arguments */ ++ /* zero or >1 arguments with -o, or >0 arguments with -V */ ++ if (!(opts & (OPT_o | OPT_V)) || ++ ((opts & OPT_o) && (!argv[0] || argv[1])) || ++ ((opts & OPT_V) && argv[0])) + show_usage_and_die(program_usage_string, program_options); + ++ if (opts & OPT_V) ++ { ++ printf("%s "VERSION"\n", g_progname); ++ return 0; ++ } ++ + dump_dir_name = argv[0]; + + /* Get settings */ +-- +1.7.6.4 + diff --git a/0002-free-the-string-not-the-strbuf.patch b/0002-free-the-string-not-the-strbuf.patch new file mode 100644 index 0000000..b1d9091 --- /dev/null +++ b/0002-free-the-string-not-the-strbuf.patch @@ -0,0 +1,57 @@ +From 123741b4e05a23fda1767b5f78a5f1022877d6c7 Mon Sep 17 00:00:00 2001 +From: Jiri Moskovcak +Date: Fri, 30 Sep 2011 09:31:27 +0200 +Subject: [PATCH 2/4] free the string not the strbuf + +--- + src/gui-wizard-gtk/wizard.c | 18 ++++++++++-------- + 1 files changed, 10 insertions(+), 8 deletions(-) + +diff --git a/src/gui-wizard-gtk/wizard.c b/src/gui-wizard-gtk/wizard.c +index 3b06425..0279f83 100644 +--- a/src/gui-wizard-gtk/wizard.c ++++ b/src/gui-wizard-gtk/wizard.c +@@ -691,8 +691,9 @@ static void analyze_rb_was_toggled(GtkButton *button, gpointer user_data) + static void report_tb_was_toggled(GtkButton *button, gpointer user_data) + { + char *event_name = (char *)user_data; +- struct strbuf *reporters_string = strbuf_new(); +- struct strbuf *reporters_event_string = strbuf_new(); ++ struct strbuf *reporters_strbuf = strbuf_new(); ++ struct strbuf *reporters_event_strbuf = strbuf_new(); ++ char * reporters_string; + + /* if ((button && user_data) + * prevents sigsegv which would happen when call from +@@ -735,21 +736,22 @@ static void report_tb_was_toggled(GtkButton *button, gpointer user_data) + while (li != NULL) + { + event_config_t *cfg = get_event_config(li->data); +- strbuf_append_strf(reporters_event_string, ++ strbuf_append_strf(reporters_event_strbuf, + "%s%s", +- (reporters_event_string->len != 0 ? ", " : ""), ++ (reporters_event_strbuf->len != 0 ? ", " : ""), + (li->data ? li->data : "") + ); + +- strbuf_append_strf(reporters_string, ++ strbuf_append_strf(reporters_strbuf, + "%s%s", +- (reporters_string->len != 0 ? ", " : ""), ++ (reporters_strbuf->len != 0 ? ", " : ""), + (cfg->screen_name ? cfg->screen_name : li->data) + ); + li = g_list_next(li); + } +- g_reporter_events_selected = strbuf_free_nobuf(reporters_event_string); +- gtk_label_set_text(g_lbl_reporters, strbuf_free_nobuf(reporters_string)); ++ g_reporter_events_selected = strbuf_free_nobuf(reporters_event_strbuf); ++ reporters_string = strbuf_free_nobuf(reporters_strbuf); ++ gtk_label_set_text(g_lbl_reporters, reporters_string); + free(reporters_string); //we can, gtk copies the string + } + +-- +1.7.6.4 + diff --git a/0003-reporter-mailx-set-sendwait-1-in-environment.patch b/0003-reporter-mailx-set-sendwait-1-in-environment.patch new file mode 100644 index 0000000..cfd42cc --- /dev/null +++ b/0003-reporter-mailx-set-sendwait-1-in-environment.patch @@ -0,0 +1,33 @@ +From fff24fb47435200ce6b51de9c43fe0c6d61c93d0 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Fri, 30 Sep 2011 19:13:48 +0200 +Subject: [PATCH 3/4] reporter-mailx: set sendwait=1 in environment. + +This might improve error detection in sending emails + +Signed-off-by: Denys Vlasenko +--- + src/plugins/reporter-mailx.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/src/plugins/reporter-mailx.c b/src/plugins/reporter-mailx.c +index 8e5ff41..ae7f774 100644 +--- a/src/plugins/reporter-mailx.c ++++ b/src/plugins/reporter-mailx.c +@@ -99,6 +99,13 @@ static void create_and_send_email( + args = append_str_to_vector(args, &arg_size, email_from); + args = append_str_to_vector(args, &arg_size, email_to); + ++ /* This makes (some versions of) mailx to wait for child process to finish, ++ * and to report its exit code, not useless "always 0" exit code. ++ * Sadly, usually this still doesn't help. See: ++ * https://bugzilla.redhat.com/show_bug.cgi?id=740895 ++ */ ++ putenv((char*)"sendwait=1"); ++ + log(_("Sending an email...")); + exec_and_feed_input(dsc, args); + +-- +1.7.6.4 + diff --git a/0004-reporter-mailx-use-Bugzilla-s-output-format.-Closes-.patch b/0004-reporter-mailx-use-Bugzilla-s-output-format.-Closes-.patch new file mode 100644 index 0000000..49b06de --- /dev/null +++ b/0004-reporter-mailx-use-Bugzilla-s-output-format.-Closes-.patch @@ -0,0 +1,66 @@ +From 57eb0c7c569ef06831ea90777f89920c96ee33b9 Mon Sep 17 00:00:00 2001 +From: Denys Vlasenko +Date: Fri, 30 Sep 2011 19:15:10 +0200 +Subject: [PATCH 4/4] reporter-mailx: use Bugzilla's output format. Closes + rhbz#717321. + +Signed-off-by: Denys Vlasenko +--- + src/include/internal_libreport.h | 5 +++-- + src/lib/make_descr.c | 2 ++ + src/plugins/reporter-mailx.c | 3 ++- + 3 files changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/include/internal_libreport.h b/src/include/internal_libreport.h +index afaf911..67a7ea3 100644 +--- a/src/include/internal_libreport.h ++++ b/src/include/internal_libreport.h +@@ -548,8 +548,9 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig + char* make_description_bz(problem_data_t *problem_data); + #define make_description_logger libreport_make_description_logger + char* make_description_logger(problem_data_t *problem_data); +-#define make_description_mailx libreport_make_description_mailx +-char* make_description_mailx(problem_data_t *problem_data); ++//UNUSED ++//#define make_description_mailx libreport_make_description_mailx ++//char* make_description_mailx(problem_data_t *problem_data); + + #define parse_release_for_bz libreport_parse_release_for_bz + void parse_release_for_bz(const char *pRelease, char **product, char **version); +diff --git a/src/lib/make_descr.c b/src/lib/make_descr.c +index 7034526..2a6a973 100644 +--- a/src/lib/make_descr.c ++++ b/src/lib/make_descr.c +@@ -184,6 +184,7 @@ char *make_description(problem_data_t *problem_data, char **names_to_skip, unsig + return strbuf_free_nobuf(buf_dsc); + } + ++#ifdef UNUSED + char* make_description_mailx(problem_data_t *problem_data) + { + struct strbuf *buf_dsc = strbuf_new(); +@@ -227,6 +228,7 @@ char* make_description_mailx(problem_data_t *problem_data) + + return strbuf_free_nobuf(buf_dsc); + } ++#endif + + /* Items we don't want to include to bz / logger */ + static const char *const blacklisted_items[] = { +diff --git a/src/plugins/reporter-mailx.c b/src/plugins/reporter-mailx.c +index ae7f774..f7d9cde 100644 +--- a/src/plugins/reporter-mailx.c ++++ b/src/plugins/reporter-mailx.c +@@ -75,7 +75,8 @@ static void create_and_send_email( + unsigned arg_size = 0; + args = append_str_to_vector(args, &arg_size, "/bin/mailx"); + +- char *dsc = make_description_mailx(problem_data); ++ //char *dsc = make_description_mailx(problem_data); ++ char *dsc = make_description_bz(problem_data); + + if (send_binary_data) + { +-- +1.7.6.4 + diff --git a/libreport.spec b/libreport.spec index bccaf11..40bdf77 100644 --- a/libreport.spec +++ b/libreport.spec @@ -4,12 +4,16 @@ Summary: Generic library for reporting various problems Name: libreport -Version: 2.0.5.982 +Version: 2.0.6 Release: 1%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: https://fedorahosted.org/abrt/ Source: https://fedorahosted.org/released/abrt/%{name}-%{version}.tar.gz +Patch0: 0001-report-newt-add-option-to-display-version-rhbz-74159.patch +Patch1: 0002-free-the-string-not-the-strbuf.patch +Patch2: 0003-reporter-mailx-set-sendwait-1-in-environment.patch +Patch3: 0004-reporter-mailx-use-Bugzilla-s-output-format.-Closes-.patch BuildRequires: dbus-devel BuildRequires: gtk2-devel BuildRequires: curl-devel @@ -190,6 +194,10 @@ Plugin to report bugs into anonymous FTP site associated with ticketing system. %prep %setup -q +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %build mkdir -p m4 @@ -346,9 +354,13 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %config(noreplace) %{_sysconfdir}/libreport/events.d/uploader_event.conf %changelog +* Mon Oct 03 2011 Jiri Moskovcak 2.0.6-1 +- updated to the latest upstrem +- just a bug fixing release + * Mon Sep 26 2011 Jiri Moskovcak 2.0.5.982-1 - re-fix rhbz#730887 -- re-ffixed prgname (nice icons in gnome3) rhbz#741231 +- re-fixed prgname (nice icons in gnome3) rhbz#741231 - Resolves: #741231 #730887 * Thu Sep 22 2011 Jiri Moskovcak 2.0.5-9 diff --git a/sources b/sources index b10a34a..03a65c5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -76dde914fb83f9e0fc480d1370b24927 libreport-2.0.5.982.tar.gz +177d401ae2a78cc983fb1a930254564f libreport-2.0.6.tar.gz