Skip to content

Commit

Permalink
HICN-685 Fix package script for centos8
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Sardara <[email protected]>
Change-Id: I84c0461d5a7869b38a676f3a02a53080e32d271c
  • Loading branch information
msardara committed Feb 11, 2021
1 parent b3b64c5 commit 5c98619
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
2 changes: 1 addition & 1 deletion extras/libmemif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ include(ExternalProject)

ExternalProject_Add(libmemif
GIT_REPOSITORY https://github.com/FDio/vpp.git
GIT_TAG v20.09
GIT_TAG v21.01
GIT_SHALLOW TRUE
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/libmemif
PATCH_COMMAND bash -c "cp ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists1.patch ./extras/libmemif/CMakeLists.txt && cp ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists2.patch ./extras/libmemif/src/CMakeLists.txt"
Expand Down
16 changes: 2 additions & 14 deletions scripts/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ DEPS_CENTOS=("vpp-devel-${VPP_VERSION_RPM}"
"libcurl-devel"
"asio-devel"
"libconfig-devel"
"centos-release-scl"
"dnf-plugins-core"
"bzip2"
"devtoolset-7"
"rpm-build")

LATEST_EPEL_REPO="http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
COLLECTD_SOURCE="https://github.com/collectd/collectd/releases/download/collectd-5.12.0/collectd-5.12.0.tar.bz2"

function install_collectd_headers() {
Expand Down Expand Up @@ -109,8 +107,6 @@ function setup_fdio_repo() {
elif [ "${DISTRIB_ID}" == "centos" ]; then
curl -s ${PACKAGECLOUD_RELEASE_REPO_RPM} | sudo bash
curl -s ${PACKAGECLOUD_HICN_REPO_RPM} | sudo bash
curl -L ${LATEST_EPEL_REPO} > /tmp/epel-release-latest-7.noarch.rpm
rpm -ivh /tmp/epel-release-latest-7.noarch.rpm || true
else
echo "Distribution ${DISTRIB_ID} is not supported"
exit 1
Expand All @@ -124,9 +120,8 @@ function install_deps() {
if [ ${DISTRIB_ID} == "ubuntu" ]; then
echo ${DEPS_UBUNTU[@]} | xargs sudo ${apt_get} install -y --allow-unauthenticated --no-install-recommends
elif [ ${DISTRIB_ID} == "centos" ]; then
yum config-manager --set-enabled powertools
echo ${DEPS_CENTOS[@]} | xargs sudo yum install -y --nogpgcheck
${CXX_COMPILER} --version
${CC_COMPILER} --version
fi
}

Expand All @@ -146,13 +141,6 @@ function setup() {
echo DISTRIBUTION: ${PRETTY_NAME}
# export variables depending on the platform we are running

if [ ${ID} == "centos" ]; then
# Compilers location
CXX_COMPILER="/opt/rh/devtoolset-7/root/usr/bin/c++"
CC_COMPILER="/opt/rh/devtoolset-7/root/usr/bin/cc"
export CC=${CC_COMPILER} CXX=${CXX_COMPILER}
fi

call_once setup_fdio_repo
call_once install_deps
call_once install_cmake
Expand Down

0 comments on commit 5c98619

Please sign in to comment.