- Disable rhtsupport
- Add support for GPG subkeys
This commit is contained in:
parent
188a9f5738
commit
964527e86b
88
9100-add_gpg_subkeys_support.patch
Normal file
88
9100-add_gpg_subkeys_support.patch
Normal file
@ -0,0 +1,88 @@
|
||||
From 0f61c017f2d0c8a11b12abec774aa94d45ec8116 Mon Sep 17 00:00:00 2001
|
||||
From: Daniil Leonov <dleonov@cloudlinux.com>
|
||||
Date: Tue, 9 Feb 2021 15:17:59 +0300
|
||||
Subject: [PATCH] Add GPG subkeys support.
|
||||
|
||||
---
|
||||
src/daemon/rpm.c | 46 ++++++++++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 38 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/daemon/rpm.c b/src/daemon/rpm.c
|
||||
index af9a7be..c28c047 100644
|
||||
--- a/src/daemon/rpm.c
|
||||
+++ b/src/daemon/rpm.c
|
||||
@@ -24,6 +24,19 @@
|
||||
#include <rpm/rpmcli.h>
|
||||
#include <rpm/rpmdb.h>
|
||||
#include <rpm/rpmpgp.h>
|
||||
+#include <rpm/rpmkeyring.h>
|
||||
+
|
||||
+struct rpmPubkey_s {
|
||||
+ uint8_t *pkt;
|
||||
+ size_t pktlen;
|
||||
+ pgpKeyID_t keyid;
|
||||
+ pgpDigParams pgpkey;
|
||||
+ int nrefs;
|
||||
+ pthread_rwlock_t lock;
|
||||
+};
|
||||
+
|
||||
+typedef struct rpmPubkey_s * rpmPubkey;
|
||||
+
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -93,8 +106,13 @@ void rpm_destroy()
|
||||
void rpm_load_gpgkey(const char* filename)
|
||||
{
|
||||
#ifdef HAVE_LIBRPM
|
||||
+ rpmPubkey pubkey = NULL;
|
||||
+ rpmPubkey *subkeys = NULL;
|
||||
+ char *fingerprint = NULL;
|
||||
+ int subkeysCount = 0;
|
||||
uint8_t *pkt = NULL;
|
||||
- size_t pklen;
|
||||
+ size_t pklen = 0;
|
||||
+
|
||||
if (pgpReadPkts(filename, &pkt, &pklen) != PGPARMOR_PUBKEY)
|
||||
{
|
||||
free(pkt);
|
||||
@@ -102,17 +120,29 @@ void rpm_load_gpgkey(const char* filename)
|
||||
return;
|
||||
}
|
||||
|
||||
- uint8_t keyID[8];
|
||||
-#if 0
|
||||
- if (pgpPubkeyFingerprint(pkt, pklen, keyID) == 0)
|
||||
-#else
|
||||
- if (pgpPubkeyKeyID(pkt, pklen, keyID) == 0)
|
||||
-#endif
|
||||
+ pubkey = rpmPubkeyNew(pkt, pklen);
|
||||
+ if (pubkey != NULL)
|
||||
{
|
||||
- char *fingerprint = pgpHexStr(keyID, sizeof(keyID));
|
||||
+ fingerprint = pgpHexStr(pubkey->keyid, sizeof(pubkey->keyid));
|
||||
if (fingerprint != NULL)
|
||||
list_fingerprints = g_list_append(list_fingerprints, fingerprint);
|
||||
+
|
||||
+ subkeys = rpmGetSubkeys(pubkey, &subkeysCount);
|
||||
+ for (int i = 0; i < subkeysCount; i++)
|
||||
+ {
|
||||
+ rpmPubkey subkey = subkeys[i];
|
||||
+ if (subkey != NULL)
|
||||
+ {
|
||||
+ fingerprint = pgpHexStr(subkey->keyid, sizeof(subkey->keyid));
|
||||
+ if (fingerprint != NULL)
|
||||
+ list_fingerprints = g_list_append(list_fingerprints, fingerprint);
|
||||
+ }
|
||||
+ rpmPubkeyFree(subkey);
|
||||
+ }
|
||||
+ free(subkeys);
|
||||
}
|
||||
+
|
||||
+ rpmPubkeyFree(pubkey);
|
||||
free(pkt);
|
||||
#else
|
||||
return;
|
||||
--
|
||||
2.25.1
|
||||
|
27
abrt.spec
27
abrt.spec
@ -88,9 +88,9 @@ Patch0009: 0009-lib-Correct-the-syntax-for-gdb-backtrace-command.patch
|
||||
Patch0024: 0024-dbus-Add-configuration-for-Python3.patch
|
||||
Patch0025: 0025-daemon-Fix-double-closed-fd-race-condition.patch
|
||||
#git format-patch 1725bd258 -N --start-number 26 --topo-order
|
||||
Patch0026: 0026-cli-list-show-a-hint-about-creating-a-case-in-RHTS.patch
|
||||
Patch0027: 0027-cli-mark-the-suggestion-text-for-translation.patch
|
||||
Patch0028: 0028-cli-get-list-of-possible-workflows-for-problem_data_.patch
|
||||
#Patch0026: 0026-cli-list-show-a-hint-about-creating-a-case-in-RHTS.patch
|
||||
#Patch0027: 0027-cli-mark-the-suggestion-text-for-translation.patch
|
||||
#Patch0028: 0028-cli-get-list-of-possible-workflows-for-problem_data_.patch
|
||||
#Patch0029: 0029-spec-Add-explicit-package-version-requirement-of-abr.patch
|
||||
#git format-patch 2.10.9-10.el8 -N --start-number 30 --topo-order
|
||||
#Patch030: 0030-testsuite-dbus-element-handling-Use-external-script.patch
|
||||
@ -166,6 +166,9 @@ Patch0092: 0092-abrt-dump-oops-Fix-vmcore-call-trace-parsing.patch
|
||||
# autogen.sh is need to regenerate all the Makefile files
|
||||
Patch1000: 1000-Add-autogen.sh.patch
|
||||
|
||||
# AlmaLinux patches
|
||||
Patch9100: 9100-add_gpg_subkeys_support.patch
|
||||
|
||||
BuildRequires: %{dbus_devel}
|
||||
BuildRequires: gtk3-devel
|
||||
BuildRequires: glib2-devel >= 2.43
|
||||
@ -227,9 +230,6 @@ Requires: python3-dbus
|
||||
Requires: dmidecode
|
||||
%endif
|
||||
Requires: libreport-plugin-ureport
|
||||
%if 0%{?rhel}
|
||||
Requires: libreport-plugin-rhtsupport
|
||||
%endif
|
||||
%if 0%{?fedora}
|
||||
Requires: libreport-plugin-systemd-journal
|
||||
%endif
|
||||
@ -538,10 +538,7 @@ Requires: python2-abrt-addon
|
||||
Requires: python3-abrt-addon
|
||||
%endif # with python3
|
||||
Requires: abrt-addon-xorg
|
||||
%if 0%{?rhel}
|
||||
Requires: libreport-rhel >= %{libreport_ver}
|
||||
Requires: libreport-plugin-rhtsupport >= %{libreport_ver}
|
||||
%else
|
||||
%if 0%{!?rhel}
|
||||
Requires: abrt-retrace-client
|
||||
%if %{with bodhi}
|
||||
Requires: abrt-plugin-bodhi
|
||||
@ -582,10 +579,7 @@ Requires: abrt-addon-xorg
|
||||
Requires: gdb-headless
|
||||
Requires: abrt-gui
|
||||
Requires: gnome-abrt
|
||||
%if 0%{?rhel}
|
||||
Requires: libreport-rhel >= %{libreport_ver}
|
||||
Requires: libreport-plugin-rhtsupport >= %{libreport_ver}
|
||||
%else
|
||||
%if 0%{!?rhel}
|
||||
Requires: abrt-retrace-client
|
||||
%if %{with bodhi}
|
||||
Requires: abrt-plugin-bodhi
|
||||
@ -735,7 +729,6 @@ CFLAGS="%{optflags} -Werror" %configure \
|
||||
%endif
|
||||
%if 0%{?rhel}
|
||||
--enable-suggest-autoreporting \
|
||||
--enable-authenticated-autoreporting \
|
||||
%endif
|
||||
%ifnarch %{arm}
|
||||
--enable-native-unwinder \
|
||||
@ -1380,6 +1373,10 @@ killall abrt-dbus >/dev/null 2>&1 || :
|
||||
%config(noreplace) %{_sysconfdir}/profile.d/abrt-console-notification.sh
|
||||
|
||||
%changelog
|
||||
* Wed Sep 25 2024 Eduard Abdullin <eabdullin@almalinux.org> - 2.10.9-24.alma.1
|
||||
- Disable rhtsupport
|
||||
- Add support for GPG subkeys
|
||||
|
||||
* Thu Feb 16 2023 Matěj Grabovský <mgrabovs@redhat.com> - 2.10.9-24
|
||||
- Revert part of patch for rhbz#2137499
|
||||
- Resolves: rhbz#2137499
|
||||
|
Loading…
Reference in New Issue
Block a user