Update to unixODBC 2.2.14

This commit is contained in:
Tom Lane 2009-02-20 17:22:19 +00:00
parent ba9818e73f
commit dea5432f97
14 changed files with 2197 additions and 153 deletions

View File

@ -1 +1 @@
unixODBC-2.2.12.tar.gz unixODBC-2.2.14.tar.gz

24
conffile.h Normal file
View File

@ -0,0 +1,24 @@
/*
* Kluge to support multilib installation of both 32- and 64-bit RPMS:
* we need to arrange that header files that appear in both RPMs are
* identical. Hence, this file is architecture-independent and calls
* in an arch-dependent file that will appear in just one RPM.
*
* Note: this may well fail if user tries to use gcc's -I- option.
* But that option is deprecated anyway.
*/
#if defined(__x86_64__)
#include "CONFFILE_x86_64.h"
#elif defined(__ia64__)
#include "CONFFILE_ia64.h"
#elif defined(__i386__)
#include "CONFFILE_i386.h"
#elif defined(__ppc64__) || defined(__powerpc64__)
#include "CONFFILE_ppc64.h"
#elif defined(__ppc__) || defined(__powerpc__)
#include "CONFFILE_ppc.h"
#elif defined(__s390x__)
#include "CONFFILE_s390x.h"
#elif defined(__s390__)
#include "CONFFILE_s390.h"
#endif

40
export-symbols.patch Normal file
View File

@ -0,0 +1,40 @@
Fix some unknown symbols. (This patch was originally for 2.2.11,
do we still need it?)
diff -Naur unixODBC-2.2.14.orig/DriverManager/DriverManager.exp unixODBC-2.2.14/DriverManager/DriverManager.exp
--- unixODBC-2.2.14.orig/DriverManager/DriverManager.exp 2008-05-22 05:10:54.000000000 -0400
+++ unixODBC-2.2.14/DriverManager/DriverManager.exp 2009-02-15 18:44:46.000000000 -0500
@@ -153,6 +153,8 @@
SQLTablesA
SQLTransact
ODBCSharedTraceFlag
+dm_log_write
+__post_internal_error
uodbc_open_stats
uodbc_close_stats
uodbc_get_stats
diff -Naur unixODBC-2.2.14.orig/cur/Makefile.am unixODBC-2.2.14/cur/Makefile.am
--- unixODBC-2.2.14.orig/cur/Makefile.am 2008-06-17 06:18:39.000000000 -0400
+++ unixODBC-2.2.14/cur/Makefile.am 2009-02-15 18:44:46.000000000 -0500
@@ -10,7 +10,7 @@
libodbccr_la_LDFLAGS = \
-no-undefined \
-version-info @LIB_VERSION@ \
- -export-symbols @srcdir@/cur.exp -export-dynamic
+ -export-symbols @srcdir@/cur.exp -export-dynamic ../DriverManager/libodbc.la
libodbccr_la_SOURCES = \
SQLAllocHandle.c \
diff -Naur unixODBC-2.2.14.orig/cur/Makefile.in unixODBC-2.2.14/cur/Makefile.in
--- unixODBC-2.2.14.orig/cur/Makefile.in 2008-11-19 11:11:15.000000000 -0500
+++ unixODBC-2.2.14/cur/Makefile.in 2009-02-15 18:44:46.000000000 -0500
@@ -272,7 +272,7 @@
libodbccr_la_LDFLAGS = \
-no-undefined \
-version-info @LIB_VERSION@ \
- -export-symbols @srcdir@/cur.exp -export-dynamic
+ -export-symbols @srcdir@/cur.exp -export-dynamic ../DriverManager/libodbc.la
libodbccr_la_SOURCES = \
SQLAllocHandle.c \

18
keep-typedefs.patch Normal file
View File

@ -0,0 +1,18 @@
Upstream has decided to deprecate these typedefs, but experience so far
says that removing them just breaks code to little purpose.
diff -Naur unixODBC-2.2.14.orig/include/sqltypes.h unixODBC-2.2.14/include/sqltypes.h
--- unixODBC-2.2.14.orig/include/sqltypes.h 2008-10-31 12:21:53.000000000 -0400
+++ unixODBC-2.2.14/include/sqltypes.h 2009-02-16 13:28:50.000000000 -0500
@@ -170,6 +170,10 @@
typedef SQLUINTEGER SQLROWSETSIZE;
typedef SQLLEN SQLROWOFFSET;
*/
+typedef SQLULEN SQLROWCOUNT;
+typedef SQLULEN SQLROWSETSIZE;
+typedef SQLULEN SQLTRANSID;
+typedef SQLLEN SQLROWOFFSET;
#endif
#else
typedef long SQLINTEGER;

