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
68 lines
2.3 KiB
Makefile
68 lines
2.3 KiB
Makefile
OPENSSL_VERSION = 1.0.1c
|
|
OPENSSL = openssl-$(OPENSSL_VERSION)
|
|
OPENSSL_TGZ = $(OPENSSL).tar.gz
|
|
OPENSSL_SIG = $(OPENSSL_TGZ).asc
|
|
OPENSSL_BASE_URL = https://www.openssl.org/source
|
|
OPENSSL_URL = $(OPENSSL_BASE_URL)/$(OPENSSL_TGZ)
|
|
OPENSSL_URL_SIG = $(OPENSSL_BASE_URL)/$(OPENSSL_SIG)
|
|
OPENSSL_KEY = "49A563D9 26BB437D F295C759 9C58A66D 2118CF83 F709453B 5A6A9B85"
|
|
|
|
# local openssl src
|
|
OPENSSL_SRC = src/lib/openssl
|
|
|
|
#
|
|
# Interface to top-level prepare Makefile
|
|
#
|
|
PORTS += $(OPENSSL)
|
|
|
|
prepare-openssl: $(CONTRIB_DIR)/$(OPENSSL) include/openssl generate_asm
|
|
|
|
#$(CONTRIB_DIR)/$(OPENSSL):
|
|
|
|
#
|
|
# Port-specific local rules
|
|
#
|
|
$(DOWNLOAD_DIR)/$(OPENSSL_TGZ):
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(OPENSSL_URL) && touch $@
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(OPENSSL_URL_SIG) && touch $@
|
|
|
|
$(DOWNLOAD_DIR)/$(OPENSSL_TGZ).verified: $(DOWNLOAD_DIR)/$(OPENSSL_TGZ)
|
|
$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(OPENSSL_TGZ) $(DOWNLOAD_DIR)/$(OPENSSL_SIG) $(OPENSSL_KEY)
|
|
$(VERBOSE)touch $@
|
|
|
|
$(CONTRIB_DIR)/$(OPENSSL): $(DOWNLOAD_DIR)/$(OPENSSL_TGZ)
|
|
$(VERBOSE)tar xfz $(<:.verified=) -C $(CONTRIB_DIR) && touch $@
|
|
|
|
#
|
|
# Generate ASM codes
|
|
#
|
|
|
|
generate_asm: $(OPENSSL_SRC)/x86_64/modexp512.s $(OPENSSL_SRC)/x86_64/rc4_md5.s
|
|
|
|
$(OPENSSL_SRC)/x86_64/modexp512.s:
|
|
$(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/bn/asm/modexp512-x86_64.pl \
|
|
$(CONTRIB_DIR)/$(OPENSSL_DIR)/crypto/perlasm/x86as.pl > $@
|
|
|
|
$(OPENSSL_SRC)/x86_64/rc4_md5.s:
|
|
$(VERBOSE)perl $(CONTRIB_DIR)/$(OPENSSL)/crypto/rc4/asm/rc4-md5-x86_64.pl \
|
|
$(CONTRIB_DIR)/$(OPENSSL_DIR)/crypto/perlasm/x86as.pl > $@
|
|
|
|
|
|
#
|
|
# Install openssl headers
|
|
#
|
|
include/openssl:
|
|
$(VERBOSE)mkdir -p $@
|
|
$(VERBOSE)for i in `find $(CONTRIB_DIR)/$(OPENSSL)/include -name *.h`; do \
|
|
ln -fs ../../$$i include/openssl/; done
|
|
$(VERBOSE)rm include/openssl/opensslconf.h
|
|
$(VERBOSE)ln -fs ../../$(CONTRIB_DIR)/$(OPENSSL)/e_os.h include/openssl/
|
|
$(VERBOSE)ln -fs ../../$(CONTRIB_DIR)/$(OPENSSL)/crypto/md2/md2.h include/openssl/
|
|
$(VERBOSE)ln -fs ../../$(CONTRIB_DIR)/$(OPENSSL)/crypto/rc5/rc5.h include/openssl/
|
|
$(VERBOSE)ln -fs ../../$(CONTRIB_DIR)/$(OPENSSL)/crypto/store/store.h include/openssl/
|
|
|
|
clean-openssl:
|
|
$(VERBOSE)rm -rf include/openssl
|
|
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(OPENSSL)
|
|
$(VERBOSE)rm -rf $(OPENSSL_SRC)/x86_32/*.s $(OPENSSL_SRC)/x86_64/*.s
|