Hacks for RPM 4.14 support
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
parent
baf8fefda7
commit
2fe9ae6400
54
0001-Quick-hack-to-fix-build-with-rpm-4.14.patch
Normal file
54
0001-Quick-hack-to-fix-build-with-rpm-4.14.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From c01551e6e9fd293a3f40e481afe8c28e786fe632 Mon Sep 17 00:00:00 2001
|
||||
From: Panu Matilainen <pmatilai@redhat.com>
|
||||
Date: Fri, 11 Aug 2017 13:24:26 +0300
|
||||
Subject: [PATCH] Quick hack to fix build with rpm >= 4.14
|
||||
|
||||
1) rpm >= 4.14 no longer has rpmCheckTerminate() call, it cleans up
|
||||
automatically on exit(). Note that "needing" rpmCheckTerminate()
|
||||
means the code is buggy: it does not properly track and free
|
||||
rpmdb iterators and/or rpmts handles.
|
||||
2) pgpPubkeyFingerprint() now returns the actual fingerprint, the
|
||||
key ID which it previously returned is now retrieved by
|
||||
pgpPubkeyKeyID()
|
||||
|
||||
If compatibility to older versions is needed, these will need
|
||||
configure checks, left as an excercise for someone more familiar
|
||||
with the abrt codebase.
|
||||
---
|
||||
src/daemon/rpm.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/src/daemon/rpm.c b/src/daemon/rpm.c
|
||||
index 36b36a91..011e44ca 100644
|
||||
--- a/src/daemon/rpm.c
|
||||
+++ b/src/daemon/rpm.c
|
||||
@@ -76,11 +76,14 @@ void rpm_destroy()
|
||||
rpmFreeMacros(NULL);
|
||||
rpmFreeRpmrc();
|
||||
|
||||
+/* rpm >= 4.14 handles this automatically on exit */
|
||||
+#if 0
|
||||
/* RPM doc says "clean up any open iterators and databases".
|
||||
* Observed to eliminate these Berkeley DB warnings:
|
||||
* "BDB2053 Freeing read locks for locker 0x1e0: 28718/139661746636736"
|
||||
*/
|
||||
rpmdbCheckTerminate(1);
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
list_free_with_free(list_fingerprints);
|
||||
@@ -100,7 +103,11 @@ void rpm_load_gpgkey(const char* filename)
|
||||
}
|
||||
|
||||
uint8_t keyID[8];
|
||||
+#if 0
|
||||
if (pgpPubkeyFingerprint(pkt, pklen, keyID) == 0)
|
||||
+#else
|
||||
+ if (pgpPubkeyKeyID(pkt, pklen, keyID) == 0)
|
||||
+#endif
|
||||
{
|
||||
char *fingerprint = pgpHexStr(keyID, sizeof(keyID));
|
||||
if (fingerprint != NULL)
|
||||
--
|
||||
2.14.0
|
||||
|
@ -72,6 +72,9 @@ Source: https://github.com/abrt/%{name}/archive/%{version}/%{name}-%{version}.ta
|
||||
# don't remove this patch, packages in rawhide are not signed!
|
||||
Patch0: disable-OpenGPGCheck-in-Fedora-Rawhide.patch
|
||||
|
||||
# Hacks for RPM 4.14 support
|
||||
Patch1: 0001-Quick-hack-to-fix-build-with-rpm-4.14.patch
|
||||
|
||||
# '%%autosetup -S git' -> git
|
||||
BuildRequires: git
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user