mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-28 14:49:58 +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
48 lines
1.5 KiB
Makefile
48 lines
1.5 KiB
Makefile
PYTHON = python-2.6.4
|
|
PYTHON_TGZ = Python-2.6.4.tgz
|
|
PYTHON_SIG = $(PYTHON_TGZ).asc
|
|
PYTHON_BASE_URL = http://www.python.org/ftp/python/2.6.4
|
|
PYTHON_URL = $(PYTHON_BASE_URL)/$(PYTHON_TGZ)
|
|
PYTHON_URL_SIG = $(PYTHON_BASE_URL)/$(PYTHON_SIG)
|
|
PYTHON_KEY = 12EF3DC38047DA382D18A5B999CDEA9DA4135B38
|
|
|
|
#
|
|
# Interface to top-level prepare Makefile
|
|
#
|
|
PORTS += $(PYTHON)
|
|
|
|
prepare-python: $(CONTRIB_DIR)/$(PYTHON) include/python2.6
|
|
|
|
$(CONTRIB_DIR)/$(PYTHON): clean-python
|
|
|
|
#
|
|
# Port-specific local rules
|
|
#
|
|
$(DOWNLOAD_DIR)/$(PYTHON_TGZ):
|
|
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(PYTHON_URL) && touch $@
|
|
|
|
$(DOWNLOAD_DIR)/$(PYTHON_TGZ).verified: $(DOWNLOAD_DIR)/$(PYTHON_TGZ)
|
|
#
|
|
# As signatures are only provided for versions 2.7.3 and newer, the check
|
|
# is yet disabled. Just remove the comment sign once the newer version is
|
|
# used.
|
|
#
|
|
#$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(PYTHON_URL_SIG) && touch $@
|
|
#$(VERBOSE)$(SIGVERIFIER) $(DOWNLOAD_DIR)/$(PYTHON_TGZ) $(DOWNLOAD_DIR)/$(PYTHON_SIG) $(PYTHON_KEY)
|
|
$(VERBOSE)touch $@
|
|
|
|
$(CONTRIB_DIR)/$(PYTHON): $(DOWNLOAD_DIR)/$(PYTHON_TGZ)
|
|
$(VERBOSE)tar xfz $(<:.verified=) -C $(CONTRIB_DIR)
|
|
@# rename Python subdirectory to lower case to be consistent
|
|
@# with the other libs
|
|
$(VERBOSE)mv $(CONTRIB_DIR)/Python-2.6.4 $@
|
|
$(VERBOSE)touch $@
|
|
$(VERBOSE)patch -p0 -i src/lib/python/posixmodule.patch
|
|
|
|
include/python2.6:
|
|
$(VERBOSE)ln -s ../$(CONTRIB_DIR)/$(PYTHON)/Include $@
|
|
|
|
clean-python:
|
|
$(VERBOSE)rm -rf include/python2.6
|
|
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(PYTHON)
|