Compare commits
No commits in common. "2ed7935aec229a7f55efb77defb86eee59716aa7" and "22a6d8ad83b5f9b2218e2ecc7cca8bb629ed9a86" have entirely different histories.
2ed7935aec
...
22a6d8ad83
@ -1,57 +0,0 @@
|
||||
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
|
||||
|
||||
28
0001-applet-Pass-instance-pointer-to-signal-handler.patch
Normal file
28
0001-applet-Pass-instance-pointer-to-signal-handler.patch
Normal file
@ -0,0 +1,28 @@
|
||||
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
|
||||
|
||||
26
0002-applet-Chain-up-in-dispose.patch
Normal file
26
0002-applet-Chain-up-in-dispose.patch
Normal file
@ -0,0 +1,26 @@
|
||||
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
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
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
|
||||
|
||||
BIN
abrt-2.14.2.tar.gz
Normal file
BIN
abrt-2.14.2.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
94
abrt.spec
94
abrt.spec
@ -1,20 +1,22 @@
|
||||
Name: abrt
|
||||
Version: 2.14.6
|
||||
Version: 2.14.2
|
||||
Release: 1
|
||||
Summary: A tool for automatic bug detection and reporting
|
||||
License: GPL-2.0 and GPL-2.0+
|
||||
URL: https://github.com/abrt/abrt/
|
||||
Source: https://github.com/abrt/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
License: GPLv2+
|
||||
URL: https://abrt.readthedocs.org/
|
||||
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
Patch0: 0001-Use-lazy-imports-in-abrt_exception_handler3.patch
|
||||
Patch0001: 0001-applet-Pass-instance-pointer-to-signal-handler.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: desktop-file-utils libnotify-devel gettext libxml2-devel intltool libtool
|
||||
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: python3-nose2 python3-sphinx python3-libreport python3-devel python3-argcomplete
|
||||
BuildRequires: python3-nose python3-sphinx python3-libreport python3-devel python3-argcomplete
|
||||
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 python3-dbus
|
||||
BuildRequires: gdb-headless libcap-devel systemd-devel json-c-devel gdb-headless polkit-devel
|
||||
|
||||
|
||||
Requires: libreport >= 2.13.0 satyr >= 0.24
|
||||
@ -22,7 +24,6 @@ Requires: systemd python3-%{name} = %{version}-%{release} python3-augeas py
|
||||
Requires: dmidecode
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
|
||||
Obsoletes: abrt-plugin-sosreport < 2.14.5
|
||||
Requires(pre): shadow-utils
|
||||
%{?systemd_requires}
|
||||
|
||||
@ -116,7 +117,7 @@ from Xorg log.
|
||||
%package addon-vmcore
|
||||
Summary: Vmcore addon module for abrt
|
||||
Requires: %{name} = %{version}-%{release} abrt-addon-kerneloops kexec-tools
|
||||
Requires: python3-abrt python3-augeas util-linux python3-systemd
|
||||
Requires: python3-abrt python3-augeas util-linux
|
||||
|
||||
%description addon-vmcore
|
||||
This package provides plugin which helps to collect kernel crash information
|
||||
@ -149,6 +150,14 @@ Requires: container-exception-logger
|
||||
This package provides python3 hook and handling uncaught exception in python3
|
||||
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
|
||||
Summary: Plugin to generate machine_id based off dmidecode for abrt
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
@ -169,27 +178,6 @@ Obsoletes: %{name}-cli-ng < 2.12.2
|
||||
This package provides a simple command line client for abrt event reports
|
||||
in command line environment.
|
||||
|
||||
%package cli
|
||||
Summary: Make easy default installation on non-graphical environments for virtual package
|
||||
Requires: %{name} = %{version}-%{release} abrt-tui abrt-addon-kerneloops
|
||||
Requires: abrt-addon-pstoreoops abrt-addon-vmcore abrt-addon-ccpp python3-abrt-addon
|
||||
Requires: abrt-addon-xorg
|
||||
|
||||
%description cli
|
||||
This virtual package is used to install all necessary packages for usage from command line
|
||||
environment.
|
||||
|
||||
%package desktop
|
||||
Summary: Make easy default installation on desktop environments for virtual package
|
||||
Requires: %{name} = %{version}-%{release} abrt-addon-kerneloops abrt-addon-pstoreoops
|
||||
Requires: abrt-addon-vmcore abrt-addon-ccpp python3-abrt-addon abrt-addon-xorg
|
||||
Requires: gdb-headless abrt-gui gnome-abrt
|
||||
Provides: bug-buddy = %{version}-%{release}
|
||||
|
||||
%description desktop
|
||||
This virtual pacakge is used to install all necessary packages for usage from desktop
|
||||
environment.
|
||||
|
||||
%package atomic
|
||||
Summary: Package to make easy default installation on Atomic hosts.
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
@ -226,21 +214,16 @@ Requires: %{name} = %{version}-%{release} python3-%{name} = %{version}-%{releas
|
||||
%description -n python3-abrt-doc
|
||||
This package provides examples and documentation for ABRT Python3 API.
|
||||
|
||||
%package console-notification
|
||||
Summary: Console notification script of abrt
|
||||
Requires: %{name} = %{version}-%{release} %{name}-cli = %{version}-%{release}
|
||||
|
||||
%description console-notification
|
||||
This pacakge provides small script which prints a count of detected problems when
|
||||
someone logs in to the shell.
|
||||
|
||||
%prep
|
||||
%global __scm_apply_git(qp:m:) %{__git} am --exclude doc/design --exclude doc/project/abrt.tex
|
||||
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
autoscan
|
||||
aclocal
|
||||
autoconf
|
||||
automake --add-missing
|
||||
|
||||
CFLAGS="%{optflags}" %configure \
|
||||
--without-bodhi \
|
||||
@ -273,7 +256,10 @@ ln -sf %{_bindir}/abrt %{buildroot}%{_bindir}/abrt-cli
|
||||
ln -sf %{_mandir}/man1/abrt.1 %{buildroot}%{_mandir}/man1/abrt-cli.1
|
||||
|
||||
%check
|
||||
make check
|
||||
make check|| {
|
||||
find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \;
|
||||
exit 1
|
||||
}
|
||||
|
||||
%pre
|
||||
%define abrt_gid_uid 173
|
||||
@ -314,6 +300,7 @@ chown -R abrt:abrt %{_localstatedir}/cache/abrt-di
|
||||
%systemd_preun abrtd.service
|
||||
|
||||
%preun addon-ccpp
|
||||
%systemd_preun abrt-ccpp.service
|
||||
%systemd_preun abrt-journal-core.service
|
||||
|
||||
%preun addon-kerneloops
|
||||
@ -335,6 +322,7 @@ chown -R abrt:abrt %{_localstatedir}/cache/abrt-di
|
||||
%systemd_postun_with_restart abrtd.service
|
||||
|
||||
%postun addon-ccpp
|
||||
%systemd_postun_with_restart abrt-ccpp.service
|
||||
%systemd_postun_with_restart abrt-journal-core.service
|
||||
|
||||
%postun addon-kerneloops
|
||||
@ -433,6 +421,7 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
||||
%ghost %attr(0666, -, -) %{_localstatedir}/run/%{name}/abrt.socket
|
||||
%ghost %attr(0644, -, -) %{_localstatedir}/run/%{name}/abrtd.pid
|
||||
%exclude %{_infodir}/dir
|
||||
%exclude %{_sysconfdir}/profile.d/abrt-console-notification.sh
|
||||
|
||||
%files libs
|
||||
%{_libdir}/libabrt.so.*
|
||||
@ -441,8 +430,6 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
||||
%dir %{_datadir}/%{name}
|
||||
%{_datadir}/augeas/lenses/abrt.aug
|
||||
|
||||
%files cli
|
||||
|
||||
%files devel
|
||||
%doc apidoc/html/*.{html,png,css,js}
|
||||
%{_includedir}/abrt/{abrt-dbus,hooklib,libabrt,problem_api}.h
|
||||
@ -554,6 +541,9 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
||||
%{python3_sitelib}/abrt_exception_handler3_container.py
|
||||
%{python3_sitelib}/__pycache__/abrt_exception_handler3_container.*
|
||||
|
||||
%files plugin-sosreport
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events.d/sosreport_event.conf
|
||||
|
||||
%files plugin-machine-id
|
||||
%config(noreplace) %{_sysconfdir}/libreport/events.d/machine-id_event.conf
|
||||
%{_libexecdir}/abrt-action-generate-machine-id
|
||||
@ -564,8 +554,6 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
||||
%{_bindir}/abrt-cli
|
||||
%{python3_sitelib}/abrtcli/
|
||||
|
||||
%files desktop
|
||||
|
||||
%files atomic
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/abrt-action-save-package-data.conf
|
||||
%{_bindir}/abrt-action-save-package-data
|
||||
@ -588,28 +576,10 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
||||
%files -n python3-abrt-doc
|
||||
%{python3_sitelib}/problem_examples
|
||||
|
||||
%files console-notification
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
|
||||
|
||||
%files help
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Thu Jan 13 2022 liyanan <liyanan32@huawei.com> - 2.14.6-1
|
||||
- Update to 2.14.6
|
||||
|
||||
* Sat Jan 08 2022 huanghaitao <huanghaitao8@huawei.com> - 2.14.3-1
|
||||
- Update to 2.14.3
|
||||
|
||||
* Wed May 19 2021 lingsheng <lingsheng@huawei.com> - 2.14.2-4
|
||||
- Add back cli desktop console-notification sub packages
|
||||
|
||||
* Thu Dec 03 2020 Ge Wang <wangge20@huawei.com> - 2.14.2-3
|
||||
- modify source0 url
|
||||
|
||||
* Sun Sep 20 2020 leiju <leiju4@huawei.com> - 2.14.2-2
|
||||
- fix uninstall abrt-addon-ccpp error
|
||||
|
||||
* Fri Aug 07 2020 zhangjiapeng <zhangjiapeng9@huawei.com> - 2.14.2-1
|
||||
- update to 2.14.2
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user