Skip to content

Commit fcab4bd

Browse files
committed
ARROW-14180: [Packaging] Add support for AlmaLinux 8
Closes apache#11295 from kou/packaging-almalinux-8 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent b5814b6 commit fcab4bd

14 files changed

Lines changed: 167 additions & 18 deletions

File tree

dev/release/05-binary-upload.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ fi
6464
# To deactivate one category, deactivate the category and all of its dependents.
6565
# To explicitly select one category, set UPLOAD_DEFAULT=0 UPLOAD_X=1.
6666
: ${UPLOAD_DEFAULT:=1}
67+
: ${UPLOAD_ALMALINUX:=${UPLOAD_DEFAULT}}
6768
: ${UPLOAD_AMAZON_LINUX_RPM:=${UPLOAD_DEFAULT}}
6869
: ${UPLOAD_AMAZON_LINUX_YUM:=${UPLOAD_DEFAULT}}
6970
: ${UPLOAD_CENTOS_RPM:=${UPLOAD_DEFAULT}}
@@ -78,6 +79,10 @@ fi
7879
rake_tasks=()
7980
apt_targets=()
8081
yum_targets=()
82+
if [ ${UPLOAD_ALMALINUX} -gt 0 ]; then
83+
rake_tasks+=(yum:rc)
84+
yum_targets+=(almalinux)
85+
fi
8186
if [ ${UPLOAD_AMAZON_LINUX_RPM} -gt 0 ]; then
8287
rake_tasks+=(rpm)
8388
yum_targets+=(amazon-linux)

dev/release/binary-task.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,7 @@ def yum_release_repositories_dir
12351235

12361236
def available_yum_targets
12371237
[
1238+
["almalinux", "8"],
12381239
["amazon-linux", "2"],
12391240
["centos", "7"],
12401241
["centos", "8"],
@@ -1681,6 +1682,7 @@ def define_summary_tasks
16811682
task :rc do
16821683
puts(<<-SUMMARY)
16831684
Success! The release candidate binaries are available here:
1685+
https://apache.jfrog.io/artifactory/arrow/almalinux-rc/
16841686
https://apache.jfrog.io/artifactory/arrow/amazon-linux-rc/
16851687
https://apache.jfrog.io/artifactory/arrow/centos-rc/
16861688
https://apache.jfrog.io/artifactory/arrow/debian-rc/
@@ -1694,6 +1696,7 @@ def define_summary_tasks
16941696
task :release do
16951697
puts(<<-SUMMARY)
16961698
Success! The release binaries are available here:
1699+
https://apache.jfrog.io/arrow/almalinux/
16971700
https://apache.jfrog.io/arrow/amazon-linux/
16981701
https://apache.jfrog.io/arrow/centos/
16991702
https://apache.jfrog.io/arrow/debian/

dev/release/post-02-binary.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ fi
4545
# To deactivate one category, deactivate the category and all of its dependents.
4646
# To explicitly select one category, set DEPLOY_DEFAULT=0 DEPLOY_X=1.
4747
: ${DEPLOY_DEFAULT:=1}
48+
: ${DEPLOY_ALMALINUX:=${DEPLOY_DEFAULT}}
4849
: ${DEPLOY_AMAZON_LINUX:=${DEPLOY_DEFAULT}}
4950
: ${DEPLOY_CENTOS:=${DEPLOY_DEFAULT}}
5051
: ${DEPLOY_DEBIAN:=${DEPLOY_DEFAULT}}
@@ -55,6 +56,10 @@ fi
5556
rake_tasks=()
5657
apt_targets=()
5758
yum_targets=()
59+
if [ ${DEPLOY_ALMALINUX} -gt 0 ]; then
60+
rake_tasks+=(yum:release)
61+
yum_targets+=(almalinux)
62+
fi
5863
if [ ${DEPLOY_AMAZON_LINUX} -gt 0 ]; then
5964
rake_tasks+=(yum:release)
6065
yum_targets+=(amazon-linux)

dev/release/verify-release-candidate.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ test_apt() {
171171
}
172172

173173
test_yum() {
174-
for target in "amazonlinux:2" \
174+
for target in "almalinux:8" \
175+
"arm64v8/almalinux:8" \
176+
"amazonlinux:2" \
175177
"centos:7" \
176178
"centos:8" \
177179
"arm64v8/centos:8"; do

dev/release/verify-yum.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ local_prefix="/arrow/dev/tasks/linux-packages"
3737
artifactory_base_url="https://apache.jfrog.io/artifactory/arrow"
3838

3939
distribution=$(. /etc/os-release && echo "${ID}")
40-
distribution_version=$(. /etc/os-release && echo "${VERSION_ID}")
40+
distribution_version=$(. /etc/os-release && echo "${VERSION_ID}" | grep -o "^[0-9]*")
4141
distribution_prefix="centos"
4242

4343
cmake_package=cmake
@@ -50,6 +50,9 @@ have_python=yes
5050
install_command="dnf install -y --enablerepo=powertools"
5151

5252
case "${distribution}-${distribution_version}" in
53+
almalinux-*)
54+
distribution_prefix="almalinux"
55+
;;
5356
amzn-2)
5457
cmake_package=cmake3
5558
cmake_command=cmake3
@@ -87,6 +90,10 @@ if [ "${TYPE}" = "local" ]; then
8790
esac
8891
release_path="${local_prefix}/yum/repositories"
8992
case "${distribution}" in
93+
almalinux)
94+
package_version+=".el${distribution_version}"
95+
release_path+="/almalinux"
96+
;;
9097
amzn)
9198
package_version+=".${distribution}${distribution_version}"
9299
release_path+="/amazon-linux"
@@ -122,6 +129,7 @@ else
122129
if [ "${TYPE}" = "rc" ]; then
123130
sed \
124131
-i"" \
132+
-e "s,/almalinux/,/almalinux-rc/,g" \
125133
-e "s,/centos/,/centos-rc/,g" \
126134
-e "s,/amazon-linux/,/amazon-linux-rc/,g" \
127135
/etc/yum.repos.d/Apache-Arrow.repo

