From d98f98f46914296aaf1e035ec8e120d212f9003d Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Thu, 4 Apr 2024 19:34:45 -0600 Subject: [PATCH 1/5] No substitution in the name --- .github/workflows/container-trafficserver-alpine.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/container-trafficserver-alpine.yml b/.github/workflows/container-trafficserver-alpine.yml index d59afc24d3..2ed1669ea6 100644 --- a/.github/workflows/container-trafficserver-alpine.yml +++ b/.github/workflows/container-trafficserver-alpine.yml @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -name: Container ghcr.io/${{ github.repository }}/ci/trafficserver-alpine +name: Container trafficserver-alpine env: CONTAINER: ghcr.io/${{ github.repository }}/ci/trafficserver-alpine From d618ccc6939922270c956fe2521877010dfc143b Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Thu, 4 Apr 2024 19:45:05 -0600 Subject: [PATCH 2/5] Download ATS from the Apache archive download.apache.org only contains currently-supported releases. --- .github/containers/trafficserver-alpine/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/containers/trafficserver-alpine/Dockerfile b/.github/containers/trafficserver-alpine/Dockerfile index 9efce0a9b8..a6f2fd3116 100644 --- a/.github/containers/trafficserver-alpine/Dockerfile +++ b/.github/containers/trafficserver-alpine/Dockerfile @@ -17,7 +17,7 @@ FROM alpine:latest AS build-trafficserver ARG ATS_VERSION -ADD https://downloads.apache.org/trafficserver/trafficserver-${ATS_VERSION}.tar.bz2 /tmp/ +ADD https://archive.apache.org/dist/trafficserver/trafficserver-${ATS_VERSION}.tar.bz2 /tmp/ RUN set -o errexit -o nounset -o xtrace; \ cd tmp; \ dirname=trafficserver-${ATS_VERSION}; \ From 8d7fa3ee04f0410aae9b6a15197201aea97faeea Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Thu, 4 Apr 2024 19:46:44 -0600 Subject: [PATCH 3/5] Use Alpine main repo version 3.16 for adding package libexecinfo-dev Alpine versions above 3.16 do not contain package libexecinfo-dev, which ATS needs. Alpine 3.19 still fails for unknown reasons, but Alpine 3.18 builds with this fix. --- .../trafficserver-alpine/Dockerfile | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/containers/trafficserver-alpine/Dockerfile b/.github/containers/trafficserver-alpine/Dockerfile index a6f2fd3116..9bccd32773 100644 --- a/.github/containers/trafficserver-alpine/Dockerfile +++ b/.github/containers/trafficserver-alpine/Dockerfile @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. -FROM alpine:latest AS build-trafficserver +FROM alpine:3.18 AS build-trafficserver ARG ATS_VERSION ADD https://archive.apache.org/dist/trafficserver/trafficserver-${ATS_VERSION}.tar.bz2 /tmp/ RUN set -o errexit -o nounset -o xtrace; \ @@ -23,7 +23,7 @@ RUN set -o errexit -o nounset -o xtrace; \ dirname=trafficserver-${ATS_VERSION}; \ tar xf ${dirname}.tar.bz2; \ rm ${dirname}.tar.bz2; \ - apk add --no-cache \ + apk add --update --no-cache \ # configure dependencies g++ \ perl \ @@ -31,10 +31,15 @@ RUN set -o errexit -o nounset -o xtrace; \ pcre-dev \ make \ # build dependencies - libexecinfo-dev \ fortify-headers \ linux-headers \ zlib-dev; \ + # Alpine versions above 3.16 do not contain package libexecinfo-dev, + # which ATS needs. + # https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/68#issuecomment-1571877109 + apk add --update --no-cache \ + --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ \ + libexecinfo-dev; \ cd $dirname; \ ./configure \ --disable-tests \ @@ -52,13 +57,18 @@ RUN set -o errexit -o nounset -o xtrace; \ cd ..; \ rm -r $dirname -FROM alpine:latest +FROM alpine:3.18 COPY --from=build-trafficserver /tmp/built/ / -RUN apk add --no-cache \ +RUN apk add --update --no-cache \ # runtime dependencies - libexecinfo \ libstdc++ \ pcre && \ + # Alpine versions above 3.16 do not contain package libexecinfo, + # which ATS needs. + # https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/issues/68#issuecomment-1571877109 + apk add --update --no-cache \ + --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ \ + libexecinfo && \ adduser -D ats USER ats CMD /bin/traffic_server From 8466259c11c707700791ab6522161f52b2b31ce2 Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Tue, 16 Apr 2024 16:00:19 -0600 Subject: [PATCH 4/5] Set default for GITHUB_REPOSITORY --- .github/containers/trafficserver-alpine/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/containers/trafficserver-alpine/docker-compose.yml b/.github/containers/trafficserver-alpine/docker-compose.yml index df0ac1f441..321ddc570c 100644 --- a/.github/containers/trafficserver-alpine/docker-compose.yml +++ b/.github/containers/trafficserver-alpine/docker-compose.yml @@ -42,4 +42,4 @@ services: - linux/amd64 - linux/arm64 # for example, ghcr.io/apache/trafficcontrol/ci/trafficserver-alpine:9.1.2 - image: ${CONTAINER:-ghcr.io/${GITHUB_REPOSITORY}/ci/trafficserver-alpine}:${ATS_VERSION} + image: ${CONTAINER:-ghcr.io/${GITHUB_REPOSITORY:-apache/trafficcontrol}/ci/trafficserver-alpine}:${ATS_VERSION} From 8ae25a49748cd9d57bcdf4d176e9965a945960d7 Mon Sep 17 00:00:00 2001 From: Zach Hoffman Date: Mon, 3 Jun 2024 23:31:29 -0600 Subject: [PATCH 5/5] Update Apache Traffic Server to 9.2.4 --- .env | 2 +- .github/containers/trafficserver-alpine/Dockerfile | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 9f9014e842..d53fc8c7d7 100644 --- a/.env +++ b/.env @@ -1,3 +1,3 @@ -ATS_VERSION=9.1.2 +ATS_VERSION=9.2.4 GO_VERSION=1.22.5 TOMCAT_VERSION=9.0.91 diff --git a/.github/containers/trafficserver-alpine/Dockerfile b/.github/containers/trafficserver-alpine/Dockerfile index 9bccd32773..6ce641c268 100644 --- a/.github/containers/trafficserver-alpine/Dockerfile +++ b/.github/containers/trafficserver-alpine/Dockerfile @@ -41,6 +41,10 @@ RUN set -o errexit -o nounset -o xtrace; \ --repository=https://dl-cdn.alpinelinux.org/alpine/v3.16/main/ \ libexecinfo-dev; \ cd $dirname; \ + # Fix is from https://github.com/apache/trafficserver-ingress-controller/pull/151 + sed -i 's/PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP/PTHREAD_RWLOCK_INITIALIZER/' \ + include/tscore/ink_rwlock.h \ + include/tscpp/util/TsSharedMutex.h; \ ./configure \ --disable-tests \ --enable-experimental-plugins \