Skip to content

Commit 485a6f4

Browse files
alinaliBQjusting-bq
authored andcommitted
Linux DEB ODBC installer support
* Initial draft of DEB installer * reuse script for RPM, and rename script to indicate `postinst` (postinstall) * Add `file` to dockerfile to enable Debian installation * Fix component settings with DEB * Fix package name * Clean up comments * Fix file name * Fix postinst variable for DEB * Fix upload artifact file name and doc file name
1 parent e7a4ee7 commit 485a6f4

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/cpp_extra.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,13 @@ jobs:
390390
run-options: >-
391391
-e ARROW_FLIGHT_SQL_ODBC_INSTALLER=ON
392392
-e ODBC_PACKAGE_FORMAT=RPM
393+
- image: ubuntu-cpp-odbc
394+
title: AMD64 Ubuntu DEB
395+
build-type: release
396+
format: deb
397+
run-options: >-
398+
-e ARROW_FLIGHT_SQL_ODBC_INSTALLER=ON
399+
-e ODBC_PACKAGE_FORMAT=DEB
393400
env:
394401
ARCH: amd64
395402
ARCHERY_DEBUG: 1

ci/docker/ubuntu-24.04-cpp.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ RUN apt-get update -y -q && \
7171
ccache \
7272
cmake \
7373
curl \
74+
file \
7475
gdb \
7576
git \
7677
libbenchmark-dev \

cpp/src/arrow/flight/sql/odbc/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,16 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
178178
# Linux
179179
set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}")
180180
if(${ODBC_PACKAGE_FORMAT} STREQUAL "DEB")
181-
# GH-49595 TODO: implement DEB installer
182-
message(STATUS "ODBC_PACKAGE_FORMAT DEB not implemented, see GH-49595")
181+
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE amd64)
182+
set(CPACK_GENERATOR DEB)
183+
set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
184+
"${CMAKE_CURRENT_SOURCE_DIR}/install/linux/postinst")
185+
set(CPACK_DEBIAN_FILE_NAME "${ODBC_UNIX_FILE_NAME}.deb")
186+
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "${CPACK_PACKAGE_CONTACT}")
187+
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS OFF)
188+
# Exclude Unspecified components
189+
set(CPACK_DEB_COMPONENT_INSTALL ON)
190+
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
183191
elseif(${ODBC_PACKAGE_FORMAT} STREQUAL "RPM")
184192
set(CPACK_RPM_PACKAGE_ARCHITECTURE x86_64)
185193
set(CPACK_GENERATOR RPM)

0 commit comments

Comments
 (0)