Skip to content

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

Open
alinaliBQ wants to merge 2 commits into
apache:mainfrom
Bit-Quill:gh-47877-rpm-installer
Open

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

Conversation

@alinaliBQ

@alinaliBQ alinaliBQ commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Rationale for this change

GH-47877

What changes are included in this PR?

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.
Add missing sudo to address #50218.

The following contents will be installed by the .rpm installer:

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?

Developers can download RPM installer from the CI.

@github-actions

Copy link
Copy Markdown

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

Comment thread cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
@github-actions github-actions Bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Apr 20, 2026
@alinaliBQ alinaliBQ force-pushed the gh-47877-rpm-installer branch 3 times, most recently from e00ac1b to a5484a2 Compare April 23, 2026 22:03
@alinaliBQ alinaliBQ changed the title GH-47877: [C++][FlightRPC] ODBC Linux rpm installer support GH-47877: [C++][FlightRPC] ODBC Linux rpm installer support with Cpack Apr 24, 2026
@alinaliBQ

Copy link
Copy Markdown
Collaborator Author

cc @justing-bq Please help with code review comments on this PR going forward

@justing-bq justing-bq force-pushed the gh-47877-rpm-installer branch 3 times, most recently from c42a315 to 847f5d1 Compare May 21, 2026 16:53
@alinaliBQ alinaliBQ marked this pull request as ready for review May 21, 2026 17:32
@justing-bq justing-bq force-pushed the gh-47877-rpm-installer branch 2 times, most recently from 9b4d76e to 3987150 Compare May 21, 2026 23:13

@alinaliBQ alinaliBQ left a comment

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.

@justing-bq Please have a look at the comments, thanks

Comment thread cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
Comment thread cpp/src/arrow/flight/sql/odbc/README.md Outdated
Comment thread .github/workflows/cpp_extra.yml Outdated
@alinaliBQ

Copy link
Copy Markdown
Collaborator Author

@kou @lidavidm Please take a look when you have time, thanks! cc @justing-bq

@justing-bq justing-bq force-pushed the gh-47877-rpm-installer branch from a94a2c9 to 0aff342 Compare May 25, 2026 21:54
@justing-bq justing-bq force-pushed the gh-47877-rpm-installer branch 6 times, most recently from 1698678 to e7a4ee7 Compare June 16, 2026 16:50
@justing-bq

Copy link
Copy Markdown
Contributor

@kou @lidavidm
Ready for another review. Please take a look when you have time.
Thank you.

Comment thread ci/docker/ubuntu-24.04-cpp.dockerfile
Comment thread cpp/cmake_modules/DefineOptions.cmake Outdated
@github-actions github-actions Bot added awaiting merge Awaiting merge and removed awaiting committer review Awaiting committer review labels Jun 19, 2026
@justing-bq justing-bq force-pushed the gh-47877-rpm-installer branch from 6848cdd to eaf2333 Compare June 23, 2026 17:39
@alinaliBQ

Copy link
Copy Markdown
Collaborator Author

@justing-bq Has addressed all comments and the ODBC CIs are passing, the CI failures not from ODBC related changes.
@lidavidm @kou Would appreciate if you could have another look, thanks!

@kou

kou commented Jun 30, 2026

Copy link
Copy Markdown
Member

I hope that we use dev/tasks/linux-packages/ for deb/RPM packages...

Could you split a fix for #50218 as a separated PR?

@kou

kou commented Jun 30, 2026

Copy link
Copy Markdown
Member

GH-50288

@justing-bq justing-bq force-pushed the gh-47877-rpm-installer branch from eaf2333 to 1f56e49 Compare June 30, 2026 17:46
@alinaliBQ

Copy link
Copy Markdown
Collaborator Author

@kou Thanks for putting up the PR #50288 for dev/tasks/linux-packages/.

I just want to make sure I understand the ask, are you suggesting that:

  1. We use dev/tasks/linux-packages/ instead of CPack (this case I will close my current PRs for RPM/DEB, and the team's work on the ODBC Linux would be complete),
  2. You'd like us to rework this PR to implement dev/tasks/linux-packages/ after GH-47877: [Packaging][C++][FlightRPC][ODBC] Add arrow-flight-sql-odbc #50288 is merged, or
  3. are you okay with both dev/tasks/linux-packages/ and CPack approach in this PR co-existing?

I think it would be beneficial to include the ODBC Linux driver registration script. My initial thinking was that community could use CPack approach first, and then CPack approach can be phased out by linux-packages once that is complete. Alternatively, after this PR and #49857 are merged, someone with knowledge in linux-packages could merge the 2 approaches together so that linux-packages implementation also does ODBC driver registration.

Previous thread: #49766 (comment).
Our team currently doesn't have capacity to test and verify the implementation with linux-packages. We appreciate your help here.
cc @lidavidm

@alinaliBQ

Copy link
Copy Markdown
Collaborator Author

Could you split a fix for #50218 as a separated PR?

Yes, we will work on that cc @justing-bq

@kou

kou commented Jul 1, 2026

Copy link
Copy Markdown
Member

I'm suggesting 1. or 2.

BTW, https://manpages.ubuntu.com/manpages/focal/man5/odbcinst.ini.5.html says that we should use odbcinst -i -d -f template.ini instead of editing odbc.ini manually. It seems that our install script https://github.com/apache/arrow/blob/main/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh edit /etc/odbcinst.ini directly.

We can use %post hook in .spec to run odbcinst. We can create odbcinst.ini.template by CMake's https://cmake.org/cmake/help/latest/command/configure_file.html . We don't need to create it dynamically by a shell script like https://github.com/apache/arrow/blob/main/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc_ini.sh .

I think it would be beneficial to include the ODBC Linux driver registration script. My initial thinking was that community could use CPack approach first, and then CPack approach can be phased out by linux-packages once that is complete. Alternatively, after this PR and #49857 are merged, someone with knowledge in linux-packages could merge the 2 approaches together so that linux-packages implementation also does ODBC driver registration.

We will not make the CPack based packages "offical" packages because it conflicts with existing deb/RPM packages. We should not provide non "official" packages to users. We can provide non "official" packages to only Apache Arrow developers.
See also: https://www.apache.org/legal/release-policy.html#publication

I think that it's not useful for you. So I suggest the dev/tasks/linux-packages approach.

Our team currently doesn't have capacity to test and verify the implementation with linux-packages. We appreciate your help here.

If you can't test, I can't help you because I don't know the expected behavior...

@justing-bq justing-bq force-pushed the gh-47877-rpm-installer branch 4 times, most recently from 66ffa5e to 56a1d7e Compare July 3, 2026 19:58
alinaliBQ and others added 2 commits July 3, 2026 13:58
* Implement RPM installer

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`

Update workflow matrix

Update cpp_extra.yml

Fix package name

^ Conflicts:
^	.github/workflows/cpp_extra.yml
@justing-bq justing-bq force-pushed the gh-47877-rpm-installer branch from 56a1d7e to 5905363 Compare July 3, 2026 20:58
@justing-bq

Copy link
Copy Markdown
Contributor

BTW, https://manpages.ubuntu.com/manpages/focal/man5/odbcinst.ini.5.html says that we should use odbcinst -i -d -f template.ini instead of editing odbc.ini manually. It seems that our install script https://github.com/apache/arrow/blob/main/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh edit /etc/odbcinst.ini directly.

Now using odbcinst -i -d -f template.ini for Linux. For Mac, we are still editing odbc.ini manually.

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.

4 participants