From f8eea96b62e897c3b7d5a9a21d3e4803f35c9c32 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Sun, 21 Dec 2008 04:07:04 +0000 Subject: [PATCH 01/27] Setup of module mingw32-sqlite --- .cvsignore | 0 Makefile | 21 +++++++++++++++++++++ sources | 0 3 files changed, 21 insertions(+) create mode 100644 .cvsignore create mode 100644 Makefile create mode 100644 sources diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..e69de29 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..49f7842 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: mingw32-sqlite +# $Id$ +NAME := mingw32-sqlite +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 From d5d8de85620826979844600061ebfd2be6d8ca24 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 21 Dec 2008 11:15:27 +0000 Subject: [PATCH 02/27] Initial import. --- .cvsignore | 1 + import.log | 1 + mingw32-sqlite-3.6.6.2-no-undefined.patch | 19 ++ mingw32-sqlite.spec | 121 +++++++++++ sources | 1 + sqlite-3.6.6.2-lemon-snprintf.patch | 111 ++++++++++ sqlite-3.6.6.2-libdl.patch | 240 ++++++++++++++++++++++ 7 files changed, 494 insertions(+) create mode 100644 import.log create mode 100644 mingw32-sqlite-3.6.6.2-no-undefined.patch create mode 100644 mingw32-sqlite.spec create mode 100644 sqlite-3.6.6.2-lemon-snprintf.patch create mode 100644 sqlite-3.6.6.2-libdl.patch diff --git a/.cvsignore b/.cvsignore index e69de29..a54b4df 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +sqlite-3.6.6.2.tar.gz diff --git a/import.log b/import.log new file mode 100644 index 0000000..618088a --- /dev/null +++ b/import.log @@ -0,0 +1 @@ +mingw32-sqlite-3_6_6_2-1_fc10:HEAD:mingw32-sqlite-3.6.6.2-1.fc10.src.rpm:1229857793 diff --git a/mingw32-sqlite-3.6.6.2-no-undefined.patch b/mingw32-sqlite-3.6.6.2-no-undefined.patch new file mode 100644 index 0000000..3da0b54 --- /dev/null +++ b/mingw32-sqlite-3.6.6.2-no-undefined.patch @@ -0,0 +1,19 @@ +--- sqlite-3.6.6.2/Makefile.in.orig 2008-12-16 15:43:08.000000000 +0000 ++++ sqlite-3.6.6.2/Makefile.in 2008-12-16 15:43:27.000000000 +0000 +@@ -448,13 +448,14 @@ + + libsqlite3.la: $(LIBOBJ) + $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \ +- ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8" ++ ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8" \ ++ -no-undefined + + libtclsqlite3.la: tclsqlite.lo libsqlite3.la + $(LTLINK) -o $@ tclsqlite.lo \ + libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \ + -rpath "$(libdir)/sqlite" \ +- -version-info "8:6:8" ++ -version-info "8:6:8" -no-undefined + + sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h + $(LTLINK) $(READLINE_FLAGS) \ diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec new file mode 100644 index 0000000..32b96aa --- /dev/null +++ b/mingw32-sqlite.spec @@ -0,0 +1,121 @@ +%define __strip %{_mingw32_strip} +%define __objdump %{_mingw32_objdump} +%define _use_internal_dependency_generator 0 +%define __find_requires %{_mingw32_findrequires} +%define __find_provides %{_mingw32_findprovides} + +Name: mingw32-sqlite +Version: 3.6.6.2 +Release: 1%{?dist} +Summary: MinGW Windows port of sqlite embeddable SQL database engine + +License: Public Domain +Group: Applications/Databases +URL: http://www.sqlite.org/ +Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildArch: noarch + +# Patches from Fedora native package. +Patch1: sqlite-3.6.6.2-libdl.patch +Patch2: sqlite-3.6.6.2-lemon-snprintf.patch + +# Patches for MinGW port. +Patch1000: mingw32-sqlite-3.6.6.2-no-undefined.patch + +BuildRequires: mingw32-filesystem >= 26 +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils + +BuildRequires: mingw32-pdcurses +BuildRequires: mingw32-readline +BuildRequires: mingw32-termcap >= 1.3.1-3 + +BuildRequires: autoconf +BuildRequires: libtool + +Requires: pkgconfig + + +%description +SQLite is a C library that implements an SQL database engine. A large +subset of SQL92 is supported. A complete database is stored in a +single disk file. The API is designed for convenience and ease of use. +Applications that link against SQLite can enjoy the power and +flexibility of an SQL database without the administrative hassles of +supporting a separate database server. Version 2 and version 3 binaries +are named to permit each to be installed on a single host + +This package contains cross-compiled libraries and development tools +for Windows. + + +%prep +%setup -q -n sqlite-%{version} +%patch1 -p1 -b .libdl +%patch2 -p1 -b .lemon-sprintf +%patch1000 -p1 + +# Ships with an old/broken version of libtool which cannot create +# Windows libraries properly. So pull in the current version. +autoreconf +libtoolize --force + + +%build +# I think there's a bug in the configure script where, if +# cross-compiling, it cannot correctly determine the target executable +# extension (ie. .exe). As a result it doesn't correctly detect that +# the target is Windows and so tries to use Unix-specific functions +# which don't exist. In any case we can work around this by forcing +# the extension via this export. +# - RWMJ 2008-09-30 +export config_TARGET_EXEEXT=.exe + +%{_mingw32_configure} +make + + +%install +rm -rf $RPM_BUILD_ROOT +make DESTDIR=$RPM_BUILD_ROOT install + +# Remove static libraries but DON'T remove *.dll.a files. +rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.a + +chmod 0644 $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.dll.a + + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root) +%doc README VERSION +%{_mingw32_bindir}/sqlite3.exe +%{_mingw32_bindir}/libsqlite3-0.dll +%{_mingw32_libdir}/libsqlite3.dll.a +%{_mingw32_libdir}/libsqlite3.la +%{_mingw32_includedir}/sqlite3.h +%{_mingw32_includedir}/sqlite3ext.h +%{_mingw32_libdir}/pkgconfig/sqlite3.pc + + +%changelog +* Tue Dec 16 2008 Richard Jones - 3.6.6.2-1 +- New upstream release (to match Fedora native), 3.6.6.2. +- Replace patches with ones from native. +- Rebase -no-undefined patch. +- Remove spurious +x permissions on libsqlite3.dll.a. +- Requires pkgconfig. + +* Sat Nov 22 2008 Richard Jones - 3.5.9-3 +- Rebuild against new readline. + +* Fri Oct 31 2008 Richard Jones - 3.5.9-2 +- Rebuild against latest termcap. + +* Thu Sep 25 2008 Richard Jones - 3.5.9-1 +- Initial RPM release. diff --git a/sources b/sources index e69de29..d80768a 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +23cd36188f21d427d45191d317bcbcd5 sqlite-3.6.6.2.tar.gz diff --git a/sqlite-3.6.6.2-lemon-snprintf.patch b/sqlite-3.6.6.2-lemon-snprintf.patch new file mode 100644 index 0000000..299f5e3 --- /dev/null +++ b/sqlite-3.6.6.2-lemon-snprintf.patch @@ -0,0 +1,111 @@ +diff -up sqlite-3.6.6.2/tool/lemon.c.lemparpath sqlite-3.6.6.2/tool/lemon.c +--- sqlite-3.6.6.2/tool/lemon.c.lemparpath 2008-12-05 20:37:49.000000000 +0200 ++++ sqlite-3.6.6.2/tool/lemon.c 2008-12-05 20:44:08.000000000 +0200 +@@ -1324,15 +1324,15 @@ void ErrorMsg(const char *filename, int + va_start(ap, format); + /* Prepare a prefix to be prepended to every output line */ + if( lineno>0 ){ +- sprintf(prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno); ++ snprintf(prefix,sizeof prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno); + }else{ +- sprintf(prefix,"%.*s: ",PREFIXLIMIT-10,filename); ++ snprintf(prefix,sizeof prefix,"%.*s: ",PREFIXLIMIT-10,filename); + } + prefixsize = lemonStrlen(prefix); + availablewidth = LINEWIDTH - prefixsize; + + /* Generate the error message */ +- vsprintf(errmsg,format,ap); ++ vsnprintf(errmsg,sizeof errmsg,format,ap); + va_end(ap); + errmsgsize = lemonStrlen(errmsg); + /* Remove trailing '\n's from the error message. */ +@@ -2911,7 +2911,7 @@ struct lemon *lemp; + 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," "); +@@ -2966,6 +2966,7 @@ int modemask; + { + char *pathlist; + char *path,*cp; ++ size_t pathsz; + char c; + + #ifdef __WIN32__ +@@ -2976,21 +2977,21 @@ int modemask; + if( cp ){ + c = *cp; + *cp = 0; +- path = (char *)malloc( lemonStrlen(argv0) + lemonStrlen(name) + 2 ); +- if( path ) sprintf(path,"%s/%s",argv0,name); ++ path = (char *)malloc((pathsz=lemonStrlen(argv0) + lemonStrlen(name) + 2)); ++ if( path ) snprintf(path,pathsz,"%s/%s",argv0,name); + *cp = c; + }else{ + extern char *getenv(); + pathlist = getenv("PATH"); + if( pathlist==0 ) pathlist = ".:/bin:/usr/bin"; +- path = (char *)malloc( lemonStrlen(pathlist)+lemonStrlen(name)+2 ); ++ path = (char *)malloc((pathsz=lemonStrlen(pathlist)+lemonStrlen(name)+2)); + if( path!=0 ){ + while( *pathlist ){ + cp = strchr(pathlist,':'); + if( cp==0 ) cp = &pathlist[lemonStrlen(pathlist)]; + c = *cp; + *cp = 0; +- sprintf(path,"%s/%s",pathlist,name); ++ snprintf(path,pathsz,"%s/%s",pathlist,name); + *cp = c; + if( c==0 ) pathlist = ""; + else pathlist = &cp[1]; +@@ -3070,14 +3071,16 @@ struct lemon *lemp; + + 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; + }else if( access(templatename,004)==0 ){ + tpltname = templatename; ++ }else if( access("/usr/share/lemon/lempar.c",004)==0 ){ ++ tpltname = "/usr/share/lemon/lempar.c"; + }else{ + tpltname = pathsearch(lemp->argv0,templatename,0); + } +@@ -3089,7 +3092,7 @@ struct lemon *lemp; + } + in = fopen(tpltname,"rb"); + if( in==0 ){ +- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); ++ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname); + lemp->errorcnt++; + return 0; + } +@@ -3827,7 +3830,7 @@ int mhflag; /* Output in makeheaders + /* 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++; } + } +@@ -3983,7 +3986,7 @@ struct lemon *lemp; + 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.6.6.2-libdl.patch b/sqlite-3.6.6.2-libdl.patch new file mode 100644 index 0000000..19d10ba --- /dev/null +++ b/sqlite-3.6.6.2-libdl.patch @@ -0,0 +1,240 @@ +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 -up sqlite-3.6.4/configure.orig sqlite-3.6.4/configure +--- sqlite-3.6.4/configure.orig 2008-11-08 11:39:22.000000000 +0200 ++++ sqlite-3.6.4/configure 2008-11-08 11:39:29.000000000 +0200 +@@ -1,6 +1,6 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.59 for sqlite 3.6.1. ++# Generated by GNU Autoconf 2.59 for sqlite 3.6.4. + # + # Copyright (C) 2003 Free Software Foundation, Inc. + # This configure script is free software; the Free Software Foundation +@@ -416,8 +416,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} + # Identity of this package. + PACKAGE_NAME='sqlite' + PACKAGE_TARNAME='sqlite' +-PACKAGE_VERSION='3.6.1' +-PACKAGE_STRING='sqlite 3.6.1' ++PACKAGE_VERSION='3.6.4' ++PACKAGE_STRING='sqlite 3.6.4' + PACKAGE_BUGREPORT='' + + # Factoring default headers for most tests. +@@ -926,7 +926,7 @@ if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +-\`configure' configures sqlite 3.6.1 to adapt to many kinds of systems. ++\`configure' configures sqlite 3.6.4 to adapt to many kinds of systems. + + Usage: $0 [OPTION]... [VAR=VALUE]... + +@@ -987,7 +987,7 @@ fi + + if test -n "$ac_init_help"; then + case $ac_init_help in +- short | recursive ) echo "Configuration of sqlite 3.6.1:";; ++ short | recursive ) echo "Configuration of sqlite 3.6.4:";; + esac + cat <<\_ACEOF + +@@ -1137,7 +1137,7 @@ fi + test -n "$ac_init_help" && exit 0 + if $ac_init_version; then + cat <<\_ACEOF +-sqlite configure 3.6.1 ++sqlite configure 3.6.4 + generated by GNU Autoconf 2.59 + + Copyright (C) 2003 Free Software Foundation, Inc. +@@ -1151,7 +1151,7 @@ cat >&5 <<_ACEOF + This file contains any messages produced by compilers while + running configure, to aid debugging if configure makes a mistake. + +-It was created by sqlite $as_me 3.6.1, which was ++It was created by sqlite $as_me 3.6.4, which was + generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ +@@ -1489,7 +1489,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + # The following RCS revision string applies to configure.in +-# $Revision: 1.65 $ ++# $Revision: 1.49 $ + + ######### + # Programs needed +@@ -11266,10 +11266,6 @@ if test "$TARGET_EXEEXT" = ".exe"; then + SQLITE_OS_WIN=0 + SQLITE_OS_OS2=1 + CFLAGS="$CFLAGS -DSQLITE_OS_OS2=1" +- if test "$ac_compiler_gnu" = "yes" ; then +- CFLAGS="$CFLAGS -Zomf -Zexe -Zmap" +- BUILD_CFLAGS="$BUILD_CFLAGS -Zomf -Zexe" +- fi + else + SQLITE_OS_UNIX=0 + SQLITE_OS_WIN=1 +@@ -12066,6 +12062,132 @@ else + fi; + if test "${use_loadextension}" = "yes" ; then + OPT_FEATURE_FLAGS="" ++ echo "$as_me:$LINENO: checking for library containing dlopen" >&5 ++echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6 ++if test "${ac_cv_search_dlopen+set}" = set; then ++ echo $ECHO_N "(cached) $ECHO_C" >&6 ++else ++ ac_func_search_save_LIBS=$LIBS ++ac_cv_search_dlopen=no ++cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char dlopen (); ++int ++main () ++{ ++dlopen (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_search_dlopen="none required" ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++if test "$ac_cv_search_dlopen" = no; then ++ for ac_lib in dl; do ++ LIBS="-l$ac_lib $ac_func_search_save_LIBS" ++ cat >conftest.$ac_ext <<_ACEOF ++/* confdefs.h. */ ++_ACEOF ++cat confdefs.h >>conftest.$ac_ext ++cat >>conftest.$ac_ext <<_ACEOF ++/* end confdefs.h. */ ++ ++/* Override any gcc2 internal prototype to avoid an error. */ ++#ifdef __cplusplus ++extern "C" ++#endif ++/* We use char because int might match the return type of a gcc2 ++ builtin and then its argument prototype would still apply. */ ++char dlopen (); ++int ++main () ++{ ++dlopen (); ++ ; ++ return 0; ++} ++_ACEOF ++rm -f conftest.$ac_objext conftest$ac_exeext ++if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 ++ (eval $ac_link) 2>conftest.er1 ++ ac_status=$? ++ grep -v '^ *+' conftest.er1 >conftest.err ++ rm -f conftest.er1 ++ cat conftest.err >&5 ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); } && ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; } && ++ { ac_try='test -s conftest$ac_exeext' ++ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 ++ (eval $ac_try) 2>&5 ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&5 ++ (exit $ac_status); }; }; then ++ ac_cv_search_dlopen="-l$ac_lib" ++break ++else ++ echo "$as_me: failed program was:" >&5 ++sed 's/^/| /' conftest.$ac_ext >&5 ++ ++fi ++rm -f conftest.err conftest.$ac_objext \ ++ conftest$ac_exeext conftest.$ac_ext ++ done ++fi ++LIBS=$ac_func_search_save_LIBS ++fi ++echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 ++echo "${ECHO_T}$ac_cv_search_dlopen" >&6 ++if test "$ac_cv_search_dlopen" != no; then ++ test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" ++ ++fi ++ + else + OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" + fi +@@ -12506,7 +12628,7 @@ _ASBOX + } >&5 + cat >&5 <<_CSEOF + +-This file was extended by sqlite $as_me 3.6.1, which was ++This file was extended by sqlite $as_me 3.6.4, which was + generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES +@@ -12569,7 +12691,7 @@ _ACEOF + + cat >>$CONFIG_STATUS <<_ACEOF + ac_cs_version="\\ +-sqlite config.status 3.6.1 ++sqlite config.status 3.6.4 + configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + From 55fb05bc6285ff10bb4df5ad39ef44cc70d4ab14 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 20 Feb 2009 23:29:29 +0000 Subject: [PATCH 03/27] Rebuild for gcc 4.4 --- mingw32-sqlite.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 32b96aa..71862ae 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -6,7 +6,7 @@ Name: mingw32-sqlite Version: 3.6.6.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -24,7 +24,7 @@ Patch2: sqlite-3.6.6.2-lemon-snprintf.patch # Patches for MinGW port. Patch1000: mingw32-sqlite-3.6.6.2-no-undefined.patch -BuildRequires: mingw32-filesystem >= 26 +BuildRequires: mingw32-filesystem >= 49 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils @@ -104,6 +104,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Fri Feb 20 2009 Richard W.M. Jones - 3.6.6.2-2 +- Rebuild for mingw32-gcc 4.4 + * Tue Dec 16 2008 Richard Jones - 3.6.6.2-1 - New upstream release (to match Fedora native), 3.6.6.2. - Replace patches with ones from native. From 8a7ca6e071bf185e4d1c57697f700b9a4f5db26b Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 26 Feb 2009 01:26:08 +0000 Subject: [PATCH 04/27] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- mingw32-sqlite.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 71862ae..9d3755f 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -6,7 +6,7 @@ Name: mingw32-sqlite Version: 3.6.6.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -104,6 +104,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 3.6.6.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Fri Feb 20 2009 Richard W.M. Jones - 3.6.6.2-2 - Rebuild for mingw32-gcc 4.4 From a95fd8655a852c0a61501d8d1adad52e01800db3 Mon Sep 17 00:00:00 2001 From: sailer Date: Thu, 23 Apr 2009 11:39:19 +0000 Subject: [PATCH 05/27] update to 3.6.12, to match native and enable rtree, fts3 --- .cvsignore | 1 + ...> mingw32-sqlite-3.6.12-no-undefined.patch | 13 +- mingw32-sqlite.spec | 19 +- sources | 2 +- sqlite-3.6.12-libdl.patch | 11 + sqlite-3.6.12-memalign.patch | 204 +++++++++++++++ sqlite-3.6.12-no-sqlite-doc.patch | 12 + sqlite-3.6.6.2-libdl.patch | 240 ------------------ 8 files changed, 251 insertions(+), 251 deletions(-) rename mingw32-sqlite-3.6.6.2-no-undefined.patch => mingw32-sqlite-3.6.12-no-undefined.patch (61%) create mode 100644 sqlite-3.6.12-libdl.patch create mode 100644 sqlite-3.6.12-memalign.patch create mode 100644 sqlite-3.6.12-no-sqlite-doc.patch delete mode 100644 sqlite-3.6.6.2-libdl.patch diff --git a/.cvsignore b/.cvsignore index a54b4df..07380c4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ sqlite-3.6.6.2.tar.gz +sqlite-3.6.12.tar.gz diff --git a/mingw32-sqlite-3.6.6.2-no-undefined.patch b/mingw32-sqlite-3.6.12-no-undefined.patch similarity index 61% rename from mingw32-sqlite-3.6.6.2-no-undefined.patch rename to mingw32-sqlite-3.6.12-no-undefined.patch index 3da0b54..211dcd3 100644 --- a/mingw32-sqlite-3.6.6.2-no-undefined.patch +++ b/mingw32-sqlite-3.6.12-no-undefined.patch @@ -1,6 +1,6 @@ ---- sqlite-3.6.6.2/Makefile.in.orig 2008-12-16 15:43:08.000000000 +0000 -+++ sqlite-3.6.6.2/Makefile.in 2008-12-16 15:43:27.000000000 +0000 -@@ -448,13 +448,14 @@ +--- 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 @@ libsqlite3.la: $(LIBOBJ) $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \ @@ -11,9 +11,10 @@ libtclsqlite3.la: tclsqlite.lo libsqlite3.la $(LTLINK) -o $@ tclsqlite.lo \ libsqlite3.la @TCL_STUB_LIB_SPEC@ $(TLIBS) \ - -rpath "$(libdir)/sqlite" \ -- -version-info "8:6:8" -+ -version-info "8:6:8" -no-undefined + -rpath "$(TCLLIBDIR)" \ + -version-info "8:6:8" \ +- -avoid-version ++ -avoid-version -no-undefined sqlite3$(TEXE): $(TOP)/src/shell.c libsqlite3.la sqlite3.h $(LTLINK) $(READLINE_FLAGS) \ diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 9d3755f..4066509 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -5,8 +5,8 @@ %define __find_provides %{_mingw32_findprovides} Name: mingw32-sqlite -Version: 3.6.6.2 -Release: 3%{?dist} +Version: 3.6.12 +Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -18,11 +18,14 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # Patches from Fedora native package. -Patch1: sqlite-3.6.6.2-libdl.patch +Patch1: sqlite-3.6.12-libdl.patch +# Avoid insecure sprintf(), use a system path for lempar.c, patch from Debian Patch2: sqlite-3.6.6.2-lemon-snprintf.patch +Patch3: sqlite-3.6.12-no-sqlite-doc.patch +Patch4: sqlite-3.6.12-memalign.patch # Patches for MinGW port. -Patch1000: mingw32-sqlite-3.6.6.2-no-undefined.patch +Patch1000: mingw32-sqlite-3.6.12-no-undefined.patch BuildRequires: mingw32-filesystem >= 49 BuildRequires: mingw32-gcc @@ -55,6 +58,8 @@ for Windows. %setup -q -n sqlite-%{version} %patch1 -p1 -b .libdl %patch2 -p1 -b .lemon-sprintf +%patch3 -p1 -b .no-sqlite-doc +%patch4 -p1 -b .align %patch1000 -p1 # Ships with an old/broken version of libtool which cannot create @@ -72,6 +77,8 @@ libtoolize --force # the extension via this export. # - RWMJ 2008-09-30 export config_TARGET_EXEEXT=.exe +# add compile flags to enable rtree, fts3 +export MINGW32_CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing" %{_mingw32_configure} make @@ -104,6 +111,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Apr 23 2009 Thomas Sailer - 3.6.12-1 +- update to 3.6.12 to match native +- enable rtree, fts3 + * Wed Feb 25 2009 Fedora Release Engineering - 3.6.6.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild diff --git a/sources b/sources index d80768a..2211e51 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -23cd36188f21d427d45191d317bcbcd5 sqlite-3.6.6.2.tar.gz +13600865a69a3f54d2ac42a0d6b743db sqlite-3.6.12.tar.gz diff --git a/sqlite-3.6.12-libdl.patch b/sqlite-3.6.12-libdl.patch new file mode 100644 index 0000000..4d2c272 --- /dev/null +++ b/sqlite-3.6.12-libdl.patch @@ -0,0 +1,11 @@ +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.6.12-memalign.patch b/sqlite-3.6.12-memalign.patch new file mode 100644 index 0000000..f58609c --- /dev/null +++ b/sqlite-3.6.12-memalign.patch @@ -0,0 +1,204 @@ +--------------------- +PatchSet 6171 +Date: 2009/04/05 15:22:09 +Author: drh +Branch: HEAD +Tag: (none) +Branches: +Log: +Additional code to make sure and to assert that memory allocations have +8-byte alignment. Ticket #3777. + +Members: + src/btree.c:1.589->1.590 + src/memjournal.c:1.10->1.11 + src/pager.c:1.577->1.578 + src/sqliteInt.h:1.850->1.851 + src/vdbeaux.c:1.446->1.447 + src/vdbemem.c:1.139->1.140 + +Index: sqlite/src/btree.c +diff -u sqlite/src/btree.c:1.589 sqlite/src/btree.c:1.590 +--- sqlite/src/btree.c:1.589 Thu Apr 2 20:16:59 2009 ++++ sqlite/src/btree.c Sun Apr 5 12:22:09 2009 +@@ -5357,13 +5357,13 @@ + } + szCell = (u16*)&apCell[nMaxCells]; + aCopy[0] = (u8*)&szCell[nMaxCells]; +- assert( ((aCopy[0] - (u8*)0) & 7)==0 ); /* 8-byte alignment required */ ++ assert( EIGHT_BYTE_ALIGNMENT(aCopy[0]) ); + for(i=1; ipageSize+ROUND8(sizeof(MemPage))]; + assert( ((aCopy[i] - (u8*)0) & 7)==0 ); /* 8-byte alignment required */ + } + aSpace1 = &aCopy[NB-1][pBt->pageSize+ROUND8(sizeof(MemPage))]; +- assert( ((aSpace1 - (u8*)0) & 7)==0 ); /* 8-byte alignment required */ ++ assert( EIGHT_BYTE_ALIGNMENT(aSpace1) ); + if( ISAUTOVACUUM ){ + aFrom = &aSpace1[pBt->pageSize]; + } +Index: sqlite/src/memjournal.c +diff -u sqlite/src/memjournal.c:1.10 sqlite/src/memjournal.c:1.11 +--- sqlite/src/memjournal.c:1.10 Thu Apr 2 17:22:42 2009 ++++ sqlite/src/memjournal.c Sun Apr 5 12:22:09 2009 +@@ -237,6 +237,7 @@ + */ + void sqlite3MemJournalOpen(sqlite3_file *pJfd){ + MemJournal *p = (MemJournal *)pJfd; ++ assert( EIGHT_BYTE_ALIGNMENT(p) ); + memset(p, 0, sqlite3MemJournalSize()); + p->pMethod = &MemJournalMethods; + } +Index: sqlite/src/pager.c +diff -u sqlite/src/pager.c:1.577 sqlite/src/pager.c:1.578 +--- sqlite/src/pager.c:1.577 Sat Apr 4 15:53:48 2009 ++++ sqlite/src/pager.c Sun Apr 5 12:22:09 2009 +@@ -3114,9 +3114,9 @@ + ** source file journal.c). + */ + if( sqlite3JournalSize(pVfs)>sqlite3MemJournalSize() ){ +- journalFileSize = sqlite3JournalSize(pVfs); ++ journalFileSize = ROUND8(sqlite3JournalSize(pVfs)); + }else{ +- journalFileSize = sqlite3MemJournalSize(); ++ journalFileSize = ROUND8(sqlite3MemJournalSize()); + } + + /* Set the output variable to NULL in case an error occurs. */ +@@ -3172,23 +3172,25 @@ + ** Journal file name (nPathname+8+1 bytes) + */ + pPtr = (u8 *)sqlite3MallocZero( +- sizeof(*pPager) + /* Pager structure */ +- pcacheSize + /* PCache object */ +- pVfs->szOsFile + /* The main db file */ +- journalFileSize * 2 + /* The two journal files */ +- nPathname + 1 + /* zFilename */ +- nPathname + 8 + 1 /* zJournal */ ++ ROUND8(sizeof(*pPager)) + /* Pager structure */ ++ ROUND8(pcacheSize) + /* PCache object */ ++ ROUND8(pVfs->szOsFile) + /* The main db file */ ++ journalFileSize * 2 + /* The two journal files */ ++ nPathname + 1 + /* zFilename */ ++ nPathname + 8 + 1 /* zJournal */ + ); ++ assert( EIGHT_BYTE_ALIGNMENT(journalFileSize) ); + if( !pPtr ){ + sqlite3_free(zPathname); + return SQLITE_NOMEM; + } + pPager = (Pager*)(pPtr); +- pPager->pPCache = (PCache*)(pPtr += sizeof(*pPager)); +- pPager->fd = (sqlite3_file*)(pPtr += pcacheSize); +- pPager->sjfd = (sqlite3_file*)(pPtr += pVfs->szOsFile); ++ pPager->pPCache = (PCache*)(pPtr += ROUND8(sizeof(*pPager))); ++ pPager->fd = (sqlite3_file*)(pPtr += ROUND8(pcacheSize)); ++ pPager->sjfd = (sqlite3_file*)(pPtr += ROUND8(pVfs->szOsFile)); + pPager->jfd = (sqlite3_file*)(pPtr += journalFileSize); + pPager->zFilename = (char*)(pPtr += journalFileSize); ++ assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) ); + + /* Fill in the Pager.zFilename and Pager.zJournal buffers, if required. */ + if( zPathname ){ +Index: sqlite/src/sqliteInt.h +diff -u sqlite/src/sqliteInt.h:1.850 sqlite/src/sqliteInt.h:1.851 +--- sqlite/src/sqliteInt.h:1.850 Wed Apr 1 18:03:01 2009 ++++ sqlite/src/sqliteInt.h Sun Apr 5 12:22:09 2009 +@@ -456,6 +456,11 @@ + #define ROUNDDOWN8(x) ((x)&~7) + + /* ++** Assert that the pointer X is aligned to an 8-byte boundary. ++*/ ++#define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&7)==0) ++ ++/* + ** An instance of the following structure is used to store the busy-handler + ** callback for a given sqlite handle. + ** +Index: sqlite/src/vdbeaux.c +diff -u sqlite/src/vdbeaux.c:1.446 sqlite/src/vdbeaux.c:1.447 +--- sqlite/src/vdbeaux.c:1.446 Wed Mar 25 15:43:09 2009 ++++ sqlite/src/vdbeaux.c Sun Apr 5 12:22:09 2009 +@@ -1023,6 +1023,7 @@ + u8 *pEnd, /* Pointer to 1 byte past the end of *ppFrom buffer */ + int *pnByte /* If allocation cannot be made, increment *pnByte */ + ){ ++ assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) ); + if( (*(void**)pp)==0 ){ + nByte = ROUND8(nByte); + if( (pEnd - *ppFrom)>=nByte ){ +@@ -1096,6 +1097,8 @@ + if( isExplain && nMem<10 ){ + nMem = 10; + } ++ zCsr += (zCsr - (u8*)0)&7; ++ assert( EIGHT_BYTE_ALIGNMENT(zCsr) ); + + do { + memset(zCsr, 0, zEnd-zCsr); +Index: sqlite/src/vdbemem.c +diff -u sqlite/src/vdbemem.c:1.139 sqlite/src/vdbemem.c:1.140 +--- sqlite/src/vdbemem.c:1.139 Sun Mar 29 15:12:10 2009 ++++ sqlite/src/vdbemem.c Sun Apr 5 12:22:09 2009 +@@ -209,6 +209,7 @@ + assert( !(fg&(MEM_Str|MEM_Blob)) ); + assert( fg&(MEM_Int|MEM_Real) ); + assert( (pMem->flags&MEM_RowSet)==0 ); ++ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); + + + if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){ +@@ -345,6 +346,7 @@ + i64 sqlite3VdbeIntValue(Mem *pMem){ + int flags; + assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); ++ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); + flags = pMem->flags; + if( flags & MEM_Int ){ + return pMem->u.i; +@@ -373,6 +375,7 @@ + */ + double sqlite3VdbeRealValue(Mem *pMem){ + assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); ++ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); + if( pMem->flags & MEM_Real ){ + return pMem->r; + }else if( pMem->flags & MEM_Int ){ +@@ -403,6 +406,7 @@ + assert( pMem->flags & MEM_Real ); + assert( (pMem->flags & MEM_RowSet)==0 ); + assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); ++ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); + + pMem->u.i = doubleToInt64(pMem->r); + if( pMem->r==(double)pMem->u.i ){ +@@ -416,6 +420,8 @@ + int sqlite3VdbeMemIntegerify(Mem *pMem){ + assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); + assert( (pMem->flags & MEM_RowSet)==0 ); ++ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); ++ + pMem->u.i = sqlite3VdbeIntValue(pMem); + MemSetTypeFlag(pMem, MEM_Int); + return SQLITE_OK; +@@ -427,6 +433,8 @@ + */ + int sqlite3VdbeMemRealify(Mem *pMem){ + assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); ++ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); ++ + pMem->r = sqlite3VdbeRealValue(pMem); + MemSetTypeFlag(pMem, MEM_Real); + return SQLITE_OK; +diff -u sqlite/src/vdbeaux.c:1.447 sqlite/src/vdbeaux.c:1.448 +--- sqlite/src/vdbeaux.c:1.447 Sun Apr 5 12:22:09 2009 ++++ sqlite/src/vdbeaux.c Mon Apr 6 11:11:43 2009 +@@ -1099,6 +1099,7 @@ + } + zCsr += (zCsr - (u8*)0)&7; + assert( EIGHT_BYTE_ALIGNMENT(zCsr) ); ++ if( zEnd, for the Debian GNU/Linux system (but may be used diff --git a/sqlite-3.6.6.2-libdl.patch b/sqlite-3.6.6.2-libdl.patch deleted file mode 100644 index 19d10ba..0000000 --- a/sqlite-3.6.6.2-libdl.patch +++ /dev/null @@ -1,240 +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 -up sqlite-3.6.4/configure.orig sqlite-3.6.4/configure ---- sqlite-3.6.4/configure.orig 2008-11-08 11:39:22.000000000 +0200 -+++ sqlite-3.6.4/configure 2008-11-08 11:39:29.000000000 +0200 -@@ -1,6 +1,6 @@ - #! /bin/sh - # Guess values for system-dependent variables and create Makefiles. --# Generated by GNU Autoconf 2.59 for sqlite 3.6.1. -+# Generated by GNU Autoconf 2.59 for sqlite 3.6.4. - # - # Copyright (C) 2003 Free Software Foundation, Inc. - # This configure script is free software; the Free Software Foundation -@@ -416,8 +416,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} - # Identity of this package. - PACKAGE_NAME='sqlite' - PACKAGE_TARNAME='sqlite' --PACKAGE_VERSION='3.6.1' --PACKAGE_STRING='sqlite 3.6.1' -+PACKAGE_VERSION='3.6.4' -+PACKAGE_STRING='sqlite 3.6.4' - PACKAGE_BUGREPORT='' - - # Factoring default headers for most tests. -@@ -926,7 +926,7 @@ if test "$ac_init_help" = "long"; then - # Omit some internal or obsolete options to make the list less imposing. - # This message is too long to be a string in the A/UX 3.1 sh. - cat <<_ACEOF --\`configure' configures sqlite 3.6.1 to adapt to many kinds of systems. -+\`configure' configures sqlite 3.6.4 to adapt to many kinds of systems. - - Usage: $0 [OPTION]... [VAR=VALUE]... - -@@ -987,7 +987,7 @@ fi - - if test -n "$ac_init_help"; then - case $ac_init_help in -- short | recursive ) echo "Configuration of sqlite 3.6.1:";; -+ short | recursive ) echo "Configuration of sqlite 3.6.4:";; - esac - cat <<\_ACEOF - -@@ -1137,7 +1137,7 @@ fi - test -n "$ac_init_help" && exit 0 - if $ac_init_version; then - cat <<\_ACEOF --sqlite configure 3.6.1 -+sqlite configure 3.6.4 - generated by GNU Autoconf 2.59 - - Copyright (C) 2003 Free Software Foundation, Inc. -@@ -1151,7 +1151,7 @@ cat >&5 <<_ACEOF - This file contains any messages produced by compilers while - running configure, to aid debugging if configure makes a mistake. - --It was created by sqlite $as_me 3.6.1, which was -+It was created by sqlite $as_me 3.6.4, which was - generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ -@@ -1489,7 +1489,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - # The following RCS revision string applies to configure.in --# $Revision: 1.65 $ -+# $Revision: 1.49 $ - - ######### - # Programs needed -@@ -11266,10 +11266,6 @@ if test "$TARGET_EXEEXT" = ".exe"; then - SQLITE_OS_WIN=0 - SQLITE_OS_OS2=1 - CFLAGS="$CFLAGS -DSQLITE_OS_OS2=1" -- if test "$ac_compiler_gnu" = "yes" ; then -- CFLAGS="$CFLAGS -Zomf -Zexe -Zmap" -- BUILD_CFLAGS="$BUILD_CFLAGS -Zomf -Zexe" -- fi - else - SQLITE_OS_UNIX=0 - SQLITE_OS_WIN=1 -@@ -12066,6 +12062,132 @@ else - fi; - if test "${use_loadextension}" = "yes" ; then - OPT_FEATURE_FLAGS="" -+ echo "$as_me:$LINENO: checking for library containing dlopen" >&5 -+echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6 -+if test "${ac_cv_search_dlopen+set}" = set; then -+ echo $ECHO_N "(cached) $ECHO_C" >&6 -+else -+ ac_func_search_save_LIBS=$LIBS -+ac_cv_search_dlopen=no -+cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char dlopen (); -+int -+main () -+{ -+dlopen (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_search_dlopen="none required" -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+if test "$ac_cv_search_dlopen" = no; then -+ for ac_lib in dl; do -+ LIBS="-l$ac_lib $ac_func_search_save_LIBS" -+ cat >conftest.$ac_ext <<_ACEOF -+/* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+/* Override any gcc2 internal prototype to avoid an error. */ -+#ifdef __cplusplus -+extern "C" -+#endif -+/* We use char because int might match the return type of a gcc2 -+ builtin and then its argument prototype would still apply. */ -+char dlopen (); -+int -+main () -+{ -+dlopen (); -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext conftest$ac_exeext -+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 -+ (eval $ac_link) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest$ac_exeext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ ac_cv_search_dlopen="-l$ac_lib" -+break -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+fi -+rm -f conftest.err conftest.$ac_objext \ -+ conftest$ac_exeext conftest.$ac_ext -+ done -+fi -+LIBS=$ac_func_search_save_LIBS -+fi -+echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 -+echo "${ECHO_T}$ac_cv_search_dlopen" >&6 -+if test "$ac_cv_search_dlopen" != no; then -+ test "$ac_cv_search_dlopen" = "none required" || LIBS="$ac_cv_search_dlopen $LIBS" -+ -+fi -+ - else - OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" - fi -@@ -12506,7 +12628,7 @@ _ASBOX - } >&5 - cat >&5 <<_CSEOF - --This file was extended by sqlite $as_me 3.6.1, which was -+This file was extended by sqlite $as_me 3.6.4, which was - generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES -@@ -12569,7 +12691,7 @@ _ACEOF - - cat >>$CONFIG_STATUS <<_ACEOF - ac_cs_version="\\ --sqlite config.status 3.6.1 -+sqlite config.status 3.6.4 - configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - From c63def1a17af655156ddb967e6ec1f6881e5a5ba Mon Sep 17 00:00:00 2001 From: sailer Date: Thu, 23 Apr 2009 13:36:21 +0000 Subject: [PATCH 06/27] BR tclsh --- mingw32-sqlite.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 4066509..9b87b6a 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -6,7 +6,7 @@ Name: mingw32-sqlite Version: 3.6.12 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -37,6 +37,7 @@ BuildRequires: mingw32-termcap >= 1.3.1-3 BuildRequires: autoconf BuildRequires: libtool +BuildRequires: /usr/bin/tclsh Requires: pkgconfig @@ -111,6 +112,10 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Apr 23 2009 Thomas Sailer - 3.6.12-2 +- BR tclsh; the build process without tclsh and with extensions + enabled is broken + * Thu Apr 23 2009 Thomas Sailer - 3.6.12-1 - update to 3.6.12 to match native - enable rtree, fts3 From 82428ca16f1b0b93e2c30196119c1f0ddd4f1ddb Mon Sep 17 00:00:00 2001 From: sailer Date: Thu, 23 Apr 2009 17:11:32 +0000 Subject: [PATCH 07/27] heed Erik van Pienbroek advice wrt. CFLAGS --- mingw32-sqlite.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 9b87b6a..d3c6c43 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -6,7 +6,7 @@ Name: mingw32-sqlite Version: 3.6.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -79,7 +79,7 @@ libtoolize --force # - RWMJ 2008-09-30 export config_TARGET_EXEEXT=.exe # add compile flags to enable rtree, fts3 -export MINGW32_CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -mms-bitfields -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing" +export MINGW32_CFLAGS="$MINGW32_CFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing" %{_mingw32_configure} make @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Apr 23 2009 Thomas Sailer - 3.6.12-3 +- use Erik van Pienbroek way to add to CFLAGS + * Thu Apr 23 2009 Thomas Sailer - 3.6.12-2 - BR tclsh; the build process without tclsh and with extensions enabled is broken From 150fe964ee2cfa367f51b6c2a7d630de4356bd1a Mon Sep 17 00:00:00 2001 From: sailer Date: Thu, 23 Apr 2009 18:20:15 +0000 Subject: [PATCH 08/27] now really fix the CFLAGS issue --- mingw32-sqlite.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index d3c6c43..9ead943 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -6,7 +6,7 @@ Name: mingw32-sqlite Version: 3.6.12 -Release: 3%{?dist} +Release: 4%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -79,7 +79,7 @@ libtoolize --force # - RWMJ 2008-09-30 export config_TARGET_EXEEXT=.exe # add compile flags to enable rtree, fts3 -export MINGW32_CFLAGS="$MINGW32_CFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing" +export MINGW32_CFLAGS="%{_mingw32_cflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing" %{_mingw32_configure} make @@ -112,6 +112,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Apr 23 2009 Thomas Sailer - 3.6.12-4 +- fix CFLAGS setting + * Thu Apr 23 2009 Thomas Sailer - 3.6.12-3 - use Erik van Pienbroek way to add to CFLAGS From 282bf636573ad5020266fd8e5610fab6095ca74f Mon Sep 17 00:00:00 2001 From: sailer Date: Tue, 23 Jun 2009 09:50:06 +0000 Subject: [PATCH 09/27] add debuginfo --- mingw32-sqlite.spec | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 9ead943..1d3ac38 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -3,10 +3,11 @@ %define _use_internal_dependency_generator 0 %define __find_requires %{_mingw32_findrequires} %define __find_provides %{_mingw32_findprovides} +%define __debug_install_post %{_mingw32_debug_install_post} Name: mingw32-sqlite Version: 3.6.12 -Release: 4%{?dist} +Release: 5%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -27,7 +28,7 @@ Patch4: sqlite-3.6.12-memalign.patch # Patches for MinGW port. Patch1000: mingw32-sqlite-3.6.12-no-undefined.patch -BuildRequires: mingw32-filesystem >= 49 +BuildRequires: mingw32-filesystem >= 52 BuildRequires: mingw32-gcc BuildRequires: mingw32-binutils @@ -55,6 +56,9 @@ This package contains cross-compiled libraries and development tools for Windows. +%{_mingw32_debug_package} + + %prep %setup -q -n sqlite-%{version} %patch1 -p1 -b .libdl @@ -112,6 +116,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Jun 22 2009 Thomas Sailer - 3.6.12-5 +- add debuginfo packages + * Thu Apr 23 2009 Thomas Sailer - 3.6.12-4 - fix CFLAGS setting From afc5ebecd0f0ccaaff1abeed52e9c2f5be51b795 Mon Sep 17 00:00:00 2001 From: sailer Date: Thu, 25 Jun 2009 10:18:53 +0000 Subject: [PATCH 10/27] update to 3.6.14.2, enable debuginfo --- .cvsignore | 3 +-- mingw32-sqlite.spec | 46 +++++++++++++++++++++++++++++++-------------- sources | 2 +- 3 files changed, 34 insertions(+), 17 deletions(-) diff --git a/.cvsignore b/.cvsignore index 07380c4..76aad38 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -sqlite-3.6.6.2.tar.gz -sqlite-3.6.12.tar.gz +sqlite-3.6.14.2.tar.gz diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 1d3ac38..502bfd8 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -1,13 +1,17 @@ -%define __strip %{_mingw32_strip} -%define __objdump %{_mingw32_objdump} -%define _use_internal_dependency_generator 0 -%define __find_requires %{_mingw32_findrequires} -%define __find_provides %{_mingw32_findprovides} +%global __strip %{_mingw32_strip} +%global __objdump %{_mingw32_objdump} +%global _use_internal_dependency_generator 0 +%global __find_requires %{_mingw32_findrequires} +%global __find_provides %{_mingw32_findprovides} %define __debug_install_post %{_mingw32_debug_install_post} +# bcond default logic is nicely backwards... +%bcond_without tcl +%global tclversion 8.5 + Name: mingw32-sqlite -Version: 3.6.12 -Release: 5%{?dist} +Version: 3.6.14.2 +Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -22,8 +26,7 @@ BuildArch: noarch Patch1: sqlite-3.6.12-libdl.patch # Avoid insecure sprintf(), use a system path for lempar.c, patch from Debian Patch2: sqlite-3.6.6.2-lemon-snprintf.patch -Patch3: sqlite-3.6.12-no-sqlite-doc.patch -Patch4: sqlite-3.6.12-memalign.patch +Patch3: sqlite-3.6.13-iotest-nodirsync.patch # Patches for MinGW port. Patch1000: mingw32-sqlite-3.6.12-no-undefined.patch @@ -42,6 +45,11 @@ BuildRequires: /usr/bin/tclsh Requires: pkgconfig +%if %{with tcl} +BuildRequires: /usr/bin/tclsh +BuildRequires: mingw32-tcl +%endif + %description SQLite is a C library that implements an SQL database engine. A large @@ -63,8 +71,7 @@ for Windows. %setup -q -n sqlite-%{version} %patch1 -p1 -b .libdl %patch2 -p1 -b .lemon-sprintf -%patch3 -p1 -b .no-sqlite-doc -%patch4 -p1 -b .align +%patch3 -p1 -b .nodirsync %patch1000 -p1 # Ships with an old/broken version of libtool which cannot create @@ -85,7 +92,10 @@ export config_TARGET_EXEEXT=.exe # add compile flags to enable rtree, fts3 export MINGW32_CFLAGS="%{_mingw32_cflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1 -fno-strict-aliasing" -%{_mingw32_configure} +%{_mingw32_configure} %{!?with_tcl:--disable-tcl} \ + --enable-threadsafe \ + --enable-threads-override-locks \ + --enable-load-extension make @@ -98,6 +108,10 @@ rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.a chmod 0644 $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.dll.a +%if %{with tcl} +install -d -m755 $RPM_BUILD_ROOT%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/ +mv $RPM_BUILD_ROOT%{_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl $RPM_BUILD_ROOT%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/ +%endif %clean rm -rf $RPM_BUILD_ROOT @@ -113,10 +127,14 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_includedir}/sqlite3.h %{_mingw32_includedir}/sqlite3ext.h %{_mingw32_libdir}/pkgconfig/sqlite3.pc - +%if %{with tcl} +%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/ +%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl +%endif %changelog -* Mon Jun 22 2009 Thomas Sailer - 3.6.12-5 +* Tue Jun 23 2009 Thomas Sailer - 3.6.14.2-1 +- update to 3.6.14.2 - add debuginfo packages * Thu Apr 23 2009 Thomas Sailer - 3.6.12-4 diff --git a/sources b/sources index 2211e51..8fc546c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -13600865a69a3f54d2ac42a0d6b743db sqlite-3.6.12.tar.gz +4c074691b48cd45854899ae4fece6301 sqlite-3.6.14.2.tar.gz From f512653d91a615b03905eec4e4b9209fd3b9e39b Mon Sep 17 00:00:00 2001 From: sailer Date: Thu, 25 Jun 2009 10:20:52 +0000 Subject: [PATCH 11/27] clean up patches --- sqlite-3.6.12-memalign.patch | 204 --------------------------- sqlite-3.6.12-no-sqlite-doc.patch | 12 -- sqlite-3.6.13-iotest-nodirsync.patch | 13 ++ 3 files changed, 13 insertions(+), 216 deletions(-) delete mode 100644 sqlite-3.6.12-memalign.patch delete mode 100644 sqlite-3.6.12-no-sqlite-doc.patch create mode 100644 sqlite-3.6.13-iotest-nodirsync.patch diff --git a/sqlite-3.6.12-memalign.patch b/sqlite-3.6.12-memalign.patch deleted file mode 100644 index f58609c..0000000 --- a/sqlite-3.6.12-memalign.patch +++ /dev/null @@ -1,204 +0,0 @@ ---------------------- -PatchSet 6171 -Date: 2009/04/05 15:22:09 -Author: drh -Branch: HEAD -Tag: (none) -Branches: -Log: -Additional code to make sure and to assert that memory allocations have -8-byte alignment. Ticket #3777. - -Members: - src/btree.c:1.589->1.590 - src/memjournal.c:1.10->1.11 - src/pager.c:1.577->1.578 - src/sqliteInt.h:1.850->1.851 - src/vdbeaux.c:1.446->1.447 - src/vdbemem.c:1.139->1.140 - -Index: sqlite/src/btree.c -diff -u sqlite/src/btree.c:1.589 sqlite/src/btree.c:1.590 ---- sqlite/src/btree.c:1.589 Thu Apr 2 20:16:59 2009 -+++ sqlite/src/btree.c Sun Apr 5 12:22:09 2009 -@@ -5357,13 +5357,13 @@ - } - szCell = (u16*)&apCell[nMaxCells]; - aCopy[0] = (u8*)&szCell[nMaxCells]; -- assert( ((aCopy[0] - (u8*)0) & 7)==0 ); /* 8-byte alignment required */ -+ assert( EIGHT_BYTE_ALIGNMENT(aCopy[0]) ); - for(i=1; ipageSize+ROUND8(sizeof(MemPage))]; - assert( ((aCopy[i] - (u8*)0) & 7)==0 ); /* 8-byte alignment required */ - } - aSpace1 = &aCopy[NB-1][pBt->pageSize+ROUND8(sizeof(MemPage))]; -- assert( ((aSpace1 - (u8*)0) & 7)==0 ); /* 8-byte alignment required */ -+ assert( EIGHT_BYTE_ALIGNMENT(aSpace1) ); - if( ISAUTOVACUUM ){ - aFrom = &aSpace1[pBt->pageSize]; - } -Index: sqlite/src/memjournal.c -diff -u sqlite/src/memjournal.c:1.10 sqlite/src/memjournal.c:1.11 ---- sqlite/src/memjournal.c:1.10 Thu Apr 2 17:22:42 2009 -+++ sqlite/src/memjournal.c Sun Apr 5 12:22:09 2009 -@@ -237,6 +237,7 @@ - */ - void sqlite3MemJournalOpen(sqlite3_file *pJfd){ - MemJournal *p = (MemJournal *)pJfd; -+ assert( EIGHT_BYTE_ALIGNMENT(p) ); - memset(p, 0, sqlite3MemJournalSize()); - p->pMethod = &MemJournalMethods; - } -Index: sqlite/src/pager.c -diff -u sqlite/src/pager.c:1.577 sqlite/src/pager.c:1.578 ---- sqlite/src/pager.c:1.577 Sat Apr 4 15:53:48 2009 -+++ sqlite/src/pager.c Sun Apr 5 12:22:09 2009 -@@ -3114,9 +3114,9 @@ - ** source file journal.c). - */ - if( sqlite3JournalSize(pVfs)>sqlite3MemJournalSize() ){ -- journalFileSize = sqlite3JournalSize(pVfs); -+ journalFileSize = ROUND8(sqlite3JournalSize(pVfs)); - }else{ -- journalFileSize = sqlite3MemJournalSize(); -+ journalFileSize = ROUND8(sqlite3MemJournalSize()); - } - - /* Set the output variable to NULL in case an error occurs. */ -@@ -3172,23 +3172,25 @@ - ** Journal file name (nPathname+8+1 bytes) - */ - pPtr = (u8 *)sqlite3MallocZero( -- sizeof(*pPager) + /* Pager structure */ -- pcacheSize + /* PCache object */ -- pVfs->szOsFile + /* The main db file */ -- journalFileSize * 2 + /* The two journal files */ -- nPathname + 1 + /* zFilename */ -- nPathname + 8 + 1 /* zJournal */ -+ ROUND8(sizeof(*pPager)) + /* Pager structure */ -+ ROUND8(pcacheSize) + /* PCache object */ -+ ROUND8(pVfs->szOsFile) + /* The main db file */ -+ journalFileSize * 2 + /* The two journal files */ -+ nPathname + 1 + /* zFilename */ -+ nPathname + 8 + 1 /* zJournal */ - ); -+ assert( EIGHT_BYTE_ALIGNMENT(journalFileSize) ); - if( !pPtr ){ - sqlite3_free(zPathname); - return SQLITE_NOMEM; - } - pPager = (Pager*)(pPtr); -- pPager->pPCache = (PCache*)(pPtr += sizeof(*pPager)); -- pPager->fd = (sqlite3_file*)(pPtr += pcacheSize); -- pPager->sjfd = (sqlite3_file*)(pPtr += pVfs->szOsFile); -+ pPager->pPCache = (PCache*)(pPtr += ROUND8(sizeof(*pPager))); -+ pPager->fd = (sqlite3_file*)(pPtr += ROUND8(pcacheSize)); -+ pPager->sjfd = (sqlite3_file*)(pPtr += ROUND8(pVfs->szOsFile)); - pPager->jfd = (sqlite3_file*)(pPtr += journalFileSize); - pPager->zFilename = (char*)(pPtr += journalFileSize); -+ assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) ); - - /* Fill in the Pager.zFilename and Pager.zJournal buffers, if required. */ - if( zPathname ){ -Index: sqlite/src/sqliteInt.h -diff -u sqlite/src/sqliteInt.h:1.850 sqlite/src/sqliteInt.h:1.851 ---- sqlite/src/sqliteInt.h:1.850 Wed Apr 1 18:03:01 2009 -+++ sqlite/src/sqliteInt.h Sun Apr 5 12:22:09 2009 -@@ -456,6 +456,11 @@ - #define ROUNDDOWN8(x) ((x)&~7) - - /* -+** Assert that the pointer X is aligned to an 8-byte boundary. -+*/ -+#define EIGHT_BYTE_ALIGNMENT(X) ((((char*)(X) - (char*)0)&7)==0) -+ -+/* - ** An instance of the following structure is used to store the busy-handler - ** callback for a given sqlite handle. - ** -Index: sqlite/src/vdbeaux.c -diff -u sqlite/src/vdbeaux.c:1.446 sqlite/src/vdbeaux.c:1.447 ---- sqlite/src/vdbeaux.c:1.446 Wed Mar 25 15:43:09 2009 -+++ sqlite/src/vdbeaux.c Sun Apr 5 12:22:09 2009 -@@ -1023,6 +1023,7 @@ - u8 *pEnd, /* Pointer to 1 byte past the end of *ppFrom buffer */ - int *pnByte /* If allocation cannot be made, increment *pnByte */ - ){ -+ assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) ); - if( (*(void**)pp)==0 ){ - nByte = ROUND8(nByte); - if( (pEnd - *ppFrom)>=nByte ){ -@@ -1096,6 +1097,8 @@ - if( isExplain && nMem<10 ){ - nMem = 10; - } -+ zCsr += (zCsr - (u8*)0)&7; -+ assert( EIGHT_BYTE_ALIGNMENT(zCsr) ); - - do { - memset(zCsr, 0, zEnd-zCsr); -Index: sqlite/src/vdbemem.c -diff -u sqlite/src/vdbemem.c:1.139 sqlite/src/vdbemem.c:1.140 ---- sqlite/src/vdbemem.c:1.139 Sun Mar 29 15:12:10 2009 -+++ sqlite/src/vdbemem.c Sun Apr 5 12:22:09 2009 -@@ -209,6 +209,7 @@ - assert( !(fg&(MEM_Str|MEM_Blob)) ); - assert( fg&(MEM_Int|MEM_Real) ); - assert( (pMem->flags&MEM_RowSet)==0 ); -+ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); - - - if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){ -@@ -345,6 +346,7 @@ - i64 sqlite3VdbeIntValue(Mem *pMem){ - int flags; - assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); -+ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); - flags = pMem->flags; - if( flags & MEM_Int ){ - return pMem->u.i; -@@ -373,6 +375,7 @@ - */ - double sqlite3VdbeRealValue(Mem *pMem){ - assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); -+ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); - if( pMem->flags & MEM_Real ){ - return pMem->r; - }else if( pMem->flags & MEM_Int ){ -@@ -403,6 +406,7 @@ - assert( pMem->flags & MEM_Real ); - assert( (pMem->flags & MEM_RowSet)==0 ); - assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); -+ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); - - pMem->u.i = doubleToInt64(pMem->r); - if( pMem->r==(double)pMem->u.i ){ -@@ -416,6 +420,8 @@ - int sqlite3VdbeMemIntegerify(Mem *pMem){ - assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); - assert( (pMem->flags & MEM_RowSet)==0 ); -+ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); -+ - pMem->u.i = sqlite3VdbeIntValue(pMem); - MemSetTypeFlag(pMem, MEM_Int); - return SQLITE_OK; -@@ -427,6 +433,8 @@ - */ - int sqlite3VdbeMemRealify(Mem *pMem){ - assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); -+ assert( EIGHT_BYTE_ALIGNMENT(pMem) ); -+ - pMem->r = sqlite3VdbeRealValue(pMem); - MemSetTypeFlag(pMem, MEM_Real); - return SQLITE_OK; -diff -u sqlite/src/vdbeaux.c:1.447 sqlite/src/vdbeaux.c:1.448 ---- sqlite/src/vdbeaux.c:1.447 Sun Apr 5 12:22:09 2009 -+++ sqlite/src/vdbeaux.c Mon Apr 6 11:11:43 2009 -@@ -1099,6 +1099,7 @@ - } - zCsr += (zCsr - (u8*)0)&7; - assert( EIGHT_BYTE_ALIGNMENT(zCsr) ); -+ if( zEnd, for the Debian GNU/Linux system (but may be used diff --git a/sqlite-3.6.13-iotest-nodirsync.patch b/sqlite-3.6.13-iotest-nodirsync.patch new file mode 100644 index 0000000..916abd8 --- /dev/null +++ b/sqlite-3.6.13-iotest-nodirsync.patch @@ -0,0 +1,13 @@ +diff -up sqlite-3.6.13/test/io.test.nodirsync sqlite-3.6.13/test/io.test +--- sqlite-3.6.13/test/io.test.nodirsync 2009-05-14 12:12:21.000000000 +0300 ++++ sqlite-3.6.13/test/io.test 2009-05-14 12:13:51.000000000 +0300 +@@ -426,7 +426,8 @@ sqlite3_simulate_device -char safe_appen + # on the journal file between steps (2) and (3) above. + # + if {$::tcl_platform(platform)=="unix"} { +- set expected_sync_count 3 ++ # normally 3 but with -DSQLITE_DISABLE_DIRSYNC its 2 ++ set expected_sync_count 2 + } else { + set expected_sync_count 2 + } From 69887c4555429d0cca18ae2558233a6d80bc4a6c Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 25 Jul 2009 14:31:41 +0000 Subject: [PATCH 12/27] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- mingw32-sqlite.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 502bfd8..626e780 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -11,7 +11,7 @@ Name: mingw32-sqlite Version: 3.6.14.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -133,6 +133,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sat Jul 25 2009 Fedora Release Engineering - 3.6.14.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Tue Jun 23 2009 Thomas Sailer - 3.6.14.2-1 - update to 3.6.14.2 - add debuginfo packages From 9c6b39c57dad26dc2f22d0c7c951b7c39e60f358 Mon Sep 17 00:00:00 2001 From: sailer Date: Sun, 20 Sep 2009 00:00:11 +0000 Subject: [PATCH 13/27] update to match native --- .cvsignore | 1 + mingw32-sqlite.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.cvsignore b/.cvsignore index 76aad38..e744efc 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1,2 @@ sqlite-3.6.14.2.tar.gz +sqlite-3.6.17.tar.gz diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 626e780..657e769 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -10,8 +10,8 @@ %global tclversion 8.5 Name: mingw32-sqlite -Version: 3.6.14.2 -Release: 2%{?dist} +Version: 3.6.17 +Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -133,6 +133,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sun Sep 20 2009 Thomas Sailer - 3.6.17-1 +- update to 3.6.17 + * Sat Jul 25 2009 Fedora Release Engineering - 3.6.14.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild diff --git a/sources b/sources index 8fc546c..ec175c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4c074691b48cd45854899ae4fece6301 sqlite-3.6.14.2.tar.gz +f89f62afc765e08b3f0e47cdc47a15d4 sqlite-3.6.17.tar.gz From d6e2d71d3bd27cb55934cc0b827821a94d7324b6 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 23:18:50 +0000 Subject: [PATCH 14/27] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 49f7842..f0f2536 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: mingw32-sqlite -# $Id$ +# $Id: Makefile,v 1.1 2008/12/21 04:07:04 kevin Exp $ NAME := mingw32-sqlite SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From dd13d6a8b184df64e70ef660483a0c4e7ead7bdb Mon Sep 17 00:00:00 2001 From: sailer Date: Sat, 5 Dec 2009 15:12:06 +0000 Subject: [PATCH 15/27] update to 3.6.20 --- .cvsignore | 1 + mingw32-sqlite.spec | 18 ++++++++++++++---- sources | 2 +- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.cvsignore b/.cvsignore index e744efc..99026cb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ sqlite-3.6.14.2.tar.gz sqlite-3.6.17.tar.gz +sqlite-3.6.20.tar.gz diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 657e769..0dccb82 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -6,11 +6,11 @@ %define __debug_install_post %{_mingw32_debug_install_post} # bcond default logic is nicely backwards... -%bcond_without tcl +%bcond_with tcl %global tclversion 8.5 Name: mingw32-sqlite -Version: 3.6.17 +Version: 3.6.20 Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine @@ -26,7 +26,6 @@ BuildArch: noarch Patch1: sqlite-3.6.12-libdl.patch # Avoid insecure sprintf(), use a system path for lempar.c, patch from Debian Patch2: sqlite-3.6.6.2-lemon-snprintf.patch -Patch3: sqlite-3.6.13-iotest-nodirsync.patch # Patches for MinGW port. Patch1000: mingw32-sqlite-3.6.12-no-undefined.patch @@ -71,7 +70,6 @@ for Windows. %setup -q -n sqlite-%{version} %patch1 -p1 -b .libdl %patch2 -p1 -b .lemon-sprintf -%patch3 -p1 -b .nodirsync %patch1000 -p1 # Ships with an old/broken version of libtool which cannot create @@ -96,6 +94,12 @@ export MINGW32_CFLAGS="%{_mingw32_cflags} -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQ --enable-threadsafe \ --enable-threads-override-locks \ --enable-load-extension + +# -lc hack +sed -e s,build_libtool_need_lc=yes,build_libtool_need_lc=no, < libtool > libtool.x +mv libtool.x libtool +chmod a+x libtool + make @@ -108,6 +112,8 @@ rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.a chmod 0644 $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.dll.a +mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3-0.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/ + %if %{with tcl} install -d -m755 $RPM_BUILD_ROOT%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/ mv $RPM_BUILD_ROOT%{_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl $RPM_BUILD_ROOT%{_mingw32_datadir}/tcl%{tclversion}/sqlite3/ @@ -122,6 +128,7 @@ rm -rf $RPM_BUILD_ROOT %doc README VERSION %{_mingw32_bindir}/sqlite3.exe %{_mingw32_bindir}/libsqlite3-0.dll +#%{_mingw32_bindir}/libsqlite3-0.dll.debug %{_mingw32_libdir}/libsqlite3.dll.a %{_mingw32_libdir}/libsqlite3.la %{_mingw32_includedir}/sqlite3.h @@ -133,6 +140,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sun Dec 5 2009 Thomas Sailer - 3.6.20-1 +- update to 3.6.20 + * Sun Sep 20 2009 Thomas Sailer - 3.6.17-1 - update to 3.6.17 diff --git a/sources b/sources index ec175c1..9215afb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f89f62afc765e08b3f0e47cdc47a15d4 sqlite-3.6.17.tar.gz +0faf8fc8ccff5297513c6532b2b4ce23 sqlite-3.6.20.tar.gz From 55f443f4a2f48bb27e518c16a815555a6d899e61 Mon Sep 17 00:00:00 2001 From: sailer Date: Sun, 31 Jan 2010 16:29:50 +0000 Subject: [PATCH 16/27] update to 3.6.22 --- .cvsignore | 1 + mingw32-sqlite.spec | 5 ++++- sources | 2 +- sqlite-3.6.13-iotest-nodirsync.patch | 13 ------------- 4 files changed, 6 insertions(+), 15 deletions(-) delete mode 100644 sqlite-3.6.13-iotest-nodirsync.patch diff --git a/.cvsignore b/.cvsignore index 99026cb..1979d9f 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,3 +1,4 @@ sqlite-3.6.14.2.tar.gz sqlite-3.6.17.tar.gz sqlite-3.6.20.tar.gz +sqlite-3.6.22.tar.gz diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 0dccb82..7d79241 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -10,7 +10,7 @@ %global tclversion 8.5 Name: mingw32-sqlite -Version: 3.6.20 +Version: 3.6.22 Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine @@ -140,6 +140,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sun Jan 31 2010 Thomas Sailer - 3.6.22-1 +- update to 3.6.22 + * Sun Dec 5 2009 Thomas Sailer - 3.6.20-1 - update to 3.6.20 diff --git a/sources b/sources index 9215afb..7e6903f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -0faf8fc8ccff5297513c6532b2b4ce23 sqlite-3.6.20.tar.gz +a17bd53f1fde11f84adf79c6a1510ce5 sqlite-3.6.22.tar.gz diff --git a/sqlite-3.6.13-iotest-nodirsync.patch b/sqlite-3.6.13-iotest-nodirsync.patch deleted file mode 100644 index 916abd8..0000000 --- a/sqlite-3.6.13-iotest-nodirsync.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up sqlite-3.6.13/test/io.test.nodirsync sqlite-3.6.13/test/io.test ---- sqlite-3.6.13/test/io.test.nodirsync 2009-05-14 12:12:21.000000000 +0300 -+++ sqlite-3.6.13/test/io.test 2009-05-14 12:13:51.000000000 +0300 -@@ -426,7 +426,8 @@ sqlite3_simulate_device -char safe_appen - # on the journal file between steps (2) and (3) above. - # - if {$::tcl_platform(platform)=="unix"} { -- set expected_sync_count 3 -+ # normally 3 but with -DSQLITE_DISABLE_DIRSYNC its 2 -+ set expected_sync_count 2 - } else { - set expected_sync_count 2 - } From 6c8adf2a3596e459e55cdff5cfab669f55e71f4d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 03:23:03 +0000 Subject: [PATCH 17/27] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- import.log | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 import.log diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index f0f2536..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: mingw32-sqlite -# $Id: Makefile,v 1.1 2008/12/21 04:07:04 kevin Exp $ -NAME := mingw32-sqlite -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/import.log b/import.log deleted file mode 100644 index 618088a..0000000 --- a/import.log +++ /dev/null @@ -1 +0,0 @@ -mingw32-sqlite-3_6_6_2-1_fc10:HEAD:mingw32-sqlite-3.6.6.2-1.fc10.src.rpm:1229857793 From 33b088e961a38a22572282f9ed9d7b5c89c93104 Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Mon, 6 Dec 2010 18:34:18 +0100 Subject: [PATCH 18/27] update to 3.7.3 --- .gitignore | 1 + mingw32-sqlite.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 1979d9f..a893e46 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ sqlite-3.6.14.2.tar.gz sqlite-3.6.17.tar.gz sqlite-3.6.20.tar.gz sqlite-3.6.22.tar.gz +/sqlite-3.7.3.tar.gz diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 7d79241..855eb4a 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -10,7 +10,7 @@ %global tclversion 8.5 Name: mingw32-sqlite -Version: 3.6.22 +Version: 3.7.3 Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine @@ -140,6 +140,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Mon Dec 6 2010 Thomas Sailer - 3.7.3-1 +- update to 3.7.3 + * Sun Jan 31 2010 Thomas Sailer - 3.6.22-1 - update to 3.6.22 diff --git a/sources b/sources index 7e6903f..a3301bf 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -a17bd53f1fde11f84adf79c6a1510ce5 sqlite-3.6.22.tar.gz +5437978aae90350cf984993091e0d695 sqlite-3.7.3.tar.gz From 279919f6c6d953e0ffef4a535233634e5c6b9fbd Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Mon, 6 Dec 2010 18:54:54 +0100 Subject: [PATCH 19/27] fix patch --- mingw32-sqlite.spec | 2 +- sqlite-3.6.6.2-lemon-snprintf.patch | 111 ---------------------------- sqlite-3.7.3-lemon-snprintf.patch | 76 +++++++++++++++++++ 3 files changed, 77 insertions(+), 112 deletions(-) delete mode 100644 sqlite-3.6.6.2-lemon-snprintf.patch create mode 100644 sqlite-3.7.3-lemon-snprintf.patch diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 855eb4a..421668d 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -25,7 +25,7 @@ BuildArch: noarch # Patches from Fedora native package. Patch1: sqlite-3.6.12-libdl.patch # Avoid insecure sprintf(), use a system path for lempar.c, patch from Debian -Patch2: sqlite-3.6.6.2-lemon-snprintf.patch +Patch2: sqlite-3.7.3-lemon-snprintf.patch # Patches for MinGW port. Patch1000: mingw32-sqlite-3.6.12-no-undefined.patch diff --git a/sqlite-3.6.6.2-lemon-snprintf.patch b/sqlite-3.6.6.2-lemon-snprintf.patch deleted file mode 100644 index 299f5e3..0000000 --- a/sqlite-3.6.6.2-lemon-snprintf.patch +++ /dev/null @@ -1,111 +0,0 @@ -diff -up sqlite-3.6.6.2/tool/lemon.c.lemparpath sqlite-3.6.6.2/tool/lemon.c ---- sqlite-3.6.6.2/tool/lemon.c.lemparpath 2008-12-05 20:37:49.000000000 +0200 -+++ sqlite-3.6.6.2/tool/lemon.c 2008-12-05 20:44:08.000000000 +0200 -@@ -1324,15 +1324,15 @@ void ErrorMsg(const char *filename, int - va_start(ap, format); - /* Prepare a prefix to be prepended to every output line */ - if( lineno>0 ){ -- sprintf(prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno); -+ snprintf(prefix,sizeof prefix,"%.*s:%d: ",PREFIXLIMIT-10,filename,lineno); - }else{ -- sprintf(prefix,"%.*s: ",PREFIXLIMIT-10,filename); -+ snprintf(prefix,sizeof prefix,"%.*s: ",PREFIXLIMIT-10,filename); - } - prefixsize = lemonStrlen(prefix); - availablewidth = LINEWIDTH - prefixsize; - - /* Generate the error message */ -- vsprintf(errmsg,format,ap); -+ vsnprintf(errmsg,sizeof errmsg,format,ap); - va_end(ap); - errmsgsize = lemonStrlen(errmsg); - /* Remove trailing '\n's from the error message. */ -@@ -2911,7 +2911,7 @@ struct lemon *lemp; - 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," "); -@@ -2966,6 +2966,7 @@ int modemask; - { - char *pathlist; - char *path,*cp; -+ size_t pathsz; - char c; - - #ifdef __WIN32__ -@@ -2976,21 +2977,21 @@ int modemask; - if( cp ){ - c = *cp; - *cp = 0; -- path = (char *)malloc( lemonStrlen(argv0) + lemonStrlen(name) + 2 ); -- if( path ) sprintf(path,"%s/%s",argv0,name); -+ path = (char *)malloc((pathsz=lemonStrlen(argv0) + lemonStrlen(name) + 2)); -+ if( path ) snprintf(path,pathsz,"%s/%s",argv0,name); - *cp = c; - }else{ - extern char *getenv(); - pathlist = getenv("PATH"); - if( pathlist==0 ) pathlist = ".:/bin:/usr/bin"; -- path = (char *)malloc( lemonStrlen(pathlist)+lemonStrlen(name)+2 ); -+ path = (char *)malloc((pathsz=lemonStrlen(pathlist)+lemonStrlen(name)+2)); - if( path!=0 ){ - while( *pathlist ){ - cp = strchr(pathlist,':'); - if( cp==0 ) cp = &pathlist[lemonStrlen(pathlist)]; - c = *cp; - *cp = 0; -- sprintf(path,"%s/%s",pathlist,name); -+ snprintf(path,pathsz,"%s/%s",pathlist,name); - *cp = c; - if( c==0 ) pathlist = ""; - else pathlist = &cp[1]; -@@ -3070,14 +3071,16 @@ struct lemon *lemp; - - 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; - }else if( access(templatename,004)==0 ){ - tpltname = templatename; -+ }else if( access("/usr/share/lemon/lempar.c",004)==0 ){ -+ tpltname = "/usr/share/lemon/lempar.c"; - }else{ - tpltname = pathsearch(lemp->argv0,templatename,0); - } -@@ -3089,7 +3092,7 @@ struct lemon *lemp; - } - in = fopen(tpltname,"rb"); - if( in==0 ){ -- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); -+ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname); - lemp->errorcnt++; - return 0; - } -@@ -3827,7 +3830,7 @@ int mhflag; /* Output in makeheaders - /* 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++; } - } -@@ -3983,7 +3986,7 @@ struct lemon *lemp; - 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.3-lemon-snprintf.patch b/sqlite-3.7.3-lemon-snprintf.patch new file mode 100644 index 0000000..98e48e3 --- /dev/null +++ b/sqlite-3.7.3-lemon-snprintf.patch @@ -0,0 +1,76 @@ +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 +@@ -2363,7 +2363,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; + } +@@ -2947,7 +2947,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," "); +@@ -3118,14 +3118,16 @@ + + 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; + }else if( access(templatename,004)==0 ){ + tpltname = templatename; ++ }else if( access("/usr/share/lemon/lempar.c",004)==0 ){ ++ tpltname = "/usr/share/lemon/lempar.c"; + }else{ + tpltname = pathsearch(lemp->argv0,templatename,0); + } +@@ -3137,7 +3139,7 @@ + } + in = fopen(tpltname,"rb"); + if( in==0 ){ +- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); ++ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname); + lemp->errorcnt++; + return 0; + } +@@ -3271,7 +3273,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]); +@@ -3883,7 +3885,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++; } + } +@@ -4049,7 +4051,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); From daba879dedf5d00f9ffc36d81021fc0779cc4cc4 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Tue, 8 Feb 2011 13:12:09 -0600 Subject: [PATCH 20/27] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- mingw32-sqlite.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 421668d..68581c1 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -11,7 +11,7 @@ Name: mingw32-sqlite Version: 3.7.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -140,6 +140,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Tue Feb 08 2011 Fedora Release Engineering - 3.7.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Mon Dec 6 2010 Thomas Sailer - 3.7.3-1 - update to 3.7.3 From 0fe9fce38e30d12b1c8709696dec5c0ce3a39caf Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Sun, 13 Feb 2011 13:50:21 +0100 Subject: [PATCH 21/27] update to 3.7.5 --- .gitignore | 1 + mingw32-sqlite.spec | 26 +++++++++++++++------ sources | 2 +- sqlite-3.6.23-lemon-system-template.patch | 21 +++++++++++++++++ sqlite-3.7.3-lemon-snprintf.patch | 28 +++++------------------ sqlite-3.7.4-wal2-nodirsync.patch | 16 +++++++++++++ 6 files changed, 64 insertions(+), 30 deletions(-) create mode 100644 sqlite-3.6.23-lemon-system-template.patch create mode 100644 sqlite-3.7.4-wal2-nodirsync.patch diff --git a/.gitignore b/.gitignore index a893e46..6fe3f93 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ sqlite-3.6.17.tar.gz sqlite-3.6.20.tar.gz sqlite-3.6.22.tar.gz /sqlite-3.7.3.tar.gz +/sqlite-src-3070500.zip diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 68581c1..663454f 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -5,27 +5,34 @@ %global __find_provides %{_mingw32_findprovides} %define __debug_install_post %{_mingw32_debug_install_post} +%global name1 sqlite + +%global realver 3070500 +%global rpmver %(echo %{realver}|sed -e "s/00//g" -e "s/0/./g") + # bcond default logic is nicely backwards... %bcond_with tcl %global tclversion 8.5 -Name: mingw32-sqlite -Version: 3.7.3 -Release: 2%{?dist} +Name: mingw32-%{name1} +Version: %{rpmver} +Release: 1%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain Group: Applications/Databases URL: http://www.sqlite.org/ -Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz +Source0: http://www.sqlite.org/%{name1}-src-%{realver}.zip 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 -Patch2: sqlite-3.7.3-lemon-snprintf.patch +Patch4: sqlite-3.7.3-lemon-snprintf.patch # Patches for MinGW port. Patch1000: mingw32-sqlite-3.6.12-no-undefined.patch @@ -67,9 +74,11 @@ for Windows. %prep -%setup -q -n sqlite-%{version} +%setup -q -n %{name1}-src-%{realver} %patch1 -p1 -b .libdl -%patch2 -p1 -b .lemon-sprintf +%patch2 -p1 -b .lemon +%patch3 -p1 -b .wal2 +%patch4 -p1 -b .lemon-sprintf %patch1000 -p1 # Ships with an old/broken version of libtool which cannot create @@ -140,6 +149,9 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Sun Feb 13 2011 Thomas Sailer - 3.7.5-1 +- update to 3.7.5 + * Tue Feb 08 2011 Fedora Release Engineering - 3.7.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild diff --git a/sources b/sources index a3301bf..e2fe071 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -5437978aae90350cf984993091e0d695 sqlite-3.7.3.tar.gz +d61d784997d42cd0d92bac7994094c56 sqlite-src-3070500.zip diff --git a/sqlite-3.6.23-lemon-system-template.patch b/sqlite-3.6.23-lemon-system-template.patch new file mode 100644 index 0000000..16db588 --- /dev/null +++ b/sqlite-3.6.23-lemon-system-template.patch @@ -0,0 +1,21 @@ +diff -up sqlite-3.6.23/tool/lemon.c.system-template sqlite-3.6.23/tool/lemon.c +--- sqlite-3.6.23/tool/lemon.c.system-template 2010-03-10 16:40:35.000000000 +0200 ++++ sqlite-3.6.23/tool/lemon.c 2010-03-10 16:40:39.000000000 +0200 +@@ -3106,6 +3106,8 @@ PRIVATE FILE *tplt_open(struct lemon *le + tpltname = buf; + }else if( access(templatename,004)==0 ){ + tpltname = templatename; ++ }else if( access("/usr/share/lemon/lempar.c", R_OK)==0){ ++ tpltname = "/usr/share/lemon/lempar.c"; + }else{ + tpltname = pathsearch(lemp->argv0,templatename,0); + } +@@ -3117,7 +3119,7 @@ PRIVATE FILE *tplt_open(struct lemon *le + } + in = fopen(tpltname,"rb"); + if( in==0 ){ +- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); ++ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname); + lemp->errorcnt++; + return 0; + } diff --git a/sqlite-3.7.3-lemon-snprintf.patch b/sqlite-3.7.3-lemon-snprintf.patch index 98e48e3..2cc009f 100644 --- a/sqlite-3.7.3-lemon-snprintf.patch +++ b/sqlite-3.7.3-lemon-snprintf.patch @@ -1,7 +1,7 @@ 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 -@@ -2363,7 +2363,7 @@ +@@ -2369,7 +2369,7 @@ for(z=psp->filename, nBack=0; *z; z++){ if( *z=='\\' ) nBack++; } @@ -10,7 +10,7 @@ diff -up sqlite-3.7.3/tool/lemon.c.lemparpath sqlite-3.7.3/tool/lemon.c nLine = lemonStrlen(zLine); n += nLine + lemonStrlen(psp->filename) + nBack; } -@@ -2947,7 +2947,7 @@ +@@ -2953,7 +2953,7 @@ while( cfp ){ char buf[20]; if( cfp->dot==cfp->rp->nrhs ){ @@ -19,7 +19,7 @@ diff -up sqlite-3.7.3/tool/lemon.c.lemparpath sqlite-3.7.3/tool/lemon.c fprintf(fp," %5s ",buf); }else{ fprintf(fp," "); -@@ -3118,14 +3118,16 @@ +@@ -3124,9 +3124,9 @@ cp = strrchr(lemp->filename,'.'); if( cp ){ @@ -31,23 +31,7 @@ diff -up sqlite-3.7.3/tool/lemon.c.lemparpath sqlite-3.7.3/tool/lemon.c } if( access(buf,004)==0 ){ tpltname = buf; - }else if( access(templatename,004)==0 ){ - tpltname = templatename; -+ }else if( access("/usr/share/lemon/lempar.c",004)==0 ){ -+ tpltname = "/usr/share/lemon/lempar.c"; - }else{ - tpltname = pathsearch(lemp->argv0,templatename,0); - } -@@ -3137,7 +3139,7 @@ - } - in = fopen(tpltname,"rb"); - if( in==0 ){ -- fprintf(stderr,"Can't open the template file \"%s\".\n",templatename); -+ fprintf(stderr,"Can't open the template file \"%s\".\n",tpltname); - lemp->errorcnt++; - return 0; - } -@@ -3271,7 +3273,7 @@ +@@ -3279,7 +3279,7 @@ while( n-- > 0 ){ c = *(zText++); if( c=='%' && n>0 && zText[0]=='d' ){ @@ -56,7 +40,7 @@ diff -up sqlite-3.7.3/tool/lemon.c.lemparpath sqlite-3.7.3/tool/lemon.c p1 = p2; strcpy(&z[used], zInt); used += lemonStrlen(&z[used]); -@@ -3883,7 +3885,7 @@ +@@ -3891,7 +3891,7 @@ /* Generate a table containing the symbolic name of every symbol */ for(i=0; insymbol; i++){ @@ -65,7 +49,7 @@ diff -up sqlite-3.7.3/tool/lemon.c.lemparpath sqlite-3.7.3/tool/lemon.c fprintf(out," %-15s",line); if( (i&3)==3 ){ fprintf(out,"\n"); lineno++; } } -@@ -4049,7 +4051,7 @@ +@@ -4057,7 +4057,7 @@ in = file_open(lemp,".h","rb"); if( in ){ for(i=1; interminal && fgets(line,LINESIZE,in); i++){ diff --git a/sqlite-3.7.4-wal2-nodirsync.patch b/sqlite-3.7.4-wal2-nodirsync.patch new file mode 100644 index 0000000..00480d8 --- /dev/null +++ b/sqlite-3.7.4-wal2-nodirsync.patch @@ -0,0 +1,16 @@ +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 + From 602064f2fa9aaade642fe95759c6badf4b55ff5d Mon Sep 17 00:00:00 2001 From: Ivan Romanov Date: Sat, 24 Dec 2011 20:24:05 +0600 Subject: [PATCH 22/27] static subpackage --- mingw32-sqlite.spec | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 663454f..aa8afca 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -16,7 +16,7 @@ Name: mingw32-%{name1} Version: %{rpmver} -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -70,6 +70,23 @@ This package contains cross-compiled libraries and development tools for Windows. +%package static +Summary: Static version of MinGW Windows port of sqlite library +Requires: %{name} = %{version}-%{release} +Group: Development/Libraries + +%description static +SQLite is a C library that implements an SQL database engine. A large +subset of SQL92 is supported. A complete database is stored in a +single disk file. The API is designed for convenience and ease of use. +Applications that link against SQLite can enjoy the power and +flexibility of an SQL database without the administrative hassles of +supporting a separate database server. Version 2 and version 3 binaries +are named to permit each to be installed on a single host + +This package contains static cross-compiled library + + %{_mingw32_debug_package} @@ -116,9 +133,6 @@ make rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install -# Remove static libraries but DON'T remove *.dll.a files. -rm $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.a - chmod 0644 $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3.dll.a mv $RPM_BUILD_ROOT%{_mingw32_libdir}/libsqlite3-0.dll $RPM_BUILD_ROOT%{_mingw32_bindir}/ @@ -148,7 +162,14 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_datadir}/tcl%{tclversion}/sqlite3/pkgIndex.tcl %endif +%files static +%defattr(-,root,root,-) +%{_mingw32_libdir}/libsqlite3.a + %changelog +* Sat Dec 24 2011 Ivan Romanov - 3.7.5-2 +- static subpackage + * Sun Feb 13 2011 Thomas Sailer - 3.7.5-1 - update to 3.7.5 From 83fe836b8f4c52d0adb997d75e6486fdf83ab712 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 13 Jan 2012 04:09:00 -0600 Subject: [PATCH 23/27] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- mingw32-sqlite.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index aa8afca..1310bac 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -16,7 +16,7 @@ Name: mingw32-%{name1} Version: %{rpmver} -Release: 2%{?dist} +Release: 3%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -167,6 +167,9 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_libdir}/libsqlite3.a %changelog +* Fri Jan 13 2012 Fedora Release Engineering - 3.7.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Sat Dec 24 2011 Ivan Romanov - 3.7.5-2 - static subpackage From 25a724e997c3bbbfdb80d6c0a8c84c48491da177 Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Mon, 16 Jan 2012 22:16:41 +0100 Subject: [PATCH 24/27] 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. From 0921cf1c913ccfea113ab30580fe52f51a5e10b1 Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Mon, 16 Jan 2012 22:23:19 +0100 Subject: [PATCH 25/27] fix email and release --- mingw32-sqlite.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index e3ab505..209690c 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -164,7 +164,7 @@ 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 +* Mon Jan 16 2012 Thomas Sailer - 3.7.9-1 - update to 3.7.9 * Fri Jan 13 2012 Fedora Release Engineering - 3.7.5-3 From 38075a6047a9cedcc618f7366b233ce9650fc36b Mon Sep 17 00:00:00 2001 From: Thomas Sailer Date: Mon, 16 Jan 2012 22:26:38 +0100 Subject: [PATCH 26/27] fix patch name --- ...-no-undefined.patch => mingw32-sqlite-3.7.9-no-undefined.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mingw32-sqlite-3.7.7-no-undefined.patch => mingw32-sqlite-3.7.9-no-undefined.patch (100%) diff --git a/mingw32-sqlite-3.7.7-no-undefined.patch b/mingw32-sqlite-3.7.9-no-undefined.patch similarity index 100% rename from mingw32-sqlite-3.7.7-no-undefined.patch rename to mingw32-sqlite-3.7.9-no-undefined.patch From 8101d19e8b4d2e559ba496cac395b13c32423181 Mon Sep 17 00:00:00 2001 From: Erik van Pienbroek Date: Mon, 27 Feb 2012 23:28:00 +0100 Subject: [PATCH 27/27] Rebuild against the mingw-w64 toolchain --- mingw32-sqlite.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mingw32-sqlite.spec b/mingw32-sqlite.spec index 209690c..3c0f80b 100644 --- a/mingw32-sqlite.spec +++ b/mingw32-sqlite.spec @@ -16,7 +16,7 @@ Name: mingw32-%{name1} Version: %{rpmver} -Release: 1%{?dist} +Release: 2%{?dist} Summary: MinGW Windows port of sqlite embeddable SQL database engine License: Public Domain @@ -164,6 +164,9 @@ rm -rf $RPM_BUILD_ROOT %{_mingw32_libdir}/libsqlite3.a %changelog +* Mon Feb 27 2012 Erik van Pienbroek - 3.7.9-2 +- Rebuild against the mingw-w64 toolchain + * Mon Jan 16 2012 Thomas Sailer - 3.7.9-1 - update to 3.7.9