This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 19e3f9024d GH-45921: [Release][R] Use GitHub Release not
apache.jfrog.io (#45964)
19e3f9024d is described below
commit 19e3f9024df3b91660caa70868f7a64a74a40a46
Author: Sutou Kouhei <[email protected]>
AuthorDate: Fri Sep 26 22:34:35 2025 +0900
GH-45921: [Release][R] Use GitHub Release not apache.jfrog.io (#45964)
### Rationale for this change
We want to stop using apache.jfrog.io as much as possible. See also: #40760
We can use https://github.com/apache/arrow/releases as alternative.
### What changes are included in this PR?
If we use GitHub Release, we can automate uploading by GitHub Actions.
But GitHub Release doesn't support directory structure. So we need to put
all artifacts to
https://github.com/apache/arrow/releases/download/apache-arrow-X.Y.Z/ .
For example:
apache.jfrog.io:
```text
libarrow/bin/darwin-arm64-openssl-1.1/arrow-X.Y.Z.zip
libarrow/bin/darwin-arm64-openssl-3.0/arrow-X.Y.Z.zip
libarrow/bin/darwin-x86_64-openssl-1.1/arrow-X.Y.Z.zip
libarrow/bin/darwin-x86_64-openssl-3.0/arrow-X.Y.Z.zip
libarrow/bin/linux-openssl-1.0/arrow-X.Y.Z.zip
libarrow/bin/linux-openssl-1.1/arrow-X.Y.Z.zip
libarrow/bin/linux-openssl-3.0/arrow-X.Y.Z.zip
libarrow/bin/windows/arrow-X.Y.Z.zip
```
GitHub Actions:
```text
r-libarrow-darwin-arm64-openssl-1.1--X.Y.Z.zip
r-libarrow-darwin-arm64-openssl-3.0-X.Y.Z.zip
r-libarrow-darwin-x86_64-openssl-1.1-X.Y.Z.zip
r-libarrow-darwin-x86_64-openssl-3.0-X.Y.Z.zip
r-libarrow-linux-x86_64-openssl-1.0-X.Y.Z.zip
r-libarrow-linux-x86_64-openssl-1.1-X.Y.Z.zip
r-libarrow-linux-x86_64-openssl-3.0-X.Y.Z.zip
r-libarrow-windows-x86_64-X.Y.Z.zip
```
### Are these changes tested?
No.
### Are there any user-facing changes?
Yes. Custom `arrow_repo` doesn't work because URL is changed.
* GitHub Issue: #45921
Lead-authored-by: Sutou Kouhei <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
ci/scripts/r_windows_build.sh | 2 +-
dev/release/05-binary-upload.sh | 7 ++-
dev/release/binary-task.rb | 136 ----------------------------------------
dev/release/post-03-binary.sh | 4 --
dev/tasks/macros.jinja | 14 ++---
dev/tasks/r/github.packages.yml | 54 +++++++++-------
dev/tasks/tasks.yml | 16 ++---
r/configure.win | 14 ++---
r/tools/nixlibs.R | 65 +++++++++++++------
r/tools/test-nixlibs.R | 11 ++--
r/tools/update-checksums.R | 11 ++--
11 files changed, 117 insertions(+), 217 deletions(-)
diff --git a/ci/scripts/r_windows_build.sh b/ci/scripts/r_windows_build.sh
index de92addf08..e3b68c941c 100755
--- a/ci/scripts/r_windows_build.sh
+++ b/ci/scripts/r_windows_build.sh
@@ -35,7 +35,7 @@ printenv
makepkg-mingw --noconfirm --noprogressbar --skippgpcheck --nocheck --syncdeps
--cleanbuild
VERSION=$(grep Version $ARROW_HOME/r/DESCRIPTION | cut -d " " -f 2)
-DST_DIR="arrow-$VERSION"
+DST_DIR="r-libarrow-windows-x86_64-$VERSION"
# Collect the build artifacts and make the shape of zip file that rwinlib
expects
ls
diff --git a/dev/release/05-binary-upload.sh b/dev/release/05-binary-upload.sh
index e8a1922603..04707cbde7 100755
--- a/dev/release/05-binary-upload.sh
+++ b/dev/release/05-binary-upload.sh
@@ -109,6 +109,10 @@ if [ "${UPLOAD_PYTHON}" -gt 0 ]; then
upload_to_github_release python \
"${ARROW_ARTIFACTS_DIR}"/{python-sdist,wheel-*}/*
fi
+if [ "${UPLOAD_R}" -gt 0 ]; then
+ upload_to_github_release r \
+ "${ARROW_ARTIFACTS_DIR}"/r-binary-packages/r-lib*
+fi
rake_tasks=()
apt_targets=()
@@ -129,9 +133,6 @@ if [ "${UPLOAD_DEBIAN}" -gt 0 ]; then
rake_tasks+=(apt:rc)
apt_targets+=(debian)
fi
-if [ "${UPLOAD_R}" -gt 0 ]; then
- rake_tasks+=(r:rc)
-fi
if [ "${UPLOAD_UBUNTU}" -gt 0 ]; then
rake_tasks+=(apt:rc)
apt_targets+=(ubuntu)
diff --git a/dev/release/binary-task.rb b/dev/release/binary-task.rb
index 7fc49f3eb8..22dfb7ffa9 100644
--- a/dev/release/binary-task.rb
+++ b/dev/release/binary-task.rb
@@ -2232,142 +2232,6 @@ APT::FTPArchive::Release::Description
"#{apt_repository_description}";
define_yum_release_tasks
end
- def define_generic_data_rc_tasks(label,
- id,
- rc_dir,
- target_files_glob)
- directory rc_dir
-
- namespace id do
- namespace :rc do
- desc "Copy #{label} packages"
- task :copy => rc_dir do
- progress_label = "Copying: #{label}"
- progress_reporter = ProgressReporter.new(progress_label)
-
- Pathname(artifacts_dir).glob(target_files_glob) do |path|
- next if path.directory?
- destination_path = [
- rc_dir,
- path.basename.to_s,
- ].join("/")
- copy_artifact(path, destination_path, progress_reporter)
- end
-
- progress_reporter.finish
- end
-
- desc "Sign #{label} packages"
- task :sign => rc_dir do
- sign_dir(label, rc_dir)
- end
-
- desc "Upload #{label} packages"
- task :upload do
- uploader =
- ArtifactoryUploader.new(api_key: artifactory_api_key,
- destination_prefix: full_version,
- distribution: id.to_s,
- rc: rc,
- source: rc_dir,
- staging: staging?)
- uploader.upload
- end
- end
-
- desc "Release RC #{label} packages"
- rc_tasks = [
- "#{id}:rc:copy",
- "#{id}:rc:sign",
- "#{id}:rc:upload",
- ]
- task :rc => rc_tasks
- end
- end
-
- def define_generic_data_release_tasks(label, id, release_dir)
- directory release_dir
-
- namespace id do
- desc "Release #{label} packages"
- task :release do
- release_distribution(id.to_s,
- rc_prefix: full_version,
- release_prefix: version)
- end
- end
- end
-
- def define_generic_data_tasks(label,
- id,
- rc_dir,
- release_dir,
- target_files_glob)
- define_generic_data_rc_tasks(label, id, rc_dir, target_files_glob)
- define_generic_data_release_tasks(label, id, release_dir)
- end
-
- def define_r_rc_tasks(label, id, rc_dir)
- directory rc_dir
-
- namespace id do
- namespace :rc do
- desc "Prepare #{label} packages"
- task :prepare => rc_dir do
- progress_label = "Preparing #{label}"
- progress_reporter = ProgressReporter.new(progress_label)
-
- pattern = "r-binary-packages/r-lib*.{zip,tgz}"
- Pathname(artifacts_dir).glob(pattern) do |path|
- destination_path = [
- rc_dir,
- # r-lib__libarrow__bin__centos-7__arrow-8.0.0.zip
- # --> libarrow/bin/centos-7/arrow-8.0.0.zip
- path.basename.to_s.gsub(/\Ar-lib__/, "").gsub(/__/, "/"),
- ].join("/")
- copy_artifact(path, destination_path, progress_reporter)
- end
-
- progress_reporter.finish
- end
-
- desc "Sign #{label} packages"
- task :sign => rc_dir do
- sign_dir(label, rc_dir)
- end
-
- desc "Upload #{label} packages"
- task :upload do
- uploader =
- ArtifactoryUploader.new(api_key: artifactory_api_key,
- destination_prefix: full_version,
- distribution: id.to_s,
- rc: rc,
- source: rc_dir,
- staging: staging?)
- uploader.upload
- end
- end
-
- desc "Release RC #{label} packages"
- rc_tasks = [
- "#{id}:rc:prepare",
- "#{id}:rc:sign",
- "#{id}:rc:upload",
- ]
- task :rc => rc_tasks
- end
- end
-
- def define_r_tasks
- label = "R"
- id = :r
- r_rc_dir = "#{rc_dir}/r/#{full_version}"
- r_release_dir = "#{release_dir}/r/#{full_version}"
- define_r_rc_tasks(label, id, r_rc_dir)
- define_generic_data_release_tasks(label, id, r_release_dir)
- end
-
def define_summary_tasks
namespace :summary do
desc "Show RC summary"
diff --git a/dev/release/post-03-binary.sh b/dev/release/post-03-binary.sh
index 2c8a1577a8..7d3331c063 100755
--- a/dev/release/post-03-binary.sh
+++ b/dev/release/post-03-binary.sh
@@ -43,7 +43,6 @@ cd "${SOURCE_DIR}"
: "${DEPLOY_AMAZON_LINUX:=${DEPLOY_DEFAULT}}"
: "${DEPLOY_CENTOS:=${DEPLOY_DEFAULT}}"
: "${DEPLOY_DEBIAN:=${DEPLOY_DEFAULT}}"
-: "${DEPLOY_R:=${DEPLOY_DEFAULT}}"
: "${DEPLOY_UBUNTU:=${DEPLOY_DEFAULT}}"
rake_tasks=()
@@ -65,9 +64,6 @@ if [ "${DEPLOY_DEBIAN}" -gt 0 ]; then
rake_tasks+=(apt:release)
apt_targets+=(debian)
fi
-if [ "${DEPLOY_R}" -gt 0 ]; then
- rake_tasks+=(r:release)
-fi
if [ "${DEPLOY_UBUNTU}" -gt 0 ]; then
rake_tasks+=(apt:release)
apt_targets+=(ubuntu)
diff --git a/dev/tasks/macros.jinja b/dev/tasks/macros.jinja
index 766a9faac5..ddcb0d554e 100644
--- a/dev/tasks/macros.jinja
+++ b/dev/tasks/macros.jinja
@@ -243,16 +243,16 @@ env:
- name: Get windows binary
uses: actions/download-artifact@v4
with:
- name: r-lib__libarrow__bin__windows
- path: repo/libarrow/bin/windows
+ name: r-libarrow-windows-x86_64
+ path: repo/libarrow
{% endif %}
{% if get_nix %}
{% for openssl_version in ["1.0", "1.1", "3.0"] %}
- name: Get Linux OpenSSL {{ openssl_version }} binary
uses: actions/download-artifact@v4
with:
- name: r-lib__libarrow__bin__linux-openssl-{{ openssl_version }}
- path: repo/libarrow/bin/linux-openssl-{{ openssl_version }}
+ name: r-libarrow-linux-x86_64-openssl-{{ openssl_version }}
+ path: repo/libarrow
{% endfor %}
{% endif %}
{% if get_mac %}
@@ -261,8 +261,8 @@ env:
- name: Get macOS {{ arch }} OpenSSL {{ openssl_version }} binary
uses: actions/download-artifact@v4
with:
- name: r-lib__libarrow__bin__darwin-{{arch}}-openssl-{{ openssl_version }}
- path: repo/libarrow/bin/darwin-{{ arch }}-openssl-{{ openssl_version }}
+ name: r-libarrow-darwin-{{ arch }}-openssl-{{ openssl_version }}
+ path: repo/libarrow
{% endfor %}
{% endfor %}
{% endif %}
@@ -294,7 +294,7 @@ env:
write(str, file = profile_path, append = TRUE)
# Set envvar for later steps by appending to $GITHUB_ENV
write(paste0("R_PROFILE_USER=", profile_path), file =
Sys.getenv("GITHUB_ENV"), append = TRUE)
- {% endmacro %}
+{% endmacro %}
{# Detect if we are using a fork or the upstream repo #}
{% set is_upstream_b = arrow.github_repo == 'apache/arrow' %}
diff --git a/dev/tasks/r/github.packages.yml b/dev/tasks/r/github.packages.yml
index be1efd4eab..4436694597 100644
--- a/dev/tasks/r/github.packages.yml
+++ b/dev/tasks/r/github.packages.yml
@@ -58,9 +58,7 @@ jobs:
macos-cpp:
name: C++ Binary macOS OpenSSL {{ '${{ matrix.openssl }}' }} {{ '${{
matrix.platform.arch }}' }}
-
runs-on: {{ '${{ matrix.platform.runs_on }}' }}
-
needs: source
strategy:
fail-fast: false
@@ -69,7 +67,9 @@ jobs:
- { runs_on: macos-13, arch: "x86_64" }
- { runs_on: macos-14, arch: "arm64" }
openssl: ['3.0', '1.1']
-
+ env:
+ PKG_ID: r-libarrow-darwin-{{ '${{ matrix.platform.arch }}' }}-openssl-{{
'${{ matrix.openssl }}' }}
+ PKG_FILE: r-libarrow-darwin-{{ '${{ matrix.platform.arch }}'
}}-openssl-{{ '${{ matrix.openssl }}' }}-{{ '${{
needs.source.outputs.pkg_version }}' }}.zip
steps:
{{ macros.github_checkout_arrow(action_v="3")|indent }}
{{ macros.github_change_r_pkg_version(is_fork, '${{
needs.source.outputs.pkg_version }}')|indent }}
@@ -94,9 +94,6 @@ jobs:
r/inst/build_arrow_static.sh
- name: Bundle libarrow
shell: bash
- env:
- PKG_FILE: arrow-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip
- VERSION: {{ '${{ needs.source.outputs.pkg_version }}' }}
run: |
cd arrow/r/libarrow/dist
zip -r $PKG_FILE lib/ include/
@@ -104,12 +101,15 @@ jobs:
shell: bash
run: |
cd arrow/r/libarrow/dist
- shasum -a 512 arrow-*.zip > arrow-{{ '${{
needs.source.outputs.pkg_version }}' }}.zip.sha512
+ shasum -a 512 ${PKG_FILE} > ${PKG_FILE}.sha512
+ mv ${PKG_FILE}{,.sha512} ../../../../
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
- name: r-lib__libarrow__bin__darwin-{{ '${{ matrix.platform.arch }}'
}}-openssl-{{ '${{ matrix.openssl }}' }}
- path: arrow/r/libarrow/dist/arrow-*.zip*
+ name: {{ '${{ env.PKG_ID }}' }}
+ path: |
+ {{ '${{ env.PKG_FILE }}' }}
+ {{ '${{ env.PKG_FILE }}' }}.sha512
linux-cpp:
name: C++ Binary Linux OpenSSL {{ '${{ matrix.openssl }}' }}
@@ -129,11 +129,13 @@ jobs:
os: centos
- openssl: "1.0"
os: centos
+ env:
+ PKG_ID: r-libarrow-linux-x86_64-openssl-{{ '${{ matrix.openssl }}' }}
+ PKG_FILE: r-libarrow-linux-x86_64-openssl-{{ '${{ matrix.openssl }}'
}}-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip
steps:
{{ macros.github_checkout_arrow()|indent }}
{{ macros.github_change_r_pkg_version(is_fork, '${{
needs.source.outputs.pkg_version }}')|indent }}
{{ macros.github_install_archery()|indent }}
-
- name: Build libarrow
shell: bash
env:
@@ -146,9 +148,6 @@ jobs:
{{ '${{ matrix.os }}' }}-cpp-static
- name: Bundle libarrow
shell: bash
- env:
- PKG_FILE: arrow-{{ '${{ needs.source.outputs.pkg_version }}' }}.zip
- VERSION: {{ '${{ needs.source.outputs.pkg_version }}' }}
run: |
# These files were created by the docker user so we have to chown
them
sudo chown -R $USER:$USER arrow/r/libarrow
@@ -159,17 +158,23 @@ jobs:
shell: bash
run: |
cd arrow/r/libarrow/dist
- shasum -a 512 arrow-*.zip > arrow-{{ '${{
needs.source.outputs.pkg_version }}' }}.zip.sha512
+ shasum -a 512 ${PKG_FILE} > ${PKG_FILE}.sha512
+ mv ${PKG_FILE}{,.sha512} ../../../../
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
- name: r-lib__libarrow__bin__linux-openssl-{{ '${{ matrix.openssl }}'
}}
- path: arrow/r/libarrow/dist/arrow-*.zip*
+ name: {{ '${{ env.PKG_ID }}' }}
+ path: |
+ {{ '${{ env.PKG_FILE }}' }}
+ {{ '${{ env.PKG_FILE }}' }}.sha512
windows-cpp:
name: C++ Binary Windows RTools (40 only)
needs: source
runs-on: windows-latest
+ env:
+ PKG_ID: r-libarrow-windows-x86_64
+ PKG_FILE: r-libarrow-windows-x86_64-{{ '${{
needs.source.outputs.pkg_version }}' }}.zip
steps:
- run: git config --global core.autocrlf false
{{ macros.github_checkout_arrow()|indent }}
@@ -192,12 +197,15 @@ jobs:
shell: bash
run: |
cd build
- sha512sum arrow-*.zip > arrow-{{ '${{
needs.source.outputs.pkg_version }}' }}.zip.sha512
+ sha512sum ${PKG_FILE} > ${PKG_FILE}.sha512
+ mv ${PKG_FILE}{,.sha512} ../
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
- name: r-lib__libarrow__bin__windows
- path: build/arrow-*.zip*
+ name: {{ '${{ env.PKG_ID }}' }}
+ path: |
+ {{ '${{ env.PKG_FILE }}' }}
+ {{ '${{ env.PKG_FILE }}' }}.sha512
r-packages:
needs: [source, windows-cpp, macos-cpp]
@@ -249,7 +257,7 @@ jobs:
LIBARROW_BINARY: "true" # has to be set as long as allowlist not
updated
LIBARROW_BUILD: "false"
ARROW_R_ENFORCE_CHECKSUM: "true"
- ARROW_R_CHECKSUM_PATH: "{{ '${{ github.workspace }}'
}}/repo/libarrow/bin"
+ ARROW_R_CHECKSUM_PATH: "{{ '${{ github.workspace }}'
}}/repo/libarrow"
run: |
on_windows <- tolower(Sys.info()[["sysname"]]) == "windows"
@@ -338,7 +346,7 @@ jobs:
LIBARROW_BUILD: "FALSE"
LIBARROW_BINARY: {{ '${{ matrix.config.libarrow_binary }}' }}
ARROW_R_ENFORCE_CHECKSUM: "true"
- ARROW_R_CHECKSUM_PATH: "{{ '${{ github.workspace }}'
}}/repo/libarrow/bin"
+ ARROW_R_CHECKSUM_PATH: "{{ '${{ github.workspace }}'
}}/repo/libarrow"
shell: bash
run: |
Rscript -e '
@@ -447,6 +455,10 @@ jobs:
uses: r-lib/actions/setup-r@v2
with:
install-r: true
+ - name: Move libarrow artifacts
+ run: |
+ mkdir -p binaries/
+ mv artifacts/r-libarrow-*/* binaries/
- name: Rename artifacts
shell: Rscript {0}
run: |
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index caad31911c..6ac5042176 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -531,14 +531,14 @@ tasks:
params:
custom_version: Unset
artifacts:
- - r-lib__libarrow__bin__windows__arrow-{no_rc_r_version}\.zip
- - r-lib__libarrow__bin__linux-openssl-1.0__arrow-{no_rc_r_version}\.zip
- - r-lib__libarrow__bin__linux-openssl-1.1__arrow-{no_rc_r_version}\.zip
- - r-lib__libarrow__bin__linux-openssl-3.0__arrow-{no_rc_r_version}\.zip
- -
r-lib__libarrow__bin__darwin-arm64-openssl-1.1__arrow-{no_rc_r_version}\.zip
- -
r-lib__libarrow__bin__darwin-arm64-openssl-3.0__arrow-{no_rc_r_version}\.zip
- -
r-lib__libarrow__bin__darwin-x86_64-openssl-1.1__arrow-{no_rc_r_version}\.zip
- -
r-lib__libarrow__bin__darwin-x86_64-openssl-3.0__arrow-{no_rc_r_version}\.zip
+ - r-libarrow-windows-x86_64-{no_rc_r_version}\.zip
+ - r-libarrow-linux-x86_64-openssl-1.0-{no_rc_r_version}\.zip
+ - r-libarrow-linux-x86_64-openssl-1.1-{no_rc_r_version}\.zip
+ - r-libarrow-linux-x86_64-openssl-3.0-{no_rc_r_version}\.zip
+ - r-libarrow-darwin-arm64-openssl-1.1-{no_rc_r_version}\.zip
+ - r-libarrow-darwin-arm64-openssl-3.0-{no_rc_r_version}\.zip
+ - r-libarrow-darwin-x86_64-openssl-1.1-{no_rc_r_version}\.zip
+ - r-libarrow-darwin-x86_64-openssl-3.0-{no_rc_r_version}\.zip
- r-pkg__bin__windows__contrib__4.5__arrow_{no_rc_r_version}\.zip
- r-pkg__bin__windows__contrib__4.4__arrow_{no_rc_r_version}\.zip
-
r-pkg__bin__macosx__big-sur-x86_64__contrib__4.5__arrow_{no_rc_r_version}\.tgz
diff --git a/r/configure.win b/r/configure.win
index ae175f5622..ade82b143e 100755
--- a/r/configure.win
+++ b/r/configure.win
@@ -49,7 +49,7 @@ fi
function configure_binaries() {
# Try to find/download a C++ Arrow binary,
- "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "tools/nixlibs.R" $VERSION
+ "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "tools/nixlibs.R" $VERSION
# If binary not found, script exits nonzero
if [ $? -ne 0 ]; then
_LIBARROW_FOUND="false"
@@ -69,14 +69,14 @@ function configure_binaries() {
-lz -lws2_32 -lnghttp2 -ldbghelp"
# Set the right flags to point to and enable arrow/parquet
- if [ -d "windows/arrow-$VERSION" ]; then
- RWINLIB="../windows/arrow-$VERSION"
+ if [ -d "windows/r-libarrow-windows-x86_64-$VERSION" ]; then
+ RWINLIB="../windows/r-libarrow-windows-x86_64-$VERSION"
else
# It's possible that the version of the libarrow binary is not identical
to the
# R version, e.g. if the R build is a patch release, so find what the dir
is
# actually called. If there is more than one version present, use the one
# with the highest version:
- RWINLIB="../windows/$(ls windows/ | grep ^arrow- | tail -n 1)"
+ RWINLIB="../windows/$(ls windows/ | grep ^r-libarrow- | tail -n 1)"
fi
# NOTE: If you make changes to the libraries below, you should also change
@@ -225,7 +225,7 @@ function configure_rtools() {
if ! ${R_HOME}/bin/Rscript tools/check-versions.R $VERSION $PC_LIB_VERSION
2> /dev/null; then
_LIBARROW_FOUND="false"
fi
-
+
# We should have a valid libarrow build in $_LIBARROW_FOUND
# Now set `PKG_LIBS`, `PKG_DIRS`, and `PKG_CFLAGS` based on that.
if [ "$_LIBARROW_FOUND" == "true" ]; then
@@ -235,7 +235,7 @@ if [ "$_LIBARROW_FOUND" == "true" ]; then
# override -fno-exceptions from aws-cpp-sdk pc file
PKG_CFLAGS="$PKG_CFLAGS -fexceptions"
else
- # To make it easier to debug which code path was taken add a specific
+ # To make it easier to debug which code path was taken add a specific
# message to the log in addition to the 'NOTE'
echo "*** Failed to find Arrow C++ libraries in rtools"
fi
@@ -246,7 +246,7 @@ function configure_release() {
configure_rtools
else
configure_binaries
- fi
+ fi
if [ "$_LIBARROW_FOUND" == "false" ]; then
echo "------------------------- NOTE ---------------------------"
diff --git a/r/tools/nixlibs.R b/r/tools/nixlibs.R
index 772c7654d7..9bcfda3061 100644
--- a/r/tools/nixlibs.R
+++ b/r/tools/nixlibs.R
@@ -111,7 +111,11 @@ validate_checksum <- function(binary_url, libfile, hush =
quietly) {
enforce_checksum) {
# Munge the path to the correct sha file which we include during the
# release process
- checksum_file <- sub(".+/bin/(.+\\.zip)", "\\1\\.sha512", binary_url)
+ if (VERSION_22_OR_LATER) {
+ checksum_file <- sub(".+/(.+\\.zip)", "\\1\\.sha512", binary_url)
+ } else {
+ checksum_file <- sub(".+/bin/(.+\\.zip)", "\\1\\.sha512", binary_url)
+ }
checksum_file <- file.path(checksum_path, checksum_file)
# Try `shasum`, and if that doesn't work, fall back to `sha512sum` if not
found
@@ -150,8 +154,13 @@ validate_checksum <- function(binary_url, libfile, hush =
quietly) {
}
download_binary <- function(lib) {
- libfile <- paste0("arrow-", VERSION, ".zip")
- binary_url <- paste0(arrow_repo, "bin/", lib, "/arrow-", VERSION, ".zip")
+ if (VERSION_22_OR_LATER) {
+ libfile <- paste0("r-libarrow-", lib, "-", VERSION, ".zip")
+ binary_url <- paste0(arrow_repo, libfile)
+ } else {
+ libfile <- paste0("arrow-", VERSION, ".zip")
+ binary_url <- paste0(arrow_repo, "bin/", lib, "/arrow-", VERSION, ".zip")
+ }
if (try_download(binary_url, libfile) && validate_checksum(binary_url,
libfile)) {
lg("Successfully retrieved libarrow (%s)", lib)
} else {
@@ -183,18 +192,23 @@ download_binary <- function(lib) {
# a binary that is available, to override what this function may discover by
# default.
# Possible values are:
-# * "linux-openssl-1.0" (OpenSSL 1.0)
-# * "linux-openssl-1.1" (OpenSSL 1.1)
-# * "linux-openssl-3.0" (OpenSSL 3.0)
-# * "macos-amd64-openssl-1.1" (OpenSSL 1.1)
-# * "macos-amd64-openssl-3.0" (OpenSSL 3.0)
+# * "linux-x86_64-openssl-1.0" (OpenSSL 1.0)
+# * "linux-x86_64-openssl-1.1" (OpenSSL 1.1)
+# * "linux-x86_64-openssl-3.0" (OpenSSL 3.0)
# * "macos-arm64-openssl-1.1" (OpenSSL 1.1)
# * "macos-arm64-openssl-3.0" (OpenSSL 3.0)
+# * "macos-x86_64-openssl-1.1" (OpenSSL 1.1)
+# * "macos-x86_64-openssl-3.0" (OpenSSL 3.0)
+# * "windows-x86_64"
# These string values, along with `NULL`, are the potential return values of
# this function.
identify_binary <- function(lib = Sys.getenv("LIBARROW_BINARY"), info =
distro()) {
if (on_windows) {
- return("windows")
+ if (VERSION_22_OR_LATER) {
+ return("windows-x86_64")
+ } else {
+ return("windows")
+ }
}
lib <- tolower(lib)
@@ -239,11 +253,10 @@ select_binary <- function(os =
tolower(Sys.info()[["sysname"]]),
{
errs <- compile_test_program(test_program)
openssl_version <- determine_binary_from_stderr(errs)
- arch <- ifelse(identical(os, "darwin"), paste0("-", arch, "-"), "-")
if (is.null(openssl_version)) {
NULL
} else {
- paste0(os, arch, openssl_version)
+ paste0(os, "-", arch, "-", openssl_version)
}
},
error = function(e) {
@@ -950,6 +963,22 @@ if (not_cran || on_r_universe) {
# and don't fall back to a full source build
build_ok <- !env_is("LIBARROW_BUILD", "false")
+# Set binary repos
+if (is_release) {
+ VERSION <- VERSION[1, 1:3]
+ VERSION_MAJOR <- unlist(VERSION)[1]
+ if (VERSION_MAJOR >= "22") {
+ VERSION_22_OR_LATER <- TRUE
+ arrow_repo <- getOption("arrow.repo",
sprintf("https://github.com/apache/arrow/releases/download/apache-arrow-%s/",
VERSION))
+ } else {
+ VERSION_22_OR_LATER <- FALSE
+ arrow_repo <- paste0(getOption("arrow.repo",
sprintf("https://apache.jfrog.io/artifactory/arrow/r/%s", VERSION)),
"/libarrow/")
+ }
+} else {
+ VERSION_22_OR_LATER <- TRUE
+ arrow_repo <- paste0(getOption("arrow.dev_repo",
"https://nightlies.apache.org/arrow/r"), "/libarrow/")
+}
+
# Check if we're authorized to download
download_ok <- !test_mode && !env_is("ARROW_OFFLINE_BUILD", "true")
if (!download_ok) {
@@ -961,7 +990,11 @@ if (!download_ok) {
# But, don't do this if the user has requested a binary or a non-minimal build:
# we should error rather than silently succeeding with a minimal build.
if (download_ok && Sys.getenv("LIBARROW_BINARY") %in% c("false", "") &&
!env_is("LIBARROW_MINIMAL", "false")) {
- download_ok <- try_download("https://apache.jfrog.io/artifactory/arrow/r/",
tempfile())
+ if (VERSION_22_OR_LATER) {
+ download_ok <- try_download("https://github.com/apache/arrow/releases",
tempfile())
+ } else {
+ download_ok <-
try_download("https://apache.jfrog.io/artifactory/arrow/r/", tempfile())
+ }
if (!download_ok) {
lg("Network connection not available", .indent = "***")
}
@@ -969,14 +1002,6 @@ if (download_ok && Sys.getenv("LIBARROW_BINARY") %in%
c("false", "") && !env_is(
download_libarrow_ok <- download_ok && !env_is("LIBARROW_DOWNLOAD", "false")
-# Set binary repos
-if (is_release) {
- VERSION <- VERSION[1, 1:3]
- arrow_repo <- paste0(getOption("arrow.repo",
sprintf("https://apache.jfrog.io/artifactory/arrow/r/%s", VERSION)),
"/libarrow/")
-} else {
- arrow_repo <- paste0(getOption("arrow.dev_repo",
"https://nightlies.apache.org/arrow/r"), "/libarrow/")
-}
-
# If we're on a dev version, look for the most recent libarrow binary version
if (download_libarrow_ok && !is_release && !test_mode) {
VERSION <- find_latest_nightly(VERSION)
diff --git a/r/tools/test-nixlibs.R b/r/tools/test-nixlibs.R
index 838b39ac54..4a6a421fd5 100644
--- a/r/tools/test-nixlibs.R
+++ b/r/tools/test-nixlibs.R
@@ -29,7 +29,10 @@ capture.output(source("nixlibs.R", local = nixlibs_env))
test_that("identify_binary() based on LIBARROW_BINARY", {
expect_null(identify_binary("FALSE"))
- expect_identical(identify_binary("linux-openssl-1.0"), "linux-openssl-1.0")
+ expect_identical(
+ identify_binary("linux-x86_64-openssl-1.0"),
+ "linux-x86_64-openssl-1.0"
+ )
expect_null(identify_binary("", info = list(id = "debian")))
})
@@ -91,21 +94,21 @@ test_that("select_binary() with test program", {
expect_output(
expect_identical(
select_binary("linux", "x86_64", "int a;"),
- "linux-openssl-1.1"
+ "linux-x86_64-openssl-1.1"
),
"Found libcurl and OpenSSL >= 1.1"
)
expect_output(
expect_identical(
select_binary("linux", "x86_64", "#error Using OpenSSL version 1.0"),
- "linux-openssl-1.0"
+ "linux-x86_64-openssl-1.0"
),
"Found libcurl and OpenSSL < 1.1"
)
expect_output(
expect_identical(
select_binary("linux", "x86_64", "#error Using OpenSSL version 3"),
- "linux-openssl-3.0"
+ "linux-x86_64-openssl-3.0"
),
"Found libcurl and OpenSSL >= 3.0.0"
)
diff --git a/r/tools/update-checksums.R b/r/tools/update-checksums.R
index 5502c9c9ce..250cf61755 100644
--- a/r/tools/update-checksums.R
+++ b/r/tools/update-checksums.R
@@ -48,22 +48,21 @@ if (!file.exists(tasks_yml)) {
cat("Extracting libarrow binary paths from tasks.yml\n")
# Get the libarrow binary paths from the tasks.yml file
binary_paths <- readLines(tasks_yml) |>
- grep("r-lib__libarrow", x = _, value = TRUE) |>
- sub(".+r-lib__libarrow__bin__(.+\\.zip)", "\\1", x = _) |>
+ grep("r-libarrow", x = _, value = TRUE) |>
+ sub(".+(r-libarrow-.+\\.zip)", "\\1", x = _) |>
sub("{no_rc_r_version}", VERSION, fixed = TRUE, x = _) |>
- sub("__", "/", x = _) |>
sub("\\.zip", ".zip", fixed = TRUE, x = _)
-artifactory_root <-
"https://apache.jfrog.io/artifactory/arrow/r/%s/libarrow/bin/%s"
+github_release_root <-
"https://github.com/apache/arrow/releases/download/apache-arrow-%s/%s"
# Get the checksum file from the artifactory
for (path in binary_paths) {
sha_path <- paste0(path, ".sha512")
file <- file.path("tools/checksums", sha_path)
dirname(file) |> dir.create(path = _, recursive = TRUE, showWarnings = FALSE)
-
+
cat(paste0("Downloading ", sha_path, "\n"))
- url <- sprintf(artifactory_root, VERSION, sha_path)
+ url <- sprintf(github_release_root, VERSION, sha_path)
download.file(url, file, quiet = TRUE, cacheOK = FALSE)
if (grepl("windows", path)) {