summaryrefslogtreecommitdiffstats
path: root/docker/scripts/lib_apt.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker/scripts/lib_apt.sh')
-rw-r--r--docker/scripts/lib_apt.sh78
1 files changed, 12 insertions, 66 deletions
diff --git a/docker/scripts/lib_apt.sh b/docker/scripts/lib_apt.sh
index 099a85a6..6cf37ae7 100644
--- a/docker/scripts/lib_apt.sh
+++ b/docker/scripts/lib_apt.sh
@@ -1,7 +1,7 @@
# lib_apt.sh - Docker build script apt library.
# For import only.
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2023 Cisco and/or its affiliates.
# 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:
@@ -35,27 +35,11 @@ apt_install_packages() {
--allow-change-held-packages $@
}
-# Used for older OS distro's which are incompatible
-# with modern distro cmake vesrion
-apt_override_cmake_install_with_pip3_version() {
- local os_cmake="/usr/bin/cmake"
- local os_cmake_ver="$($os_cmake --version | head -1)"
- local pip3_cmake="/usr/local/bin/cmake"
-
- python3 -m pip --disable-pip-version-check install cmake || true
- local pip3_cmake_ver="$($pip3_cmake --version | head -1)"
- echo_log "Overriding $OS_NAME '$os_cmake_ver' with '$pip3_cmake_ver'!"
- apt-get remove -y cmake --autoremove || true
- update-alternatives --quiet --remove-all cmake || true
- update-alternatives --quiet --install "$os_cmake" cmake "$pip3_cmake" 100
- echo_log "Default cmake ($(which cmake)) version: '$(cmake --version | head -1)'!"
-}
-
generate_apt_dockerfile_common() {
local executor_class="$1"
local executor_image="$2"
- debian_docker_inst_sed="| sed -e 's/has_rootless_extras="1"//g' | sh
-"
+ local dpkg_arch="$(dpkg --print-architecture)"
+
cat <<EOF >>"$DOCKERFILE"
# Create download dir to cache external tarballs
@@ -112,31 +96,14 @@ ENV LANG="en_US.UTF-8" LANGUAGE="en_US" LC_ALL="en_US.UTF-8"
# build-essential
#
# TODO: Fix broken project requirement install targets
-# graphviz for 'make bootstrap-doxygen' (VPP)
-# doxygen for 'make doxygen' (VPP)
-# enchant for 'make docs' (VPP)
+# graphviz for doxygen (HICN)
+# doxygen for doxygen (HICN)
# libffi-dev for python cffi install (Ubuntu20.04/VPP/aarch64)
# liblapack-dev for python numpy/scipy (CSIT/aarch64)
# libopenblas-dev for python numpy/scipy (CSIT/aarch64)
# libpcap-dev for python pypcap install (CSIT)
# sshpass for CSIT jobs
#
-# From .../csit/resources/tools/presentation/run_report_*.sh:
-# libxml2
-# libxml2-dev
-# libxslt-dev
-# build-essential
-# zlib1g-dev
-# unzip
-# xvrb
-# texlive-latex-recommended
-# texlive-fonts-recommended
-# texlive-fonts-extra
-# texlive-latex-extra
-# latexmk
-# wkhtmltopdf
-# inkscape
-#
RUN apt-get update -qq \\
&& apt-get install -y \\
apt-transport-https \\
@@ -146,7 +113,6 @@ RUN apt-get update -qq \\
default-jre \\
dnsutils \\
doxygen \\
- enchant \\
emacs \\
facter \\
gawk \\
@@ -156,21 +122,16 @@ RUN apt-get update -qq \\
git-review \\
gnupg-agent \\
graphviz \\
- inkscape \\
iproute2 \\
iputils-clockdiff \\
iputils-ping \\
iputils-tracepath \\
jq \\
- latexmk \\
libffi-dev \\
liblapack-dev \\
libopenblas-dev \\
libpcap-dev \\
- libxml2 \\
- libxml2-dev \\
libxml-xpath-perl \\
- libxslt-dev \\
make \\
python3-pip \\
python3-venv \\
@@ -180,34 +141,23 @@ RUN apt-get update -qq \\
sshpass \\
sysstat \\
sudo \\
- texlive-fonts-extra \\
- texlive-fonts-recommended \\
- texlive-latex-extra \\
- texlive-latex-recommended \\
traceroute \\
tree \\
- unzip \\
vim \\
wget \\
- wkhtmltopdf \\
xmlstarlet \\
- xvfb \\
xz-utils \\
- zlib1g-dev \\
&& curl -L https://packagecloud.io/fdio/master/gpgkey | apt-key add - \\
&& curl -s https://packagecloud.io/install/repositories/fdio/master/script.deb.sh | bash \\
-EOF
- # Hack to prevent failure on debian-9 build
- head $DOCKERFILE
- if grep -qe 'debian:9' "$DOCKERFILE" ; then
- echo " && curl -fsSL https://get.docker.com | sed -e 's/has_rootless_extras=\"1\"//g' | sh \ " >>"$DOCKERFILE"
- else
- echo " && curl -fsSL https://get.docker.com | sh \ " >>"$DOCKERFILE"
- fi
-
- cat <<EOF >>"$DOCKERFILE"
&& rm -r /var/lib/apt/lists/*
+# Install terraform for CSIT
+#
+RUN wget https://releases.hashicorp.com/terraform/1.7.3/terraform_1.7.3_linux_$dpkg_arch.zip \\
+ && unzip terraform_1.7.3_linux_$dpkg_arch.zip \\
+ && mv terraform /usr/bin \\
+ && rm -f terraform_1.7.3_linux_$dpkg_arch.zip
+
# Install packages for all project branches
#
RUN apt-get update -qq \\
@@ -233,10 +183,6 @@ builder_generate_apt_dockerfile() {
local executor_image="$3"
local vpp_install_skip_sysctl_envvar="";
- if grep -q "debian-9" <<< "$executor_os_name" ; then
- # Workaround to VPP package installation failure on debian-9
- vpp_install_skip_sysctl_envvar="ENV VPP_INSTALL_SKIP_SYSCTL=1"
- fi
generate_apt_dockerfile_common $executor_class $executor_image
csit_builder_generate_docker_build_files
cat <<EOF >>"$DOCKERFILE"