Skip to content

Commit c171365

Browse files
authored
Merge pull request #399 from fluent/almalinux-9
Try to add AlmaLinux 9
2 parents 5a94de1 + 1c2dc77 commit c171365

13 files changed

Lines changed: 146 additions & 10 deletions

File tree

.github/workflows/yum-arm.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
label:
1313
- CentOS 7 aarch64
1414
- RockyLinux 8 aarch64
15+
- AlmaLinux 9 aarch64
1516
- Amazon Linux 2 aarch64
1617
include:
1718
- label: CentOS 7 aarch64
@@ -20,6 +21,9 @@ jobs:
2021
- label: RockyLinux 8 aarch64
2122
rake-job: rockylinux-8
2223
test-docker-image: rockylinux:8
24+
- label: AlmaLinux 9 aarch64
25+
rake-job: almalinux-9
26+
test-docker-image: almalinux:9
2327
- label: Amazon Linux 2 aarch64
2428
rake-job: amazonlinux-2
2529
test-docker-image: amazonlinux:2

.github/workflows/yum.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
label:
1313
- CentOS 7 x86_64
1414
- RockyLinux 8 x86_64
15+
- AlmaLinux 9 x86_64
1516
- Amazon Linux 2 x86_64
1617
include:
1718
- label: CentOS 7 x86_64
@@ -22,6 +23,10 @@ jobs:
2223
rake-job: rockylinux-8
2324
test-docker-image: rockylinux/rockylinux:8
2425
centos-stream: false
26+
- label: AlmaLinux 9 x86_64
27+
rake-job: almalinux-9
28+
test-docker-image: almalinux:9
29+
centos-stream: false
2530
- label: Amazon Linux 2 x86_64
2631
rake-job: amazonlinux-2
2732
test-docker-image: amazonlinux:2

td-agent/Rakefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ def use_ruby3?
174174
# use ruby 3.x because distribution switches to OpenSSL 3.x.
175175
return false unless File.exist?("/etc/os-release")
176176
os_release_entries = File.open("/etc/os-release").readlines.map(&:strip)
177-
os_release_entries.include?("UBUNTU_CODENAME=jammy") and os_release_entries.include?("ID=ubuntu")
177+
return true if os_release_entries.include?("UBUNTU_CODENAME=jammy") and os_release_entries.include?("ID=ubuntu")
178+
return true if os_release_entries.include?("PLATFORM_ID=\"platform:el9\"")
179+
return false
178180
end
179181

180182
def bundled_ruby_version
@@ -1321,6 +1323,7 @@ EOS
13211323
[
13221324
"centos-7",
13231325
"rockylinux-8",
1326+
"almalinux-9",
13241327
"amazonlinux-2",
13251328
]
13261329
end

td-agent/convert-artifacts-layout.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ case $1 in
3636
yum|rpm)
3737
REPOSITORY_TYPE=yum
3838
REPOSITORY_PATH=$TD_AGENT_DIR/$REPOSITORY_TYPE/repositories
39-
for dist in centos amazon rocky; do
39+
for dist in centos amazon rocky almalinux; do
4040
dist_dest=$dist
41-
if [ $dist = "centos" -o $dist = "rocky" ]; then
41+
if [ $dist = "centos" -o $dist = "rocky" -o $dist = "almalinux" ]; then
4242
dist_dest="redhat"
4343
fi
44-
for release in 2 7 8; do
44+
for release in 2 7 8 9; do
4545
if [ $dist = "amazon" -a $release -ne 2 ]; then
4646
echo "skip $dist:$release"
4747
continue
@@ -54,6 +54,10 @@ case $1 in
5454
echo "skip $dist:$release"
5555
continue
5656
fi
57+
if [ $dist = "almalinux" -a $release -ne 9 ]; then
58+
echo "skip $dist:$release"
59+
continue
60+
fi
5761
for arch in aarch64 x86_64; do
5862
# e.g. mapping amazon/2/x86_64/Packages/ => 4/amazon/2/x86_64
5963
mkdir -p $ARTIFACTS_DIR/4/$dist_dest/$release/$arch
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
arm64v8/almalinux:9
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
ARG FROM=almalinux:9
19+
FROM ${FROM}
20+
21+
COPY qemu-* /usr/bin/
22+
23+
ARG DEBUG
24+
25+
RUN \
26+
quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \
27+
dnf install redhat-release -y && \
28+
dnf install --enablerepo=crb -y ${quiet} \
29+
make \
30+
gcc-c++ \
31+
ruby-devel \
32+
rubygems \
33+
rubygem-rake \
34+
rubygem-bundler \
35+
libedit-devel \
36+
ncurses-devel \
37+
libyaml-devel \
38+
git \
39+
cyrus-sasl-devel \
40+
nss-softokn-freebl-devel \
41+
pkg-config \
42+
rpm-build \
43+
rpmdevtools \
44+
redhat-rpm-config \
45+
openssl-devel \
46+
tar \
47+
zlib-devel \
48+
rpmlint \
49+
cmake \
50+
libarchive && \
51+
# raise IPv4 priority
52+
echo "precedence ::ffff:0:0/96 100" > /etc/gai.conf && \
53+
# enable multiplatform feature
54+
gem install --no-document --install-dir /usr/share/gems bundler && \
55+
yum clean ${quiet} all
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/bin/sh
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
20+
# Do nothing. This exists only for not requiring qemu-aarch64-static copy.
21+
# Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or
22+
# arm64 host don't require qemu-aarch64-static in Docker image. But old Debian
23+
# and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image.
24+
#
25+
# We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*",
26+
# the "COPY" is failed. It means that we always require "qemu*" even if we
27+
# use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file,
28+
# the "COPY" isn't failed. It means that we can copy "qemu*" only when we
29+
# need.
30+
#
31+
# See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml.
32+
# Azure Pipelines uses old Ubuntu (18.04).
33+
# So we need to put "qemu-aarch64-static" into this directory.

td-agent/yum/binstubs-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ case ${distribution} in
4545
;;
4646
esac
4747
;;
48-
rocky)
48+
rocky|almalinux)
4949
DNF=dnf
5050
DISTRIBUTION_VERSION=$(echo ${version} | cut -d. -f1)
5151
;;

td-agent/yum/install-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ case ${distribution} in
4545
;;
4646
esac
4747
;;
48-
rocky)
48+
rocky|almalinux)
4949
ENABLE_UPGRADE_TEST=0
5050
DNF=dnf
5151
DISTRIBUTION_VERSION=$(echo ${version} | cut -d. -f1)

td-agent/yum/pkgsize-test.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ case ${DISTRIBUTION} in
6161
# /etc/os-release ID=rocky
6262
DISTRIBUTION=rocky
6363
;;
64+
almalinux)
65+
# FIXME: no previous release package for almalinux
66+
SKIP_SIZE_COMPARISON=1
67+
# /etc/os-release ID=almalinux
68+
DISTRIBUTION=almalinux
69+
;;
6470
*)
6571
echo "${DISTRIBUTION} is not supported"
6672
exit 1

0 commit comments

Comments
 (0)