File obs-server-2.9-0045-backend-support-newer-gpg-2.1.patch of Package obs-server
From 2129da8283868ec92fcf65f7b5678fd3cdcd35fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrian=20Schr=C3=B6ter?= <adrian@suse.de>
Date: Thu, 3 Jan 2019 16:40:26 +0100
Subject: [PATCH] [backend] support newer gpg 2.1
it is using pubring.kbx instead of pubring.gpg now
---
src/backend/bs_dodup | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/backend/bs_dodup b/src/backend/bs_dodup
index 05c7d446d4..0f06f7566f 100755
--- a/src/backend/bs_dodup
+++ b/src/backend/bs_dodup
@@ -94,7 +94,9 @@ sub gpgverify {
system('gpg2', '-q', '--homedir', $tempdir, '--import', "$tempdir/pubkey") && die("gpg2 key import failed: $?\n");
writestr("$tempdir/data", undef, $data);
writestr("$tempdir/data.asc", undef, $sig);
- system('gpgv', '-q', '--homedir', $tempdir, '--keyring', "$tempdir/pubring.gpg", "$tempdir/data.asc", "$tempdir/data") && die("signature verification failed: $?\n");
+ my $pubring = "$tempdir/pubring.gpg";
+ $pubring = "$tempdir/pubring.kbx" if -e "$tempdir/pubring.kbx";
+ system('gpgv', '-q', '--homedir', $tempdir, '--keyring', $pubring, "$tempdir/data.asc", "$tempdir/data") && die("signature verification failed: $?\n");
}
# uncompress file in-place
--
2.25.4