From b4a356c245bbc31d6bf9140b32219dad260683fdcf546bd0b831ec66ad3f2833 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 29 Apr 2008 22:57:57 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/sqlite3?expand=0&rev=7 --- baselibs.conf | 1 + sqlite-strcasecmp.patch | 22 ++++++++ sqlite3-tcl85.diff | 119 +++++++++++++++++++--------------------- sqlite3.changes | 12 ++++ sqlite3.spec | 9 ++- 5 files changed, 98 insertions(+), 65 deletions(-) create mode 100644 sqlite-strcasecmp.patch diff --git a/baselibs.conf b/baselibs.conf index 52139ae..a22c0f3 100644 --- a/baselibs.conf +++ b/baselibs.conf @@ -1 +1,2 @@ libsqlite3-0 + obsoletes "sqlite-" diff --git a/sqlite-strcasecmp.patch b/sqlite-strcasecmp.patch new file mode 100644 index 0000000..d354185 --- /dev/null +++ b/sqlite-strcasecmp.patch @@ -0,0 +1,22 @@ +Index: sqlite/src/tclsqlite.c +RCS File: /sqlite/sqlite/src/tclsqlite.c,v +rcsdiff -q -kk '-r1.212' '-r1.213' -u '/sqlite/sqlite/src/tclsqlite.c,v' 2>/dev/null +--- tclsqlite.c 2008/03/25 16:16:29 1.212 ++++ tclsqlite.c 2008/04/04 12:21:09 1.213 +@@ -1340,11 +1340,11 @@ + Tcl_AppendResult(interp,"Error: non-null separator required for copy",0); + return TCL_ERROR; + } +- if(sqlite3StrICmp(zConflict, "rollback") != 0 && +- sqlite3StrICmp(zConflict, "abort" ) != 0 && +- sqlite3StrICmp(zConflict, "fail" ) != 0 && +- sqlite3StrICmp(zConflict, "ignore" ) != 0 && +- sqlite3StrICmp(zConflict, "replace" ) != 0 ) { ++ if(strcasecmp(zConflict, "rollback") != 0 && ++ strcasecmp(zConflict, "abort" ) != 0 && ++ strcasecmp(zConflict, "fail" ) != 0 && ++ strcasecmp(zConflict, "ignore" ) != 0 && ++ strcasecmp(zConflict, "replace" ) != 0 ) { + Tcl_AppendResult(interp, "Error: \"", zConflict, + "\", conflict-algorithm must be one of: rollback, " + "abort, fail, ignore, or replace", 0); diff --git a/sqlite3-tcl85.diff b/sqlite3-tcl85.diff index ac4b667..e0174e5 100644 --- a/sqlite3-tcl85.diff +++ b/sqlite3-tcl85.diff @@ -1,77 +1,68 @@ ---- test/bind.test -+++ test/bind.test -@@ -211,6 +211,7 @@ - DELETE FROM t1; - } - } {} -+if 0 { - do_test bind-4.4 { - sqlite3_bind_double $VM 1 NaN - sqlite3_bind_double $VM 2 1e300 -@@ -229,7 +230,7 @@ - DELETE FROM t1; - } - } {} -- -+} - # NULL - do_test bind-5.1 { - sqlite3_bind_null $VM 1 ---- test/tclsqlite.test -+++ test/tclsqlite.test -@@ -77,7 +77,9 @@ +Index: sqlite/test/tclsqlite.test +RCS File: /sqlite/sqlite/test/tclsqlite.test,v +rcsdiff -q -kk '-r1.63' '-r1.64' -u '/sqlite/sqlite/test/tclsqlite.test,v' 2>/dev/null +--- test/tclsqlite.test 2007/10/23 08:17:48 1.63 ++++ test/tclsqlite.test 2008/04/28 13:02:58 1.64 +@@ -69,15 +69,15 @@ } msg] - regsub {:.*$} $msg {} msg + lappend v $msg + } {0 {}} ++catch {expr x*} msg + do_test tcl-1.6 { + set v [catch { + db eval {SELECT * FROM t1} data { + expr x* + } + } msg] +- regsub {:.*$} $msg {} msg lappend v $msg -} {1 {syntax error in expression "x*"}} -+} {1 {invalid bareword "x" -+in expression "x*"; -+should be "$x" or "{x}" or "x(...)" or ...}} ++} [list 1 $msg] do_test tcl-1.7 { set v [catch {db} msg] lappend v $msg ---- test/types3.test -+++ test/types3.test -@@ -18,6 +18,9 @@ - set testdir [file dirname $argv0] - source $testdir/tester.tcl - -+set V [expr {1+12345678012345}] -+set wideInt [expr {[tcl_variable_type V] eq "wideInt" ? 1 : 0}] -+ - # A variable with only a string representation comes in as TEXT - do_test types3-1.1 { - set V {} -@@ -30,8 +33,8 @@ - set V [expr {int(1+2)}] - concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}] - } {int integer} --set V [expr {1+12345678012345}] --if {[tcl_variable_type V]=="wideInt"} { -+ -+if {$wideInt} { - do_test types3-1.3 { - set V [expr {1+123456789012345}] - concat [tcl_variable_type V] [execsql {SELECT typeof(:V)}] -@@ -74,10 +77,17 @@ +Index: sqlite/test/types3.test +RCS File: /sqlite/sqlite/test/types3.test,v +rcsdiff -q -kk '-r1.7' '-r1.8' -u '/sqlite/sqlite/test/types3.test,v' 2>/dev/null +--- test/types3.test 2007/06/26 22:42:56 1.7 ++++ test/types3.test 2008/04/28 13:02:58 1.8 +@@ -74,10 +74,11 @@ set V [db one {SELECT 123}] tcl_variable_type V } int --do_test types3-2.3 { -- set V [db one {SELECT 1234567890123456}] -- tcl_variable_type V ++set Vx [expr {1+wide(123456789123456)}] + do_test types3-2.3 { + set V [db one {SELECT 1234567890123456}] + tcl_variable_type V -} wideInt -+if {$wideInt} { -+ do_test types3-2.3 { -+ set V [db one {SELECT 1234567890123456}] -+ tcl_variable_type V -+ } wideInt -+} { -+ do_test types3-2.3 { -+ set V [db one {SELECT 1234567890123456}] -+ tcl_variable_type V -+ } int -+} ++} [tcl_variable_type Vx] do_test types3-2.4.1 { set V [db one {SELECT 1234567890123456.1}] tcl_variable_type V +Index: sqlite/src/test1.c +RCS File: /sqlite/sqlite/src/test1.c,v +rcsdiff -q -kk '-r1.299' '-r1.300' -u '/sqlite/sqlite/src/test1.c,v' 2>/dev/null +--- src/test1.c 2008/04/16 12:58:54 1.299 ++++ src/test1.c 2008/04/28 15:23:03 1.300 +@@ -2621,8 +2621,20 @@ + + if( getStmtPointer(interp, Tcl_GetString(objv[1]), &pStmt) ) return TCL_ERROR; + if( Tcl_GetIntFromObj(interp, objv[2], &idx) ) return TCL_ERROR; +- if( Tcl_GetDoubleFromObj(interp, objv[3], &value) ) return TCL_ERROR; + ++ /* Intercept the string "NaN" and generate a NaN value for it. ++ ** All other strings are passed through to Tcl_GetDoubleFromObj(). ++ ** Tcl_GetDoubleFromObj() should understand "NaN" but some versions ++ ** contain a bug. ++ */ ++ if( strcmp(Tcl_GetString(objv[3]), "NaN")==0 ){ ++ sqlite3_int64 i; ++ i = 0xfff80000; ++ i <<= 32; ++ value = *(double*)(char*)&i; ++ }else if( Tcl_GetDoubleFromObj(interp, objv[3], &value) ){ ++ return TCL_ERROR; ++ } + rc = sqlite3_bind_double(pStmt, idx, value); + if( sqlite3TestErrCode(interp, StmtToDb(pStmt), rc) ) return TCL_ERROR; + if( rc!=SQLITE_OK ){ diff --git a/sqlite3.changes b/sqlite3.changes index 87f0ce9..f6b4638 100644 --- a/sqlite3.changes +++ b/sqlite3.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Tue Apr 29 16:48:08 CEST 2008 - cthiel@suse.de + +- obsolete sqlite- via baselibs.conf + +------------------------------------------------------------------- +Mon Apr 28 17:49:19 CEST 2008 - max@suse.de + +- Avoid an unresolved symbol in the Tcl extension + (sqlite-strcasecmp.patch). +- Use upstream fixes for test failures caused by Tcl 8.5 + ------------------------------------------------------------------- Sun Apr 27 17:26:17 CEST 2008 - coolo@suse.de diff --git a/sqlite3.spec b/sqlite3.spec index d4b3eed..7174957 100644 --- a/sqlite3.spec +++ b/sqlite3.spec @@ -21,7 +21,7 @@ Group: Productivity/Databases/Servers Summary: Embeddable SQL Database Engine Url: http://www.sqlite.org/ Version: 3.5.7 -Release: 4 +Release: 7 Requires: libsqlite3-0 = %version Provides: sqlite = %version Obsoletes: sqlite < %version @@ -32,6 +32,7 @@ Patch0: sqlite.diff Patch2: sqlite-test-notime.diff Patch8: disable-check.diff Patch9: sqlite3-tcl85.diff +Patch10: sqlite-strcasecmp.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -199,6 +200,12 @@ autoreconf -f -i %_libdir/pkgconfig/sqlite3.pc %changelog +* Tue Apr 29 2008 cthiel@suse.de +- obsolete sqlite- via baselibs.conf +* Mon Apr 28 2008 max@suse.de +- Avoid an unresolved symbol in the Tcl extension + (sqlite-strcasecmp.patch). +- Use upstream fixes for test failures caused by Tcl 8.5 * Sun Apr 27 2008 coolo@suse.de - disable the test suite, it adds 5 hours to the build time * Thu Apr 10 2008 max@suse.de