From 25a724e997c3bbbfdb80d6c0a8c84c48491da177 Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Mon, 16 Jan 2012 22:16:41 +0100 Subject: [PATCH] update to sqlite 3.7.9 --- .gitignore | 1 + ...=> mingw32-sqlite-3.7.7-no-undefined.patch | 6 +- mingw32-sqlite.spec | 24 ++++---- sources | 2 +- sqlite-3.6.12-libdl.patch | 11 ---- sqlite-3.7.3-lemon-snprintf.patch | 60 ------------------- sqlite-3.7.4-wal2-nodirsync.patch | 16 ----- sqlite-3.7.7.1-stupid-openfiles-test.patch | 36 +++++++++++ 8 files changed, 53 insertions(+), 103 deletions(-) rename mingw32-sqlite-3.6.12-no-undefined.patch => mingw32-sqlite-3.7.7-no-undefined.patch (77%) delete mode 100644 sqlite-3.6.12-libdl.patch delete mode 100644 sqlite-3.7.3-lemon-snprintf.patch delete mode 100644 sqlite-3.7.4-wal2-nodirsync.patch create mode 100644 sqlite-3.7.7.1-stupid-openfiles-test.patch diff --git a/.gitignore b/.gitignore index 6fe3f93..737cb69 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ sqlite-3.6.20.tar.gz sqlite-3.6.22.tar.gz /sqlite-3.7.3.tar.gz /sqlite-src-3070500.zip +/sqlite-src-3070900.zip diff --git a/mingw32-sqlite-3.6.12-no-undefined.patch b/mingw32-sqlite-3.7.7-no-undefined.patch similarity index 77% rename from mingw32-sqlite-3.6.12-no-undefined.patch rename to mingw32-sqlite-3.7.7-no-undefined.patch index 211dcd3..3f14024 100644 --- a/mingw32-sqlite-3.6.12-no-undefined.patch +++ b/mingw32-sqlite-3.7.7-no-undefined.patch @@ -1,6 +1,6 @@ ---- sqlite-3.6.12/Makefile.in.orig 2009-03-30 18:37:16.000000000 +0200 -+++ sqlite-3.6.12/Makefile.in 2009-04-23 11:16:17.000000000 +0200 -@@ -463,14 +463,15 @@ +--- sqlite-3.7.9/Makefile.in.orig 2009-03-30 18:37:16.000000000 +0200 ++++ sqlite-3.7.9/Makefile.in 2009-04-23 11:16:17.000000000 +0200 +@@ -486,14 +486,15 @@ libsqlite3.la: $(LIBOBJ) $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \ diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 1310bac..e3ab505 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -7,7 +7,7 @@ %global name1 sqlite -%global realver 3070500 +%global realver 3070900 %global rpmver %(echo %{realver}|sed -e "s/00//g" -e "s/0/./g") # bcond default logic is nicely backwards... @@ -16,7 +16,7 @@ Name: mingw32-%{name1} Version: %{rpmver} -Release: 3%{?dist} +Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -28,14 +28,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Patches from Fedora native package. -Patch1: sqlite-3.6.12-libdl.patch -Patch2: sqlite-3.6.23-lemon-system-template.patch -Patch3: sqlite-3.7.4-wal2-nodirsync.patch -# Avoid insecure sprintf(), use a system path for lempar.c, patch from Debian -Patch4: sqlite-3.7.3-lemon-snprintf.patch +# Support a system-wide lemon template +Patch1: sqlite-3.6.23-lemon-system-template.patch +# Shut up stupid tests depending on system settings of allowed open fd's +Patch2: sqlite-3.7.7.1-stupid-openfiles-test.patch # Patches for MinGW port. -Patch1000: mingw32-sqlite-3.6.12-no-undefined.patch +Patch1000: mingw32-sqlite-3.7.9-no-undefined.patch BuildRequires: mingw32-filesystem >= 52 BuildRequires: mingw32-gcc @@ -92,10 +91,8 @@ This package contains static cross-compiled library %prep %setup -q -n %{name1}-src-%{realver} -%patch1 -p1 -b .libdl -%patch2 -p1 -b .lemon -%patch3 -p1 -b .wal2 -%patch4 -p1 -b .lemon-sprintf +%patch1 -p1 -b .lemon-system-template +%patch2 -p1 -b .stupid-openfiles-test %patch1000 -p1 # Ships with an old/broken version of libtool which cannot create @@ -167,6 +164,9 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_libdir}/libsqlite3.a %changelog +* Mon Jan 16 2012 Thomas Sailer - %(echo %{realver}|sed -e "s/00//g" -e "s/0/./g")-1 +- update to 3.7.9 + * Fri Jan 13 2012 Fedora Release Engineering - 3.7.5-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild diff --git a/sources b/sources index e2fe071..01871ca 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -d61d784997d42cd0d92bac7994094c56 sqlite-src-3070500.zip +b2646c5a0c0b5bc6b8f0b67fc318bab3 sqlite-src-3070900.zip diff --git a/sqlite-3.6.12-libdl.patch b/sqlite-3.6.12-libdl.patch deleted file mode 100644 index 4d2c272..0000000 --- a/sqlite-3.6.12-libdl.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up sqlite-3.6.4/configure.ac.orig sqlite-3.6.4/configure.ac ---- sqlite-3.6.4/configure.ac.orig 2008-11-08 11:37:15.000000000 +0200 -+++ sqlite-3.6.4/configure.ac 2008-11-08 11:35:50.000000000 +0200 -@@ -606,6 +606,7 @@ AC_ARG_ENABLE(load-extension, AC_HELP_ST - [use_loadextension=$enableval],[use_loadextension=no]) - if test "${use_loadextension}" = "yes" ; then - OPT_FEATURE_FLAGS="" -+ AC_SEARCH_LIBS(dlopen, [dl]) - else - OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" - fi diff --git a/sqlite-3.7.3-lemon-snprintf.patch b/sqlite-3.7.3-lemon-snprintf.patch deleted file mode 100644 index 2cc009f..0000000 --- a/sqlite-3.7.3-lemon-snprintf.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -up sqlite-3.7.3/tool/lemon.c.lemparpath sqlite-3.7.3/tool/lemon.c ---- sqlite-3.7.3/tool/lemon.c.lemparpath 2008-12-05 20:37:49.000000000 +0200 -+++ sqlite-3.7.3/tool/lemon.c 2008-12-05 20:44:08.000000000 +0200 -@@ -2369,7 +2369,7 @@ - for(z=psp->filename, nBack=0; *z; z++){ - if( *z=='\\' ) nBack++; - } -- sprintf(zLine, "#line %d ", psp->tokenlineno); -+ snprintf(zLine, sizeof zLine, "#line %d ", psp->tokenlineno); - nLine = lemonStrlen(zLine); - n += nLine + lemonStrlen(psp->filename) + nBack; - } -@@ -2953,7 +2953,7 @@ - while( cfp ){ - char buf[20]; - if( cfp->dot==cfp->rp->nrhs ){ -- sprintf(buf,"(%d)",cfp->rp->index); -+ snprintf(buf,sizeof buf,"(%d)",cfp->rp->index); - fprintf(fp," %5s ",buf); - }else{ - fprintf(fp," "); -@@ -3124,9 +3124,9 @@ - - cp = strrchr(lemp->filename,'.'); - if( cp ){ -- sprintf(buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename); -+ snprintf(buf,sizeof buf,"%.*s.lt",(int)(cp-lemp->filename),lemp->filename); - }else{ -- sprintf(buf,"%s.lt",lemp->filename); -+ snprintf(buf,sizeof buf,"%s.lt",lemp->filename); - } - if( access(buf,004)==0 ){ - tpltname = buf; -@@ -3279,7 +3279,7 @@ - while( n-- > 0 ){ - c = *(zText++); - if( c=='%' && n>0 && zText[0]=='d' ){ -- sprintf(zInt, "%d", p1); -+ snprintf(zInt, sizeof zInt, "%d", p1); - p1 = p2; - strcpy(&z[used], zInt); - used += lemonStrlen(&z[used]); -@@ -3891,7 +3891,7 @@ - /* Generate a table containing the symbolic name of every symbol - */ - for(i=0; insymbol; i++){ -- sprintf(line,"\"%s\",",lemp->symbols[i]->name); -+ snprintf(line,sizeof line,"\"%s\",",lemp->symbols[i]->name); - fprintf(out," %-15s",line); - if( (i&3)==3 ){ fprintf(out,"\n"); lineno++; } - } -@@ -4057,7 +4057,7 @@ - in = file_open(lemp,".h","rb"); - if( in ){ - for(i=1; interminal && fgets(line,LINESIZE,in); i++){ -- sprintf(pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); -+ snprintf(pattern,sizeof pattern,"#define %s%-30s %2d\n",prefix,lemp->symbols[i]->name,i); - if( strcmp(line,pattern) ) break; - } - fclose(in); diff --git a/sqlite-3.7.4-wal2-nodirsync.patch b/sqlite-3.7.4-wal2-nodirsync.patch deleted file mode 100644 index 00480d8..0000000 --- a/sqlite-3.7.4-wal2-nodirsync.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -up sqlite-src-3070400/test/wal2.test.nodirsync sqlite-src-3070400/test/wal2.test ---- sqlite-src-3070400/test/wal2.test.nodirsync 2010-12-09 13:49:43.000000000 +0200 -+++ sqlite-src-3070400/test/wal2.test 2010-12-09 13:57:57.000000000 +0200 -@@ -1160,9 +1160,9 @@ if {$::tcl_platform(platform) == "unix"} - # Test that "PRAGMA checkpoint_fullsync" appears to be working. - # - foreach {tn sql reslist} { -- 1 { } {8 0 3 0 5 0} -- 2 { PRAGMA checkpoint_fullfsync = 1 } {8 4 3 2 5 2} -- 3 { PRAGMA checkpoint_fullfsync = 0 } {8 0 3 0 5 0} -+ 1 { } {7 0 3 0 5 0} -+ 2 { PRAGMA checkpoint_fullfsync = 1 } {7 4 3 2 5 2} -+ 3 { PRAGMA checkpoint_fullfsync = 0 } {7 0 3 0 5 0} - } { - faultsim_delete_and_reopen - diff --git a/sqlite-3.7.7.1-stupid-openfiles-test.patch b/sqlite-3.7.7.1-stupid-openfiles-test.patch new file mode 100644 index 0000000..ec6d3f7 --- /dev/null +++ b/sqlite-3.7.7.1-stupid-openfiles-test.patch @@ -0,0 +1,36 @@ +diff -up sqlite-src-3070701/test/oserror.test.openfiles sqlite-src-3070701/test/oserror.test +--- sqlite-src-3070701/test/oserror.test.openfiles 2011-07-13 09:56:46.025857411 +0300 ++++ sqlite-src-3070701/test/oserror.test 2011-07-13 09:57:11.634759798 +0300 +@@ -51,19 +51,19 @@ proc do_re_test {tn script expression} { + # a call to getcwd() may fail if there are no free file descriptors. So + # an error may be reported for either open() or getcwd() here. + # +-puts "Possible valgrind error about invalid file descriptor follows:" +-do_test 1.1.1 { +- set ::log [list] +- list [catch { +- for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 } +- } msg] $msg +-} {1 {unable to open database file}} +-do_test 1.1.2 { +- catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } } +-} {1} +-do_re_test 1.1.3 { +- lindex $::log 0 +-} {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - } ++#puts "Possible valgrind error about invalid file descriptor follows:" ++#do_test 1.1.1 { ++# set ::log [list] ++# list [catch { ++# for {set i 0} {$i < 2000} {incr i} { sqlite3 dbh_$i test.db -readonly 1 } ++# } msg] $msg ++#} {1 {unable to open database file}} ++#do_test 1.1.2 { ++# catch { for {set i 0} {$i < 2000} {incr i} { dbh_$i close } } ++#} {1} ++#do_re_test 1.1.3 { ++# lindex $::log 0 ++#} {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - } + + + # Test a failure in open() due to the path being a directory.