aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2018-07-27 00:05:03 -0700
committerZac Medico <zmedico@gentoo.org>2018-07-27 22:54:43 -0700
commitf810f8694f78dd87172e38d942580532017db4fe (patch)
treeef89e88f7c3fcdeff5bb239ebf8ca6a9630a83ea /misc
parentemerge-delta-webrsync: exit early for signature problem (bug 661838) (diff)
downloadportage-f810f8694f78dd87172e38d942580532017db4fe.tar.gz
portage-f810f8694f78dd87172e38d942580532017db4fe.tar.bz2
portage-f810f8694f78dd87172e38d942580532017db4fe.zip
webrsync: support emerge-delta-webrsync (bug 661838)
Add a repos.conf sync-webrsync-delta setting that makes the webrsync module call emerge-delta-webrsync, so that emerge-delta-webrsync users can benefit from sync-openpgp-key-path support in the webrsync module. Bug: https://bugs.gentoo.org/661838 Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
Diffstat (limited to 'misc')
-rwxr-xr-xmisc/emerge-delta-webrsync17
1 files changed, 16 insertions, 1 deletions
diff --git a/misc/emerge-delta-webrsync b/misc/emerge-delta-webrsync
index ebaa616f9..14e5c7c55 100755
--- a/misc/emerge-delta-webrsync
+++ b/misc/emerge-delta-webrsync
@@ -4,7 +4,15 @@
# Author: Brian Harring <ferringb@gentoo.org>, karltk@gentoo.org originally.
# Rewritten from the old, Perl-based emerge-webrsync script
+# repos.conf configuration for use with emerge --sync and emaint sync
+# using keyring from app-crypt/openpgp-keys-gentoo-release:
+# [gentoo]
+# sync-type = webrsync
+# sync-webrsync-delta = true
+# sync-webrsync-verify-signature = true
+# sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
#
+# Alternative (legacy) PORTAGE_GPG_DIR configuration:
# gpg key import
# KEY_ID=0x96D8BF6D
# gpg --homedir /etc/portage/gnupg --keyserver subkeys.pgp.net --recv-keys $KEY_ID
@@ -106,7 +114,14 @@ if [[ ! -d $STATE_DIR ]]; then
exit -2
fi
-if has webrsync-gpg ${FEATURES} ; then
+if has $(__repo_attr "${repo_name}" sync-webrsync-verify-signature | \
+ LC_ALL=C tr '[:upper:]' '[:lower:]') true yes; then
+ if [[ ! -d ${PORTAGE_GPG_DIR} ]]; then
+ eecho "Do not call ${argv0##*/} directly, instead call emerge --sync or emaint sync."
+ exit 1
+ fi
+ WEBSYNC_VERIFY_SIGNATURE=1
+elif has webrsync-gpg ${FEATURES}; then
WEBSYNC_VERIFY_SIGNATURE=1
else
WEBSYNC_VERIFY_SIGNATURE=0