change the package url 97/34197/1
authorwutianwei <wutianwei1@huawei.com>
Mon, 27 Mar 2017 01:16:31 +0000 (09:16 +0800)
committerJustin chi <chigang@huawei.com>
Thu, 4 May 2017 06:33:19 +0000 (06:33 +0000)
We moved the master package repository from <http://205.177.226.237:9999>
to <http://205.177.226.237:9999/master>. When we build the master ISO,
we need download the package from new URL.
Add md5 checksum after downloading package.

Change-Id: Ia6d8a217569e6e8dc676b1290e583348a7b9c347
Signed-off-by: wutianwei <wutianwei1@huawei.com>
(cherry picked from commit 8bc2146293461a619b5c5516a09d2915effbc19f)

build.sh
repo/repo.conf

index 3dfd54f..ab81b8b 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -21,7 +21,7 @@ WORK_PATH=$COMPASS_PATH
 PACKAGES="fuse fuseiso createrepo genisoimage curl"
 
 # PACKAGE_URL will be reset in Jenkins for different branch
-export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.237:9999}
+export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.237:9999/master}
 
 mkdir -p $WORK_DIR
 
@@ -74,6 +74,12 @@ function download_url()
     fi
 
     curl --connect-timeout 10 -o $CACHE_DIR/$1 $2
+    local_md5=`md5sum $CACHE_DIR/$1 | cut -d ' ' -f 1`
+    repo_md5=`cat $CACHE_DIR/$1.md5 | cut -d ' ' -f 1`
+    if [[ $local_md5 != $repo_md5 ]]; then
+        echo "ERROR, the md5sum don't match"
+        exit 1
+    fi
 }
 
 function download_local()
index 8fbdd06..327e84d 100644 (file)
@@ -17,7 +17,7 @@ export PACKAGE_URL=${PACKAGE_URL:-http://205.177.226.237:9999}
 # feature packages
 export KVMFORNFV=${kvmfornfv:-https://gerrit.opnfv.org/gerrit/p/kvmfornfv.git}
 export ODL_PKG="$PACKAGE_URL/distribution-karaf-0.5.2-Boron.tar.gz"
-export JAVA_PKG="$PACKAGE_URL/jdk-8u51-linux-x64.tar.gz \
+export JAVA_PKG="http://download.oracle.com/otn/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz \
                  $PACKAGE_URL/install_jdk8.tar"
 export ONOS_PKG="https://downloads.onosproject.org/release/onos-1.8.4.tar.gz \
                  $PACKAGE_URL/onosfw/networking-onos.tar \