From 03f860c6a342727a997f4794058d033911bfdf78 Mon Sep 17 00:00:00 2001 From: Todd Zullinger Date: Mon, 30 Nov 2020 19:20:05 -0500 Subject: [PATCH] Backport %gpgverify API simplification Allow EPEL packages to use the simpler %gpgverify API which is available in Fedora. This incorporates the changes made to redhat-rpm-config in the following commits: 3490049 (Simplify the API of %gpgverify, 2019-07-25) 4d93255 (Fix the simple API of %gpgverify, 2019-11-01) --- epel-rpm-macros.spec | 5 ++++- macros.epel-rpm-macros | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/epel-rpm-macros.spec b/epel-rpm-macros.spec index 26d8625..3861867 100644 --- a/epel-rpm-macros.spec +++ b/epel-rpm-macros.spec @@ -1,6 +1,6 @@ Name: epel-rpm-macros Version: 8 -Release: 19 +Release: 20 Summary: Extra Packages for Enterprise Linux RPM macros Group: System Environment/Base @@ -85,6 +85,9 @@ install -Dpm 755 %{SOURCE24} \ %changelog +* Sat May 01 2021 Todd Zullinger - 8-20 +- Backport %%gpgverify API simplification + * Tue Dec 22 2020 Miro HronĨok - 8-19 - Define %%python_disable_dependency_generator diff --git a/macros.epel-rpm-macros b/macros.epel-rpm-macros index 012e8c6..dfe4f40 100644 --- a/macros.epel-rpm-macros +++ b/macros.epel-rpm-macros @@ -87,7 +87,22 @@ %{nil} # gpgverify verifies signed sources. There is documentation in the script. -%gpgverify %{_rpmconfigdir}/gpgverify +%gpgverify(k:s:d:) %{lua: +local script = rpm.expand("%{_rpmconfigdir}/gpgverify ") +local keyring = rpm.expand("%{-k*}") +local signature = rpm.expand("%{-s*}") +local data = rpm.expand("%{-d*}") +print(script) +if keyring ~= "" then + print(rpm.expand("--keyring='%{SOURCE" .. keyring .. "}' ")) +end +if signature ~= "" then + print(rpm.expand("--signature='%{SOURCE" .. signature .. "}' ")) +end +if data ~= "" then + print(rpm.expand("--data='%{SOURCE" .. data .. "}' ")) +end +} # qt5 macro removed from RHEL8 but needed to ensure qtwebengine, and # it's dependencies build on supported arches.