Skip to content
Snippets Groups Projects
Unverified Commit 7fa53d79 authored by aviau's avatar aviau
Browse files

Contrib: new --no-checksums parameter

The new --no-checksums parameter allows for skipping checksums
verifications. This can be used to replace tarballs and still use the
contrib system.

This is useful for atleast the two following cases:

 - Distro developper needs contrib to patch the source, but has the
   original source in the distribution.

 - Distro developper repacks the source, breaking the checksum.

Change-Id: I015ce3d0f6f4fb2f5fd5ec2f95528bfb4b045298
Tuleap: #879
parent 63462a0c
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ usage()
echo " --build=BUILD configure for building on BUILD"
echo " --host=HOST cross-compile to build to run on HOST"
echo " --prefix=PREFIX install files in PREFIX"
echo " --no-checksums don't verify checksums (allows to replace tarballs)"
echo " --disable-downloads don't download packages from the internet"
echo " --disable-FOO configure to not build package FOO"
echo " --enable-FOO configure to build package FOO"
......@@ -51,6 +52,9 @@ do
usage
exit 0
;;
--no-checksums)
DISABLE_CONTRIB_CHECKSUMS="TRUE"
;;
--disable-downloads)
DISABLE_CONTRIB_DOWNLOADS="TRUE"
;;
......@@ -113,6 +117,7 @@ CROSS_COMPILE ?= $HOST-
PKGS_DISABLE := $PKGS_DISABLE
PKGS_ENABLE := $PKGS_ENABLE
DISABLE_CONTRIB_DOWNLOADS := $DISABLE_CONTRIB_DOWNLOADS
DISABLE_CONTRIB_CHECKSUMS := $DISABLE_CONTRIB_CHECKSUMS
EOF
add_make()
......
......@@ -337,7 +337,11 @@ checksum = \
"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS" &&) \
(cd $(TARBALLS) && $(1) /dev/stdin) < \
"$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS"
CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512)
ifeq ($(DISABLE_CONTRIB_CHECKSUMS),TRUE)
CHECK_SHA512 = @echo "Skipping checksum verification..."
else
CHECK_SHA512 = $(call checksum,$(SHA512SUM),SHA512)
endif
UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f)) \
$(foreach f,$(filter %.tar.bz2,$^), && tar xvjf $(f)) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment