mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-01 19:46:45 +00:00
179f742924
This patch makes the handling of failed integrity checks of 3rd-party packages more robust. Previously, a once failed 'make prepare PKG=curl' would not leave any trace of the verification state. Hence, a successive attempt to perform the 'make prepare' step again succeeded even if the signature check failed. To solve this problem, the outcome of a successful signature check is represented by a tag file called 'download/<archive-name>.verified'. Because the rule for extracting the archive depends on the .verify tag file, the extraction step is not performed until the signature check succeeds. Issue #748
53 lines
1.8 KiB
Makefile
53 lines
1.8 KiB
Makefile
include ports/fribidi.inc
|
|
|
|
FRIBIDI_TBZ2 = $(FRIBIDI).tar.bz2
|
|
FRIBIDI_SHA = $(FRIBIDI_TBZ2).sha256
|
|
FRIBIDI_SHA_SIG = $(FRIBIDI_TBZ2).sha256.asc
|
|
FRIBIDI_BASE_URL = http://fribidi.org/download
|
|
FRIBIDI_URL = $(FRIBIDI_BASE_URL)/$(FRIBIDI_TBZ2)
|
|
FRIBIDI_URL_SHA = $(FRIBIDI_BASE_URL)/$(FRIBIDI_SHA)
|
|
FRIBIDI_URL_SIG = $(FRIBIDI_BASE_URL)/$(FRIBIDI_SHA_SIG)
|
|
FRIBIDI_KEY = D3531115
|
|
|
|
#
|
|
# Interface to top-level prepare Makefile
|
|
#
|
|
PORTS += $(FRIBIDI)
|
|
|
|
prepare-fribidi: $(CONTRIB_DIR)/$(FRIBIDI) include/fribidi/fribidi.h
|
|
|
|
$(CONTRIB_DIR)/$(FRIBIDI):clean-fribidi
|
|
|
|
#
|
|
# Port-specific local rules
|
|
#
|
|
$(DOWNLOAD_DIR)/$(FRIBIDI_TBZ2):
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(FRIBIDI_URL) && touch $@
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(FRIBIDI_URL_SHA) && touch $@
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(FRIBIDI_URL_SIG) && touch $@
|
|
|
|
$(DOWNLOAD_DIR)/$(FRIBIDI_TBZ2).verified: $(DOWNLOAD_DIR)/$(FRIBIDI_TBZ2)
|
|
# XXX fribidi does NOT create a detached signature and thus the signature
|
|
# checking is useless !!! -- somebody should inform them
|
|
# see http://blog.terryburton.co.uk/2006/11/falling-into-trap-with-gpg.html
|
|
#$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(FRIBIDI_SHA) $(DOWNLOAD_DIR)/$(FRIBIDI_SHA_SIG) $(FRIBIDI_KEY)
|
|
$(VERBOSE)$(HASHVERIFIER) $(DOWNLOAD_DIR)/$(FRIBIDI_TBZ2) $(DOWNLOAD_DIR)/$(FRIBIDI_SHA) sha256
|
|
$(VERBOSE)touch $@
|
|
|
|
$(CONTRIB_DIR)/$(FRIBIDI): $(DOWNLOAD_DIR)/$(FRIBIDI_TBZ2).verified
|
|
$(VERBOSE)tar xfj $(<:.verified=) -C $(CONTRIB_DIR) && touch $@
|
|
|
|
FRIBIDI_INCLUDES = fribidi.h
|
|
|
|
include/fribidi/fribidi.h:
|
|
$(VERBOSE)for i in lib charset; do \
|
|
for j in `find $(CONTRIB_DIR)/$(FRIBIDI)/$$i -name "fribidi*.h"`; do \
|
|
name=`basename $$j`; \
|
|
ln -sf ../../$(CONTRIB_DIR)/$(FRIBIDI)/$$i/$$name $(dir $@)$$name; \
|
|
done; \
|
|
done
|
|
|
|
clean-fribidi:
|
|
$(VERBOSE)find include/fribidi -type l -delete
|
|
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(FRIBIDI)
|