From 2cb1634313853591ee88f120d89ab667a581f360 Mon Sep 17 00:00:00 2001 From: Michal Fabik Date: Fri, 24 Apr 2020 18:07:47 +0200 Subject: [PATCH 01/10] New upstream release 2.14.1 Signed-off-by: Michal Fabik --- .gitignore | 1 + abrt.spec | 27 +++++++++++++++++++++++---- sources | 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 41d1ef0..3af754d 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,4 @@ abrt-1.1.13.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 diff --git a/abrt.spec b/abrt.spec index c210274..e95f2e6 100644 --- a/abrt.spec +++ b/abrt.spec @@ -48,8 +48,8 @@ Summary: Automatic bug detection and reporting tool Name: abrt -Version: 2.14.0 -Release: 2%{?dist} +Version: 2.14.1 +Release: 1%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -114,7 +114,6 @@ BuildRequires: libreport-gtk-devel >= %{libreport_ver} BuildRequires: gsettings-desktop-schemas-devel >= 3.15 #addon-ccpp BuildRequires: gdb-headless -BuildRequires: libcap-devel #addon-kerneloops BuildRequires: systemd-devel BuildRequires: %{libjson_devel} @@ -750,7 +749,7 @@ killall abrt-dbus >/dev/null 2>&1 || : %dir %attr(0751, root, abrt) %{default_dump_dir} %dir %attr(0700, abrt, abrt) %{_localstatedir}/spool/%{name}-upload # abrtd runs as root -%dir %attr(0755, root, root) %{_localstatedir}/run/%{name} +%ghost %dir %attr(0755, root, root) %{_localstatedir}/run/%{name} %ghost %attr(0666, -, -) %{_localstatedir}/run/%{name}/abrt.socket %ghost %attr(0644, -, -) %{_localstatedir}/run/%{name}/abrtd.pid @@ -1016,6 +1015,26 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Fri Apr 24 2020 Michal Fabik - 2.14.1-1 +- tests: Add perl, php R and tcl to dont-blame-interpret +- a-a-save-package-data: Add R and tcl to interpreted langs +- a-a-save-package-data: Use regexps to match interpreters +- .travis.yml: Update secret +- plugins: xorg-utils: Loopify parsing +- Add namespace to libreport function and global names +- cli: Correct debug directories in config +- cli: Show defaults in help output +- cli: Fix verbosity option +- cli: Fix descriptions for --since and --until +- autogen.sh: Handle NOCONFIGURE per the Build API +- plugins: journal: Fix ci_mapping being overwritten +- plugins: abrt-journal-core: Don’t assume anything about uid_t +- lib,plugins: Accomodate for multiple debug directories +- dbus: Drop bogus dependency +- dbus: Drop abrt_problems2 +- Drop libcap dependency +- Drop Travis config + * Fri Feb 07 2020 Ernestas Kulik - 2.14.0-2 - Bump libreport dependency diff --git a/sources b/sources index fe58d9f..08f6991 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abrt-2.14.0.tar.gz) = 2d817b7761d5afdca00a825281b759bc084a17d7393fcdf87df1a901b5c1a75595e3a733e481b30b02d068a123f8eac26163e2e55366e7cc20266a95e863967e +SHA512 (abrt-2.14.1.tar.gz) = 5486a4174e7db902f5a30c44159b3c0745341b1b4cb89df903cf42f9bf64ee2309708a20d8312760276db0171655972e9f2847e3463af0e34c66c4ea28cf2c6c From 778533bd655fe6bbe591f09c4c03f0bd51534bb4 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Sat, 25 Apr 2020 11:12:34 +0200 Subject: [PATCH 02/10] Bump libreport dependency --- abrt.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/abrt.spec b/abrt.spec index e95f2e6..2772829 100644 --- a/abrt.spec +++ b/abrt.spec @@ -43,7 +43,7 @@ %define docdirversion -%{version} %endif -%define libreport_ver 2.12.0 +%define libreport_ver 2.13.0 %define satyr_ver 0.24 Summary: Automatic bug detection and reporting tool From d1173a6c4b8441ce7ae21e7fee418921141c72e3 Mon Sep 17 00:00:00 2001 From: Michal Fabik Date: Tue, 12 May 2020 13:18:52 +0200 Subject: [PATCH 03/10] New upstream release 2.14.2 Signed-off-by: Michal Fabik --- .gitignore | 1 + abrt.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3af754d..16cc618 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ abrt-1.1.13.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 diff --git a/abrt.spec b/abrt.spec index 2772829..425aaf1 100644 --- a/abrt.spec +++ b/abrt.spec @@ -48,7 +48,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt -Version: 2.14.1 +Version: 2.14.2 Release: 1%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ @@ -1015,6 +1015,9 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Tue May 12 2020 Michal Fabik - 2.14.2-1 +- Fix broken builds with --enable-authenticated-autoreporting + * Fri Apr 24 2020 Michal Fabik - 2.14.1-1 - tests: Add perl, php R and tcl to dont-blame-interpret - a-a-save-package-data: Add R and tcl to interpreted langs diff --git a/sources b/sources index 08f6991..ad6df13 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abrt-2.14.1.tar.gz) = 5486a4174e7db902f5a30c44159b3c0745341b1b4cb89df903cf42f9bf64ee2309708a20d8312760276db0171655972e9f2847e3463af0e34c66c4ea28cf2c6c +SHA512 (abrt-2.14.2.tar.gz) = 020bd0550c41b2358a718a4f0f0c3a839d86fd46fc0c4f4cfc4b7d7f851baf2d5179e008ac1912b350f9f0fbfbfee94e422de3aadce5eb0f7f84a04f233349ff From 9ac2541045936b9d59ef87878ba8b9c05380d615 Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Thu, 21 May 2020 15:58:39 +0200 Subject: [PATCH 04/10] Add fix for #1836190 --- ...s-instance-pointer-to-signal-handler.patch | 28 +++++++++++++++++++ 0002-applet-Chain-up-in-dispose.patch | 26 +++++++++++++++++ abrt.spec | 8 +++++- 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 0001-applet-Pass-instance-pointer-to-signal-handler.patch create mode 100644 0002-applet-Chain-up-in-dispose.patch diff --git a/0001-applet-Pass-instance-pointer-to-signal-handler.patch b/0001-applet-Pass-instance-pointer-to-signal-handler.patch new file mode 100644 index 0000000..9010657 --- /dev/null +++ b/0001-applet-Pass-instance-pointer-to-signal-handler.patch @@ -0,0 +1,28 @@ +From 5618985d3d7f830ebba0ef78e2ee6d3d6f9f6c55 Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Fri, 15 May 2020 15:49:59 +0200 +Subject: [PATCH] applet: Pass instance pointer to signal handler + +Some fallout from 802a40a2f7c971b6533162e70b860e01ae3b5a27. + +https://bugzilla.redhat.com/show_bug.cgi?id=1836190 +--- + src/applet/abrt-applet-application.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c +index d982c9f9..8ea653bb 100644 +--- a/src/applet/abrt-applet-application.c ++++ b/src/applet/abrt-applet-application.c +@@ -177,7 +177,7 @@ abrt_applet_application_init (AbrtAppletApplication *self) + g_signal_connect (network_monitor, "notify::connectivity", + G_CALLBACK (on_connectivity_changed), self); + g_signal_connect (network_monitor, "notify::network-available", +- G_CALLBACK (on_connectivity_changed), NULL); ++ G_CALLBACK (on_connectivity_changed), self); + + self->deferred_problems = g_ptr_array_new_with_free_func (g_object_unref); + } +-- +2.26.2 + diff --git a/0002-applet-Chain-up-in-dispose.patch b/0002-applet-Chain-up-in-dispose.patch new file mode 100644 index 0000000..7d749e1 --- /dev/null +++ b/0002-applet-Chain-up-in-dispose.patch @@ -0,0 +1,26 @@ +From b08e7cbd26704b0a5400fdfab1f3f2e3922b102f Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Fri, 15 May 2020 15:50:50 +0200 +Subject: [PATCH] applet: Chain up in dispose() + +Also something missed in 802a40a2f7c971b6533162e70b860e01ae3b5a27. +--- + src/applet/abrt-applet-application.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c +index 8ea653bb..52ed5529 100644 +--- a/src/applet/abrt-applet-application.c ++++ b/src/applet/abrt-applet-application.c +@@ -985,6 +985,8 @@ abrt_applet_application_dispose (GObject *object) + self = ABRT_APPLET_APPLICATION (object); + + g_clear_pointer (&self->deferred_problems, g_ptr_array_unref); ++ ++ G_OBJECT_CLASS (abrt_applet_application_parent_class)->dispose (object); + } + + static void +-- +2.26.2 + diff --git a/abrt.spec b/abrt.spec index 425aaf1..316471a 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,11 +49,14 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.2 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-applet-Pass-instance-pointer-to-signal-handler.patch +Patch1: 0002-applet-Chain-up-in-dispose.patch + BuildRequires: git-core BuildRequires: %{dbus_devel} BuildRequires: hostname @@ -1015,6 +1018,9 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Thu May 21 2020 Ernestas Kulik - 2.14.2-2 +- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1836190 + * Tue May 12 2020 Michal Fabik - 2.14.2-1 - Fix broken builds with --enable-authenticated-autoreporting From df2b2f2ba89bc808924448a437f8625356e97faa Mon Sep 17 00:00:00 2001 From: Ernestas Kulik Date: Tue, 28 Jul 2020 16:21:15 +0200 Subject: [PATCH 05/10] Add patch for #1860903 --- ...on-Fix-crash-when-processing-deferre.patch | 59 +++++++++++++++++++ abrt.spec | 6 +- 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 0003-applet-application-Fix-crash-when-processing-deferre.patch diff --git a/0003-applet-application-Fix-crash-when-processing-deferre.patch b/0003-applet-application-Fix-crash-when-processing-deferre.patch new file mode 100644 index 0000000..1cb1394 --- /dev/null +++ b/0003-applet-application-Fix-crash-when-processing-deferre.patch @@ -0,0 +1,59 @@ +From b28fcc053db224c11f1f88d2885eba88d60a7322 Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Tue, 28 Jul 2020 15:39:43 +0200 +Subject: [PATCH] applet: application: Fix crash when processing deferred + +Currently, when processing the deferred problems, if reporting fails, +the problem is re-added to the queue, but the object is not +re-referenced, leading to invalid reads later on. +--- + src/applet/abrt-applet-application.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c +index 28e55135..4716524b 100644 +--- a/src/applet/abrt-applet-application.c ++++ b/src/applet/abrt-applet-application.c +@@ -771,11 +771,9 @@ handle_event_output_cb (GIOChannel *gio, + gpointer data) + { + EventProcessingState *state; +- AbrtAppletProblemInfo *problem_info; + int status; + + state = data; +- problem_info = state->problem_info; + + /* Read streamed data and split lines */ + for (;;) +@@ -836,21 +834,23 @@ handle_event_output_cb (GIOChannel *gio, + + if (WIFEXITED (status) && WEXITSTATUS (status) == EXIT_STOP_EVENT_RUN) + { +- abrt_applet_problem_info_set_known (problem_info, true); ++ abrt_applet_problem_info_set_known (state->problem_info, true); + status = 0; + } + + if (status == 0) + { +- abrt_applet_problem_info_set_reported (problem_info, true); ++ abrt_applet_problem_info_set_reported (state->problem_info, true); + + log_debug ("fast report finished successfully"); +- abrt_applet_application_send_problem_notification (state->application, problem_info); ++ abrt_applet_application_send_problem_notification (state->application, ++ state->problem_info); + } + else + { + log_debug ("fast report failed, deferring"); +- g_ptr_array_add (state->application->deferred_problems, problem_info); ++ g_ptr_array_add (state->application->deferred_problems, ++ g_steal_pointer (&state->problem_info)); + } + + event_processing_state_free (state); +-- +2.26.2 + diff --git a/abrt.spec b/abrt.spec index 316471a..b7c8ae6 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,13 +49,14 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz Patch0: 0001-applet-Pass-instance-pointer-to-signal-handler.patch Patch1: 0002-applet-Chain-up-in-dispose.patch +Patch2: 0003-applet-application-Fix-crash-when-processing-deferre.patch BuildRequires: git-core BuildRequires: %{dbus_devel} @@ -1018,6 +1019,9 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Tue Jul 28 2020 - Ernestas Kulik - 2.14.2-3 +- Add patch for https://bugzilla.redhat.com/show_bug.cgi?id=1860903 + * Thu May 21 2020 Ernestas Kulik - 2.14.2-2 - Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1836190 From e6532a103b29b3cfa291ada5a49ea3df885c7b34 Mon Sep 17 00:00:00 2001 From: Michal Fabik Date: Mon, 24 Aug 2020 11:16:10 +0200 Subject: [PATCH 06/10] New upstream release 2.14.4 Signed-off-by: Michal Fabik --- .gitignore | 1 + abrt.spec | 66 +++++++++++++++++++++++++++++------------------------- sources | 2 +- 3 files changed, 37 insertions(+), 32 deletions(-) diff --git a/.gitignore b/.gitignore index 16cc618..c6d510d 100644 --- a/.gitignore +++ b/.gitignore @@ -71,3 +71,4 @@ abrt-1.1.13.tar.gz /abrt-2.14.0.tar.gz /abrt-2.14.1.tar.gz /abrt-2.14.2.tar.gz +/abrt-2.14.4.tar.gz diff --git a/abrt.spec b/abrt.spec index b7c8ae6..e549fd2 100644 --- a/abrt.spec +++ b/abrt.spec @@ -43,21 +43,17 @@ %define docdirversion -%{version} %endif -%define libreport_ver 2.13.0 +%define libreport_ver 2.14.0 %define satyr_ver 0.24 Summary: Automatic bug detection and reporting tool Name: abrt -Version: 2.14.2 -Release: 3%{?dist} +Version: 2.14.4 +Release: 1%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: 0001-applet-Pass-instance-pointer-to-signal-handler.patch -Patch1: 0002-applet-Chain-up-in-dispose.patch -Patch2: 0003-applet-application-Fix-crash-when-processing-deferre.patch - BuildRequires: git-core BuildRequires: %{dbus_devel} BuildRequires: hostname @@ -83,6 +79,7 @@ BuildRequires: libselinux-devel BuildRequires: python3-devel BuildRequires: python3-systemd BuildRequires: python3-argcomplete +BuildRequires: python3-dbus %endif Requires: libreport >= %{libreport_ver} @@ -106,9 +103,6 @@ Requires: python3-dbus Requires: dmidecode %endif Requires: libreport-plugin-ureport -%if 0%{?rhel} -Requires: libreport-plugin-rhtsupport -%endif %if 0%{?fedora} Requires: libreport-plugin-systemd-journal %endif @@ -274,7 +268,8 @@ Summary: %{name}'s pstore oops addon Requires: %{name} = %{version}-%{release} Requires: abrt-libs = %{version}-%{release} Requires: abrt-addon-kerneloops -Obsoletes: abrt-addon-uefioops +Obsoletes: abrt-addon-uefioops <= 2.1.6 +Provides: abrt-addon-uefioops = %{version}-%{release} %description addon-pstoreoops This package contains plugin for collecting kernel oopses from pstore storage. @@ -283,7 +278,7 @@ This package contains plugin for collecting kernel oopses from pstore storage. %package plugin-bodhi Summary: %{name}'s bodhi plugin Requires: %{name} = %{version}-%{release} -Obsoletes: libreport-plugin-bodhi > 0.0.1 +Obsoletes: libreport-plugin-bodhi <= 2.0.10 Provides: libreport-plugin-bodhi = %{version}-%{release} %description plugin-bodhi @@ -360,10 +355,7 @@ Requires: abrt-addon-ccpp Requires: python3-abrt-addon %endif Requires: abrt-addon-xorg -%if 0%{?rhel} -Requires: libreport-rhel >= %{libreport_ver} -Requires: libreport-plugin-rhtsupport >= %{libreport_ver} -%else +%if ! 0%{?rhel} %if %{with retrace} Requires: abrt-retrace-client %endif @@ -403,10 +395,7 @@ Requires: abrt-addon-xorg Requires: gdb-headless Requires: abrt-gui Requires: gnome-abrt -%if 0%{?rhel} -Requires: libreport-rhel >= %{libreport_ver} -Requires: libreport-plugin-rhtsupport >= %{libreport_ver} -%else +%if ! 0%{?rhel} %if %{with retrace} Requires: abrt-retrace-client %endif @@ -506,9 +495,6 @@ CFLAGS="%{optflags} -Werror" %configure \ %if %{without retrace} --without-retrace \ %endif -%if 0%{?rhel} - --enable-authenticated-autoreporting \ -%endif %ifnarch %{arm} --enable-native-unwinder \ %endif @@ -559,8 +545,7 @@ rm -f %{buildroot}%{_infodir}/dir %check make check|| { # find and print the logs of failed test - # do not cat tests/testsuite.log because it contains a lot of bloat - find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \; + find src -name "test-suite.log" -print -exec cat '{}' \; exit 1 } @@ -576,10 +561,12 @@ exit 0 %systemd_post abrtd.service %post addon-ccpp -# this is required for transition from 1.1.x to 2.x -# because /cache/abrt-di/* was created under root with root:root -# so 2.x fails when it tries to extract debuginfo there.. -chown -R abrt:abrt %{_localstatedir}/cache/abrt-di +# migration from 2.14.1.18 +if [ ! -e "%{_localstatedir}/cache/abrt-di/.migration-group-add" ]; then + chmod -R g+w %{_localstatedir}/cache/abrt-di + touch "%{_localstatedir}/cache/abrt-di/.migration-group-add" +fi + %systemd_post abrt-journal-core.service %journal_catalog_update @@ -822,8 +809,8 @@ killall abrt-dbus >/dev/null 2>&1 || : %dir %{_localstatedir}/lib/abrt -# attr(6755) ~= SETUID|SETGID -%attr(6755, abrt, abrt) %{_libexecdir}/abrt-action-install-debuginfo-to-abrt-cache +# attr(2755) ~= SETGID +%attr(2755, abrt, abrt) %{_libexecdir}/abrt-action-install-debuginfo-to-abrt-cache %{_bindir}/abrt-action-analyze-c %{_bindir}/abrt-action-trim-files @@ -1019,6 +1006,23 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Mon Aug 24 2020 Michal Fabik - 2.14.4-1 +- oops-utils: Respect the 'world-readable' flag +- Decommission libreport_list_free_with_free +- plugins: abrt-dump-journal-core: Handle zstd compression +- applet: application: Use GLib for logging +- Replace various utility functions with stock GLib ones +- Various coding style improvements +- Update documentation +- applet: application: Fix crash when processing deferred problems +- dbus: Remove session objects when owner disconnects +- python-problem: Use org.freedesktop.Problems2 API +- abrt-console-notification: Work around noclobber +- daemon: rpm: Use NEVRA instead of ENVRA +- abrtd: Don't delete new problem dirs +- Make sure that former caches are group writable +- Various memory management fixes + * Tue Jul 28 2020 - Ernestas Kulik - 2.14.2-3 - Add patch for https://bugzilla.redhat.com/show_bug.cgi?id=1860903 diff --git a/sources b/sources index ad6df13..c3a1c22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abrt-2.14.2.tar.gz) = 020bd0550c41b2358a718a4f0f0c3a839d86fd46fc0c4f4cfc4b7d7f851baf2d5179e008ac1912b350f9f0fbfbfee94e422de3aadce5eb0f7f84a04f233349ff +SHA512 (abrt-2.14.4.tar.gz) = b45808453187743c165914f7e72fcbca57684cb93a043fecd36414094ae8423fa661e6e07176773a15aaf468013386be300283e0d1b9d102d2e381ee9154e111 From 3f755a6a01658f5edcdd52fbd4c4f8bc846e9cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= Date: Thu, 24 Sep 2020 10:07:28 +0200 Subject: [PATCH 07/10] Add patch for #1881745 --- ...s-instance-pointer-to-signal-handler.patch | 28 --------- 0001-hooklib-Don-t-g_autofree-backtrace.patch | 40 +++++++++++++ 0002-applet-Chain-up-in-dispose.patch | 26 -------- ...on-Fix-crash-when-processing-deferre.patch | 59 ------------------- abrt.spec | 7 ++- 5 files changed, 46 insertions(+), 114 deletions(-) delete mode 100644 0001-applet-Pass-instance-pointer-to-signal-handler.patch create mode 100644 0001-hooklib-Don-t-g_autofree-backtrace.patch delete mode 100644 0002-applet-Chain-up-in-dispose.patch delete mode 100644 0003-applet-application-Fix-crash-when-processing-deferre.patch diff --git a/0001-applet-Pass-instance-pointer-to-signal-handler.patch b/0001-applet-Pass-instance-pointer-to-signal-handler.patch deleted file mode 100644 index 9010657..0000000 --- a/0001-applet-Pass-instance-pointer-to-signal-handler.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 5618985d3d7f830ebba0ef78e2ee6d3d6f9f6c55 Mon Sep 17 00:00:00 2001 -From: Ernestas Kulik -Date: Fri, 15 May 2020 15:49:59 +0200 -Subject: [PATCH] applet: Pass instance pointer to signal handler - -Some fallout from 802a40a2f7c971b6533162e70b860e01ae3b5a27. - -https://bugzilla.redhat.com/show_bug.cgi?id=1836190 ---- - src/applet/abrt-applet-application.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c -index d982c9f9..8ea653bb 100644 ---- a/src/applet/abrt-applet-application.c -+++ b/src/applet/abrt-applet-application.c -@@ -177,7 +177,7 @@ abrt_applet_application_init (AbrtAppletApplication *self) - g_signal_connect (network_monitor, "notify::connectivity", - G_CALLBACK (on_connectivity_changed), self); - g_signal_connect (network_monitor, "notify::network-available", -- G_CALLBACK (on_connectivity_changed), NULL); -+ G_CALLBACK (on_connectivity_changed), self); - - self->deferred_problems = g_ptr_array_new_with_free_func (g_object_unref); - } --- -2.26.2 - diff --git a/0001-hooklib-Don-t-g_autofree-backtrace.patch b/0001-hooklib-Don-t-g_autofree-backtrace.patch new file mode 100644 index 0000000..1225177 --- /dev/null +++ b/0001-hooklib-Don-t-g_autofree-backtrace.patch @@ -0,0 +1,40 @@ +From 1f2963b0611d4023957abe3c7391eab86256ba82 Mon Sep 17 00:00:00 2001 +From: Michal Fabik +Date: Wed, 23 Sep 2020 16:55:25 +0200 +Subject: [PATCH] hooklib: Don't g_autofree backtrace + +The result of abrt_get_backtrace was being freed every time, even when +no error occured. + +Resolves: +https://github.com/abrt/abrt/issues/1528 +https://bugzilla.redhat.com/show_bug.cgi?id=1881745 +Signed-off-by: Michal Fabik +--- + src/lib/hooklib.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c +index dceaeb16..56b77bc3 100644 +--- a/src/lib/hooklib.c ++++ b/src/lib/hooklib.c +@@ -348,7 +348,7 @@ char *abrt_get_backtrace(struct dump_dir *dd, unsigned timeout_sec, const char * + unsigned bt_depth = 1024; + const char *thread_apply_all = "thread apply all -ascending"; + const char *full = "full "; +- g_autofree char *bt = NULL; ++ char *bt = NULL; + while (1) + { + args[bt_cmd_index] = g_strdup_printf("%s backtrace %s%u", thread_apply_all, full, bt_depth); +@@ -367,6 +367,7 @@ char *abrt_get_backtrace(struct dump_dir *dd, unsigned timeout_sec, const char * + /* (NB: in fact, current impl. of exec_vp() never returns NULL) */ + log_warning("Failed to generate backtrace, reducing depth to %u", + bt_depth); ++ free(bt); + + /* Replace -ex disassemble (which disasms entire function $pc points to) + * to a version which analyzes limited, small patch of code around $pc. +-- +2.26.2 + diff --git a/0002-applet-Chain-up-in-dispose.patch b/0002-applet-Chain-up-in-dispose.patch deleted file mode 100644 index 7d749e1..0000000 --- a/0002-applet-Chain-up-in-dispose.patch +++ /dev/null @@ -1,26 +0,0 @@ -From b08e7cbd26704b0a5400fdfab1f3f2e3922b102f Mon Sep 17 00:00:00 2001 -From: Ernestas Kulik -Date: Fri, 15 May 2020 15:50:50 +0200 -Subject: [PATCH] applet: Chain up in dispose() - -Also something missed in 802a40a2f7c971b6533162e70b860e01ae3b5a27. ---- - src/applet/abrt-applet-application.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c -index 8ea653bb..52ed5529 100644 ---- a/src/applet/abrt-applet-application.c -+++ b/src/applet/abrt-applet-application.c -@@ -985,6 +985,8 @@ abrt_applet_application_dispose (GObject *object) - self = ABRT_APPLET_APPLICATION (object); - - g_clear_pointer (&self->deferred_problems, g_ptr_array_unref); -+ -+ G_OBJECT_CLASS (abrt_applet_application_parent_class)->dispose (object); - } - - static void --- -2.26.2 - diff --git a/0003-applet-application-Fix-crash-when-processing-deferre.patch b/0003-applet-application-Fix-crash-when-processing-deferre.patch deleted file mode 100644 index 1cb1394..0000000 --- a/0003-applet-application-Fix-crash-when-processing-deferre.patch +++ /dev/null @@ -1,59 +0,0 @@ -From b28fcc053db224c11f1f88d2885eba88d60a7322 Mon Sep 17 00:00:00 2001 -From: Ernestas Kulik -Date: Tue, 28 Jul 2020 15:39:43 +0200 -Subject: [PATCH] applet: application: Fix crash when processing deferred - -Currently, when processing the deferred problems, if reporting fails, -the problem is re-added to the queue, but the object is not -re-referenced, leading to invalid reads later on. ---- - src/applet/abrt-applet-application.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c -index 28e55135..4716524b 100644 ---- a/src/applet/abrt-applet-application.c -+++ b/src/applet/abrt-applet-application.c -@@ -771,11 +771,9 @@ handle_event_output_cb (GIOChannel *gio, - gpointer data) - { - EventProcessingState *state; -- AbrtAppletProblemInfo *problem_info; - int status; - - state = data; -- problem_info = state->problem_info; - - /* Read streamed data and split lines */ - for (;;) -@@ -836,21 +834,23 @@ handle_event_output_cb (GIOChannel *gio, - - if (WIFEXITED (status) && WEXITSTATUS (status) == EXIT_STOP_EVENT_RUN) - { -- abrt_applet_problem_info_set_known (problem_info, true); -+ abrt_applet_problem_info_set_known (state->problem_info, true); - status = 0; - } - - if (status == 0) - { -- abrt_applet_problem_info_set_reported (problem_info, true); -+ abrt_applet_problem_info_set_reported (state->problem_info, true); - - log_debug ("fast report finished successfully"); -- abrt_applet_application_send_problem_notification (state->application, problem_info); -+ abrt_applet_application_send_problem_notification (state->application, -+ state->problem_info); - } - else - { - log_debug ("fast report failed, deferring"); -- g_ptr_array_add (state->application->deferred_problems, problem_info); -+ g_ptr_array_add (state->application->deferred_problems, -+ g_steal_pointer (&state->problem_info)); - } - - event_processing_state_free (state); --- -2.26.2 - diff --git a/abrt.spec b/abrt.spec index e549fd2..5485897 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,11 +49,13 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.4 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-hooklib-Don-t-g_autofree-backtrace.patch + BuildRequires: git-core BuildRequires: %{dbus_devel} BuildRequires: hostname @@ -1006,6 +1008,9 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Thu Sep 24 2020 Matěj Grabovský - 2.14.4-2 +- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1881745 + * Mon Aug 24 2020 Michal Fabik - 2.14.4-1 - oops-utils: Respect the 'world-readable' flag - Decommission libreport_list_free_with_free From 4b27be9b9324514526c1094f03dbfe60421c7cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= Date: Thu, 24 Sep 2020 10:43:31 +0200 Subject: [PATCH 08/10] Partially revert "Add patch for #1881745" abrt 2.14.2 and earlier are not affected by #1881745. This reverts commit 3f755a6a01658f5edcdd52fbd4c4f8bc846e9cc2. --- 0001-hooklib-Don-t-g_autofree-backtrace.patch | 40 ------------------- abrt.spec | 7 +--- 2 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 0001-hooklib-Don-t-g_autofree-backtrace.patch diff --git a/0001-hooklib-Don-t-g_autofree-backtrace.patch b/0001-hooklib-Don-t-g_autofree-backtrace.patch deleted file mode 100644 index 1225177..0000000 --- a/0001-hooklib-Don-t-g_autofree-backtrace.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 1f2963b0611d4023957abe3c7391eab86256ba82 Mon Sep 17 00:00:00 2001 -From: Michal Fabik -Date: Wed, 23 Sep 2020 16:55:25 +0200 -Subject: [PATCH] hooklib: Don't g_autofree backtrace - -The result of abrt_get_backtrace was being freed every time, even when -no error occured. - -Resolves: -https://github.com/abrt/abrt/issues/1528 -https://bugzilla.redhat.com/show_bug.cgi?id=1881745 -Signed-off-by: Michal Fabik ---- - src/lib/hooklib.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/lib/hooklib.c b/src/lib/hooklib.c -index dceaeb16..56b77bc3 100644 ---- a/src/lib/hooklib.c -+++ b/src/lib/hooklib.c -@@ -348,7 +348,7 @@ char *abrt_get_backtrace(struct dump_dir *dd, unsigned timeout_sec, const char * - unsigned bt_depth = 1024; - const char *thread_apply_all = "thread apply all -ascending"; - const char *full = "full "; -- g_autofree char *bt = NULL; -+ char *bt = NULL; - while (1) - { - args[bt_cmd_index] = g_strdup_printf("%s backtrace %s%u", thread_apply_all, full, bt_depth); -@@ -367,6 +367,7 @@ char *abrt_get_backtrace(struct dump_dir *dd, unsigned timeout_sec, const char * - /* (NB: in fact, current impl. of exec_vp() never returns NULL) */ - log_warning("Failed to generate backtrace, reducing depth to %u", - bt_depth); -+ free(bt); - - /* Replace -ex disassemble (which disasms entire function $pc points to) - * to a version which analyzes limited, small patch of code around $pc. --- -2.26.2 - diff --git a/abrt.spec b/abrt.spec index 5485897..e549fd2 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,13 +49,11 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.4 -Release: 2%{?dist} +Release: 1%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0: 0001-hooklib-Don-t-g_autofree-backtrace.patch - BuildRequires: git-core BuildRequires: %{dbus_devel} BuildRequires: hostname @@ -1008,9 +1006,6 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog -* Thu Sep 24 2020 Matěj Grabovský - 2.14.4-2 -- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1881745 - * Mon Aug 24 2020 Michal Fabik - 2.14.4-1 - oops-utils: Respect the 'world-readable' flag - Decommission libreport_list_free_with_free From 0d97e1de9de84290d8db8794a542e88b2d4c2319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= Date: Thu, 17 Dec 2020 14:05:19 +0100 Subject: [PATCH 09/10] Revert to state after release of 2.14.2-3 --- .gitignore | 1 - ...s-instance-pointer-to-signal-handler.patch | 28 ++++++++ 0002-applet-Chain-up-in-dispose.patch | 26 ++++++++ ...on-Fix-crash-when-processing-deferre.patch | 59 +++++++++++++++++ abrt.spec | 66 +++++++++---------- sources | 2 +- 6 files changed, 145 insertions(+), 37 deletions(-) create mode 100644 0001-applet-Pass-instance-pointer-to-signal-handler.patch create mode 100644 0002-applet-Chain-up-in-dispose.patch create mode 100644 0003-applet-application-Fix-crash-when-processing-deferre.patch diff --git a/.gitignore b/.gitignore index c6d510d..16cc618 100644 --- a/.gitignore +++ b/.gitignore @@ -71,4 +71,3 @@ abrt-1.1.13.tar.gz /abrt-2.14.0.tar.gz /abrt-2.14.1.tar.gz /abrt-2.14.2.tar.gz -/abrt-2.14.4.tar.gz diff --git a/0001-applet-Pass-instance-pointer-to-signal-handler.patch b/0001-applet-Pass-instance-pointer-to-signal-handler.patch new file mode 100644 index 0000000..9010657 --- /dev/null +++ b/0001-applet-Pass-instance-pointer-to-signal-handler.patch @@ -0,0 +1,28 @@ +From 5618985d3d7f830ebba0ef78e2ee6d3d6f9f6c55 Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Fri, 15 May 2020 15:49:59 +0200 +Subject: [PATCH] applet: Pass instance pointer to signal handler + +Some fallout from 802a40a2f7c971b6533162e70b860e01ae3b5a27. + +https://bugzilla.redhat.com/show_bug.cgi?id=1836190 +--- + src/applet/abrt-applet-application.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c +index d982c9f9..8ea653bb 100644 +--- a/src/applet/abrt-applet-application.c ++++ b/src/applet/abrt-applet-application.c +@@ -177,7 +177,7 @@ abrt_applet_application_init (AbrtAppletApplication *self) + g_signal_connect (network_monitor, "notify::connectivity", + G_CALLBACK (on_connectivity_changed), self); + g_signal_connect (network_monitor, "notify::network-available", +- G_CALLBACK (on_connectivity_changed), NULL); ++ G_CALLBACK (on_connectivity_changed), self); + + self->deferred_problems = g_ptr_array_new_with_free_func (g_object_unref); + } +-- +2.26.2 + diff --git a/0002-applet-Chain-up-in-dispose.patch b/0002-applet-Chain-up-in-dispose.patch new file mode 100644 index 0000000..7d749e1 --- /dev/null +++ b/0002-applet-Chain-up-in-dispose.patch @@ -0,0 +1,26 @@ +From b08e7cbd26704b0a5400fdfab1f3f2e3922b102f Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Fri, 15 May 2020 15:50:50 +0200 +Subject: [PATCH] applet: Chain up in dispose() + +Also something missed in 802a40a2f7c971b6533162e70b860e01ae3b5a27. +--- + src/applet/abrt-applet-application.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c +index 8ea653bb..52ed5529 100644 +--- a/src/applet/abrt-applet-application.c ++++ b/src/applet/abrt-applet-application.c +@@ -985,6 +985,8 @@ abrt_applet_application_dispose (GObject *object) + self = ABRT_APPLET_APPLICATION (object); + + g_clear_pointer (&self->deferred_problems, g_ptr_array_unref); ++ ++ G_OBJECT_CLASS (abrt_applet_application_parent_class)->dispose (object); + } + + static void +-- +2.26.2 + diff --git a/0003-applet-application-Fix-crash-when-processing-deferre.patch b/0003-applet-application-Fix-crash-when-processing-deferre.patch new file mode 100644 index 0000000..1cb1394 --- /dev/null +++ b/0003-applet-application-Fix-crash-when-processing-deferre.patch @@ -0,0 +1,59 @@ +From b28fcc053db224c11f1f88d2885eba88d60a7322 Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Tue, 28 Jul 2020 15:39:43 +0200 +Subject: [PATCH] applet: application: Fix crash when processing deferred + +Currently, when processing the deferred problems, if reporting fails, +the problem is re-added to the queue, but the object is not +re-referenced, leading to invalid reads later on. +--- + src/applet/abrt-applet-application.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c +index 28e55135..4716524b 100644 +--- a/src/applet/abrt-applet-application.c ++++ b/src/applet/abrt-applet-application.c +@@ -771,11 +771,9 @@ handle_event_output_cb (GIOChannel *gio, + gpointer data) + { + EventProcessingState *state; +- AbrtAppletProblemInfo *problem_info; + int status; + + state = data; +- problem_info = state->problem_info; + + /* Read streamed data and split lines */ + for (;;) +@@ -836,21 +834,23 @@ handle_event_output_cb (GIOChannel *gio, + + if (WIFEXITED (status) && WEXITSTATUS (status) == EXIT_STOP_EVENT_RUN) + { +- abrt_applet_problem_info_set_known (problem_info, true); ++ abrt_applet_problem_info_set_known (state->problem_info, true); + status = 0; + } + + if (status == 0) + { +- abrt_applet_problem_info_set_reported (problem_info, true); ++ abrt_applet_problem_info_set_reported (state->problem_info, true); + + log_debug ("fast report finished successfully"); +- abrt_applet_application_send_problem_notification (state->application, problem_info); ++ abrt_applet_application_send_problem_notification (state->application, ++ state->problem_info); + } + else + { + log_debug ("fast report failed, deferring"); +- g_ptr_array_add (state->application->deferred_problems, problem_info); ++ g_ptr_array_add (state->application->deferred_problems, ++ g_steal_pointer (&state->problem_info)); + } + + event_processing_state_free (state); +-- +2.26.2 + diff --git a/abrt.spec b/abrt.spec index e549fd2..b7c8ae6 100644 --- a/abrt.spec +++ b/abrt.spec @@ -43,17 +43,21 @@ %define docdirversion -%{version} %endif -%define libreport_ver 2.14.0 +%define libreport_ver 2.13.0 %define satyr_ver 0.24 Summary: Automatic bug detection and reporting tool Name: abrt -Version: 2.14.4 -Release: 1%{?dist} +Version: 2.14.2 +Release: 3%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-applet-Pass-instance-pointer-to-signal-handler.patch +Patch1: 0002-applet-Chain-up-in-dispose.patch +Patch2: 0003-applet-application-Fix-crash-when-processing-deferre.patch + BuildRequires: git-core BuildRequires: %{dbus_devel} BuildRequires: hostname @@ -79,7 +83,6 @@ BuildRequires: libselinux-devel BuildRequires: python3-devel BuildRequires: python3-systemd BuildRequires: python3-argcomplete -BuildRequires: python3-dbus %endif Requires: libreport >= %{libreport_ver} @@ -103,6 +106,9 @@ Requires: python3-dbus Requires: dmidecode %endif Requires: libreport-plugin-ureport +%if 0%{?rhel} +Requires: libreport-plugin-rhtsupport +%endif %if 0%{?fedora} Requires: libreport-plugin-systemd-journal %endif @@ -268,8 +274,7 @@ Summary: %{name}'s pstore oops addon Requires: %{name} = %{version}-%{release} Requires: abrt-libs = %{version}-%{release} Requires: abrt-addon-kerneloops -Obsoletes: abrt-addon-uefioops <= 2.1.6 -Provides: abrt-addon-uefioops = %{version}-%{release} +Obsoletes: abrt-addon-uefioops %description addon-pstoreoops This package contains plugin for collecting kernel oopses from pstore storage. @@ -278,7 +283,7 @@ This package contains plugin for collecting kernel oopses from pstore storage. %package plugin-bodhi Summary: %{name}'s bodhi plugin Requires: %{name} = %{version}-%{release} -Obsoletes: libreport-plugin-bodhi <= 2.0.10 +Obsoletes: libreport-plugin-bodhi > 0.0.1 Provides: libreport-plugin-bodhi = %{version}-%{release} %description plugin-bodhi @@ -355,7 +360,10 @@ Requires: abrt-addon-ccpp Requires: python3-abrt-addon %endif Requires: abrt-addon-xorg -%if ! 0%{?rhel} +%if 0%{?rhel} +Requires: libreport-rhel >= %{libreport_ver} +Requires: libreport-plugin-rhtsupport >= %{libreport_ver} +%else %if %{with retrace} Requires: abrt-retrace-client %endif @@ -395,7 +403,10 @@ Requires: abrt-addon-xorg Requires: gdb-headless Requires: abrt-gui Requires: gnome-abrt -%if ! 0%{?rhel} +%if 0%{?rhel} +Requires: libreport-rhel >= %{libreport_ver} +Requires: libreport-plugin-rhtsupport >= %{libreport_ver} +%else %if %{with retrace} Requires: abrt-retrace-client %endif @@ -495,6 +506,9 @@ CFLAGS="%{optflags} -Werror" %configure \ %if %{without retrace} --without-retrace \ %endif +%if 0%{?rhel} + --enable-authenticated-autoreporting \ +%endif %ifnarch %{arm} --enable-native-unwinder \ %endif @@ -545,7 +559,8 @@ rm -f %{buildroot}%{_infodir}/dir %check make check|| { # find and print the logs of failed test - find src -name "test-suite.log" -print -exec cat '{}' \; + # do not cat tests/testsuite.log because it contains a lot of bloat + find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \; exit 1 } @@ -561,12 +576,10 @@ exit 0 %systemd_post abrtd.service %post addon-ccpp -# migration from 2.14.1.18 -if [ ! -e "%{_localstatedir}/cache/abrt-di/.migration-group-add" ]; then - chmod -R g+w %{_localstatedir}/cache/abrt-di - touch "%{_localstatedir}/cache/abrt-di/.migration-group-add" -fi - +# this is required for transition from 1.1.x to 2.x +# because /cache/abrt-di/* was created under root with root:root +# so 2.x fails when it tries to extract debuginfo there.. +chown -R abrt:abrt %{_localstatedir}/cache/abrt-di %systemd_post abrt-journal-core.service %journal_catalog_update @@ -809,8 +822,8 @@ killall abrt-dbus >/dev/null 2>&1 || : %dir %{_localstatedir}/lib/abrt -# attr(2755) ~= SETGID -%attr(2755, abrt, abrt) %{_libexecdir}/abrt-action-install-debuginfo-to-abrt-cache +# attr(6755) ~= SETUID|SETGID +%attr(6755, abrt, abrt) %{_libexecdir}/abrt-action-install-debuginfo-to-abrt-cache %{_bindir}/abrt-action-analyze-c %{_bindir}/abrt-action-trim-files @@ -1006,23 +1019,6 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog -* Mon Aug 24 2020 Michal Fabik - 2.14.4-1 -- oops-utils: Respect the 'world-readable' flag -- Decommission libreport_list_free_with_free -- plugins: abrt-dump-journal-core: Handle zstd compression -- applet: application: Use GLib for logging -- Replace various utility functions with stock GLib ones -- Various coding style improvements -- Update documentation -- applet: application: Fix crash when processing deferred problems -- dbus: Remove session objects when owner disconnects -- python-problem: Use org.freedesktop.Problems2 API -- abrt-console-notification: Work around noclobber -- daemon: rpm: Use NEVRA instead of ENVRA -- abrtd: Don't delete new problem dirs -- Make sure that former caches are group writable -- Various memory management fixes - * Tue Jul 28 2020 - Ernestas Kulik - 2.14.2-3 - Add patch for https://bugzilla.redhat.com/show_bug.cgi?id=1860903 diff --git a/sources b/sources index c3a1c22..ad6df13 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (abrt-2.14.4.tar.gz) = b45808453187743c165914f7e72fcbca57684cb93a043fecd36414094ae8423fa661e6e07176773a15aaf468013386be300283e0d1b9d102d2e381ee9154e111 +SHA512 (abrt-2.14.2.tar.gz) = 020bd0550c41b2358a718a4f0f0c3a839d86fd46fc0c4f4cfc4b7d7f851baf2d5179e008ac1912b350f9f0fbfbfee94e422de3aadce5eb0f7f84a04f233349ff From c0ee465e7bbecaaa93c6f9d586a5067f9279a9d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= Date: Thu, 17 Dec 2020 13:49:30 +0100 Subject: [PATCH 10/10] Add fix for rhbz#1900982 --- ...aemon-rpm-Use-NEVRA-instead-of-ENVRA.patch | 208 ++++++++++++++++++ abrt.spec | 6 +- 2 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 0004-daemon-rpm-Use-NEVRA-instead-of-ENVRA.patch diff --git a/0004-daemon-rpm-Use-NEVRA-instead-of-ENVRA.patch b/0004-daemon-rpm-Use-NEVRA-instead-of-ENVRA.patch new file mode 100644 index 0000000..2ffb878 --- /dev/null +++ b/0004-daemon-rpm-Use-NEVRA-instead-of-ENVRA.patch @@ -0,0 +1,208 @@ +From 7013e4e0de5d3f1538475a92b08687924f5e01c2 Mon Sep 17 00:00:00 2001 +From: Ernestas Kulik +Date: Wed, 3 Jun 2020 14:49:50 +0200 +Subject: [PATCH] daemon: rpm: Use NEVRA instead of ENVRA + +libdnf is only able to parse package names in the NEVRA form, leading to +retrace-server bailing when retracing dumps from, say, gedit. + +Closes https://github.com/abrt/abrt/issues/1378 +Fixes https://github.com/abrt/retrace-server/issues/233 +--- + src/daemon/abrt-action-save-package-data.c | 12 +++++------ + src/daemon/rpm.c | 25 +++++++++++----------- + src/daemon/rpm.h | 8 +++---- + 3 files changed, 23 insertions(+), 22 deletions(-) + +diff --git a/src/daemon/abrt-action-save-package-data.c b/src/daemon/abrt-action-save-package-data.c +index 9373c2b1..de926383 100644 +--- a/src/daemon/abrt-action-save-package-data.c ++++ b/src/daemon/abrt-action-save-package-data.c +@@ -228,7 +228,7 @@ static bool is_path_blacklisted(const char *path) + return false; + } + +-static struct pkg_envra *get_script_name(const char *cmdline, char **executable, const char *chroot) ++static struct pkg_nevra *get_script_name(const char *cmdline, char **executable, const char *chroot) + { + // TODO: we don't verify that python executable is not modified + // or that python package is properly signed +@@ -237,7 +237,7 @@ static struct pkg_envra *get_script_name(const char *cmdline, char **executable, + * This will work only if the cmdline contains the whole path. + * Example: python /usr/bin/system-control-network + */ +- struct pkg_envra *script_pkg = NULL; ++ struct pkg_nevra *script_pkg = NULL; + char *script_name = get_argv1_if_full_path(cmdline); + if (script_name) + { +@@ -271,7 +271,7 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch + char *rootdir = NULL; + char *package_short_name = NULL; + char *fingerprint = NULL; +- struct pkg_envra *pkg_name = NULL; ++ struct pkg_nevra *pkg_name = NULL; + char *component = NULL; + char *kernel = NULL; + int error = 1; +@@ -353,7 +353,7 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch + if (g_regex_match_simple(DEFAULT_INTERPRETERS_REGEX, basename, G_REGEX_EXTENDED, /*MatchFlags*/0) || + g_list_find_custom(settings_Interpreters, basename, (GCompareFunc)g_strcmp0)) + { +- struct pkg_envra *script_pkg = get_script_name(cmdline, &executable, chroot); ++ struct pkg_nevra *script_pkg = get_script_name(cmdline, &executable, chroot); + /* executable may have changed, check it again */ + if (is_path_blacklisted(executable)) + { +@@ -379,7 +379,7 @@ static int SavePackageDescriptionToDebugDump(const char *dump_dir_name, const ch + goto ret0; + } + +- free_pkg_envra(pkg_name); ++ free_pkg_nevra(pkg_name); + pkg_name = script_pkg; + } + +@@ -460,7 +460,7 @@ skip_interpreter: + free(executable); + free(rootdir); + free(package_short_name); +- free_pkg_envra(pkg_name); ++ free_pkg_nevra(pkg_name); + free(component); + free(fingerprint); + +diff --git a/src/daemon/rpm.c b/src/daemon/rpm.c +index 07ad227e..d39901a6 100644 +--- a/src/daemon/rpm.c ++++ b/src/daemon/rpm.c +@@ -282,7 +282,7 @@ char* rpm_get_component(const char *filename, const char *rootdir_or_NULL) + + #ifdef HAVE_LIBRPM + #define pkg_add_id(name) \ +- static inline int pkg_add_##name(Header header, struct pkg_envra *p) \ ++ static inline int pkg_add_##name(Header header, struct pkg_nevra *p) \ + { \ + const char *errmsg = NULL; \ + p->p_##name = headerFormat(header, "%{"#name"}", &errmsg); \ +@@ -294,8 +294,8 @@ char* rpm_get_component(const char *filename, const char *rootdir_or_NULL) + return -1; \ + } \ + +-pkg_add_id(epoch); + pkg_add_id(name); ++pkg_add_id(epoch); + pkg_add_id(version); + pkg_add_id(release); + pkg_add_id(arch); +@@ -303,14 +303,14 @@ pkg_add_id(vendor); + #endif + + // caller is responsible to free returned value +-struct pkg_envra *rpm_get_package_nvr(const char *filename, const char *rootdir_or_NULL) ++struct pkg_nevra *rpm_get_package_nvr(const char *filename, const char *rootdir_or_NULL) + { + #ifdef HAVE_LIBRPM + rpmts ts; + rpmdbMatchIterator iter; + Header header; + +- struct pkg_envra *p = NULL; ++ struct pkg_nevra *p = NULL; + + if (rpm_query_file(&ts, &iter, &header, filename, rootdir_or_NULL) < 0) + return NULL; +@@ -320,6 +320,11 @@ struct pkg_envra *rpm_get_package_nvr(const char *filename, const char *rootdir_ + + p = libreport_xzalloc(sizeof(*p)); + int r; ++ ++ r = pkg_add_name(header, p); ++ if (r) ++ goto error; ++ + r = pkg_add_epoch(header, p); + if (r) + goto error; +@@ -333,10 +338,6 @@ struct pkg_envra *rpm_get_package_nvr(const char *filename, const char *rootdir_ + p->p_epoch = libreport_xstrdup("0"); + } + +- r = pkg_add_name(header, p); +- if (r) +- goto error; +- + r = pkg_add_version(header, p); + if (r) + goto error; +@@ -356,14 +357,14 @@ struct pkg_envra *rpm_get_package_nvr(const char *filename, const char *rootdir_ + if (strcmp(p->p_epoch, "0") == 0) + p->p_nvr = libreport_xasprintf("%s-%s-%s", p->p_name, p->p_version, p->p_release); + else +- p->p_nvr = libreport_xasprintf("%s:%s-%s-%s", p->p_epoch, p->p_name, p->p_version, p->p_release); ++ p->p_nvr = libreport_xasprintf("%s-%s:%s-%s", p->p_name, p->p_epoch, p->p_version, p->p_release); + + rpmdbFreeIterator(iter); + rpmtsFree(ts); + return p; + + error: +- free_pkg_envra(p); ++ free_pkg_nevra(p); + + rpmdbFreeIterator(iter); + rpmtsFree(ts); +@@ -373,14 +374,14 @@ struct pkg_envra *rpm_get_package_nvr(const char *filename, const char *rootdir_ + #endif + } + +-void free_pkg_envra(struct pkg_envra *p) ++void free_pkg_nevra(struct pkg_nevra *p) + { + if (!p) + return; + + free(p->p_vendor); +- free(p->p_epoch); + free(p->p_name); ++ free(p->p_epoch); + free(p->p_version); + free(p->p_release); + free(p->p_arch); +diff --git a/src/daemon/rpm.h b/src/daemon/rpm.h +index 1fd56e8f..90821f81 100644 +--- a/src/daemon/rpm.h ++++ b/src/daemon/rpm.h +@@ -26,17 +26,17 @@ + extern "C" { + #endif + +-struct pkg_envra { ++struct pkg_nevra { + char *p_nvr; +- char *p_epoch; + char *p_name; ++ char *p_epoch; + char *p_version; + char *p_release; + char *p_arch; + char *p_vendor; + }; + +-void free_pkg_envra(struct pkg_envra *p); ++void free_pkg_nevra(struct pkg_nevra *p); + + /** + * Checks if an application is modified by third party. +@@ -85,7 +85,7 @@ char *rpm_get_fingerprint(const char* pkg); + * @param filename A file name. + * @return A package name (malloc'ed string) + */ +-struct pkg_envra *rpm_get_package_nvr(const char *filename, const char *rootdir_or_NULL); ++struct pkg_nevra *rpm_get_package_nvr(const char *filename, const char *rootdir_or_NULL); + /** + * Finds a main package for given file. This package contains particular + * file. If the file doesn't belong to any package, empty string is +-- +2.26.2 + diff --git a/abrt.spec b/abrt.spec index b7c8ae6..37119c6 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,7 +49,7 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.14.2 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv2+ URL: https://abrt.readthedocs.org/ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz @@ -57,6 +57,7 @@ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.ta Patch0: 0001-applet-Pass-instance-pointer-to-signal-handler.patch Patch1: 0002-applet-Chain-up-in-dispose.patch Patch2: 0003-applet-application-Fix-crash-when-processing-deferre.patch +Patch3: 0004-daemon-rpm-Use-NEVRA-instead-of-ENVRA.patch BuildRequires: git-core BuildRequires: %{dbus_devel} @@ -1019,6 +1020,9 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Thu Dec 17 2020 Matěj Grabovský - 2.14.2-4 +- Add fix for https://bugzilla.redhat.com/show_bug.cgi?id=1900982 + * Tue Jul 28 2020 - Ernestas Kulik - 2.14.2-3 - Add patch for https://bugzilla.redhat.com/show_bug.cgi?id=1860903