From d3f070c7a26a79e1f02a745288c5b66e41324146 Mon Sep 17 00:00:00 2001 From: George Joseph Date: Wed, 16 Nov 2016 11:05:43 -0700 Subject: pjproject_bundled: Improve reliability of pjproject download The download process now has a timeout which will cause wget to retry if it stops retrieving data for 5 seconds and fetch and curl to timeout if the whole retrieval take smore than 30 seconds. If the tarball retrieval works, the MD5SUM file is retrieved from the downloads site and the md5 checksum is verified. If either the tarball retrieval or MD5SUM retrieval fails, or the checksums don't match, the entire process is retried once. If it fails again, any incomplete tarball is deleted. .DELETE_ON_ERROR: was also added to the Makefile. Not only does this delete the tarball on failure, it till also delete corrupted library files from the pjproject source directory should they fail to build correctly. Tested all the way back to FreeBSD 9, CentOS 6, Debian 6 and Ubuntu 14. Change-Id: Iea7d33b96a31622ab1b6e54baebaf271959514e1 --- configure.ac | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c7f219d57..f3be3371f 100644 --- a/configure.ac +++ b/configure.ac @@ -263,6 +263,7 @@ AC_SUBST(GNU_LD) AC_PATH_PROG([BISON], [bison], :) AC_PATH_PROG([CMP], [cmp], :) +AC_PATH_PROG([CAT], [cat], :) AC_PATH_PROG([FLEX], [flex], :) AC_PATH_PROG([GREP], [grep], :) AC_PATH_PROG([PYTHON], [python], :) @@ -293,18 +294,23 @@ AC_PATH_PROG([NM], [nm], :) if test "${WGET}" != ":" ; then DOWNLOAD=${WGET} DOWNLOAD_TO_STDOUT="${WGET} -O-" + DOWNLOAD_TIMEOUT='--timeout=$1' else if test "${CURL}" != ":" ; then DOWNLOAD="${CURL} -O --progress-bar -w \"%{url_effective}\n\"" DOWNLOAD_TO_STDOUT="${CURL} -L --progress-bar -w \"%{url_effective}\n\"" + DOWNLOAD_TIMEOUT='--max-time $(or $2,$1)' else AC_PATH_PROG([FETCH], [fetch], [:]) DOWNLOAD=${FETCH} DOWNLOAD_TO_STDOUT="${FETCH} -o-" + DOWNLOAD_TIMEOUT='--timeout=$(or $2,$1)' fi fi AC_SUBST(DOWNLOAD) AC_SUBST(DOWNLOAD_TO_STDOUT) +AC_SUBST(DOWNLOAD_TIMEOUT) + AC_PATH_PROG([LDCONFIG], [ldconfig], :) AC_PATH_PROG([SHA1SUM], [sha1sum], $ac_aux_dir/build_tools/sha1sum-sh) AC_PATH_PROG([OPENSSL], [openssl], :) -- cgit v1.2.3