update to 2.14.6

This commit is contained in:
penelope 2022-04-07 15:28:31 +08:00
parent 1bc788c35f
commit 3efde92bfa
7 changed files with 70 additions and 140 deletions

View File

@ -0,0 +1,57 @@
From 4755f2171aa50a72d8ec03260c8cbc602263a6c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Fri, 24 Sep 2021 17:48:07 +0200
Subject: [PATCH] Use lazy imports in abrt_exception_handler3
The abrt_exception_handler3 module is always imported when Python starts,
but all the modules imported from it (except sys) are only used during crashes.
Especially the systemd.journal import is really expensive.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2007664
---
src/hooks/abrt_exception_handler3.py.in | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/hooks/abrt_exception_handler3.py.in b/src/hooks/abrt_exception_handler3.py.in
index 89e2474b..0bc548e0 100644
--- a/src/hooks/abrt_exception_handler3.py.in
+++ b/src/hooks/abrt_exception_handler3.py.in
@@ -20,13 +20,15 @@
Module for the ABRT exception handling hook
"""
+# Avoid importing anything but sys here, use lazy imports.
+# This file is imported on every Python startup,
+# all unused imports only increase the startup time and memory usage.
import sys
-import os
-from systemd import journal
def syslog(msg):
"""Log message to system logger (journal)"""
+ from systemd import journal
journal.send(msg)
@@ -68,6 +70,8 @@ def send(data):
def write_dump(tb_text, tb):
+ import os
+
if sys.argv[0][0] == "/":
executable = os.path.abspath(sys.argv[0])
else:
@@ -118,6 +122,7 @@ def handle_exception(etype, value, tb):
sys.excepthook = sys.__excepthook__ # pylint: disable-msg=E1101
import errno
+ import os
# Ignore Ctrl-C
# SystemExit rhbz#636913 -> this exception is not an error
--
2.31.1

View File

@ -1,28 +0,0 @@
From 5618985d3d7f830ebba0ef78e2ee6d3d6f9f6c55 Mon Sep 17 00:00:00 2001
From: Ernestas Kulik <ekulik@redhat.com>
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

View File

@ -1,26 +0,0 @@
From b08e7cbd26704b0a5400fdfab1f3f2e3922b102f Mon Sep 17 00:00:00 2001
From: Ernestas Kulik <ekulik@redhat.com>
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

View File

@ -1,59 +0,0 @@
From b28fcc053db224c11f1f88d2885eba88d60a7322 Mon Sep 17 00:00:00 2001
From: Ernestas Kulik <ekulik@redhat.com>
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

Binary file not shown.

BIN
abrt-2.14.6.tar.gz Normal file

Binary file not shown.

View File

@ -1,22 +1,20 @@
Name: abrt Name: abrt
Version: 2.14.2 Version: 2.14.6
Release: 4 Release: 1
Summary: A tool for automatic bug detection and reporting Summary: A tool for automatic bug detection and reporting
License: GPL-2.0 and GPL-2.0+ License: GPL-2.0 and GPL-2.0+
URL: https://github.com/abrt/abrt/ URL: https://github.com/abrt/abrt/
Source: https://github.com/abrt/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source: https://github.com/abrt/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0001: 0001-applet-Pass-instance-pointer-to-signal-handler.patch Patch0001: 0001-Use-lazy-imports-in-abrt_exception_handler3.patch
Patch0002: 0002-applet-Chain-up-in-dispose.patch
Patch0003: 0003-applet-application-Fix-crash-when-processing-deferre.patch
BuildRequires: git-core dbus-devel hostname gtk3-devel glib2-devel >= 2.43.4 rpm-devel >= 4.6 BuildRequires: git-core dbus-devel hostname gtk3-devel glib2-devel >= 2.43.4 rpm-devel >= 4.6
BuildRequires: desktop-file-utils libnotify-devel gettext libxml2-devel intltool libtool BuildRequires: desktop-file-utils libnotify-devel gettext libxml2-devel intltool libtool
BuildRequires: libsoup-devel asciidoc doxygen xmlto libreport-devel >= 2.13.0 python3-pytest BuildRequires: libsoup-devel asciidoc doxygen xmlto libreport-devel >= 2.13.0 python3-pytest
BuildRequires: satyr-devel >= 0.24 augeas libselinux-devel python3-devel python3-systemd BuildRequires: satyr-devel >= 0.24 augeas libselinux-devel python3-devel python3-systemd
BuildRequires: python3-nose python3-sphinx python3-libreport python3-devel python3-argcomplete BuildRequires: python3-nose2 python3-sphinx python3-libreport python3-devel python3-argcomplete
BuildRequires: libreport-gtk-devel >= 2.13.0 gsettings-desktop-schemas-devel >= 3.15 BuildRequires: libreport-gtk-devel >= 2.13.0 gsettings-desktop-schemas-devel >= 3.15
BuildRequires: gdb-headless libcap-devel systemd-devel json-c-devel gdb-headless polkit-devel BuildRequires: gdb-headless libcap-devel systemd-devel json-c-devel gdb-headless polkit-devel python3-dbus
Requires: libreport >= 2.13.0 satyr >= 0.24 Requires: libreport >= 2.13.0 satyr >= 0.24
@ -24,6 +22,7 @@ Requires: systemd python3-%{name} = %{version}-%{release} python3-augeas py
Requires: dmidecode Requires: dmidecode
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
Obsoletes: abrt-plugin-sosreport < 2.14.5
Requires(pre): shadow-utils Requires(pre): shadow-utils
%{?systemd_requires} %{?systemd_requires}
@ -117,7 +116,7 @@ from Xorg log.
%package addon-vmcore %package addon-vmcore
Summary: Vmcore addon module for abrt Summary: Vmcore addon module for abrt
Requires: %{name} = %{version}-%{release} abrt-addon-kerneloops kexec-tools Requires: %{name} = %{version}-%{release} abrt-addon-kerneloops kexec-tools
Requires: python3-abrt python3-augeas util-linux Requires: python3-abrt python3-augeas util-linux python3-systemd
%description addon-vmcore %description addon-vmcore
This package provides plugin which helps to collect kernel crash information This package provides plugin which helps to collect kernel crash information
@ -150,14 +149,6 @@ Requires: container-exception-logger
This package provides python3 hook and handling uncaught exception in python3 This package provides python3 hook and handling uncaught exception in python3
container's programs. container's programs.
%package plugin-sosreport
Summary: Plugin for building automatic sosreports for abrt
Requires: sos >= 3.6 %{name} = %{version}-%{release}
%description plugin-sosreport
This package provides a configuration snippet for abrt events which used to enable
automatic generation of sosreports.
%package plugin-machine-id %package plugin-machine-id
Summary: Plugin to generate machine_id based off dmidecode for abrt Summary: Plugin to generate machine_id based off dmidecode for abrt
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -249,10 +240,8 @@ someone logs in to the shell.
%autosetup -n %{name}-%{version} -p1 %autosetup -n %{name}-%{version} -p1
%build %build
autoscan ./autogen.sh
aclocal
autoconf
automake --add-missing
CFLAGS="%{optflags}" %configure \ CFLAGS="%{optflags}" %configure \
--without-bodhi \ --without-bodhi \
@ -285,10 +274,7 @@ ln -sf %{_bindir}/abrt %{buildroot}%{_bindir}/abrt-cli
ln -sf %{_mandir}/man1/abrt.1 %{buildroot}%{_mandir}/man1/abrt-cli.1 ln -sf %{_mandir}/man1/abrt.1 %{buildroot}%{_mandir}/man1/abrt-cli.1
%check %check
make check|| { make check
find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \;
exit 1
}
%pre %pre
%define abrt_gid_uid 173 %define abrt_gid_uid 173
@ -569,9 +555,6 @@ killall abrt-dbus >/dev/null 2>&1 || :
%{python3_sitelib}/abrt_exception_handler3_container.py %{python3_sitelib}/abrt_exception_handler3_container.py
%{python3_sitelib}/__pycache__/abrt_exception_handler3_container.* %{python3_sitelib}/__pycache__/abrt_exception_handler3_container.*
%files plugin-sosreport
%config(noreplace) %{_sysconfdir}/libreport/events.d/sosreport_event.conf
%files plugin-machine-id %files plugin-machine-id
%config(noreplace) %{_sysconfdir}/libreport/events.d/machine-id_event.conf %config(noreplace) %{_sysconfdir}/libreport/events.d/machine-id_event.conf
%{_libexecdir}/abrt-action-generate-machine-id %{_libexecdir}/abrt-action-generate-machine-id
@ -613,6 +596,9 @@ killall abrt-dbus >/dev/null 2>&1 || :
%{_mandir}/man*/* %{_mandir}/man*/*
%changelog %changelog
* Thu Apr 07 2022 yangping <yangping69@h-partners.com> - 2.14.6-1
- update to v2.14.6
* Wed May 19 2021 lingsheng <lingsheng@huawei.com> - 2.14.2-4 * Wed May 19 2021 lingsheng <lingsheng@huawei.com> - 2.14.2-4
- Add back cli desktop console-notification sub packages - Add back cli desktop console-notification sub packages