mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-06 11:10:24 +00:00
parent
52301b3bb2
commit
2d041f0e9c
@ -39,22 +39,22 @@ ARCHIVES := $(MAKECMDGOALS)
|
|||||||
|
|
||||||
include $(GENODE_DIR)/tool/depot/mk/gpg.inc
|
include $(GENODE_DIR)/tool/depot/mk/gpg.inc
|
||||||
|
|
||||||
$(DEPOT_DIR)/% : $(PUBLIC_DIR)/%.tgz $(PUBLIC_DIR)/%.tgz.sig
|
$(DEPOT_DIR)/% : $(PUBLIC_DIR)/%.tar.xz $(PUBLIC_DIR)/%.tar.xz.sig
|
||||||
$(VERBOSE)pubkey_file=$(DEPOT_DIR)/$(call archive_user,$*)/pubkey; \
|
$(VERBOSE)pubkey_file=$(DEPOT_DIR)/$(call archive_user,$*)/pubkey; \
|
||||||
gpg --yes -o $$pubkey_file.dearmored --dearmor $$pubkey_file; \
|
gpg --yes -o $$pubkey_file.dearmored --dearmor $$pubkey_file; \
|
||||||
( gpg --no-tty --no-default-keyring \
|
( gpg --no-tty --no-default-keyring \
|
||||||
--keyring $$pubkey_file.dearmored \
|
--keyring $$pubkey_file.dearmored \
|
||||||
--verify $(PUBLIC_DIR)/$*.tgz.sig 2> /dev/null; retval=$$?; \
|
--verify $(PUBLIC_DIR)/$*.tar.xz.sig 2> /dev/null; retval=$$?; \
|
||||||
rm -f $$pubkey_file.dearmored; \
|
rm -f $$pubkey_file.dearmored; \
|
||||||
exit $$retval \
|
exit $$retval \
|
||||||
) || ( echo -e "Error: could not verify '$*', signature does not match\n" \
|
) || ( echo -e "Error: could not verify '$*', signature does not match\n" \
|
||||||
" public key '$$pubkey_file'"; \
|
" public key '$$pubkey_file'"; \
|
||||||
false )
|
false )
|
||||||
$(VERBOSE)mkdir -p $(dir $@)
|
$(VERBOSE)mkdir -p $(dir $@)
|
||||||
$(VERBOSE)tar xfz $(PUBLIC_DIR)/$*.tgz -C $(dir $@)
|
$(VERBOSE)tar xfJ $(PUBLIC_DIR)/$*.tar.xz -C $(dir $@)
|
||||||
|
|
||||||
DOWNLOADED_FILES := $(addprefix $(PUBLIC_DIR)/,$(MAKECMDGOALS:=.tgz)) \
|
DOWNLOADED_FILES := $(addprefix $(PUBLIC_DIR)/,$(MAKECMDGOALS:=.tar.xz)) \
|
||||||
$(addprefix $(PUBLIC_DIR)/,$(MAKECMDGOALS:=.tgz.sig))
|
$(addprefix $(PUBLIC_DIR)/,$(MAKECMDGOALS:=.tar.xz.sig))
|
||||||
|
|
||||||
.PRECIOUS: $(DOWNLOADED_FILES)
|
.PRECIOUS: $(DOWNLOADED_FILES)
|
||||||
|
|
||||||
|
@ -65,18 +65,18 @@ MISSING_PUBKEY_FILES := $(sort \
|
|||||||
$(if $(call pubkey_path,$A),,\
|
$(if $(call pubkey_path,$A),,\
|
||||||
$(DEPOT_DIR)/$(call pubkey_filename,$A))))
|
$(DEPOT_DIR)/$(call pubkey_filename,$A))))
|
||||||
|
|
||||||
TARGETS := $(addsuffix .tgz.sig,$(addprefix $(PUBLIC_DIR)/,$(ARCHIVES)))
|
TARGETS := $(addsuffix .tar.xz.sig,$(addprefix $(PUBLIC_DIR)/,$(ARCHIVES)))
|
||||||
|
|
||||||
$(PUBLIC_DIR)/%.tgz.sig : $(PUBLIC_DIR)/%.tgz
|
$(PUBLIC_DIR)/%.tar.xz.sig : $(PUBLIC_DIR)/%.tar.xz
|
||||||
$(VERBOSE)rm -f $@;
|
$(VERBOSE)rm -f $@;
|
||||||
$(VERBOSE)gpg --detach-sign --no-tty --use-agent --local-user $(call pubkey_id,$*) $<
|
$(VERBOSE)gpg --detach-sign --no-tty --use-agent --local-user $(call pubkey_id,$*) $<
|
||||||
|
|
||||||
.PRECIOUS: $(TARGETS:.tgz.sig=.tgz)
|
.PRECIOUS: $(TARGETS:.tar.xz.sig=.tar.xz)
|
||||||
|
|
||||||
$(PUBLIC_DIR)/%.tgz: $(DEPOT_DIR)/%
|
$(PUBLIC_DIR)/%.tar.xz: $(DEPOT_DIR)/%
|
||||||
@$(ECHO) "$(DARK_COL)publish$(DEFAULT_COL) $@"
|
@$(ECHO) "$(DARK_COL)publish$(DEFAULT_COL) $@"
|
||||||
$(VERBOSE)test -e $(dir $@) || mkdir -p $(dir $@)
|
$(VERBOSE)test -e $(dir $@) || mkdir -p $(dir $@)
|
||||||
$(VERBOSE)tar czf $@ -C $(dir $<) $(notdir $<)
|
$(VERBOSE)tar cJf $@ -C $(dir $<) $(notdir $<)
|
||||||
|
|
||||||
ifneq ($(MISSING_PUBKEY_FILES),)
|
ifneq ($(MISSING_PUBKEY_FILES),)
|
||||||
$(MAKECMDGOALS) $(TARGETS): missing_pubkey_files
|
$(MAKECMDGOALS) $(TARGETS): missing_pubkey_files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user