diff --git a/CHANGELOG.md b/CHANGELOG.md index 431ff48..3b1c5ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## 0.76.0 (2024-12-16) + + +### Features + +* Remove support for Amazon Linux 2 + ## 0.75.1 (2024-11-22) diff --git a/images/build-amazonlinux2/.bazelversion b/images/build-amazonlinux2/.bazelversion deleted file mode 120000 index 8f79a5a..0000000 --- a/images/build-amazonlinux2/.bazelversion +++ /dev/null @@ -1 +0,0 @@ -../../etc/.bazelversion \ No newline at end of file diff --git a/images/build-amazonlinux2/Dockerfile b/images/build-amazonlinux2/Dockerfile deleted file mode 100644 index 057b02e..0000000 --- a/images/build-amazonlinux2/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2022 Google LLC -# -# 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. - -FROM amazonlinux:2.0.20241001.0 - -COPY /install_apps install_golang_apps install_go.sh generate_system_bazelrc .bazelversion /scripts/ -COPY get_workspace_mount /usr/local/bin -COPY gitconfig /etc - -ARG TARGETARCH -ENV BUILD_ARCH="${TARGETARCH}" \ - WORKSPACE=/src/workspace \ - CC=clang - -RUN \ - chmod 644 /etc/gitconfig && \ - /scripts/install_apps && \ - /scripts/generate_system_bazelrc --user-root-name amazonlinux2 && \ - /scripts/install_golang_apps && \ - rm -rf /scripts - -ENV PATH="${PATH}:/usr/local/go/bin:/opt/bin" \ - PYTHON_BIN_PATH="/opt/bin/python3" \ - PYTHON_LIB_PATH="/usr/lib/python3.8" diff --git a/images/build-amazonlinux2/generate_system_bazelrc b/images/build-amazonlinux2/generate_system_bazelrc deleted file mode 120000 index 8f22303..0000000 --- a/images/build-amazonlinux2/generate_system_bazelrc +++ /dev/null @@ -1 +0,0 @@ -../generate_system_bazelrc \ No newline at end of file diff --git a/images/build-amazonlinux2/get_workspace_mount b/images/build-amazonlinux2/get_workspace_mount deleted file mode 120000 index 581579a..0000000 --- a/images/build-amazonlinux2/get_workspace_mount +++ /dev/null @@ -1 +0,0 @@ -../get_workspace_mount \ No newline at end of file diff --git a/images/build-amazonlinux2/gitconfig b/images/build-amazonlinux2/gitconfig deleted file mode 120000 index db62a00..0000000 --- a/images/build-amazonlinux2/gitconfig +++ /dev/null @@ -1 +0,0 @@ -../gitconfig \ No newline at end of file diff --git a/images/build-amazonlinux2/install_apps b/images/build-amazonlinux2/install_apps deleted file mode 100755 index 43fa216..0000000 --- a/images/build-amazonlinux2/install_apps +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -set -o pipefail -set -o errexit - -VERBOSE=0 - -usage() { - local exitval=${1-1} - cat >&2 << USAGE -usage: - $0 - --verbose Emit verbose info. Default: false -USAGE - # shellcheck disable=SC2086 - exit ${exitval} -} - -while [[ $# -gt 0 ]]; do - case "$1" in - --verbose) - VERBOSE=1 - shift - ;; - -h | --help) usage 0 ;; - *) usage ;; - esac -done - -SCRIPT_DIR="$(dirname "$(readlink -f "$0")")" -readonly SCRIPT_DIR -# shellcheck disable=SC1090 -. "${SCRIPT_DIR}"/install_go.sh - -function yum_update() { - yum -y update -} - -function install_python() { - amazon-linux-extras install -y \ - python3.8 - mkdir -p /opt/bin - update-alternatives \ - --install /opt/bin/python3 python3-opt /usr/bin/python3.8 100 \ - --slave /opt/bin/python python /usr/bin/python3.8 - -} - -function install_nitro() { - amazon-linux-extras install -y aws-nitro-enclaves-cli - yum install -y aws-nitro-enclaves-cli-devel -} - -function install_gcc() { - # install gcc, which is required to build socat - yum install -y "gcc-7.3.1*" -} - -function install_misc() { - yum install -y \ - "gettext-0.19.8.*" \ - "git-2.38*" \ - "tar-1.26*" \ - "unzip-6.0*" \ - "which-2.*" \ - "zip-3.0*" -} - -function install_packer() { - yum install -y "yum-utils-1.1.31*" - yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo - yum -y install "packer-1.9.1*" - update-alternatives --install /usr/local/bin/packer packer /usr/bin/packer 100 - - /usr/local/bin/packer version -} - -function install_clang() { - yum install -y "clang-11.1.0*" - clang --version -} - -function cleanup() { - cd / - go clean -cache -modcache -} - -if [[ ${VERBOSE} -eq 1 ]]; then - printf "=== SHELL ENVIRONMENT ===\n" - env -fi - -yum_update -install_nitro -install_misc -install_clang -install_golang "${BUILD_ARCH}" -install_gcc -install_packer -install_python -cleanup diff --git a/images/build-amazonlinux2/install_go.sh b/images/build-amazonlinux2/install_go.sh deleted file mode 120000 index 211fd00..0000000 --- a/images/build-amazonlinux2/install_go.sh +++ /dev/null @@ -1 +0,0 @@ -../install_go.sh \ No newline at end of file diff --git a/images/build-amazonlinux2/install_golang_apps b/images/build-amazonlinux2/install_golang_apps deleted file mode 120000 index acc9d5a..0000000 --- a/images/build-amazonlinux2/install_golang_apps +++ /dev/null @@ -1 +0,0 @@ -../install_golang_apps \ No newline at end of file diff --git a/images/build-amazonlinux2/test/commands.yaml b/images/build-amazonlinux2/test/commands.yaml deleted file mode 100644 index 41823ae..0000000 --- a/images/build-amazonlinux2/test/commands.yaml +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2022 Google LLC -# -# 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. - -# refer to docs at https://github.com/GoogleContainerTools/container-structure-test - -schemaVersion: 2.0.0 - -# command tests require the docker toolchain -commandTests: - - name: nitro-cli version - command: "nitro-cli" - args: ["--version"] - exitCode: 0 - - - name: nitro-cli build-enclave help - command: "nitro-cli" - args: ["build-enclave", "--help"] - exitCode: 0 diff --git a/tests/data/hashes/build-amazonlinux2 b/tests/data/hashes/build-amazonlinux2 deleted file mode 100644 index 49a5d7d..0000000 --- a/tests/data/hashes/build-amazonlinux2 +++ /dev/null @@ -1 +0,0 @@ -566ebf3a2f4bc0a9675b51ee68de67bf0ea6d90c1fbbb9dcd9096002a24ed365 diff --git a/tools/builder.sh b/tools/builder.sh index d2ca2f9..20059c6 100644 --- a/tools/builder.sh +++ b/tools/builder.sh @@ -132,7 +132,7 @@ function builder::docker_img_to_nitro() { local -r docker_image_tag="$3" local -r output_path="$4" local -r eif_name="$5" - local -r image="${6-build-amazonlinux2}" + local -r image="${6-build-amazonlinux2023}" local -r temp_tag="$(mktemp --dry-run temp-XXXXXX)" docker load -i "${docker_image_tar}" # add a temp tag to reduce the chance of conflicts or race conditions @@ -155,7 +155,7 @@ function builder::docker_img_to_nitro() { function builder::docker_uri_to_nitro() { local -r docker_uri="$1" local -r output_base_fname="$2" - local -r image="${3-build-amazonlinux2}" + local -r image="${3-build-amazonlinux2023}" local -r output_eif="${output_base_fname}".eif local -r output_json="${output_base_fname}".json local -r output_pcr0_json="${output_base_fname}".pcr0.json @@ -189,10 +189,6 @@ function builder::cbuild_al() { "${cbuild}" ${CBUILD_ARGS} "${env_args[@]}" --image "${image}" --cmd "$*" } -function builder::cbuild_al2() { - builder::cbuild_al build-amazonlinux2 "$@" -} - function builder::cbuild_al2023() { builder::cbuild_al build-amazonlinux2023 "$@" } diff --git a/tools/cbuild b/tools/cbuild index 7738a8f..ddcc88f 100755 --- a/tools/cbuild +++ b/tools/cbuild @@ -19,7 +19,6 @@ IMAGE="build-debian" VERBOSE=0 declare -r -a IMAGE_LIST=( "build-debian" - "build-amazonlinux2" "build-amazonlinux2023" "presubmit" ) diff --git a/tools/convert-docker-to-nitro b/tools/convert-docker-to-nitro index 7586e03..466ddda 100755 --- a/tools/convert-docker-to-nitro +++ b/tools/convert-docker-to-nitro @@ -22,7 +22,7 @@ function cleanup() { exit ${status} } -declare BUILDER_IMAGE_NAME=build-amazonlinux2 +declare BUILDER_IMAGE_NAME=build-amazonlinux2023 function usage() { declare -r -i exitval=${1-1} diff --git a/version.txt b/version.txt index 7241aa4..e218073 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.75.1 \ No newline at end of file +0.76.0 \ No newline at end of file