summaryrefslogtreecommitdiff
path: root/sec-keys
diff options
context:
space:
mode:
Diffstat (limited to 'sec-keys')
-rw-r--r--sec-keys/Manifest.gzbin20544 -> 20537 bytes
-rw-r--r--sec-keys/openpgp-keys-gentoo-developers/Manifest12
-rw-r--r--sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230724.ebuild233
-rw-r--r--sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230731.ebuild233
-rw-r--r--sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230807.ebuild233
-rw-r--r--sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230814.ebuild233
-rw-r--r--sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230821.ebuild233
-rw-r--r--sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230828.ebuild2
-rw-r--r--sec-keys/openpgp-keys-tor/Manifest2
-rw-r--r--sec-keys/openpgp-keys-tor/openpgp-keys-tor-20230727.ebuild2
10 files changed, 4 insertions, 1179 deletions
diff --git a/sec-keys/Manifest.gz b/sec-keys/Manifest.gz
index 7395bb19a7f1..a591d29baadb 100644
--- a/sec-keys/Manifest.gz
+++ b/sec-keys/Manifest.gz
Binary files differ
diff --git a/sec-keys/openpgp-keys-gentoo-developers/Manifest b/sec-keys/openpgp-keys-gentoo-developers/Manifest
index f293ac62604e..512d12f8acc0 100644
--- a/sec-keys/openpgp-keys-gentoo-developers/Manifest
+++ b/sec-keys/openpgp-keys-gentoo-developers/Manifest
@@ -1,17 +1,7 @@
AUX keyring-mangler.py 3061 BLAKE2B a5acb20346c8eb4b036773562625ac39469d378a343c8bfcbb23391a61876f57aae7015f2d78e468a606330275686f2187d7a8a81a7d940a1e8329c2ea916a62 SHA512 60f7174319f77484eb389486e6f74c23a27d8211128d261497b3d095e3f7a8744c5402c29ae84a6e4833b77406e301dfd5c7b4cf8d5ffb062e298f177a1ff052
DIST openpgp-keys-gentoo-developers-20230717-active-devs.gpg 3104679 BLAKE2B 81777f536f342de356bdc9e5bc6b8b3319bec058c5fff663c80db6b9acbfc625703bf66bbc271c9dbb53de714dc581637ae01bfcd750174579410813c64717c4 SHA512 6f6f5d50d24acaec7774497fb8dc01e240e9b8f93578b5b08ef097b02299c2116deb87264fa3ce3144dc6fbb28d9e2d7363ed2505f5e264d783901b581262105
-DIST openpgp-keys-gentoo-developers-20230724-active-devs.gpg 3104679 BLAKE2B 81777f536f342de356bdc9e5bc6b8b3319bec058c5fff663c80db6b9acbfc625703bf66bbc271c9dbb53de714dc581637ae01bfcd750174579410813c64717c4 SHA512 6f6f5d50d24acaec7774497fb8dc01e240e9b8f93578b5b08ef097b02299c2116deb87264fa3ce3144dc6fbb28d9e2d7363ed2505f5e264d783901b581262105
-DIST openpgp-keys-gentoo-developers-20230731-active-devs.gpg 3108002 BLAKE2B c21a16fe51f5d98f994299969a231fd77ba4904afe13acb40a8238f64f93efdfe824867897d607327d8208c7c59b4aad839453d88ff92b24b52e093c38d6e594 SHA512 4065ea276b0a911841faf8bec4f5b5c0a763fef0243d1538bae0c29e89cd0e1278d95143e0b9f24efdfd0bef5fd4f945a8666bb0b59f58fc0ede117228e6f45d
-DIST openpgp-keys-gentoo-developers-20230807-active-devs.gpg 3110732 BLAKE2B 10a5ee919a8c53a847b04a1c4b57e5934112d21daffd9a91cbd27d6813b687870f11632d908f10a435e6ea82b3228838d9486040dff900e2fabfda0019224521 SHA512 c6e40d79091821d5c4286e9e65a1611b3c974202c2cd1e2f2d751fa10eba761b4ca4db9009bc8b77dead4d3627038ea208e9fc0fe93ac3098076f9a7721f2f75
-DIST openpgp-keys-gentoo-developers-20230814-active-devs.gpg 3099095 BLAKE2B 5519cecf793f214f4860109796872850c5f1aece0b5efc9b79554db75e512033b96baa9630e2456e45484fcc8903c19e2789859d316bbfc2fb6547eb857e38a0 SHA512 82daf2251d61d179fcd00f9e9e0dbea005e90bd541e2edc209abe3be91637a1a39d64860b29705f35685ff911d946129c6c869ec291a328253b92c1dd7bee529
-DIST openpgp-keys-gentoo-developers-20230821-active-devs.gpg 3099455 BLAKE2B c3a090a12639d73597cf74f8e8ee392cf0416f7b0411add1b1af0db20461b1b78ed6c14d028b6ed8d82218a158409bc483ce17bb86acae037350adcfd5f83e31 SHA512 78eae46850dfffec063651309526010ead55a3f0d6914d87e4c9fe15d6679ef45f3dc7b8587a7d6a172c0cb5545c1fd86b6756164132c957a1d442482eec214e
DIST openpgp-keys-gentoo-developers-20230828-active-devs.gpg 3102805 BLAKE2B efd321e8ebb76d32e47df8085c9bb0d393c59d747b54cb5cf6febcc301a92a7c2a2b8bebd95b8f1b8fa9a6683aefc673809d8418408434bc41a1cf2bf8076938 SHA512 9e2e7408c2371edbe037243971fe6d45931cf526dff1d6014e472c056f8ed6881632d86497e9d6cd6b535574fb99c2af43fb63074911f4af476b5f590cc272dd
EBUILD openpgp-keys-gentoo-developers-20230717.ebuild 7523 BLAKE2B 2b3f5c5c1694b782ac318bdfd0dc7941ce47ed8f60fc2d715b88bf1404cd59639797e65e45891fad1aba9b456c3d356d7cadc1b79a9919cce0a8b1587364f7e5 SHA512 a013e480059fb7b0de2da5581f8d6c01b9eecb0593751fda7b57b4d4e98db2ab6b21a2aaefce7aec0c0981e6dc22fd9fc202bea6dedaf170816bd05c1031311e
-EBUILD openpgp-keys-gentoo-developers-20230724.ebuild 7531 BLAKE2B 6047cb6478855d2603cb60e76524742994e06b71c0dbe29d69bff1866ae66a712422d95e8a8495c35b66f3c40fdaf74ea53d34338650b9428e5caa45d7fe5a0c SHA512 e271c6b583c1f2a1c61bc034e24696ae93dbce52f1a541901df12eb64496bf07fced1c99f4d83eb7d20131f666507ba24a460608076f75fbddb58126cd6a6840
-EBUILD openpgp-keys-gentoo-developers-20230731.ebuild 7531 BLAKE2B 6047cb6478855d2603cb60e76524742994e06b71c0dbe29d69bff1866ae66a712422d95e8a8495c35b66f3c40fdaf74ea53d34338650b9428e5caa45d7fe5a0c SHA512 e271c6b583c1f2a1c61bc034e24696ae93dbce52f1a541901df12eb64496bf07fced1c99f4d83eb7d20131f666507ba24a460608076f75fbddb58126cd6a6840
-EBUILD openpgp-keys-gentoo-developers-20230807.ebuild 7531 BLAKE2B 6047cb6478855d2603cb60e76524742994e06b71c0dbe29d69bff1866ae66a712422d95e8a8495c35b66f3c40fdaf74ea53d34338650b9428e5caa45d7fe5a0c SHA512 e271c6b583c1f2a1c61bc034e24696ae93dbce52f1a541901df12eb64496bf07fced1c99f4d83eb7d20131f666507ba24a460608076f75fbddb58126cd6a6840
-EBUILD openpgp-keys-gentoo-developers-20230814.ebuild 7531 BLAKE2B 6047cb6478855d2603cb60e76524742994e06b71c0dbe29d69bff1866ae66a712422d95e8a8495c35b66f3c40fdaf74ea53d34338650b9428e5caa45d7fe5a0c SHA512 e271c6b583c1f2a1c61bc034e24696ae93dbce52f1a541901df12eb64496bf07fced1c99f4d83eb7d20131f666507ba24a460608076f75fbddb58126cd6a6840
-EBUILD openpgp-keys-gentoo-developers-20230821.ebuild 7531 BLAKE2B 6047cb6478855d2603cb60e76524742994e06b71c0dbe29d69bff1866ae66a712422d95e8a8495c35b66f3c40fdaf74ea53d34338650b9428e5caa45d7fe5a0c SHA512 e271c6b583c1f2a1c61bc034e24696ae93dbce52f1a541901df12eb64496bf07fced1c99f4d83eb7d20131f666507ba24a460608076f75fbddb58126cd6a6840
-EBUILD openpgp-keys-gentoo-developers-20230828.ebuild 7531 BLAKE2B 6047cb6478855d2603cb60e76524742994e06b71c0dbe29d69bff1866ae66a712422d95e8a8495c35b66f3c40fdaf74ea53d34338650b9428e5caa45d7fe5a0c SHA512 e271c6b583c1f2a1c61bc034e24696ae93dbce52f1a541901df12eb64496bf07fced1c99f4d83eb7d20131f666507ba24a460608076f75fbddb58126cd6a6840
+EBUILD openpgp-keys-gentoo-developers-20230828.ebuild 7523 BLAKE2B 2b3f5c5c1694b782ac318bdfd0dc7941ce47ed8f60fc2d715b88bf1404cd59639797e65e45891fad1aba9b456c3d356d7cadc1b79a9919cce0a8b1587364f7e5 SHA512 a013e480059fb7b0de2da5581f8d6c01b9eecb0593751fda7b57b4d4e98db2ab6b21a2aaefce7aec0c0981e6dc22fd9fc202bea6dedaf170816bd05c1031311e
EBUILD openpgp-keys-gentoo-developers-99999999.ebuild 7531 BLAKE2B 6047cb6478855d2603cb60e76524742994e06b71c0dbe29d69bff1866ae66a712422d95e8a8495c35b66f3c40fdaf74ea53d34338650b9428e5caa45d7fe5a0c SHA512 e271c6b583c1f2a1c61bc034e24696ae93dbce52f1a541901df12eb64496bf07fced1c99f4d83eb7d20131f666507ba24a460608076f75fbddb58126cd6a6840
MISC metadata.xml 264 BLAKE2B 630ac0044f623dc63de725aae23da036b649a2d65331c06fbe9eb66d18ad1a4d3fd804cdffc4703500662b01272063af346680d2550f2fb6a262d6acee8c6789 SHA512 3cf1981080b4a7634537d20a3e837fa802c52ae5ee750531cc4aa3f8478cda78579375602bc058abbd75f9393f9681b79603c3ddd9af809a1e72f7336a708056
diff --git a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230724.ebuild b/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230724.ebuild
deleted file mode 100644
index fda85a259ff6..000000000000
--- a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230724.ebuild
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit edo python-any-r1
-
-DESCRIPTION="Gentoo Authority Keys (GLEP 79)"
-HOMEPAGE="https://www.gentoo.org/downloads/signatures/"
-if [[ ${PV} == 9999* ]] ; then
- PROPERTIES="live"
-
- BDEPEND="net-misc/curl"
-else
- SRC_URI="https://qa-reports.gentoo.org/output/keys/active-devs-${PV}.gpg -> ${P}-active-devs.gpg"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-S="${WORKDIR}"
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND+="
- $(python_gen_any_dep 'dev-python/python-gnupg[${PYTHON_USEDEP}]')
- sec-keys/openpgp-keys-gentoo-auth
- test? (
- app-crypt/gnupg
- sys-apps/grep[pcre]
- )
-"
-
-python_check_deps() {
- python_has_version "dev-python/python-gnupg[${PYTHON_USEDEP}]"
-}
-
-src_unpack() {
- if [[ ${PV} == 9999* ]] ; then
- curl https://qa-reports.gentoo.org/output/active-devs.gpg -o ${P}-active-devs.gpg || die
- else
- default
- fi
-}
-
-src_compile() {
- export GNUPGHOME="${T}"/.gnupg
-
- get_gpg_keyring_dir() {
- if [[ ${PV} == 9999* ]] ; then
- echo "${WORKDIR}"
- else
- echo "${DISTDIR}"
- fi
- }
-
- local mygpgargs=(
- --no-autostart
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- mkdir "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
-
- # Convert the binary keyring into an armored one so we can process it
- edo gpg "${mygpgargs[@]}" --import "$(get_gpg_keyring_dir)"/${P}-active-devs.gpg
- edo gpg "${mygpgargs[@]}" --export --armor > "${WORKDIR}"/gentoo-developers.asc
-
- # Now strip out the keys which are expired and/or missing a signature
- # from our L2 developer authority key
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${WORKDIR}"/gentoo-developers.asc \
- "${WORKDIR}"/gentoo-developers-sanitised.asc
-}
-
-src_test() {
- export GNUPGHOME="${T}"/tests/.gnupg
-
- local mygpgargs=(
- # We don't have --no-autostart here because we need
- # to let it spawn an agent for the key generation.
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- # Check each of the keys to verify they're trusted by
- # the L2 developer key.
- mkdir -p "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
- cd "${T}"/tests || die
-
- # First, grab the L1 key, and mark it as ultimately trusted.
- edo gpg "${mygpgargs[@]}" --import "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc
- edo gpg "${mygpgargs[@]}" --import-ownertrust "${BROOT}"/usr/share/openpgp-keys/gentoo-auth-ownertrust.txt
-
- # Generate a temporary key which isn't signed by anything to check
- # whether we're detecting unexpected keys.
- #
- # The test is whether this appears in the sanitised keyring we
- # produce in src_compile (it should not be in there).
- #
- # https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
- edo gpg "${mygpgargs[@]}" --batch --gen-key <<-EOF
- %echo Generating temporary key for testing...
-
- %no-protection
- %transient-key
- %pubring ${P}-ebuild-test-key.asc
-
- Key-Type: 1
- Key-Length: 2048
- Subkey-Type: 1
- Subkey-Length: 2048
- Name-Real: Larry The Cow
- Name-Email: larry@example.com
- Expire-Date: 0
- Handle: ${P}-ebuild-test-key
-
- %commit
- %echo Temporary key generated!
- EOF
-
- # Import the new injected key that shouldn't be signed by anything into a temporary testing keyring
- edo gpg "${mygpgargs[@]}" --import "${T}"/tests/${P}-ebuild-test-key.asc
-
- # Sign a tiny file with the to-be-injected key for testing rejection below
- echo "Hello world!" > "${T}"/tests/signme || die
- edo gpg "${mygpgargs[@]}" -u "Larry The Cow <larry@example.com>" --sign "${T}"/tests/signme || die
-
- edo gpg "${mygpgargs[@]}" --export --armor > "${T}"/tests/tainted-keyring.asc
-
- # keyring-mangler.py should now produce a keyring *without* it
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${T}"/tests/tainted-keyring.asc \
- "${T}"/tests/gentoo-developers-sanitised.asc | tee "${T}"/tests/keyring-mangler.log
- assert "Key mangling in tests failed?"
-
- # Check the log to verify the injected key got detected
- grep -q "Dropping key.*Larry The Cow" "${T}"/tests/keyring-mangler.log || die "Did not remove injected key from test keyring!"
-
- # gnupg doesn't have an easy way for us to actually just.. ask
- # if a key is known via WoT. So, sign a file using the key
- # we just made, and then try to gpg --verify it, and check exit code.
- #
- # Let's now double check by seeing if a file signed by the injected key
- # is rejected.
- if gpg "${mygpgargs[@]}" --keyring "${T}"/tests/gentoo-developers-sanitised.asc --verify "${T}"/tests/signme.gpg ; then
- die "'gpg --verify' using injected test key succeeded! This shouldn't happen!"
- fi
-
- # Bonus lame sanity check
- edo gpg "${mygpgargs[@]}" --check-trustdb 2>&1 | tee "${T}"/tests/trustdb.log
- assert "trustdb call failed!"
-
- check_trust_levels() {
- local mode=${1}
-
- while IFS= read -r line; do
- # gpg: depth: 0 valid: 1 signed: 2 trust: 0-, 0q, 0n, 0m, 0f, 1u
- # gpg: depth: 1 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 2f, 0u
- if [[ ${line} == *depth* ]] ; then
- depth=$(echo ${line} | grep -Po "depth: [0-9]")
- trust=$(echo ${line} | grep -Po "trust:.*")
-
- trust_uncalculated=$(echo ${trust} | grep -Po "[0-9]-")
- [[ ${trust_uncalculated} == 0 ]] || ${mode}
-
- trust_insufficient=$(echo ${trust} | grep -Po "[0-9]q")
- [[ ${trust_insufficient} == 0 ]] || ${mode}
-
- trust_never=$(echo ${trust} | grep -Po "[0-9]n")
- [[ ${trust_never} == 0 ]] || ${mode}
-
- trust_marginal=$(echo ${trust} | grep -Po "[0-9]m")
- [[ ${trust_marginal} == 0 ]] || ${mode}
-
- trust_full=$(echo ${trust} | grep -Po "[0-9]f")
- [[ ${trust_full} != 0 ]] || ${mode}
-
- trust_ultimate=$(echo ${trust} | grep -Po "[0-9]u")
- [[ ${trust_ultimate} == 1 ]] || ${mode}
-
- echo "${trust_uncalculated}, ${trust_insufficient}"
- fi
- done < "${T}"/tests/trustdb.log
- }
-
- # First, check with the bad key still in the test keyring.
- # This is supposed to fail, so we want it to return 1
- check_trust_levels "return 1" && die "Trustdb passed when it should have failed!"
-
- # Now check without the bad key in the test keyring.
- # This one should pass.
- #
- # Drop the bad key first (https://superuser.com/questions/174583/how-to-delete-gpg-secret-keys-by-force-without-fingerprint)
- keys=$(gpg "${mygpgargs[@]}" --fingerprint --with-colons --batch "Larry The Cow <larry@example.com>" \
- | grep "^fpr" \
- | sed -n 's/^fpr:::::::::\([[:alnum:]]\+\):/\1/p')
-
- local key
- for key in ${keys[@]} ; do
- nonfatal edo gpg "${mygpgargs[@]}" --batch --yes --delete-secret-keys ${key}
- done
-
- edo gpg "${mygpgargs[@]}" --batch --yes --delete-keys "Larry The Cow <larry@example.com>"
- check_trust_levels "return 0" || die "Trustdb failed when it should have passed!"
-
- gpgconf --kill gpg-agent || die
-}
-
-src_install() {
- insinto /usr/share/openpgp-keys
- newins gentoo-developers-sanitised.asc gentoo-developers.asc
-
- # TODO: install an ownertrust file like sec-keys/openpgp-keys-gentoo-auth?
-}
diff --git a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230731.ebuild b/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230731.ebuild
deleted file mode 100644
index fda85a259ff6..000000000000
--- a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230731.ebuild
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit edo python-any-r1
-
-DESCRIPTION="Gentoo Authority Keys (GLEP 79)"
-HOMEPAGE="https://www.gentoo.org/downloads/signatures/"
-if [[ ${PV} == 9999* ]] ; then
- PROPERTIES="live"
-
- BDEPEND="net-misc/curl"
-else
- SRC_URI="https://qa-reports.gentoo.org/output/keys/active-devs-${PV}.gpg -> ${P}-active-devs.gpg"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-S="${WORKDIR}"
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND+="
- $(python_gen_any_dep 'dev-python/python-gnupg[${PYTHON_USEDEP}]')
- sec-keys/openpgp-keys-gentoo-auth
- test? (
- app-crypt/gnupg
- sys-apps/grep[pcre]
- )
-"
-
-python_check_deps() {
- python_has_version "dev-python/python-gnupg[${PYTHON_USEDEP}]"
-}
-
-src_unpack() {
- if [[ ${PV} == 9999* ]] ; then
- curl https://qa-reports.gentoo.org/output/active-devs.gpg -o ${P}-active-devs.gpg || die
- else
- default
- fi
-}
-
-src_compile() {
- export GNUPGHOME="${T}"/.gnupg
-
- get_gpg_keyring_dir() {
- if [[ ${PV} == 9999* ]] ; then
- echo "${WORKDIR}"
- else
- echo "${DISTDIR}"
- fi
- }
-
- local mygpgargs=(
- --no-autostart
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- mkdir "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
-
- # Convert the binary keyring into an armored one so we can process it
- edo gpg "${mygpgargs[@]}" --import "$(get_gpg_keyring_dir)"/${P}-active-devs.gpg
- edo gpg "${mygpgargs[@]}" --export --armor > "${WORKDIR}"/gentoo-developers.asc
-
- # Now strip out the keys which are expired and/or missing a signature
- # from our L2 developer authority key
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${WORKDIR}"/gentoo-developers.asc \
- "${WORKDIR}"/gentoo-developers-sanitised.asc
-}
-
-src_test() {
- export GNUPGHOME="${T}"/tests/.gnupg
-
- local mygpgargs=(
- # We don't have --no-autostart here because we need
- # to let it spawn an agent for the key generation.
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- # Check each of the keys to verify they're trusted by
- # the L2 developer key.
- mkdir -p "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
- cd "${T}"/tests || die
-
- # First, grab the L1 key, and mark it as ultimately trusted.
- edo gpg "${mygpgargs[@]}" --import "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc
- edo gpg "${mygpgargs[@]}" --import-ownertrust "${BROOT}"/usr/share/openpgp-keys/gentoo-auth-ownertrust.txt
-
- # Generate a temporary key which isn't signed by anything to check
- # whether we're detecting unexpected keys.
- #
- # The test is whether this appears in the sanitised keyring we
- # produce in src_compile (it should not be in there).
- #
- # https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
- edo gpg "${mygpgargs[@]}" --batch --gen-key <<-EOF
- %echo Generating temporary key for testing...
-
- %no-protection
- %transient-key
- %pubring ${P}-ebuild-test-key.asc
-
- Key-Type: 1
- Key-Length: 2048
- Subkey-Type: 1
- Subkey-Length: 2048
- Name-Real: Larry The Cow
- Name-Email: larry@example.com
- Expire-Date: 0
- Handle: ${P}-ebuild-test-key
-
- %commit
- %echo Temporary key generated!
- EOF
-
- # Import the new injected key that shouldn't be signed by anything into a temporary testing keyring
- edo gpg "${mygpgargs[@]}" --import "${T}"/tests/${P}-ebuild-test-key.asc
-
- # Sign a tiny file with the to-be-injected key for testing rejection below
- echo "Hello world!" > "${T}"/tests/signme || die
- edo gpg "${mygpgargs[@]}" -u "Larry The Cow <larry@example.com>" --sign "${T}"/tests/signme || die
-
- edo gpg "${mygpgargs[@]}" --export --armor > "${T}"/tests/tainted-keyring.asc
-
- # keyring-mangler.py should now produce a keyring *without* it
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${T}"/tests/tainted-keyring.asc \
- "${T}"/tests/gentoo-developers-sanitised.asc | tee "${T}"/tests/keyring-mangler.log
- assert "Key mangling in tests failed?"
-
- # Check the log to verify the injected key got detected
- grep -q "Dropping key.*Larry The Cow" "${T}"/tests/keyring-mangler.log || die "Did not remove injected key from test keyring!"
-
- # gnupg doesn't have an easy way for us to actually just.. ask
- # if a key is known via WoT. So, sign a file using the key
- # we just made, and then try to gpg --verify it, and check exit code.
- #
- # Let's now double check by seeing if a file signed by the injected key
- # is rejected.
- if gpg "${mygpgargs[@]}" --keyring "${T}"/tests/gentoo-developers-sanitised.asc --verify "${T}"/tests/signme.gpg ; then
- die "'gpg --verify' using injected test key succeeded! This shouldn't happen!"
- fi
-
- # Bonus lame sanity check
- edo gpg "${mygpgargs[@]}" --check-trustdb 2>&1 | tee "${T}"/tests/trustdb.log
- assert "trustdb call failed!"
-
- check_trust_levels() {
- local mode=${1}
-
- while IFS= read -r line; do
- # gpg: depth: 0 valid: 1 signed: 2 trust: 0-, 0q, 0n, 0m, 0f, 1u
- # gpg: depth: 1 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 2f, 0u
- if [[ ${line} == *depth* ]] ; then
- depth=$(echo ${line} | grep -Po "depth: [0-9]")
- trust=$(echo ${line} | grep -Po "trust:.*")
-
- trust_uncalculated=$(echo ${trust} | grep -Po "[0-9]-")
- [[ ${trust_uncalculated} == 0 ]] || ${mode}
-
- trust_insufficient=$(echo ${trust} | grep -Po "[0-9]q")
- [[ ${trust_insufficient} == 0 ]] || ${mode}
-
- trust_never=$(echo ${trust} | grep -Po "[0-9]n")
- [[ ${trust_never} == 0 ]] || ${mode}
-
- trust_marginal=$(echo ${trust} | grep -Po "[0-9]m")
- [[ ${trust_marginal} == 0 ]] || ${mode}
-
- trust_full=$(echo ${trust} | grep -Po "[0-9]f")
- [[ ${trust_full} != 0 ]] || ${mode}
-
- trust_ultimate=$(echo ${trust} | grep -Po "[0-9]u")
- [[ ${trust_ultimate} == 1 ]] || ${mode}
-
- echo "${trust_uncalculated}, ${trust_insufficient}"
- fi
- done < "${T}"/tests/trustdb.log
- }
-
- # First, check with the bad key still in the test keyring.
- # This is supposed to fail, so we want it to return 1
- check_trust_levels "return 1" && die "Trustdb passed when it should have failed!"
-
- # Now check without the bad key in the test keyring.
- # This one should pass.
- #
- # Drop the bad key first (https://superuser.com/questions/174583/how-to-delete-gpg-secret-keys-by-force-without-fingerprint)
- keys=$(gpg "${mygpgargs[@]}" --fingerprint --with-colons --batch "Larry The Cow <larry@example.com>" \
- | grep "^fpr" \
- | sed -n 's/^fpr:::::::::\([[:alnum:]]\+\):/\1/p')
-
- local key
- for key in ${keys[@]} ; do
- nonfatal edo gpg "${mygpgargs[@]}" --batch --yes --delete-secret-keys ${key}
- done
-
- edo gpg "${mygpgargs[@]}" --batch --yes --delete-keys "Larry The Cow <larry@example.com>"
- check_trust_levels "return 0" || die "Trustdb failed when it should have passed!"
-
- gpgconf --kill gpg-agent || die
-}
-
-src_install() {
- insinto /usr/share/openpgp-keys
- newins gentoo-developers-sanitised.asc gentoo-developers.asc
-
- # TODO: install an ownertrust file like sec-keys/openpgp-keys-gentoo-auth?
-}
diff --git a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230807.ebuild b/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230807.ebuild
deleted file mode 100644
index fda85a259ff6..000000000000
--- a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230807.ebuild
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit edo python-any-r1
-
-DESCRIPTION="Gentoo Authority Keys (GLEP 79)"
-HOMEPAGE="https://www.gentoo.org/downloads/signatures/"
-if [[ ${PV} == 9999* ]] ; then
- PROPERTIES="live"
-
- BDEPEND="net-misc/curl"
-else
- SRC_URI="https://qa-reports.gentoo.org/output/keys/active-devs-${PV}.gpg -> ${P}-active-devs.gpg"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-S="${WORKDIR}"
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND+="
- $(python_gen_any_dep 'dev-python/python-gnupg[${PYTHON_USEDEP}]')
- sec-keys/openpgp-keys-gentoo-auth
- test? (
- app-crypt/gnupg
- sys-apps/grep[pcre]
- )
-"
-
-python_check_deps() {
- python_has_version "dev-python/python-gnupg[${PYTHON_USEDEP}]"
-}
-
-src_unpack() {
- if [[ ${PV} == 9999* ]] ; then
- curl https://qa-reports.gentoo.org/output/active-devs.gpg -o ${P}-active-devs.gpg || die
- else
- default
- fi
-}
-
-src_compile() {
- export GNUPGHOME="${T}"/.gnupg
-
- get_gpg_keyring_dir() {
- if [[ ${PV} == 9999* ]] ; then
- echo "${WORKDIR}"
- else
- echo "${DISTDIR}"
- fi
- }
-
- local mygpgargs=(
- --no-autostart
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- mkdir "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
-
- # Convert the binary keyring into an armored one so we can process it
- edo gpg "${mygpgargs[@]}" --import "$(get_gpg_keyring_dir)"/${P}-active-devs.gpg
- edo gpg "${mygpgargs[@]}" --export --armor > "${WORKDIR}"/gentoo-developers.asc
-
- # Now strip out the keys which are expired and/or missing a signature
- # from our L2 developer authority key
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${WORKDIR}"/gentoo-developers.asc \
- "${WORKDIR}"/gentoo-developers-sanitised.asc
-}
-
-src_test() {
- export GNUPGHOME="${T}"/tests/.gnupg
-
- local mygpgargs=(
- # We don't have --no-autostart here because we need
- # to let it spawn an agent for the key generation.
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- # Check each of the keys to verify they're trusted by
- # the L2 developer key.
- mkdir -p "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
- cd "${T}"/tests || die
-
- # First, grab the L1 key, and mark it as ultimately trusted.
- edo gpg "${mygpgargs[@]}" --import "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc
- edo gpg "${mygpgargs[@]}" --import-ownertrust "${BROOT}"/usr/share/openpgp-keys/gentoo-auth-ownertrust.txt
-
- # Generate a temporary key which isn't signed by anything to check
- # whether we're detecting unexpected keys.
- #
- # The test is whether this appears in the sanitised keyring we
- # produce in src_compile (it should not be in there).
- #
- # https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
- edo gpg "${mygpgargs[@]}" --batch --gen-key <<-EOF
- %echo Generating temporary key for testing...
-
- %no-protection
- %transient-key
- %pubring ${P}-ebuild-test-key.asc
-
- Key-Type: 1
- Key-Length: 2048
- Subkey-Type: 1
- Subkey-Length: 2048
- Name-Real: Larry The Cow
- Name-Email: larry@example.com
- Expire-Date: 0
- Handle: ${P}-ebuild-test-key
-
- %commit
- %echo Temporary key generated!
- EOF
-
- # Import the new injected key that shouldn't be signed by anything into a temporary testing keyring
- edo gpg "${mygpgargs[@]}" --import "${T}"/tests/${P}-ebuild-test-key.asc
-
- # Sign a tiny file with the to-be-injected key for testing rejection below
- echo "Hello world!" > "${T}"/tests/signme || die
- edo gpg "${mygpgargs[@]}" -u "Larry The Cow <larry@example.com>" --sign "${T}"/tests/signme || die
-
- edo gpg "${mygpgargs[@]}" --export --armor > "${T}"/tests/tainted-keyring.asc
-
- # keyring-mangler.py should now produce a keyring *without* it
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${T}"/tests/tainted-keyring.asc \
- "${T}"/tests/gentoo-developers-sanitised.asc | tee "${T}"/tests/keyring-mangler.log
- assert "Key mangling in tests failed?"
-
- # Check the log to verify the injected key got detected
- grep -q "Dropping key.*Larry The Cow" "${T}"/tests/keyring-mangler.log || die "Did not remove injected key from test keyring!"
-
- # gnupg doesn't have an easy way for us to actually just.. ask
- # if a key is known via WoT. So, sign a file using the key
- # we just made, and then try to gpg --verify it, and check exit code.
- #
- # Let's now double check by seeing if a file signed by the injected key
- # is rejected.
- if gpg "${mygpgargs[@]}" --keyring "${T}"/tests/gentoo-developers-sanitised.asc --verify "${T}"/tests/signme.gpg ; then
- die "'gpg --verify' using injected test key succeeded! This shouldn't happen!"
- fi
-
- # Bonus lame sanity check
- edo gpg "${mygpgargs[@]}" --check-trustdb 2>&1 | tee "${T}"/tests/trustdb.log
- assert "trustdb call failed!"
-
- check_trust_levels() {
- local mode=${1}
-
- while IFS= read -r line; do
- # gpg: depth: 0 valid: 1 signed: 2 trust: 0-, 0q, 0n, 0m, 0f, 1u
- # gpg: depth: 1 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 2f, 0u
- if [[ ${line} == *depth* ]] ; then
- depth=$(echo ${line} | grep -Po "depth: [0-9]")
- trust=$(echo ${line} | grep -Po "trust:.*")
-
- trust_uncalculated=$(echo ${trust} | grep -Po "[0-9]-")
- [[ ${trust_uncalculated} == 0 ]] || ${mode}
-
- trust_insufficient=$(echo ${trust} | grep -Po "[0-9]q")
- [[ ${trust_insufficient} == 0 ]] || ${mode}
-
- trust_never=$(echo ${trust} | grep -Po "[0-9]n")
- [[ ${trust_never} == 0 ]] || ${mode}
-
- trust_marginal=$(echo ${trust} | grep -Po "[0-9]m")
- [[ ${trust_marginal} == 0 ]] || ${mode}
-
- trust_full=$(echo ${trust} | grep -Po "[0-9]f")
- [[ ${trust_full} != 0 ]] || ${mode}
-
- trust_ultimate=$(echo ${trust} | grep -Po "[0-9]u")
- [[ ${trust_ultimate} == 1 ]] || ${mode}
-
- echo "${trust_uncalculated}, ${trust_insufficient}"
- fi
- done < "${T}"/tests/trustdb.log
- }
-
- # First, check with the bad key still in the test keyring.
- # This is supposed to fail, so we want it to return 1
- check_trust_levels "return 1" && die "Trustdb passed when it should have failed!"
-
- # Now check without the bad key in the test keyring.
- # This one should pass.
- #
- # Drop the bad key first (https://superuser.com/questions/174583/how-to-delete-gpg-secret-keys-by-force-without-fingerprint)
- keys=$(gpg "${mygpgargs[@]}" --fingerprint --with-colons --batch "Larry The Cow <larry@example.com>" \
- | grep "^fpr" \
- | sed -n 's/^fpr:::::::::\([[:alnum:]]\+\):/\1/p')
-
- local key
- for key in ${keys[@]} ; do
- nonfatal edo gpg "${mygpgargs[@]}" --batch --yes --delete-secret-keys ${key}
- done
-
- edo gpg "${mygpgargs[@]}" --batch --yes --delete-keys "Larry The Cow <larry@example.com>"
- check_trust_levels "return 0" || die "Trustdb failed when it should have passed!"
-
- gpgconf --kill gpg-agent || die
-}
-
-src_install() {
- insinto /usr/share/openpgp-keys
- newins gentoo-developers-sanitised.asc gentoo-developers.asc
-
- # TODO: install an ownertrust file like sec-keys/openpgp-keys-gentoo-auth?
-}
diff --git a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230814.ebuild b/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230814.ebuild
deleted file mode 100644
index fda85a259ff6..000000000000
--- a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230814.ebuild
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit edo python-any-r1
-
-DESCRIPTION="Gentoo Authority Keys (GLEP 79)"
-HOMEPAGE="https://www.gentoo.org/downloads/signatures/"
-if [[ ${PV} == 9999* ]] ; then
- PROPERTIES="live"
-
- BDEPEND="net-misc/curl"
-else
- SRC_URI="https://qa-reports.gentoo.org/output/keys/active-devs-${PV}.gpg -> ${P}-active-devs.gpg"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-S="${WORKDIR}"
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND+="
- $(python_gen_any_dep 'dev-python/python-gnupg[${PYTHON_USEDEP}]')
- sec-keys/openpgp-keys-gentoo-auth
- test? (
- app-crypt/gnupg
- sys-apps/grep[pcre]
- )
-"
-
-python_check_deps() {
- python_has_version "dev-python/python-gnupg[${PYTHON_USEDEP}]"
-}
-
-src_unpack() {
- if [[ ${PV} == 9999* ]] ; then
- curl https://qa-reports.gentoo.org/output/active-devs.gpg -o ${P}-active-devs.gpg || die
- else
- default
- fi
-}
-
-src_compile() {
- export GNUPGHOME="${T}"/.gnupg
-
- get_gpg_keyring_dir() {
- if [[ ${PV} == 9999* ]] ; then
- echo "${WORKDIR}"
- else
- echo "${DISTDIR}"
- fi
- }
-
- local mygpgargs=(
- --no-autostart
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- mkdir "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
-
- # Convert the binary keyring into an armored one so we can process it
- edo gpg "${mygpgargs[@]}" --import "$(get_gpg_keyring_dir)"/${P}-active-devs.gpg
- edo gpg "${mygpgargs[@]}" --export --armor > "${WORKDIR}"/gentoo-developers.asc
-
- # Now strip out the keys which are expired and/or missing a signature
- # from our L2 developer authority key
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${WORKDIR}"/gentoo-developers.asc \
- "${WORKDIR}"/gentoo-developers-sanitised.asc
-}
-
-src_test() {
- export GNUPGHOME="${T}"/tests/.gnupg
-
- local mygpgargs=(
- # We don't have --no-autostart here because we need
- # to let it spawn an agent for the key generation.
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- # Check each of the keys to verify they're trusted by
- # the L2 developer key.
- mkdir -p "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
- cd "${T}"/tests || die
-
- # First, grab the L1 key, and mark it as ultimately trusted.
- edo gpg "${mygpgargs[@]}" --import "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc
- edo gpg "${mygpgargs[@]}" --import-ownertrust "${BROOT}"/usr/share/openpgp-keys/gentoo-auth-ownertrust.txt
-
- # Generate a temporary key which isn't signed by anything to check
- # whether we're detecting unexpected keys.
- #
- # The test is whether this appears in the sanitised keyring we
- # produce in src_compile (it should not be in there).
- #
- # https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
- edo gpg "${mygpgargs[@]}" --batch --gen-key <<-EOF
- %echo Generating temporary key for testing...
-
- %no-protection
- %transient-key
- %pubring ${P}-ebuild-test-key.asc
-
- Key-Type: 1
- Key-Length: 2048
- Subkey-Type: 1
- Subkey-Length: 2048
- Name-Real: Larry The Cow
- Name-Email: larry@example.com
- Expire-Date: 0
- Handle: ${P}-ebuild-test-key
-
- %commit
- %echo Temporary key generated!
- EOF
-
- # Import the new injected key that shouldn't be signed by anything into a temporary testing keyring
- edo gpg "${mygpgargs[@]}" --import "${T}"/tests/${P}-ebuild-test-key.asc
-
- # Sign a tiny file with the to-be-injected key for testing rejection below
- echo "Hello world!" > "${T}"/tests/signme || die
- edo gpg "${mygpgargs[@]}" -u "Larry The Cow <larry@example.com>" --sign "${T}"/tests/signme || die
-
- edo gpg "${mygpgargs[@]}" --export --armor > "${T}"/tests/tainted-keyring.asc
-
- # keyring-mangler.py should now produce a keyring *without* it
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${T}"/tests/tainted-keyring.asc \
- "${T}"/tests/gentoo-developers-sanitised.asc | tee "${T}"/tests/keyring-mangler.log
- assert "Key mangling in tests failed?"
-
- # Check the log to verify the injected key got detected
- grep -q "Dropping key.*Larry The Cow" "${T}"/tests/keyring-mangler.log || die "Did not remove injected key from test keyring!"
-
- # gnupg doesn't have an easy way for us to actually just.. ask
- # if a key is known via WoT. So, sign a file using the key
- # we just made, and then try to gpg --verify it, and check exit code.
- #
- # Let's now double check by seeing if a file signed by the injected key
- # is rejected.
- if gpg "${mygpgargs[@]}" --keyring "${T}"/tests/gentoo-developers-sanitised.asc --verify "${T}"/tests/signme.gpg ; then
- die "'gpg --verify' using injected test key succeeded! This shouldn't happen!"
- fi
-
- # Bonus lame sanity check
- edo gpg "${mygpgargs[@]}" --check-trustdb 2>&1 | tee "${T}"/tests/trustdb.log
- assert "trustdb call failed!"
-
- check_trust_levels() {
- local mode=${1}
-
- while IFS= read -r line; do
- # gpg: depth: 0 valid: 1 signed: 2 trust: 0-, 0q, 0n, 0m, 0f, 1u
- # gpg: depth: 1 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 2f, 0u
- if [[ ${line} == *depth* ]] ; then
- depth=$(echo ${line} | grep -Po "depth: [0-9]")
- trust=$(echo ${line} | grep -Po "trust:.*")
-
- trust_uncalculated=$(echo ${trust} | grep -Po "[0-9]-")
- [[ ${trust_uncalculated} == 0 ]] || ${mode}
-
- trust_insufficient=$(echo ${trust} | grep -Po "[0-9]q")
- [[ ${trust_insufficient} == 0 ]] || ${mode}
-
- trust_never=$(echo ${trust} | grep -Po "[0-9]n")
- [[ ${trust_never} == 0 ]] || ${mode}
-
- trust_marginal=$(echo ${trust} | grep -Po "[0-9]m")
- [[ ${trust_marginal} == 0 ]] || ${mode}
-
- trust_full=$(echo ${trust} | grep -Po "[0-9]f")
- [[ ${trust_full} != 0 ]] || ${mode}
-
- trust_ultimate=$(echo ${trust} | grep -Po "[0-9]u")
- [[ ${trust_ultimate} == 1 ]] || ${mode}
-
- echo "${trust_uncalculated}, ${trust_insufficient}"
- fi
- done < "${T}"/tests/trustdb.log
- }
-
- # First, check with the bad key still in the test keyring.
- # This is supposed to fail, so we want it to return 1
- check_trust_levels "return 1" && die "Trustdb passed when it should have failed!"
-
- # Now check without the bad key in the test keyring.
- # This one should pass.
- #
- # Drop the bad key first (https://superuser.com/questions/174583/how-to-delete-gpg-secret-keys-by-force-without-fingerprint)
- keys=$(gpg "${mygpgargs[@]}" --fingerprint --with-colons --batch "Larry The Cow <larry@example.com>" \
- | grep "^fpr" \
- | sed -n 's/^fpr:::::::::\([[:alnum:]]\+\):/\1/p')
-
- local key
- for key in ${keys[@]} ; do
- nonfatal edo gpg "${mygpgargs[@]}" --batch --yes --delete-secret-keys ${key}
- done
-
- edo gpg "${mygpgargs[@]}" --batch --yes --delete-keys "Larry The Cow <larry@example.com>"
- check_trust_levels "return 0" || die "Trustdb failed when it should have passed!"
-
- gpgconf --kill gpg-agent || die
-}
-
-src_install() {
- insinto /usr/share/openpgp-keys
- newins gentoo-developers-sanitised.asc gentoo-developers.asc
-
- # TODO: install an ownertrust file like sec-keys/openpgp-keys-gentoo-auth?
-}
diff --git a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230821.ebuild b/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230821.ebuild
deleted file mode 100644
index fda85a259ff6..000000000000
--- a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230821.ebuild
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-inherit edo python-any-r1
-
-DESCRIPTION="Gentoo Authority Keys (GLEP 79)"
-HOMEPAGE="https://www.gentoo.org/downloads/signatures/"
-if [[ ${PV} == 9999* ]] ; then
- PROPERTIES="live"
-
- BDEPEND="net-misc/curl"
-else
- SRC_URI="https://qa-reports.gentoo.org/output/keys/active-devs-${PV}.gpg -> ${P}-active-devs.gpg"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
-fi
-
-S="${WORKDIR}"
-
-LICENSE="public-domain"
-SLOT="0"
-IUSE="test"
-RESTRICT="!test? ( test )"
-
-BDEPEND+="
- $(python_gen_any_dep 'dev-python/python-gnupg[${PYTHON_USEDEP}]')
- sec-keys/openpgp-keys-gentoo-auth
- test? (
- app-crypt/gnupg
- sys-apps/grep[pcre]
- )
-"
-
-python_check_deps() {
- python_has_version "dev-python/python-gnupg[${PYTHON_USEDEP}]"
-}
-
-src_unpack() {
- if [[ ${PV} == 9999* ]] ; then
- curl https://qa-reports.gentoo.org/output/active-devs.gpg -o ${P}-active-devs.gpg || die
- else
- default
- fi
-}
-
-src_compile() {
- export GNUPGHOME="${T}"/.gnupg
-
- get_gpg_keyring_dir() {
- if [[ ${PV} == 9999* ]] ; then
- echo "${WORKDIR}"
- else
- echo "${DISTDIR}"
- fi
- }
-
- local mygpgargs=(
- --no-autostart
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- mkdir "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
-
- # Convert the binary keyring into an armored one so we can process it
- edo gpg "${mygpgargs[@]}" --import "$(get_gpg_keyring_dir)"/${P}-active-devs.gpg
- edo gpg "${mygpgargs[@]}" --export --armor > "${WORKDIR}"/gentoo-developers.asc
-
- # Now strip out the keys which are expired and/or missing a signature
- # from our L2 developer authority key
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${WORKDIR}"/gentoo-developers.asc \
- "${WORKDIR}"/gentoo-developers-sanitised.asc
-}
-
-src_test() {
- export GNUPGHOME="${T}"/tests/.gnupg
-
- local mygpgargs=(
- # We don't have --no-autostart here because we need
- # to let it spawn an agent for the key generation.
- --no-default-keyring
- --homedir "${GNUPGHOME}"
- )
-
- # From verify-sig.eclass:
- # "GPG upstream knows better than to follow the spec, so we can't
- # override this directory. However, there is a clean fallback
- # to GNUPGHOME."
- addpredict /run/user
-
- # Check each of the keys to verify they're trusted by
- # the L2 developer key.
- mkdir -p "${GNUPGHOME}" || die
- chmod 700 "${GNUPGHOME}" || die
- cd "${T}"/tests || die
-
- # First, grab the L1 key, and mark it as ultimately trusted.
- edo gpg "${mygpgargs[@]}" --import "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc
- edo gpg "${mygpgargs[@]}" --import-ownertrust "${BROOT}"/usr/share/openpgp-keys/gentoo-auth-ownertrust.txt
-
- # Generate a temporary key which isn't signed by anything to check
- # whether we're detecting unexpected keys.
- #
- # The test is whether this appears in the sanitised keyring we
- # produce in src_compile (it should not be in there).
- #
- # https://www.gnupg.org/documentation/manuals/gnupg/Unattended-GPG-key-generation.html
- edo gpg "${mygpgargs[@]}" --batch --gen-key <<-EOF
- %echo Generating temporary key for testing...
-
- %no-protection
- %transient-key
- %pubring ${P}-ebuild-test-key.asc
-
- Key-Type: 1
- Key-Length: 2048
- Subkey-Type: 1
- Subkey-Length: 2048
- Name-Real: Larry The Cow
- Name-Email: larry@example.com
- Expire-Date: 0
- Handle: ${P}-ebuild-test-key
-
- %commit
- %echo Temporary key generated!
- EOF
-
- # Import the new injected key that shouldn't be signed by anything into a temporary testing keyring
- edo gpg "${mygpgargs[@]}" --import "${T}"/tests/${P}-ebuild-test-key.asc
-
- # Sign a tiny file with the to-be-injected key for testing rejection below
- echo "Hello world!" > "${T}"/tests/signme || die
- edo gpg "${mygpgargs[@]}" -u "Larry The Cow <larry@example.com>" --sign "${T}"/tests/signme || die
-
- edo gpg "${mygpgargs[@]}" --export --armor > "${T}"/tests/tainted-keyring.asc
-
- # keyring-mangler.py should now produce a keyring *without* it
- edo "${EPYTHON}" "${FILESDIR}"/keyring-mangler.py \
- "${BROOT}"/usr/share/openpgp-keys/gentoo-auth.asc \
- "${T}"/tests/tainted-keyring.asc \
- "${T}"/tests/gentoo-developers-sanitised.asc | tee "${T}"/tests/keyring-mangler.log
- assert "Key mangling in tests failed?"
-
- # Check the log to verify the injected key got detected
- grep -q "Dropping key.*Larry The Cow" "${T}"/tests/keyring-mangler.log || die "Did not remove injected key from test keyring!"
-
- # gnupg doesn't have an easy way for us to actually just.. ask
- # if a key is known via WoT. So, sign a file using the key
- # we just made, and then try to gpg --verify it, and check exit code.
- #
- # Let's now double check by seeing if a file signed by the injected key
- # is rejected.
- if gpg "${mygpgargs[@]}" --keyring "${T}"/tests/gentoo-developers-sanitised.asc --verify "${T}"/tests/signme.gpg ; then
- die "'gpg --verify' using injected test key succeeded! This shouldn't happen!"
- fi
-
- # Bonus lame sanity check
- edo gpg "${mygpgargs[@]}" --check-trustdb 2>&1 | tee "${T}"/tests/trustdb.log
- assert "trustdb call failed!"
-
- check_trust_levels() {
- local mode=${1}
-
- while IFS= read -r line; do
- # gpg: depth: 0 valid: 1 signed: 2 trust: 0-, 0q, 0n, 0m, 0f, 1u
- # gpg: depth: 1 valid: 2 signed: 0 trust: 0-, 0q, 0n, 0m, 2f, 0u
- if [[ ${line} == *depth* ]] ; then
- depth=$(echo ${line} | grep -Po "depth: [0-9]")
- trust=$(echo ${line} | grep -Po "trust:.*")
-
- trust_uncalculated=$(echo ${trust} | grep -Po "[0-9]-")
- [[ ${trust_uncalculated} == 0 ]] || ${mode}
-
- trust_insufficient=$(echo ${trust} | grep -Po "[0-9]q")
- [[ ${trust_insufficient} == 0 ]] || ${mode}
-
- trust_never=$(echo ${trust} | grep -Po "[0-9]n")
- [[ ${trust_never} == 0 ]] || ${mode}
-
- trust_marginal=$(echo ${trust} | grep -Po "[0-9]m")
- [[ ${trust_marginal} == 0 ]] || ${mode}
-
- trust_full=$(echo ${trust} | grep -Po "[0-9]f")
- [[ ${trust_full} != 0 ]] || ${mode}
-
- trust_ultimate=$(echo ${trust} | grep -Po "[0-9]u")
- [[ ${trust_ultimate} == 1 ]] || ${mode}
-
- echo "${trust_uncalculated}, ${trust_insufficient}"
- fi
- done < "${T}"/tests/trustdb.log
- }
-
- # First, check with the bad key still in the test keyring.
- # This is supposed to fail, so we want it to return 1
- check_trust_levels "return 1" && die "Trustdb passed when it should have failed!"
-
- # Now check without the bad key in the test keyring.
- # This one should pass.
- #
- # Drop the bad key first (https://superuser.com/questions/174583/how-to-delete-gpg-secret-keys-by-force-without-fingerprint)
- keys=$(gpg "${mygpgargs[@]}" --fingerprint --with-colons --batch "Larry The Cow <larry@example.com>" \
- | grep "^fpr" \
- | sed -n 's/^fpr:::::::::\([[:alnum:]]\+\):/\1/p')
-
- local key
- for key in ${keys[@]} ; do
- nonfatal edo gpg "${mygpgargs[@]}" --batch --yes --delete-secret-keys ${key}
- done
-
- edo gpg "${mygpgargs[@]}" --batch --yes --delete-keys "Larry The Cow <larry@example.com>"
- check_trust_levels "return 0" || die "Trustdb failed when it should have passed!"
-
- gpgconf --kill gpg-agent || die
-}
-
-src_install() {
- insinto /usr/share/openpgp-keys
- newins gentoo-developers-sanitised.asc gentoo-developers.asc
-
- # TODO: install an ownertrust file like sec-keys/openpgp-keys-gentoo-auth?
-}
diff --git a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230828.ebuild b/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230828.ebuild
index fda85a259ff6..a8a3226d3007 100644
--- a/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230828.ebuild
+++ b/sec-keys/openpgp-keys-gentoo-developers/openpgp-keys-gentoo-developers-20230828.ebuild
@@ -14,7 +14,7 @@ if [[ ${PV} == 9999* ]] ; then
BDEPEND="net-misc/curl"
else
SRC_URI="https://qa-reports.gentoo.org/output/keys/active-devs-${PV}.gpg -> ${P}-active-devs.gpg"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86"
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv sparc x86"
fi
S="${WORKDIR}"
diff --git a/sec-keys/openpgp-keys-tor/Manifest b/sec-keys/openpgp-keys-tor/Manifest
index d4e9b7c59f45..2868c94e3387 100644
--- a/sec-keys/openpgp-keys-tor/Manifest
+++ b/sec-keys/openpgp-keys-tor/Manifest
@@ -15,5 +15,5 @@ DIST tor-EF6E286DDA85EA2A4BA7DE684E2C6E8793298290.asc 25282 BLAKE2B de300d1d1700
EBUILD openpgp-keys-tor-20210425.ebuild 782 BLAKE2B ea10311624f6b42315cd0693e2d6b14dbe968c1c4323ed4bc0dbcb9aa1099c57c6315d8ed4d627650cbf3bcc3c991d369b4185a67da731d2dae36545c8a841ae SHA512 54b8415fe2a4612c23fdc79d2715503cc2d71a7f88c51f07b1404d960403101fb01700bf497cbd3ab480686201bc023806d3bf7dc0505e213c94059c51bda934
EBUILD openpgp-keys-tor-20220216.ebuild 1162 BLAKE2B 8116fa155adb81b326c1b2145ad3fad82eb6180ff5b88140e8a1bec78e8cc6f737b987df5fa5e39826ed23ffe1f0bc4d182e35899e888121b1930db70922cce0 SHA512 9cd8d738a4b93a1d48bc75b8cb9717e46c10b24bd51851d24ce9d14a6264510a4fc8ac7c7c264efc83dee921a0abe0bc4e45889da9e1569d9302a9bb2cbc59db
EBUILD openpgp-keys-tor-20221213.ebuild 1186 BLAKE2B 841d1bd90223d44be6d19665cbaa8a8094cb7333bb3486abc7fa8e2d5a80654e14e7fb74e849ced4504548e67a1db3e893a3ce28e4234c0b48cab5bc6d1614a5 SHA512 7f8c7bd097d3ea8bf3672ce469927743ae62f59a495fde4dc7fdbc61bc12bfe0416ea523961e8269184af01bbe6fe32dbff89b86343f4917ef53164b2599f23f
-EBUILD openpgp-keys-tor-20230727.ebuild 1193 BLAKE2B 711ecf7b56439fee525b552bd1ef8e4d85ab20ea1babf6959ee9ddc2667cf443c79a554a04413b437c57f91a59aa0fde825d6e787616de20dc7f5bacb8ee9ce3 SHA512 30f3fdd295cf0ec1f7be23ad77ba084e4ff6a6aff92bf86924f7c453c66ac3c1b64166fda53e128d254d6c200b1216ea24b9e6e02dd3006d62a9d1dfd85816ad
+EBUILD openpgp-keys-tor-20230727.ebuild 1192 BLAKE2B 7127aa74a391c298049fa0e576019afaf5096d1e8505f7fc2b686e9449d9d22cca1c65a25f39b5b515ef4aef2ead171c7f79d884ac6756b8a106020fdd39e73d SHA512 e7d087c1ecd8987eb63a71df05e6f1f2d995249313dc17caac9f304334ab801bc85d2ceecff057f4a2eee656010b5a963d0e325d7bcd752a51386f2fbdd34b68
MISC metadata.xml 372 BLAKE2B 4c0254d4e573de3f8ec671327524c1c9f1012fa329c6af419cddf4429014ffdb36c99af075fbdb33975f1ce2f5c2ba49c269a63dba2ce59579f83b7c554fcc98 SHA512 168d98b32a3f93fc762325bde12cf0904afcce389e643a701455961355dd267e1d0bffda3c43d860a1d1e4aa3944a0e9b906ca45bd42cfbfdd7c0daea59b9b4f
diff --git a/sec-keys/openpgp-keys-tor/openpgp-keys-tor-20230727.ebuild b/sec-keys/openpgp-keys-tor/openpgp-keys-tor-20230727.ebuild
index 1111b7a7d1e5..10c486eb3376 100644
--- a/sec-keys/openpgp-keys-tor/openpgp-keys-tor-20230727.ebuild
+++ b/sec-keys/openpgp-keys-tor/openpgp-keys-tor-20230727.ebuild
@@ -23,7 +23,7 @@ S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ppc64 ~riscv ~s390 ~sparc ~x86"
src_install() {
local files=( ${A} )