From f810f8694f78dd87172e38d942580532017db4fe Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 27 Jul 2018 00:05:03 -0700 Subject: 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 --- misc/emerge-delta-webrsync | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'misc') 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 , 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 -- cgit v1.2.3-65-gdbad