diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1940576bf7..453a56a70d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7032](https://github.com/apache/trafficcontrol/issues/7032) *Cache Config* Add t3c-apply flag to use local ATS version for config generation rather than Server package Parameter, to allow managing the ATS OS package via external tools. See 'man t3c-apply' and 'man t3c-generate' for details.
- [#7097](https://github.com/apache/trafficcontrol/issues/7097) *Traffic Ops, Traffic Portal, t3c* Added the `regional` field to Delivery Services, which affects whether `maxOriginConnections` should be per Cache Group
- [#2388](https://github.com/apache/trafficcontrol/issues/2388) *Trafic Ops, Traffic Portal* Added the `TTLOverride` field to CDNs, which lets you override all TTLs in all Delivery Services of a CDN's snapshot with a single value
+- [#7176](https://github.com/apache/trafficcontrol/pull/7176) *ATC Build system* Support building ATC for the `aarch64` CPU architecture
### Changed
- [#2564](https://github.com/apache/trafficcontrol/issues/2564) Renamed RASCAL references to TRAFFIC_MONITOR
diff --git a/build/functions.sh b/build/functions.sh
index 473b1a998a..73484a1f9d 100755
--- a/build/functions.sh
+++ b/build/functions.sh
@@ -219,7 +219,9 @@ buildRpm() {
for package in "$@"; do
local pre="${package}-${TC_VERSION}-${BUILD_NUMBER}.${RHEL_VERSION}"
local rpm
- rpm="${pre}.$(uname -m).rpm"
+ local arch
+ arch="$(rpm --eval %_arch)"
+ rpm="${pre}.${arch}.rpm"
local srpm="${pre}.src.rpm"
echo "Building the rpm."
{ set +o nounset
@@ -266,7 +268,7 @@ buildRpm() {
srcRPMDest="${package}.src.rpm";
fi
- cp -f "$RPMBUILD/RPMS/$(uname -m)/$rpm" "$DIST/$rpmDest";
+ cp -f "$RPMBUILD/RPMS/${arch}/$rpm" "$DIST/$rpmDest";
code="$?";
if [[ "$code" -ne 0 ]]; then
echo "Could not copy $rpm to $DIST: $code" >&2;
diff --git a/cache-config/testing/docker/trafficserver/run.sh b/cache-config/testing/docker/trafficserver/run.sh
index 7a6bbd59ef..8fad9405ba 100755
--- a/cache-config/testing/docker/trafficserver/run.sh
+++ b/cache-config/testing/docker/trafficserver/run.sh
@@ -111,8 +111,10 @@ wq
ED
) || die "Failed to patch in astats_over_http"
+arch="$(rpm --eval %_arch)"
+
# build a trafficserver RPM
-rm -f /root/rpmbuild/RPMS/x86_64/trafficserver-*.rpm
+rm -f /root/rpmbuild/RPMS/${arch}/trafficserver-*.rpm
cd trafficserver
if [[ ${RUN_ATS_UNIT_TESTS} == true ]]; then
@@ -127,7 +129,7 @@ if [[ ! -d /trafficcontrol/dist ]]; then
mkdir /trafficcontrol/dist
fi
-cp /root/rpmbuild/RPMS/x86_64/trafficserver*.rpm /trafficcontrol/dist ||
+cp /root/rpmbuild/RPMS/${arch}/trafficserver*.rpm /trafficcontrol/dist ||
die "Failed to copy the ATS RPM to the dist directory"
echo "trafficserver RPM has been copied"
diff --git a/grove/build/build_rpm.sh b/grove/build/build_rpm.sh
index a9ecf5bab8..1fe2df529d 100755
--- a/grove/build/build_rpm.sh
+++ b/grove/build/build_rpm.sh
@@ -42,7 +42,7 @@ checkGroveEnvironment() {
BUILD_NUMBER=${BUILD_NUMBER:-$(getBuildNumber)}
RPMBUILD="${GROVE_DIR}/rpmbuild"
DIST="${TC_DIR}/dist"
- RPM="${PACKAGE}-${GROVE_VERSION}-${BUILD_NUMBER}.${RHEL_VERSION}.x86_64.rpm"
+ RPM="${PACKAGE}-${GROVE_VERSION}-${BUILD_NUMBER}.${RHEL_VERSION}.$(rpm --eval %_arch).rpm"
SRPM="${PACKAGE}-${GROVE_VERSION}-${BUILD_NUMBER}.${RHEL_VERSION}.src.rpm"
GOOS="${GOOS:-linux}"
RPM_TARGET_OS="${RPM_TARGET_OS:-$GOOS}"
@@ -126,7 +126,7 @@ buildRpmGrove() {
# copy build RPM to .
[ -d "$DIST" ] || mkdir -p "$DIST";
- cp -f "$RPMBUILD/RPMS/$(uname -m)/${RPM}" "$DIST/$rpmDest";
+ cp -f "$RPMBUILD/RPMS/$(rpm --eval %_arch)/${RPM}" "$DIST/$rpmDest";
code="$?";
if [[ "$code" -ne 0 ]]; then
echo "Could not copy $rpm to $DIST: $code" >&2;
diff --git a/grove/grovetccfg/build/build_rpm.sh b/grove/grovetccfg/build/build_rpm.sh
index e1f2755e4b..578543f469 100755
--- a/grove/grovetccfg/build/build_rpm.sh
+++ b/grove/grovetccfg/build/build_rpm.sh
@@ -42,7 +42,7 @@ checkGroveEnvironment() {
BUILD_NUMBER=${BUILD_NUMBER:-$(getBuildNumber)}
RPMBUILD="${GROVE_DIR}/rpmbuild"
DIST="${TC_DIR}/dist"
- RPM="${PACKAGE}-${GROVE_VERSION}-${BUILD_NUMBER}.${RHEL_VERSION}.x86_64.rpm"
+ RPM="${PACKAGE}-${GROVE_VERSION}-${BUILD_NUMBER}.${RHEL_VERSION}.$(rpm --eval %_arch).rpm"
SRPM="${PACKAGE}-${GROVE_VERSION}-${BUILD_NUMBER}.${RHEL_VERSION}.src.rpm"
GOOS="${GOOS:-linux}"
RPM_TARGET_OS="${RPM_TARGET_OS:-$GOOS}"
@@ -128,7 +128,7 @@ buildRpmGrove() {
# copy build RPM to .
[ -d "$DIST" ] || mkdir -p "$DIST";
- cp -f "$RPMBUILD/RPMS/$(uname -m)/${RPM}" "$DIST/$rpmDest";
+ cp -f "$RPMBUILD/RPMS/$(rpm --eval %_arch)/${RPM}" "$DIST/$rpmDest";
code="$?";
if [[ "$code" -ne 0 ]]; then
echo "Could not copy $rpm to $DIST: $code" >&2;
diff --git a/infrastructure/cdn-in-a-box/Makefile b/infrastructure/cdn-in-a-box/Makefile
index aba16e8d39..866adf2981 100644
--- a/infrastructure/cdn-in-a-box/Makefile
+++ b/infrastructure/cdn-in-a-box/Makefile
@@ -35,6 +35,7 @@ PKG_COMMAND := $(TC_DIR)/pkg
PKG_FLAGS := -v -$(RHEL_VERSION)
BUILD_SUFFIX := _build
BUILD_NUMBER := $(shell git rev-list HEAD 2>/dev/null | wc -l | tr -d '[[:space:]]').$(shell git rev-parse --short=8 HEAD)
+BUILD_ARCH := $(shell rpm --eval %_arch)
TC_VERSION := $(shell cat "$(TC_DIR)/VERSION")
TOMCAT_VERSION := $(shell grep '^\s*TOMCAT_VERSION=' "$(TC_DIR)/traffic_router/build/build_rpm.sh" | cut -d= -f2)
TOMCAT_RELEASE := $(shell grep '^\s*TOMCAT_RELEASE=' "$(TC_DIR)/traffic_router/build/build_rpm.sh" | cut -d= -f2)
@@ -44,9 +45,10 @@ ifeq ($(RHEL_VERSION),7)
ATS_VERSION := $(shell echo "$(ATS_VERSION)" | sed -E 's/^(.*-[0-9]+\.[0-9a-f]{7})[0-9a-f]*/\1/')
endif
-SPECIAL_SAUCE := $(TC_VERSION)-$(BUILD_NUMBER).el$(RHEL_VERSION).x86_64.rpm
+SPECIAL_SAUCE := $(TC_VERSION)-$(BUILD_NUMBER).el$(RHEL_VERSION).$(BUILD_ARCH).rpm
+SPECIAL_SAUCE_NOARCH := $(TC_VERSION)-$(BUILD_NUMBER).el$(RHEL_VERSION).noarch.rpm
SPECIAL_SEASONING := $(TOMCAT_VERSION).$(TOMCAT_RELEASE)-1.el$(RHEL_VERSION).noarch.rpm
-SPECIAL_SYRUP := $(ATS_VERSION).el$(RHEL_VERSION).x86_64.rpm
+SPECIAL_SYRUP := $(ATS_VERSION).el$(RHEL_VERSION).$(BUILD_ARCH).rpm
ATS_SOURCE := $(wildcard $(TC_DIR)/cache-config/testing/docker/trafficserver/**)
TO_SOURCE := $(wildcard $(TC_DIR)/traffic_ops/**)
@@ -89,7 +91,7 @@ ATS_DIST_RPM := $(TC_DIR)/dist/trafficserver-$(SPECIAL_SYRUP)
TM_DIST_RPM := $(TC_DIR)/dist/traffic_monitor-$(SPECIAL_SAUCE)
TO_DIST_RPM := $(TC_DIR)/dist/traffic_ops-$(SPECIAL_SAUCE)
TP_DIST_RPM := $(TC_DIR)/dist/traffic_portal-$(SPECIAL_SAUCE)
-TR_DIST_RPM := $(TC_DIR)/dist/traffic_router-$(SPECIAL_SAUCE)
+TR_DIST_RPM := $(TC_DIR)/dist/traffic_router-$(SPECIAL_SAUCE_NOARCH)
TOMCAT_DIST_RPM := $(TC_DIR)/dist/tomcat-$(SPECIAL_SEASONING)
TS_DIST_RPM := $(TC_DIR)/dist/traffic_stats-$(SPECIAL_SAUCE)
ORT_DIST_RPM := $(TC_DIR)/dist/trafficcontrol-cache-config-$(SPECIAL_SAUCE)
diff --git a/infrastructure/docker/build/Dockerfile-cache-config b/infrastructure/docker/build/Dockerfile-cache-config
index 13e4b06268..a0a40e0844 100644
--- a/infrastructure/docker/build/Dockerfile-cache-config
+++ b/infrastructure/docker/build/Dockerfile-cache-config
@@ -49,8 +49,17 @@ RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
FROM common-dependencies AS cache-config
COPY GO_VERSION /
-RUN go_version=$(cat /GO_VERSION) && \
- curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz && \
+RUN set -o nounset -o errexit; \
+ rpm_arch="$(rpm --eval %_arch)" && \
+ if [[ "$rpm_arch" == x86_64 ]]; then \
+ arch=amd64; \
+ elif [[ $rpm_arch == aarch64 ]]; then \
+ arch=arm64; \
+ else \
+ arch="$rpm_arch"; \
+ fi; \
+ go_version=$(cat /GO_VERSION) && \
+ curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-${arch}.tar.gz && \
tar -C /usr/local -xvzf go.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
rm go.tar.gz
diff --git a/infrastructure/docker/build/Dockerfile-grove b/infrastructure/docker/build/Dockerfile-grove
index cbe065d65e..bfca250a37 100644
--- a/infrastructure/docker/build/Dockerfile-grove
+++ b/infrastructure/docker/build/Dockerfile-grove
@@ -41,8 +41,17 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
FROM common-dependencies AS grove
COPY GO_VERSION /
-RUN go_version=$(cat /GO_VERSION) && \
- curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz && \
+RUN set -o nounset -o errexit; \
+ rpm_arch="$(rpm --eval %_arch)" && \
+ if [[ "$rpm_arch" == x86_64 ]]; then \
+ arch=amd64; \
+ elif [[ $rpm_arch == aarch64 ]]; then \
+ arch=arm64; \
+ else \
+ arch="$rpm_arch"; \
+ fi; \
+ go_version=$(cat /GO_VERSION) && \
+ curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-${arch}.tar.gz && \
tar -C /usr/local -xvzf go.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
rm go.tar.gz
diff --git a/infrastructure/docker/build/Dockerfile-grovetccfg b/infrastructure/docker/build/Dockerfile-grovetccfg
index d850acc0d3..0eb9582819 100644
--- a/infrastructure/docker/build/Dockerfile-grovetccfg
+++ b/infrastructure/docker/build/Dockerfile-grovetccfg
@@ -41,8 +41,17 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
FROM common-dependencies AS grovetccfg
COPY GO_VERSION /
-RUN go_version=$(cat /GO_VERSION) && \
- curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz && \
+RUN set -o nounset -o errexit; \
+ rpm_arch="$(rpm --eval %_arch)" && \
+ if [[ "$rpm_arch" == x86_64 ]]; then \
+ arch=amd64; \
+ elif [[ $rpm_arch == aarch64 ]]; then \
+ arch=arm64; \
+ else \
+ arch="$rpm_arch"; \
+ fi; \
+ go_version=$(cat /GO_VERSION) && \
+ curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-${arch}.tar.gz && \
tar -C /usr/local -xvzf go.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
rm go.tar.gz
diff --git a/infrastructure/docker/build/Dockerfile-tc-health-client b/infrastructure/docker/build/Dockerfile-tc-health-client
index a060dcc189..795776d446 100644
--- a/infrastructure/docker/build/Dockerfile-tc-health-client
+++ b/infrastructure/docker/build/Dockerfile-tc-health-client
@@ -49,8 +49,17 @@ RUN if [[ ${RHEL_VERSION%%.*} -ge 8 ]]; then \
FROM common-dependencies AS tc-health-client
COPY GO_VERSION /
-RUN go_version=$(cat /GO_VERSION) && \
- curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz && \
+RUN set -o nounset -o errexit; \
+ rpm_arch="$(rpm --eval %_arch)" && \
+ if [[ "$rpm_arch" == x86_64 ]]; then \
+ arch=amd64; \
+ elif [[ $rpm_arch == aarch64 ]]; then \
+ arch=arm64; \
+ else \
+ arch="$rpm_arch"; \
+ fi; \
+ go_version=$(cat /GO_VERSION) && \
+ curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-${arch}.tar.gz && \
tar -C /usr/local -xvzf go.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
rm go.tar.gz
diff --git a/infrastructure/docker/build/Dockerfile-traffic_monitor b/infrastructure/docker/build/Dockerfile-traffic_monitor
index d4704d04d7..d0b031f22b 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_monitor
+++ b/infrastructure/docker/build/Dockerfile-traffic_monitor
@@ -46,8 +46,17 @@ RUN yum -y install \
yum -y clean all
COPY GO_VERSION /
-RUN go_version=$(cat /GO_VERSION) && \
- curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz && \
+RUN set -o nounset -o errexit; \
+ rpm_arch="$(rpm --eval %_arch)" && \
+ if [[ "$rpm_arch" == x86_64 ]]; then \
+ arch=amd64; \
+ elif [[ $rpm_arch == aarch64 ]]; then \
+ arch=arm64; \
+ else \
+ arch="$rpm_arch"; \
+ fi; \
+ go_version=$(cat /GO_VERSION) && \
+ curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-${arch}.tar.gz && \
tar -C /usr/local -xvzf go.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
rm go.tar.gz
diff --git a/infrastructure/docker/build/Dockerfile-traffic_ops b/infrastructure/docker/build/Dockerfile-traffic_ops
index 0041774345..bfe4c9214a 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_ops
+++ b/infrastructure/docker/build/Dockerfile-traffic_ops
@@ -51,8 +51,17 @@ RUN yum -y install \
yum -y clean all
COPY GO_VERSION /
-RUN go_version=$(cat /GO_VERSION) && \
- curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz && \
+RUN set -o nounset -o errexit; \
+ rpm_arch="$(rpm --eval %_arch)" && \
+ if [[ "$rpm_arch" == x86_64 ]]; then \
+ arch=amd64; \
+ elif [[ $rpm_arch == aarch64 ]]; then \
+ arch=arm64; \
+ else \
+ arch="$rpm_arch"; \
+ fi; \
+ go_version=$(cat /GO_VERSION) && \
+ curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-${arch}.tar.gz && \
tar -C /usr/local -xvzf go.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
rm go.tar.gz
diff --git a/infrastructure/docker/build/Dockerfile-traffic_stats b/infrastructure/docker/build/Dockerfile-traffic_stats
index 9a79fe8400..b165e80171 100644
--- a/infrastructure/docker/build/Dockerfile-traffic_stats
+++ b/infrastructure/docker/build/Dockerfile-traffic_stats
@@ -41,8 +41,17 @@ RUN rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-* && \
FROM common-dependencies AS traffic-stats
COPY GO_VERSION /
-RUN go_version=$(cat /GO_VERSION) && \
- curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz && \
+RUN set -o nounset -o errexit; \
+ rpm_arch="$(rpm --eval %_arch)" && \
+ if [[ "$rpm_arch" == x86_64 ]]; then \
+ arch=amd64; \
+ elif [[ $rpm_arch == aarch64 ]]; then \
+ arch=arm64; \
+ else \
+ arch="$rpm_arch"; \
+ fi; \
+ go_version=$(cat /GO_VERSION) && \
+ curl -Lo go.tar.gz https://dl.google.com/go/go${go_version}.linux-${arch}.tar.gz && \
tar -C /usr/local -xvzf go.tar.gz && \
ln -s /usr/local/go/bin/go /usr/bin/go && \
rm go.tar.gz
diff --git a/infrastructure/docker/build/docker-compose.yml b/infrastructure/docker/build/docker-compose.yml
index 587c451a1b..d8f9bccedf 100644
--- a/infrastructure/docker/build/docker-compose.yml
+++ b/infrastructure/docker/build/docker-compose.yml
@@ -33,6 +33,10 @@ services:
# Change BASE_IMAGE to centos when RHEL_VERSION=7
BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
RHEL_VERSION: ${RHEL_VERSION:-8}
+ x-bake:
+ platforms:
+ - linux/amd64
+ - linux/arm64
volumes:
- ../../..:/trafficcontrol:z
@@ -45,6 +49,10 @@ services:
# Change BASE_IMAGE to centos when RHEL_VERSION=7
BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
RHEL_VERSION: ${RHEL_VERSION:-8}
+ x-bake:
+ platforms:
+ - linux/amd64
+ - linux/arm64
volumes:
- ../../..:/trafficcontrol:z
@@ -57,6 +65,10 @@ services:
# Change BASE_IMAGE to centos when RHEL_VERSION=7
BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
RHEL_VERSION: ${RHEL_VERSION:-8}
+ x-bake:
+ platforms:
+ - linux/amd64
+ - linux/arm64
volumes:
- ../../..:/trafficcontrol:z
@@ -69,6 +81,10 @@ services:
# Change BASE_IMAGE to centos when RHEL_VERSION=7
BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
RHEL_VERSION: ${RHEL_VERSION:-8}
+ x-bake:
+ platforms:
+ - linux/amd64
+ - linux/arm64
volumes:
- ../../..:/trafficcontrol:z
@@ -93,6 +109,10 @@ services:
# Change BASE_IMAGE to centos when RHEL_VERSION=7
BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
RHEL_VERSION: ${RHEL_VERSION:-8}
+ x-bake:
+ platforms:
+ - linux/amd64
+ - linux/arm64
volumes:
- ../../..:/trafficcontrol:z
- ../../../.npm:/root/.npm:z
@@ -119,6 +139,10 @@ services:
# Change BASE_IMAGE to centos when RHEL_VERSION=7
BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
RHEL_VERSION: ${RHEL_VERSION:-8}
+ x-bake:
+ platforms:
+ - linux/amd64
+ - linux/arm64
volumes:
- ../../..:/trafficcontrol:z
@@ -143,6 +167,10 @@ services:
# Change BASE_IMAGE to centos when RHEL_VERSION=7
BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
RHEL_VERSION: ${RHEL_VERSION:-8}
+ x-bake:
+ platforms:
+ - linux/amd64
+ - linux/arm64
volumes:
- ../../..:/trafficcontrol:z
@@ -155,5 +183,9 @@ services:
# Change BASE_IMAGE to centos when RHEL_VERSION=7
BASE_IMAGE: ${BASE_IMAGE:-rockylinux}
RHEL_VERSION: ${RHEL_VERSION:-8}
+ x-bake:
+ platforms:
+ - linux/amd64
+ - linux/arm64
volumes:
- ../../..:/trafficcontrol:z
diff --git a/traffic_router/build/build_rpm.sh b/traffic_router/build/build_rpm.sh
index f7025265d9..56079e5847 100755
--- a/traffic_router/build/build_rpm.sh
+++ b/traffic_router/build/build_rpm.sh
@@ -78,7 +78,7 @@ adaptEnvironment() {
WORKSPACE=${WORKSPACE:-$TC_DIR}
RPMBUILD="$WORKSPACE/rpmbuild"
DIST="$WORKSPACE/dist"
- RPM="${PACKAGE}-${TC_VERSION}-${BUILD_NUMBER}.x86_64.rpm"
+ RPM="${PACKAGE}-${TC_VERSION}-${BUILD_NUMBER}.noarch.rpm"
RPM_TARGET_OS="${RPM_TARGET_OS:-linux}"
TOMCAT_VERSION=9.0
TOMCAT_RELEASE=67
diff --git a/traffic_router/build/pom.xml b/traffic_router/build/pom.xml
index fa20c8e129..42ecedb639 100644
--- a/traffic_router/build/pom.xml
+++ b/traffic_router/build/pom.xml
@@ -133,7 +133,6 @@
${project.parent.artifactId}
${env.BUILD_NUMBER}.${env.RHEL_VERSION}
Apache License, Version 2.0
- x86_64
${env.RPM_TARGET_OS}
_source_payload w2.xzdio