X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=packer%2Fprovision%2Fbasebuild.sh;h=62f3af55d47c0d3088f6ab186596f2eecd19a455;hb=73a772c586353c4cdd07e4f6eeaa83a2b1ecf6fa;hp=fa1f4446858a22d6cc4d91c9f0761bc4f4a0396a;hpb=d89b98be70e5763b6f0a82f3dc46d4dcf85e6c1d;p=ci-management.git diff --git a/packer/provision/basebuild.sh b/packer/provision/basebuild.sh index fa1f44468..62f3af55d 100644 --- a/packer/provision/basebuild.sh +++ b/packer/provision/basebuild.sh @@ -111,9 +111,9 @@ ubuntu_systems() { # DEB Install Python dependencies echo "---> Installing Python dependencies $(date +'%Y%m%dT%H%M%S')" - PYTHON_PKGS="python-all python-dev python-virtualenv python-setuptools \ - python-pip libssl-dev libmysqlclient-dev python2.7 libffi-dev \ - python-cffi" + PYTHON_PKGS="python-all python-dev python3-virtualenv python-setuptools \ + python3-pip libssl-dev libmysqlclient-dev python2.7 \ + libffi-dev python-cffi" apt install -y ${PYTHON_PKGS} # Memory leakage checks @@ -142,7 +142,7 @@ ubuntu_systems() { # DEB Install VPP packages to shorten build times echo "---> Installing VPP DEB_DEPENDS packages $(date +'%Y%m%dT%H%M%S')" VPP_PKGS="curl build-essential autoconf automake bison libssl-dev ccache \ - debhelper dkms git libtool libganglia1-dev libapr1-dev dh-systemd \ + dkms git libtool libganglia1-dev libapr1-dev dh-systemd \ libconfuse-dev git-review exuberant-ctags cscope indent pkg-config emacs" apt install -y ${VPP_PKGS} @@ -158,9 +158,10 @@ ubuntu_systems() { # DEB Install deb_dpdk packages to shorten build times ###REMOVED sphinx-rtd-theme echo "---> Installing deb_dpdk packages $(date +'%Y%m%dT%H%M%S')" - DEB_DPDK_PKGS="google-mock lsb-release dpkg-dev debian-xcontrol devscripts \ - pristine-tar dh-python python-sphinx libpcap0.8-dev libstdc++5 \ - python-scapy inkscape libxen-dev libxenstore3.0 python-sphinx-rtd-theme" + DEB_DPDK_PKGS="google-mock lsb-release dpkg-dev devscripts pristine-tar \ + dh-python sphinx-doc sphinx-common libpcap0.8-dev libstdc++5 \ + python3-scapy inkscape libxen-dev libxenstore3.0 python3 \ + python3-sphinx python3-sphinx-rtd-theme libibverbs-dev libnuma-dev" apt install -y ${DEB_DPDK_PKGS} sudo apt install -y libcap-dev libpcap-dev @@ -180,65 +181,100 @@ ubuntu_systems() { echo "---> Forcing CA certificate update $(date +'%Y%m%dT%H%M%S')" sudo update-ca-certificates -f > /dev/null 2>&1 echo "<--- Forcing CA certificate update $(date +'%Y%m%dT%H%M%S')" -} - -opensuse_systems() { - # openSuSE Install build tools - echo "---> Installing openSuSE build tools $(date +'%Y%m%dT%H%M%S')" - OPENSUSE_TOOLS_PKGS="glibc-devel-static java-1_8_0-openjdk-devel yum-utils \ - openssl indent pkg-config emacs" - zypper install -y "${OPENSUSE_TOOLS_PKGS}" + # Install TLDK development tools + echo "---> Installing TLDK packages $(date +'%Y%m%dT%H%M%S')" + TLDK_PKGS="libaprutil1-dev libc-dev-bin libc6-dev libcrypt-dev \ + libexpat1-dev libldap2-dev libsctp-dev libsctp1 libserf-1-1 libsvn1 \ + linux-libc-dev python3-pyelftools libnuma-dev" + apt install -y ${TLDK_PKGS} - # Memory leakage checks - zypper install -y valgrind - - # openSuSE Install Python dependencies - echo "---> Installing openSuSE Python dependencies $(date +'%Y%m%dT%H%M%S')" - OPENSUSE_PYTHON_PKGS="python-devel python-virtualenv python-setuptools \ - python-pip python-wheel libmysqlclient-dev kernel-devel" - zypper install -y "${OPENSUSE_PYTHON_PKGS}" - - # openSuSE Install Documentation packages - echo "---> Installing openSuSE documentation packages $(date +'%Y%m%dT%H%M%S')" - OPENSUSE_DOC_PKGS="doxygen graphviz python-jinja2 asciidoc dblatex \ - source-highlight python-sphinx libxml2 libffi-devel python-cffi \ - python-pyparsing libstdc++6 python-sphinx_rtd_theme" - zypper install -y "${OPENSUSE_DOC_PKGS}" - - # openSuSE Install GCC packages - echo "---> Installing openSuSE GCC packages $(date +'%Y%m%dT%H%M%S')" - OPENSUSE_GCC_PKGS="cpp gcc gcc-c++ cmake make lcov" - zypper install -y "${OPENSUSE_GCC_PKGS}" - - # openSuSE Install components to build Ganglia modules - # ganglia-devel not available for 42.3 - echo "---> Installing openSuSE components $(date +'%Y%m%dT%H%M%S')" - OPENSUSE_GANGLIA_MODS="libconfuse-devel python-mock rrdtool rrdtool-devel \ - libapr1 libapr1-devel libexpat-devel pcre-devel" - zypper install -y "${OPENSUSE_GANGLIA_MODS}" - - # openSuSE Install VPP packages to shorten build times - echo "---> Installing VPP dependencies $(date +'%Y%m%dT%H%M%S')" - OPENSUSE_VPP_PKGS="curl autoconf automake bison ccache git libtool \ - git-review ctags cscope libxml2-tools unzip lsb-release devscripts" - zypper install -y "${OPENSUSE_VPP_PKGS}" - - # openSuSE Install TLDK dependencies - OPENSUSE_TLKD_PKGS="libpcap-devel libcap-devel" - yum install -y "${OPENSUSE_TLKD_PKGS}" - zypper -n install -t pattern devel_basis + pip3 install meson ninja - # openSuSE Manipulation tools, edits debugger, and LSB - echo "---> Installing tools packages $(date +'%Y%m%dT%H%M%S')" - TOOL_PKGS="iproute2 ethtool vlan bridge-utils vim gdb gdbserver" - zypper install -y "${TOOL_PKGS}" +} +opensuse_systems() { - # openSuSE Install Puppet packages - PUPPET_PKGS="libxml2-devel libxslt-devel ruby-devel zlib-devel" - zypper install -y "${PUPPET_PKGS}" + # Creating a function to install packages. openSUSE doesn't read the + # packages variables as expected. + function install_pkgs () + { + for pkgs in $@; do + zypper -n install "$pkgs" + done + } + + # Update to latest available packages and security bug-fixes + zypper update -y + + # Replacing cloud.cfg, it's not supported by cloud-init + cp /etc/cloud/cloud.cfg.orig /etc/cloud/cloud.cfg + + # Install openSUSE Development tool packages + echo "--->Installing Development tool packages $(date +'%Y%m%dT%H%M%S')" + ODTL="java-1_8_0-openjdk-devel indent pkg-config lcov cscope libtool ctags \ + bison libxml2-tools libxslt-devel python-virtualenv libopenssl-devel" + install_pkgs "$ODTL" + + # Install openSUSE Development resources and libraries + echo "--->Installing DEV resources & libraries $(date +'%Y%m%dT%H%M%S')" + ODRL="kernel-devel libffi-devel libconfuse-devel libapr1 libapr1-devel \ + libexpat-devel pcre-devel libxml2-devel ruby-devel zlib-devel \ + glibc-devel-static libstdc++6 libclang llvm-clang check-devel" + install_pkgs "$ODRL" + + # Install openSUSE Packaging utilities and resources + echo "--->Installing PKG utilities & resources $(date +'%Y%m%dT%H%M%S')" + OPP="yum-utils rpm-build" + install_pkgs "$OPP" + + # Install openSUSE Python resources and libraries + echo "--->Installing Python resources & libraries $(date +'%Y%m%dT%H%M%S')" + OPRL="python-devel python-setuptools python-pip python-wheel python-mock \ + python3-devel python3-pip python-rpm-macros shadow libnuma-devel" + install_pkgs "$OPRL" + + # Install openSUSE Documentation packages + echo "---> Installing Documentation packages $(date +'%Y%m%dT%H%M%S')" + ODP="doxygen graphviz asciidoc dblatex source-highlight python-sphinx \ + libxml2 python-jinja2 python-cffi python-pyparsing \ + python-sphinx_rtd_theme" + install_pkgs "$ODP" + + # Install openSUSE Compliation packages + echo "--->Installing Compliation packages $(date +'%Y%m%dT%H%M%S')" + OCP="cpp gcc gcc-c++ cmake make gcc6 libstdc++-devel ruby-devel" + install_pkgs "$OCP" + + # Install openSUSE Debugging tool packages + echo "--->Installing Debugging tool packages $(date +'%Y%m%dT%H%M%S')" + ODTP="valgrind rrdtool rrdtool-devel autoconf automake ccache chrpath" + install_pkgs "$ODTP" + + # Install openSUSE Misc tool packages + echo "--->Installing Misc tool packages $(date +'%Y%m%dT%H%M%S')" + OMTP="openssl emacs curl git git-review unzip devscripts \ + iproute2 ethtool vlan bridge-utils vim gdb gdbserver \ + lsb-release distribution-release" + install_pkgs "$OMTP" + + # Install openSUSE TLDK dependencies + OTD="libpcap-devel libcap-devel" + install_pkgs "${OTD}" + zypper -n install -t pattern devel_basis + # Leap 42.3 does not have a recent NASM version and VPP requires NASM 2.12 + # minimum so installing from TW repo + zypper install -y \ + https://download.opensuse.org/tumbleweed/repo/oss/suse/x86_64/nasm-2.13.01-2.2.x86_64.rpm + + # Leap 42.3 does not have a recent INDENT version + # Other distros in Jenkins run 2.2.11 so let's align Leap 42.3 too to avoid + # build checks differences and false-positives + zypper --non-interactive --gpg-auto-import-keys ar \ + https://download.opensuse.org/repositories/devel:/tools/openSUSE_Leap_42.3/devel:tools.repo + zypper --gpg-auto-import-keys ref + zypper install -y indent } all_systems() { @@ -259,6 +295,9 @@ all_systems() { mv /usr/local/bin/packer /usr/local/bin/packer.io # Install packagecloud.io + apt-get update + apt-get install ruby-dev + gem install rake gem install package_cloud }