Depot: support for GPG command line override

Allow the gpg utility to be overridden on the command line. For
example, './tool/depot/publish GPG="ssh 10.0.1.3 gpg" ...' would invoke
a remote gpg over SSH.

Fix #2981
This commit is contained in:
Ehmry - 2018-09-13 11:42:02 +02:00 committed by Christian Helmuth
parent 1f5a083129
commit b51ee34b11
2 changed files with 5 additions and 2 deletions

View File

@ -19,3 +19,6 @@ missing_pubkey_files:
@echo "Error: missing public-key files:";\
for i in $(MISSING_PUBKEY_FILES); do echo " $$i"; done; false
# Allow the gpg command to be overridden on the command line
GPG ?= gpg

View File

@ -72,8 +72,8 @@ TARGETS := $(addsuffix .tar.xz.sig,$(addprefix $(PUBLIC_DIR)/,$(ARCHIVES)))
$(PUBLIC_DIR)/%.tar.xz.sig : $(PUBLIC_DIR)/%.tar.xz
$(VERBOSE)rm -f $@;
$(VERBOSE)gpg --detach-sign --digest-algo SHA256 --no-tty --use-agent \
--local-user $(call pubkey_id,$*) $<
$(VERBOSE)$(GPG) --detach-sign --digest-algo SHA256 --no-tty --use-agent \
--local-user $(call pubkey_id,$*) - < $< > $@
.PRECIOUS: $(TARGETS:.tar.xz.sig=.tar.xz)