X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=BUILD.sh;h=49e515b9e5afb120d0d75608302792b067647a5a;hb=841d9ac5cfd3bc9bfab9cd15ed860769885f8efd;hp=eb0c2997435ef58fec5cb2b3a361a662b9622e4f;hpb=a266e8fac20d3e5a66f5fdcb9c66f703ffdfb33b;p=osm%2FSO.git diff --git a/BUILD.sh b/BUILD.sh index eb0c2997..49e515b9 100755 --- a/BUILD.sh +++ b/BUILD.sh @@ -114,10 +114,10 @@ fi if [[ $PLATFORM == ub16 ]]; then PLATFORM_REPOSITORY=${1:-OSM} - PLATFORM_VERSION=${2:-4.99.1.1.57142} + PLATFORM_VERSION=${2:-4.99.1.1.58423} elif [[ $PLATFORM == fc20 ]]; then PLATFORM_REPOSITORY=${1:-OSM} # change to OSM when published - PLATFORM_VERSION=${2:-4.99.1.1.57142} + PLATFORM_VERSION=${2:-4.99.1.1.58423} else echo "Internal error: unknown platform $PLATFORM" exit 1 @@ -130,11 +130,11 @@ fi DAILY_TIMER='apt-daily.timer' DAILY_SERVICE='apt-daily.service' -if [ $(systemctl is-active $DAILY_TIMER) = "active" ] +if [ $(sudo systemctl is-active $DAILY_TIMER) = "active" ] then - systemctl stop $DAILY_TIMER - systemctl disable $DAILY_TIMER - systemctl disable $DAILY_SERVICE + sudo systemctl stop $DAILY_TIMER + sudo systemctl disable $DAILY_TIMER + sudo systemctl disable $DAILY_SERVICE fi # must be run from the top of a workspace @@ -149,8 +149,9 @@ if [[ $PLATFORM == ub16 ]]; then curl http://repos.riftio.com/public/xenial-riftware-public-key | sudo apt-key add - # the old mkcontainer always enabled release which can be bad # so remove it - sudo rm -f /etc/apt/sources.list.d/release - sudo curl -o /etc/apt/sources.list.d/${PLATFORM_REPOSITORY}.list http://buildtracker.riftio.com/repo_file/ub16/${PLATFORM_REPOSITORY}/ + sudo rm -f /etc/apt/sources.list.d/release.list /etc/apt/sources.list.d/rbac.list /etc/apt/sources.list.d/OSM.list + # always use the same file name so that updates will overwrite rather than enable a second repo + sudo curl -o /etc/apt/sources.list.d/RIFT.list http://buildtracker.riftio.com/repo_file/ub16/${PLATFORM_REPOSITORY}/ sudo apt-get update # and install the tools @@ -174,20 +175,28 @@ fi if $runMkcontainer; then sudo apt-get install -y libxml2-dev libxslt-dev sudo /usr/rift/container_tools/mkcontainer --modes build --modes ext --repo ${PLATFORM_REPOSITORY} - sudo pip3 install lxml==3.4.0 + sudo -H pip3 install lxml==3.4.0 fi if [[ $PLATFORM == ub16 ]]; then # install the RIFT platform code: - sudo apt-get install -y --allow-downgrades rw.toolchain-rwbase=${PLATFORM_VERSION} \ - rw.toolchain-rwtoolchain=${PLATFORM_VERSION} \ - rw.core.mgmt-mgmt=${PLATFORM_VERSION} \ - rw.core.util-util=${PLATFORM_VERSION} \ - rw.core.rwvx-rwvx=${PLATFORM_VERSION} \ - rw.core.rwvx-rwdts=${PLATFORM_VERSION} \ - rw.automation.core-RWAUTO=${PLATFORM_VERSION} - # rw.core.rwvx-rwha-1.0=${PLATFORM_VERSION} + # remove these packages since some files moved from one to the other, and one was obsoleted + # ignore failures + + DEL_PACKAGES="rw.toolchain-rwbase rw.toolchain-rwtoolchain rw.core.mgmt-mgmt rw.core.util-util \ + rw.core.rwvx-rwvx rw.core.rwvx-rwdts rw.automation.core-RWAUTO rw.core.rwvx-rwha-1.0" + for package in $DEL_PACKAGES; do + apt remove -y $package || true + done + + INST_PACKAGES="rw.toolchain-rwbase rw.toolchain-rwtoolchain rw.core.mgmt-mgmt rw.core.util-util \ + rw.core.rwvx-rwvx rw.core.rwvx-rwdts rw.automation.core-RWAUTO" + packages="" + for package in $INST_PACKAGES; do + packages="$packages $package=${PLATFORM_VERSION}" + done + sudo apt-get install -y --allow-downgrades $packages sudo apt-get install python-cinderclient