Hello community, here is the log from the commit of package sqlite2 for openSUSE:Factory checked in at 2013-01-10 15:19:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sqlite2 (Old) and /work/SRC/openSUSE:Factory/.sqlite2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sqlite2", Maintainer is "[email protected]" Changes: -------- --- /work/SRC/openSUSE:Factory/sqlite2/sqlite2.changes 2011-11-28 12:57:50.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.sqlite2.new/sqlite2.changes 2013-01-10 15:19:06.000000000 +0100 @@ -1,0 +2,9 @@ +Mon Dec 31 16:00:55 UTC 2012 - [email protected] + +- detect_sqlite3.patch + Trivial usability feature: avoid a false error message + "file is encrypted or is not a database" if it is valid sqlite3 + Upstreamed as + http://www.sqlite.org/src/tktview/030632f55ba0c98c273ddabdea417b996897eeb3 + +------------------------------------------------------------------- New: ---- detect_sqlite3.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sqlite2.spec ++++++ --- /var/tmp/diff_new_pack.ofSwBG/_old 2013-01-10 15:19:07.000000000 +0100 +++ /var/tmp/diff_new_pack.ofSwBG/_new 2013-01-10 15:19:07.000000000 +0100 @@ -35,6 +35,7 @@ Source2: baselibs.conf Patch0: sqlite.diff Patch1: sqlite2-tcl.diff +Patch2: detect_sqlite3.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -86,8 +87,13 @@ %prep %setup -q -n sqlite-%version +# sqlite.diff %patch0 +# sqlite2-tcl.diff %patch1 +# detect_sqlite3.patch +%patch2 -p1 + %ifarch s390 s390x # some (minor ?) miscalculations with float values on these platforms # needs to be checked deeper later ++++++ detect_sqlite3.patch ++++++ --- sqlite-2.8.17/src/btree.c.orig 2005-04-24 00:43:22.000000000 +0200 +++ sqlite-2.8.17/src/btree.c 2012-12-31 16:58:06.288576336 +0100 @@ -112,6 +112,8 @@ typedef struct FreelistInfo FreelistInfo static const char zMagicHeader[] = "** This file contains an SQLite 2.1 database **"; #define MAGIC_SIZE (sizeof(zMagicHeader)) +static const char zMagicHeader_V3[] = "SQLite format 3"; +#define MAGIC_SIZE_V3 (sizeof(zMagicHeader_V3)) /* ** This is a magic integer also used to test the integrity of the database @@ -794,6 +800,8 @@ static int lockBtree(Btree *pBt){ if( strcmp(pP1->zMagic,zMagicHeader)!=0 || (pP1->iMagic!=MAGIC && swab32(pP1->iMagic)!=MAGIC) ){ rc = SQLITE_NOTADB; + if (!strcmp(pP1->zMagic,zMagicHeader_V3)) + rc = SQLITE_V3; goto page1_init_failed; } pBt->needSwab = pP1->iMagic!=MAGIC; --- sqlite-2.8.17/src/main.c.orig 2005-04-24 00:43:22.000000000 +0200 +++ sqlite-2.8.17/src/main.c 2012-12-31 16:52:50.296168240 +0100 @@ -851,6 +851,7 @@ const char *sqlite_error_string(int rc){ case SQLITE_FORMAT: z = "auxiliary database format error"; break; case SQLITE_RANGE: z = "bind index out of range"; break; case SQLITE_NOTADB: z = "file is encrypted or is not a database";break; + case SQLITE_V3: z = "database version mismatch. Try sqlite3";break; default: z = "unknown error"; break; } return z; --- sqlite-2.8.17/src/sqlite.h.in.orig 2005-04-24 00:43:22.000000000 +0200 +++ sqlite-2.8.17/src/sqlite.h.in 2012-12-31 16:52:51.619178446 +0100 @@ -172,6 +172,7 @@ int sqlite_exec( #define SQLITE_FORMAT 24 /* Auxiliary database format error */ #define SQLITE_RANGE 25 /* 2nd parameter to sqlite_bind out of range */ #define SQLITE_NOTADB 26 /* File opened that is not a database file */ +#define SQLITE_V3 27 /* File opened that is not a database file */ #define SQLITE_ROW 100 /* sqlite_step() has another row ready */ #define SQLITE_DONE 101 /* sqlite_step() has finished executing */ ++++++ sqlite.diff ++++++ --- /var/tmp/diff_new_pack.ofSwBG/_old 2013-01-10 15:19:07.000000000 +0100 +++ /var/tmp/diff_new_pack.ofSwBG/_new 2013-01-10 15:19:07.000000000 +0100 @@ -1,6 +1,24 @@ ---- Makefile.in +--- + Makefile.in | 16 ++++++++-------- + configure.ac | 3 --- + main.mk | 2 +- + src/attach.c | 4 ++-- + src/build.c | 16 ++++++++-------- + src/expr.c | 2 +- + src/pragma.c | 2 +- + src/printf.c | 12 +++++------- + src/select.c | 14 +++++++------- + src/tokenize.c | 2 +- + src/vdbe.c | 2 +- + 11 files changed, 35 insertions(+), 40 deletions(-) + +Index: Makefile.in +=================================================================== +--- Makefile.in.orig +++ Makefile.in -@@ -26,7 +26,7 @@ BCC = @BUILD_CC@ @BUILD_CFLAGS@ +@@ -24,11 +24,11 @@ BCC = @BUILD_CC@ @BUILD_CFLAGS@ + + # C Compile and options for use in building executables that # will run on the target platform. (BCC and TCC are usually the # same unless your are cross-compiling.) # @@ -9,7 +27,11 @@ # Some standard variables and programs # -@@ -183,11 +183,11 @@ Makefile: $(TOP)/Makefile.in + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -181,15 +181,15 @@ Makefile: $(TOP)/Makefile.in + + # Generate the file "last_change" which contains the date of change # of the most recently modified source code file # last_change: $(SRC) @@ -23,7 +45,11 @@ -version-info "8:6:8" libtclsqlite.la: tclsqlite.lo libsqlite.la -@@ -363,7 +363,7 @@ tclsqlite: tclsqlite-sh.lo libsqlite.la + $(LTLINK) -o libtclsqlite.la tclsqlite.lo \ + libsqlite.la $(LIBTCL) -rpath @exec_prefix@/lib/sqlite \ +@@ -361,11 +361,11 @@ tclsqlite: tclsqlite-sh.lo libsqlite.la + $(LTLINK) $(TCL_FLAGS) -o tclsqlite tclsqlite-sh.lo libsqlite.la $(LIBTCL) + testfixture@TARGET_EXEEXT@: $(TOP)/src/tclsqlite.c libtclsqlite.la libsqlite.la $(TESTSRC) $(LTLINK) $(TCL_FLAGS) -DTCLSH=1 -DSQLITE_TEST=1\ -o testfixture $(TESTSRC) $(TOP)/src/tclsqlite.c \ @@ -32,7 +58,11 @@ fulltest: testfixture@TARGET_EXEEXT@ sqlite@TARGET_EXEEXT@ ./testfixture $(TOP)/test/all.test -@@ -465,14 +465,14 @@ doc: $(DOC) + + test: testfixture@TARGET_EXEEXT@ sqlite@TARGET_EXEEXT@ +@@ -463,18 +463,18 @@ DOC = \ + doc: $(DOC) + mkdir -p doc mv $(DOC) doc install: sqlite libsqlite.la sqlite.h @@ -51,9 +81,15 @@ clean: rm -f *.lo *.la *.o sqlite@TARGET_EXEEXT@ libsqlite.la sqlite.h opcodes.* ---- configure.ac + rm -rf .libs .deps + rm -f lemon@BUILD_EXEEXT@ lempar.c parse.* sqlite*.tar.gz +Index: configure.ac +=================================================================== +--- configure.ac.orig +++ configure.ac -@@ -378,9 +378,6 @@ if test "$config_BUILD_EXEEXT" = ".exe"; +@@ -376,13 +376,10 @@ if test "$config_BUILD_EXEEXT" = ".exe"; + CYGWIN=yes + AC_MSG_RESULT(yes) else AC_MSG_RESULT(unknown) fi @@ -63,9 +99,15 @@ if test "$CYGWIN" = "yes"; then BUILD_EXEEXT=.exe else ---- main.mk + BUILD_EXEEXT=$EXEEXT + fi +Index: main.mk +=================================================================== +--- main.mk.orig +++ main.mk -@@ -145,7 +145,7 @@ all: sqlite.h config.h libsqlite.a sqlit +@@ -143,11 +143,11 @@ all: sqlite.h config.h libsqlite.a sqlit + + # Generate the file "last_change" which contains the date of change # of the most recently modified source code file # last_change: $(SRC) @@ -74,9 +116,15 @@ | awk '{print $$5,$$6}' >last_change libsqlite.a: $(LIBOBJ) ---- src/attach.c + $(AR) libsqlite.a $(LIBOBJ) + $(RANLIB) libsqlite.a +Index: src/attach.c +=================================================================== +--- src/attach.c.orig +++ src/attach.c -@@ -48,7 +48,7 @@ void sqliteAttach(Parse *pParse, Token * +@@ -46,22 +46,22 @@ void sqliteAttach(Parse *pParse, Token * + pParse->rc = SQLITE_ERROR; + return; } zFile = 0; @@ -85,7 +133,10 @@ if( zFile==0 ) return; sqliteDequote(zFile); #ifndef SQLITE_OMIT_AUTHORIZATION -@@ -59,7 +59,7 @@ void sqliteAttach(Parse *pParse, Token * + if( sqliteAuthCheck(pParse, SQLITE_ATTACH, zFile, 0, 0)!=SQLITE_OK ){ + sqliteFree(zFile); + return; + } #endif /* SQLITE_OMIT_AUTHORIZATION */ zName = 0; @@ -94,9 +145,15 @@ if( zName==0 ) return; sqliteDequote(zName); for(i=0; i<db->nDb; i++){ ---- src/build.c + if( db->aDb[i].zName && sqliteStrICmp(db->aDb[i].zName, zName)==0 ){ + sqliteErrorMsg(pParse, "database %z is already in use", zName); +Index: src/build.c +=================================================================== +--- src/build.c.orig +++ src/build.c -@@ -559,7 +559,7 @@ void sqliteAddColumn(Parse *pParse, Toke +@@ -557,11 +557,11 @@ void sqliteAddColumn(Parse *pParse, Toke + Table *p; + int i; char *z = 0; Column *pCol; if( (p = pParse->pNewTable)==0 ) return; @@ -105,7 +162,11 @@ if( z==0 ) return; sqliteDequote(z); for(i=0; i<p->nCol; i++){ -@@ -617,7 +617,7 @@ void sqliteAddColumnType(Parse *pParse, + if( sqliteStrICmp(z, p->aCol[i].zName)==0 ){ + sqliteErrorMsg(pParse, "duplicate column name: %s", z); +@@ -615,11 +615,11 @@ void sqliteAddColumnType(Parse *pParse, + i = p->nCol-1; + if( i<0 ) return; pCol = &p->aCol[i]; pz = &pCol->zType; n = pLast->n + Addr(pLast->z) - Addr(pFirst->z); @@ -114,7 +175,11 @@ z = *pz; if( z==0 ) return; for(i=j=0; z[i]; i++){ -@@ -650,9 +650,9 @@ void sqliteAddDefaultValue(Parse *pParse + int c = z[i]; + if( isspace(c) ) continue; +@@ -648,13 +648,13 @@ void sqliteAddDefaultValue(Parse *pParse + if( (p = pParse->pNewTable)==0 ) return; + i = p->nCol-1; if( i<0 ) return; pz = &p->aCol[i].zDflt; if( minusFlag ){ @@ -126,7 +191,11 @@ } sqliteDequote(*pz); } -@@ -1856,7 +1856,7 @@ IdList *sqliteIdListAppend(IdList *pList + + /* +@@ -1854,11 +1854,11 @@ IdList *sqliteIdListAppend(IdList *pList + pList->a = a; + } memset(&pList->a[pList->nId], 0, sizeof(pList->a[0])); if( pToken ){ char **pz = &pList->a[pList->nId].zName; @@ -135,7 +204,11 @@ if( *pz==0 ){ sqliteIdListDelete(pList); return 0; -@@ -1921,7 +1921,7 @@ SrcList *sqliteSrcListAppend(SrcList *pL + }else{ + sqliteDequote(*pz); +@@ -1919,21 +1919,21 @@ SrcList *sqliteSrcListAppend(SrcList *pL + pDatabase = pTable; + pTable = pTemp; } if( pTable ){ char **pz = &pList->a[pList->nSrc].zName; @@ -144,7 +217,9 @@ if( *pz==0 ){ sqliteSrcListDelete(pList); return 0; -@@ -1931,7 +1931,7 @@ SrcList *sqliteSrcListAppend(SrcList *pL + }else{ + sqliteDequote(*pz); + } } if( pDatabase ){ char **pz = &pList->a[pList->nSrc].zDatabase; @@ -153,7 +228,11 @@ if( *pz==0 ){ sqliteSrcListDelete(pList); return 0; -@@ -1962,7 +1962,7 @@ void sqliteSrcListAssignCursors(Parse *p + }else{ + sqliteDequote(*pz); +@@ -1960,11 +1960,11 @@ void sqliteSrcListAssignCursors(Parse *p + ** Add an alias to the last identifier on the given identifier list. + */ void sqliteSrcListAddAlias(SrcList *pList, Token *pToken){ if( pList && pList->nSrc>0 ){ int i = pList->nSrc - 1; @@ -162,9 +241,15 @@ sqliteDequote(pList->a[i].zAlias); } } ---- src/expr.c + + /* +Index: src/expr.c +=================================================================== +--- src/expr.c.orig +++ src/expr.c -@@ -269,7 +269,7 @@ ExprList *sqliteExprListAppend(ExprList +@@ -267,11 +267,11 @@ ExprList *sqliteExprListAppend(ExprList + if( pExpr || pName ){ + struct ExprList_item *pItem = &pList->a[pList->nExpr++]; memset(pItem, 0, sizeof(*pItem)); pItem->pExpr = pExpr; if( pName ){ @@ -173,9 +258,15 @@ sqliteDequote(pItem->zName); } } ---- src/pragma.c + return pList; + } +Index: src/pragma.c +=================================================================== +--- src/pragma.c.orig +++ src/pragma.c -@@ -167,7 +167,7 @@ void sqlitePragma(Parse *pParse, Token * +@@ -165,11 +165,11 @@ void sqlitePragma(Parse *pParse, Token * + + zLeft = sqliteStrNDup(pLeft->z, pLeft->n); sqliteDequote(zLeft); if( minusFlag ){ zRight = 0; @@ -184,9 +275,15 @@ }else{ zRight = sqliteStrNDup(pRight->z, pRight->n); sqliteDequote(zRight); ---- src/printf.c + } + if( sqliteAuthCheck(pParse, SQLITE_PRAGMA, zLeft, zRight, 0) ){ +Index: src/printf.c +=================================================================== +--- src/printf.c.orig +++ src/printf.c -@@ -647,7 +647,7 @@ struct sgMprintf { +@@ -645,11 +645,11 @@ struct sgMprintf { + char *zBase; /* A base allocation */ + char *zText; /* The string collected so far */ int nChar; /* Length of the string so far */ int nTotal; /* Output size if unconstrained */ int nAlloc; /* Amount of space allocated in zText */ @@ -195,7 +292,11 @@ }; /* -@@ -688,7 +688,7 @@ static void mout(void *arg, const char * + ** This function implements the callback from vxprintf. + ** +@@ -686,11 +686,11 @@ static void mout(void *arg, const char * + /* + ** This routine is a wrapper around xprintf() that invokes mout() as ** the consumer. */ static char *base_vprintf( @@ -204,7 +305,11 @@ int useInternal, /* Use internal %-conversions if true */ char *zInitBuf, /* Initially write here, before mallocing */ int nInitBuf, /* Size of zInitBuf[] */ -@@ -715,7 +715,7 @@ static char *base_vprintf( + const char *zFormat, /* format string */ + va_list ap /* arguments */ +@@ -713,11 +713,11 @@ static char *base_vprintf( + } + /* ** Realloc that is a real function, not a macro. */ @@ -213,7 +318,11 @@ return sqliteRealloc(old,size); } -@@ -752,8 +752,7 @@ char *sqlite_mprintf(const char *zFormat + /* + ** Print into memory obtained from sqliteMalloc(). Use the internal +@@ -750,22 +750,20 @@ char *sqlite_mprintf(const char *zFormat + va_list ap; + char *z; char zBuf[200]; va_start(ap,zFormat); @@ -223,7 +332,8 @@ va_end(ap); return z; } -@@ -762,8 +761,7 @@ char *sqlite_mprintf(const char *zFormat + + /* This is the varargs version of sqlite_mprintf. */ char *sqlite_vmprintf(const char *zFormat, va_list ap){ char zBuf[200]; @@ -233,9 +343,15 @@ } /* ---- src/select.c + ** sqlite_snprintf() works like snprintf() except that it ignores the + ** current locale settings. This is important for SQLite because we +Index: src/select.c +=================================================================== +--- src/select.c.orig +++ src/select.c -@@ -121,7 +121,7 @@ int sqliteJoinType(Parse *pParse, Token +@@ -119,11 +119,11 @@ int sqliteJoinType(Parse *pParse, Token + static Token dummy = { 0, 0 }; + char *zSp1 = " ", *zSp2 = " "; if( pB==0 ){ pB = &dummy; zSp1 = 0; } if( pC==0 ){ pC = &dummy; zSp2 = 0; } sqliteSetNString(&pParse->zErrMsg, "unknown or unsupported join type: ", 0, @@ -244,7 +360,11 @@ pParse->nErr++; jointype = JT_INNER; }else if( jointype & JT_RIGHT ){ -@@ -744,7 +744,7 @@ static void generateColumnNames( + sqliteErrorMsg(pParse, + "RIGHT and FULL OUTER JOINs are not currently supported"); +@@ -742,11 +742,11 @@ static void generateColumnNames( + char *zName = 0; + char *zTab; zTab = pTabList->a[j].zAlias; if( fullNames || zTab==0 ) zTab = pTab->zName; @@ -253,7 +373,11 @@ sqliteVdbeOp3(v, OP_ColumnName, i, p2, zName, P3_DYNAMIC); }else{ sqliteVdbeOp3(v, OP_ColumnName, i, p2, zCol, 0); -@@ -809,19 +809,19 @@ Table *sqliteResultSetOfSelect(Parse *pP + } + }else if( p->span.z && p->span.z[0] ){ +@@ -807,23 +807,23 @@ Table *sqliteResultSetOfSelect(Parse *pP + if( pEList->a[i].zName ){ + aCol[i].zName = sqliteStrDup(pEList->a[i].zName); }else if( (p=pEList->a[i].pExpr)->op==TK_DOT && (pR=p->pRight)!=0 && pR->token.z && pR->token.z[0] ){ int cnt; @@ -276,7 +400,11 @@ }else{ char zBuf[30]; sprintf(zBuf, "column%d", i+1); -@@ -879,7 +879,7 @@ static int fillInColumnList(Parse *pPars + aCol[i].zName = sqliteStrDup(zBuf); + } +@@ -877,11 +877,11 @@ static int fillInColumnList(Parse *pPars + assert( pTabList->a[i].pSelect!=0 ); + if( pTabList->a[i].zAlias==0 ){ char zFakeName[60]; sprintf(zFakeName, "sqlite_subquery_%p_", (void*)pTabList->a[i].pSelect); @@ -285,7 +413,11 @@ } pTabList->a[i].pTab = pTab = sqliteResultSetOfSelect(pParse, pTabList->a[i].zAlias, -@@ -1003,7 +1003,7 @@ static int fillInColumnList(Parse *pPars + pTabList->a[i].pSelect); + if( pTab==0 ){ +@@ -1001,11 +1001,11 @@ static int fillInColumnList(Parse *pPars + pExpr = sqliteExpr(TK_DOT, pLeft, pRight, 0); + if( pExpr==0 ) break; pLeft->token.z = zTabName; pLeft->token.n = strlen(zTabName); pLeft->token.dyn = 0; @@ -294,9 +426,15 @@ pExpr->span.n = strlen(pExpr->span.z); pExpr->span.dyn = 1; pExpr->token.z = 0; ---- src/tokenize.c + pExpr->token.n = 0; + pExpr->token.dyn = 0; +Index: src/tokenize.c +=================================================================== +--- src/tokenize.c.orig +++ src/tokenize.c -@@ -434,7 +434,7 @@ int sqliteRunParser(Parse *pParse, const +@@ -432,11 +432,11 @@ int sqliteRunParser(Parse *pParse, const + } + break; } case TK_ILLEGAL: { sqliteSetNString(pzErrMsg, "unrecognized token: \"", -1, @@ -305,9 +443,15 @@ nErr++; goto abort_parse; } ---- src/vdbe.c + case TK_SEMI: { + pParse->zTail = &zSql[i]; +Index: src/vdbe.c +=================================================================== +--- src/vdbe.c.orig +++ src/vdbe.c -@@ -114,7 +114,7 @@ int sqlite_step( +@@ -112,11 +112,11 @@ int sqlite_step( + ){ + Vdbe *p = (Vdbe*)pVm; sqlite *db; int rc; @@ -316,3 +460,5 @@ return SQLITE_MISUSE; } db = p->db; + if( sqliteSafetyOn(db) ){ + p->rc = SQLITE_MISUSE; ++++++ sqlite2-tcl.diff ++++++ --- /var/tmp/diff_new_pack.ofSwBG/_old 2013-01-10 15:19:07.000000000 +0100 +++ /var/tmp/diff_new_pack.ofSwBG/_new 2013-01-10 15:19:07.000000000 +0100 @@ -1,6 +1,15 @@ ---- configure.ac +--- + configure.ac | 2 +- + src/tclsqlite.c | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +Index: configure.ac +=================================================================== +--- configure.ac.orig +++ configure.ac -@@ -432,7 +432,7 @@ +@@ -430,11 +430,11 @@ else + if test "$extra" != ""; then + LIBS=$extra else LIBS="" AC_SEARCH_LIBS(Tcl_Init, dnl @@ -9,9 +18,15 @@ fi TARGET_TCL_LIBS="$LIBS $otherlibs" fi ---- src/tclsqlite.c + AC_SUBST(TARGET_TCL_LIBS) + +Index: src/tclsqlite.c +=================================================================== +--- src/tclsqlite.c.orig +++ src/tclsqlite.c -@@ -1231,6 +1231,10 @@ +@@ -1229,10 +1229,14 @@ int Libsqlite_Init( Tcl_Interp *interp) + int TCLSH_MAIN(int argc, char **argv){ + #ifndef TCL_THREADS Tcl_Interp *interp; Tcl_FindExecutable(argv[0]); interp = Tcl_CreateInterp(); @@ -22,3 +37,5 @@ Libsqlite_Init(interp); if( argc>=2 ){ int i; + Tcl_SetVar(interp,"argv0",argv[1],TCL_GLOBAL_ONLY); + Tcl_SetVar(interp,"argv", "", TCL_GLOBAL_ONLY); -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
