[vlc-commits] extra/tools: implement a very simple sum-checking for packages
Jean-Baptiste Kempf
git at videolan.org
Tue Nov 7 16:03:51 CET 2017
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Nov 7 16:00:17 2017 +0100| [425b92921bc1511b7a6d86cecf57a6e85dca741c] | committer: Jean-Baptiste Kempf
extra/tools: implement a very simple sum-checking for packages
We should, in the future, import contribs system, because it is more
complete and better designed...
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=425b92921bc1511b7a6d86cecf57a6e85dca741c
---
extras/tools/SHA512SUMS | 14 ++++++++++++++
extras/tools/tools.mak | 5 +++--
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/extras/tools/SHA512SUMS b/extras/tools/SHA512SUMS
new file mode 100644
index 0000000000..37269942f0
--- /dev/null
+++ b/extras/tools/SHA512SUMS
@@ -0,0 +1,14 @@
+3954a6ad3f522c135f327ba0d376eb16ae42103849c8cc5cd6c8c6e87b8c5433c95a0f2d4dfa3e6c2705ee0b8996e5b27d0b2248f64a05fc8c902116cc45a7b2 apache-ant-1.9.7.tar.bz2
+e34c7818bcde14d2cb13cdd293ed17d70740d4d1fd7c67a07b415491ef85d42f450d4fe5f8f80cc330bf75c40a62774c51a4336e06e8da07a4cbc49922d975ee autoconf-2.69.tar.gz
+6f201f96431f5e3d3081c4d71c884ae1f4f45b9c5c7a1306c9f3f3d4bd5ee5f6fae47b55d35241b3cae84be555cc0ab84c034acdcd5d9a071f6f0ecdee2dec73 automake-1.15.tar.gz
+49ea6f74a81dfa8ed8336c94ed50e0a483b796132c260f4bef159f9c389d99cc7b26ecfcccdd8b0a8f5b52fddd277c17c547d2a2e8848da9912c464ada1cbe3f cmake-3.8.2.tar.gz
+9953413376c6b33e9e49d1f4f5b2d50075e0b1defb17b3c233d186d21416e6b607df11f6030588eeec3b025e1075c9c37a3db3c872fc22329d1dc0d0c6e2d9d0 gas-preprocessor-72887b9.tar.gz
+0e54af7bbec376f943f2b8e4f13631fe5627b099a37a5f0252e12bade76473b0a36a673529d594778064cd8632abdc43d8a20883d66d6b27738861afbb7e211d libtool-2.4.2.tar.gz
+633afe79feabe9764675dcfb79eb91e6ed09a89405bcbefec64afb6f422a269f35905ee3c02bfcbff75b911870926791ef5bdf0c6cf27b5b2b9c9ae55cd70cf6 m4-1.4.16.tar.gz
+56a9656539448972bc3080357ccc987bd4cbca3847758fe41251eb8af1a5e403a75f38d1344fa2c0bd56de880f37f3eaafbe7116c506f33331e7a8dd8a53cf2a pkg-config-0.28-1.tar.gz
+9f85a98e55cbc9f245a3079d5a597f778454bc945f0942cb10fbdfbde5fe12b17d6dda93d6a8d5281459ad30a3840be7e0712feb33a824226884e7e4da54a061 protobuf-3.1.0.tar.gz
+6c1fe4f6fa8546ae28b92ccfbae94355ff0d3cea346b9ae8ce4cf6c2bdbeb823e0ccd355332643ea72d3befd533a8b3030ddbf82be7ffa811c2c58cbb01aaa38 ragel-6.10.tar.gz
+dbbb0bb348fac54612d29182c09c88bda7096dea03bd94f03c580c24146e65a06db12808c6a1a9adc94548fa3843511e3e80b251cb07142110cf149eab23f573 sed-4.2.2.tar.bz2
+3bc12441bebfc388017ad0632fb3e777ceaf62be82fb19ce771df8bbb765eb094dad336110189f49f5eaaebd4d6ced586098e1e3c8b9f7f775dc483d5513f209 tar-1.26.tar.bz2
+83c50b8949b7215ab650fc9bf335e684d4bb2738357e1d002f31cfe4c77f96072e45767a0126016363e0272db880c4a5bd35b280e6f5074a466882137a477c79 xz-5.2.2.tar.bz2
+e80ace766e145f6486e76da1a5a9819221b7f406745a02529b4ad220ef7f51ddd67f23d0d8b187bffc9725d9f9742ae5f3a0bb23ee5b2a61153332fb3e286b77 yasm-1.2.0.tar.gz
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 517f97ef24..47d05fd6ba 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -12,7 +12,7 @@ AUTOCONF=$(PREFIX)/bin/autoconf
export AUTOCONF
ifeq ($(shell curl --version >/dev/null 2>&1 || echo FAIL),)
-download = curl -f -L -- "$(1)" > "$@"
+download = curl -f -L -- "$(1)" > "$@.tmp" && touch $@.tmp && mv $@.tmp $@
else ifeq ($(shell wget --version >/dev/null 2>&1 || echo FAIL),)
download = rm -f $@.tmp && \
wget --passive -c -p -O $@.tmp "$(1)" && \
@@ -28,7 +28,8 @@ download = $(error Neither curl nor wget found!)
endif
download_pkg = $(call download,$(VIDEOLAN)/$(2)/$(lastword $(subst /, ,$(@)))) || \
- ( $(call download,$(1)) && echo "Please upload package $(lastword $(subst /, ,$(@))) to our FTP" )
+ ( $(call download,$(1)) && echo "Please upload package $(lastword $(subst /, ,$(@))) to our FTP" ) \
+ && sha512sum --check --ignore-missing SHA512SUMS
UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f)) \
More information about the vlc-commits
mailing list