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 0ffcc5939e ARROW-17251: [CI][Conan] Enable Flight (#13761)
0ffcc5939e is described below

commit 0ffcc5939ed9fc0a4ca23492d68d2df0661f2bf9
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sat Aug 6 22:00:17 2022 +0900

    ARROW-17251: [CI][Conan] Enable Flight (#13761)
    
    This also applies upstream changes.
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 ci/conan/all/conandata.yml                         |  32 +-
 ci/conan/all/conanfile.py                          | 161 ++++--
 .../patches/7.0.0-0004-remove-find-modules.patch   | 638 ---------------------
 .../all/patches/7.0.0-0005-use-find-package.patch  | 117 +++-
 .../all/patches/7.0.0-0006-install-utils.patch     |  39 ++
 ci/conan/all/patches/8.0.0-0001-cmake.patch        |  35 ++
 ci/conan/all/patches/8.0.0-0002-jemalloc.patch     |  48 ++
 .../patches/8.0.0-0003-mallctl-takes-size_t.patch  |  35 ++
 ...age.patch => 8.0.0-0004-use-find-package.patch} | 348 ++++++-----
 .../all/patches/8.0.0-0005-install-utils.patch     |  65 +++
 ci/conan/all/test_package/CMakeLists.txt           |   6 +-
 ci/conan/config.yml                                |   4 +
 ci/scripts/conan_build.sh                          |   3 +
 cpp/cmake_modules/ThirdpartyToolchain.cmake        |  17 +-
 dev/tasks/tasks.yml                                |   1 +
 15 files changed, 691 insertions(+), 858 deletions(-)

diff --git a/ci/conan/all/conandata.yml b/ci/conan/all/conandata.yml
index 1e32a6f446..942a3eba7a 100644
--- a/ci/conan/all/conandata.yml
+++ b/ci/conan/all/conandata.yml
@@ -21,6 +21,12 @@
 # SOFTWARE.
 
 sources:
+  "8.0.1":
+    url: "https://github.com/apache/arrow/archive/apache-arrow-8.0.1.tar.gz";
+    sha256: "e4c86329be769f2c8778aacc8d6220a9a13c90d59d4988f9349d51299dacbd11"
+  "8.0.0":
+    url: "https://github.com/apache/arrow/archive/apache-arrow-8.0.0.tar.gz";
+    sha256: "19ece12de48e51ce4287d2dee00dc358fbc5ff02f41629d16076f77b8579e272"
   "7.0.0":
     url: "https://github.com/apache/arrow/archive/apache-arrow-7.0.0.tar.gz";
     sha256: "57e13c62f27b710e1de54fd30faed612aefa22aa41fa2c0c3bacd204dd18a8f3"
@@ -31,6 +37,28 @@ sources:
     url: "https://github.com/apache/arrow/archive/apache-arrow-1.0.0.tar.gz";
     sha256: "08fbd4c633c08939850d619ca0224c75d7a0526467c721c0838b8aa7efccb270"
 patches:
+  "8.0.1":
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0001-cmake.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0002-jemalloc.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0003-mallctl-takes-size_t.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0004-use-find-package.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0005-install-utils.patch"
+  "8.0.0":
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0001-cmake.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0002-jemalloc.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0003-mallctl-takes-size_t.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0004-use-find-package.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/8.0.0-0005-install-utils.patch"
   "7.0.0":
     - base_path: "source_subfolder"
       patch_file: "patches/7.0.0-0001-cmake.patch"
@@ -38,10 +66,10 @@ patches:
       patch_file: "patches/7.0.0-0002-jemalloc.patch"
     - base_path: "source_subfolder"
       patch_file: "patches/7.0.0-0003-mallctl-takes-size_t.patch"
-    - base_path: "source_subfolder"
-      patch_file: "patches/7.0.0-0004-remove-find-modules.patch"
     - base_path: "source_subfolder"
       patch_file: "patches/7.0.0-0005-use-find-package.patch"
+    - base_path: "source_subfolder"
+      patch_file: "patches/7.0.0-0006-install-utils.patch"
   "2.0.0":
     - base_path: "source_subfolder"
       patch_file: "patches/2.0.0-0001-cmake.patch"
diff --git a/ci/conan/all/conanfile.py b/ci/conan/all/conanfile.py
index 110f9bd935..a87478d6e4 100644
--- a/ci/conan/all/conanfile.py
+++ b/ci/conan/all/conanfile.py
@@ -23,7 +23,7 @@
 from conans import ConanFile, tools, CMake
 from conans.errors import ConanInvalidConfiguration
 import os
-
+import glob
 
 required_conan_version = ">=1.33.0"
 
@@ -31,21 +31,22 @@ required_conan_version = ">=1.33.0"
 class ArrowConan(ConanFile):
     name = "arrow"
     description = "Apache Arrow is a cross-language development platform for 
in-memory data"
-    topics = ("arrow", "memory")
+    license = ("Apache-2.0",)
     url = "https://github.com/conan-io/conan-center-index";
     homepage = "https://arrow.apache.org/";
-    license = ("Apache-2.0",)
-    generators = "cmake", "cmake_find_package_multi"
-    settings = "os", "compiler", "build_type", "arch"
+    topics = ("memory", "gandiva", "parquet", "skyhook", "plasma", "hdfs", 
"csv", "cuda", "gcs", "json", "hive", "s3", "grpc")
+    settings = "os", "arch", "compiler", "build_type"
     options = {
         "shared": [True, False],
         "fPIC": [True, False],
         "gandiva":  [True, False],
-        "parquet": [True, False],
+        "parquet": ["auto", True, False],
+        "substrait": [True, False],
+        "skyhook": [True, False],
         "plasma": [True, False],
         "cli": [True, False],
         "compute": ["auto", True, False],
-        "dataset_modules":  [True, False],
+        "dataset_modules":  ["auto", True, False],
         "deprecated": [True, False],
         "encryption": [True, False],
         "filesystem_layer":  [True, False],
@@ -56,7 +57,9 @@ class ArrowConan(ConanFile):
         "with_boost": ["auto", True, False],
         "with_csv": [True, False],
         "with_cuda": [True, False],
-        "with_flight_rpc":  [True, False],
+        "with_flight_rpc":  ["auto", True, False],
+        "with_flight_sql":  [True, False],
+        "with_gcs": [True, False],
         "with_gflags": ["auto", True, False],
         "with_glog": ["auto", True, False],
         "with_grpc": ["auto", True, False],
@@ -64,6 +67,7 @@ class ArrowConan(ConanFile):
         "with_json": [True, False],
         "with_llvm": ["auto", True, False],
         "with_openssl": ["auto", True, False],
+        "with_opentelemetry": [True, False],
         "with_orc": [True, False],
         "with_protobuf": ["auto", True, False],
         "with_re2": ["auto", True, False],
@@ -80,11 +84,13 @@ class ArrowConan(ConanFile):
         "shared": False,
         "fPIC": True,
         "gandiva": False,
-        "parquet": False,
+        "parquet": "auto",
+        "skyhook": False,
+        "substrait": False,
         "plasma": False,
         "cli": False,
         "compute": "auto",
-        "dataset_modules": False,
+        "dataset_modules": "auto",
         "deprecated": True,
         "encryption": False,
         "filesystem_layer": False,
@@ -97,7 +103,9 @@ class ArrowConan(ConanFile):
         "with_bz2": False,
         "with_csv": False,
         "with_cuda": False,
-        "with_flight_rpc": False,
+        "with_flight_rpc": "auto",
+        "with_flight_sql": False,
+        "with_gcs": False,
         "with_gflags": "auto",
         "with_jemalloc": "auto",
         "with_glog": "auto",
@@ -105,6 +113,7 @@ class ArrowConan(ConanFile):
         "with_json": False,
         "with_llvm": "auto",
         "with_openssl": "auto",
+        "with_opentelemetry": False,
         "with_orc": False,
         "with_protobuf": "auto",
         "with_re2": "auto",
@@ -115,6 +124,8 @@ class ArrowConan(ConanFile):
         "with_zlib": False,
         "with_zstd": False,
     }
+    generators = "cmake", "cmake_find_package_multi"
+    short_paths = True
 
     _cmake = None
 
@@ -135,6 +146,14 @@ class ArrowConan(ConanFile):
             del self.options.runtime_simd_level
         elif tools.Version(self.version) < "6.0.0":
             self.options.simd_level = "sse4_2"
+        if tools.Version(self.version) < "6.0.0":
+            del self.options.with_gcs
+        if tools.Version(self.version) < "7.0.0":
+            del self.options.skyhook
+            del self.options.with_flight_sql
+            del self.options.with_opentelemetry
+        if tools.Version(self.version) < "8.0.0":
+            del self.options.substrait
 
     def validate(self):
         if self.settings.compiler == "clang" and 
self.settings.compiler.version <= tools.Version("3.9"):
@@ -144,6 +163,12 @@ class ArrowConan(ConanFile):
             del self.options.fPIC
         if self.options.compute == False and not self._compute(True):
             raise ConanInvalidConfiguration("compute options is required (or 
choose auto)")
+        if self.options.parquet == False and self._parquet(True):
+            raise ConanInvalidConfiguration("parquet options is required (or 
choose auto)")
+        if self.options.dataset_modules == False and 
self._dataset_modules(True):
+            raise ConanInvalidConfiguration("dataset_modules options is 
required (or choose auto)")
+        if self.options.get_safe("skyhook", False):
+            raise ConanInvalidConfiguration("CCI has no librados recipe (yet)")
         if self.options.with_jemalloc == False and self._with_jemalloc(True):
             raise ConanInvalidConfiguration("with_jemalloc option is required 
(or choose auto)")
         if self.options.with_re2 == False and self._with_re2(True):
@@ -152,6 +177,8 @@ class ArrowConan(ConanFile):
             raise ConanInvalidConfiguration("with_protobuf option is required 
(or choose auto)")
         if self.options.with_gflags == False and self._with_gflags(True):
             raise ConanInvalidConfiguration("with_gflags options is required 
(or choose auto)")
+        if self.options.with_flight_rpc == False and 
self._with_flight_rpc(True):
+            raise ConanInvalidConfiguration("with_flight_rpc options is 
required (or choose auto)")
         if self.options.with_grpc == False and self._with_grpc(True):
             raise ConanInvalidConfiguration("with_grpc options is required (or 
choose auto)")
         if self.options.with_boost == False and self._with_boost(True):
@@ -176,10 +203,22 @@ class ArrowConan(ConanFile):
 
     def _compute(self, required=False):
         if required or self.options.compute == "auto":
-            return bool(self.options.dataset_modules) or 
bool(self.options.parquet)
+            return bool(self._parquet()) or bool(self._dataset_modules()) or 
bool(self.options.get_safe("substrait", False))
         else:
             return bool(self.options.compute)
 
+    def _parquet(self, required=False):
+        if required or self.options.parquet == "auto":
+            return bool(self.options.get_safe("substrait", False))
+        else:
+            return bool(self.options.parquet)
+
+    def _dataset_modules(self, required=False):
+        if required or self.options.dataset_modules == "auto":
+            return bool(self.options.get_safe("substrait", False))
+        else:
+            return bool(self.options.dataset_modules)
+
     def _with_jemalloc(self, required=False):
         if required or self.options.with_jemalloc == "auto":
             return bool("BSD" in str(self.settings.os))
@@ -194,10 +233,16 @@ class ArrowConan(ConanFile):
 
     def _with_protobuf(self, required=False):
         if required or self.options.with_protobuf == "auto":
-            return bool(self.options.gandiva or self.options.with_flight_rpc 
or self.options.with_orc)
+            return bool(self.options.gandiva or self._with_flight_rpc() or 
self.options.with_orc or self.options.get_safe("substrait", False))
         else:
             return bool(self.options.with_protobuf)
 
+    def _with_flight_rpc(self, required=False):
+        if required or self.options.with_flight_rpc == "auto":
+            return bool(self.options.get_safe("with_flight_sql", False))
+        else:
+            return bool(self.options.with_flight_rpc)
+
     def _with_gflags(self, required=False):
         if required or self.options.with_gflags == "auto":
             return bool(self.options.plasma or self._with_glog() or 
self._with_grpc())
@@ -212,7 +257,7 @@ class ArrowConan(ConanFile):
 
     def _with_grpc(self, required=False):
         if required or self.options.with_grpc == "auto":
-            return bool(self.options.with_flight_rpc)
+            return self._with_flight_rpc()
         else:
             return bool(self.options.with_grpc)
 
@@ -222,7 +267,7 @@ class ArrowConan(ConanFile):
                 return True
             version = tools.Version(self.version)
             if version.major == "1":
-                if self.options.parquet and self.settings.compiler == "gcc" 
and self.settings.compiler.version < tools.Version("4.9"):
+                if self._parquet() and self.settings.compiler == "gcc" and 
self.settings.compiler.version < tools.Version("4.9"):
                     return True
             elif version.major >= "2":
                 if self.settings.compiler == "Visual Studio":
@@ -233,7 +278,7 @@ class ArrowConan(ConanFile):
 
     def _with_thrift(self, required=False):
         # No self.options.with_thift exists
-        return bool(required or self.options.parquet)
+        return bool(required or self._parquet())
 
     def _with_utf8proc(self, required=False):
         if required or self.options.with_utf8proc == "auto":
@@ -245,19 +290,19 @@ class ArrowConan(ConanFile):
         if required or self.options.with_llvm == "auto":
             return bool(self.options.gandiva)
         else:
-            return bool(self.options.with_openssl)
+            return bool(self.options.with_llvm)
 
     def _with_openssl(self, required=False):
         if required or self.options.with_openssl == "auto":
-            return bool(self.options.encryption or 
self.options.with_flight_rpc or self.options.with_s3)
+            return bool(self.options.encryption or self._with_flight_rpc() or 
self.options.with_s3)
         else:
             return bool(self.options.with_openssl)
 
     def requirements(self):
         if self._with_thrift():
-            self.requires("thrift/0.15.0")
+            self.requires("thrift/0.16.0")
         if self._with_protobuf():
-            self.requires("protobuf/3.20.0")
+            self.requires("protobuf/3.21.1")
         if self._with_jemalloc():
             self.requires("jemalloc/5.2.1")
         if self._with_boost():
@@ -266,18 +311,22 @@ class ArrowConan(ConanFile):
             self.requires("gflags/2.2.2")
         if self._with_glog():
             self.requires("glog/0.6.0")
+        if self.options.get_safe("with_gcs"):
+            self.requires("google-cloud-cpp/1.40.1")
         if self._with_grpc():
-            self.requires("grpc/1.45.2")
+            self.requires("grpc/1.47.0")
         if self.options.with_json:
             self.requires("rapidjson/1.1.0")
         if self._with_llvm():
             self.requires("llvm-core/13.0.0")
         if self._with_openssl():
-            # aws-sdk-cpp requires openssl/1.1.1. it uses deprecated functions 
in openssl/3.0.0
-            if self.options.with_s3:
-                self.requires("openssl/1.1.1o")
+            # aws-sdk-cpp/grpc requires openssl/1.1.1. it uses deprecated 
functions in openssl/3.0.0
+            if self.options.with_s3 or self._with_flight_rpc():
+                self.requires("openssl/1.1.1q")
             else:
-                self.requires("openssl/3.0.3")
+                self.requires("openssl/3.0.5")
+        if self.options.get_safe("with_opentelemetry"):
+            self.requires("opentelemetry-cpp/1.4.1")
         if self.options.with_s3:
             self.requires("aws-sdk-cpp/1.9.234")
         if self.options.with_brotli:
@@ -312,6 +361,8 @@ class ArrowConan(ConanFile):
             top_level = os.environ.get("ARROW_HOME")
             shutil.copytree(os.path.join(top_level, "cpp"),
                             os.path.join(self._source_subfolder, "cpp"))
+            shutil.copytree(os.path.join(top_level, "format"),
+                            os.path.join(self._source_subfolder, "format"))
             top_level_files = [
                 ".env",
                 "LICENSE.txt",
@@ -341,9 +392,10 @@ class ArrowConan(ConanFile):
         self._cmake.definitions["ARROW_DEFINE_OPTIONS"] = True
         self._cmake.definitions["ARROW_DEPENDENCY_SOURCE"] = "SYSTEM"
         self._cmake.definitions["ARROW_GANDIVA"] = self.options.gandiva
-        self._cmake.definitions["ARROW_PARQUET"] = self.options.parquet
+        self._cmake.definitions["ARROW_PARQUET"] = self._parquet()
+        self._cmake.definitions["ARROW_SUBSTRAIT"] = 
self.options.get_safe("substrait", False)
         self._cmake.definitions["ARROW_PLASMA"] = self.options.plasma
-        self._cmake.definitions["ARROW_DATASET"] = self.options.dataset_modules
+        self._cmake.definitions["ARROW_DATASET"] = self._dataset_modules()
         self._cmake.definitions["ARROW_FILESYSTEM"] = 
self.options.filesystem_layer
         self._cmake.definitions["PARQUET_REQUIRE_ENCRYPTION"] = 
self.options.encryption
         self._cmake.definitions["ARROW_HDFS"] = self.options.hdfs_bridgs
@@ -351,7 +403,8 @@ class ArrowConan(ConanFile):
         self._cmake.definitions["ARROW_BUILD_SHARED"] = self.options.shared
         self._cmake.definitions["ARROW_BUILD_STATIC"] = not self.options.shared
         self._cmake.definitions["ARROW_NO_DEPRECATED_API"] = not 
self.options.deprecated
-        self._cmake.definitions["ARROW_FLIGHT"] = self.options.with_flight_rpc
+        self._cmake.definitions["ARROW_FLIGHT"] = self._with_flight_rpc()
+        self._cmake.definitions["ARROW_FLIGHT_SQL"] = 
self.options.get_safe("with_flight_sql", False)
         self._cmake.definitions["ARROW_COMPUTE"] = self._compute()
         self._cmake.definitions["ARROW_CSV"] = self.options.with_csv
         self._cmake.definitions["ARROW_CUDA"] = self.options.with_cuda
@@ -444,6 +497,24 @@ class ArrowConan(ConanFile):
     def _patch_sources(self):
         for patch in self.conan_data.get("patches", {}).get(self.version, []):
             tools.patch(**patch)
+        # if tools.Version(self.version) >= "7.0.0":
+        #     for filename in glob.glob(os.path.join(self._source_subfolder, 
"cpp", "cmake_modules", "Find*.cmake")):
+        #         if os.path.basename(filename) not in [
+        #             "FindArrow.cmake",
+        #             "FindArrowCUDA.cmake",
+        #             "FindArrowDataset.cmake",
+        #             "FindArrowFlight.cmake",
+        #             "FindArrowFlightSql.cmake",
+        #             "FindArrowFlightTesting.cmake",
+        #             "FindArrowPython.cmake",
+        #             "FindArrowPythonFlight.cmake",
+        #             "FindArrowSubstrait.cmake",
+        #             "FindArrowTesting.cmake",
+        #             "FindGandiva.cmake",
+        #             "FindParquet.cmake",
+        #             "FindPlasma.cmake",
+        #         ]:
+        #             os.remove(filename)
 
     def build(self):
         self._patch_sources()
@@ -486,16 +557,23 @@ class ArrowConan(ConanFile):
         self.cpp_info.components["libarrow"].names["pkg_config"] = "arrow"
         if not self.options.shared:
             self.cpp_info.components["libarrow"].defines = ["ARROW_STATIC"]
-            if self.settings.os == "Linux":
-                self.cpp_info.components["libarrow"].system_libs = ["pthread"]
+            if self.settings.os in ["Linux", "FreeBSD"]:
+                self.cpp_info.components["libarrow"].system_libs = ["pthread", 
"m", "dl", "rt"]
 
-        if self.options.parquet:
+        if self._parquet():
             self.cpp_info.components["libparquet"].libs = 
[self._lib_name("parquet")]
             self.cpp_info.components["libparquet"].names["cmake_find_package"] 
= "parquet"
             
self.cpp_info.components["libparquet"].names["cmake_find_package_multi"] = 
"parquet"
             self.cpp_info.components["libparquet"].names["pkg_config"] = 
"parquet"
             self.cpp_info.components["libparquet"].requires = ["libarrow"]
 
+        if self.options.get_safe("substrait", False):
+            self.cpp_info.components["libarrow_substrait"].libs = 
[self._lib_name("arrow_substrait")]
+            
self.cpp_info.components["libarrow_substrait"].names["cmake_find_package"] = 
"arrow_substrait"
+            
self.cpp_info.components["libarrow_substrait"].names["cmake_find_package_multi"]
 = "arrow_substrait"
+            self.cpp_info.components["libarrow_substrait"].names["pkg_config"] 
= "arrow_substrait"
+            self.cpp_info.components["libarrow_substrait"].requires = 
["libparquet", "dataset"]
+
         if self.options.plasma:
             self.cpp_info.components["libplasma"].libs = 
[self._lib_name("plasma")]
             self.cpp_info.components["libplasma"].names["cmake_find_package"] 
= "plasma"
@@ -510,17 +588,24 @@ class ArrowConan(ConanFile):
             self.cpp_info.components["libgandiva"].names["pkg_config"] = 
"gandiva"
             self.cpp_info.components["libgandiva"].requires = ["libarrow"]
 
-        if self.options.with_flight_rpc:
+        if self._with_flight_rpc():
             self.cpp_info.components["libarrow_flight"].libs = 
[self._lib_name("arrow_flight")]
             
self.cpp_info.components["libarrow_flight"].names["cmake_find_package"] = 
"flight_rpc"
             
self.cpp_info.components["libarrow_flight"].names["cmake_find_package_multi"] = 
"flight_rpc"
             self.cpp_info.components["libarrow_flight"].names["pkg_config"] = 
"flight_rpc"
             self.cpp_info.components["libarrow_flight"].requires = ["libarrow"]
 
-        if self.options.dataset_modules:
+        if self.options.get_safe("with_flight_sql"):
+            self.cpp_info.components["libarrow_flight_sql"].libs = 
[self._lib_name("arrow_flight_sql")]
+            
self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package"] = 
"flight_sql"
+            
self.cpp_info.components["libarrow_flight_sql"].names["cmake_find_package_multi"]
 = "flight_sql"
+            
self.cpp_info.components["libarrow_flight_sql"].names["pkg_config"] = 
"flight_sql"
+            self.cpp_info.components["libarrow_flight_sql"].requires = 
["libarrow", "libarrow_flight"]
+
+        if self._dataset_modules():
             self.cpp_info.components["dataset"].libs = ["arrow_dataset"]
 
-        if self.options.cli:
+        if (self.options.cli and (self.options.with_cuda or 
self._with_flight_rpc() or self._parquet())) or self.options.plasma:
             binpath = os.path.join(self.package_folder, "bin")
             self.output.info("Appending PATH env var: {}".format(binpath))
             self.env_info.PATH.append(binpath)
@@ -529,7 +614,7 @@ class ArrowConan(ConanFile):
             if self.options.gandiva:
                 # FIXME: only filesystem component is used
                 
self.cpp_info.components["libgandiva"].requires.append("boost::boost")
-            if self.options.parquet and self.settings.compiler == "gcc" and 
self.settings.compiler.version < tools.Version("4.9"):
+            if self._parquet() and self.settings.compiler == "gcc" and 
self.settings.compiler.version < tools.Version("4.9"):
                 
self.cpp_info.components["libparquet"].requires.append("boost::boost")
             if tools.Version(self.version) >= "2.0":
                 # FIXME: only headers components is used
@@ -560,8 +645,12 @@ class ArrowConan(ConanFile):
             
self.cpp_info.components["libarrow"].requires.append("rapidjson::rapidjson")
         if self.options.with_s3:
             
self.cpp_info.components["libarrow"].requires.append("aws-sdk-cpp::s3")
+        if self.options.get_safe("with_gcs"):
+            
self.cpp_info.components["libarrow"].requires.append("google-cloud-cpp::storage")
         if self.options.with_orc:
             self.cpp_info.components["libarrow"].requires.append("orc::orc")
+        if self.options.get_safe("with_opentelemetry"):
+            
self.cpp_info.components["libarrow"].requires.append("opentelemetry-cpp::opentelemetry-cpp")
         if self.options.with_brotli:
             
self.cpp_info.components["libarrow"].requires.append("brotli::brotli")
         if self.options.with_bz2:
@@ -576,6 +665,6 @@ class ArrowConan(ConanFile):
             self.cpp_info.components["libarrow"].requires.append("zlib::zlib")
         if self.options.with_zstd:
             self.cpp_info.components["libarrow"].requires.append("zstd::zstd")
-        if self.options.with_flight_rpc:
+        if self._with_flight_rpc():
             
self.cpp_info.components["libarrow_flight"].requires.append("grpc::grpc")
             
self.cpp_info.components["libarrow_flight"].requires.append("protobuf::protobuf")
diff --git a/ci/conan/all/patches/7.0.0-0004-remove-find-modules.patch 
b/ci/conan/all/patches/7.0.0-0004-remove-find-modules.patch
index 482bb7cd4d..f0b299479e 100644
--- a/ci/conan/all/patches/7.0.0-0004-remove-find-modules.patch
+++ b/ci/conan/all/patches/7.0.0-0004-remove-find-modules.patch
@@ -20,641 +20,3 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 
OTHERWISE, ARISING FROM,
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 SOFTWARE.
 
-diff --git a/cpp/cmake_modules/FindBrotli.cmake 
a/cpp/cmake_modules/FindBrotli.cmake
-deleted file mode 100644
-index e2670b5..0000000
---- a/cpp/cmake_modules/FindBrotli.cmake
-+++ /dev/null
-@@ -1,130 +0,0 @@
--#
--# Licensed 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.
--#
--# Tries to find Brotli headers and libraries.
--#
--# Usage of this module as follows:
--#
--#  find_package(Brotli)
--
--if(ARROW_BROTLI_USE_SHARED)
--  set(BROTLI_COMMON_LIB_NAMES
--      brotlicommon
--      
${CMAKE_SHARED_LIBRARY_PREFIX}brotlicommon${CMAKE_SHARED_LIBRARY_SUFFIX})
--
--  set(BROTLI_ENC_LIB_NAMES
--      brotlienc 
${CMAKE_SHARED_LIBRARY_PREFIX}brotlienc${CMAKE_SHARED_LIBRARY_SUFFIX})
--
--  set(BROTLI_DEC_LIB_NAMES
--      brotlidec 
${CMAKE_SHARED_LIBRARY_PREFIX}brotlidec${CMAKE_SHARED_LIBRARY_SUFFIX})
--else()
--  set(BROTLI_COMMON_LIB_NAMES
--      brotlicommon-static
--      
${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon-static${CMAKE_STATIC_LIBRARY_SUFFIX}
--      
${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon_static${CMAKE_STATIC_LIBRARY_SUFFIX}
--      
${CMAKE_STATIC_LIBRARY_PREFIX}brotlicommon${CMAKE_STATIC_LIBRARY_SUFFIX})
--
--  set(BROTLI_ENC_LIB_NAMES
--      brotlienc-static
--      
${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc-static${CMAKE_STATIC_LIBRARY_SUFFIX}
--      
${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc_static${CMAKE_STATIC_LIBRARY_SUFFIX}
--      ${CMAKE_STATIC_LIBRARY_PREFIX}brotlienc${CMAKE_STATIC_LIBRARY_SUFFIX})
--
--  set(BROTLI_DEC_LIB_NAMES
--      brotlidec-static
--      
${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec-static${CMAKE_STATIC_LIBRARY_SUFFIX}
--      
${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec_static${CMAKE_STATIC_LIBRARY_SUFFIX}
--      ${CMAKE_STATIC_LIBRARY_PREFIX}brotlidec${CMAKE_STATIC_LIBRARY_SUFFIX})
--endif()
--
--if(BROTLI_ROOT)
--  find_library(BROTLI_COMMON_LIBRARY
--               NAMES ${BROTLI_COMMON_LIB_NAMES}
--               PATHS ${BROTLI_ROOT}
--               PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--               NO_DEFAULT_PATH)
--  find_library(BROTLI_ENC_LIBRARY
--               NAMES ${BROTLI_ENC_LIB_NAMES}
--               PATHS ${BROTLI_ROOT}
--               PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--               NO_DEFAULT_PATH)
--  find_library(BROTLI_DEC_LIBRARY
--               NAMES ${BROTLI_DEC_LIB_NAMES}
--               PATHS ${BROTLI_ROOT}
--               PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--               NO_DEFAULT_PATH)
--  find_path(BROTLI_INCLUDE_DIR
--            NAMES brotli/decode.h
--            PATHS ${BROTLI_ROOT}
--            PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES}
--            NO_DEFAULT_PATH)
--else()
--  find_package(PkgConfig QUIET)
--  pkg_check_modules(BROTLI_PC libbrotlicommon libbrotlienc libbrotlidec)
--  if(BROTLI_PC_FOUND)
--    set(BROTLI_INCLUDE_DIR "${BROTLI_PC_libbrotlicommon_INCLUDEDIR}")
--
--    # Some systems (e.g. Fedora) don't fill Brotli_LIBRARY_DIRS, so add the 
other dirs here.
--    list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlicommon_LIBDIR}")
--    list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlienc_LIBDIR}")
--    list(APPEND BROTLI_PC_LIBRARY_DIRS "${BROTLI_PC_libbrotlidec_LIBDIR}")
--
--    find_library(BROTLI_COMMON_LIBRARY
--                 NAMES ${BROTLI_COMMON_LIB_NAMES}
--                 PATHS ${BROTLI_PC_LIBRARY_DIRS}
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--                 NO_DEFAULT_PATH)
--    find_library(BROTLI_ENC_LIBRARY
--                 NAMES ${BROTLI_ENC_LIB_NAMES}
--                 PATHS ${BROTLI_PC_LIBRARY_DIRS}
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--                 NO_DEFAULT_PATH)
--    find_library(BROTLI_DEC_LIBRARY
--                 NAMES ${BROTLI_DEC_LIB_NAMES}
--                 PATHS ${BROTLI_PC_LIBRARY_DIRS}
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--                 NO_DEFAULT_PATH)
--  else()
--    find_library(BROTLI_COMMON_LIBRARY
--                 NAMES ${BROTLI_COMMON_LIB_NAMES}
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
--    find_library(BROTLI_ENC_LIBRARY
--                 NAMES ${BROTLI_ENC_LIB_NAMES}
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
--    find_library(BROTLI_DEC_LIBRARY
--                 NAMES ${BROTLI_DEC_LIB_NAMES}
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
--    find_path(BROTLI_INCLUDE_DIR
--              NAMES brotli/decode.h
--              PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
--  endif()
--endif()
--
--find_package_handle_standard_args(
--  Brotli REQUIRED_VARS BROTLI_COMMON_LIBRARY BROTLI_ENC_LIBRARY 
BROTLI_DEC_LIBRARY
--                       BROTLI_INCLUDE_DIR)
--if(Brotli_FOUND OR BROTLI_FOUND)
--  set(Brotli_FOUND TRUE)
--  add_library(Brotli::brotlicommon UNKNOWN IMPORTED)
--  set_target_properties(Brotli::brotlicommon
--                        PROPERTIES IMPORTED_LOCATION 
"${BROTLI_COMMON_LIBRARY}"
--                                   INTERFACE_INCLUDE_DIRECTORIES 
"${BROTLI_INCLUDE_DIR}")
--  add_library(Brotli::brotlienc UNKNOWN IMPORTED)
--  set_target_properties(Brotli::brotlienc
--                        PROPERTIES IMPORTED_LOCATION "${BROTLI_ENC_LIBRARY}"
--                                   INTERFACE_INCLUDE_DIRECTORIES 
"${BROTLI_INCLUDE_DIR}")
--  add_library(Brotli::brotlidec UNKNOWN IMPORTED)
--  set_target_properties(Brotli::brotlidec
--                        PROPERTIES IMPORTED_LOCATION "${BROTLI_DEC_LIBRARY}"
--                                   INTERFACE_INCLUDE_DIRECTORIES 
"${BROTLI_INCLUDE_DIR}")
--endif()
-diff --git a/cpp/cmake_modules/FindLz4.cmake a/cpp/cmake_modules/FindLz4.cmake
-deleted file mode 100644
-index bc8051f..0000000
---- a/cpp/cmake_modules/FindLz4.cmake
-+++ /dev/null
-@@ -1,84 +0,0 @@
--# 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.
--
--if(MSVC_TOOLCHAIN AND NOT DEFINED LZ4_MSVC_LIB_PREFIX)
--  set(LZ4_MSVC_LIB_PREFIX "lib")
--endif()
--set(LZ4_LIB_NAME_BASE "${LZ4_MSVC_LIB_PREFIX}lz4")
--
--if(ARROW_LZ4_USE_SHARED)
--  set(LZ4_LIB_NAMES)
--  if(CMAKE_IMPORT_LIBRARY_SUFFIX)
--    list(APPEND
--         LZ4_LIB_NAMES
--         
"${CMAKE_IMPORT_LIBRARY_PREFIX}${LZ4_LIB_NAME_BASE}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
--    )
--  endif()
--  list(APPEND LZ4_LIB_NAMES
--       
"${CMAKE_SHARED_LIBRARY_PREFIX}${LZ4_LIB_NAME_BASE}${CMAKE_SHARED_LIBRARY_SUFFIX}")
--else()
--  if(MSVC AND NOT DEFINED LZ4_MSVC_STATIC_LIB_SUFFIX)
--    set(LZ4_MSVC_STATIC_LIB_SUFFIX "_static")
--  endif()
--  set(LZ4_STATIC_LIB_SUFFIX 
"${LZ4_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
--  set(LZ4_LIB_NAMES
--      
"${CMAKE_STATIC_LIBRARY_PREFIX}${LZ4_LIB_NAME_BASE}${LZ4_STATIC_LIB_SUFFIX}")
--endif()
--
--if(LZ4_ROOT)
--  find_library(LZ4_LIB
--               NAMES ${LZ4_LIB_NAMES}
--               PATHS ${LZ4_ROOT}
--               PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--               NO_DEFAULT_PATH)
--  find_path(LZ4_INCLUDE_DIR
--            NAMES lz4.h
--            PATHS ${LZ4_ROOT}
--            NO_DEFAULT_PATH
--            PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
--
--else()
--  find_package(PkgConfig QUIET)
--  pkg_check_modules(LZ4_PC liblz4)
--  if(LZ4_PC_FOUND)
--    set(LZ4_INCLUDE_DIR "${LZ4_PC_INCLUDEDIR}")
--
--    list(APPEND LZ4_PC_LIBRARY_DIRS "${LZ4_PC_LIBDIR}")
--    find_library(LZ4_LIB
--                 NAMES ${LZ4_LIB_NAMES}
--                 PATHS ${LZ4_PC_LIBRARY_DIRS}
--                 NO_DEFAULT_PATH
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
--  else()
--    find_library(LZ4_LIB
--                 NAMES ${LZ4_LIB_NAMES}
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
--    find_path(LZ4_INCLUDE_DIR
--              NAMES lz4.h
--              PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
--  endif()
--endif()
--
--find_package_handle_standard_args(Lz4 REQUIRED_VARS LZ4_LIB LZ4_INCLUDE_DIR)
--
--if(Lz4_FOUND)
--  set(Lz4_FOUND TRUE)
--  add_library(LZ4::lz4 UNKNOWN IMPORTED)
--  set_target_properties(LZ4::lz4
--                        PROPERTIES IMPORTED_LOCATION "${LZ4_LIB}"
--                                   INTERFACE_INCLUDE_DIRECTORIES 
"${LZ4_INCLUDE_DIR}")
--endif()
-diff --git a/cpp/cmake_modules/FindSnappy.cmake 
a/cpp/cmake_modules/FindSnappy.cmake
-deleted file mode 100644
-index 747df31..0000000
---- a/cpp/cmake_modules/FindSnappy.cmake
-+++ /dev/null
-@@ -1,62 +0,0 @@
--# 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.
--
--if(ARROW_SNAPPY_USE_SHARED)
--  set(SNAPPY_LIB_NAMES)
--  if(CMAKE_IMPORT_LIBRARY_SUFFIX)
--    list(APPEND SNAPPY_LIB_NAMES
--         "${CMAKE_IMPORT_LIBRARY_PREFIX}snappy${CMAKE_IMPORT_LIBRARY_SUFFIX}")
--  endif()
--  list(APPEND SNAPPY_LIB_NAMES
--       "${CMAKE_SHARED_LIBRARY_PREFIX}snappy${CMAKE_SHARED_LIBRARY_SUFFIX}")
--else()
--  set(SNAPPY_STATIC_LIB_NAME_BASE "snappy")
--  if(MSVC)
--    set(SNAPPY_STATIC_LIB_NAME_BASE
--        "${SNAPPY_STATIC_LIB_NAME_BASE}${SNAPPY_MSVC_STATIC_LIB_SUFFIX}")
--  endif()
--  set(SNAPPY_LIB_NAMES
--      
"${CMAKE_STATIC_LIBRARY_PREFIX}${SNAPPY_STATIC_LIB_NAME_BASE}${CMAKE_STATIC_LIBRARY_SUFFIX}"
--  )
--endif()
--
--if(Snappy_ROOT)
--  find_library(Snappy_LIB
--               NAMES ${SNAPPY_LIB_NAMES}
--               PATHS ${Snappy_ROOT}
--               PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--               NO_DEFAULT_PATH)
--  find_path(Snappy_INCLUDE_DIR
--            NAMES snappy.h
--            PATHS ${Snappy_ROOT}
--            NO_DEFAULT_PATH
--            PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
--else()
--  find_library(Snappy_LIB NAMES ${SNAPPY_LIB_NAMES})
--  find_path(Snappy_INCLUDE_DIR
--            NAMES snappy.h
--            PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
--endif()
--
--find_package_handle_standard_args(Snappy REQUIRED_VARS Snappy_LIB 
Snappy_INCLUDE_DIR)
--
--if(Snappy_FOUND)
--  add_library(Snappy::snappy UNKNOWN IMPORTED)
--  set_target_properties(Snappy::snappy
--                        PROPERTIES IMPORTED_LOCATION "${Snappy_LIB}"
--                                   INTERFACE_INCLUDE_DIRECTORIES 
"${Snappy_INCLUDE_DIR}")
--endif()
-diff --git a/cpp/cmake_modules/FindThrift.cmake 
b/cpp/cmake_modules/FindThrift.cmake
-index 750d8ce..e69de29 100644
---- a/cpp/cmake_modules/FindThrift.cmake
-+++ b/cpp/cmake_modules/FindThrift.cmake
-@@ -1,144 +0,0 @@
--# Copyright 2012 Cloudera Inc.
--#
--# Licensed 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.
--
--# - Find Thrift (a cross platform RPC lib/tool)
--#
--# Variables used by this module, they can change the default behaviour and 
need
--# to be set before calling find_package:
--#
--#  Thrift_ROOT - When set, this path is inspected instead of standard library
--#                locations as the root of the Thrift installation.
--#                The environment variable THRIFT_HOME overrides this variable.
--#
--# This module defines
--#  THRIFT_VERSION, version string of ant if found
--#  THRIFT_INCLUDE_DIR, where to find THRIFT headers
--#  THRIFT_LIB, THRIFT library
--#  THRIFT_FOUND, If false, do not try to use ant
--
--function(EXTRACT_THRIFT_VERSION)
--  if(THRIFT_INCLUDE_DIR)
--    file(READ "${THRIFT_INCLUDE_DIR}/thrift/config.h" THRIFT_CONFIG_H_CONTENT)
--    string(REGEX MATCH "#define PACKAGE_VERSION \"[0-9.]+\"" 
THRIFT_VERSION_DEFINITION
--                 "${THRIFT_CONFIG_H_CONTENT}")
--    string(REGEX MATCH "[0-9.]+" THRIFT_VERSION 
"${THRIFT_VERSION_DEFINITION}")
--    set(THRIFT_VERSION
--        "${THRIFT_VERSION}"
--        PARENT_SCOPE)
--  else()
--    set(THRIFT_VERSION
--        ""
--        PARENT_SCOPE)
--  endif()
--endfunction(EXTRACT_THRIFT_VERSION)
--
--if(MSVC_TOOLCHAIN AND NOT DEFINED THRIFT_MSVC_LIB_SUFFIX)
--  if(NOT ARROW_THRIFT_USE_SHARED)
--    if(ARROW_USE_STATIC_CRT)
--      set(THRIFT_MSVC_LIB_SUFFIX "mt")
--    else()
--      set(THRIFT_MSVC_LIB_SUFFIX "md")
--    endif()
--  endif()
--endif()
--set(THRIFT_LIB_NAME_BASE "thrift${THRIFT_MSVC_LIB_SUFFIX}")
--
--if(ARROW_THRIFT_USE_SHARED)
--  set(THRIFT_LIB_NAMES thrift)
--  if(CMAKE_IMPORT_LIBRARY_SUFFIX)
--    list(APPEND
--         THRIFT_LIB_NAMES
--         
"${CMAKE_IMPORT_LIBRARY_PREFIX}${THRIFT_LIB_NAME_BASE}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
--    )
--  endif()
--  list(APPEND
--       THRIFT_LIB_NAMES
--       
"${CMAKE_SHARED_LIBRARY_PREFIX}${THRIFT_LIB_NAME_BASE}${CMAKE_SHARED_LIBRARY_SUFFIX}"
--  )
--else()
--  set(THRIFT_LIB_NAMES
--      
"${CMAKE_STATIC_LIBRARY_PREFIX}${THRIFT_LIB_NAME_BASE}${CMAKE_STATIC_LIBRARY_SUFFIX}"
--  )
--endif()
--
--if(Thrift_ROOT)
--  find_library(THRIFT_LIB
--               NAMES ${THRIFT_LIB_NAMES}
--               PATHS ${Thrift_ROOT}
--               PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib")
--  find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h
--            PATHS ${Thrift_ROOT}
--            PATH_SUFFIXES "include")
--  find_program(THRIFT_COMPILER thrift
--               PATHS ${Thrift_ROOT}
--               PATH_SUFFIXES "bin")
--  extract_thrift_version()
--else()
--  # THRIFT-4760: The pkgconfig files are currently only installed when using 
autotools.
--  # Starting with 0.13, they are also installed for the CMake-based 
installations of Thrift.
--  find_package(PkgConfig QUIET)
--  pkg_check_modules(THRIFT_PC thrift)
--  if(THRIFT_PC_FOUND)
--    set(THRIFT_INCLUDE_DIR "${THRIFT_PC_INCLUDEDIR}")
--
--    list(APPEND THRIFT_PC_LIBRARY_DIRS "${THRIFT_PC_LIBDIR}")
--
--    find_library(THRIFT_LIB
--                 NAMES ${THRIFT_LIB_NAMES}
--                 PATHS ${THRIFT_PC_LIBRARY_DIRS}
--                 NO_DEFAULT_PATH)
--    find_program(THRIFT_COMPILER thrift
--                 HINTS ${THRIFT_PC_PREFIX}
--                 NO_DEFAULT_PATH
--                 PATH_SUFFIXES "bin")
--    set(THRIFT_VERSION ${THRIFT_PC_VERSION})
--  else()
--    find_library(THRIFT_LIB
--                 NAMES ${THRIFT_LIB_NAMES}
--                 PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}" "lib")
--    find_path(THRIFT_INCLUDE_DIR thrift/Thrift.h PATH_SUFFIXES "include")
--    find_program(THRIFT_COMPILER thrift PATH_SUFFIXES "bin")
--    extract_thrift_version()
--  endif()
--endif()
--
--if(THRIFT_COMPILER)
--  set(Thrift_COMPILER_FOUND TRUE)
--else()
--  set(Thrift_COMPILER_FOUND FALSE)
--endif()
--
--find_package_handle_standard_args(
--  Thrift
--  REQUIRED_VARS THRIFT_LIB THRIFT_INCLUDE_DIR
--  VERSION_VAR THRIFT_VERSION
--  HANDLE_COMPONENTS)
--
--if(Thrift_FOUND OR THRIFT_FOUND)
--  set(Thrift_FOUND TRUE)
--  if(ARROW_THRIFT_USE_SHARED)
--    add_library(thrift::thrift SHARED IMPORTED)
--  else()
--    add_library(thrift::thrift STATIC IMPORTED)
--  endif()
--  set_target_properties(thrift::thrift
--                        PROPERTIES IMPORTED_LOCATION "${THRIFT_LIB}"
--                                   INTERFACE_INCLUDE_DIRECTORIES 
"${THRIFT_INCLUDE_DIR}")
--  if(WIN32 AND NOT MSVC_TOOLCHAIN)
--    # We don't need this for Visual C++ because Thrift uses
--    # "#pragma comment(lib, "Ws2_32.lib")" in
--    # thrift/windows/config.h for Visual C++.
--    set_target_properties(thrift::thrift PROPERTIES INTERFACE_LINK_LIBRARIES 
"ws2_32")
--  endif()
--endif()
-diff --git a/cpp/cmake_modules/Findjemalloc.cmake 
a/cpp/cmake_modules/Findjemalloc.cmake
-deleted file mode 100644
-index 84bb81f..0000000
---- a/cpp/cmake_modules/Findjemalloc.cmake
-+++ /dev/null
-@@ -1,94 +0,0 @@
--#
--# Licensed 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.
--#
--# Tries to find jemalloc headers and libraries.
--#
--# Usage of this module as follows:
--#
--#  find_package(jemalloc)
--#
--# Variables used by this module, they can change the default behaviour and 
need
--# to be set before calling find_package:
--#
--#  JEMALLOC_HOME -
--#   When set, this path is inspected instead of standard library locations as
--#   the root of the jemalloc installation.  The environment variable
--#   JEMALLOC_HOME overrides this veriable.
--#
--# This module defines
--#  JEMALLOC_INCLUDE_DIR, directory containing headers
--#  JEMALLOC_SHARED_LIB, path to libjemalloc.so/dylib
--#  JEMALLOC_FOUND, whether flatbuffers has been found
--
--if(NOT "${JEMALLOC_HOME}" STREQUAL "")
--  file(TO_CMAKE_PATH "${JEMALLOC_HOME}" _native_path)
--  list(APPEND _jemalloc_roots ${_native_path})
--elseif(JEMALLOC_HOME)
--  list(APPEND _jemalloc_roots ${JEMALLOC_HOME})
--endif()
--
--set(LIBJEMALLOC_NAMES jemalloc libjemalloc.so.1 libjemalloc.so.2 
libjemalloc.dylib)
--
--# Try the parameterized roots, if they exist
--if(_jemalloc_roots)
--  find_path(JEMALLOC_INCLUDE_DIR
--            NAMES jemalloc/jemalloc.h
--            PATHS ${_jemalloc_roots}
--            NO_DEFAULT_PATH
--            PATH_SUFFIXES "include")
--  find_library(JEMALLOC_SHARED_LIB
--               NAMES ${LIBJEMALLOC_NAMES}
--               PATHS ${_jemalloc_roots}
--               NO_DEFAULT_PATH
--               PATH_SUFFIXES "lib")
--  find_library(JEMALLOC_STATIC_LIB
--               NAMES jemalloc_pic
--               PATHS ${_jemalloc_roots}
--               NO_DEFAULT_PATH
--               PATH_SUFFIXES "lib")
--else()
--  find_path(JEMALLOC_INCLUDE_DIR NAMES jemalloc/jemalloc.h)
--  message(STATUS ${JEMALLOC_INCLUDE_DIR})
--  find_library(JEMALLOC_SHARED_LIB NAMES ${LIBJEMALLOC_NAMES})
--  message(STATUS ${JEMALLOC_SHARED_LIB})
--  find_library(JEMALLOC_STATIC_LIB NAMES jemalloc_pic)
--  message(STATUS ${JEMALLOC_STATIC_LIB})
--endif()
--
--if(JEMALLOC_INCLUDE_DIR AND JEMALLOC_SHARED_LIB)
--  set(JEMALLOC_FOUND TRUE)
--else()
--  set(JEMALLOC_FOUND FALSE)
--endif()
--
--if(JEMALLOC_FOUND)
--  if(NOT jemalloc_FIND_QUIETLY)
--    message(STATUS "Found the jemalloc library: ${JEMALLOC_LIBRARIES}")
--  endif()
--else()
--  if(NOT jemalloc_FIND_QUIETLY)
--    set(JEMALLOC_ERR_MSG "Could not find the jemalloc library. Looked in ")
--    if(_flatbuffers_roots)
--      set(JEMALLOC_ERR_MSG "${JEMALLOC_ERR_MSG} in ${_jemalloc_roots}.")
--    else()
--      set(JEMALLOC_ERR_MSG "${JEMALLOC_ERR_MSG} system search paths.")
--    endif()
--    if(jemalloc_FIND_REQUIRED)
--      message(FATAL_ERROR "${JEMALLOC_ERR_MSG}")
--    else(jemalloc_FIND_REQUIRED)
--      message(STATUS "${JEMALLOC_ERR_MSG}")
--    endif(jemalloc_FIND_REQUIRED)
--  endif()
--endif()
--
--mark_as_advanced(JEMALLOC_INCLUDE_DIR JEMALLOC_SHARED_LIB)
-diff --git a/cpp/cmake_modules/Findzstd.cmake 
a/cpp/cmake_modules/Findzstd.cmake
-deleted file mode 100644
-index 3fc14ec..0000000
---- a/cpp/cmake_modules/Findzstd.cmake
-+++ /dev/null
-@@ -1,89 +0,0 @@
--# 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.
--
--if(MSVC AND NOT DEFINED ZSTD_MSVC_LIB_PREFIX)
--  set(ZSTD_MSVC_LIB_PREFIX "lib")
--endif()
--set(ZSTD_LIB_NAME_BASE "${ZSTD_MSVC_LIB_PREFIX}zstd")
--
--if(ARROW_ZSTD_USE_SHARED)
--  set(ZSTD_LIB_NAMES)
--  if(CMAKE_IMPORT_LIBRARY_SUFFIX)
--    list(APPEND
--         ZSTD_LIB_NAMES
--         
"${CMAKE_IMPORT_LIBRARY_PREFIX}${ZSTD_LIB_NAME_BASE}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
--    )
--  endif()
--  list(APPEND ZSTD_LIB_NAMES
--       
"${CMAKE_SHARED_LIBRARY_PREFIX}${ZSTD_LIB_NAME_BASE}${CMAKE_SHARED_LIBRARY_SUFFIX}"
--  )
--else()
--  if(MSVC AND NOT DEFINED ZSTD_MSVC_STATIC_LIB_SUFFIX)
--    set(ZSTD_MSVC_STATIC_LIB_SUFFIX "_static")
--  endif()
--  set(ZSTD_STATIC_LIB_SUFFIX
--      "${ZSTD_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
--  set(ZSTD_LIB_NAMES
--      
"${CMAKE_STATIC_LIBRARY_PREFIX}${ZSTD_LIB_NAME_BASE}${ZSTD_STATIC_LIB_SUFFIX}")
--endif()
--
--# First, find via if specified ZSTD_ROOT
--if(ZSTD_ROOT)
--  message(STATUS "Using ZSTD_ROOT: ${ZSTD_ROOT}")
--  find_library(ZSTD_LIB
--               NAMES ${ZSTD_LIB_NAMES}
--               PATHS ${ZSTD_ROOT}
--               PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES}
--               NO_DEFAULT_PATH)
--  find_path(ZSTD_INCLUDE_DIR
--            NAMES zstd.h
--            PATHS ${ZSTD_ROOT}
--            NO_DEFAULT_PATH
--            PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
--
--else()
--  # Second, find via pkg_check_modules
--  find_package(PkgConfig QUIET)
--  pkg_check_modules(ZSTD_PC libzstd)
--  if(ZSTD_PC_FOUND)
--    set(ZSTD_INCLUDE_DIR "${ZSTD_PC_INCLUDEDIR}")
--
--    list(APPEND ZSTD_PC_LIBRARY_DIRS "${ZSTD_PC_LIBDIR}")
--    find_library(ZSTD_LIB
--                 NAMES ${ZSTD_LIB_NAMES}
--                 PATHS ${ZSTD_PC_LIBRARY_DIRS}
--                 NO_DEFAULT_PATH
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
--  else()
--    # Third, check all other CMake paths
--    find_library(ZSTD_LIB
--                 NAMES ${ZSTD_LIB_NAMES}
--                 PATH_SUFFIXES ${ARROW_LIBRARY_PATH_SUFFIXES})
--    find_path(ZSTD_INCLUDE_DIR
--              NAMES zstd.h
--              PATH_SUFFIXES ${ARROW_INCLUDE_PATH_SUFFIXES})
--  endif()
--endif()
--
--find_package_handle_standard_args(zstd REQUIRED_VARS ZSTD_LIB 
ZSTD_INCLUDE_DIR)
--
--if(zstd_FOUND)
--  add_library(zstd::libzstd UNKNOWN IMPORTED)
--  set_target_properties(zstd::libzstd
--                        PROPERTIES IMPORTED_LOCATION "${ZSTD_LIB}"
--                                   INTERFACE_INCLUDE_DIRECTORIES 
"${ZSTD_INCLUDE_DIR}")
--endif()
diff --git a/ci/conan/all/patches/7.0.0-0005-use-find-package.patch 
b/ci/conan/all/patches/7.0.0-0005-use-find-package.patch
index 085871aaea..0759339c23 100644
--- a/ci/conan/all/patches/7.0.0-0005-use-find-package.patch
+++ b/ci/conan/all/patches/7.0.0-0005-use-find-package.patch
@@ -45,7 +45,7 @@ index 2d7baf1..c2e86e0 100644
  
  if(ARROW_MIMALLOC)
 diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
-index bc38952..ff81d00 100644
+index bc38952..84fc279 100644
 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
 +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
 @@ -953,14 +953,7 @@ else()
@@ -90,7 +90,23 @@ index bc38952..ff81d00 100644
    # TODO: Don't use global includes but rather target_include_directories
    get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon
                        INTERFACE_INCLUDE_DIRECTORIES)
-@@ -1228,10 +1224,13 @@ macro(build_glog)
+@@ -1156,6 +1152,15 @@ if(PARQUET_REQUIRE_ENCRYPTION
+     set(OpenSSL_USE_STATIC_LIBS ON)
+     set(OPENSSL_USE_STATIC_LIBS ON)
+     find_package(OpenSSL ${ARROW_OPENSSL_REQUIRED_VERSION} REQUIRED)
++    find_package(OpenSSL REQUIRED CONFIG)
++    message("OPENSSL_FOUND: ${OPENSSL_FOUND}")
++    message("OPENSSL_INCLUDE_DIR: ${OPENSSL_INCLUDE_DIR}")
++    message("OPENSSL_CRYPTO_LIBRARY: ${OPENSSL_CRYPTO_LIBRARY}")
++    message("OPENSSL_CRYPTO_LIBRARIES: ${OPENSSL_CRYPTO_LIBRARIES}")
++    message("OPENSSL_SSL_LIBRARY: ${OPENSSL_SSL_LIBRARY}")
++    message("OPENSSL_SSL_LIBRARIES: ${OPENSSL_SSL_LIBRARIES}")
++    message("OPENSSL_LIBRARIES: ${OPENSSL_LIBRARIES}")
++    message("OPENSSL_VERSION: ${OPENSSL_VERSION}")
+   endif()
+   set(ARROW_USE_OPENSSL ON)
+ endif()
+@@ -1228,10 +1233,13 @@ macro(build_glog)
  endmacro()
  
  if(ARROW_USE_GLOG)
@@ -104,7 +120,7 @@ index bc38952..ff81d00 100644
  endif()
  
  # ----------------------------------------------------------------------
-@@ -1300,14 +1299,7 @@ macro(build_gflags)
+@@ -1300,17 +1308,11 @@ macro(build_gflags)
  endmacro()
  
  if(ARROW_NEED_GFLAGS)
@@ -120,7 +136,22 @@ index bc38952..ff81d00 100644
    # TODO: Don't use global includes but rather target_include_directories
    include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR})
  
-@@ -1400,6 +1392,7 @@ macro(build_thrift)
++if(0)
+   if(NOT TARGET ${GFLAGS_LIBRARIES})
+     if(TARGET gflags-shared)
+       set(GFLAGS_LIBRARIES gflags-shared)
+@@ -1318,6 +1320,10 @@ if(ARROW_NEED_GFLAGS)
+       set(GFLAGS_LIBRARIES gflags_shared)
+     endif()
+   endif()
++else()
++  set(GFLAGS_LIBRARIES gflags::gflags)
++endif()
++
+ endif()
+ 
+ # ----------------------------------------------------------------------
+@@ -1400,6 +1406,7 @@ macro(build_thrift)
  endmacro()
  
  if(ARROW_WITH_THRIFT)
@@ -128,7 +159,7 @@ index bc38952..ff81d00 100644
    # We already may have looked for Thrift earlier, when considering whether
    # to build Boost, so don't look again if already found.
    if(NOT Thrift_FOUND)
-@@ -1412,6 +1405,9 @@ if(ARROW_WITH_THRIFT)
+@@ -1412,6 +1419,9 @@ if(ARROW_WITH_THRIFT)
    endif()
    # TODO: Don't use global includes but rather target_include_directories
    include_directories(SYSTEM ${THRIFT_INCLUDE_DIR})
@@ -138,7 +169,7 @@ index bc38952..ff81d00 100644
  
    string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION})
    list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR)
-@@ -1606,7 +1602,7 @@ if(ARROW_JEMALLOC)
+@@ -1606,7 +1616,7 @@ if(ARROW_JEMALLOC)
    # conflict with the default allocator as well as other jemalloc
    # installations.
    # find_package(jemalloc)
@@ -147,7 +178,7 @@ index bc38952..ff81d00 100644
    set(ARROW_JEMALLOC_USE_SHARED OFF)
    set(JEMALLOC_PREFIX
        "${CMAKE_CURRENT_BINARY_DIR}/jemalloc_ep-prefix/src/jemalloc_ep/dist/")
-@@ -1664,6 +1660,9 @@ if(ARROW_JEMALLOC)
+@@ -1664,6 +1674,9 @@ if(ARROW_JEMALLOC)
                                     
"${CMAKE_CURRENT_BINARY_DIR}/jemalloc_ep-prefix/src")
    add_dependencies(jemalloc::jemalloc jemalloc_ep)
  
@@ -157,7 +188,7 @@ index bc38952..ff81d00 100644
    list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc)
  endif()
  
-@@ -1671,6 +1670,8 @@ endif()
+@@ -1671,6 +1684,8 @@ endif()
  # mimalloc - Cross-platform high-performance allocator, from Microsoft
  
  if(ARROW_MIMALLOC)
@@ -166,7 +197,7 @@ index bc38952..ff81d00 100644
    message(STATUS "Building (vendored) mimalloc from source")
    # We only use a vendored mimalloc as we want to control its build options.
  
-@@ -1715,6 +1716,13 @@ if(ARROW_MIMALLOC)
+@@ -1715,6 +1730,13 @@ if(ARROW_MIMALLOC)
    add_dependencies(mimalloc::mimalloc mimalloc_ep)
    add_dependencies(toolchain mimalloc_ep)
  
@@ -180,7 +211,26 @@ index bc38952..ff81d00 100644
    list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc)
  endif()
  
-@@ -2036,10 +2044,21 @@ macro(build_xsimd)
+@@ -1999,6 +2021,7 @@ macro(build_rapidjson)
+ endmacro()
+ 
+ if(ARROW_WITH_RAPIDJSON)
++if(0)
+   set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0")
+   resolve_dependency(RapidJSON
+                      HAVE_ALT
+@@ -2011,6 +2034,10 @@ if(ARROW_WITH_RAPIDJSON)
+   if(RapidJSON_INCLUDE_DIR)
+     set(RAPIDJSON_INCLUDE_DIR "${RapidJSON_INCLUDE_DIR}")
+   endif()
++else()
++  find_package(RapidJSON REQUIRED)
++  set(RAPIDJSON_INCLUDE_DIR "${RapidJSON_INCLUDE_DIR}")
++endif()
+ 
+   # TODO: Don't use global includes but rather target_include_directories
+   include_directories(SYSTEM ${RAPIDJSON_INCLUDE_DIR})
+@@ -2036,10 +2063,21 @@ macro(build_xsimd)
    set(XSIMD_VENDORED TRUE)
  endmacro()
  
@@ -204,7 +254,7 @@ index bc38952..ff81d00 100644
    # TODO: Don't use global includes but rather target_include_directories
    include_directories(SYSTEM ${XSIMD_INCLUDE_DIR})
  endif()
-@@ -2082,11 +2101,14 @@ macro(build_zlib)
+@@ -2082,11 +2120,14 @@ macro(build_zlib)
  endmacro()
  
  if(ARROW_WITH_ZLIB)
@@ -219,7 +269,7 @@ index bc38952..ff81d00 100644
  endif()
  
  macro(build_lz4)
-@@ -2140,11 +2162,14 @@ macro(build_lz4)
+@@ -2140,11 +2181,14 @@ macro(build_lz4)
  endmacro()
  
  if(ARROW_WITH_LZ4)
@@ -234,7 +284,7 @@ index bc38952..ff81d00 100644
  endif()
  
  macro(build_zstd)
-@@ -2205,6 +2230,7 @@ macro(build_zstd)
+@@ -2205,6 +2249,7 @@ macro(build_zstd)
  endmacro()
  
  if(ARROW_WITH_ZSTD)
@@ -242,7 +292,7 @@ index bc38952..ff81d00 100644
    # ARROW-13384: ZSTD_minCLevel was added in v1.4.0, required by ARROW-13091
    resolve_dependency(zstd
                       PC_PACKAGE_NAMES
-@@ -2232,6 +2258,8 @@ if(ARROW_WITH_ZSTD)
+@@ -2232,6 +2277,8 @@ if(ARROW_WITH_ZSTD)
    get_target_property(ZSTD_INCLUDE_DIR ${ARROW_ZSTD_LIBZSTD}
                        INTERFACE_INCLUDE_DIRECTORIES)
    include_directories(SYSTEM ${ZSTD_INCLUDE_DIR})
@@ -251,7 +301,7 @@ index bc38952..ff81d00 100644
  endif()
  
  # ----------------------------------------------------------------------
-@@ -2271,6 +2299,7 @@ macro(build_re2)
+@@ -2271,6 +2318,7 @@ macro(build_re2)
  endmacro()
  
  if(ARROW_WITH_RE2)
@@ -259,7 +309,7 @@ index bc38952..ff81d00 100644
    # Don't specify "PC_PACKAGE_NAMES re2" here because re2.pc may
    # include -std=c++11. It's not compatible with C source and C++
    # source not uses C++ 11.
-@@ -2284,6 +2313,8 @@ if(ARROW_WITH_RE2)
+@@ -2284,6 +2332,8 @@ if(ARROW_WITH_RE2)
    # TODO: Don't use global includes but rather target_include_directories
    get_target_property(RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES)
    include_directories(SYSTEM ${RE2_INCLUDE_DIR})
@@ -268,7 +318,7 @@ index bc38952..ff81d00 100644
  endif()
  
  macro(build_bzip2)
-@@ -2335,10 +2366,7 @@ macro(build_bzip2)
+@@ -2335,10 +2385,7 @@ macro(build_bzip2)
  endmacro()
  
  if(ARROW_WITH_BZ2)
@@ -280,7 +330,7 @@ index bc38952..ff81d00 100644
  
    if(NOT TARGET BZip2::BZip2)
      add_library(BZip2::BZip2 UNKNOWN IMPORTED)
-@@ -2390,11 +2418,7 @@ macro(build_utf8proc)
+@@ -2390,11 +2437,7 @@ macro(build_utf8proc)
  endmacro()
  
  if(ARROW_WITH_UTF8PROC)
@@ -293,7 +343,7 @@ index bc38952..ff81d00 100644
  
    add_definitions(-DARROW_WITH_UTF8PROC)
  
-@@ -3554,33 +3578,12 @@ if(ARROW_WITH_GRPC)
+@@ -3554,33 +3597,12 @@ if(ARROW_WITH_GRPC)
      message(STATUS "Forcing gRPC_SOURCE to Protobuf_SOURCE 
(${Protobuf_SOURCE})")
      set(gRPC_SOURCE "${Protobuf_SOURCE}")
    endif()
@@ -328,6 +378,35 @@ index bc38952..ff81d00 100644
  endif()
  
  # ----------------------------------------------------------------------
+@@ -3770,7 +3792,12 @@ macro(build_google_cloud_cpp_storage)
+ endmacro()
+ 
+ if(ARROW_WITH_GOOGLE_CLOUD_CPP)
++if(0)
+   resolve_dependency(google_cloud_cpp_storage)
++else()
++  find_package(google-cloud-cpp REQUIRED)
++endif()
++
+   get_target_property(google_cloud_cpp_storage_INCLUDE_DIR 
google-cloud-cpp::storage
+                       INTERFACE_INCLUDE_DIRECTORIES)
+   include_directories(SYSTEM ${google_cloud_cpp_storage_INCLUDE_DIR})
+@@ -4097,11 +4124,15 @@ macro(build_opentelemetry)
+ endmacro()
+ 
+ if(ARROW_WITH_OPENTELEMETRY)
++if(0)
+   set(opentelemetry-cpp_SOURCE "AUTO")
+   resolve_dependency(opentelemetry-cpp)
+   get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::api
+                       INTERFACE_INCLUDE_DIRECTORIES)
+   include_directories(SYSTEM ${OPENTELEMETRY_INCLUDE_DIR})
++else()
++  find_package(opentelemetry-cpp REQUIRED)
++endif()
+   message(STATUS "Found OpenTelemetry headers: ${OPENTELEMETRY_INCLUDE_DIR}")
+ endif()
+ 
 diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
 index 84975e2..7779c08 100644
 --- a/cpp/src/arrow/CMakeLists.txt
diff --git a/ci/conan/all/patches/7.0.0-0006-install-utils.patch 
b/ci/conan/all/patches/7.0.0-0006-install-utils.patch
new file mode 100644
index 0000000000..7674174c8e
--- /dev/null
+++ b/ci/conan/all/patches/7.0.0-0006-install-utils.patch
@@ -0,0 +1,39 @@
+MIT License
+
+Copyright (c) 2019 Conan.io
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+diff --git a/cpp/src/arrow/ipc/CMakeLists.txt 
b/cpp/src/arrow/ipc/CMakeLists.txt
+index 495018e..f6cee6f 100644
+--- a/cpp/src/arrow/ipc/CMakeLists.txt
++++ b/cpp/src/arrow/ipc/CMakeLists.txt
+@@ -61,8 +61,12 @@ endif()
+ if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION)
+   add_executable(arrow-file-to-stream file_to_stream.cc)
+   target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB})
++  install(TARGETS arrow-file-to-stream ${INSTALL_IS_OPTIONAL}
++    DESTINATION ${CMAKE_INSTALL_BINDIR})
+   add_executable(arrow-stream-to-file stream_to_file.cc)
+   target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB})
++  install(TARGETS arrow-stream-to-file ${INSTALL_IS_OPTIONAL}
++    DESTINATION ${CMAKE_INSTALL_BINDIR})
+ 
+   if(ARROW_BUILD_INTEGRATION)
+     add_dependencies(arrow-integration arrow-file-to-stream)
diff --git a/ci/conan/all/patches/8.0.0-0001-cmake.patch 
b/ci/conan/all/patches/8.0.0-0001-cmake.patch
new file mode 100644
index 0000000000..9e67f4a191
--- /dev/null
+++ b/ci/conan/all/patches/8.0.0-0001-cmake.patch
@@ -0,0 +1,35 @@
+MIT License
+
+Copyright (c) 2019 Conan.io
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+diff --git a/cpp/cmake_modules/DefineOptions.cmake 
b/cpp/cmake_modules/DefineOptions.cmake
+index ab7d2ed..6f1e411 100644
+--- a/cpp/cmake_modules/DefineOptions.cmake
++++ b/cpp/cmake_modules/DefineOptions.cmake
+@@ -82,7 +82,7 @@ macro(define_option_string name description default)
+ endmacro()
+ 
+ # Top level cmake dir
+-if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
++if(1)
+   #----------------------------------------------------------------------
+   set_option_category("Compile and link")
+ 
diff --git a/ci/conan/all/patches/8.0.0-0002-jemalloc.patch 
b/ci/conan/all/patches/8.0.0-0002-jemalloc.patch
new file mode 100644
index 0000000000..99b92e3308
--- /dev/null
+++ b/ci/conan/all/patches/8.0.0-0002-jemalloc.patch
@@ -0,0 +1,48 @@
+MIT License
+
+Copyright (c) 2019 Conan.io
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
+index 690c51a..c518b7d 100644
+--- a/cpp/src/arrow/CMakeLists.txt
++++ b/cpp/src/arrow/CMakeLists.txt
+@@ -326,7 +326,7 @@ set(ARROW_TESTING_SRCS
+ 
+ set(_allocator_dependencies "") # Empty list
+ if(ARROW_JEMALLOC)
+-  list(APPEND _allocator_dependencies jemalloc_ep)
++  list(APPEND _allocator_dependencies jemalloc::jemalloc)
+ endif()
+ if(ARROW_MIMALLOC)
+   list(APPEND _allocator_dependencies mimalloc_ep)
+diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc
+index 2fab6f3..1f8f896 100644
+--- a/cpp/src/arrow/memory_pool.cc
++++ b/cpp/src/arrow/memory_pool.cc
+@@ -52,7 +52,7 @@
+ // Needed to support jemalloc 3 and 4
+ #define JEMALLOC_MANGLE
+ // Explicitly link to our version of jemalloc
+-#include "jemalloc_ep/dist/include/jemalloc/jemalloc.h"
++#include "jemalloc/jemalloc.h"
+ #endif
+ 
+ #ifdef ARROW_MIMALLOC
diff --git a/ci/conan/all/patches/8.0.0-0003-mallctl-takes-size_t.patch 
b/ci/conan/all/patches/8.0.0-0003-mallctl-takes-size_t.patch
new file mode 100644
index 0000000000..d9f2189041
--- /dev/null
+++ b/ci/conan/all/patches/8.0.0-0003-mallctl-takes-size_t.patch
@@ -0,0 +1,35 @@
+MIT License
+
+Copyright (c) 2019 Conan.io
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+diff --git a/cpp/src/arrow/memory_pool.cc b/cpp/src/arrow/memory_pool.cc
+index 1f8f896..37a89da 100644
+--- a/cpp/src/arrow/memory_pool.cc
++++ b/cpp/src/arrow/memory_pool.cc
+@@ -767,7 +767,7 @@ MemoryPool* default_memory_pool() {
+ 
+ Status jemalloc_set_decay_ms(int ms) {
+ #ifdef ARROW_JEMALLOC
+-  ssize_t decay_time_ms = static_cast<ssize_t>(ms);
++  size_t decay_time_ms = static_cast<ssize_t>(ms);
+ 
+   int err = mallctl("arenas.dirty_decay_ms", nullptr, nullptr, &decay_time_ms,
+                     sizeof(decay_time_ms));
diff --git a/ci/conan/all/patches/7.0.0-0005-use-find-package.patch 
b/ci/conan/all/patches/8.0.0-0004-use-find-package.patch
similarity index 53%
copy from ci/conan/all/patches/7.0.0-0005-use-find-package.patch
copy to ci/conan/all/patches/8.0.0-0004-use-find-package.patch
index 085871aaea..e7bc2320c7 100644
--- a/ci/conan/all/patches/7.0.0-0005-use-find-package.patch
+++ b/ci/conan/all/patches/8.0.0-0004-use-find-package.patch
@@ -21,10 +21,10 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
OTHER DEALINGS IN THE
 SOFTWARE.
 
 diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
-index 2d7baf1..c2e86e0 100644
+index aba18c8..bb463d0 100644
 --- a/cpp/CMakeLists.txt
 +++ b/cpp/CMakeLists.txt
-@@ -715,7 +715,7 @@ if(ARROW_WITH_BZ2)
+@@ -721,7 +721,7 @@ if(ARROW_WITH_BZ2)
  endif()
  
  if(ARROW_WITH_LZ4)
@@ -33,7 +33,7 @@ index 2d7baf1..c2e86e0 100644
    if(Lz4_SOURCE STREQUAL "SYSTEM")
      list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4)
    endif()
-@@ -901,8 +901,8 @@ endif()
+@@ -907,8 +907,8 @@ endif()
  if(ARROW_JEMALLOC)
    add_definitions(-DARROW_JEMALLOC)
    add_definitions(-DARROW_JEMALLOC_INCLUDE_DIR=${JEMALLOC_INCLUDE_DIR})
@@ -45,43 +45,46 @@ index 2d7baf1..c2e86e0 100644
  
  if(ARROW_MIMALLOC)
 diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
-index bc38952..ff81d00 100644
+index f070323..2e2a03b 100644
 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
 +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
-@@ -953,14 +953,7 @@ else()
+@@ -974,6 +974,7 @@ else()
  endif()
  
  if(ARROW_BOOST_REQUIRED)
--  resolve_dependency(Boost
--                     HAVE_ALT
--                     TRUE
--                     REQUIRED_VERSION
--                     ${ARROW_BOOST_REQUIRED_VERSION}
--                     IS_RUNTIME_DEPENDENCY
--                     # libarrow.so doesn't depend on libboost*.
--                     FALSE)
-+  find_package(Boost CONFIG REQUIRED)
++if(0)
+   resolve_dependency(Boost
+                      HAVE_ALT
+                      TRUE
+@@ -982,6 +983,9 @@ if(ARROW_BOOST_REQUIRED)
+                      IS_RUNTIME_DEPENDENCY
+                      # libarrow.so doesn't depend on libboost*.
+                      FALSE)
++else()
++  find_package(Boost REQUIRED CONFIG)
++endif()
  
    if(TARGET Boost::system)
      set(BOOST_SYSTEM_LIBRARY Boost::system)
-@@ -1038,6 +1031,7 @@ macro(build_snappy)
+@@ -1059,6 +1063,7 @@ macro(build_snappy)
  endmacro()
  
  if(ARROW_WITH_SNAPPY)
-+  if(0)
++if(0)
    resolve_dependency(Snappy PC_PACKAGE_NAMES snappy)
    if(${Snappy_SOURCE} STREQUAL "SYSTEM" AND NOT snappy_PC_FOUND)
      get_target_property(SNAPPY_LIB Snappy::snappy IMPORTED_LOCATION)
-@@ -1046,6 +1040,8 @@ if(ARROW_WITH_SNAPPY)
+@@ -1067,6 +1072,9 @@ if(ARROW_WITH_SNAPPY)
    # TODO: Don't use global includes but rather target_include_directories
    get_target_property(SNAPPY_INCLUDE_DIRS Snappy::snappy 
INTERFACE_INCLUDE_DIRECTORIES)
    include_directories(SYSTEM ${SNAPPY_INCLUDE_DIRS})
-+  endif()
++else()
 +  find_package(Snappy REQUIRED)
++endif()
  endif()
  
  # ----------------------------------------------------------------------
-@@ -1108,7 +1104,7 @@ macro(build_brotli)
+@@ -1129,7 +1137,7 @@ macro(build_brotli)
  endmacro()
  
  if(ARROW_WITH_BROTLI)
@@ -90,249 +93,293 @@ index bc38952..ff81d00 100644
    # TODO: Don't use global includes but rather target_include_directories
    get_target_property(BROTLI_INCLUDE_DIR Brotli::brotlicommon
                        INTERFACE_INCLUDE_DIRECTORIES)
-@@ -1228,10 +1224,13 @@ macro(build_glog)
+@@ -1169,8 +1177,16 @@ if(PARQUET_REQUIRE_ENCRYPTION
+     set(BUILD_SHARED_LIBS_KEEP ${BUILD_SHARED_LIBS})
+     set(BUILD_SHARED_LIBS ON)
+ 
+-    find_package(OpenSSL ${ARROW_OPENSSL_REQUIRED_VERSION} REQUIRED)
+-    set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_KEEP})
++    find_package(OpenSSL REQUIRED CONFIG)
++    message("OPENSSL_FOUND: ${OPENSSL_FOUND}")
++    message("OPENSSL_INCLUDE_DIR: ${OPENSSL_INCLUDE_DIR}")
++    message("OPENSSL_CRYPTO_LIBRARY: ${OPENSSL_CRYPTO_LIBRARY}")
++    message("OPENSSL_CRYPTO_LIBRARIES: ${OPENSSL_CRYPTO_LIBRARIES}")
++    message("OPENSSL_SSL_LIBRARY: ${OPENSSL_SSL_LIBRARY}")
++    message("OPENSSL_SSL_LIBRARIES: ${OPENSSL_SSL_LIBRARIES}")
++    message("OPENSSL_LIBRARIES: ${OPENSSL_LIBRARIES}")
++    message("OPENSSL_VERSION: ${OPENSSL_VERSION}")
++        set(BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS_KEEP})
+     unset(BUILD_SHARED_LIBS_KEEP)
+   else()
+     # Find static OpenSSL headers and libs
+@@ -1249,10 +1265,14 @@ macro(build_glog)
  endmacro()
  
  if(ARROW_USE_GLOG)
-+  if(0)
++if(0)
    resolve_dependency(GLOG PC_PACKAGE_NAMES libglog)
    # TODO: Don't use global includes but rather target_include_directories
    get_target_property(GLOG_INCLUDE_DIR glog::glog 
INTERFACE_INCLUDE_DIRECTORIES)
    include_directories(SYSTEM ${GLOG_INCLUDE_DIR})
-+  endif()
++else()
 +  find_package(glog REQUIRED)
++endif()
  endif()
  
  # ----------------------------------------------------------------------
-@@ -1300,14 +1299,7 @@ macro(build_gflags)
+@@ -1321,6 +1341,7 @@ macro(build_gflags)
  endmacro()
  
  if(ARROW_NEED_GFLAGS)
--  set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0")
--  resolve_dependency(gflags
--                     HAVE_ALT
--                     TRUE
--                     REQUIRED_VERSION
--                     ${ARROW_GFLAGS_REQUIRED_VERSION}
--                     IS_RUNTIME_DEPENDENCY
--                     FALSE)
-+  find_package(gflags REQUIRED)
-   # TODO: Don't use global includes but rather target_include_directories
-   include_directories(SYSTEM ${GFLAGS_INCLUDE_DIR})
- 
-@@ -1400,6 +1392,7 @@ macro(build_thrift)
- endmacro()
- 
- if(ARROW_WITH_THRIFT)
-+if (0)
-   # We already may have looked for Thrift earlier, when considering whether
-   # to build Boost, so don't look again if already found.
-   if(NOT Thrift_FOUND)
-@@ -1412,6 +1405,9 @@ if(ARROW_WITH_THRIFT)
++if(0)
+   set(ARROW_GFLAGS_REQUIRED_VERSION "2.1.0")
+   resolve_dependency(gflags
+                      HAVE_ALT
+@@ -1339,6 +1360,10 @@ if(ARROW_NEED_GFLAGS)
+       set(GFLAGS_LIBRARIES gflags_shared)
+     endif()
    endif()
-   # TODO: Don't use global includes but rather target_include_directories
-   include_directories(SYSTEM ${THRIFT_INCLUDE_DIR})
 +else()
-+  find_package(Thrift REQUIRED CONFIG)
++  find_package(gflags REQUIRED)
++  set(GFLAGS_LIBRARIES gflags::gflags)
 +endif()
+ endif()
  
-   string(REPLACE "." ";" VERSION_LIST ${THRIFT_VERSION})
-   list(GET VERSION_LIST 0 THRIFT_VERSION_MAJOR)
-@@ -1606,7 +1602,7 @@ if(ARROW_JEMALLOC)
-   # conflict with the default allocator as well as other jemalloc
+ # ----------------------------------------------------------------------
+@@ -1718,6 +1756,7 @@ if(ARROW_JEMALLOC)
    # installations.
    # find_package(jemalloc)
--
-+  if (0)
+ 
++if(0)
    set(ARROW_JEMALLOC_USE_SHARED OFF)
    set(JEMALLOC_PREFIX
        "${CMAKE_CURRENT_BINARY_DIR}/jemalloc_ep-prefix/src/jemalloc_ep/dist/")
-@@ -1664,6 +1660,9 @@ if(ARROW_JEMALLOC)
+@@ -1778,6 +1817,9 @@ if(ARROW_JEMALLOC)
+                                    INTERFACE_INCLUDE_DIRECTORIES
                                     
"${CMAKE_CURRENT_BINARY_DIR}/jemalloc_ep-prefix/src")
    add_dependencies(jemalloc::jemalloc jemalloc_ep)
- 
-+  endif()
++else()
 +  find_package(jemalloc REQUIRED)
-+
++endif()
+ 
    list(APPEND ARROW_BUNDLED_STATIC_LIBS jemalloc::jemalloc)
  endif()
- 
-@@ -1671,6 +1670,8 @@ endif()
+@@ -1786,6 +1828,7 @@ endif()
  # mimalloc - Cross-platform high-performance allocator, from Microsoft
  
  if(ARROW_MIMALLOC)
-+  if (0)
-+
++if(0)
    message(STATUS "Building (vendored) mimalloc from source")
    # We only use a vendored mimalloc as we want to control its build options.
  
-@@ -1715,6 +1716,13 @@ if(ARROW_MIMALLOC)
+@@ -1834,6 +1877,10 @@ if(ARROW_MIMALLOC)
+   endif()
    add_dependencies(mimalloc::mimalloc mimalloc_ep)
    add_dependencies(toolchain mimalloc_ep)
- 
-+  else()
-+  
-+  find_package(mimalloc CONFIG REQUIRED)
++else()
++  find_package(mimalloc REQUIRED CONFIG)
 +  add_dependencies(toolchain mimalloc::mimalloc)
-+  
-+  endif()
-+
++endif()
+ 
    list(APPEND ARROW_BUNDLED_STATIC_LIBS mimalloc::mimalloc)
  endif()
- 
-@@ -2036,10 +2044,21 @@ macro(build_xsimd)
-   set(XSIMD_VENDORED TRUE)
+@@ -2119,6 +2166,7 @@ macro(build_rapidjson)
  endmacro()
  
--if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL 
STREQUAL "NONE"
--                                             ))
-+if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL 
STREQUAL "NONE"))
-+
-+  if (0)
-+
+ if(ARROW_WITH_RAPIDJSON)
++if(0)
+   set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0")
+   resolve_dependency(RapidJSON
+                      HAVE_ALT
+@@ -2131,6 +2179,10 @@ if(ARROW_WITH_RAPIDJSON)
+   if(RapidJSON_INCLUDE_DIR)
+     set(RAPIDJSON_INCLUDE_DIR "${RapidJSON_INCLUDE_DIR}")
+   endif()
++else()
++  find_package(RapidJSON REQUIRED)
++  set(RAPIDJSON_INCLUDE_DIR "${RapidJSON_INCLUDE_DIR}")
++endif()
+ 
+   # TODO: Don't use global includes but rather target_include_directories
+   include_directories(SYSTEM ${RAPIDJSON_INCLUDE_DIR})
+@@ -2158,8 +2210,14 @@ endmacro()
+ 
+ if((NOT ARROW_SIMD_LEVEL STREQUAL "NONE") OR (NOT ARROW_RUNTIME_SIMD_LEVEL 
STREQUAL "NONE"
+                                              ))
++if(0)
    set(xsimd_SOURCE "BUNDLED")
    resolve_dependency(xsimd)
-+
-+  else()
-+
++else()
 +  find_package(xsimd)
 +  set(XSIMD_INCLUDE_DIR "${xsimd_INCLUDE_DIR}")
 +  add_dependencies(toolchain xsimd)
-+
-+  endif()
-+
++endif()
    # TODO: Don't use global includes but rather target_include_directories
    include_directories(SYSTEM ${XSIMD_INCLUDE_DIR})
  endif()
-@@ -2082,11 +2101,14 @@ macro(build_zlib)
+@@ -2202,11 +2260,15 @@ macro(build_zlib)
  endmacro()
  
  if(ARROW_WITH_ZLIB)
-+  if(0)
++if(0)
    resolve_dependency(ZLIB PC_PACKAGE_NAMES zlib)
  
    # TODO: Don't use global includes but rather target_include_directories
    get_target_property(ZLIB_INCLUDE_DIR ZLIB::ZLIB 
INTERFACE_INCLUDE_DIRECTORIES)
    include_directories(SYSTEM ${ZLIB_INCLUDE_DIR})
-+  endif()
++else()
 +  find_package(ZLIB REQUIRED)
++endif()
  endif()
  
  macro(build_lz4)
-@@ -2140,11 +2162,14 @@ macro(build_lz4)
+@@ -2260,11 +2322,15 @@ macro(build_lz4)
  endmacro()
  
  if(ARROW_WITH_LZ4)
-+  if(0)
++if(0)
    resolve_dependency(Lz4 PC_PACKAGE_NAMES liblz4)
  
    # TODO: Don't use global includes but rather target_include_directories
    get_target_property(LZ4_INCLUDE_DIR LZ4::lz4 INTERFACE_INCLUDE_DIRECTORIES)
    include_directories(SYSTEM ${LZ4_INCLUDE_DIR})
-+  endif()
++else()
 +  find_package(lz4 REQUIRED)
++endif()
  endif()
  
  macro(build_zstd)
-@@ -2205,6 +2230,7 @@ macro(build_zstd)
+@@ -2325,6 +2391,7 @@ macro(build_zstd)
  endmacro()
  
  if(ARROW_WITH_ZSTD)
-+  if(0)
++if(0)
    # ARROW-13384: ZSTD_minCLevel was added in v1.4.0, required by ARROW-13091
    resolve_dependency(zstd
                       PC_PACKAGE_NAMES
-@@ -2232,6 +2258,8 @@ if(ARROW_WITH_ZSTD)
+@@ -2352,6 +2419,9 @@ if(ARROW_WITH_ZSTD)
    get_target_property(ZSTD_INCLUDE_DIR ${ARROW_ZSTD_LIBZSTD}
                        INTERFACE_INCLUDE_DIRECTORIES)
    include_directories(SYSTEM ${ZSTD_INCLUDE_DIR})
-+  endif()
++else()
 +  find_package(zstd REQUIRED)
++endif()
  endif()
  
  # ----------------------------------------------------------------------
-@@ -2271,6 +2299,7 @@ macro(build_re2)
+@@ -2391,6 +2461,7 @@ macro(build_re2)
  endmacro()
  
  if(ARROW_WITH_RE2)
-+  if(0)
++if(0)
    # Don't specify "PC_PACKAGE_NAMES re2" here because re2.pc may
    # include -std=c++11. It's not compatible with C source and C++
    # source not uses C++ 11.
-@@ -2284,6 +2313,8 @@ if(ARROW_WITH_RE2)
+@@ -2411,6 +2482,9 @@ if(ARROW_WITH_RE2)
    # TODO: Don't use global includes but rather target_include_directories
    get_target_property(RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES)
    include_directories(SYSTEM ${RE2_INCLUDE_DIR})
-+  endif()
++else()
 +  find_package(re2 REQUIRED)
++endif()
  endif()
  
  macro(build_bzip2)
-@@ -2335,10 +2366,7 @@ macro(build_bzip2)
+@@ -2462,6 +2536,7 @@ macro(build_bzip2)
  endmacro()
  
  if(ARROW_WITH_BZ2)
--  resolve_dependency(BZip2)
--  if(${BZip2_SOURCE} STREQUAL "SYSTEM")
--    string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}")
--  endif()
++if(0)
+   resolve_dependency(BZip2)
+   if(${BZip2_SOURCE} STREQUAL "SYSTEM")
+     string(APPEND ARROW_PC_LIBS_PRIVATE " ${BZIP2_LIBRARIES}")
+@@ -2474,6 +2549,9 @@ if(ARROW_WITH_BZ2)
+                                      INTERFACE_INCLUDE_DIRECTORIES 
"${BZIP2_INCLUDE_DIR}")
+   endif()
+   include_directories(SYSTEM "${BZIP2_INCLUDE_DIR}")
++else()
 +  find_package(BZip2 REQUIRED)
++endif()
+ endif()
  
-   if(NOT TARGET BZip2::BZip2)
-     add_library(BZip2::BZip2 UNKNOWN IMPORTED)
-@@ -2390,11 +2418,7 @@ macro(build_utf8proc)
+ macro(build_utf8proc)
+@@ -2517,6 +2595,7 @@ macro(build_utf8proc)
  endmacro()
  
  if(ARROW_WITH_UTF8PROC)
--  resolve_dependency(utf8proc
--                     REQUIRED_VERSION
--                     "2.2.0"
--                     PC_PACKAGE_NAMES
--                     libutf8proc)
++if(0)
+   resolve_dependency(utf8proc
+                      REQUIRED_VERSION
+                      "2.2.0"
+@@ -2538,6 +2617,10 @@ if(ARROW_WITH_UTF8PROC)
+   get_target_property(UTF8PROC_INCLUDE_DIR utf8proc::utf8proc
+                       INTERFACE_INCLUDE_DIRECTORIES)
+   include_directories(SYSTEM ${UTF8PROC_INCLUDE_DIR})
++else()
 +  find_package(utf8proc REQUIRED CONFIG)
++  add_definitions(-DARROW_WITH_UTF8PROC)
++endif()
+ endif()
  
-   add_definitions(-DARROW_WITH_UTF8PROC)
+ macro(build_cares)
+@@ -3702,6 +3785,7 @@ macro(build_grpc)
+ endmacro()
  
-@@ -3554,33 +3578,12 @@ if(ARROW_WITH_GRPC)
-     message(STATUS "Forcing gRPC_SOURCE to Protobuf_SOURCE 
(${Protobuf_SOURCE})")
-     set(gRPC_SOURCE "${Protobuf_SOURCE}")
+ if(ARROW_WITH_GRPC)
++if(0)
+   set(ARROW_GRPC_REQUIRED_VERSION "1.17.0")
+   if(NOT Protobuf_SOURCE STREQUAL gRPC_SOURCE)
+     # ARROW-15495: Protobuf/gRPC must come from the same source
+@@ -3735,6 +3819,9 @@ if(ARROW_WITH_GRPC)
+       message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}")
+     endif()
    endif()
--  resolve_dependency(gRPC
--                     HAVE_ALT
--                     TRUE
--                     REQUIRED_VERSION
--                     ${ARROW_GRPC_REQUIRED_VERSION}
--                     PC_PACKAGE_NAMES
--                     grpc++)
-+  find_package(gRPC CONFIG REQUIRED)
++else()
++  find_package(gRPC REQUIRED CONFIG)
++endif()
+ endif()
  
-   # TODO: Don't use global includes but rather target_include_directories
-   get_target_property(GRPC_INCLUDE_DIR gRPC::grpc++ 
INTERFACE_INCLUDE_DIRECTORIES)
-   include_directories(SYSTEM ${GRPC_INCLUDE_DIR})
- 
--  if(GRPC_VENDORED)
--    set(GRPCPP_PP_INCLUDE TRUE)
--    # Examples need to link to static Arrow if we're using static gRPC
--    set(ARROW_GRPC_USE_SHARED OFF)
--  else()
--    # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or 
${GRPC_INCLUDE_DIR}/grpcpp
--    # depending on the gRPC version.
--    if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h")
--      set(GRPCPP_PP_INCLUDE TRUE)
--    elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h")
--      set(GRPCPP_PP_INCLUDE FALSE)
--    else()
--      message(FATAL_ERROR "Cannot find grpc++ headers in ${GRPC_INCLUDE_DIR}")
--    endif()
--  endif()
+ # ----------------------------------------------------------------------
+@@ -3937,10 +4024,14 @@ macro(build_google_cloud_cpp_storage)
+ endmacro()
+ 
+ if(ARROW_WITH_GOOGLE_CLOUD_CPP)
++if(0)
+   resolve_dependency(google_cloud_cpp_storage)
+   get_target_property(google_cloud_cpp_storage_INCLUDE_DIR 
google-cloud-cpp::storage
+                       INTERFACE_INCLUDE_DIRECTORIES)
+   include_directories(SYSTEM ${google_cloud_cpp_storage_INCLUDE_DIR})
++else()
++  find_package(google-cloud-cpp REQUIRED)
++endif()
+   get_target_property(absl_base_INCLUDE_DIR absl::base 
INTERFACE_INCLUDE_DIRECTORIES)
+   include_directories(SYSTEM ${absl_base_INCLUDE_DIR})
+   message(STATUS "Found google-cloud-cpp::storage headers: 
${google_cloud_cpp_storage_INCLUDE_DIR}"
+@@ -4261,6 +4352,7 @@ macro(build_opentelemetry)
+ endmacro()
+ 
+ if(ARROW_WITH_OPENTELEMETRY)
++if(0)
+   # cURL is required whether we build from source or use an existing 
installation
+   # (OTel's cmake files do not call find_curl for you)
+   find_curl()
+@@ -4269,7 +4361,10 @@ if(ARROW_WITH_OPENTELEMETRY)
+   get_target_property(OPENTELEMETRY_INCLUDE_DIR opentelemetry-cpp::api
+                       INTERFACE_INCLUDE_DIRECTORIES)
+   include_directories(SYSTEM ${OPENTELEMETRY_INCLUDE_DIR})
+-  message(STATUS "Found OpenTelemetry headers: ${OPENTELEMETRY_INCLUDE_DIR}")
++else()
++  find_package(opentelemetry-cpp REQUIRED)
++endif()
++    message(STATUS "Found OpenTelemetry headers: 
${OPENTELEMETRY_INCLUDE_DIR}")
  endif()
  
  # ----------------------------------------------------------------------
 diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt
-index 84975e2..7779c08 100644
+index c518b7d..40b4853 100644
 --- a/cpp/src/arrow/CMakeLists.txt
 +++ b/cpp/src/arrow/CMakeLists.txt
-@@ -575,6 +575,10 @@ foreach(LIB_TARGET ${ARROW_LIBRARIES})
+@@ -584,6 +584,10 @@ foreach(LIB_TARGET ${ARROW_LIBRARIES})
    target_compile_definitions(${LIB_TARGET} PRIVATE ARROW_EXPORTING)
  endforeach()
  
@@ -343,19 +390,12 @@ index 84975e2..7779c08 100644
  if(ARROW_WITH_BACKTRACE)
    find_package(Backtrace)
  
-@@ -585,6 +589,7 @@ if(ARROW_WITH_BACKTRACE)
+@@ -594,7 +598,7 @@ if(ARROW_WITH_BACKTRACE)
    endforeach()
  endif()
  
+-if(ARROW_BUILD_BUNDLED_DEPENDENCIES)
 +if(0)
- if(ARROW_BUILD_BUNDLED_DEPENDENCIES)
    arrow_car(_FIRST_LIB ${ARROW_BUNDLED_STATIC_LIBS})
    arrow_cdr(_OTHER_LIBS ${ARROW_BUNDLED_STATIC_LIBS})
-@@ -596,6 +601,7 @@ if(ARROW_BUILD_BUNDLED_DEPENDENCIES)
-                            TO_MERGE
-                            ${_OTHER_LIBS})
- endif()
-+endif()
- 
- if(ARROW_TESTING)
-   # that depend on gtest
+   create_merged_static_lib(arrow_bundled_dependencies
diff --git a/ci/conan/all/patches/8.0.0-0005-install-utils.patch 
b/ci/conan/all/patches/8.0.0-0005-install-utils.patch
new file mode 100644
index 0000000000..98075913ed
--- /dev/null
+++ b/ci/conan/all/patches/8.0.0-0005-install-utils.patch
@@ -0,0 +1,65 @@
+MIT License
+
+Copyright (c) 2019 Conan.io
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt
+index aba18c8..bb463d0 100644
+--- a/cpp/CMakeLists.txt
++++ b/cpp/CMakeLists.txt
+@@ -721,7 +721,7 @@ if(ARROW_WITH_BZ2)
+ endif()
+ 
+ if(ARROW_WITH_LZ4)
+-  list(APPEND ARROW_STATIC_LINK_LIBS LZ4::lz4)
++  list(APPEND ARROW_STATIC_LINK_LIBS lz4::lz4)
+   if(Lz4_SOURCE STREQUAL "SYSTEM")
+     list(APPEND ARROW_STATIC_INSTALL_INTERFACE_LIBS LZ4::lz4)
+   endif()
+@@ -907,8 +907,8 @@ endif()
+ if(ARROW_JEMALLOC)
+   add_definitions(-DARROW_JEMALLOC)
+   add_definitions(-DARROW_JEMALLOC_INCLUDE_DIR=${JEMALLOC_INCLUDE_DIR})
+-  list(APPEND ARROW_LINK_LIBS jemalloc::jemalloc)
+-  list(APPEND ARROW_STATIC_LINK_LIBS jemalloc::jemalloc)
++  list(APPEND ARROW_LINK_LIBS jemalloc)
++  list(APPEND ARROW_STATIC_LINK_LIBS jemalloc)
+ endif()
+ 
+ if(ARROW_MIMALLOC)
+diff --git a/cpp/src/arrow/ipc/CMakeLists.txt 
b/cpp/src/arrow/ipc/CMakeLists.txt
+index 495018e..3dcb35d 100644
+--- a/cpp/src/arrow/ipc/CMakeLists.txt
++++ b/cpp/src/arrow/ipc/CMakeLists.txt
+@@ -61,9 +61,13 @@ endif()
+ if(ARROW_BUILD_UTILITIES OR ARROW_BUILD_INTEGRATION)
+   add_executable(arrow-file-to-stream file_to_stream.cc)
+   target_link_libraries(arrow-file-to-stream ${ARROW_UTIL_LIB})
++  install(TARGETS arrow-file-to-stream ${INSTALL_IS_OPTIONAL}
++    DESTINATION ${CMAKE_INSTALL_BINDIR})
+   add_executable(arrow-stream-to-file stream_to_file.cc)
+   target_link_libraries(arrow-stream-to-file ${ARROW_UTIL_LIB})
+-
++  install(TARGETS arrow-stream-to-file ${INSTALL_IS_OPTIONAL}
++    DESTINATION ${CMAKE_INSTALL_BINDIR})
++  
+   if(ARROW_BUILD_INTEGRATION)
+     add_dependencies(arrow-integration arrow-file-to-stream)
+     add_dependencies(arrow-integration arrow-stream-to-file)
diff --git a/ci/conan/all/test_package/CMakeLists.txt 
b/ci/conan/all/test_package/CMakeLists.txt
index 508cb44890..0df89423c1 100644
--- a/ci/conan/all/test_package/CMakeLists.txt
+++ b/ci/conan/all/test_package/CMakeLists.txt
@@ -20,15 +20,15 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-cmake_minimum_required(VERSION 3.1)
+cmake_minimum_required(VERSION 3.8)
 project(test_package)
 
 include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
 conan_basic_setup()
 
-find_package(Arrow)
+find_package(Arrow REQUIRED)
 
 add_executable(${PROJECT_NAME} test_package.cpp)
 target_link_libraries(${PROJECT_NAME} arrow::arrow)
-set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
+target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
 target_compile_definitions(${PROJECT_NAME} PRIVATE WITH_JEMALLOC)
diff --git a/ci/conan/config.yml b/ci/conan/config.yml
index 75c894c63f..b38fe36930 100644
--- a/ci/conan/config.yml
+++ b/ci/conan/config.yml
@@ -21,6 +21,10 @@
 # SOFTWARE.
 
 versions:
+  "8.0.1":
+    folder: all
+  "8.0.0":
+    folder: all
   "7.0.0":
     folder: all
   "2.0.0":
diff --git a/ci/scripts/conan_build.sh b/ci/scripts/conan_build.sh
index f83a85d34f..3b1d9b6c97 100755
--- a/ci/scripts/conan_build.sh
+++ b/ci/scripts/conan_build.sh
@@ -37,6 +37,9 @@ fi
 if [ -n "${ARROW_CONAN_WITH_BZ2:-}" ]; then
   conan_args+=(--options arrow:with_bz2=${ARROW_CONAN_WITH_BZ2})
 fi
+if [ -n "${ARROW_CONAN_WITH_FLIGHT_RPC:-}" ]; then
+  conan_args+=(--options arrow:with_flight_rpc=${ARROW_CONAN_WITH_FLIGHT_RPC})
+fi
 if [ -n "${ARROW_CONAN_WITH_GLOG:-}" ]; then
   conan_args+=(--options arrow:with_glog=${ARROW_CONAN_WITH_GLOG})
 fi
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake 
b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 9fd5a5df8a..86ad058353 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -1703,11 +1703,14 @@ if(ARROW_WITH_PROTOBUF)
   get_target_property(PROTOBUF_PROTOC_EXECUTABLE ${ARROW_PROTOBUF_PROTOC}
                       IMPORTED_LOCATION)
   message(STATUS "Found protoc: ${PROTOBUF_PROTOC_EXECUTABLE}")
-  # Protobuf_PROTOC_LIBRARY is set by all versions of FindProtobuf.cmake
-  message(STATUS "Found libprotoc: ${Protobuf_PROTOC_LIBRARY}")
-  get_target_property(PROTOBUF_LIBRARY ${ARROW_PROTOBUF_LIBPROTOBUF} 
IMPORTED_LOCATION)
-  message(STATUS "Found libprotobuf: ${PROTOBUF_LIBRARY}")
-  message(STATUS "Found protobuf headers: ${PROTOBUF_INCLUDE_DIR}")
+  get_target_property(PROTOBUF_TYPE ${ARROW_PROTOBUF_LIBPROTOBUF} TYPE)
+  if(NOT STREQUAL "INTERFACE_LIBRARY")
+    # Protobuf_PROTOC_LIBRARY is set by all versions of FindProtobuf.cmake
+    message(STATUS "Found libprotoc: ${Protobuf_PROTOC_LIBRARY}")
+    get_target_property(PROTOBUF_LIBRARY ${ARROW_PROTOBUF_LIBPROTOBUF} 
IMPORTED_LOCATION)
+    message(STATUS "Found libprotobuf: ${PROTOBUF_LIBRARY}")
+    message(STATUS "Found protobuf headers: ${PROTOBUF_INCLUDE_DIR}")
+  endif()
 endif()
 
 # ----------------------------------------------------------------------
@@ -3942,7 +3945,9 @@ if(ARROW_WITH_GRPC)
     # grpc++ headers may reside in ${GRPC_INCLUDE_DIR}/grpc++ or 
${GRPC_INCLUDE_DIR}/grpcpp
     # depending on the gRPC version.
     get_target_property(GRPC_INCLUDE_DIR gRPC::grpc++ 
INTERFACE_INCLUDE_DIRECTORIES)
-    if(EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h")
+    if(GRPC_INCLUDE_DIR MATCHES "^\\$<"
+       OR # generator expression
+          EXISTS "${GRPC_INCLUDE_DIR}/grpcpp/impl/codegen/config_protobuf.h")
       set(GRPCPP_PP_INCLUDE TRUE)
     elseif(EXISTS "${GRPC_INCLUDE_DIR}/grpc++/impl/codegen/config_protobuf.h")
       set(GRPCPP_PP_INCLUDE FALSE)
diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml
index 6b9b9f36d2..4b61cf0fcf 100644
--- a/dev/tasks/tasks.yml
+++ b/dev/tasks/tasks.yml
@@ -209,6 +209,7 @@ tasks:
         -e ARROW_CONAN_PARQUET=True
         -e ARROW_CONAN_WITH_BROTLI=True
         -e ARROW_CONAN_WITH_BZ2=True
+        -e ARROW_CONAN_WITH_FLIGHT_RPC=True
         -e ARROW_CONAN_WITH_GLOG=True
         -e ARROW_CONAN_WITH_JEMALLOC=True
         -e ARROW_CONAN_WITH_LZ4=True

Reply via email to