Revise scripts that install RMR on CentOS/Debian 94/3494/2
authorLott, Christopher (cl778h) <cl778h@att.com>
Mon, 27 Apr 2020 21:46:12 +0000 (17:46 -0400)
committerLott, Christopher (cl778h) <cl778h@att.com>
Mon, 27 Apr 2020 21:55:29 +0000 (17:55 -0400)
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) <cl778h@att.com>
Change-Id: Ied73a68d008faac9702b0fd365c0bf40c94756e6

jjb/ric-app-qp-driver/ric-app-qp-driver.yaml
jjb/ric-plt-a1/ric-plt-a1.yaml
jjb/ric-plt-xapp-frame-cpp/ric-plt-xapp-frame-cpp.yaml
jjb/ric-plt-xapp-frame-py/ric-plt-xapp-frame-py.yaml
jjb/shell/cmake-package.sh [deleted file]
jjb/shell/install-deb-nng-rmr.sh [deleted file]
jjb/shell/install-deb-rmr.sh [moved from jjb/shell/install-deb-rmr3.sh with 86% similarity]
jjb/shell/install-rpm-nng-rmr.sh [deleted file]
jjb/shell/install-rpm-rmr.sh [moved from jjb/shell/install-rpm-rmr3.sh with 86% similarity]

index ef4ba97..0c6fede 100644 (file)
@@ -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
index 71730e3..e6ac32e 100644 (file)
@@ -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}
index 3ca6af3..51d2447 100644 (file)
@@ -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
 
index 2e22999..b6c4e04 100644 (file)
@@ -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 (file)
index 021f660..0000000
+++ /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 (file)
index 8b472c0..0000000
+++ /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"
similarity index 86%
rename from jjb/shell/install-deb-rmr3.sh
rename to jjb/shell/install-deb-rmr.sh
index 5749495..5f437d6 100644 (file)
 # 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 (file)
index 20ee27c..0000000
+++ /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"
similarity index 86%
rename from jjb/shell/install-rpm-rmr3.sh
rename to jjb/shell/install-rpm-rmr.sh
index cb74bea..6cb3793 100644 (file)
 # 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"