From 1e992dd7d9da7666d5da2be286a4568de4a5217f Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Thu, 16 Jun 2022 13:24:42 +0200 Subject: [PATCH] Fix FTBFS Resolves: rhbz#2093924 Signed-off-by: Michal Srb --- 0001-Fix-for-rpm-4.18.patch | 59 +++++++++++++++++++++++++++++++++++++ abrt.spec | 7 ++++- 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-for-rpm-4.18.patch diff --git a/0001-Fix-for-rpm-4.18.patch b/0001-Fix-for-rpm-4.18.patch new file mode 100644 index 0000000..606d0e9 --- /dev/null +++ b/0001-Fix-for-rpm-4.18.patch @@ -0,0 +1,59 @@ +From ca26ccfff7e5e89eb48d67e707722d4a740f4511 Mon Sep 17 00:00:00 2001 +From: Michal Srb +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 +--- + 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 + #include + #include ++#include + #include + + 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 + diff --git a/abrt.spec b/abrt.spec index 85e5185..feea9e4 100644 --- a/abrt.spec +++ b/abrt.spec @@ -49,10 +49,11 @@ Summary: Automatic bug detection and reporting tool Name: abrt Version: 2.15.1 -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-Fix-for-rpm-4.18.patch BuildRequires: git-core BuildRequires: %{dbus_devel} @@ -1007,6 +1008,10 @@ killall abrt-dbus >/dev/null 2>&1 || : %config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh %changelog +* Thu Jun 16 2022 Michal Srb - 2.15.1-3 +- Fix FTBFS +- Resolves: rhbz#2093924 + * Wed Jun 15 2022 Python Maint - 2.15.1-2 - Rebuilt for Python 3.11