File fix-gcc-warning-for-enum-value-introduced-by-gpgme.patch of Package pacman

From 1eae46c30818d80c298f164734991ec5c05c075d Mon Sep 17 00:00:00 2001
From: Jan Fooken <jan@faulty.computer>
Date: Mon, 18 Aug 2025 09:40:04 +0200
Subject: [PATCH] Fix GCC Warning For Enum Value Introduced By GPGME

The version of GPGME used in openSUSE Tumbleweed has a new enum value
not handled by pacman.  GCC recognizes this and emits a warning.  This
patch addresses said warning by deliberately setting the key type
GPGME_PK_KYBER to be handled as unknown.
---
 lib/libalpm/signing.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/libalpm/signing.c b/lib/libalpm/signing.c
index 0bb7d0a6..4bc6b3ed 100644
--- a/lib/libalpm/signing.c
+++ b/lib/libalpm/signing.c
@@ -400,6 +400,12 @@ static int key_search_keyserver(alpm_handle_t *handle, const char *fpr,
 #endif
 			pgpkey->pubkey_algo = 'E';
 			break;
+/* value added in gpgme 1.24.01 */
+#if GPGME_VERSION_NUMBER >= 0x012401
+		case GPGME_PK_KYBER:
+			pgpkey->pubkey_algo = '?';
+			break;
+#endif
 	}
 
 	ret = 1;
-- 
2.50.1

openSUSE Build Service is sponsored by