diff --git a/0035-retrace-client-build-correct-release-for-Fedora-Rawh.patch b/0035-retrace-client-build-correct-release-for-Fedora-Rawh.patch new file mode 100644 index 0000000..bb2dadd --- /dev/null +++ b/0035-retrace-client-build-correct-release-for-Fedora-Rawh.patch @@ -0,0 +1,82 @@ +From f07ea08ac4fc96162f7b583dc9a14183f1dcec69 Mon Sep 17 00:00:00 2001 +From: Jakub Filak +Date: Tue, 16 Jul 2013 11:35:35 +0200 +Subject: [ABRT PATCH 35/36] retrace-client: build correct release for Fedora + Rawhide + +Related to rhbz#958933 + +Signed-off-by: Jakub Filak +Signed-off-by: Michal Toman +--- + src/plugins/abrt-retrace-client.c | 51 ++++++++++++++++++++++++++------------- + 1 file changed, 34 insertions(+), 17 deletions(-) + +diff --git a/src/plugins/abrt-retrace-client.c b/src/plugins/abrt-retrace-client.c +index e5f95a9..9c2c551 100644 +--- a/src/plugins/abrt-retrace-client.c ++++ b/src/plugins/abrt-retrace-client.c +@@ -324,26 +324,43 @@ static char *get_release_id(map_string_t *osinfo, const char *architecture) + } + + char *result = NULL; +- const char *release = get_map_string_item_or_NULL(osinfo, OSINFO_ID); +- const char *version = get_map_string_item_or_NULL(osinfo, OSINFO_VERSION_ID); +- if (release != NULL && version != NULL) +- result = xasprintf("%s-%s-%s", release, version, arch); +- else ++ char *release = NULL; ++ char *version = NULL; ++ parse_osinfo_for_rhts(osinfo, (char **)&release, (char **)&version); ++ ++ if (release == NULL || version == NULL) ++ error_msg_and_die("Can't parse OS release name or version"); ++ ++ char *space = strchr(version, ' '); ++ if (space) ++ *space = '\0'; ++ ++ if (strcmp("Fedora", release) == 0) + { +- parse_osinfo_for_rhts(osinfo, (char **)&release, (char **)&version); +- char *space = strchr(version, ' '); +- if (space) +- *space = '\0'; +- +- if (strcmp("Fedora", release) == 0) +- result = xasprintf("fedora-%s-%s", version, arch); +- else if (strcmp("Red Hat Enterprise Linux", release) == 0) +- result = xasprintf("rhel-%s-%s", version, arch); +- +- free((void *)release); +- free((void *)version); ++ /* Because of inconsistency between Fedora's os-release and retrace ++ * server. ++ * ++ * Adding the reporting fields to Fedora's os-release was a bit ++ * frustrating for all participants and fixing it on the retrace server ++ * side is neither feasible nor acceptable. ++ * ++ * Therefore, we have decided to add the following hack. ++ */ ++ if (strcmp("Rawhide", version) == 0) ++ { ++ /* Rawhide -> rawhide */ ++ version[0] = 'r'; ++ } ++ /* Fedora -> fedora */ ++ release[0] = 'f'; + } ++ else if (strcmp("Red Hat Enterprise Linux", release) == 0) ++ strcpy(release, "rhel"); ++ ++ result = xasprintf("%s-%s-%s", release, version, arch); + ++ free(release); ++ free(version); + free(arch); + return result; + } +-- +1.8.3.1 + diff --git a/abrt.spec b/abrt.spec index 997c5f1..4e0b264 100644 --- a/abrt.spec +++ b/abrt.spec @@ -25,7 +25,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.1.5 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: Applications/System URL: https://fedorahosted.org/abrt/ @@ -37,6 +37,9 @@ Patch2: abrt-2.1.1-hide_all_ureport_stuff.patch Patch3: abrt-2.1.1-dont_enable_shortened_reporting_in_gnome.patch Patch4: abrt-2.1.1-disable_autoreporting_dialog.patch +# Remove it with abrt > 2.1.5 +Patch35: 0035-retrace-client-build-correct-release-for-Fedora-Rawh.patch + BuildRequires: dbus-devel BuildRequires: gtk3-devel BuildRequires: rpm-devel >= 4.6 @@ -312,9 +315,12 @@ to the shell #Fedora %patch1 -p1 -b .gpgcheck +%patch35 -p1 + %build autoconf -CFLAGS="%{optflags} -Werror" %configure --enable-doxygen-docs --disable-silent-rules +# Removed -Werror until abrt/abrt#673 is fixed +CFLAGS="%{optflags}" %configure --enable-doxygen-docs --disable-silent-rules make %{?_smp_mflags} %install @@ -832,6 +838,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Tue Jul 16 2013 Jakub Filak 2.1.5-2 +- fix reporting from Rawhide +- Resolves: #958933 + * Fri Jun 14 2013 Jakub Filak 2.1.5-1 - abrt-retrace-client requires tar closes #635 - abrt-tui requires abrt closes #633