From 3718df69c2a16f9114fd5179198b8d290dc61c1e Mon Sep 17 00:00:00 2001 From: David Gibson Date: Thu, 21 Jan 2021 20:20:34 +1100 Subject: [PATCH] osbuilder: Remove leftover pieces related to cmake The osbuilder scripts include a bunch of code for installing cmake, even though cmake is never invoked. versions.yaml claims it's needed to build grpc-rs, but that doesn't appear to be in our dependency graph. Presumably, we used to need this, but don't any more. So, remove all cmake references. Fixes #1309 Signed-off-by: David Gibson --- tools/osbuilder/dracut/Dockerfile.in | 1 - .../rootfs-builder/centos/Dockerfile.in | 2 -- .../rootfs-builder/clearlinux/Dockerfile.in | 1 - .../debian/Dockerfile-aarch64.in | 1 - .../rootfs-builder/debian/Dockerfile.in | 1 - .../rootfs-builder/fedora/Dockerfile.in | 1 - tools/osbuilder/rootfs-builder/rootfs.sh | 6 ---- .../rootfs-builder/suse/install-packages.sh | 1 - .../ubuntu/Dockerfile-aarch64.in | 1 - .../rootfs-builder/ubuntu/Dockerfile.in | 1 - tools/osbuilder/scripts/lib.sh | 29 ------------------- tools/osbuilder/tests/test_images.sh | 2 -- versions.yaml | 13 --------- 13 files changed, 60 deletions(-) diff --git a/tools/osbuilder/dracut/Dockerfile.in b/tools/osbuilder/dracut/Dockerfile.in index 9d3a7c75e4..49702d9e91 100644 --- a/tools/osbuilder/dracut/Dockerfile.in +++ b/tools/osbuilder/dracut/Dockerfile.in @@ -10,7 +10,6 @@ RUN zypper --non-interactive refresh; \ autoconf \ automake \ binutils \ - cmake \ coreutils \ cpio \ curl \ diff --git a/tools/osbuilder/rootfs-builder/centos/Dockerfile.in b/tools/osbuilder/rootfs-builder/centos/Dockerfile.in index c7714ad18c..5abd3acf40 100644 --- a/tools/osbuilder/rootfs-builder/centos/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/centos/Dockerfile.in @@ -33,8 +33,6 @@ RUN yum -y update && yum install -y \ vim \ which -# install cmake because centos7's cmake is too old -@INSTALL_CMAKE@ @INSTALL_MUSL@ # This will install the proper golang to build Kata components @INSTALL_GO@ diff --git a/tools/osbuilder/rootfs-builder/clearlinux/Dockerfile.in b/tools/osbuilder/rootfs-builder/clearlinux/Dockerfile.in index 949812541e..173c221072 100644 --- a/tools/osbuilder/rootfs-builder/clearlinux/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/clearlinux/Dockerfile.in @@ -12,7 +12,6 @@ RUN dnf -y update && dnf install -y \ automake \ binutils \ chrony \ - cmake \ coreutils \ curl \ curl \ diff --git a/tools/osbuilder/rootfs-builder/debian/Dockerfile-aarch64.in b/tools/osbuilder/rootfs-builder/debian/Dockerfile-aarch64.in index e119d3599f..13e1532e23 100644 --- a/tools/osbuilder/rootfs-builder/debian/Dockerfile-aarch64.in +++ b/tools/osbuilder/rootfs-builder/debian/Dockerfile-aarch64.in @@ -13,7 +13,6 @@ RUN apt-get update && apt-get install -y \ binutils \ build-essential \ chrony \ - cmake \ coreutils \ curl \ debianutils \ diff --git a/tools/osbuilder/rootfs-builder/debian/Dockerfile.in b/tools/osbuilder/rootfs-builder/debian/Dockerfile.in index 88629aefae..3535f5c4b0 100644 --- a/tools/osbuilder/rootfs-builder/debian/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/debian/Dockerfile.in @@ -15,7 +15,6 @@ RUN apt-get update && apt-get --no-install-recommends install -y \ build-essential \ ca-certificates \ chrony \ - cmake \ coreutils \ curl \ debianutils \ diff --git a/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in b/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in index b67203341f..a1cdbbec6d 100644 --- a/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/fedora/Dockerfile.in @@ -12,7 +12,6 @@ RUN dnf -y update && dnf install -y \ automake \ binutils \ chrony \ - cmake \ coreutils \ curl \ gcc \ diff --git a/tools/osbuilder/rootfs-builder/rootfs.sh b/tools/osbuilder/rootfs-builder/rootfs.sh index 4d69e89d94..bb64ee756d 100755 --- a/tools/osbuilder/rootfs-builder/rootfs.sh +++ b/tools/osbuilder/rootfs-builder/rootfs.sh @@ -17,7 +17,6 @@ GO_AGENT_PKG=${GO_AGENT_PKG:-github.com/kata-containers/agent} RUST_AGENT_PKG=${RUST_AGENT_PKG:-github.com/kata-containers/kata-containers} RUST_AGENT=${RUST_AGENT:-yes} RUST_VERSION="null" -CMAKE_VERSION=${CMAKE_VERSION:-"null"} MUSL_VERSION=${MUSL_VERSION:-"null"} AGENT_BIN=${AGENT_BIN:-kata-agent} AGENT_INIT=${AGENT_INIT:-no} @@ -354,11 +353,6 @@ build_rootfs_distro() echo "Required rust version: $RUST_VERSION" - detect_cmake_version || - die "Could not detect the required cmake version for AGENT_VERSION='${AGENT_VERSION:-master}'." - - echo "Required cmake version: $CMAKE_VERSION" - detect_musl_version || die "Could not detect the required musl version for AGENT_VERSION='${AGENT_VERSION:-master}'." diff --git a/tools/osbuilder/rootfs-builder/suse/install-packages.sh b/tools/osbuilder/rootfs-builder/suse/install-packages.sh index f26339b884..2652df1c98 100644 --- a/tools/osbuilder/rootfs-builder/suse/install-packages.sh +++ b/tools/osbuilder/rootfs-builder/suse/install-packages.sh @@ -28,7 +28,6 @@ zypper --non-interactive install --no-recommends --force-resolution \ autoconf \ automake \ binutils \ - cmake \ coreutils \ curl \ gcc \ diff --git a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in index 13bb09743e..e20050cd20 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in +++ b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile-aarch64.in @@ -17,7 +17,6 @@ RUN apt-get update && apt-get install -y \ binutils \ build-essential \ chrony \ - cmake \ coreutils \ curl \ debianutils \ diff --git a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in index a5da267a4e..f37ce44850 100644 --- a/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in +++ b/tools/osbuilder/rootfs-builder/ubuntu/Dockerfile.in @@ -19,7 +19,6 @@ RUN apt-get update && apt-get --no-install-recommends install -y \ build-essential \ ca-certificates \ chrony \ - cmake \ coreutils \ curl \ debianutils \ diff --git a/tools/osbuilder/scripts/lib.sh b/tools/osbuilder/scripts/lib.sh index e43f78143e..6751bb1631 100644 --- a/tools/osbuilder/scripts/lib.sh +++ b/tools/osbuilder/scripts/lib.sh @@ -7,7 +7,6 @@ set -e KATA_REPO=${KATA_REPO:-github.com/kata-containers/kata-containers} -CMAKE_VERSION=${CMAKE_VERSION:-"null"} MUSL_VERSION=${MUSL_VERSION:-"null"} # Give preference to variable set by CI yq_file="${script_dir}/../../../ci/install_yq.sh" @@ -272,18 +271,6 @@ ENV PATH=\$PATH:\$GOROOT/bin:\$GOPATH/bin # Rust agent # rust installer should set path apropiately, just in case - local cmake_file="cmake-${CMAKE_VERSION}.tar.gz" - local cmake_dir="cmake-${CMAKE_VERSION}" - readonly install_cmake=" -RUN pushd /root; \ - curl -sLO https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${cmake_file}; \ - tar -zxf ${cmake_file}; \ - cd ${cmake_dir}; \ - ./bootstrap > /dev/null 2>\&1; \ - make > /dev/null 2>\&1; \ - make install > /dev/null 2>\&1; \ - popd -" # install musl for compiling rust-agent install_musl= if [ "${muslarch}" == "aarch64" ]; then @@ -346,7 +333,6 @@ RUN ln -sf /usr/bin/g++ /bin/musl-g++ sed \ -e "s|@GO_VERSION@|${GO_VERSION}|g" \ -e "s|@OS_VERSION@|${OS_VERSION:-}|g" \ - -e "s|@INSTALL_CMAKE@||g" \ -e "s|@INSTALL_MUSL@||g" \ -e "s|@INSTALL_GO@|${install_go//$'\n'/\\n}|g" \ -e "s|@INSTALL_RUST@||g" \ @@ -356,7 +342,6 @@ RUN ln -sf /usr/bin/g++ /bin/musl-g++ sed \ -e "s|@GO_VERSION@|${GO_VERSION}|g" \ -e "s|@OS_VERSION@|${OS_VERSION:-}|g" \ - -e "s|@INSTALL_CMAKE@|${install_cmake//$'\n'/\\n}|g" \ -e "s|@INSTALL_MUSL@|${install_musl//$'\n'/\\n}|g" \ -e "s|@INSTALL_GO@|${install_go//$'\n'/\\n}|g" \ -e "s|@INSTALL_RUST@|${install_rust//$'\n'/\\n}|g" \ @@ -394,20 +379,6 @@ detect_rust_version() [ "$?" == "0" ] && [ "$RUST_VERSION" != "null" ] } -detect_cmake_version() -{ - info "Detecting cmake version" - typeset -r yq=$(command -v yq || command -v "${GOPATH}/bin/yq" || echo "${GOPATH}/bin/yq") - if [ ! -f "$yq" ]; then - source "$yq_file" - fi - - info "Get cmake version from ${kata_versions_file}" - CMAKE_VERSION="$(cat "${kata_versions_file}" | $yq r -X - "externals.cmake.version")" - - [ "$?" == "0" ] && [ "$CMAKE_VERSION" != "null" ] -} - detect_musl_version() { info "Detecting musl version" diff --git a/tools/osbuilder/tests/test_images.sh b/tools/osbuilder/tests/test_images.sh index a3a7757bbb..2e0c2744a6 100755 --- a/tools/osbuilder/tests/test_images.sh +++ b/tools/osbuilder/tests/test_images.sh @@ -644,8 +644,6 @@ test_dracut() die "Could not detect the required Go version for AGENT_VERSION='${AGENT_VERSION:-master}'." detect_rust_version || die "Could not detect the required rust version for AGENT_VERSION='${AGENT_VERSION:-master}'." - detect_cmake_version || - die "Could not detect the required cmake version for AGENT_VERSION='${AGENT_VERSION:-master}'." detect_musl_version || die "Could not detect the required musl version for AGENT_VERSION='${AGENT_VERSION:-master}'." diff --git a/versions.yaml b/versions.yaml index 6b33e62654..47ee6dff15 100644 --- a/versions.yaml +++ b/versions.yaml @@ -237,19 +237,6 @@ externals: .*/v?(\d\S+)\.tar\.gz version: "v1.0.0-rc5" - cmake: - description: | - Build system, to build grpc-rs. - url: "https://github.com/Kitware/CMake" - uscan-url: >- - https://github.com/Kitware/CMake/releases/download/ - v?([\d\.]+)/cmake-([\d\.]+)\.tar\.gz - version: "3.15.3" - meta: - description: | - 'newest-version' is the latest version known to work. - newest-version: "3.15.3" - musl: description: | The musl library is used to build the rust agent.