dev/tasks/linux-packages/apache-arrow-release/yum/Apache-Arrow.repo

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
# specific language governing permissions and limitations
1616
# under the License.
1717

18+
[apache-arrow-almalinux]
19+
name=Apache Arrow for AlmaLinux $releasever - $basearch
20+
baseurl=https://apache.jfrog.io/artifactory/arrow/almalinux/$releasever/$basearch/
21+
gpgcheck=1
22+
enabled=0
23+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Apache-Arrow
24+
1825
[apache-arrow-amazon-linux]
1926
name=Apache Arrow for Amazon Linux $releasever - $basearch
2027
baseurl=https://apache.jfrog.io/artifactory/arrow/amazon-linux/$releasever/$basearch/
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
FROM almalinux:8
19+
20+
ARG DEBUG
21+
22+
RUN \
23+
quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \
24+
dnf install --enablerepo=powertools -y ${quiet} \
25+
rpmdevtools && \
26+
dnf clean ${quiet} all

dev/tasks/linux-packages/apache-arrow-release/yum/apache-arrow-release.spec.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ if grep -q 'Amazon Linux release 2' /etc/system-release 2>/dev/null; then
8484
%{yum_repository_enable apache-arrow-amazon-linux}
8585
elif grep -q 'Red Hat Enterprise Linux' /etc/system-release 2>/dev/null; then
8686
%{yum_repository_enable apache-arrow-rhel}
87+
elif grep -q 'AlmaLinux' /etc/system-release 2>/dev/null; then
88+
%{yum_repository_enable apache-arrow-almalinux}
8789
else
8890
%{yum_repository_enable apache-arrow-centos}
8991
fi
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:8
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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:8
19+
FROM ${FROM}
20+
21+
ARG DEBUG
22+
23+
RUN \
24+
quiet=$([ "${DEBUG}" = "yes" ] || echo "--quiet") && \
25+
dnf install -y ${quiet} epel-release && \
26+
dnf install --enablerepo=powertools -y ${quiet} \
27+
bison \
28+
boost-devel \
29+
brotli-devel \
30+
bzip2-devel \
31+
c-ares-devel \
32+
ccache \
33+
clang \
34+
cmake \
35+
curl-devel \
36+
flex \
37+
gcc-c++ \
38+
gflags-devel \
39+
git \
40+
glog-devel \
41+
gobject-introspection-devel \
42+
gtk-doc \
43+
libarchive \
44+
libzstd-devel \
45+
llvm-devel \
46+
llvm-static \
47+
lz4-devel \
48+
make \
49+
ncurses-devel \
50+
ninja-build \
51+
openssl-devel \
52+
pkg-config \
53+
python3 \
54+
python3-devel \
55+
python3-numpy \
56+
python3-pip \
57+
re2-devel \
58+
# rapidjson-devel \
59+
rpmdevtools \
60+
snappy-devel \
61+
tar \
62+
# utf8proc-devel \
63+
zlib-devel && \
64+
dnf clean ${quiet} all

0 commit comments

Comments
 (0)