mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 09:05:47 +08:00
### Rationale for this change The vendored uriparser in `cpp/src/arrow/vendored/uriparser/` is 0.9.3, which is old and misses upstream security fixes. Instead of refreshing the vendored copy, this makes uriparser an external dependency like our other third-party dependencies. ### What changes are included in this PR? - Add `uriparser` to `ARROW_THIRDPARTY_DEPENDENCIES` - Add `build_uriparser()` that builds uriparser 1.0.2 with `FetchContent` for `uriparser_SOURCE=BUNDLED` (static; docs, tests, tools and `wchar_t` support are disabled). The built library is bundled into `arrow_bundled_dependencies`. - Require uriparser 0.9.6 or later for `uriparser_SOURCE=SYSTEM`. All uriparser APIs used by Arrow are available in 0.9.6, so supported platforms such as Ubuntu 22.04 can use their distribution package. - Add `cmake_modules/FinduriparserAlt.cmake`. It tries uriparser's CMake package configuration first and falls back to pkg-config (`liburiparser.pc`), because Debian and Ubuntu's `liburiparser-dev` provides only the pkg-config file. - Add `uriparser::uriparser` to `ARROW_STATIC_INSTALL_INTERFACE_LIBS` for `uriparser_SOURCE=SYSTEM`, so that static library users link uriparser. - meson: Use the system uriparser 0.9.6 or later if available. Otherwise, build uriparser 1.0.2 via `subprojects/uriparser.wrap` with the CMake subproject support. - Remove `cpp/src/arrow/vendored/uriparser/` and its section in `LICENSE.txt`. - Packaging: Install uriparser in our Docker images, conda environment, `Brewfile`, vcpkg manifests, MSYS2 setup and Linux packages build environments. - Packaging: Pass `-Duriparser_SOURCE` in `ci/scripts/cpp_build.sh`. - Packaging: Add uriparser to the dependency list in `docs/source/developers/cpp/building.rst`. ***NOTICE*** : The floor is 0.9.6 rather than 1.0.2, so supported platforms such as Ubuntu 22.04 can use their distro package and CI does not have to build uriparser from source. ### Are these changes tested? All existing tests pass. ### Are there any user-facing changes? Now Arrow requires uriparser or builds it . No user facing changes as such because no API changes . **This PR contains a "Critical Fix".** It has security fixes that has gone in uriparser. **AI Usage**: - Used for testing <-> building loop. * GitHub Issue: #51007 Authored-by: Narendra <naskastark11@gmail.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>