55
libtool-config.patch Normal file
View File

@ -0,0 +1,55 @@
unixODBC doesn't actually succeed if you try to build with the system libltdl.
Take out code that expects libltdl to exist locally.
diff -Naur unixODBC-2.2.14.orig/Makefile.am unixODBC-2.2.14/Makefile.am
--- unixODBC-2.2.14.orig/Makefile.am 2008-09-02 08:29:31.000000000 -0400
+++ unixODBC-2.2.14/Makefile.am 2009-02-15 22:27:55.000000000 -0500
@@ -3,7 +3,6 @@
log \
lst \
ini \
- libltdl \
odbcinst \
DriverManager \
odbcinstQ \
diff -Naur unixODBC-2.2.14.orig/configure.in unixODBC-2.2.14/configure.in
--- unixODBC-2.2.14.orig/configure.in 2008-11-19 11:08:40.000000000 -0500
+++ unixODBC-2.2.14/configure.in 2009-02-16 00:45:22.000000000 -0500
@@ -165,27 +165,12 @@
INCLTDL=""
LIBLTDL=""
-AC_MSG_CHECKING( Have we enabled using RTLD_GROUP )
-if test "x$rtldgroup" = "xtrue"; then
-AC_MSG_RESULT( yes )
-AC_LIBLTDL_CONVENIENCE
-else
-AC_MSG_RESULT( no );
-AC_LIBLTDL_CONVENIENCE_G
-fi
-
dnl Check for dlopen support
AC_LIBTOOL_DLOPEN
-dnl for cygwin support
-AC_LIBTOOL_WIN32_DLL
-
dnl Configure libtool
AM_PROG_LIBTOOL
-dnl Configure libltdl
-AC_CONFIG_SUBDIRS(libltdl)
-
use_builtin_libtool="no"
dnl override the libtool lines if we use the system libs
@@ -517,7 +502,7 @@
AM_CONDITIONAL(DRIVERS, test "x$drivers" = "xtrue" )
AM_CONDITIONAL(FDB, test "x$fdb" = "xtrue" )
AM_CONDITIONAL(QNX, test "x$qnx" = "xtrue" )
-AM_CONDITIONAL(WITHLT, test "x$use_builtin_libtool" = "xyes" )
+AM_CONDITIONAL(WITHLT, test "x$use_builtin_libtool" = "xno" )
AM_CONDITIONAL(ODBCTRACE, test "x$odbctrace" = "xtrue" )
dnl This blows up due to what I think is a bug in automake 1.6.3

View File

@ -3,16 +3,26 @@ machine. Force it to use the location reported by /etc/profile.d/qt.sh
which we invoke in the specfile (yeah, a crude hack...) which we invoke in the specfile (yeah, a crude hack...)
diff -Naur unixODBC-2.2.12.orig/qt.m4 unixODBC-2.2.12/qt.m4 diff -Naur unixODBC-2.2.14.orig/qt.m4 unixODBC-2.2.14/qt.m4
--- unixODBC-2.2.12.orig/qt.m4 2006-05-16 13:42:26.000000000 -0400 --- unixODBC-2.2.14.orig/qt.m4 2008-06-30 11:13:44.000000000 -0400
+++ unixODBC-2.2.12/qt.m4 2007-04-20 12:32:55.000000000 -0400 +++ unixODBC-2.2.14/qt.m4 2008-11-25 12:01:47.000000000 -0500
@@ -207,30 +207,7 @@ @@ -230,40 +230,7 @@
# Ensure we have the lib dir... # Ensure we have the lib dir...
if test "x$qt_libraries" = "x" ; then if test "x$qt_libraries" = "x" ; then
- # see if it is relative to the includes - # see if it is relative to the includes
- qt_tree="$qt_includes" - qt_tree="$qt_includes"
- while test "x$qt_tree" != "x" ; do -
- #
- # the cygwin dirhame only strips up to the first /
- #
-
- case $host_os in
- cygwin*) empty_dir="x/" ;;
- *) empty_dir="x" ;;
- esac
-
- while test "x$qt_tree" != $empty_dir ; do
- # first go around will fail... - # first go around will fail...
- if expr "$QTVERSION" '>=' "040000" > /dev/null ; then - if expr "$QTVERSION" '>=' "040000" > /dev/null ; then
- if ls $qt_tree/lib/libQt* > /dev/null 2> /dev/null ; then - if ls $qt_tree/lib/libQt* > /dev/null 2> /dev/null ; then

