Update to upstream release 2.16.0

Signed-off-by: Michal Srb <michal@redhat.com>
This commit is contained in:
Michal Srb 2022-10-24 18:00:03 +02:00
parent a20ba81e1d
commit 50a321fe1d
7 changed files with 18 additions and 292 deletions

1
.gitignore vendored
View File

@ -77,3 +77,4 @@ abrt-1.1.13.tar.gz
/abrt-2.14.6.tar.gz
/abrt-2.15.0.tar.gz
/abrt-2.15.1.tar.gz
/abrt-2.16.0.tar.gz

View File

@ -1,59 +0,0 @@
From ca26ccfff7e5e89eb48d67e707722d4a740f4511 Mon Sep 17 00:00:00 2001
From: Michal Srb <michal@redhat.com>
Date: Thu, 16 Jun 2022 13:13:59 +0200
Subject: [PATCH] Fix for rpm 4.18
pgpHexStr() function has been deprecated and renamed to rpmhex().
Since the replacement is only available in Rawhide (f37), let's
continue using the old name for now.
This commit tells gcc to ignore the deprecation warning.
See the commit:
https://github.com/rpm-software-management/rpm/commit/d44be2cbc1c3265d55f05b47daa69334a7a133e6
Signed-off-by: Michal Srb <michal@redhat.com>
---
src/daemon/rpm.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/daemon/rpm.c b/src/daemon/rpm.c
index c84f1221..b9ac9767 100644
--- a/src/daemon/rpm.c
+++ b/src/daemon/rpm.c
@@ -24,6 +24,7 @@
#include <rpm/rpmcli.h>
#include <rpm/rpmdb.h>
#include <rpm/rpmpgp.h>
+#include <rpm/rpmstring.h>
#include <rpm/rpmkeyring.h>
struct rpmPubkey_s {
@@ -92,6 +93,15 @@ void rpm_destroy()
g_list_free_full(g_steal_pointer(&list_fingerprints), free);
}
+
+// TODO: pgpHexStr() has been renamed to rpmhex() recently, and
+// pgpHexStr() is now deprecated and it will be dropped
+// in the future. Let's keep using the old name for now
+// as the replacement is only available in Rawhide (f37).
+// https://github.com/rpm-software-management/rpm/commit/d44be2cbc1c3265d55f05b47daa69334a7a133e6
+// Ignore the deprecation warning in this function
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
void rpm_load_gpgkey(const char* filename)
{
#ifdef HAVE_LIBRPM
@@ -133,6 +143,7 @@ void rpm_load_gpgkey(const char* filename)
return;
#endif
}
+#pragma GCC diagnostic pop
int rpm_chk_fingerprint(const char* pkg)
{
--
2.36.1

View File

@ -1,65 +0,0 @@
From 4ebe2699287844d2766f87062c48d8953b292bfe Mon Sep 17 00:00:00 2001
From: Michal Srb <michal@redhat.com>
Date: Tue, 11 Oct 2022 22:41:33 +0200
Subject: [PATCH] abrt-journal: call sd_journal_get_fd() right after
sd_journal_open()
See: rhbz#2128662
Under certain circumstances, abrt-dump-journal can be running,
but not receiving any event notifications from journal.
The culprit of the issue seems to be the delayed call
to sd_journal_get_fd(), as discussed in various
issues and pull-requests in other projects.
See for example [1], [2], or [3].
[1]: https://github.com/systemd/systemd/issues/7998
[2]: https://github.com/ledbettj/systemd-journal/pull/78
[3]: https://github.com/rsyslog/rsyslog/issues/2436
Signed-off-by: Michal Srb <michal@redhat.com>
---
src/plugins/abrt-journal.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/plugins/abrt-journal.c b/src/plugins/abrt-journal.c
index adc9440e..48ae8c99 100644
--- a/src/plugins/abrt-journal.c
+++ b/src/plugins/abrt-journal.c
@@ -35,12 +35,15 @@
struct abrt_journal
{
sd_journal *j;
+ int fd;
};
static int abrt_journal_new_flags(abrt_journal_t **journal, int flags)
{
sd_journal *j;
const int r = sd_journal_open(&j, flags);
+ const int fd = sd_journal_get_fd(j);
+
if (r < 0)
{
log_notice("Failed to open journal: %s", strerror(-r));
@@ -49,6 +52,7 @@ static int abrt_journal_new_flags(abrt_journal_t **journal, int flags)
*journal = g_malloc0(sizeof(**journal));
(*journal)->j = j;
+ (*journal)->fd = fd;
return 0;
}
@@ -452,7 +456,7 @@ int abrt_journal_watch_run_sync(abrt_journal_watch_t *watch)
sigdelset(&mask, SIGKILL);
struct pollfd pollfd;
- pollfd.fd = sd_journal_get_fd(watch->j->j);
+ pollfd.fd = watch->j->fd;
pollfd.events = sd_journal_get_events(watch->j->j);
int r = 0;
--
2.37.3

View File

@ -1,48 +0,0 @@
From 8f67ddc99b4a72718290daae323fa5bc3c1d59eb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Mat=C4=9Bj=20Grabovsk=C3=BD?= <mgrabovs@redhat.com>
Date: Thu, 15 Sep 2022 12:59:23 +0200
Subject: [PATCH] applet: Update GLib constant name
The `G_APPLICATION_FLAGS_NONE` constant has apparently been deprecated
and removed 2.73. Also bump the version constraint in the spec file.
---
abrt.spec | 3 ++-
src/applet/abrt-applet-application.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/abrt.spec b/abrt.spec
index 2f2c3027..03beca7d 100644
--- a/abrt.spec
+++ b/abrt.spec
@@ -43,6 +43,7 @@
%define docdirversion -%{version}
%endif
+%define glib_ver 2.73.3
%define libreport_ver 2.14.0
%define satyr_ver 0.24
@@ -56,7 +57,7 @@ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.ta
BuildRequires: %{dbus_devel}
BuildRequires: hostname
BuildRequires: gtk3-devel
-BuildRequires: glib2-devel >= 2.43.4
+BuildRequires: glib2-devel >= %{glib_ver}
BuildRequires: rpm-devel >= 4.6
BuildRequires: desktop-file-utils
BuildRequires: libnotify-devel
diff --git a/src/applet/abrt-applet-application.c b/src/applet/abrt-applet-application.c
index 394d52b7..6faa8cf7 100644
--- a/src/applet/abrt-applet-application.c
+++ b/src/applet/abrt-applet-application.c
@@ -1215,6 +1215,6 @@ abrt_applet_application_new (void)
{
return g_object_new (ABRT_APPLET_TYPE_APPLICATION,
"application-id", ABRT_DBUS_NAME ".applet",
- "flags", G_APPLICATION_FLAGS_NONE,
+ "flags", G_APPLICATION_DEFAULT_FLAGS,
NULL);
}
--
2.37.3

View File

@ -1,61 +0,0 @@
From 428bdf417b33d65fa5fbdcd292f12eef704bae95 Mon Sep 17 00:00:00 2001
From: Michal Srb <michal@redhat.com>
Date: Wed, 19 Oct 2022 06:43:38 +0200
Subject: [PATCH] a-dump-journal-core: First seek the journal tail and then set
filters
See: rhbz#2128662
a-dump-journal-core uses filters to jump between
systemd-coredump entries in journal.
However, we should first jump to the starting position
(journal tail) and only then set filters.
I suspect that setting the filters early, before we are
at the starting position, can lead to the strange
behavior that we are seeing in Fedora.
This patch makes the problem go away on my freshly-installed
Fedora 37 VM.
Signed-off-by: Michal Srb <michal@redhat.com>
---
src/plugins/abrt-dump-journal-core.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/plugins/abrt-dump-journal-core.c b/src/plugins/abrt-dump-journal-core.c
index 68d5b320..1bb793a2 100644
--- a/src/plugins/abrt-dump-journal-core.c
+++ b/src/plugins/abrt-dump-journal-core.c
@@ -628,17 +628,22 @@ main(int argc, char *argv[])
error_msg_and_die(_("Cannot open systemd-journal"));
}
- if (abrt_journal_set_journal_filter(journal, coredump_journal_filter) < 0)
- error_msg_and_die(_("Cannot filter systemd-journal to systemd-coredump data only"));
+ if (opts & OPT_e) {
+ if (abrt_journal_seek_tail(journal) < 0)
+ error_msg_and_die(_("Cannot seek to the end of journal"));
- g_list_free(coredump_journal_filter);
-
- if ((opts & OPT_e) && abrt_journal_seek_tail(journal) < 0)
- error_msg_and_die(_("Cannot seek to the end of journal"));
+ if (abrt_journal_save_current_position(journal, ABRT_JOURNAL_WATCH_STATE_FILE) < 0)
+ log_warning("Failed to save the starting cursor position");
+ }
if (cursor && abrt_journal_set_cursor(journal, cursor))
error_msg_and_die(_("Failed to set systemd-journal cursor '%s'"), cursor);
+ if (abrt_journal_set_journal_filter(journal, coredump_journal_filter) < 0)
+ error_msg_and_die(_("Cannot filter systemd-journal to systemd-coredump data only"));
+
+ g_list_free(coredump_journal_filter);
+
if ((opts & OPT_f))
{
if (!cursor && !(opts & OPT_e))
--
2.37.3

View File

@ -22,7 +22,7 @@
%bcond_without retrace
# rpmbuild --define 'desktopvendor mystring'
%if "x%{desktopvendor}" == "x"
%if "x%{?desktopvendor}" == "x"
%define desktopvendor %(source /etc/os-release; echo ${ID})
%endif
@ -43,26 +43,22 @@
%define docdirversion -%{version}
%endif
%define glib_ver 2.73.3
%define libreport_ver 2.14.0
%define satyr_ver 0.24
Summary: Automatic bug detection and reporting tool
Name: abrt
Version: 2.15.1
Release: 6%{?dist}
Version: 2.16.0
Release: 1%{?dist}
License: GPLv2+
URL: https://abrt.readthedocs.org/
Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: 0001-Fix-for-rpm-4.18.patch
Patch1: 0002-abrt-journal-call-sd_journal_get_fd-right-after-sd_j.patch
Patch2: 0003-applet-Update-GLib-constant-name.patch
Patch3: 0004-a-dump-journal-core-First-seek-the-journal-tail-and-.patch
BuildRequires: git-core
BuildRequires: %{dbus_devel}
BuildRequires: hostname
BuildRequires: gtk3-devel
BuildRequires: glib2-devel >= 2.43.4
BuildRequires: glib2-devel >= %{glib_ver}
BuildRequires: rpm-devel >= 4.6
BuildRequires: desktop-file-utils
BuildRequires: libnotify-devel
@ -72,7 +68,7 @@ BuildRequires: gettext
BuildRequires: libxml2-devel
BuildRequires: intltool
BuildRequires: libtool
BuildRequires: libsoup-devel
BuildRequires: libsoup3-devel
BuildRequires: asciidoc
BuildRequires: doxygen
BuildRequires: xmlto
@ -80,16 +76,20 @@ BuildRequires: libreport-devel >= %{libreport_ver}
BuildRequires: satyr-devel >= %{satyr_ver}
BuildRequires: augeas
BuildRequires: libselinux-devel
# Required for the %%{_unitdir} and %%{_tmpfilesdir} macros.
BuildRequires: systemd-rpm-macros
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-systemd
BuildRequires: python3-argcomplete
BuildRequires: python3-dbus
%if 0%{?fedora}
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python_Appendix/#_byte_compilation_reproducibility
%global py_reproducible_pyc_path %{buildroot}%{python3_sitelib}
BuildRequires: /usr/bin/marshalparser
%endif
%endif
Requires: libreport >= %{libreport_ver}
Requires: satyr >= %{satyr_ver}
@ -197,11 +197,9 @@ Summary: %{name}'s C/C++ addon
Requires: cpio
Requires: gdb-headless
Requires: elfutils
# Required for local retracing with GDB.
Requires: elfutils-debuginfod-client
%if 0%{!?rhel:1}
%if %{with retrace}
# abrt-action-perform-ccpp-analysis wants to run analyze_RetraceServer:
Requires: %{name}-retrace-client
%endif
%endif
Requires: %{name} = %{version}-%{release}
Requires: abrt-libs = %{version}-%{release}
@ -209,6 +207,7 @@ Requires: abrt-libs = %{version}-%{release}
Requires: python3-libreport
%endif
Obsoletes: abrt-addon-coredump-helper <= 2.12.2
Obsoletes: abrt-retrace-client <= 2.15.1
%description addon-ccpp
@ -222,20 +221,6 @@ Requires: abrt-libs = %{version}-%{release}
%description addon-upload-watch
This package contains hook for uploaded problems.
%if %{with retrace}
%package retrace-client
Summary: %{name}'s retrace client
Requires: %{name} = %{version}-%{release}
Requires: xz
Requires: tar
Requires: p11-kit-trust
Requires: libsoup
%description retrace-client
This package contains the client application for Retrace server
which is able to analyze C/C++ crashes remotely.
%endif
%package addon-kerneloops
Summary: %{name}'s kerneloops addon
Requires: curl
@ -361,9 +346,6 @@ Requires: python3-abrt-addon
%endif
Requires: abrt-addon-xorg
%if ! 0%{?rhel}
%if %{with retrace}
Requires: abrt-retrace-client
%endif
%if %{with bodhi}
Requires: abrt-plugin-bodhi
%endif
@ -401,9 +383,6 @@ Requires: gdb-headless
Requires: abrt-gui
Requires: gnome-abrt
%if ! 0%{?rhel}
%if %{with retrace}
Requires: abrt-retrace-client
%endif
%if %{with bodhi}
Requires: abrt-plugin-bodhi
%endif
@ -481,7 +460,6 @@ to the shell
%global __scm_apply_git(qp:m:) %{__git} am --exclude doc/design --exclude doc/project/abrt.tex
%autosetup -S git -p 0
%build
./autogen.sh
@ -497,9 +475,6 @@ CFLAGS="%{optflags} -Werror" %configure \
%if %{without atomic}
--without-atomic \
%endif
%if %{without retrace}
--without-retrace \
%endif
%ifnarch %{arm}
--enable-native-unwinder \
%endif
@ -553,7 +528,6 @@ make check|| {
# do not cat tests/testsuite.log because it contains a lot of bloat
find src -name "test-suite.log" -print -exec cat '{}' \;
find tests/testsuite.dir -name "testsuite.log" -print -exec cat '{}' \;
cat src/cli/test-suite.log
exit 1
}
@ -817,19 +791,13 @@ 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
%{_bindir}/abrt-action-analyze-c
%{_bindir}/abrt-action-trim-files
%{_bindir}/abrt-action-analyze-core
%{_bindir}/abrt-action-analyze-vulnerability
%{_bindir}/abrt-action-install-debuginfo
%{_bindir}/abrt-action-generate-backtrace
%{_bindir}/abrt-action-generate-core-backtrace
%{_bindir}/abrt-action-analyze-backtrace
%{_bindir}/abrt-action-list-dsos
%{_bindir}/abrt-action-perform-ccpp-analysis
%{_bindir}/abrt-action-analyze-ccpp-local
%{_bindir}/abrt-dump-journal-core
%config(noreplace) %{_sysconfdir}/libreport/events.d/ccpp_event.conf
@ -840,7 +808,6 @@ killall abrt-dbus >/dev/null 2>&1 || :
%{_mandir}/man5/vimrc_event.conf.5*
%{_datadir}/libreport/events/analyze_CCpp.xml
%{_datadir}/libreport/events/analyze_LocalGDB.xml
%{_datadir}/libreport/events/analyze_RetraceServer.xml
%{_datadir}/libreport/events/collect_xsession_errors.xml
%{_datadir}/libreport/events/collect_GConf.xml
%{_datadir}/libreport/events/collect_vimrc_user.xml
@ -852,11 +819,8 @@ killall abrt-dbus >/dev/null 2>&1 || :
%{_mandir}/man*/abrt-action-generate-core-backtrace.*
%{_mandir}/man*/abrt-action-analyze-backtrace.*
%{_mandir}/man*/abrt-action-list-dsos.*
%{_mandir}/man*/abrt-action-install-debuginfo.*
%{_mandir}/man*/abrt-action-analyze-ccpp-local.*
%{_mandir}/man*/abrt-action-analyze-core.*
%{_mandir}/man*/abrt-action-analyze-vulnerability.*
%{_mandir}/man*/abrt-action-perform-ccpp-analysis.*
%{_mandir}/man1/abrt-dump-journal-core.1*
%files addon-upload-watch
@ -865,14 +829,6 @@ killall abrt-dbus >/dev/null 2>&1 || :
%{_mandir}/man*/abrt-upload-watch.*
%if %{with retrace}
%files retrace-client
%{_bindir}/abrt-retrace-client
%{_mandir}/man1/abrt-retrace-client.1*
%config(noreplace) %{_sysconfdir}/libreport/events.d/ccpp_retrace_event.conf
%{_mandir}/man5/ccpp_retrace_event.conf.5*
%endif
%files addon-kerneloops
%config(noreplace) %{_sysconfdir}/libreport/events.d/koops_event.conf
%{_journalcatalogdir}/abrt_koops.catalog
@ -954,7 +910,6 @@ killall abrt-dbus >/dev/null 2>&1 || :
%files tui
%if %{with python3}
%config(noreplace) %{_sysconfdir}/bash_completion.d/abrt.bash_completion
%{_bindir}/abrt
%{_bindir}/abrt-cli
%{python3_sitelib}/abrtcli/
@ -1011,6 +966,9 @@ killall abrt-dbus >/dev/null 2>&1 || :
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
%changelog
* Mon Oct 24 2022 Michal Srb <michal@redhat.com> - 2.16.0-1
- Update to upstream release 2.16.0
* Wed Oct 19 2022 Michal Srb <michal@redhat.com> - 2.15.1-6
- abrt-journal: First seek the journal tail and then set filters
- Resolves: rhbz#2128662

View File

@ -1 +1 @@
SHA512 (abrt-2.15.1.tar.gz) = 745c513969b78ee7c76c310a8c2fc0bafd1e50375130fa773ad950bf123ee50cfa237da9b331f2c0af2851b35b162cbc908f2e00d59283867ed8ffd72236d0ea
SHA512 (abrt-2.16.0.tar.gz) = 243594580ad728bfa96c42005d29b3f76f0910cc80a4f4243f1ead7d2087e8ba5a5eadcc5405739bffaa43ed1b4bc0822ee1796ab2d16938a45a6823cfe9f1a5