You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2022/07/02 07:01:41 UTC

[arrow] branch master updated: ARROW-16477: [Packaging][RPM] Add support for Amazon Linux 2 on aarch64 (#13473)

This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 01e3c0a704 ARROW-16477: [Packaging][RPM] Add support for Amazon Linux 2 on aarch64 (#13473)
01e3c0a704 is described below

commit 01e3c0a704b1522ecc4e2b9d62f8ef96e01b70fe
Author: Sutou Kouhei <ko...@clear-code.com>
AuthorDate: Sat Jul 2 16:01:34 2022 +0900

    ARROW-16477: [Packaging][RPM] Add support for Amazon Linux 2 on aarch64 (#13473)
    
    CentOS 7 on aarch64 isn't supported because we need GCC 7 or later for the platform.
    verify-release-candidate.sh doesn't verify CentOS 7 packages on aarch64.
    
    Authored-by: Sutou Kouhei <ko...@clear-code.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 c_glib/meson.build                                 |  2 +-
 c_glib/meson_options.txt                           |  2 +-
 ci/docker/linux-apt-docs.dockerfile                |  2 +-
 ci/scripts/c_glib_build.sh                         |  4 +-
 ci/scripts/c_glib_test.sh                          |  4 +-
 dev/release/verify-release-candidate.sh            | 10 ++-
 dev/release/verify-yum.sh                          |  4 +-
 .../apache-arrow/yum/amazon-linux-2-aarch64/from   | 22 +-----
 .../apache-arrow/yum/amazon-linux-2/Dockerfile     |  2 -
 .../yum/amazon-linux-2/qemu-dummy-static           | 33 ---------
 .../linux-packages/apache-arrow/yum/arrow.spec.in  | 16 +++--
 dev/tasks/linux-packages/travis.linux.arm64.yml    |  2 +-
 dev/tasks/tasks.yml                                | 78 +++++++++++-----------
 13 files changed, 71 insertions(+), 110 deletions(-)

diff --git a/c_glib/meson.build b/c_glib/meson.build
index 0cc556fea6..7405f05172 100644
--- a/c_glib/meson.build
+++ b/c_glib/meson.build
@@ -58,7 +58,7 @@ have_gi = dependency('gobject-introspection-1.0', required: false).found()
 if have_gi
   pkgconfig_variables += ['girdir=@0@'.format(gir_dir)]
 endif
-generate_vapi = have_gi and get_option('vala')
+generate_vapi = have_gi and get_option('vapi')
 if generate_vapi
   pkgconfig_variables += ['vapidir=@0@'.format(vapi_dir)]
   add_languages('vala')
diff --git a/c_glib/meson_options.txt b/c_glib/meson_options.txt
index 1be131b5ca..6631fccf2d 100644
--- a/c_glib/meson_options.txt
+++ b/c_glib/meson_options.txt
@@ -32,7 +32,7 @@ option('gtk_doc',
        value: false,
        description: 'Build document by GTK-Doc')
 
-option('vala',
+option('vapi',
        type: 'boolean',
        value: false,
        description: 'Build Vala API')
diff --git a/ci/docker/linux-apt-docs.dockerfile b/ci/docker/linux-apt-docs.dockerfile
index c1ee003f4f..a415f1d5a4 100644
--- a/ci/docker/linux-apt-docs.dockerfile
+++ b/ci/docker/linux-apt-docs.dockerfile
@@ -98,7 +98,7 @@ ENV ARROW_BUILD_STATIC=OFF \
     ARROW_BUILD_UTILITIES=OFF \
     ARROW_FLIGHT=ON \
     ARROW_GCS=ON \
-    ARROW_GLIB_VALA=false \
+    ARROW_GLIB_VAPI=false \
     ARROW_PYTHON=ON \
     ARROW_S3=ON \
     ARROW_USE_GLOG=OFF \
diff --git a/ci/scripts/c_glib_build.sh b/ci/scripts/c_glib_build.sh
index a2fbfec4b3..fb61466453 100755
--- a/ci/scripts/c_glib_build.sh
+++ b/ci/scripts/c_glib_build.sh
@@ -24,7 +24,7 @@ build_dir=${2}/c_glib
 build_root=${2}
 
 : ${ARROW_GLIB_WERROR:=false}
-: ${ARROW_GLIB_VALA:=true}
+: ${ARROW_GLIB_VAPI:=true}
 : ${BUILD_DOCS_C_GLIB:=OFF}
 with_gtk_doc=$([ "${BUILD_DOCS_C_GLIB}" == "ON" ] && echo "true" || echo "false")
 
@@ -39,7 +39,7 @@ mkdir -p ${build_dir}
 meson --prefix=$ARROW_HOME \
       --libdir=lib \
       -Dgtk_doc=${with_gtk_doc} \
-      -Dvala=${ARROW_GLIB_VALA} \
+      -Dvapi=${ARROW_GLIB_VAPI} \
       -Dwerror=${ARROW_GLIB_WERROR} \
       ${build_dir} \
       ${source_dir}
diff --git a/ci/scripts/c_glib_test.sh b/ci/scripts/c_glib_test.sh
index 9f0e8e7c4d..cea600191a 100755
--- a/ci/scripts/c_glib_test.sh
+++ b/ci/scripts/c_glib_test.sh
@@ -22,7 +22,7 @@ set -ex
 source_dir=${1}/c_glib
 build_dir=${2}/c_glib
 
-: ${ARROW_GLIB_VALA:=true}
+: ${ARROW_GLIB_VAPI:=true}
 
 export LD_LIBRARY_PATH=${ARROW_HOME}/lib:${LD_LIBRARY_PATH}
 export PKG_CONFIG_PATH=${ARROW_HOME}/lib/pkgconfig
@@ -51,7 +51,7 @@ popd
 pushd ${build_dir}
 example/build
 example/extension-type
-if [ "${ARROW_GLIB_VALA}" = "true" ]; then
+if [ "${ARROW_GLIB_VAPI}" = "true" ]; then
   example/vala/build
 fi
 popd
diff --git a/dev/release/verify-release-candidate.sh b/dev/release/verify-release-candidate.sh
index bf6f4b153a..90ed2f541a 100755
--- a/dev/release/verify-release-candidate.sh
+++ b/dev/release/verify-release-candidate.sh
@@ -230,8 +230,7 @@ test_yum() {
                 "amazonlinux:2" \
                 "quay.io/centos/centos:stream9" \
                 "quay.io/centos/centos:stream8" \
-                "centos:7" \
-                "arm64v8/centos:7"; do
+                "centos:7"; do
     case "${target}" in
       arm64v8/*)
         if [ "$(arch)" = "aarch64" -o -e /usr/bin/qemu-aarch64-static ]; then
@@ -240,6 +239,13 @@ test_yum() {
           continue
         fi
         ;;
+      centos:7)
+        if [ "$(arch)" = "x86_64" ]; then
+          : # OK
+        else
+          continue
+        fi
+        ;;
     esac
     if ! docker run \
            --rm \
diff --git a/dev/release/verify-yum.sh b/dev/release/verify-yum.sh
index 40991e6f97..7956c18606 100755
--- a/dev/release/verify-yum.sh
+++ b/dev/release/verify-yum.sh
@@ -76,7 +76,9 @@ case "${distribution}-${distribution_version}" in
     have_flight=no
     have_gandiva=no
     have_python=no
-    have_arrow_libs=yes
+    if [ "$(arch)" != "aarch64" ]; then
+      have_arrow_libs=yes
+    fi
     install_command="yum install -y"
     uninstall_command="yum remove -y"
     clean_command="yum clean"
diff --git a/c_glib/meson_options.txt b/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2-aarch64/from
similarity index 59%
copy from c_glib/meson_options.txt
copy to dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2-aarch64/from
index 1be131b5ca..ea38a8d421 100644
--- a/c_glib/meson_options.txt
+++ b/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2-aarch64/from
@@ -1,5 +1,3 @@
-# -*- indent-tabs-mode: nil -*-
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
@@ -17,22 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-option('arrow_cpp_build_dir',
-       type: 'string',
-       value: '',
-       description: 'Use this option to build with not installed Arrow C++')
-
-option('arrow_cpp_build_type',
-       type: 'string',
-       value: 'release',
-       description: '-DCMAKE_BUILD_TYPE option value for Arrow C++')
-
-option('gtk_doc',
-       type: 'boolean',
-       value: false,
-       description: 'Build document by GTK-Doc')
-
-option('vala',
-       type: 'boolean',
-       value: false,
-       description: 'Build Vala API')
+arm64v8/amazonlinux:2
diff --git a/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2/Dockerfile b/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2/Dockerfile
index b8de7062c2..fa1ded66bc 100644
--- a/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2/Dockerfile
+++ b/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2/Dockerfile
@@ -18,8 +18,6 @@
 ARG FROM=amazonlinux:2
 FROM ${FROM}
 
-COPY qemu-* /usr/bin/
-
 ARG DEBUG
 
 RUN \
diff --git a/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2/qemu-dummy-static b/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2/qemu-dummy-static
deleted file mode 100755
index 279d895451..0000000000
--- a/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2/qemu-dummy-static
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env sh
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you 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.
-
-# Do nothing. This exists only for not requiring qemu-aarch64-static copy.
-# Recent Debian (buster or later) and Ubuntu (18.10 or later) on amd64 hosts or
-# arm64 host don't require qemu-aarch64-static in Docker image. But old Debian
-# and Ubuntu hosts on amd64 require qemu-aarch64-static in Docker image.
-#
-# We use "COPY qemu* /usr/bin/" in Dockerfile. If we don't put any "qemnu*",
-# the "COPY" is failed. It means that we always require "qemu*" even if we
-# use recent Debian/Ubuntu or arm64 host. If we have this dummy "qemu*" file,
-# the "COPY" isn't failed. It means that we can copy "qemu*" only when we
-# need.
-#
-# See also "script" in dev/tasks/linux-packages/azure.linux.arm64.yml.
-# Azure Pipelines uses old Ubuntu (18.04).
-# So we need to put "qemu-aarch64-static" into this directory.
diff --git a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
index 05a0984094..01482984de 100644
--- a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
+++ b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
@@ -197,7 +197,14 @@ cd cpp
 cd -
 
 cd c_glib
-pip3 install meson
+%if (%{rhel} >= 8 || "%{_arch}" != "aarch64")
+  pip3 install meson
+%else
+  # Meson 0.57.0 or later requires Ninja 1.8.2 or later but EPEL for
+  # Amazon Linux 2 aarch64 provides Ninja 1.7.2. We can remove
+  # '<0.57.0' once we drop support for Amazon Linux 2.
+  pip3 install 'meson<0.57.0'
+%endif
 meson setup build \
   --default-library=both \
   --libdir=%{_libdir} \
@@ -205,16 +212,17 @@ meson setup build \
   -Darrow_cpp_build_dir=../cpp/%{arrow_cmake_builddir} \
   -Darrow_cpp_build_type=$cpp_build_type \
   -Dgtk_doc=true \
-  -Dvala=true
+  -Dvapi=true
+
 LD_LIBRARY_PATH=$PWD/../cpp/%{arrow_cmake_builddir}/$cpp_build_type \
-  ninja -C build %{?_smp_mflags}
+  meson compile -C build %{?_smp_mflags}
 cd -
 
 %install
 cpp_build_type=release
 
 cd c_glib
-DESTDIR=%{buildroot} ninja -C build install
+DESTDIR=%{buildroot} meson install -C build
 cd -
 
 cd cpp
diff --git a/dev/tasks/linux-packages/travis.linux.arm64.yml b/dev/tasks/linux-packages/travis.linux.arm64.yml
index ef292cd6b4..78a086fc77 100644
--- a/dev/tasks/linux-packages/travis.linux.arm64.yml
+++ b/dev/tasks/linux-packages/travis.linux.arm64.yml
@@ -109,7 +109,7 @@ script:
   - popd
   - pushd apache-arrow-release/yum
   - |
-      for target in almalinux-* centos-*; do
+      for target in almalinux-* amazon-linux-* centos-*; do
         cp -a ${target} ${target}-aarch64
       done
   - popd
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 5e6a2c2a3e..d2d5d1e116 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -661,47 +661,48 @@ tasks:
                   "centos-8-stream",
                   "centos-7"] %}
   {% set is_rhel7_based = (target in ["amazon-linux-2", "centos-7"]) %}
-  {% for architecture in ["amd64", "arm64"] %}
-    {% if not (is_rhel7_based and architecture == "arm64") %}
+  {% for architecture
+       in ["amd64", "arm64"]
+       if not (target == "centos-7" and architecture == "arm64") %}
   {{ target }}-{{ architecture }}:
-      {% if architecture == "amd64" %}
+    {% if architecture == "amd64" %}
     ci: github
     template: linux-packages/github.linux.amd64.yml
-      {% else %}
+    {% else %}
     ci: travis
     template: linux-packages/travis.linux.arm64.yml
-      {% endif %}
+    {% endif %}
     params:
-      {% if architecture == "amd64" %}
+    {% if architecture == "amd64" %}
       target: "{{ target }}"
-      {% else %}
+    {% else %}
       target: "{{ target }}-aarch64"
-      {% endif %}
+    {% endif %}
       task_namespace: "yum"
       upload_extensions:
         - .rpm
     artifacts:
-      {% if architecture == "amd64" %}
+    {% if architecture == "amd64" %}
       - apache-arrow-release-{no_rc_version}-1.[a-z0-9]+.noarch.rpm
       - apache-arrow-release-{no_rc_version}-1.[a-z0-9]+.src.rpm
-      {% endif %}
+    {% endif %}
       - arrow-dataset-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - arrow-dataset-glib-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - arrow-dataset-glib-doc-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - arrow[0-9]+-dataset-glib-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - arrow[0-9]+-dataset-glib-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - arrow[0-9]+-dataset-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - arrow[0-9]+-dataset-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - arrow-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - arrow-debugsource-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - arrow-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - arrow-flight-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - arrow-flight-glib-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - arrow-flight-glib-doc-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
@@ -709,18 +710,18 @@ tasks:
       - arrow[0-9]+-flight-glib-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - arrow[0-9]+-flight-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - arrow[0-9]+-flight-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - arrow-glib-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - arrow-glib-doc-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - arrow[0-9]+-glib-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - arrow[0-9]+-glib-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - arrow[0-9]+-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - arrow[0-9]+-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if target != "amazon-linux-2" %}
+    {% if target != "amazon-linux-2" %}
       - arrow-python-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
         {% if not is_rhel7_based %}
       - arrow-python-flight-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
@@ -729,11 +730,11 @@ tasks:
       - arrow[0-9]+-python-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
         {% endif %}
       - arrow[0-9]+-python-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
-      {% if architecture == "amd64" %}
+    {% endif %}
+    {% if architecture == "amd64" %}
       - arrow-{no_rc_version}-1.[a-z0-9]+.src.rpm
-      {% endif %}
-      {% if not is_rhel7_based and architecture == "amd64" %}
+    {% endif %}
+    {% if not is_rhel7_based and architecture == "amd64" %}
       - gandiva-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - gandiva-glib-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - gandiva-glib-doc-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
@@ -741,34 +742,33 @@ tasks:
       - gandiva[0-9]+-glib-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - gandiva[0-9]+-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - gandiva[0-9]+-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - parquet-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - parquet-glib-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - parquet-glib-doc-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - parquet[0-9]+-glib-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - parquet[0-9]+-glib-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - parquet[0-9]+-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - parquet[0-9]+-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - plasma-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - plasma-glib-devel-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
       - plasma-glib-doc-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - plasma[0-9]+-glib-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - plasma[0-9]+-glib-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - plasma[0-9]+-libs-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
+    {% endif %}
       - plasma[0-9]+-libs-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% if not is_rhel7_based %}
+    {% if not is_rhel7_based %}
       - plasma-store-server-debuginfo-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
-      {% endif %}
-      - plasma-store-server-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
     {% endif %}
+      - plasma-store-server-{no_rc_version}-1.[a-z0-9]+.[a-z0-9_]+.rpm
   {% endfor %}
 {% endfor %}