Skip to content

build: add driver_libdir option, install shim under libdir/odbc - #3

Merged
lemenkov merged 1 commit into
masterfrom
driver-libdir-meson-option
Jul 24, 2026
Merged

build: add driver_libdir option, install shim under libdir/odbc#3
lemenkov merged 1 commit into
masterfrom
driver-libdir-meson-option

Conversation

@lemenkov

Copy link
Copy Markdown
Owner

What

Install the ODBC driver shim under <libdir>/odbc (e.g. /usr/lib64/odbc) instead of the bare <libdir>, and add a meson option to override the location.

Why

The shim is a dlopen()ed plugin, not a linkable library, so it does not belong in the general loader search path. <libdir>/odbc is the long-standing Fedora convention for ODBC driver .sos, and — relevant to the incoming F45 ODBC Stack Modernization Change — it is exactly the directory odbcinst-generate probes to resolve a bare Driver = libseerodbc.so into an absolute path in the generated /etc/odbcinst.ini. Targeting Fedora 45+.

Changes

  • meson_options.txt — new driver_libdir string option. Empty default resolves to <libdir>/odbc; override with -Ddriver_libdir=<path> for non-Fedora layouts.
  • src/odbc/meson.build — resolve the option and pass it as the shim's install_dir.
  • packaging/seerodbc.spec — package the driver from %{_libdir}/odbc, add Requires: odbcinst-generate (drop-in trigger regenerates /etc/odbcinst.ini), and modernize boilerplate (%autorelease/%autochangelog, VCS tag, archive Source URL, %autosetup -p1).

Verified

Invocation Installs to
default (--libdir=lib64) /usr/lib64/odbc/libseerodbc.so
-Ddriver_libdir=/opt/seer/lib /opt/seer/lib/libseerodbc.so

🤖 Generated with Claude Code

The ODBC shim is a dlopen()ed plugin, not a linkable library, so it
belongs under <libdir>/odbc (e.g. /usr/lib64/odbc) - the Fedora
convention and the directory the F45 odbcinst-generate probes to turn a
bare "Driver = libseerodbc.so" into an absolute path - rather than in
the general loader search path.

Add a driver_libdir meson option (empty default resolves to
<libdir>/odbc, overridable via -Ddriver_libdir= for non-Fedora layouts)
and set it as the shim's install_dir.

Align the Fedora spec accordingly: package the driver from
%{_libdir}/odbc, add Requires: odbcinst-generate so the drop-in trigger
regenerates /etc/odbcinst.ini, and modernize the packaging boilerplate
(%autorelease/%autochangelog, VCS tag, archive Source URL, autosetup).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@lemenkov
lemenkov merged commit e3855b5 into master Jul 24, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant