From 394b1a3cdcbd10bc10a739b7064ada0d294b1ca6 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 8 Jun 2022 09:18:17 +0900 Subject: [PATCH 1/3] ARROW-16785: [Packaging][Linux] Add FindThrift.cmake This is a follow-up of ARROW-16721/#13292. --- .../linux-packages/apache-arrow/debian/libarrow-dev.install | 2 +- dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-dev.install b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-dev.install index 81789b9d569..4f600692ced 100644 --- a/dev/tasks/linux-packages/apache-arrow/debian/libarrow-dev.install +++ b/dev/tasks/linux-packages/apache-arrow/debian/libarrow-dev.install @@ -5,7 +5,7 @@ usr/lib/*/cmake/arrow/ArrowTargets*.cmake usr/lib/*/cmake/arrow/Find*Alt.cmake usr/lib/*/cmake/arrow/FindArrow.cmake usr/lib/*/cmake/arrow/FindBrotli.cmake -usr/lib/*/cmake/arrow/Find[Suz]*.cmake +usr/lib/*/cmake/arrow/Find[STuz]*.cmake usr/lib/*/cmake/arrow/arrow-config.cmake usr/lib/*/libarrow.a usr/lib/*/libarrow.so 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 8000a2b253f..6f93224fac8 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in +++ b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in @@ -294,6 +294,7 @@ Libraries and header files for Apache Arrow C++. %{_libdir}/cmake/arrow/FindArrow.cmake %{_libdir}/cmake/arrow/FindBrotli.cmake %{_libdir}/cmake/arrow/FindSnappy.cmake +%{_libdir}/cmake/arrow/FindThrift.cmake %if %{use_flight} %{_libdir}/cmake/arrow/Findc-aresAlt.cmake %endif From e68eb9f58868c6b19df692adbf7a8bdd226ab983 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 8 Jun 2022 10:39:59 +0900 Subject: [PATCH 2/3] Add Thrift availability check --- dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 6f93224fac8..c7990a05c6f 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in +++ b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in @@ -64,11 +64,12 @@ %define use_python (%{rhel} >= 8) # TODO: Enable this. This works on local but is fragile on GitHub Actions and # Travis CI. -# %%define use_s3 (%{rhel} >= 8) +# %%define use_s3 (%%{rhel} >= 8) %define use_s3 0 %define have_rapidjson (%{rhel} != 8) %define have_re2 (%{rhel} >= 8) +%define have_thrift (%{rhel} >= 8) %define have_utf8proc (%{rhel} >= 9) %define have_zstd (!%{is_amazon_linux}) @@ -122,7 +123,9 @@ BuildRequires: rapidjson-devel BuildRequires: re2-devel %endif BuildRequires: snappy-devel +%if %{have_thrift} BuildRequires: thrift-devel +%endif %if %{have_utf8proc} BuildRequires: utf8proc-devel %endif @@ -294,7 +297,9 @@ Libraries and header files for Apache Arrow C++. %{_libdir}/cmake/arrow/FindArrow.cmake %{_libdir}/cmake/arrow/FindBrotli.cmake %{_libdir}/cmake/arrow/FindSnappy.cmake +%if %{use_thrift} %{_libdir}/cmake/arrow/FindThrift.cmake +%endif %if %{use_flight} %{_libdir}/cmake/arrow/Findc-aresAlt.cmake %endif From db7b4a34c2a29324053da7ec02c804f48064de46 Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 8 Jun 2022 10:47:08 +0900 Subject: [PATCH 3/3] Fix a typo --- dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c7990a05c6f..c671ce8aede 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in +++ b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in @@ -297,7 +297,7 @@ Libraries and header files for Apache Arrow C++. %{_libdir}/cmake/arrow/FindArrow.cmake %{_libdir}/cmake/arrow/FindBrotli.cmake %{_libdir}/cmake/arrow/FindSnappy.cmake -%if %{use_thrift} +%if %{have_thrift} %{_libdir}/cmake/arrow/FindThrift.cmake %endif %if %{use_flight}