mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-29 07:06:25 +00:00
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
41 lines
1.2 KiB
Makefile
41 lines
1.2 KiB
Makefile
LIBICONV = libiconv-1.14
|
|
LIBICONV_TGZ = $(LIBICONV).tar.gz
|
|
LIBICONV_SIG = $(LIBICONV_TGZ).sig
|
|
LIBICONV_BASE_URL = http://ftp.gnu.org/pub/gnu/libiconv
|
|
LIBICONV_URL = $(LIBICONV_BASE_URL)//$(LIBICONV_TGZ)
|
|
LIBICONV_URL_SIG = $(LIBICONV_BASE_URL)//$(LIBICONV_SIG)
|
|
LIBICONV_KEY = GNU
|
|
|
|
#
|
|
# Interface to top-level prepare Makefile
|
|
#
|
|
PORTS += $(LIBICONV)
|
|
|
|
prepare-libiconv: $(CONTRIB_DIR)/$(LIBICONV) include/iconv
|
|
|
|
#
|
|
# Port-specific local rules
|
|
#
|
|
$(DOWNLOAD_DIR)/$(LIBICONV_TGZ):
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(LIBICONV_URL) && touch $@
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(LIBICONV_URL_SIG) && touch $@
|
|
|
|
$(DOWNLOAD_DIR)/$(LIBICONV_TGZ).verified: $(DOWNLOAD_DIR)/$(LIBICONV_TGZ)
|
|
$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(LIBICONV_TGZ) $(DOWNLOAD_DIR)/$(LIBICONV_SIG) $(LIBICONV_KEY)
|
|
$(VERBOSE)touch $@
|
|
|
|
$(CONTRIB_DIR)/$(LIBICONV): $(DOWNLOAD_DIR)/$(LIBICONV_TGZ).verified
|
|
$(VERBOSE)tar xfz $(<:.verified=) -C $(CONTRIB_DIR) && touch $@
|
|
|
|
#
|
|
# Install iconv headers
|
|
#
|
|
|
|
include/iconv:
|
|
$(VERBOSE)mkdir -p $@
|
|
$(VERBOSE)ln -sf ../../src/lib/libiconv/iconv.h $@
|
|
|
|
clean-libiconv:
|
|
$(VERBOSE)rm -rf include/iconv
|
|
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(LIBICONV)
|