From 18c71594912bbcdb58210c184f266594bc99597f Mon Sep 17 00:00:00 2001 From: "Lott, Christopher (cl778h)" Date: Mon, 27 Apr 2020 17:46:12 -0400 Subject: [PATCH] Revise scripts that install RMR on CentOS/Debian Drop the install-*-nng-rmr.sh scripts now that NNG is no longer used. Drop the "3" from install-*-rmr3.sh bcos version 4 is now avail. Update client projects appropriately. Drop unused script cmake-package.sh entirely. Signed-off-by: Lott, Christopher (cl778h) Change-Id: Ied73a68d008faac9702b0fd365c0bf40c94756e6 --- jjb/ric-app-qp-driver/ric-app-qp-driver.yaml | 2 +- jjb/ric-plt-a1/ric-plt-a1.yaml | 4 +- .../ric-plt-xapp-frame-cpp.yaml | 2 +- .../ric-plt-xapp-frame-py.yaml | 2 +- jjb/shell/cmake-package.sh | 51 ---------------- jjb/shell/install-deb-nng-rmr.sh | 70 ---------------------- .../{install-deb-rmr3.sh => install-deb-rmr.sh} | 10 ++-- jjb/shell/install-rpm-nng-rmr.sh | 70 ---------------------- .../{install-rpm-rmr3.sh => install-rpm-rmr.sh} | 10 ++-- 9 files changed, 15 insertions(+), 206 deletions(-) delete mode 100644 jjb/shell/cmake-package.sh delete mode 100644 jjb/shell/install-deb-nng-rmr.sh rename jjb/shell/{install-deb-rmr3.sh => install-deb-rmr.sh} (86%) delete mode 100644 jjb/shell/install-rpm-nng-rmr.sh rename jjb/shell/{install-rpm-rmr3.sh => install-rpm-rmr.sh} (86%) diff --git a/jjb/ric-app-qp-driver/ric-app-qp-driver.yaml b/jjb/ric-app-qp-driver/ric-app-qp-driver.yaml index ef4ba977..0c6fede8 100644 --- a/jjb/ric-app-qp-driver/ric-app-qp-driver.yaml +++ b/jjb/ric-app-qp-driver/ric-app-qp-driver.yaml @@ -21,7 +21,7 @@ # the install script assumes an ubuntu image build-node: ubuntu1804-builder-2c-2g pre-build-script: !include-raw-escape: - - ../shell/install-deb-nng-rmr.sh + - ../shell/install-deb-rmr.sh # impt for verify and tox etc python-version: python3 # no need to verify docs diff --git a/jjb/ric-plt-a1/ric-plt-a1.yaml b/jjb/ric-plt-a1/ric-plt-a1.yaml index 71730e3b..e6ac32ec 100644 --- a/jjb/ric-plt-a1/ric-plt-a1.yaml +++ b/jjb/ric-plt-a1/ric-plt-a1.yaml @@ -45,7 +45,7 @@ # the install script assumes an ubuntu image build-node: ubuntu1804-builder-2c-2g pre-build-script: !include-raw-escape: - - ../shell/install-deb-nng-rmr.sh + - ../shell/install-deb-rmr.sh python-version: python3 stream: # run verify on all branches @@ -70,7 +70,7 @@ # the install script assumes an ubuntu image build-node: ubuntu1804-builder-2c-2g pre-build-script: !include-raw-escape: - - ../shell/install-deb-nng-rmr.sh + - ../shell/install-deb-rmr.sh sonar-project-file: "" sonar-properties: | sonar.login={sonarcloud_api_token} diff --git a/jjb/ric-plt-xapp-frame-cpp/ric-plt-xapp-frame-cpp.yaml b/jjb/ric-plt-xapp-frame-cpp/ric-plt-xapp-frame-cpp.yaml index 3ca6af35..51d24477 100644 --- a/jjb/ric-plt-xapp-frame-cpp/ric-plt-xapp-frame-cpp.yaml +++ b/jjb/ric-plt-xapp-frame-cpp/ric-plt-xapp-frame-cpp.yaml @@ -31,7 +31,7 @@ # install RMR per version file in repo pre-build: !include-raw-escape: - ../shell/install-deb-alien.sh - - ../shell/install-deb-rmr3.sh + - ../shell/install-deb-rmr.sh # skip install in cmake-build.sh install: false diff --git a/jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml b/jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml index 2e229990..b6c4e04e 100644 --- a/jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml +++ b/jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml @@ -25,7 +25,7 @@ tox-envs: code,flake8 build-node: ubuntu1804-builder-2c-2g pre-build-script: !include-raw-escape: - - ../shell/install-deb-nng-rmr.sh + - ../shell/install-deb-rmr.sh - project: name: ric-plt-xapp-frame-py-pypi diff --git a/jjb/shell/cmake-package.sh b/jjb/shell/cmake-package.sh deleted file mode 100644 index 021f6601..00000000 --- a/jjb/shell/cmake-package.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: EPL-1.0 -############################################################################## -# Copyright (c) 2020 The Linux Foundation and others. -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License v1.0 -# which accompanies this distribution, and is available at -# http://www.eclipse.org/legal/epl-v10.html -############################################################################## - -# Creates a build directory then invokes cmake and make -# from that dir with only the specified options/targets. -# Supports projects that create DEB/RPM package files for -# upload to PackageCloud or other repository, which must -# use a system install prefix like /usr/local. Calling -# the "install" goal with a system prefix requires sudo, -# but building a package doesn't require the install step. -# Prereqs: -# The build minion has cmake, make, gcc etc. -# Environment variables: -# WORKSPACE is a non-empty path (required) -# CMAKE_INSTALL_PREFIX is a non-empty path (required) -# BUILD_DIR is a path (optional; has usable default) -# CMAKE_OPTS has options for cmake (optional, empty default) -# MAKE_OPTS has options for make (optional, empty default) - -echo "---> cmake-package.sh" - -build_dir="${BUILD_DIR:-$WORKSPACE/build}" -cmake_opts="${CMAKE_OPTS:-}" -make_opts="${MAKE_OPTS:-}" -echo "build_dir: $build_dir" -echo "cmake_opts: $cmake_opts" -echo "make_opts: $make_opts" - -# be careful and verbose -set -eux -o pipefail - -mkdir -p "$build_dir" -cd "$build_dir" || exit -cmake -version -# $cmake_opts needs to wordsplit to pass options. -# shellcheck disable=SC2086 -eval cmake -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $cmake_opts .. -make -version -# $make_opts needs to wordsplit to pass options. -# shellcheck disable=SC2086 -make $make_opts - -echo "---> cmake-package.sh ends" diff --git a/jjb/shell/install-deb-nng-rmr.sh b/jjb/shell/install-deb-nng-rmr.sh deleted file mode 100644 index 8b472c03..00000000 --- a/jjb/shell/install-deb-nng-rmr.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# O-RAN-SC -# -# Copyright (C) 2019 AT&T Intellectual Property and Nokia -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Installs NNG from source and RMR from PackageCloud on Ubuntu18.04 -# Reads RMR version number from repo file rmr-version.yaml - -echo "---> install-deb-nng-rmr.sh" - -set -eu - -echo "Install packages" -sudo apt-get update && \ - sudo apt-get install -y \ - cmake \ - ninja-build - -echo "INFO: cd to tox-dir $TOX_DIR" -cd "$WORKSPACE/$TOX_DIR" - -version_file=rmr-version.yaml -if [[ -f $version_file ]]; then - # pipeline is less elegant than yq but that requires venv and pip install - ver=$(grep "^version:" "$version_file" | cut -d: -f2 | xargs ) -else - echo "File $version_file not found." - exit 1 -fi -if [[ -z $ver ]]; then - echo "Failed to get RMR version string from file $version_file" - exit 1 -else - echo "RMR version string is ${ver}" -fi - -# NNG repo is not frequently tagged so it's pinned to a commit hash. -# This commit provides fix to the proxy-reconnect -# bug that we identified: https://github.com/nanomsg/nng/issues/970 -echo "Clone and build NNG" -git clone https://github.com/nanomsg/nng.git -(cd nng \ - && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \ - && mkdir build \ - && cd build \ - && cmake -DBUILD_SHARED_LIBS=1 -G Ninja .. \ - && ninja \ - && sudo ninja install) - -deb="rmr_${ver}_amd64.deb" -echo "Download RMR library ${ver} as file ${deb}" -wget -nv --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/debian/stretch/${deb}/download.deb -echo "Install RMR library file ${deb}" -sudo dpkg -i ${deb} -rm -f ${deb} - -echo "---> install-deb-nng-rmr.sh ends" diff --git a/jjb/shell/install-deb-rmr3.sh b/jjb/shell/install-deb-rmr.sh similarity index 86% rename from jjb/shell/install-deb-rmr3.sh rename to jjb/shell/install-deb-rmr.sh index 5749495c..5f437d64 100644 --- a/jjb/shell/install-deb-rmr3.sh +++ b/jjb/shell/install-deb-rmr.sh @@ -16,14 +16,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Installs RMR ver 3.x headers and shared-object libraries -# from PackageCloud on a Debian; does NOT install or assume NNG. +# Installs RMR headers and shared-object libraries from PackageCloud +# on a Debian; does NOT install or assume NNG. # Reads RMR version number from repo file rmr-version.yaml like this: # --- # repo: staging (this entry is optional) -# version: 3.6.1 (this entry is required) +# version: 3.8.2 (this entry is required) -echo "---> install-deb-rmr3.sh" +echo "---> install-deb-rmr.sh" # stop on error or unbound var, and be chatty set -eux @@ -49,4 +49,4 @@ for deb in "rmr_${ver}_amd64.deb" "rmr-dev_${ver}_amd64.deb"; do rm -f "${deb}" done -echo "---> install-deb-rmr3.sh ends" +echo "---> install-deb-rmr.sh ends" diff --git a/jjb/shell/install-rpm-nng-rmr.sh b/jjb/shell/install-rpm-nng-rmr.sh deleted file mode 100644 index 20ee27c0..00000000 --- a/jjb/shell/install-rpm-nng-rmr.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -# O-RAN-SC -# -# Copyright (C) 2019 AT&T Intellectual Property and Nokia -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Installs NNG from source and RMR from PackageCloud on CentOS7 -# Reads RMR version number from repo file rmr-version.yaml - -echo "---> install-rpm-nng-rmr.sh" - -set -eu - -echo "Install packages" -sudo yum install -y \ - cmake3 \ - ninja-build - -echo "INFO: cd to tox-dir $TOX_DIR" -cd "$WORKSPACE/$TOX_DIR" - -version_file=rmr-version.yaml -if [[ -f $version_file ]]; then - # pipeline is less elegant than yq but that requires venv and pip install - ver=$(grep "^version:" "$version_file" | cut -d: -f2 | xargs ) -else - echo "File $version_file not found." - exit 1 -fi -if [[ -z $ver ]]; then - echo "Failed to get RMR version string from file $version_file" - exit 1 -else - echo "RMR version string is ${ver}" -fi - -# NNG repo is not frequently tagged so it's pinned to a commit hash. -# This commit provides fix to the proxy-reconnect -# bug that we identified: https://github.com/nanomsg/nng/issues/970 -echo "Clone and build NNG" -git clone https://github.com/nanomsg/nng.git -(cd nng \ - && git checkout e618abf8f3db2a94269a79c8901a51148d48fcc2 \ - && mkdir build \ - && cd build \ - && cmake3 -DBUILD_SHARED_LIBS=1 -G Ninja .. \ - && ninja-build \ - && sudo ninja-build install) - -# RPM packager adds suffix "-1" to version -rpm="rmr-${ver}-1.x86_64.rpm" -echo "Download RMR library ${ver} as file ${rpm}" -wget -nv --content-disposition https://packagecloud.io/o-ran-sc/staging/packages/el/5/${rpm}/download.rpm -echo "Install RMR library file ${rpm}" -sudo rpm -iv ${rpm} -rm -f ${rpm} - -echo "---> install-rpm-nng-rmr.sh ends" diff --git a/jjb/shell/install-rpm-rmr3.sh b/jjb/shell/install-rpm-rmr.sh similarity index 86% rename from jjb/shell/install-rpm-rmr3.sh rename to jjb/shell/install-rpm-rmr.sh index cb74bea8..6cb3793c 100644 --- a/jjb/shell/install-rpm-rmr3.sh +++ b/jjb/shell/install-rpm-rmr.sh @@ -16,14 +16,14 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Installs RMR ver 3.x headers and shared-object libraries -# from PackageCloud on a CentOS; does NOT install or assume NNG. +# Installs RMR headers and shared-object libraries from PackageCloud +# on a CentOS; does NOT install or assume NNG. # Reads RMR version number from repo file rmr-version.yaml like this: # --- # repo: staging (this entry is optional) -# version: 3.6.1 (this entry is required) +# version: 3.8.2 (this entry is required) -echo "---> install-rpm-rmr3.sh" +echo "---> install-rpm-rmr.sh" # stop on error or unbound var, and be chatty set -eux @@ -49,4 +49,4 @@ for rpm in "rmr-${ver}-1.x86_64.rpm" "rmr-devel-${ver}-1.x86_64.rpm"; do rm -f "${rpm}" done -echo "---> install-rpm-rmr3.sh ends" +echo "---> install-rpm-rmr.sh ends" -- 2.16.6