public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/postgresql-odbc] rawhide: [Fedora 45 Change] Ship drop-in snippet for ODBC driver self-registration
@ 2026-07-29 11:45 Michal Schorm
  0 siblings, 0 replies; only message in thread
From: Michal Schorm @ 2026-07-29 11:45 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/postgresql-odbc
            Branch : rawhide
            Commit : aed44de5719a7904fad1d0b885b896fc45cfb082
            Author : Michal Schorm <mschorm@redhat.com>
            Date   : 2026-07-20T02:29:58+02:00
            Stats  : +12/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/postgresql-odbc/c/aed44de5719a7904fad1d0b885b896fc45cfb082?branch=rawhide

            Log:
            [Fedora 45 Change] Ship drop-in snippet for ODBC driver self-registration

Install '10-postgresql.ini' to '/usr/lib/odbc/odbcinst.d/' so
the unixODBC file trigger automatically registers the driver
in '/etc/odbcinst.ini'. Uses bare library name 'psqlodbcw.so'
resolved via the compiled-in MODULEDIR.

Snippet directory layout:
- Snippets are installed to '%{_prefix}/lib/odbc/odbcinst.d/' rather
  than directly to '%{_prefix}/lib/odbc/' to separate configuration
  from content — on multilib systems, '%{_prefix}/lib/odbc/' may also
  contain 32-bit driver '.so' files, and the RPM file triggers that
  watch the snippet directory would fire spuriously on '.so' installs
- Both '%{_prefix}/lib/odbc/' and '%{_prefix}/lib/odbc/odbcinst.d/'
  are co-owned by this package per Fedora directory ownership guidelines

Co-Authored-By: Claude AI <noreply@anthropic.com>

This commit is part of a Fedora 45 Self Contained Change:
  https://fedoraproject.org/wiki/Changes/ODBC_stack_modernization

---
diff --git a/10-postgresql.ini b/10-postgresql.ini
new file mode 100644
index 0000000..612b9f3
--- /dev/null
+++ b/10-postgresql.ini
@@ -0,0 +1,3 @@
+[PostgreSQL]
+Description = ODBC for PostgreSQL
+Driver      = psqlodbcw.so

diff --git a/postgresql-odbc.spec b/postgresql-odbc.spec
index b37e443..67621a2 100644
--- a/postgresql-odbc.spec
+++ b/postgresql-odbc.spec
@@ -5,11 +5,12 @@
 Name: postgresql-odbc
 Summary: PostgreSQL ODBC driver
 Version: 16.00.0000
-Release: 10%{?dist}
+Release: 11%{?dist}
 License: LGPL-2.0-or-later
 URL: https://odbc.postgresql.org/
 
 Source0: https://ftp.postgresql.org/pub/odbc/versions/src/%{upstream_name}-%{version}.tar.gz
+Source3: 10-postgresql.ini
 
 Patch0: postgresql-odbc-09.06.0200-revert-money-fix.patch
 Patch1: postgresql-odbc-09.05.0400-revert-money-testsuite-fix.patch
@@ -65,6 +66,10 @@ pushd ${RPM_BUILD_ROOT}%{_libdir}/odbc
 	rm psqlodbcw.la psqlodbca.la
 popd
 
+# ODBC driver registration drop-in snippet
+mkdir -p ${RPM_BUILD_ROOT}%{_prefix}/lib/odbc/odbcinst.d
+install -m644 %{SOURCE3} ${RPM_BUILD_ROOT}%{_prefix}/lib/odbc/odbcinst.d/
+
 %if %{with check}
 %check
 %postgresql_tests_run
@@ -104,6 +109,9 @@ the PostgreSQL unixODBC driver.
 %{_libdir}/odbc/psqlodbca.so
 %{_libdir}/odbc/psqlodbcw.so
 %doc license.txt readme.txt docs/* README.rpmdist
+%dir %{_prefix}/lib/odbc
+%dir %{_prefix}/lib/odbc/odbcinst.d
+%{_prefix}/lib/odbc/odbcinst.d/10-postgresql.ini
 
 
 %files tests

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-29 11:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-29 11:45 [rpms/postgresql-odbc] rawhide: [Fedora 45 Change] Ship drop-in snippet for ODBC driver self-registration Michal Schorm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox