mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-24 15:56:41 +00:00
f1b46c3205
This change keeps the version-controlled 'pubkey' and 'download' files separate from files generated via depot/create or downloaded via depot/download. So one can remove the entire depot/ directory without interfering with git. Furthermore, depot keys can now be hosted in supplemental repositories independent from Genode's main repository. Fixes #4364
32 lines
1.2 KiB
PHP
32 lines
1.2 KiB
PHP
#
|
|
# \brief Helper for using the GNU privacy guard
|
|
# \author Norman Feske
|
|
# \date 2017-03-27
|
|
#
|
|
|
|
# Allow the gpg command to be overridden on the command line
|
|
GPG ?= gpg
|
|
|
|
pubkey_filename = $(call archive_user,$1)/pubkey
|
|
|
|
pubkey_path = $(firstword \
|
|
$(wildcard $(addsuffix /$(call pubkey_filename,$1), \
|
|
$(REP_SCULPT_DEPOT_DIRS))))
|
|
|
|
# obtain key ID of 'depot/<user>/pubkey' to be used to select signing key
|
|
pubkey_id = $(shell pubkey_file=$(call pubkey_path,$1); \
|
|
$(GPG) --yes -o $$pubkey_file.dearmored --dearmor $$pubkey_file; \
|
|
$(GPG) --with-colon --no-default-keyring --list-public-keys \
|
|
--keyring $$pubkey_file.dearmored |\
|
|
head -n 2 | tail -n 1 | cut -d: -f5; rm -f $$pubkey_file.dearmored)
|
|
|
|
MISSING_PUBKEY_FILES := $(sort \
|
|
$(foreach A,$(ARCHIVES),\
|
|
$(if $(call pubkey_path,$A),,\
|
|
$(call archive_user,$A))))
|
|
|
|
missing_pubkey_files:
|
|
@echo "Error: missing public-key files for:";\
|
|
for i in $(MISSING_PUBKEY_FILES); do echo " $$i"; done; false
|
|
|