From f987edfef0fd70a4419920f6be196dbd8ae0b877f23840bc48385946fd90154f Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 6 Nov 2012 09:45:33 +0000 Subject: [PATCH 01/14] - updated to versio 2.3.1 * reduced unixODBC, after the GUI and additional driver parts have been split off to their own project. * change to the new default SQLLEN size for 64 bit platforms * number of bug fixes and changes, see http://www.unixodbc.org/ OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=13 --- unixODBC-2.2.12-CVE-2011-1145.patch | 26 ----- unixODBC-2.2.12-dm.patch | 43 -------- unixODBC-2.2.12-flex.patch | 11 -- unixODBC-2.2.12-libodbcinst-exports.patch | 10 +- unixODBC-2.2.12-uninitialized.patch | 36 +++--- unixODBC-2.2.12.tar.bz2 | 3 - unixODBC-2.3.1.tar.bz2 | 3 + unixODBC-gccwarnings.patch | 83 ++++++-------- unixODBC-gui-qt.changes | 54 --------- unixODBC-gui-qt.spec | 127 ---------------------- unixODBC-iaddr.patch | 30 +---- unixODBC-nonvoid.patch | 57 +++------- unixODBC-odbctest.patch | 27 ----- unixODBC-paths.patch | 120 ++++++++++++-------- unixODBC.changes | 9 ++ unixODBC.spec | 44 ++------ 16 files changed, 172 insertions(+), 511 deletions(-) delete mode 100644 unixODBC-2.2.12-CVE-2011-1145.patch delete mode 100644 unixODBC-2.2.12-dm.patch delete mode 100644 unixODBC-2.2.12-flex.patch delete mode 100644 unixODBC-2.2.12.tar.bz2 create mode 100644 unixODBC-2.3.1.tar.bz2 delete mode 100644 unixODBC-gui-qt.changes delete mode 100644 unixODBC-gui-qt.spec delete mode 100644 unixODBC-odbctest.patch diff --git a/unixODBC-2.2.12-CVE-2011-1145.patch b/unixODBC-2.2.12-CVE-2011-1145.patch deleted file mode 100644 index d0913f5..0000000 --- a/unixODBC-2.2.12-CVE-2011-1145.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- trunk/DriverManager/SQLDriverConnect.c 2011/01/12 15:50:07 23 -+++ trunk/DriverManager/SQLDriverConnect.c 2011/03/09 15:38:55 27 -@@ -664,7 +664,7 @@ - { - DMHDBC connection = (DMHDBC)hdbc; - struct con_struct con_struct; -- char *driver, *dsn = NULL, *filedsn, *tsavefile, savefile[ 128 ]; -+ char *driver, *dsn = NULL, *filedsn, *tsavefile, savefile[ INI_MAX_PROPERTY_VALUE + 1 ]; - char lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; - char driver_name[ INI_MAX_PROPERTY_VALUE + 1 ]; - SQLRETURN ret_from_connect; -@@ -969,7 +969,13 @@ - tsavefile = __get_attribute_value( &con_struct, "SAVEFILE" ); - if ( tsavefile ) - { -- strcpy( savefile, tsavefile ); -+ if ( strlen( tsavefile ) > INI_MAX_PROPERTY_VALUE ) { -+ memcpy( savefile, tsavefile, INI_MAX_PROPERTY_VALUE ); -+ savefile[ INI_MAX_PROPERTY_VALUE ] = '\0'; -+ } -+ else { -+ strcpy( savefile, tsavefile ); -+ } - } - else - { diff --git a/unixODBC-2.2.12-dm.patch b/unixODBC-2.2.12-dm.patch deleted file mode 100644 index 2de9499..0000000 --- a/unixODBC-2.2.12-dm.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -ur unixODBC-orig/DataManager/Makefile.am unixODBC-2.2.11/DataManager/Makefile.am ---- unixODBC-orig/DataManager/Makefile.am 2004-09-13 16:46:11.000000000 +0200 -+++ unixODBC-2.2.11/DataManager/Makefile.am 2005-04-25 16:08:17.000000000 +0200 -@@ -9,10 +9,11 @@ - @USER_LDFLAGS@ \ - @LIB_QT@ \ - ../odbcinst/libodbcinst.la \ -+ ../ini/libinilc.la \ - ../DriverManager/libodbc.la - - DataManager_DEPENDANCIES = \ -- ../odbcinst/libodbcinst.la \ -+ ../odbcinst/libodbcinst.la \ - ../DriverManager/libodbc.la - - DataManager_SOURCES = \ -diff -ur unixODBC-orig/DataManagerII/Makefile.am unixODBC-2.2.11/DataManagerII/Makefile.am ---- unixODBC-orig/DataManagerII/Makefile.am 2004-11-20 13:57:38.000000000 +0100 -+++ unixODBC-2.2.11/DataManagerII/Makefile.am 2005-04-25 17:31:06.000000000 +0200 -@@ -9,10 +9,11 @@ - @USER_LDFLAGS@ \ - @LIB_QT@ \ - ../odbcinst/libodbcinst.la \ -+ ../ini/libinilc.la \ - ../DriverManager/libodbc.la - - DataManagerII_DEPENDANCIES = \ -- ../odbcinst/libodbcinst.la \ -+ ../odbcinst/libodbcinst.la \ - ../DriverManager/libodbc.la - - DataManagerII_SOURCES = \ -diff -ur unixODBC-orig/odbctest/Makefile.am unixODBC-2.2.11/odbctest/Makefile.am ---- unixODBC-orig/odbctest/Makefile.am 2004-09-13 16:47:34.000000000 +0200 -+++ unixODBC-2.2.11/odbctest/Makefile.am 2005-04-25 18:35:38.000000000 +0200 -@@ -10,6 +10,7 @@ - @LIB_QT@ \ - ../odbcinst/libodbcinst.la \ - ../DriverManager/libodbc.la \ -+ ../ini/libinilc.la \ - $(LIBLTDL) $(LIBADD_DL) - - odbctest_DEPENDANCIES = ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la diff --git a/unixODBC-2.2.12-flex.patch b/unixODBC-2.2.12-flex.patch deleted file mode 100644 index 66907dc..0000000 --- a/unixODBC-2.2.12-flex.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- sqp/lex.l -+++ sqp/lex.l -@@ -237,7 +237,7 @@ - { - sprintf( g_szError, "%s processing '%s' on line %d", s, yytext, g_nLineNo ); - -- YY_FLUSH_BUFFER; -+ yy_flush_buffer( YY_CURRENT_BUFFER ); - } - - /********************************************************************** diff --git a/unixODBC-2.2.12-libodbcinst-exports.patch b/unixODBC-2.2.12-libodbcinst-exports.patch index 68a3c57..47a9bfb 100644 --- a/unixODBC-2.2.12-libodbcinst-exports.patch +++ b/unixODBC-2.2.12-libodbcinst-exports.patch @@ -1,10 +1,10 @@ Index: odbcinst/odbcinst.exp -================================================================================ ---- odbcinst/odbcinst.exp +=================================================================== +--- odbcinst/odbcinst.exp.orig +++ odbcinst/odbcinst.exp -@@ -60,3 +60,50 @@ - _odbcinst_SystemINI - _odbcinst_UserINI +@@ -64,3 +64,50 @@ _odbcinst_UserINI + _odbcinst_FileINI + _SQLDriverConnectPrompt inst_logPushMsg +iniAllTrim +iniAppend diff --git a/unixODBC-2.2.12-uninitialized.patch b/unixODBC-2.2.12-uninitialized.patch index 00b025c..5e67c88 100644 --- a/unixODBC-2.2.12-uninitialized.patch +++ b/unixODBC-2.2.12-uninitialized.patch @@ -1,27 +1,23 @@ htbl_stmt hasn't yet been allocated in both cases ---- Drivers/PostgreSQL/info.c -+++ Drivers/PostgreSQL/info.c -@@ -2043,7 +2043,6 @@ - stmt->errormsg = "No Table specified to SQLPrimaryKeys."; - stmt->errornumber = STMT_INTERNAL_ERROR; - SC_log_error(func, "", stmt); -- PG__SQLFreeStmt(htbl_stmt, SQL_DROP); - return SQL_ERROR; - } - -@@ -2228,7 +2227,6 @@ - stmt->errormsg = "Couldn't allocate memory for SQLForeignKeys result."; - stmt->errornumber = STMT_NO_MEMORY_ERROR; - SC_log_error(func, "", stmt); -- PG__SQLFreeStmt(htbl_stmt, SQL_DROP); - return SQL_ERROR; +Index: Drivers/Postgre7.1/info.c +=================================================================== +--- Drivers/Postgre7.1/info.c.orig ++++ Drivers/Postgre7.1/info.c +@@ -2345,6 +2345,7 @@ Int2 result_cols; + if(!stmt->result) { + SC_set_error(stmt, STMT_NO_MEMORY_ERROR, "Couldn't allocate memory for SQLForeignKeys result."); + SC_log_error(func, "", stmt); ++ PG__SQLFreeStmt(htbl_stmt, SQL_DROP); + return SQL_ERROR; } ---- Drivers/PostgreSQL/convert.c -+++ Drivers/PostgreSQL/convert.c -@@ -178,6 +178,7 @@ +Index: Drivers/Postgre7.1/convert.c +=================================================================== +--- Drivers/Postgre7.1/convert.c.orig ++++ Drivers/Postgre7.1/convert.c +@@ -223,6 +223,7 @@ struct tm tp; - } + memset(&st, 0, sizeof(SIMPLE_TIME)); + memset(&st, 0, sizeof(SIMPLE_TIME)); mylog("copy_and_convert: field_type = %d, fctype = %d, value = '%s', cbValueMax=%d\n", field_type, fCType, (value==NULL)?"":value, cbValueMax); diff --git a/unixODBC-2.2.12.tar.bz2 b/unixODBC-2.2.12.tar.bz2 deleted file mode 100644 index a76bc56..0000000 --- a/unixODBC-2.2.12.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:813aa3a6d8a92e895fb50f73bc6b17869ae6a435f53bce719048df87c50daefe -size 2158675 diff --git a/unixODBC-2.3.1.tar.bz2 b/unixODBC-2.3.1.tar.bz2 new file mode 100644 index 0000000..fdf9739 --- /dev/null +++ b/unixODBC-2.3.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52695ca80d5dff5a0ba89827d2c93372a2ad38157448eeb499b9f0908408b94c +size 1356506 diff --git a/unixODBC-gccwarnings.patch b/unixODBC-gccwarnings.patch index f42bf2e..b1b3e56 100644 --- a/unixODBC-gccwarnings.patch +++ b/unixODBC-gccwarnings.patch @@ -1,42 +1,31 @@ ---- Drivers/PostgreSQL/info.c -+++ Drivers/PostgreSQL/info.c -@@ -1667,7 +1667,7 @@ - StatementClass *col_stmt, *indx_stmt; - char column_name[MAX_INFO_STRING]; - char **column_names = 0; --Int4 column_name_len; -+SQLLEN column_name_len; - int total_columns = 0; - char error = TRUE; - ConnInfo *ci; ---- exe/odbc-config.c +Index: exe/odbc-config.c +=================================================================== +--- exe/odbc-config.c.orig +++ exe/odbc-config.c -@@ -22,6 +22,8 @@ - **********************************************************************/ +@@ -23,6 +23,8 @@ + #include #include +#include +#include - static void usage( void ) - { -@@ -169,4 +171,5 @@ - exit( -1 ); - } - } -+ return 0; - } ---- Drivers/nn/nndate.c + #ifdef HAVE_STDLIB_H + #include +Index: Drivers/nn/nndate.c +=================================================================== +--- Drivers/nn/nndate.c.orig +++ Drivers/nn/nndate.c -@@ -15,6 +15,7 @@ - #include +@@ -16,6 +16,7 @@ + #include #include +#include "misc.h" static char* month_name[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", ---- Drivers/nn/misc.h +Index: Drivers/nn/misc.h +=================================================================== +--- /dev/null +++ Drivers/nn/misc.h @@ -0,0 +1,7 @@ +#ifndef _MISC_H @@ -46,30 +35,23 @@ + + +#endif ---- Drivers/nn/connect.c +Index: Drivers/nn/connect.c +=================================================================== +--- Drivers/nn/connect.c.orig +++ Drivers/nn/connect.c -@@ -13,6 +13,7 @@ - GNU General Public License for more details. +@@ -14,6 +14,7 @@ **/ + #include #include "driver.h" +#include "misc.h" void* nnodbc_getenverrstack(void* henv) { ---- Drivers/nn/config.h -+++ Drivers/nn/config.h -@@ -21,6 +21,8 @@ - # include - # include - # include -+# include -+# include - - # define MEM_ALLOC(size) (malloc((size_t)(size))) - # define MEM_FREE(ptr) {if(ptr) free(ptr);} ---- Drivers/nn/nntp.c +Index: Drivers/nn/nntp.c +=================================================================== +--- Drivers/nn/nntp.c.orig +++ Drivers/nn/nntp.c -@@ -35,6 +35,7 @@ +@@ -36,6 +36,7 @@ #endif #include @@ -77,9 +59,11 @@ typedef struct { long article_num; ---- Drivers/nn/nncol.c +Index: Drivers/nn/nncol.c +=================================================================== +--- Drivers/nn/nncol.c.orig +++ Drivers/nn/nncol.c -@@ -17,6 +17,7 @@ +@@ -18,6 +18,7 @@ #include #include "nncol.ci" @@ -87,17 +71,20 @@ int nnsql_getcolidxbyname( char* col_name ) { ---- Drivers/Postgre7.1/dlg_specific.c +Index: Drivers/Postgre7.1/dlg_specific.c +=================================================================== +--- Drivers/Postgre7.1/dlg_specific.c.orig +++ Drivers/Postgre7.1/dlg_specific.c -@@ -21,10 +21,10 @@ +@@ -21,11 +21,11 @@ #endif #ifndef WIN32 -+# include +-# include + # include # ifdef UNIXODBC # include # else --# include ++# include # include "gpps.h" # define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) # define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d) diff --git a/unixODBC-gui-qt.changes b/unixODBC-gui-qt.changes deleted file mode 100644 index 427a389..0000000 --- a/unixODBC-gui-qt.changes +++ /dev/null @@ -1,54 +0,0 @@ -------------------------------------------------------------------- -Mon Jun 13 11:17:00 CEST 2011 - mhrusecky@suse.cz - -- fixed CVE-2011-1145 (bnc#678796) - -------------------------------------------------------------------- -Mon Oct 13 15:45:51 CEST 2008 - nadvornik@suse.cz - -- dropped the dlopen patch, it no longer matches - -------------------------------------------------------------------- -Wed Nov 15 16:54:03 CET 2006 - anosek@suse.cz - -- fixed compiler warning: variable is used before its value is set - [#218998] (ctracing.patch) - -------------------------------------------------------------------- -Wed Oct 18 12:02:48 CEST 2006 - anosek@suse.cz - -- updated to version 2.2.12 - * bugfixes - -------------------------------------------------------------------- -Tue Jul 25 13:31:21 CEST 2006 - mmarek@suse.de - -- fix build with modular Xorg - -------------------------------------------------------------------- -Thu Jun 15 15:31:15 CEST 2006 - mmarek@suse.cz - -- moved %{_libdir}/unixODBC/*.so to main package, so that libfoo.so - and libfooS.so can be used in driver configuration. - -------------------------------------------------------------------- -Thu Jun 15 10:06:51 CEST 2006 - mmarek@suse.cz - -- updated distributed libltdl to make autoconf happy -- dropped unixODBC-gui-gtk - -------------------------------------------------------------------- -Thu Jun 8 12:45:16 CEST 2006 - mmarek@suse.cz - -- reduce BuildRequires - -------------------------------------------------------------------- -Wed Jan 25 21:42:27 CET 2006 - mls@suse.de - -- converted neededforbuild to BuildRequires - -------------------------------------------------------------------- -Fri Jan 20 01:24:09 CET 2006 - ro@suse.de - -- split specfile for gui packages - diff --git a/unixODBC-gui-qt.spec b/unixODBC-gui-qt.spec deleted file mode 100644 index 782cc8e..0000000 --- a/unixODBC-gui-qt.spec +++ /dev/null @@ -1,127 +0,0 @@ -# -# spec file for package unixODBC-gui-qt -# -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. -# -# All modifications and additions to the file contributed by third parties -# remain the property of their copyright owners, unless otherwise agreed -# upon. The license for this file, and modifications and additions to the -# file, is the same license as for the pristine package itself (unless the -# license for the pristine package is not an Open Source License, in which -# case the license is the MIT License). An "Open Source License" is a -# license that conforms to the Open Source Definition (Version 1.9) -# published by the Open Source Initiative. - -# Please submit bugfixes or comments via http://bugs.opensuse.org/ -# - -# norootforbuild - - -Name: unixODBC-gui-qt -BuildRequires: qt3-devel -BuildRequires: libtool -Version: 2.2.12 -Release: 0 -Summary: ODBC Configuration Utility, Data Source Browser, and ODBC Test Tool based -License: GPLv2+ -Url: http://www.unixodbc.org/ -Group: Productivity/Databases/Tools -Requires: unixODBC = %{version} -Source: unixODBC-%{version}.tar.bz2 -Source1: README.SuSE -Patch1: unixODBC-paths.patch -Patch4: unixODBC-odbctest.patch -Patch5: unixODBC-iaddr.patch -Patch6: unixODBC-nonvoid.patch -Patch7: unixODBC-gccwarnings.patch -Patch8: unixODBC-%{version}-dm.patch -Patch10: unixODBC-%{version}-libodbcinst-exports.patch -Patch11: unixODBC-%{version}-flex.patch -Patch12: unixODBC-%{version}-ctracing.patch -Patch13: unixODBC-2.2.12-CVE-2011-1145.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build - -%description -A collection of graphical tools (based on QT3) for UnixODBC. - - - -Authors: --------- - Peter Harvey - Nick Gorham - -%prep -%setup -q -n unixODBC-%{version} -%patch1 -%patch4 -%patch5 -%patch6 -%patch7 -#patch8 -p1 -%patch10 -%patch11 -%patch12 -%patch13 -p1 -install -m 644 %{S:1} . - -%build -export -n LANG LINGUAS LC_ALL -rm -rf libltdl -LIBTOOLIZE="libtoolize --ltdl" autoreconf --force --install -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" -./configure \ - --prefix=%{_prefix} \ - --mandir=%{_mandir} \ - --infodir=%{_infodir} \ - --libdir=%{_libdir} \ - --sysconfdir=%{_sysconfdir}/unixODBC \ - --with-qt-dir=/usr/lib/qt3 \ - --with-qt-libraries=/usr/lib/qt3/%{_lib} \ - --x-libraries=`pkg-config --variable libdir x11` \ - --x-includes=`pkg-config --variable includedir x11` \ - --disable-stats -make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" - -%install -make DESTDIR=$RPM_BUILD_ROOT install -rm -rf $RPM_BUILD_ROOT/usr/share/libtool -#remove files packaged in main specfile -rm -f $RPM_BUILD_ROOT/etc/unixODBC/odbc.ini -rm -f $RPM_BUILD_ROOT/etc/unixODBC/odbcinst.ini -rm -f $RPM_BUILD_ROOT/usr/bin/dltest -rm -f $RPM_BUILD_ROOT/usr/bin/isql -rm -f $RPM_BUILD_ROOT/usr/bin/iusql -rm -f $RPM_BUILD_ROOT/usr/bin/odbc_config -rm -f $RPM_BUILD_ROOT/usr/bin/odbcinst -rm -f $RPM_BUILD_ROOT/usr/include/autotest.h -rm -f $RPM_BUILD_ROOT/usr/include/odbcconfig.h -rm -f $RPM_BUILD_ROOT/usr/include/odbcinst.h -rm -f $RPM_BUILD_ROOT/usr/include/odbcinstext.h -rm -f $RPM_BUILD_ROOT/usr/include/sql.h -rm -f $RPM_BUILD_ROOT/usr/include/sqlext.h -rm -f $RPM_BUILD_ROOT/usr/include/sqltypes.h -rm -f $RPM_BUILD_ROOT/usr/include/sqlucode.h -rm -f $RPM_BUILD_ROOT/usr/include/uodbc_stats.h -rm -f $RPM_BUILD_ROOT/usr/%_lib/libboundparam.* -rm -f $RPM_BUILD_ROOT/usr/%_lib/libgtrtst.* -rm -f $RPM_BUILD_ROOT/usr/%_lib/libodbc.* -rm -f $RPM_BUILD_ROOT/usr/%_lib/libodbccr.* -rm -f $RPM_BUILD_ROOT/usr/%_lib/libodbcinst.* -rm -f $RPM_BUILD_ROOT/usr/%_lib/libtemplate.* -rm -rf $RPM_BUILD_ROOT/usr/%_lib/unixODBC - -%clean -rm -rf "$RPM_BUILD_ROOT" - -%files -%defattr(-, root, root) -%{_prefix}/bin/DataManager -%{_prefix}/bin/DataManagerII -%{_prefix}/bin/ODBCConfig -%{_prefix}/bin/qtodbctest -%{_libdir}/libodbcinstQ.* -%exclude /usr/include/uodbc_extras.h - -%changelog diff --git a/unixODBC-iaddr.patch b/unixODBC-iaddr.patch index 3330656..a1c16ca 100644 --- a/unixODBC-iaddr.patch +++ b/unixODBC-iaddr.patch @@ -1,6 +1,8 @@ ---- Drivers/Postgre7.1/socket.c +Index: Drivers/Postgre7.1/socket.c +=================================================================== +--- Drivers/Postgre7.1/socket.c.orig +++ Drivers/Postgre7.1/socket.c -@@ -100,7 +100,7 @@ +@@ -100,7 +100,7 @@ SOCK_connect_to_ip(SocketClass *self, un { struct hostent *host; struct sockaddr_in sadr; @@ -9,29 +11,7 @@ if (self->socket != -1) { self->errornumber = SOCKET_ALREADY_CONNECTED; -@@ -113,8 +113,8 @@ - /* If it is a valid IP address, use it. - Otherwise use hostname lookup. - */ -- iaddr = inet_addr(hostname); -- if (iaddr == INADDR_NONE) { -+ iaddr.s_addr = inet_addr(hostname); -+ if (iaddr.s_addr == INADDR_NONE) { - host = gethostbyname(hostname); - if (host == NULL) { - self->errornumber = SOCKET_HOST_NOT_FOUND; ---- Drivers/PostgreSQL/socket.c -+++ Drivers/PostgreSQL/socket.c -@@ -102,7 +102,7 @@ - { - struct hostent *host; - struct sockaddr_in sadr; --unsigned long iaddr; -+struct in_addr iaddr; - - if (self->socket != -1) { - self->errornumber = SOCKET_ALREADY_CONNECTED; -@@ -115,8 +115,8 @@ +@@ -113,8 +113,8 @@ unsigned long iaddr; /* If it is a valid IP address, use it. Otherwise use hostname lookup. */ diff --git a/unixODBC-nonvoid.patch b/unixODBC-nonvoid.patch index 18d5803..9ce9eb2 100644 --- a/unixODBC-nonvoid.patch +++ b/unixODBC-nonvoid.patch @@ -1,16 +1,8 @@ ---- DriverManager/SQLAllocHandle.c -+++ DriverManager/SQLAllocHandle.c -@@ -224,6 +224,7 @@ - * - **********************************************************************/ - -+ - #include "drivermanager.h" - #if defined ( COLLECT_STATS ) && defined( HAVE_SYS_SEM_H ) - #include "__stats.h" ---- DriverManager/SQLConnect.c +Index: DriverManager/SQLConnect.c +=================================================================== +--- DriverManager/SQLConnect.c.orig +++ DriverManager/SQLConnect.c -@@ -764,6 +764,7 @@ +@@ -919,6 +919,7 @@ static void odbc_dlclose( void *handle ) } mutex_lib_exit(); @@ -18,46 +10,25 @@ } /* ---- cur/SQLAllocHandle.c -+++ cur/SQLAllocHandle.c -@@ -139,4 +139,5 @@ - } - break; - } -+ return 0; - } ---- cur/SQLEndTran.c +Index: cur/SQLEndTran.c +=================================================================== +--- cur/SQLEndTran.c.orig +++ cur/SQLEndTran.c -@@ -70,4 +70,5 @@ +@@ -78,4 +78,5 @@ SQLRETURN CLEndTran( SQLSMALLINT handle_ default: return SQL_ERROR; } + return 0; } ---- cur/SQLError.c -+++ cur/SQLError.c -@@ -149,4 +149,5 @@ - - return SQL_NO_DATA; - } -+ return 0; - } ---- cur/SQLFreeHandle.c -+++ cur/SQLFreeHandle.c -@@ -102,5 +102,6 @@ - */ - return SQL_ERROR; - } -+ return 0; - } - ---- odbcinst/SQLSetConfigMode.c +Index: odbcinst/SQLSetConfigMode.c +=================================================================== +--- odbcinst/SQLSetConfigMode.c.orig +++ odbcinst/SQLSetConfigMode.c -@@ -23,6 +23,7 @@ - __set_config_mode( int mode ) +@@ -24,6 +24,7 @@ static int __config_mode = ODBC_BOTH_DSN + void __set_config_mode( int mode ) { __config_mode = mode; + return 0; } - __get_config_mode() + int __get_config_mode( void ) diff --git a/unixODBC-odbctest.patch b/unixODBC-odbctest.patch deleted file mode 100644 index 271ff17..0000000 --- a/unixODBC-odbctest.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- odbctest/Makefile.am -+++ odbctest/Makefile.am -@@ -1,10 +1,10 @@ - if QT - --bin_PROGRAMS = odbctest -+bin_PROGRAMS = qtodbctest - - INCLUDES = -I@top_srcdir@/include $(QT_CXXFLAGS) -DSYSTEM_FILE_PATH=\"@sysconfdir@\" $(LTDLINCL) - --odbctest_LDADD = \ -+qtodbctest_LDADD = \ - $(QT_LDFLAGS) \ - $(QT_LIBS) \ - ../ini/libinilc.la \ -@@ -12,9 +12,9 @@ - ../DriverManager/libodbc.la \ - $(LIBLTDL) $(LIBADD_DL) - --odbctest_DEPENDANCIES = ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la -+qtodbctest_DEPENDANCIES = ../odbcinst/libodbcinst.la ../DriverManager/libodbc.la - --odbctest_SOURCES = \ -+qtodbctest_SOURCES = \ - tools.cpp \ - stmt.cpp \ - results.cpp \ diff --git a/unixODBC-paths.patch b/unixODBC-paths.patch index 53784f6..59ce2f1 100644 --- a/unixODBC-paths.patch +++ b/unixODBC-paths.patch @@ -1,130 +1,156 @@ ---- DRVConfig/MiniSQL/Makefile.am +Index: DRVConfig/MiniSQL/Makefile.am +=================================================================== +--- DRVConfig/MiniSQL/Makefile.am.orig +++ DRVConfig/MiniSQL/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libodbcminiS_la_LDFLAGS = -no-undefined libodbcminiS_la_SOURCES = odbcminiS.c +libdir = @libdir@/unixODBC ---- DRVConfig/MySQL/Makefile.am +Index: DRVConfig/MySQL/Makefile.am +=================================================================== +--- DRVConfig/MySQL/Makefile.am.orig +++ DRVConfig/MySQL/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libodbcmyS_la_LDFLAGS = -no-undefined - libodbcmyS_la_SOURCES = odbcmyS.c +libdir = @libdir@/unixODBC ---- DRVConfig/Oracle/Makefile.am +Index: DRVConfig/Oracle/Makefile.am +=================================================================== +--- DRVConfig/Oracle/Makefile.am.orig +++ DRVConfig/Oracle/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ liboraodbcS_la_LDFLAGS = -no-undefined liboraodbcS_la_SOURCES = oraodbcS.c +libdir = @libdir@/unixODBC ---- DRVConfig/PostgreSQL/Makefile.am +Index: DRVConfig/PostgreSQL/Makefile.am +=================================================================== +--- DRVConfig/PostgreSQL/Makefile.am.orig +++ DRVConfig/PostgreSQL/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libodbcpsqlS_la_LDFLAGS = -no-undefined libodbcpsqlS_la_SOURCES = odbcpsqlS.c +libdir = @libdir@/unixODBC ---- DRVConfig/drvcfg1/Makefile.am +Index: DRVConfig/drvcfg1/Makefile.am +=================================================================== +--- DRVConfig/drvcfg1/Makefile.am.orig +++ DRVConfig/drvcfg1/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libodbcdrvcfg1S_la_LDFLAGS = -no-undefin libodbcdrvcfg1S_la_SOURCES = drvcfg1.c +libdir = @libdir@/unixODBC ---- DRVConfig/drvcfg2/Makefile.am +Index: DRVConfig/drvcfg2/Makefile.am +=================================================================== +--- DRVConfig/drvcfg2/Makefile.am.orig +++ DRVConfig/drvcfg2/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libodbcdrvcfg2S_la_LDFLAGS = -no-undefin libodbcdrvcfg2S_la_SOURCES = drvcfg2.c +libdir = @libdir@/unixODBC ---- DRVConfig/esoob/Makefile.am +Index: DRVConfig/esoob/Makefile.am +=================================================================== +--- DRVConfig/esoob/Makefile.am.orig +++ DRVConfig/esoob/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libesoobS_la_LDFLAGS = -no-undefined -v libesoobS_la_SOURCES = esoobS.c +libdir = @libdir@/unixODBC ---- DRVConfig/nn/Makefile.am +Index: DRVConfig/nn/Makefile.am +=================================================================== +--- DRVConfig/nn/Makefile.am.orig +++ DRVConfig/nn/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libodbcnnS_la_LDFLAGS = -no-undefined - libodbcnnS_la_SOURCES = drvcfg.c +libdir = @libdir@/unixODBC ---- DRVConfig/oplodbc/Makefile.am +Index: DRVConfig/oplodbc/Makefile.am +=================================================================== +--- DRVConfig/oplodbc/Makefile.am.orig +++ DRVConfig/oplodbc/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ liboplodbcS_la_LDFLAGS = -no-undefined liboplodbcS_la_SOURCES = oplodbc.c +libdir = @libdir@/unixODBC ---- DRVConfig/sapdb/Makefile.am +Index: DRVConfig/sapdb/Makefile.am +=================================================================== +--- DRVConfig/sapdb/Makefile.am.orig +++ DRVConfig/sapdb/Makefile.am -@@ -9,3 +9,5 @@ +@@ -7,3 +7,5 @@ libsapdbS_la_LDFLAGS = -no-undefined -v libsapdbS_la_SOURCES = sapdb.c EXTRA_DIST = README + +libdir = @libdir@/unixODBC ---- DRVConfig/tds/Makefile.am +Index: DRVConfig/tds/Makefile.am +=================================================================== +--- DRVConfig/tds/Makefile.am.orig +++ DRVConfig/tds/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libtdsS_la_LDFLAGS = -no-undefined -ver libtdsS_la_SOURCES = tdsS.c +libdir = @libdir@/unixODBC ---- DRVConfig/txt/Makefile.am +Index: DRVConfig/txt/Makefile.am +=================================================================== +--- DRVConfig/txt/Makefile.am.orig +++ DRVConfig/txt/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libodbctxtS_la_LDFLAGS = -no-undefined libodbctxtS_la_SOURCES = drvcfg.c +libdir = @libdir@/unixODBC ---- Drivers/Postgre7.1/Makefile.am +Index: Drivers/Postgre7.1/Makefile.am +=================================================================== +--- Drivers/Postgre7.1/Makefile.am.orig +++ Drivers/Postgre7.1/Makefile.am -@@ -69,3 +69,5 @@ +@@ -72,3 +72,5 @@ libodbcpsql_la_SOURCES = \ statement.c \ tuple.c \ tuplelist.c + +libdir = @libdir@/unixODBC ---- Drivers/PostgreSQL/Makefile.am -+++ Drivers/PostgreSQL/Makefile.am -@@ -64,3 +64,5 @@ - statement.c \ - tuple.c \ - tuplelist.c -+ -+libdir = @libdir@/unixODBC ---- Drivers/nn/Makefile.am +Index: Drivers/nn/Makefile.am +=================================================================== +--- Drivers/nn/Makefile.am.orig +++ Drivers/nn/Makefile.am -@@ -76,3 +76,4 @@ +@@ -74,3 +74,4 @@ libnn_la_SOURCES = \ nndate.c \ nntp.c +libdir = @libdir@/unixODBC ---- Drivers/txt/Makefile.am -+++ Drivers/txt/Makefile.am -@@ -112,3 +112,4 @@ - driver.h \ - driverextras.h - -+libdir = @libdir@/unixODBC ---- DRVConfig/Mimer/Makefile.am +Index: DRVConfig/Mimer/Makefile.am +=================================================================== +--- DRVConfig/Mimer/Makefile.am.orig +++ DRVConfig/Mimer/Makefile.am -@@ -8,3 +8,4 @@ +@@ -6,3 +6,4 @@ libmimerS_la_LDFLAGS = -no-undefined -ve libmimerS_la_SOURCES = mimerS.c +libdir = @libdir@/unixODBC ---- Drivers/template/Makefile.am +Index: Drivers/template/Makefile.am +=================================================================== +--- Drivers/template/Makefile.am.orig +++ Drivers/template/Makefile.am -@@ -101,3 +101,5 @@ +@@ -99,3 +99,5 @@ libtemplate_la_SOURCES = \ _NativeTypeDesc.c \ _NativeTypeLength.c \ _NativeTypePrecision.c + +libdir = @libdir@/unixODBC +Index: Drivers/MiniSQL/Makefile.am +=================================================================== +--- Drivers/MiniSQL/Makefile.am.orig ++++ Drivers/MiniSQL/Makefile.am +@@ -196,3 +196,4 @@ EXTRA_DIST = \ + libodbcmini_la_LDFLAGS = -no-undefined -version-info 1:0:0 \ + -L@msql_libraries@ -lmsql -module + ++libdir = @libdir@/unixODBC diff --git a/unixODBC.changes b/unixODBC.changes index 0ac81b4..adec0a7 100644 --- a/unixODBC.changes +++ b/unixODBC.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Nov 6 10:35:00 CET 2012 - mhrusecky@suse.cz + +- updated to versio 2.3.1 + * reduced unixODBC, after the GUI and additional driver parts have + been split off to their own project. + * change to the new default SQLLEN size for 64 bit platforms + * number of bug fixes and changes, see http://www.unixodbc.org/ + ------------------------------------------------------------------- Sun Nov 27 06:48:53 UTC 2011 - coolo@suse.com diff --git a/unixODBC.spec b/unixODBC.spec index f4713fc..dd7bbcd 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -1,7 +1,7 @@ # # spec file for package unixODBC # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -20,10 +20,10 @@ Name: unixODBC BuildRequires: gcc-c++ libtool -Version: 2.2.12 +Version: 2.3.1 Release: 0 Summary: ODBC driver manager with some drivers included -License: GPLv2+ ; LGPLv2.1+ +License: GPL-2.0+ ; LGPL-2.1+ Url: http://www.unixodbc.org/ Group: Productivity/Databases/Tools # bug437293 @@ -39,21 +39,16 @@ Source: unixODBC-%{version}.tar.bz2 Source1: README.SuSE Source2: baselibs.conf Patch1: unixODBC-paths.patch -Patch4: unixODBC-odbctest.patch Patch5: unixODBC-iaddr.patch Patch6: unixODBC-nonvoid.patch Patch7: unixODBC-gccwarnings.patch -Patch8: unixODBC-%{version}-dm.patch -Patch10: %{name}-%{version}-libodbcinst-exports.patch -Patch11: %{name}-%{version}-flex.patch -Patch12: %{name}-%{version}-sqp.patch -Patch13: %{name}-%{version}-uninitialized.patch -Patch14: unixODBC-2.2.12-CVE-2011-1145.patch +Patch10: %{name}-2.2.12-libodbcinst-exports.patch +Patch13: %{name}-2.2.12-uninitialized.patch Patch15: unixODBC-2.2.12-locking_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package devel -License: GPLv2+ ; LGPLv2.1+ +License: GPL-2.0+ ; LGPL-2.1+ Summary: Includes and Static Libraries for ODBC Development Group: Development/Libraries/C and C++ AutoReqProv: on @@ -89,23 +84,19 @@ Authors: %prep %setup -q %patch1 -%patch4 %patch5 %patch6 %patch7 -#patch8 -p1 %patch10 -%patch11 -%patch12 %patch13 -%patch14 -p1 -%patch15 -p1 +#%patch15 -p1 install -m 644 %{S:1} . %build export -n LANG LINGUAS LC_ALL rm -rf libltdl -LIBTOOLIZE="libtoolize --ltdl" autoreconf --force --install +libtoolize --ltdl +autoreconf --force --install export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure \ --prefix=%{_prefix} \ @@ -134,7 +125,7 @@ rm -rf "$RPM_BUILD_ROOT" %files %defattr(-, root, root) -%doc AUTHORS COPYING ChangeLog NEWS README README.GTK README.SuSE doc/*.html doc/*.gif +%doc AUTHORS COPYING ChangeLog NEWS README README.SuSE doc/*.html doc/*.gif %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/ODBCDataSources %dir %{_libdir}/%{name} @@ -145,29 +136,18 @@ rm -rf "$RPM_BUILD_ROOT" %{_prefix}/bin/iusql %{_prefix}/bin/odbcinst %{_prefix}/bin/odbc_config -%{_libdir}/libodbc.so %{_libdir}/libodbc.so.* -#%{_libdir}/libodbcextras.so.* -%{_libdir}/libodbcinst.so %{_libdir}/libodbcinst.so.* -%{_libdir}/libboundparam.so.* -%{_libdir}/libgtrtst.so.* %{_libdir}/libodbccr.so.* -%{_libdir}/unixODBC/*.so* %files devel %defattr(-, root, root) %{_includedir}/* -%{_libdir}/libboundparam.la -%{_libdir}/libgtrtst.la +%{_libdir}/libodbc.so +%{_libdir}/libodbcinst.so %{_libdir}/libodbc.la %{_libdir}/libodbccr.la -#%{_libdir}/libodbcextras.la %{_libdir}/libodbcinst.la -%{_libdir}/libboundparam.so -%{_libdir}/libgtrtst.so %{_libdir}/libodbccr.so -#%{_libdir}/libodbcextras.so -%{_libdir}/unixODBC/*.la %changelog From dd4724dfcbb913b86274cc7ffbe2bc5b2a028cb3ad148c8ec1a9b6fd416103ea Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Tue, 6 Nov 2012 09:54:44 +0000 Subject: [PATCH 02/14] patch names OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=14 --- ...C-2.2.12-ctracing.patch => unixODBC-2.3.1-ctracing.patch | 0 ...xports.patch => unixODBC-2.3.1-libodbcinst-exports.patch | 0 ...12-locking_fix.patch => unixODBC-2.3.1-locking_fix.patch | 0 unixODBC-2.2.12-sqp.patch => unixODBC-2.3.1-sqp.patch | 0 ...ninitialized.patch => unixODBC-2.3.1-uninitialized.patch | 0 unixODBC.spec | 6 +++--- 6 files changed, 3 insertions(+), 3 deletions(-) rename unixODBC-2.2.12-ctracing.patch => unixODBC-2.3.1-ctracing.patch (100%) rename unixODBC-2.2.12-libodbcinst-exports.patch => unixODBC-2.3.1-libodbcinst-exports.patch (100%) rename unixODBC-2.2.12-locking_fix.patch => unixODBC-2.3.1-locking_fix.patch (100%) rename unixODBC-2.2.12-sqp.patch => unixODBC-2.3.1-sqp.patch (100%) rename unixODBC-2.2.12-uninitialized.patch => unixODBC-2.3.1-uninitialized.patch (100%) diff --git a/unixODBC-2.2.12-ctracing.patch b/unixODBC-2.3.1-ctracing.patch similarity index 100% rename from unixODBC-2.2.12-ctracing.patch rename to unixODBC-2.3.1-ctracing.patch diff --git a/unixODBC-2.2.12-libodbcinst-exports.patch b/unixODBC-2.3.1-libodbcinst-exports.patch similarity index 100% rename from unixODBC-2.2.12-libodbcinst-exports.patch rename to unixODBC-2.3.1-libodbcinst-exports.patch diff --git a/unixODBC-2.2.12-locking_fix.patch b/unixODBC-2.3.1-locking_fix.patch similarity index 100% rename from unixODBC-2.2.12-locking_fix.patch rename to unixODBC-2.3.1-locking_fix.patch diff --git a/unixODBC-2.2.12-sqp.patch b/unixODBC-2.3.1-sqp.patch similarity index 100% rename from unixODBC-2.2.12-sqp.patch rename to unixODBC-2.3.1-sqp.patch diff --git a/unixODBC-2.2.12-uninitialized.patch b/unixODBC-2.3.1-uninitialized.patch similarity index 100% rename from unixODBC-2.2.12-uninitialized.patch rename to unixODBC-2.3.1-uninitialized.patch diff --git a/unixODBC.spec b/unixODBC.spec index dd7bbcd..1ba0280 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -42,9 +42,9 @@ Patch1: unixODBC-paths.patch Patch5: unixODBC-iaddr.patch Patch6: unixODBC-nonvoid.patch Patch7: unixODBC-gccwarnings.patch -Patch10: %{name}-2.2.12-libodbcinst-exports.patch -Patch13: %{name}-2.2.12-uninitialized.patch -Patch15: unixODBC-2.2.12-locking_fix.patch +Patch10: %{name}-2.3.1-libodbcinst-exports.patch +Patch13: %{name}-2.3.1-uninitialized.patch +Patch15: unixODBC-2.3.1-locking_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package devel From 8132a4d4df5708a8e895a2680f0e5760697fb1666f7e767b1fe3feade3626308 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Wed, 7 Nov 2012 10:48:30 +0000 Subject: [PATCH 03/14] - Including some basic drivers OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=15 --- unixODBC.changes | 5 +++++ unixODBC.spec | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/unixODBC.changes b/unixODBC.changes index adec0a7..dd6c20a 100644 --- a/unixODBC.changes +++ b/unixODBC.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Nov 7 11:46:34 CET 2012 - mhrusecky@suse.cz + +- Including some basic drivers + ------------------------------------------------------------------- Tue Nov 6 10:35:00 CET 2012 - mhrusecky@suse.cz diff --git a/unixODBC.spec b/unixODBC.spec index 1ba0280..ae29c71 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -105,7 +105,9 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fn --libdir=%{_libdir} \ --sysconfdir=%{_sysconfdir}/%{name} \ --enable-gui=no \ - --disable-stats + --disable-stats \ + --enable-drivers \ + --enable-driver-conf make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" %install @@ -115,6 +117,7 @@ make DESTDIR=$RPM_BUILD_ROOT install rm -rf $RPM_BUILD_ROOT/usr/share/libtool # packaged in gui-gtk rm -f $RPM_BUILD_ROOT/%{_libdir}/libmimerS.* +rm -f $RPM_BUILD_ROOT/%{_libdir}/%{name}/*.la %clean rm -rf "$RPM_BUILD_ROOT" @@ -139,6 +142,7 @@ rm -rf "$RPM_BUILD_ROOT" %{_libdir}/libodbc.so.* %{_libdir}/libodbcinst.so.* %{_libdir}/libodbccr.so.* +%{_libdir}/%{name} %files devel %defattr(-, root, root) From e46c771b5fc16299a10045a1e17e10b7e46eb652aa71b50fc63bdf6104e01794 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 15 Nov 2012 09:24:53 +0000 Subject: [PATCH 04/14] Cleanup old patches OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=16 --- unixODBC-2.3.1-ctracing.patch | 26 --- unixODBC-2.3.1-locking_fix.patch | 273 ------------------------------- unixODBC-2.3.1-sqp.patch | 34 ---- unixODBC.spec | 2 - 4 files changed, 335 deletions(-) delete mode 100644 unixODBC-2.3.1-ctracing.patch delete mode 100644 unixODBC-2.3.1-locking_fix.patch delete mode 100644 unixODBC-2.3.1-sqp.patch diff --git a/unixODBC-2.3.1-ctracing.patch b/unixODBC-2.3.1-ctracing.patch deleted file mode 100644 index 0ecbe66..0000000 --- a/unixODBC-2.3.1-ctracing.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- odbcinstQ/CTracing.cpp -+++ odbcinstQ/CTracing.cpp -@@ -85,12 +85,12 @@ - - SQLGetPrivateProfileString( "ODBC", "Trace", "No", szTracing, sizeof(szTracing), "odbcinst.ini" ); - if ( szTracing[0] == '1' || toupper( szTracing[0] ) == 'Y' -- || ( toupper( szTracing[0] ) == 'O' && toupper( szForce[0] ) == 'N' )) -+ || ( toupper( szTracing[0] ) == 'O' && toupper( szTracing[1] ) == 'N' )) - pTracing->setChecked( true ); - - SQLGetPrivateProfileString( "ODBC", "ForceTrace", "No", szForce, sizeof(szForce), "odbcinst.ini" ); - if ( szForce[0] == '1' || toupper( szForce[0] ) == 'Y' -- || ( toupper( szForce[0] ) == 'O' && toupper( szForce[0] ) == 'N' )) -+ || ( toupper( szForce[0] ) == 'O' && toupper( szForce[1] ) == 'N' )) - pForce->setChecked( true ); - - SQLGetPrivateProfileString( "ODBC", "TraceFile", "/tmp/sql.log", szTracingFile, sizeof(szTracingFile)-1, "odbcinst.ini" ); -@@ -98,7 +98,7 @@ - - SQLGetPrivateProfileString( "ODBC", "Pooling", "No", szPooling, sizeof(szPooling), "odbcinst.ini" ); - if ( szPooling[0] == '1' || toupper( szPooling[0] ) == 'Y' -- || ( toupper( szPooling[0] ) == 'O' && toupper( szForce[0] ) == 'N' )) -+ || ( toupper( szPooling[0] ) == 'O' && toupper( szPooling[1] ) == 'N' )) - pPooling->setChecked( true ); - - connect( pSetDefault, SIGNAL(clicked()), SLOT(setDefault()) ); diff --git a/unixODBC-2.3.1-locking_fix.patch b/unixODBC-2.3.1-locking_fix.patch deleted file mode 100644 index de8a4c9..0000000 --- a/unixODBC-2.3.1-locking_fix.patch +++ /dev/null @@ -1,273 +0,0 @@ -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLAllocHandle.c unixODBC-2.2.12/DriverManager/SQLAllocHandle.c ---- unixODBC-2.2.12.orig/DriverManager/SQLAllocHandle.c 2010-09-03 13:22:09.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLAllocHandle.c 2010-09-03 13:26:23.000000000 -0700 -@@ -1235,6 +1235,8 @@ - if ( __validate_env( (DMHENV) input_handle )) - { - DMHENV environment = (DMHENV) input_handle; -+ -+ thread_protect( SQL_HANDLE_ENV, environment ); - __post_internal_error( &environment -> error, - ERROR_HY092, NULL, - environment -> requested_version ); -@@ -1244,6 +1246,8 @@ - else if ( __validate_dbc( (DMHDBC) input_handle )) - { - DMHDBC connection = (DMHDBC) input_handle; -+ -+ thread_protect( SQL_HANDLE_DBC, connection ); - __post_internal_error( &connection -> error, - ERROR_HY092, NULL, - connection -> environment -> requested_version ); -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLBrowseConnect.c unixODBC-2.2.12/DriverManager/SQLBrowseConnect.c ---- unixODBC-2.2.12.orig/DriverManager/SQLBrowseConnect.c 2005-11-21 09:25:43.000000000 -0800 -+++ unixODBC-2.2.12/DriverManager/SQLBrowseConnect.c 2010-09-03 13:26:23.000000000 -0700 -@@ -259,7 +259,7 @@ - ERROR_08002, NULL, - connection -> environment -> requested_version ); - -- return function_return( -1, connection, SQL_ERROR ); -+ return function_return( IGNORE_THREAD, connection, SQL_ERROR ); - } - - thread_protect( SQL_HANDLE_DBC, connection ); -@@ -578,7 +578,7 @@ - - if( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_DBC, connection, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, connection, ret, TRUE ); - } - - if ( !__connect_part_two( connection )) -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLBrowseConnectW.c unixODBC-2.2.12/DriverManager/SQLBrowseConnectW.c ---- unixODBC-2.2.12.orig/DriverManager/SQLBrowseConnectW.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLBrowseConnectW.c 2010-09-03 13:26:23.000000000 -0700 -@@ -595,7 +595,7 @@ - - if( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_DBC, connection, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, connection, ret, TRUE ); - } - - if ( !__connect_part_two( connection )) -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLColAttribute.c unixODBC-2.2.12/DriverManager/SQLColAttribute.c ---- unixODBC-2.2.12.orig/DriverManager/SQLColAttribute.c 2006-03-08 01:18:41.000000000 -0800 -+++ unixODBC-2.2.12/DriverManager/SQLColAttribute.c 2010-09-03 13:30:30.000000000 -0700 -@@ -314,7 +314,7 @@ - __post_internal_error( &statement -> error, - ERROR_07009, NULL, - statement -> connection -> environment -> requested_version ); -- return function_return( statement, SQL_ERROR ); -+ return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); - } - - */ -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLColAttributeW.c unixODBC-2.2.12/DriverManager/SQLColAttributeW.c ---- unixODBC-2.2.12.orig/DriverManager/SQLColAttributeW.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLColAttributeW.c 2010-09-03 13:31:01.000000000 -0700 -@@ -180,7 +180,7 @@ - __post_internal_error( &statement -> error, - ERROR_07009, NULL, - statement -> connection -> environment -> requested_version ); -- return function_return( statement, SQL_ERROR ); -+ return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); - } - - */ -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLColumns.c unixODBC-2.2.12/DriverManager/SQLColumns.c ---- unixODBC-2.2.12.orig/DriverManager/SQLColumns.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLColumns.c 2010-09-03 13:26:23.000000000 -0700 -@@ -371,7 +371,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLColumnsW.c unixODBC-2.2.12/DriverManager/SQLColumnsW.c ---- unixODBC-2.2.12.orig/DriverManager/SQLColumnsW.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLColumnsW.c 2010-09-03 13:26:23.000000000 -0700 -@@ -284,7 +284,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLDisconnect.c unixODBC-2.2.12/DriverManager/SQLDisconnect.c ---- unixODBC-2.2.12.orig/DriverManager/SQLDisconnect.c 2006-02-21 03:59:22.000000000 -0800 -+++ unixODBC-2.2.12/DriverManager/SQLDisconnect.c 2010-09-03 13:26:23.000000000 -0700 -@@ -321,7 +321,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_DBC, connection, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, connection, ret, TRUE ); - } - - /* -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLExecDirect.c unixODBC-2.2.12/DriverManager/SQLExecDirect.c ---- unixODBC-2.2.12.orig/DriverManager/SQLExecDirect.c 2006-04-11 03:22:56.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLExecDirect.c 2010-09-03 13:26:23.000000000 -0700 -@@ -431,7 +431,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - local_ret = SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLExecDirectW.c unixODBC-2.2.12/DriverManager/SQLExecDirectW.c ---- unixODBC-2.2.12.orig/DriverManager/SQLExecDirectW.c 2006-04-11 03:22:56.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLExecDirectW.c 2010-09-03 13:26:23.000000000 -0700 -@@ -333,7 +333,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - local_ret = SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLExecute.c unixODBC-2.2.12/DriverManager/SQLExecute.c ---- unixODBC-2.2.12.orig/DriverManager/SQLExecute.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLExecute.c 2010-09-03 13:26:23.000000000 -0700 -@@ -294,7 +294,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - local_ret = SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLForeignKeys.c unixODBC-2.2.12/DriverManager/SQLForeignKeys.c ---- unixODBC-2.2.12.orig/DriverManager/SQLForeignKeys.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLForeignKeys.c 2010-09-03 13:26:23.000000000 -0700 -@@ -407,7 +407,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLForeignKeysW.c unixODBC-2.2.12/DriverManager/SQLForeignKeysW.c ---- unixODBC-2.2.12.orig/DriverManager/SQLForeignKeysW.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLForeignKeysW.c 2010-09-03 13:26:23.000000000 -0700 -@@ -315,7 +315,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLFreeHandle.c unixODBC-2.2.12/DriverManager/SQLFreeHandle.c ---- unixODBC-2.2.12.orig/DriverManager/SQLFreeHandle.c 2006-04-21 07:25:55.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLFreeHandle.c 2010-09-03 13:27:41.000000000 -0700 -@@ -226,8 +226,6 @@ - ERROR_HY010, NULL, - environment -> requested_version ); - -- thread_release( SQL_HANDLE_ENV, environment ); -- - return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); - } - -@@ -293,8 +291,6 @@ - ERROR_HY010, NULL, - connection -> environment -> requested_version ); - -- thread_release( SQL_HANDLE_ENV, environment ); -- - return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); - } - -@@ -396,8 +392,6 @@ - ERROR_HY010, NULL, - statement -> connection -> environment -> requested_version ); - -- thread_release( SQL_HANDLE_STMT, statement ); -- - return function_return( SQL_HANDLE_STMT, statement, SQL_ERROR ); - } - -@@ -525,8 +519,6 @@ - ERROR_IM001, NULL, - connection -> environment -> requested_version ); - -- thread_release( SQL_HANDLE_DESC, descriptor ); -- - return function_return( SQL_HANDLE_DESC, descriptor, SQL_ERROR ); - } - else -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLMoreResults.c unixODBC-2.2.12/DriverManager/SQLMoreResults.c ---- unixODBC-2.2.12.orig/DriverManager/SQLMoreResults.c 2006-03-08 01:18:41.000000000 -0800 -+++ unixODBC-2.2.12/DriverManager/SQLMoreResults.c 2010-09-03 13:26:23.000000000 -0700 -@@ -249,7 +249,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLParamData.c unixODBC-2.2.12/DriverManager/SQLParamData.c ---- unixODBC-2.2.12.orig/DriverManager/SQLParamData.c 2005-11-21 09:25:43.000000000 -0800 -+++ unixODBC-2.2.12/DriverManager/SQLParamData.c 2010-09-03 13:26:23.000000000 -0700 -@@ -261,7 +261,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - local_ret = SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLPrimaryKeys.c unixODBC-2.2.12/DriverManager/SQLPrimaryKeys.c ---- unixODBC-2.2.12.orig/DriverManager/SQLPrimaryKeys.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLPrimaryKeys.c 2010-09-03 13:26:23.000000000 -0700 -@@ -364,7 +364,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLPrimaryKeysW.c unixODBC-2.2.12/DriverManager/SQLPrimaryKeysW.c ---- unixODBC-2.2.12.orig/DriverManager/SQLPrimaryKeysW.c 2005-09-27 08:44:06.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLPrimaryKeysW.c 2010-09-03 13:26:23.000000000 -0700 -@@ -287,7 +287,7 @@ - - if ( ret == SQL_SUCCESS_WITH_INFO ) - { -- function_return_ex( SQL_HANDLE_STMT, statement, ret, TRUE ); -+ function_return_ex( IGNORE_THREAD, statement, ret, TRUE ); - } - - SQLNUMRESULTCOLS( statement -> connection, -diff -urN unixODBC-2.2.12.orig/DriverManager/SQLTransact.c unixODBC-2.2.12/DriverManager/SQLTransact.c ---- unixODBC-2.2.12.orig/DriverManager/SQLTransact.c 2006-05-31 10:35:34.000000000 -0700 -+++ unixODBC-2.2.12/DriverManager/SQLTransact.c 2010-09-03 13:26:23.000000000 -0700 -@@ -434,8 +434,6 @@ - ERROR_HY012, NULL, - environment -> requested_version ); - -- thread_release( SQL_HANDLE_ENV, environment ); -- - return function_return( SQL_HANDLE_ENV, environment, SQL_ERROR ); - } - diff --git a/unixODBC-2.3.1-sqp.patch b/unixODBC-2.3.1-sqp.patch deleted file mode 100644 index 66aff5f..0000000 --- a/unixODBC-2.3.1-sqp.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- sqp/sqpStoreDataType.c -+++ sqp/sqpStoreDataType.c -@@ -6,9 +6,20 @@ - * - ****************************************/ - -+#ifdef HAVE_CONFIG_H -+#include "config.h" -+#endif -+ - #include "sqp.h" - #include - -+#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 ) - { - HSQPDATATYPE hDataType; ---- sqp/Makefile.am -+++ sqp/Makefile.am -@@ -46,6 +46,8 @@ - - endif - -+AM_YFLAGS = -d -+ - EXTRA_DIST = \ - yac.h - diff --git a/unixODBC.spec b/unixODBC.spec index ae29c71..392143c 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -44,7 +44,6 @@ Patch6: unixODBC-nonvoid.patch Patch7: unixODBC-gccwarnings.patch Patch10: %{name}-2.3.1-libodbcinst-exports.patch Patch13: %{name}-2.3.1-uninitialized.patch -Patch15: unixODBC-2.3.1-locking_fix.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package devel @@ -89,7 +88,6 @@ Authors: %patch7 %patch10 %patch13 -#%patch15 -p1 install -m 644 %{S:1} . %build From 07174327461ea6e55670abb7242aef18cef7cb9cf58d33802faa6ebd56e6d01b Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 15 Nov 2012 12:36:12 +0000 Subject: [PATCH 05/14] fix OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=17 --- unixODBC.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unixODBC.spec b/unixODBC.spec index 392143c..9839d11 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -48,7 +48,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %package devel License: GPL-2.0+ ; LGPL-2.1+ -Summary: Includes and Static Libraries for ODBC Development +Summary: Includes for ODBC Development Group: Development/Libraries/C and C++ AutoReqProv: on # bug437293 @@ -71,7 +71,7 @@ Authors: Nick Gorham %description devel -Includes and static libraries for ODBC development (based on unixODBC). +Includes for ODBC development (based on unixODBC). From c2ff386971a2426d02c5d2fd732ba4788356916fa401d3f43f866ee9b763bb1b Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 15 Nov 2012 12:59:13 +0000 Subject: [PATCH 06/14] more gcc OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=18 --- unixODBC-gccwarnings.patch | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/unixODBC-gccwarnings.patch b/unixODBC-gccwarnings.patch index b1b3e56..6a7257a 100644 --- a/unixODBC-gccwarnings.patch +++ b/unixODBC-gccwarnings.patch @@ -51,7 +51,15 @@ Index: Drivers/nn/nntp.c =================================================================== --- Drivers/nn/nntp.c.orig +++ Drivers/nn/nntp.c -@@ -36,6 +36,7 @@ +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + # include "nntp.ci" + +@@ -36,6 +37,7 @@ #endif #include @@ -88,3 +96,23 @@ Index: Drivers/Postgre7.1/dlg_specific.c # include "gpps.h" # define SQLGetPrivateProfileString(a,b,c,d,e,f) GetPrivateProfileString(a,b,c,d,e,f) # define SQLWritePrivateProfileString(a,b,c,d) WritePrivateProfileString(a,b,c,d) +@@ -38,6 +38,7 @@ + + #include "dlg_specific.h" + #include "convert.h" ++#include + + #ifndef BOOL + #define BOOL int +Index: Drivers/nn/yylex.c +=================================================================== +--- Drivers/nn/yylex.c.orig ++++ Drivers/nn/yylex.c +@@ -25,6 +25,7 @@ + # define YYERRCODE 256 + + #include ++#include + + static int getcmpopidxbyname(char* name) + { From 7257f20360e5c9b6f82dad255c9fd4ce0b832e34856c88dbab72b7f73ec6d4f3 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 15 Nov 2012 13:29:34 +0000 Subject: [PATCH 07/14] test OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=19 --- unixODBC.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unixODBC.spec b/unixODBC.spec index 9839d11..37fe225 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -95,7 +95,8 @@ export -n LANG LINGUAS LC_ALL rm -rf libltdl libtoolize --ltdl autoreconf --force --install -export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" +export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ @@ -106,7 +107,7 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" CXXFLAGS="$RPM_OPT_FLAGS -fn --disable-stats \ --enable-drivers \ --enable-driver-conf -make CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" +make %install install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}/%{name} From c64cfaccdf8b603b641adcbb15806f1c13ec4e9d63abff53952dea209c2927df Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 15 Nov 2012 14:34:46 +0000 Subject: [PATCH 08/14] test OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=20 --- unixODBC-gccwarnings.patch | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/unixODBC-gccwarnings.patch b/unixODBC-gccwarnings.patch index 6a7257a..8cdfbf1 100644 --- a/unixODBC-gccwarnings.patch +++ b/unixODBC-gccwarnings.patch @@ -39,9 +39,12 @@ Index: Drivers/nn/connect.c =================================================================== --- Drivers/nn/connect.c.orig +++ Drivers/nn/connect.c -@@ -14,6 +14,7 @@ +@@ -13,7 +13,10 @@ + GNU General Public License for more details. **/ #include ++#include ++#include #include "driver.h" +#include "misc.h" @@ -116,3 +119,16 @@ Index: Drivers/nn/yylex.c static int getcmpopidxbyname(char* name) { +Index: exe/iusql.c +=================================================================== +--- exe/iusql.c.orig ++++ exe/iusql.c +@@ -29,6 +29,8 @@ + static int OpenDatabase( SQLHENV *phEnv, SQLHDBC *phDbc, char *szDSN, char *szUID, char *szPWD ); + static int ExecuteSQL( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ); + static int ExecuteHelp( SQLHDBC hDbc, char *szSQL, char cDelimiter, int bColumnNames, int bHTMLTable ); ++static int CloseDatabase( SQLHENV hEnv, SQLHDBC hDbc ); ++ + + static void WriteHeaderHTMLTable( SQLHSTMT hStmt ); + static void WriteHeaderNormal( SQLHSTMT hStmt, SQLCHAR *szSepLine ); From c2da7ddf95e7c74dcc1602beb49fdee125215370c8a870bf73e3ad25ef3fc9b3 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Thu, 15 Nov 2012 14:36:41 +0000 Subject: [PATCH 09/14] test OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=21 --- unixODBC-gccwarnings.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unixODBC-gccwarnings.patch b/unixODBC-gccwarnings.patch index 8cdfbf1..e5d3f83 100644 --- a/unixODBC-gccwarnings.patch +++ b/unixODBC-gccwarnings.patch @@ -54,11 +54,14 @@ Index: Drivers/nn/nntp.c =================================================================== --- Drivers/nn/nntp.c.orig +++ Drivers/nn/nntp.c -@@ -19,6 +19,7 @@ +@@ -19,6 +19,10 @@ #include #include #include +#include ++#include ++#include ++#include # include "nntp.ci" From 12a823a149c00871c523252d436b5712a2054eb0d65eb6c5c0f4b1078b02f92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 3 Dec 2012 08:28:25 +0000 Subject: [PATCH 10/14] Accepting request 142999 from home:babelworx:ldig:branches:server:database license update: GPL-2.0+ and LGPL-2.1+ Semicolon is ambigous. Use ^and^ or ^or^ depending on the nature of the interaction of the license code componentes OBS-URL: https://build.opensuse.org/request/show/142999 OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=22 --- unixODBC.changes | 7 +++++++ unixODBC.spec | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/unixODBC.changes b/unixODBC.changes index dd6c20a..6229d1b 100644 --- a/unixODBC.changes +++ b/unixODBC.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Nov 27 09:04:52 UTC 2012 - cfarrell@suse.com + +- license update: GPL-2.0+ and LGPL-2.1+ + Semicolon is ambigous. Use ^and^ or ^or^ depending on the nature of the + interaction of the license code componentes + ------------------------------------------------------------------- Wed Nov 7 11:46:34 CET 2012 - mhrusecky@suse.cz diff --git a/unixODBC.spec b/unixODBC.spec index 37fe225..aa34bd3 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -23,7 +23,7 @@ BuildRequires: gcc-c++ libtool Version: 2.3.1 Release: 0 Summary: ODBC driver manager with some drivers included -License: GPL-2.0+ ; LGPL-2.1+ +License: GPL-2.0+ and LGPL-2.1+ Url: http://www.unixodbc.org/ Group: Productivity/Databases/Tools # bug437293 @@ -47,7 +47,7 @@ Patch13: %{name}-2.3.1-uninitialized.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package devel -License: GPL-2.0+ ; LGPL-2.1+ +License: GPL-2.0+ and LGPL-2.1+ Summary: Includes for ODBC Development Group: Development/Libraries/C and C++ AutoReqProv: on From 0ced1ba96254587576d651cdd0412e1839250b9fc27da3a05d5083e6c6d856aa Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Fri, 4 Jan 2013 12:05:22 +0000 Subject: [PATCH 11/14] - fixed compilation issues with bison OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=23 --- unixODBC-2.3.1-bison.patch | 22 ++++++++++++++++++++++ unixODBC.changes | 5 +++++ unixODBC.spec | 4 +++- 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 unixODBC-2.3.1-bison.patch diff --git a/unixODBC-2.3.1-bison.patch b/unixODBC-2.3.1-bison.patch new file mode 100644 index 0000000..a23a035 --- /dev/null +++ b/unixODBC-2.3.1-bison.patch @@ -0,0 +1,22 @@ +Index: Drivers/nn/yyparse.y +=================================================================== +--- Drivers/nn/yyparse.y.orig ++++ Drivers/nn/yyparse.y +@@ -36,7 +36,7 @@ static char sccsid[] + # define yylex() nnsql_yylex(&yylval, pyyenv) + #endif + +-#define yyparse(x) nnsql_yyparse (pyyenv) ++#define yyparse(x) nnsql_yyparse (yyenv_t* pyyenv) + #define yyerror(msg) nnsql_yyerror (pyyenv, msg) + #define SETYYERROR(env, code) { env->pstmt->errcode = code; \ + env->pstmt->errpos = env->errpos;} +@@ -1197,7 +1197,7 @@ static int add_ins_value( yystmt_t* pstm + { + if( !idx ) + { +- MEM_FREE(pstmt->ins_values) ++ MEM_FREE(pstmt->ins_values); + pstmt->ins_values = (node_t*)MEM_ALLOC( FILTER_CHUNK_SIZE * sizeof(node_t)); + } + else if( ! idx%FILTER_CHUNK_SIZE ) diff --git a/unixODBC.changes b/unixODBC.changes index 6229d1b..3d59c13 100644 --- a/unixODBC.changes +++ b/unixODBC.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 4 13:02:10 CET 2013 - mhrusecky@suse.cz + +- fixed compilation issues with bison + ------------------------------------------------------------------- Tue Nov 27 09:04:52 UTC 2012 - cfarrell@suse.com diff --git a/unixODBC.spec b/unixODBC.spec index aa34bd3..042653e 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -1,7 +1,7 @@ # # spec file for package unixODBC # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -44,6 +44,7 @@ Patch6: unixODBC-nonvoid.patch Patch7: unixODBC-gccwarnings.patch Patch10: %{name}-2.3.1-libodbcinst-exports.patch Patch13: %{name}-2.3.1-uninitialized.patch +Patch15: %{name}-2.3.1-bison.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package devel @@ -88,6 +89,7 @@ Authors: %patch7 %patch10 %patch13 +%patch15 install -m 644 %{S:1} . %build From baa45296e65404edccd8a439efb30058017c916599be93d798eba76eb0d6e468 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Fri, 4 Jan 2013 12:52:31 +0000 Subject: [PATCH 12/14] fix OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=24 --- unixODBC.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unixODBC.spec b/unixODBC.spec index 042653e..92f95c1 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -19,7 +19,7 @@ Name: unixODBC -BuildRequires: gcc-c++ libtool +BuildRequires: bison gcc-c++ libtool Version: 2.3.1 Release: 0 Summary: ODBC driver manager with some drivers included From d6c3b175da8915038f1cfb8ff01221f1f58cffab70591cb72244d5c01b541260 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Fri, 4 Jan 2013 14:06:59 +0000 Subject: [PATCH 13/14] - Adding missing includes OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=25 --- unixODBC-2.3.1-declarations.patch | 156 ++++++++++++++++++++++++++++++ unixODBC.changes | 5 + unixODBC.spec | 2 + 3 files changed, 163 insertions(+) create mode 100644 unixODBC-2.3.1-declarations.patch diff --git a/unixODBC-2.3.1-declarations.patch b/unixODBC-2.3.1-declarations.patch new file mode 100644 index 0000000..5390070 --- /dev/null +++ b/unixODBC-2.3.1-declarations.patch @@ -0,0 +1,156 @@ +Index: Drivers/nn/SQLBindCol.c +=================================================================== +--- Drivers/nn/SQLBindCol.c.orig ++++ Drivers/nn/SQLBindCol.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + RETCODE SQL_API SQLBindCol( + HSTMT hstmt, +Index: Drivers/nn/SQLBindParameter.c +=================================================================== +--- Drivers/nn/SQLBindParameter.c.orig ++++ Drivers/nn/SQLBindParameter.c +@@ -13,6 +13,7 @@ + GNU General Public License for more details. + **/ + #include ++#include + #include "driver.h" + + RETCODE SQL_API SQLBindParameter( +Index: Drivers/nn/SQLDescribeCol.c +=================================================================== +--- Drivers/nn/SQLDescribeCol.c.orig ++++ Drivers/nn/SQLDescribeCol.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + RETCODE SQL_API SQLDescribeCol( + HSTMT hstmt, +Index: Drivers/nn/SQLError.c +=================================================================== +--- Drivers/nn/SQLError.c.orig ++++ Drivers/nn/SQLError.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + RETCODE SQL_API SQLError( + HENV henv, +Index: Drivers/nn/SQLFetch.c +=================================================================== +--- Drivers/nn/SQLFetch.c.orig ++++ Drivers/nn/SQLFetch.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + RETCODE SQL_API SQLFetch( HSTMT hstmt ) + { +Index: Drivers/nn/SQLGetData.c +=================================================================== +--- Drivers/nn/SQLGetData.c.orig ++++ Drivers/nn/SQLGetData.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + RETCODE SQL_API SQLGetData( + HSTMT hstmt, +Index: Drivers/nn/SQLPutData.c +=================================================================== +--- Drivers/nn/SQLPutData.c.orig ++++ Drivers/nn/SQLPutData.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + RETCODE SQL_API SQLPutData( + HSTMT hstmt, +Index: Drivers/nn/convert.c +=================================================================== +--- Drivers/nn/convert.c.orig ++++ Drivers/nn/convert.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + /* It looks silly to use a MEM_ALLOC() in function char2str(), etc, + * for converting C data type into STRING SQL data type. Esspecially +Index: Drivers/nn/nndate.c +=================================================================== +--- Drivers/nn/nndate.c.orig ++++ Drivers/nn/nndate.c +@@ -16,6 +16,7 @@ + #include + + #include ++#include + #include "misc.h" + + static char* month_name[] = +Index: Drivers/nn/prepare.c +=================================================================== +--- Drivers/nn/prepare.c.orig ++++ Drivers/nn/prepare.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + void* nnodbc_getstmterrstack(void* hstmt) + { +Index: Drivers/nn/yyevl.c +=================================================================== +--- Drivers/nn/yyevl.c.orig ++++ Drivers/nn/yyevl.c +@@ -16,6 +16,7 @@ + #include + #include + #include ++#include + #include + #include + +Index: Drivers/nn/yyparse.y +=================================================================== +--- Drivers/nn/yyparse.y.orig ++++ Drivers/nn/yyparse.y +@@ -25,6 +25,7 @@ static char sccsid[] + #include + #include + #include ++#include + + # ifdef YYLSP_NEEDED + # undef YYLSP_NEEDED +Index: Drivers/nn/yystmt.c +=================================================================== +--- Drivers/nn/yystmt.c.orig ++++ Drivers/nn/yystmt.c +@@ -14,6 +14,7 @@ + **/ + #include + #include "driver.h" ++#include + + static char sccsid[] + = "@(#)NNSQL(NetNews SQL) v0.5, Copyright(c) 1995, 1996 by Ke Jin"; diff --git a/unixODBC.changes b/unixODBC.changes index 3d59c13..bbbef4c 100644 --- a/unixODBC.changes +++ b/unixODBC.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jan 4 15:04:52 CET 2013 - mhrusecky@suse.cz + +- Adding missing includes + ------------------------------------------------------------------- Fri Jan 4 13:02:10 CET 2013 - mhrusecky@suse.cz diff --git a/unixODBC.spec b/unixODBC.spec index 92f95c1..22457e6 100644 --- a/unixODBC.spec +++ b/unixODBC.spec @@ -45,6 +45,7 @@ Patch7: unixODBC-gccwarnings.patch Patch10: %{name}-2.3.1-libodbcinst-exports.patch Patch13: %{name}-2.3.1-uninitialized.patch Patch15: %{name}-2.3.1-bison.patch +Patch16: %{name}-2.3.1-declarations.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %package devel @@ -90,6 +91,7 @@ Authors: %patch10 %patch13 %patch15 +%patch16 install -m 644 %{S:1} . %build From b19973996b983e6b55dbd1e5b550d5af5bdbadcb1bbac8a2306bd9d0d37ce5a2 Mon Sep 17 00:00:00 2001 From: "Michal Hrusecky (old before rename to _miska_)" Date: Fri, 4 Jan 2013 14:42:11 +0000 Subject: [PATCH 14/14] fix OBS-URL: https://build.opensuse.org/package/show/server:database/unixODBC?expand=0&rev=26 --- unixODBC-2.3.1-declarations.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/unixODBC-2.3.1-declarations.patch b/unixODBC-2.3.1-declarations.patch index 5390070..b2cba76 100644 --- a/unixODBC-2.3.1-declarations.patch +++ b/unixODBC-2.3.1-declarations.patch @@ -154,3 +154,27 @@ Index: Drivers/nn/yystmt.c static char sccsid[] = "@(#)NNSQL(NetNews SQL) v0.5, Copyright(c) 1995, 1996 by Ke Jin"; +Index: Drivers/nn/connect.c +=================================================================== +--- Drivers/nn/connect.c.orig ++++ Drivers/nn/connect.c +@@ -14,6 +14,7 @@ + **/ + #include + #include ++#include + #include + #include "driver.h" + #include "misc.h" +Index: Drivers/nn/yylex.c +=================================================================== +--- Drivers/nn/yylex.c.orig ++++ Drivers/nn/yylex.c +@@ -26,6 +26,7 @@ + + #include + #include ++#include + + static int getcmpopidxbyname(char* name) + {