commit:     c74965ebc0f5455522979ae6470785a763d5706d
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 19 05:39:53 2026 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 19 06:02:06 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c74965eb

sec-keys.eclass: pass 'keep-expired-subkeys' to gpg if supported

This is needed for sec-keys/openpgp-keys-pam because of an expired subkey.

Bug: https://dev.gnupg.org/T7990
Bug: https://bugs.gentoo.org/967745
Acked-by: Eli Schwartz <eschwartz <AT> gentoo.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 eclass/sec-keys.eclass | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/eclass/sec-keys.eclass b/eclass/sec-keys.eclass
index 988c97aab78a..23b2f16a2b6e 100644
--- a/eclass/sec-keys.eclass
+++ b/eclass/sec-keys.eclass
@@ -1,4 +1,4 @@
-# Copyright 2024-2025 Gentoo Authors
+# Copyright 2024-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: sec-keys.eclass
@@ -117,7 +117,11 @@ BDEPEND="
 sec-keys_src_compile() {
        local -x GNUPGHOME=${WORKDIR}/gnupg
        local fingerprint
-       local gpg_command=(gpg --export-options export-minimal)
+       if has_version -b ">=app-crypt/gnupg-2.5.17"; then
+               local gpg_command=(gpg --export-options 
export-minimal,keep-expired-subkeys)
+       else
+               local gpg_command=(gpg --export-options export-minimal)
+       fi
 
        mkdir -m700 -p "${GNUPGHOME}" || die
        cat <<- EOF > "${GNUPGHOME}"/gpg.conf || die

Reply via email to