View File

@ -1,22 +0,0 @@
Although we want to use the latest libltdl, there is one patch that must
be made to avoid problems in Perl::ODBC: don't use RTLD_GLOBAL in the
call to dlopen().
diff -Naur unixODBC-2.2.11.save/libltdl/ltdl.c unixODBC-2.2.11/libltdl/ltdl.c
--- unixODBC-2.2.11.save/libltdl/ltdl.c 2005-09-29 16:18:17.000000000 -0400
+++ unixODBC-2.2.11/libltdl/ltdl.c 2005-09-29 16:45:11.000000000 -0400
@@ -1107,7 +1107,12 @@
lt_user_data loader_data;
const char *filename;
{
- lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW);
+/*
+ * this need takeing out, otherwise things like perl break
+ * lt_module module = dlopen (filename, LT_GLOBAL | LT_LAZY_OR_NOW);
+ */
+
+ lt_module module = dlopen (filename, LT_LAZY_OR_NOW );
if (!module)
{

View File

@ -1,19 +1,20 @@
# Example driver definitinions # Example driver definitions
# # Note: on a 64-bit machine, change /usr/lib to /usr/lib64
# #
# Included in the unixODBC package # Driver from the postgresql-odbc package
# Setup from the unixODBC package
[PostgreSQL] [PostgreSQL]
Description = ODBC for PostgreSQL Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so Driver = /usr/lib/psqlodbc.so
Setup = /usr/lib/libodbcpsqlS.so Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1 FileUsage = 1
# Driver from the MyODBC package # Driver from the mysql-connector-odbc package
# Setup from the unixODBC package # Setup from the unixODBC package
#[MySQL] [MySQL]
#Description = ODBC for MySQL Description = ODBC for MySQL
#Driver = /usr/lib/libmyodbc.so Driver = /usr/lib/libmyodbc5.so
#Setup = /usr/lib/libodbcmyS.so Setup = /usr/lib/libodbcmyS.so
#FileUsage = 1 FileUsage = 1

View File

@ -1,17 +0,0 @@
Force bison invocation to include -d flag so that yac.h is rebuilt.
The copy supplied in the 2.2.11 distribution does not have the same
symbol numbering that's generated by current Bison, and so the lexer
is out-of-step with the grammar if it just uses that version. This
results in complete failure of the sqp library, leading to reported
problems with text-file driver (bz #162676).
diff -Naur unixODBC-2.2.11.orig/sqp/Makefile.am unixODBC-2.2.11/sqp/Makefile.am
--- unixODBC-2.2.11.orig/sqp/Makefile.am 2004-09-13 08:30:29.000000000 -0400
+++ unixODBC-2.2.11/sqp/Makefile.am 2005-09-29 15:19:52.000000000 -0400
@@ -1,3 +1,5 @@
+AM_YFLAGS = -d
+
if HAVE_FLEX
noinst_LTLIBRARIES = libsqplc.la

253
so-version-bump.patch Normal file
View File

@ -0,0 +1,253 @@
Set the major .so version to 2 for all unixODBC shared libraries, to reflect
the incompatible ABI changes in 2.2.14.
diff -Naur unixODBC-2.2.14.orig/configure.in unixODBC-2.2.14/configure.in
--- unixODBC-2.2.14.orig/configure.in 2008-11-19 11:08:40.000000000 -0500
+++ unixODBC-2.2.14/configure.in 2009-02-16 11:56:53.000000000 -0500
@@ -546,7 +546,7 @@
dnl This is the unixODBC source tree
AC_DEFINE(UNIXODBC_SOURCE)
-LIB_VERSION="1:0:0"
+LIB_VERSION="2:0:0"
AC_SUBST(LIB_VERSION)
AC_OUTPUT( Makefile \
diff -Naur unixODBC-2.2.14.orig/DRVConfig/Mimer/Makefile.am unixODBC-2.2.14/DRVConfig/Mimer/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/Mimer/Makefile.am 2008-06-17 06:14:07.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/Mimer/Makefile.am 2009-02-16 11:59:31.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libmimerS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libmimerS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/MiniSQL/Makefile.am unixODBC-2.2.14/DRVConfig/MiniSQL/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/MiniSQL/Makefile.am 2008-06-17 06:14:17.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/MiniSQL/Makefile.am 2009-02-16 11:59:27.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libodbcminiS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libodbcminiS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/MySQL/Makefile.am unixODBC-2.2.14/DRVConfig/MySQL/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/MySQL/Makefile.am 2008-06-17 06:14:23.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/MySQL/Makefile.am 2009-02-16 11:59:50.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libodbcmyS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libodbcmyS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/Oracle/Makefile.am unixODBC-2.2.14/DRVConfig/Oracle/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/Oracle/Makefile.am 2008-06-17 06:14:29.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/Oracle/Makefile.am 2009-02-16 11:59:07.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-liboraodbcS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+liboraodbcS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/PostgreSQL/Makefile.am unixODBC-2.2.14/DRVConfig/PostgreSQL/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/PostgreSQL/Makefile.am 2008-06-17 06:14:35.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/PostgreSQL/Makefile.am 2009-02-16 11:59:01.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libodbcpsqlS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libodbcpsqlS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/drvcfg1/Makefile.am unixODBC-2.2.14/DRVConfig/drvcfg1/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/drvcfg1/Makefile.am 2008-06-17 06:14:40.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/drvcfg1/Makefile.am 2009-02-16 12:00:00.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libodbcdrvcfg1S_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libodbcdrvcfg1S_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/drvcfg2/Makefile.am unixODBC-2.2.14/DRVConfig/drvcfg2/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/drvcfg2/Makefile.am 2008-06-17 06:14:45.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/drvcfg2/Makefile.am 2009-02-16 11:58:39.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libodbcdrvcfg2S_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libodbcdrvcfg2S_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/esoob/Makefile.am unixODBC-2.2.14/DRVConfig/esoob/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/esoob/Makefile.am 2008-06-17 06:14:50.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/esoob/Makefile.am 2009-02-16 11:59:41.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libesoobS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libesoobS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/nn/Makefile.am unixODBC-2.2.14/DRVConfig/nn/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/nn/Makefile.am 2008-06-17 06:14:56.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/nn/Makefile.am 2009-02-16 11:59:18.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libodbcnnS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libodbcnnS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/oplodbc/Makefile.am unixODBC-2.2.14/DRVConfig/oplodbc/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/oplodbc/Makefile.am 2008-06-17 06:15:01.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/oplodbc/Makefile.am 2009-02-16 11:58:56.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-liboplodbcS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+liboplodbcS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/sapdb/Makefile.am unixODBC-2.2.14/DRVConfig/sapdb/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/sapdb/Makefile.am 2008-06-17 06:15:07.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/sapdb/Makefile.am 2009-02-16 11:59:12.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libsapdbS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libsapdbS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/tds/Makefile.am unixODBC-2.2.14/DRVConfig/tds/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/tds/Makefile.am 2008-06-17 06:15:20.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/tds/Makefile.am 2009-02-16 11:59:36.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libtdsS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libtdsS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/DRVConfig/txt/Makefile.am unixODBC-2.2.14/DRVConfig/txt/Makefile.am
--- unixODBC-2.2.14.orig/DRVConfig/txt/Makefile.am 2008-06-17 06:15:31.000000000 -0400
+++ unixODBC-2.2.14/DRVConfig/txt/Makefile.am 2009-02-16 11:59:55.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include $(LTDLINCL)
-libodbctxtS_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libodbctxtS_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/Drivers/MiniSQL/Makefile.am unixODBC-2.2.14/Drivers/MiniSQL/Makefile.am
--- unixODBC-2.2.14.orig/Drivers/MiniSQL/Makefile.am 2008-06-17 06:16:11.000000000 -0400
+++ unixODBC-2.2.14/Drivers/MiniSQL/Makefile.am 2009-02-16 12:00:22.000000000 -0500
@@ -196,6 +196,6 @@
sqlFreeEnv.c \
sqlFreeStmt.c
-libodbcmini_la_LDFLAGS = -no-undefined -version-info 1:0:0 \
+libodbcmini_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) \
-L@msql_libraries@ -lmsql -module
diff -Naur unixODBC-2.2.14.orig/Drivers/Postgre7.1/Makefile.am unixODBC-2.2.14/Drivers/Postgre7.1/Makefile.am
--- unixODBC-2.2.14.orig/Drivers/Postgre7.1/Makefile.am 2008-06-17 12:09:03.000000000 -0400
+++ unixODBC-2.2.14/Drivers/Postgre7.1/Makefile.am 2009-02-16 12:02:30.000000000 -0500
@@ -3,7 +3,7 @@
INCLUDES = -I@top_srcdir@/include
libodbcpsql_la_LDFLAGS = \
- -version-info 2:0:0 \
+ -version-info $(LIB_VERSION) \
-no-undefined \
$(LIBSOCKET) $(LIBNSL) \
-export-dynamic \
diff -Naur unixODBC-2.2.14.orig/Drivers/PostgreSQL/Makefile.am unixODBC-2.2.14/Drivers/PostgreSQL/Makefile.am
--- unixODBC-2.2.14.orig/Drivers/PostgreSQL/Makefile.am 2008-06-17 06:16:48.000000000 -0400
+++ unixODBC-2.2.14/Drivers/PostgreSQL/Makefile.am 2009-02-16 12:00:05.000000000 -0500
@@ -4,7 +4,7 @@
libodbcpsql_la_LDFLAGS = \
-no-undefined \
- -version-info 1:0:0 \
+ -version-info $(LIB_VERSION) \
$(LIBSOCKET) $(LIBNSL) \
-module
diff -Naur unixODBC-2.2.14.orig/Drivers/nn/Makefile.am unixODBC-2.2.14/Drivers/nn/Makefile.am
--- unixODBC-2.2.14.orig/Drivers/nn/Makefile.am 2008-06-17 06:16:54.000000000 -0400
+++ unixODBC-2.2.14/Drivers/nn/Makefile.am 2009-02-16 12:00:16.000000000 -0500
@@ -2,7 +2,7 @@
INCLUDES = -I@top_srcdir@/include -I.
-libnn_la_LDFLAGS = -no-undefined -version-info 1:0:0 -module
+libnn_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION) -module
DEFS = -DUNIXODBC @DEFS@
diff -Naur unixODBC-2.2.14.orig/Drivers/template/Makefile.am unixODBC-2.2.14/Drivers/template/Makefile.am
--- unixODBC-2.2.14.orig/Drivers/template/Makefile.am 2008-06-17 06:17:03.000000000 -0400
+++ unixODBC-2.2.14/Drivers/template/Makefile.am 2009-02-16 12:00:11.000000000 -0500
@@ -4,7 +4,7 @@
DEFS = -DUNIXODBC @DEFS@
-libtemplate_la_LDFLAGS = -no-undefined -version-info 1:0:0
+libtemplate_la_LDFLAGS = -no-undefined -version-info $(LIB_VERSION)
EXTRA_DIST = \
driver.h \
diff -Naur unixODBC-2.2.14.orig/odbcinstQ/Makefile.am unixODBC-2.2.14/odbcinstQ/Makefile.am
--- unixODBC-2.2.14.orig/odbcinstQ/Makefile.am 2008-06-30 09:21:04.000000000 -0400
+++ unixODBC-2.2.14/odbcinstQ/Makefile.am 2009-02-16 12:00:29.000000000 -0500
@@ -1,6 +1,6 @@
libodbcinstQ_la_LDFLAGS = \
-no-undefined \
- -version-info 1:0:0 \
+ -version-info $(LIB_VERSION) \
-export-dynamic \
-export-symbols @srcdir@/odbcinstQ.exp \
-module
diff -Naur unixODBC-2.2.14.orig/odbcinstQ4/Makefile.am unixODBC-2.2.14/odbcinstQ4/Makefile.am
--- unixODBC-2.2.14.orig/odbcinstQ4/Makefile.am 2008-11-18 08:32:58.000000000 -0500
+++ unixODBC-2.2.14/odbcinstQ4/Makefile.am 2009-02-16 12:00:36.000000000 -0500
@@ -1,6 +1,6 @@
libodbcinstQ4_la_LDFLAGS = \
-no-undefined \
- -version-info 1:0:0 \
+ -version-info $(LIB_VERSION) \
-export-dynamic \
-export-symbols @srcdir@/odbcinstQ4.exp \
-module

View File

@ -1 +1 @@
9a116aad4059c31d231b626ffdf1869a unixODBC-2.2.12.tar.gz f47c2efb28618ecf5f33319140a7acd0 unixODBC-2.2.14.tar.gz

View File

@ -1,53 +0,0 @@
diff -Naur unixODBC-2.2.12.orig/DriverManager/DriverManager.exp unixODBC-2.2.12/DriverManager/DriverManager.exp
--- unixODBC-2.2.12.orig/DriverManager/DriverManager.exp 2005-03-09 04:06:42.000000000 -0500
+++ unixODBC-2.2.12/DriverManager/DriverManager.exp 2008-07-28 20:50:14.000000000 -0400
@@ -153,6 +153,8 @@
SQLTablesA
SQLTransact
ODBCSharedTraceFlag
+dm_log_write
+__post_internal_error
uodbc_open_stats
uodbc_close_stats
uodbc_get_stats
diff -Naur unixODBC-2.2.12.orig/cur/Makefile.am unixODBC-2.2.12/cur/Makefile.am
--- unixODBC-2.2.12.orig/cur/Makefile.am 2005-10-18 13:07:31.000000000 -0400
+++ unixODBC-2.2.12/cur/Makefile.am 2008-07-28 20:50:14.000000000 -0400
@@ -9,7 +9,7 @@
libodbccr_la_LDFLAGS = \
-version-info @LIB_VERSION@ \
- -export-symbols @srcdir@/cur.exp -export-dynamic
+ -export-symbols @srcdir@/cur.exp -export-dynamic ../DriverManager/libodbc.la
libodbccr_la_SOURCES = \
SQLAllocHandle.c \
diff -Naur unixODBC-2.2.12.orig/cur/Makefile.in unixODBC-2.2.12/cur/Makefile.in
--- unixODBC-2.2.12.orig/cur/Makefile.in 2006-08-31 08:24:23.000000000 -0400
+++ unixODBC-2.2.12/cur/Makefile.in 2008-07-28 20:50:14.000000000 -0400
@@ -252,7 +252,7 @@
libodbccr_la_LDFLAGS = \
-version-info @LIB_VERSION@ \
- -export-symbols @srcdir@/cur.exp -export-dynamic
+ -export-symbols @srcdir@/cur.exp -export-dynamic ../DriverManager/libodbc.la
libodbccr_la_SOURCES = \
SQLAllocHandle.c \
diff -Naur unixODBC-2.2.12.orig/sqp/sqpStoreDataType.c unixODBC-2.2.12/sqp/sqpStoreDataType.c
--- unixODBC-2.2.12.orig/sqp/sqpStoreDataType.c 2004-07-26 04:34:47.000000000 -0400
+++ unixODBC-2.2.12/sqp/sqpStoreDataType.c 2008-07-28 20:50:14.000000000 -0400
@@ -8,6 +8,13 @@
#include "sqp.h"
#include <sqlext.h>
+#ifndef WIN32
+#ifndef HAVE_STRICMP
+#define stricmp(s1,s2) strcasecmp(s1,s2)
+#define strnicmp(s1,s2,n) strncasecmp(s1,s2,n)
+#endif
+#endif
+
void sqpStoreDataType( char *pszType, int nPrecision, int nScale )
{

View File

@ -1,7 +1,7 @@
Summary: A complete ODBC driver manager for Linux Summary: A complete ODBC driver manager for Linux
Name: unixODBC Name: unixODBC
Version: 2.2.12 Version: 2.2.14
Release: 9%{?dist} Release: 1%{?dist}
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.unixODBC.org/ URL: http://www.unixODBC.org/
# Programs are GPL, libraries are LGPL, except News Server library is GPL. # Programs are GPL, libraries are LGPL, except News Server library is GPL.
@ -11,28 +11,28 @@ Source: http://www.unixODBC.org/%{name}-%{version}.tar.gz
Source1: odbcinst.ini Source1: odbcinst.ini
Source2: ODBCConfig.desktop Source2: ODBCConfig.desktop
Source3: DataManager.desktop Source3: DataManager.desktop
Source4: conffile.h
Patch1: depcomp.patch Patch1: depcomp.patch
Patch2: multilib-config.patch Patch2: multilib-config.patch
Patch4: parserupdate.patch Patch3: warning-cleanup.patch
Patch5: nortldglobal.patch Patch6: export-symbols.patch
Patch6: unixODBC-2.2.11-stricmp.patch Patch7: libtool-config.patch
Patch8: so-version-bump.patch
Patch9: keep-typedefs.patch
Conflicts: iodbc Conflicts: iodbc
BuildRequires: libX11-devel libXt-devel libXext-devel BuildRequires: libX11-devel libXt-devel libXext-devel
BuildRequires: qt3-devel readline-devel BuildRequires: qt3-devel readline-devel
BuildRequires: automake autoconf libtool bison flex BuildRequires: automake autoconf libtool libtool-ltdl-devel bison flex
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
%description %description
Install unixODBC if you want to access databases through ODBC. This Install unixODBC if you want to access databases through ODBC.
package includes low-level drivers for MySQL, PostgreSQL, and local files. You will also need the mysql-connector-odbc package if you want to access
However, the included drivers are not as up-to-date as the ones distributed a MySQL database, and/or the postgresql-odbc package for PostgreSQL.
separately. It is recommended that you install and use the MyODBC package
if you need a driver for MySQL, and/or the postgresql-odbc package for
PostgreSQL.
%package devel %package devel
Summary: Development files for programs which will use the unixODBC library. Summary: Development files for programs which will use the unixODBC library
Group: Development/Libraries Group: Development/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -42,7 +42,7 @@ drivers. If you want to develop programs that will access data through
ODBC, you need to install this package. ODBC, you need to install this package.
%package kde %package kde
Summary: KDE driver manager components for ODBC. Summary: KDE driver manager components for ODBC
Group: System Environment/Libraries Group: System Environment/Libraries
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
@ -54,25 +54,17 @@ This package contains components for the ODBCConfig and DataManager
%setup -q %setup -q
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch4 -p1 %patch3 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
# 2.2.8 includes a libtool that is too old for some of our architectures. # Blow away the embedded libtool and replace with build system's libtool.
# Blow it away and replace with build system's libtool. (We intend to use # (We will use the installed libtool anyway, but this makes sure they match.)
# the installed libtool anyway, but this makes sure they match.) rm -rf config.guess config.sub install-sh ltmain.sh libltdl
rm -rf config.guess config.sub ltmain.sh libltdl # this hack is so we can build with either libtool 2.2 or 1.5
cp -r /usr/share/libtool/* . libtoolize --install || libtoolize
# Use newer install-sh and mkinstalldirs, too
if [ -f libltdl/install-sh ]; then
cp -f libltdl/install-sh .
fi
if [ -f libltdl/mkinstalldirs ]; then
cp -f libltdl/mkinstalldirs .
fi
# libltdl patch has to be applied after the above
%patch5 -p1
%build %build
# pick up qt path # pick up qt path
@ -85,13 +77,13 @@ export QTDIR=
aclocal aclocal
automake --add-missing automake --add-missing
autoconf autoconf
pushd libltdl
aclocal
automake
autoconf
popd
%configure --with-gnu-ld=yes --enable-threads=yes --enable-gui=yes --enable-static=yes --enable-drivers # unixODBC 2.2.14 is not aliasing-safe
CFLAGS="%{optflags} -fno-strict-aliasing"
CXXFLAGS="$CFLAGS"
export CFLAGS CXXFLAGS
%configure --with-gnu-ld=yes --enable-threads=yes --enable-gui=yes --enable-drivers --enable-ltdllib
make all make all
%install %install
@ -112,13 +104,33 @@ cp DataManager/ODBC.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/odbc.xpm
cp DataManagerII/LinuxODBC.xpm $RPM_BUILD_ROOT/usr/share/pixmaps cp DataManagerII/LinuxODBC.xpm $RPM_BUILD_ROOT/usr/share/pixmaps
cp DataManagerII/ODBC.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/odbc.xpm cp DataManagerII/ODBC.xpm $RPM_BUILD_ROOT/usr/share/pixmaps/odbc.xpm
# multilib header hacks
# we only apply this to known Red Hat multilib arches, per bug #181335
case `uname -i` in
i386 | x86_64 | ppc | ppc64 | s390 | s390x | sparc | sparcv9 | sparc64 )
mv $RPM_BUILD_ROOT/usr/include/unixodbc_conf.h $RPM_BUILD_ROOT/usr/include/unixodbc_conf_`uname -i`.h
rm -f unixodbc_conf.h
sed s/CONFFILE/unixodbc_conf/ %{SOURCE4} >unixodbc_conf.h
install -m 644 unixodbc_conf.h $RPM_BUILD_ROOT/usr/include/
;;
*)
;;
esac
# remove obsolete Postgres drivers from the package (but not the setup code)
rm -f $RPM_BUILD_ROOT%{_libdir}/libodbcpsql.so*
# copy text driver documentation into main doc directory # copy text driver documentation into main doc directory
mkdir -p doc/Drivers/txt # currently disabled because upstream no longer includes text driver
cp -pr Drivers/txt/doc/* doc/Drivers/txt # mkdir -p doc/Drivers/txt
# cp -pr Drivers/txt/doc/* doc/Drivers/txt
# don't want to install doc Makefiles as docs # don't want to install doc Makefiles as docs
find doc -name 'Makefile*' | xargs rm find doc -name 'Makefile*' | xargs rm
# we do not want to ship static libraries
rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
# remove unpackaged files from the buildroot # remove unpackaged files from the buildroot
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/libltdl.* rm -f $RPM_BUILD_ROOT%{_libdir}/libltdl.*
@ -129,7 +141,7 @@ find $RPM_BUILD_ROOT%{_libdir} -name "*.so.*" | sed "s|^$RPM_BUILD_ROOT||" | gre
find $RPM_BUILD_ROOT%{_libdir} -name "*.so" | sed "s|^$RPM_BUILD_ROOT||" | grep -v /libodbcinstQ > devel-so-list find $RPM_BUILD_ROOT%{_libdir} -name "*.so" | sed "s|^$RPM_BUILD_ROOT||" | grep -v /libodbcinstQ > devel-so-list
# move these to main package, they're often dlopened... # move these to main package, they're often dlopened...
for lib in libodbc.so libodbcinst.so libodbcpsql.so libodbcpsqlS.so libodbcmyS.so for lib in libodbc.so libodbcinst.so libodbcpsqlS.so libodbcmyS.so
do do
echo "%{_libdir}/$lib" >> base-so-list echo "%{_libdir}/$lib" >> base-so-list
grep -v "/$lib$" devel-so-list > devel-so-list.x grep -v "/$lib$" devel-so-list > devel-so-list.x
@ -152,7 +164,6 @@ rm -rf $RPM_BUILD_ROOT
%files devel -f devel-so-list %files devel -f devel-so-list
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/* %{_includedir}/*
%{_libdir}/*.a
%files kde %files kde
%defattr(-,root,root) %defattr(-,root,root)
@ -174,6 +185,17 @@ rm -rf $RPM_BUILD_ROOT
%postun -p /sbin/ldconfig %postun -p /sbin/ldconfig
%changelog %changelog
* Fri Feb 20 2009 Tom Lane <tgl@redhat.com> 2.2.14-1
- Update to unixODBC 2.2.14. Note this involves an ABI break and a consequent
soname version bump, because upstream fixed some mistakes in the widths of
some API datatypes for 64-bit platforms. Also, the formerly embedded
mysql, postgresql, and text drivers have been removed. (For mysql and
postgresql, use the separate mysql-connector-odbc and postgresql-odbc
packages, which are far more up to date. The text driver is not currently
shipped by upstream at all, but might get revived as a separate SRPM later.)
- Stop shipping .a library files, per distro policy.
- Fixes for libtool 2.2.
* Mon Jul 28 2008 Tom Lane <tgl@redhat.com> 2.2.12-9 * Mon Jul 28 2008 Tom Lane <tgl@redhat.com> 2.2.12-9
- Fix build failure caused by new default patch fuzz = 0 policy in rawhide. - Fix build failure caused by new default patch fuzz = 0 policy in rawhide.

1713
warning-cleanup.patch Normal file

File diff suppressed because it is too large Load Diff