Skip to content

GH-47877: [C++][FlightRPC] ODBC Linux rpm installer support#49787

Draft
alinaliBQ wants to merge 2 commits intoapache:mainfrom
Bit-Quill:gh-47877-rpm-installer
Draft

GH-47877: [C++][FlightRPC] ODBC Linux rpm installer support#49787
alinaliBQ wants to merge 2 commits intoapache:mainfrom
Bit-Quill:gh-47877-rpm-installer

Conversation

@alinaliBQ
Copy link
Copy Markdown
Collaborator

@alinaliBQ alinaliBQ commented Apr 17, 2026

Rationale for this change

GH-47877

What changes are included in this PR?

This PR is dependent on #49766 to undraft and merge.

Add support for Linux ODBC .rpm installer.
In install_odbc.sh, changed to use awk on unix platforms as sed doesn't work well on Linux.
Add installer readme section.
Add ARROW_FLIGHT_SQL_ODBC_INSTALLER option.

The .rpm installer installs:

root@84db9b9349a5:/usr/lib64/arrow-odbc# tree
.
|-- doc
|   |-- Connection-Options.md
|   `-- LICENSE.txt
`-- lib
    |-- libarrow_flight_sql_odbc.so -> libarrow_flight_sql_odbc.so.2400
    |-- libarrow_flight_sql_odbc.so.2400 -> libarrow_flight_sql_odbc.so.2400.0.0
    `-- libarrow_flight_sql_odbc.so.2400.0.0

3 directories, 5 files

Are these changes tested?

Yes

Are there any user-facing changes?

Users can download RPM installer from the CI.

* Implement RPM installer

Revert "TEMP - Disable non-ODBC items"

This reverts commit efa8d84.

fix formatting

Remove todos

ODBC rpm Installer wrap up

* installing `rpm` package fixed the `cpack` command issue
* Fix cpack command on CI

(merge into last commit when ready) Change to use `awk` so script works on both platforms

Comment out `find` and `tree` steps

Change build path to be under /arrow

Since docker is mounted, changing build path to be in `/arrow` will allow host machine to access docker build contents

TEMP - Disable non-ODBC items

Add commands to find build folder

Attempt to build RPM installer

* not sure if `/build/cpp` can be accessed outside of docker. Hopefully it should.
* add `rpm` dependency install

Indicate RPM in workflow run

Add rpm `postinstall` (not tested)

Remove merge conflict code

* Enable ODBC installer build in CI instead of `compose.yaml`
@github-actions
Copy link
Copy Markdown

⚠️ GitHub issue #47877 has been automatically assigned in GitHub to PR creator.

Comment on lines +181 to +200
else()
# Linux
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
if(${ODBC_PACKAGE_FORMAT} STREQUAL "DEB")
# GH-49595 TODO: implement DEB installer
message(STATUS "ODBC_PACKAGE_FORMAT DEB not implemented, see GH-49595")
elseif(${ODBC_PACKAGE_FORMAT} STREQUAL "RPM")
set(CPACK_RPM_PACKAGE_ARCHITECTURE x86_64)
set(CPACK_GENERATOR RPM)
set(CPACK_RPM_POST_INSTALL_SCRIPT_FILE
"${CMAKE_CURRENT_SOURCE_DIR}/install/linux/rpm/postinstall")
set(CPACK_RPM_FILE_NAME "${ODBC_UNIX_FILE_NAME}.rpm")
# Disable dependency check as ODBC embeds all third party dependencies
set(CPACK_RPM_PACKAGE_AUTOREQPROV "no")
set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE 1)
set(CPACK_RPM_COMPONENT_INSTALL ON)
else()
message(FATAL_ERROR "ODBC_PACKAGE_FORMAT '${ODBC_PACKAGE_FORMAT}' must be DEB or RPM for Linux installer."
)
endif()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes for RPM installer are ready for review. This PR contains code changes that are dependent on #49766

@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Apr 20, 2026
Update cpp_extra.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant