aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-10-02 06:02:24 +0100
committerSam James <sam@gentoo.org>2024-10-02 06:05:43 +0100
commit123a7be533161b14cacc4aa98708fbf1027ecce1 (patch)
tree358be30c30641387199bb82a40601b1a2ec09f57
parentSpawnProcess: Remove unused _CGROUP_CLEANUP_RETRY_MAX (diff)
downloadportage-123a7be533161b14cacc4aa98708fbf1027ecce1.tar.gz
portage-123a7be533161b14cacc4aa98708fbf1027ecce1.tar.bz2
portage-123a7be533161b14cacc4aa98708fbf1027ecce1.zip
Revert "emerge-webrsync: actually honour the sync-webrsync-verify-signature attribute"
This reverts commit f99eb91227918d5bf0cc531e78bd597c73b7ce1f. Revert for now as we understand the status quo better, and this breaks syncing w/ emerge-webrsync. I'll come back to this but I'd rather work with a known quantity for now than rush a fix. Bug: https://bugs.gentoo.org/940120 Signed-off-by: Sam James <sam@gentoo.org>
-rwxr-xr-xbin/emerge-webrsync9
-rwxr-xr-xmisc/emerge-delta-webrsync9
2 files changed, 8 insertions, 10 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 124bcaddc..caa4986da 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -105,17 +105,16 @@ do_debug=0
keep=false
handle_pgp_setup() {
- local attr repo_has_webrsync_verify webrsync_gpg
-
# WEBRSYNC_VERIFY_SIGNATURE=0: disable PGP verification
# WEBRSYNC_VERIFY_SIGNATURE=1: use gemato for verification, fallback to regular gpg
# WEBRSYNC_VERIFY_SIGNATURE=2: use legacy FEATURES="webrsync-gpg"
WEBRSYNC_VERIFY_SIGNATURE=1
- has webrsync-gpg ${FEATURES} && webrsync_gpg=1
+ has webrsync-gpg ${FEATURES} && webrsync_gpg=1 || webrsync_gpg=0
- attr=$(__repo_attr "${repo_name}" sync-webrsync-verify-signature)
- [[ ${attr,,} == @(true|yes) ]] && repo_has_webrsync_verify=1
+ repo_has_webrsync_verify=$(
+ has $(__repo_attr "${repo_name}" sync-webrsync-verify-signature | LC_ALL=C tr '[:upper:]' '[:lower:]') true yes
+ )
if [[ -n ${PORTAGE_TEMP_GPG_DIR} ]] || [[ ${repo_has_webrsync_verify} -eq 1 ]]; then
# If FEATURES=webrsync-gpg is enabled then allow direct emerge-webrsync
diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index 8550c15fe..a788cdb0e 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -165,17 +165,16 @@ if [[ ! -d $STATE_DIR ]]; then
fi
handle_pgp_setup() {
- local attr repo_has_webrsync_verify webrsync_gpg
-
# WEBRSYNC_VERIFY_SIGNATURE=0: disable PGP verification
# WEBRSYNC_VERIFY_SIGNATURE=1: use gemato for verification, fallback to regular gpg
# WEBRSYNC_VERIFY_SIGNATURE=2: use legacy FEATURES="webrsync-gpg"
WEBRSYNC_VERIFY_SIGNATURE=1
- has webrsync-gpg ${FEATURES} && webrsync_gpg=1
+ has webrsync-gpg ${FEATURES} && webrsync_gpg=1 || webrsync_gpg=0
- attr=$(__repo_attr "${repo_name}" sync-webrsync-verify-signature)
- [[ ${attr,,} == @(true|yes) ]] && repo_has_webrsync_verify=1
+ repo_has_webrsync_verify=$(
+ has $(__repo_attr "${repo_name}" sync-webrsync-verify-signature | LC_ALL=C tr '[:upper:]' '[:lower:]') true yes
+ )
if [[ -n ${PORTAGE_TEMP_GPG_DIR} ]] || [[ ${repo_has_webrsync_verify} -eq 1 ]]; then
# If FEATURES=webrsync-gpg is enabled then allow direct emerge-webrsync