Compare commits

...

39 Commits
f7 ... master

Author SHA1 Message Date
Fedora Release Engineering
69360136fe - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-27 00:01:33 +00:00
Tom Callaway
3c57fe66a3 IT LIVES AGAIN 2019-04-10 15:14:13 -04:00
Igor Gnatenko
303a577882 Rebuild for readline 8.0 2019-02-17 09:30:53 +01:00
Fedora Release Engineering
09a346cc5a - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-03 08:27:06 +00:00
Igor Gnatenko
05b4897ebe Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:50 +01:00
Igor Gnatenko
9160c41ca3
Remove obsolete ldconfig scriptlets
References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-22 18:41:03 +01:00
Robert Scheck
af322fd718 Replace "BuildRequires: gcc" by "BuildRequires: gcc-c++" 2018-07-20 22:48:21 +02:00
Fedora Release Engineering
28ec7ecfde - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-14 06:37:43 +00:00
Jason Tibbitts
4d198c937e Remove needless use of %defattr 2018-07-10 01:26:28 -05:00
Igor Gnatenko
1efd524564 add BuildRequires: gcc
Reference: https://fedoraproject.org/wiki/Changes/Remove_GCC_from_BuildRoot
2018-07-09 19:06:51 +02:00
Igor Gnatenko
b9ecec7593
Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 08:51:25 +01:00
Igor Gnatenko
709748e8bc Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-14 00:39:52 +01:00
Fedora Release Engineering
5a241f36d2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-09 17:31:09 +00:00
Fedora Release Engineering
299a25f266 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-03 08:47:23 +00:00
Fedora Release Engineering
083989aa21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-27 19:11:03 +00:00
Fedora Release Engineering
07ee9a2363 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-11 13:53:35 +00:00
Igor Gnatenko
0ce58e471d Rebuild for readline 7.x
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-12 17:30:42 +01:00
Fedora Release Engineering
17177a0960 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-05 00:32:00 +00:00
Dennis Gilmore
0c080956b9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-19 01:34:16 +00:00
Peter Robinson
b46b33438f - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-18 03:29:17 +00:00
lbazan
27b763dbfa Don't ship CVS files
Ville Skyttä ville.skytta@iki.fi
2014-06-10 22:30:55 -05:00
Dennis Gilmore
218053badf - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-08 02:03:46 -05:00
Jaroslav Škarvada
7c656d0ea5 Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86 2014-05-28 18:19:27 +02:00
Jaroslav Škarvada
330e9f86f8 - Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86 2014-05-21 12:40:21 +02:00
Robert Scheck
07f49d7e31 Fixed bogus date in %changelog 2013-12-08 13:41:07 +01:00
Robert Scheck
05d5ff24d3 Solved build failures with "-Werror=format-security" (#1037335) 2013-12-08 13:27:08 +01:00
Dennis Gilmore
a6faf6b281 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-04 10:38:42 -05:00
Dennis Gilmore
18e97271c6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-14 18:29:16 -06:00
Robert Scheck
11e04db76e Use macros to ensure that the correct tcl version is always used 2012-09-02 12:24:12 +02:00
Dennis Gilmore
32da0eec60 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-21 15:50:32 -05:00
Robert Scheck
4309129710 Added a patch to avoid segmentation fault of tests on ppc64 2012-03-23 10:54:06 +01:00
Dennis Gilmore
e3b51008ff - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-13 22:21:13 -06:00
Dennis Gilmore
041c93110b - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-09 09:49:00 -06:00
Fedora Release Engineering
1783f39d79 dist-git conversion 2010-07-29 13:07:22 +00:00
Bill Nottingham
b6470786a9 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 23:15:36 +00:00
alexlan
586079c48b - Install tcl subpackage in correct place, thanks to hkoba for patch
(#516411)
- Use new tclver define, depend on at least tcl 8.5
2009-08-19 06:59:10 +00:00
Jesse Keating
5029365089 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-27 04:43:59 +00:00
alexlan
3bd7a42137 - Add patches to build with new TCL and fix tests (#491726) thanks to D.
Marlin.
2009-03-24 04:14:46 +00:00
alexlan
a147a19ddf - Rebuild for merged Fedora 2007-10-03 23:16:53 +00:00
15 changed files with 780 additions and 47 deletions

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: sqlite2
# $Id: Makefile,v 1.1 2005/05/20 14:56:38 ivazquez Exp $
NAME := sqlite2
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)

View File

@ -0,0 +1,13 @@
diff -up sqlite-2.8.17/src/encode.c.CVE-2007-1888 sqlite-2.8.17/src/encode.c
--- sqlite-2.8.17/src/encode.c.CVE-2007-1888 2019-04-10 14:51:32.854203706 -0400
+++ sqlite-2.8.17/src/encode.c 2019-04-10 14:52:34.692952419 -0400
@@ -176,6 +176,9 @@ int sqlite_decode_binary(const unsigned
int i, e;
unsigned char c;
e = *(in++);
+ if( e==0 ){
+ return 0;
+ }
i = 0;
while( (c = *(in++))!=0 ){
if( c==1 ){

View File

@ -0,0 +1,14 @@
diff -up sqlite-2.8.17/Makefile.in.cleanup-tempc sqlite-2.8.17/Makefile.in
--- sqlite-2.8.17/Makefile.in.cleanup-tempc 2019-04-10 14:45:24.990212962 -0400
+++ sqlite-2.8.17/Makefile.in 2019-04-10 14:46:21.140254699 -0400
@@ -270,8 +270,9 @@ parse.c: $(TOP)/src/parse.y lemon@BUILD_
#
config.h:
echo '#include <stdio.h>' >temp.c
+ echo '#include <stdlib.h>'>>temp.c
echo 'int main(){printf(' >>temp.c
- echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c
+ echo '"#define SQLITE_PTR_SZ %ld",sizeof(char*));' >>temp.c
echo 'exit(0);}' >>temp.c
$(BCC) -o temp temp.c
./temp >config.h

View File

@ -0,0 +1,12 @@
diff -up sqlite-2.8.17/Makefile.in.fix-sort-syntax sqlite-2.8.17/Makefile.in
--- sqlite-2.8.17/Makefile.in.fix-sort-syntax 2019-04-10 15:00:15.804634056 -0400
+++ sqlite-2.8.17/Makefile.in 2019-04-10 15:00:26.075425567 -0400
@@ -184,7 +184,7 @@ Makefile: $(TOP)/Makefile.in
# of the most recently modified source code file
#
last_change: $(SRC)
- cat $(SRC) | grep '$$Id: ' | sort +4 | tail -n 1 \
+ cat $(SRC) | grep '$$Id: ' | sort -k 4 | tail -n 1 \
| awk '{print $$5,$$6}' >last_change
libsqlite.la: $(LIBOBJ)

View File

@ -0,0 +1,12 @@
diff -up sqlite-2.8.17/tool/lemon.c.crashfix sqlite-2.8.17/tool/lemon.c
--- sqlite-2.8.17/tool/lemon.c.crashfix 2019-04-10 15:03:23.464811085 -0400
+++ sqlite-2.8.17/tool/lemon.c 2019-04-10 15:04:02.767018417 -0400
@@ -3018,7 +3018,7 @@ int mhflag; /* True if g
int maxdtlength; /* Maximum length of any ".datatype" field. */
char *stddt; /* Standardized name for a datatype */
int i,j; /* Loop counters */
- int hash; /* For hashing the name of a type */
+ unsigned int hash; /* For hashing the name of a type */
char *name; /* Name of the parser */
/* Allocate and initialize types[] and allocate stddt[] */

View File

@ -0,0 +1,15 @@
Patch by Robert Scheck <robert@fedoraproject.org> for sqlite >= 2.8.17 which fixes
the build failures if compiled with "-Werror=format-security". Further information
can be found at https://bugzilla.redhat.com/show_bug.cgi?id=1037335
--- sqlite-2.8.17/src/shell.c 2005-04-24 00:43:22.000000000 +0200
+++ sqlite-2.8.17/src/shell.c.format-security 2013-12-08 13:20:47.000000000 +0100
@@ -692,7 +692,7 @@
}else
if( c=='h' && strncmp(azArg[0], "help", n)==0 ){
- fprintf(stderr,zHelp);
+ fprintf(stderr,"%s",zHelp);
}else
if( c=='i' && strncmp(azArg[0], "indices", n)==0 && nArg>1 ){

View File

@ -0,0 +1,12 @@
diff -up sqlite-2.8.17/Makefile.in.ldflags sqlite-2.8.17/Makefile.in
--- sqlite-2.8.17/Makefile.in.ldflags 2019-04-10 15:01:39.401934112 -0400
+++ sqlite-2.8.17/Makefile.in 2019-04-10 15:01:48.856740555 -0400
@@ -38,7 +38,7 @@ RELEASE = @ALLOWRELEASE@
# libtool compile/link/install
LTCOMPILE = $(LIBTOOL) --mode=compile $(TCC)
-LTLINK = $(LIBTOOL) --mode=link $(TCC)
+LTLINK = $(LIBTOOL) --mode=link $(TCC) $(LDFLAGS)
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
# Compiler options needed for programs that use the TCL library.

View File

@ -0,0 +1,77 @@
diff -up sqlite-2.8.17/tool/lemon.c.snprintf sqlite-2.8.17/tool/lemon.c
--- sqlite-2.8.17/tool/lemon.c.snprintf 2019-04-10 14:54:06.947117428 -0400
+++ sqlite-2.8.17/tool/lemon.c 2019-04-10 14:58:20.765967958 -0400
@@ -1272,15 +1272,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 = strlen(prefix);
availablewidth = LINEWIDTH - prefixsize;
/* Generate the error message */
- vsprintf(errmsg,format,ap);
+ vsnprintf(errmsg,sizeof errmsg,format,ap);
va_end(ap);
errmsgsize = strlen(errmsg);
/* Remove trailing '\n's from the error message. */
@@ -2675,7 +2675,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," ");
@@ -2814,14 +2814,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);
}
@@ -2833,7 +2835,7 @@ struct lemon *lemp;
}
in = fopen(tpltname,"r");
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;
}
@@ -3447,7 +3449,7 @@ int mhflag; /* Output in makeheaders
/* Generate a table containing the symbolic name of every symbol
*/
for(i=0; i<lemp->nsymbol; 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++; }
}
@@ -3562,7 +3564,7 @@ struct lemon *lemp;
in = file_open(lemp,".h","r");
if( in ){
for(i=1; i<lemp->nterminal && 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);

46
sqlite-2.8.17-ppc64.patch Normal file
View File

@ -0,0 +1,46 @@
Patch by Gustavo Luiz Duarte <gustavold@gmail.com> for sqlite >= 2.8.17,
which fixes the cast of a pointer to int that causes a segmentation fault
during the tests. On 64 bit machines, pointers are 64 bit and int is 32
bit. During casting the pointer is truncated, so the original code could
potentially also break x86_64, while it is doing not so at the moment.
--- sqlite-2.8.17/src/test2.c 2005-04-24 00:43:22.000000000 +0200
+++ sqlite-2.8.17/src/test2.c.ppc64 2012-03-23 10:47:07.000000000 +0100
@@ -82,7 +82,7 @@ static int pager_open(
Tcl_AppendResult(interp, errorName(rc), 0);
return TCL_ERROR;
}
- sprintf(zBuf,"0x%x",(int)pPager);
+ sprintf(zBuf,"%p", pPager);
Tcl_AppendResult(interp, zBuf, 0);
return TCL_OK;
}
@@ -334,7 +334,7 @@ static int page_get(
Tcl_AppendResult(interp, errorName(rc), 0);
return TCL_ERROR;
}
- sprintf(zBuf,"0x%x",(int)pPage);
+ sprintf(zBuf,"%p", pPage);
Tcl_AppendResult(interp, zBuf, 0);
return TCL_OK;
}
@@ -364,7 +364,7 @@ static int page_lookup(
if( Tcl_GetInt(interp, argv[2], &pgno) ) return TCL_ERROR;
pPage = sqlitepager_lookup(pPager, pgno);
if( pPage ){
- sprintf(zBuf,"0x%x",(int)pPage);
+ sprintf(zBuf,"%p", pPage);
Tcl_AppendResult(interp, zBuf, 0);
}
return TCL_OK;
--- sqlite-2.8.17/src/test3.c 2005-04-24 00:43:22.000000000 +0200
+++ sqlite-2.8.17/src/test3.c.ppc64 2012-03-23 10:47:03.000000000 +0100
@@ -534,7 +534,7 @@ static int btree_cursor(
Tcl_AppendResult(interp, errorName(rc), 0);
return TCL_ERROR;
}
- sprintf(zBuf,"0x%x", (int)pCur);
+ sprintf(zBuf,"%p", pCur);
Tcl_AppendResult(interp, zBuf, 0);
return SQLITE_OK;
}

View File

@ -0,0 +1,292 @@
diff -up sqlite-2.8.17/main.mk.suse sqlite-2.8.17/main.mk
--- sqlite-2.8.17/main.mk.suse 2019-04-10 13:58:27.732431498 -0400
+++ sqlite-2.8.17/main.mk 2019-04-10 13:58:44.004100000 -0400
@@ -145,7 +145,7 @@ all: sqlite.h config.h libsqlite.a sqlit
# of the most recently modified source code file
#
last_change: $(SRC)
- cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
+ cat $(SRC) | grep '$$Id: ' | sort +4 | tail -n 1 \
| awk '{print $$5,$$6}' >last_change
libsqlite.a: $(LIBOBJ)
diff -up sqlite-2.8.17/Makefile.in.suse sqlite-2.8.17/Makefile.in
--- sqlite-2.8.17/Makefile.in.suse 2019-04-10 13:56:27.446882088 -0400
+++ sqlite-2.8.17/Makefile.in 2019-04-10 13:58:22.316541835 -0400
@@ -26,7 +26,7 @@ BCC = @BUILD_CC@ @BUILD_CFLAGS@
# will run on the target platform. (BCC and TCC are usually the
# same unless your are cross-compiling.)
#
-TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src
+TCC = @TARGET_CC@ @TARGET_CFLAGS@ -I. -I${TOP}/src -DTHREADSAFE=1
# Some standard variables and programs
#
@@ -184,7 +184,7 @@ Makefile: $(TOP)/Makefile.in
# of the most recently modified source code file
#
last_change: $(SRC)
- cat $(SRC) | grep '$$Id: ' | sort +4 | tail -1 \
+ cat $(SRC) | grep '$$Id: ' | sort +4 | tail -n 1 \
| awk '{print $$5,$$6}' >last_change
libsqlite.la: $(LIBOBJ)
@@ -365,7 +365,7 @@ tclsqlite: tclsqlite-sh.lo libsqlite.la
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 \
- libtclsqlite.la libsqlite.la $(LIBTCL)
+ libtclsqlite.la libsqlite.la $(LIBTCL) -lpthread
fulltest: testfixture@TARGET_EXEEXT@ sqlite@TARGET_EXEEXT@
./testfixture $(TOP)/test/all.test
diff -up sqlite-2.8.17/src/attach.c.suse sqlite-2.8.17/src/attach.c
--- sqlite-2.8.17/src/attach.c.suse 2019-04-10 13:58:52.066935738 -0400
+++ sqlite-2.8.17/src/attach.c 2019-04-10 13:59:35.179057409 -0400
@@ -48,7 +48,7 @@ void sqliteAttach(Parse *pParse, Token *
}
zFile = 0;
- sqliteSetNString(&zFile, pFilename->z, pFilename->n, 0);
+ sqliteSetNString(&zFile, pFilename->z, pFilename->n, (char*)0);
if( zFile==0 ) return;
sqliteDequote(zFile);
#ifndef SQLITE_OMIT_AUTHORIZATION
@@ -59,7 +59,7 @@ void sqliteAttach(Parse *pParse, Token *
#endif /* SQLITE_OMIT_AUTHORIZATION */
zName = 0;
- sqliteSetNString(&zName, pDbname->z, pDbname->n, 0);
+ sqliteSetNString(&zName, pDbname->z, pDbname->n, (char*)0);
if( zName==0 ) return;
sqliteDequote(zName);
for(i=0; i<db->nDb; i++){
diff -up sqlite-2.8.17/src/build.c.suse sqlite-2.8.17/src/build.c
--- sqlite-2.8.17/src/build.c.suse 2019-04-10 13:59:41.010938595 -0400
+++ sqlite-2.8.17/src/build.c 2019-04-10 14:01:24.312835795 -0400
@@ -559,7 +559,7 @@ void sqliteAddColumn(Parse *pParse, Toke
char *z = 0;
Column *pCol;
if( (p = pParse->pNewTable)==0 ) return;
- sqliteSetNString(&z, pName->z, pName->n, 0);
+ sqliteSetNString(&z, pName->z, pName->n, (char*)0);
if( z==0 ) return;
sqliteDequote(z);
for(i=0; i<p->nCol; i++){
@@ -617,7 +617,7 @@ void sqliteAddColumnType(Parse *pParse,
pCol = &p->aCol[i];
pz = &pCol->zType;
n = pLast->n + Addr(pLast->z) - Addr(pFirst->z);
- sqliteSetNString(pz, pFirst->z, n, 0);
+ sqliteSetNString(pz, pFirst->z, n, (char*)0);
z = *pz;
if( z==0 ) return;
for(i=j=0; z[i]; i++){
@@ -650,9 +650,9 @@ void sqliteAddDefaultValue(Parse *pParse
if( i<0 ) return;
pz = &p->aCol[i].zDflt;
if( minusFlag ){
- sqliteSetNString(pz, "-", 1, pVal->z, pVal->n, 0);
+ sqliteSetNString(pz, "-", 1, pVal->z, pVal->n, (char*)0);
}else{
- sqliteSetNString(pz, pVal->z, pVal->n, 0);
+ sqliteSetNString(pz, pVal->z, pVal->n, (char*)0);
}
sqliteDequote(*pz);
}
@@ -1856,7 +1856,7 @@ IdList *sqliteIdListAppend(IdList *pList
memset(&pList->a[pList->nId], 0, sizeof(pList->a[0]));
if( pToken ){
char **pz = &pList->a[pList->nId].zName;
- sqliteSetNString(pz, pToken->z, pToken->n, 0);
+ sqliteSetNString(pz, pToken->z, pToken->n, (char*)0);
if( *pz==0 ){
sqliteIdListDelete(pList);
return 0;
@@ -1921,7 +1921,7 @@ SrcList *sqliteSrcListAppend(SrcList *pL
}
if( pTable ){
char **pz = &pList->a[pList->nSrc].zName;
- sqliteSetNString(pz, pTable->z, pTable->n, 0);
+ sqliteSetNString(pz, pTable->z, pTable->n, (char*)0);
if( *pz==0 ){
sqliteSrcListDelete(pList);
return 0;
@@ -1931,7 +1931,7 @@ SrcList *sqliteSrcListAppend(SrcList *pL
}
if( pDatabase ){
char **pz = &pList->a[pList->nSrc].zDatabase;
- sqliteSetNString(pz, pDatabase->z, pDatabase->n, 0);
+ sqliteSetNString(pz, pDatabase->z, pDatabase->n, (char*)0);
if( *pz==0 ){
sqliteSrcListDelete(pList);
return 0;
@@ -1962,7 +1962,7 @@ void sqliteSrcListAssignCursors(Parse *p
void sqliteSrcListAddAlias(SrcList *pList, Token *pToken){
if( pList && pList->nSrc>0 ){
int i = pList->nSrc - 1;
- sqliteSetNString(&pList->a[i].zAlias, pToken->z, pToken->n, 0);
+ sqliteSetNString(&pList->a[i].zAlias, pToken->z, pToken->n, (char*)0);
sqliteDequote(pList->a[i].zAlias);
}
}
diff -up sqlite-2.8.17/src/expr.c.suse sqlite-2.8.17/src/expr.c
--- sqlite-2.8.17/src/expr.c.suse 2019-04-10 14:30:57.775728582 -0400
+++ sqlite-2.8.17/src/expr.c 2019-04-10 14:31:15.127321739 -0400
@@ -269,7 +269,7 @@ ExprList *sqliteExprListAppend(ExprList
memset(pItem, 0, sizeof(*pItem));
pItem->pExpr = pExpr;
if( pName ){
- sqliteSetNString(&pItem->zName, pName->z, pName->n, 0);
+ sqliteSetNString(&pItem->zName, pName->z, pName->n, (char*)0);
sqliteDequote(pItem->zName);
}
}
diff -up sqlite-2.8.17/src/pragma.c.suse sqlite-2.8.17/src/pragma.c
--- sqlite-2.8.17/src/pragma.c.suse 2019-04-10 14:31:21.335176252 -0400
+++ sqlite-2.8.17/src/pragma.c 2019-04-10 14:31:38.126782727 -0400
@@ -167,7 +167,7 @@ void sqlitePragma(Parse *pParse, Token *
sqliteDequote(zLeft);
if( minusFlag ){
zRight = 0;
- sqliteSetNString(&zRight, "-", 1, pRight->z, pRight->n, 0);
+ sqliteSetNString(&zRight, "-", 1, pRight->z, pRight->n, (char*)0);
}else{
zRight = sqliteStrNDup(pRight->z, pRight->n);
sqliteDequote(zRight);
diff -up sqlite-2.8.17/src/printf.c.suse sqlite-2.8.17/src/printf.c
--- sqlite-2.8.17/src/printf.c.suse 2019-04-10 14:31:45.198616993 -0400
+++ sqlite-2.8.17/src/printf.c 2019-04-10 14:33:50.164555108 -0400
@@ -647,7 +647,7 @@ struct sgMprintf {
int nChar; /* Length of the string so far */
int nTotal; /* Output size if unconstrained */
int nAlloc; /* Amount of space allocated in zText */
- void *(*xRealloc)(void*,int); /* Function used to realloc memory */
+ void *(*xRealloc)(void*,size_t); /* Function used to realloc memory */
};
/*
@@ -688,7 +688,7 @@ static void mout(void *arg, const char *
** the consumer.
*/
static char *base_vprintf(
- void *(*xRealloc)(void*,int), /* Routine to realloc memory. May be NULL */
+ void *(*xRealloc)(void*,size_t), /* Routine to realloc memory. May be NULL */
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(
/*
** Realloc that is a real function, not a macro.
*/
-static void *printf_realloc(void *old, int size){
+static void *printf_realloc(void *old, size_t size){
return sqliteRealloc(old,size);
}
@@ -752,8 +752,7 @@ char *sqlite_mprintf(const char *zFormat
char zBuf[200];
va_start(ap,zFormat);
- z = base_vprintf((void*(*)(void*,int))realloc, 0,
- zBuf, sizeof(zBuf), zFormat, ap);
+ z = base_vprintf(realloc, 0, zBuf, sizeof(zBuf), zFormat, ap);
va_end(ap);
return z;
}
@@ -762,8 +761,7 @@ char *sqlite_mprintf(const char *zFormat
*/
char *sqlite_vmprintf(const char *zFormat, va_list ap){
char zBuf[200];
- return base_vprintf((void*(*)(void*,int))realloc, 0,
- zBuf, sizeof(zBuf), zFormat, ap);
+ return base_vprintf(realloc, 0, zBuf, sizeof(zBuf), zFormat, ap);
}
/*
diff -up sqlite-2.8.17/src/select.c.suse sqlite-2.8.17/src/select.c
--- sqlite-2.8.17/src/select.c.suse 2019-04-10 14:33:55.340435617 -0400
+++ sqlite-2.8.17/src/select.c 2019-04-10 14:35:16.170605054 -0400
@@ -121,7 +121,7 @@ int sqliteJoinType(Parse *pParse, Token
if( pB==0 ){ pB = &dummy; zSp1 = 0; }
if( pC==0 ){ pC = &dummy; zSp2 = 0; }
sqliteSetNString(&pParse->zErrMsg, "unknown or unsupported join type: ", 0,
- pA->z, pA->n, zSp1, 1, pB->z, pB->n, zSp2, 1, pC->z, pC->n, 0);
+ pA->z, pA->n, zSp1, 1, pB->z, pB->n, zSp2, 1, pC->z, pC->n, (char*)0);
pParse->nErr++;
jointype = JT_INNER;
}else if( jointype & JT_RIGHT ){
@@ -744,7 +744,7 @@ static void generateColumnNames(
zTab = pTabList->a[j].zAlias;
if( fullNames || zTab==0 ) zTab = pTab->zName;
- sqliteSetString(&zName, zTab, ".", zCol, 0);
+ sqliteSetString(&zName, zTab, ".", zCol, (char*)0);
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=pEList->a[i].pExpr)->op==TK_DOT
&& (pR=p->pRight)!=0 && pR->token.z && pR->token.z[0] ){
int cnt;
- sqliteSetNString(&aCol[i].zName, pR->token.z, pR->token.n, 0);
+ sqliteSetNString(&aCol[i].zName, pR->token.z, pR->token.n, (char*)0);
for(j=cnt=0; j<i; j++){
if( sqliteStrICmp(aCol[j].zName, aCol[i].zName)==0 ){
int n;
char zBuf[30];
sprintf(zBuf,"_%d",++cnt);
n = strlen(zBuf);
- sqliteSetNString(&aCol[i].zName, pR->token.z, pR->token.n, zBuf, n,0);
+ sqliteSetNString(&aCol[i].zName, pR->token.z, pR->token.n, zBuf, n, (char*)0);
j = -1;
}
}
}else if( p->span.z && p->span.z[0] ){
- sqliteSetNString(&pTab->aCol[i].zName, p->span.z, p->span.n, 0);
+ sqliteSetNString(&pTab->aCol[i].zName, p->span.z, p->span.n, (char*)0);
}else{
char zBuf[30];
sprintf(zBuf, "column%d", i+1);
@@ -879,7 +879,7 @@ static int fillInColumnList(Parse *pPars
char zFakeName[60];
sprintf(zFakeName, "sqlite_subquery_%p_",
(void*)pTabList->a[i].pSelect);
- sqliteSetString(&pTabList->a[i].zAlias, zFakeName, 0);
+ sqliteSetString(&pTabList->a[i].zAlias, zFakeName, (char*)0);
}
pTabList->a[i].pTab = pTab =
sqliteResultSetOfSelect(pParse, pTabList->a[i].zAlias,
@@ -1003,7 +1003,7 @@ static int fillInColumnList(Parse *pPars
pLeft->token.z = zTabName;
pLeft->token.n = strlen(zTabName);
pLeft->token.dyn = 0;
- sqliteSetString((char**)&pExpr->span.z, zTabName, ".", zName, 0);
+ sqliteSetString((char**)&pExpr->span.z, zTabName, ".", zName, (char*)0);
pExpr->span.n = strlen(pExpr->span.z);
pExpr->span.dyn = 1;
pExpr->token.z = 0;
diff -up sqlite-2.8.17/src/tokenize.c.suse sqlite-2.8.17/src/tokenize.c
--- sqlite-2.8.17/src/tokenize.c.suse 2019-04-10 14:35:30.217290528 -0400
+++ sqlite-2.8.17/src/tokenize.c 2019-04-10 14:35:41.641034104 -0400
@@ -434,7 +434,7 @@ int sqliteRunParser(Parse *pParse, const
}
case TK_ILLEGAL: {
sqliteSetNString(pzErrMsg, "unrecognized token: \"", -1,
- pParse->sLastToken.z, pParse->sLastToken.n, "\"", 1, 0);
+ pParse->sLastToken.z, pParse->sLastToken.n, "\"", 1, (char*)0);
nErr++;
goto abort_parse;
}
diff -up sqlite-2.8.17/src/vdbe.c.suse sqlite-2.8.17/src/vdbe.c
--- sqlite-2.8.17/src/vdbe.c.suse 2019-04-10 14:35:48.752874467 -0400
+++ sqlite-2.8.17/src/vdbe.c 2019-04-10 14:36:13.433320479 -0400
@@ -114,7 +114,7 @@ int sqlite_step(
sqlite *db;
int rc;
- if( p->magic!=VDBE_MAGIC_RUN ){
+ if( !p || p->magic!=VDBE_MAGIC_RUN ){
return SQLITE_MISUSE;
}
db = p->db;

View File

@ -0,0 +1,43 @@
diff -up sqlite-2.8.17/src/btree.c.sqlite3 sqlite-2.8.17/src/btree.c
--- sqlite-2.8.17/src/btree.c.sqlite3 2019-04-10 14:39:29.597592819 -0400
+++ sqlite-2.8.17/src/btree.c 2019-04-10 14:40:51.458892027 -0400
@@ -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 +796,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;
diff -up sqlite-2.8.17/src/main.c.sqlite3 sqlite-2.8.17/src/main.c
--- sqlite-2.8.17/src/main.c.sqlite3 2019-04-10 14:41:00.268709401 -0400
+++ sqlite-2.8.17/src/main.c 2019-04-10 14:41:24.115215151 -0400
@@ -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;
diff -up sqlite-2.8.17/src/sqlite.h.in.sqlite3 sqlite-2.8.17/src/sqlite.h.in
--- sqlite-2.8.17/src/sqlite.h.in.sqlite3 2019-04-10 14:41:44.465793362 -0400
+++ sqlite-2.8.17/src/sqlite.h.in 2019-04-10 14:41:57.761517793 -0400
@@ -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 */

28
sqlite-2.8.17-tcl.patch Normal file
View File

@ -0,0 +1,28 @@
Address problem using sqlite2 with Tcl-8.5
Based on sqlite2-tcl.diff from OpenSuSE sqlite2-2.8.17-166.3.src.rpm
diff -up sqlite-2.8.17/configure.ac.orig sqlite-2.8.17/configure.ac
--- sqlite-2.8.17/configure.ac.orig
+++ sqlite-2.8.17/configure.ac
@@ -432,7 +432,7 @@
else
LIBS=""
AC_SEARCH_LIBS(Tcl_Init, dnl
- tcl8.4 tcl8.3 tcl84 tcl83 tcl,,,$otherlibs)
+ tcl8.6 tcl8.5 tcl8.4 tcl8.3 tcl84 tcl83 tcl,,,$otherlibs)
fi
TARGET_TCL_LIBS="$LIBS $otherlibs"
fi
diff -up sqlite-2.8.17/src/tclsqlite.c.orig sqlite-2.8.17/src/tclsqlite.c
--- sqlite-2.8.17/src/tclsqlite.c.orig
+++ sqlite-2.8.17/src/tclsqlite.c
@@ -1231,6 +1231,10 @@
Tcl_Interp *interp;
Tcl_FindExecutable(argv[0]);
interp = Tcl_CreateInterp();
+ if (Tcl_Init(interp) == TCL_ERROR) {
+ fprintf(stderr,"%s\n",
+ Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY));
+ }
Libsqlite_Init(interp);
if( argc>=2 ){
int i;

53
sqlite-2.8.17-tcl86.patch Normal file
View File

@ -0,0 +1,53 @@
diff --git a/src/md5.c b/src/md5.c
index a22f6d2..fc5693f 100644
--- a/src/md5.c
+++ b/src/md5.c
@@ -296,6 +296,7 @@ static void DigestToBase16(unsigned char *digest, char *zBuf){
static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){
MD5Context ctx;
unsigned char digest[16];
+ char buf[64];
if( argc!=2 ){
Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0],
@@ -305,7 +306,8 @@ static int md5_cmd(void*cd, Tcl_Interp *interp, int argc, const char **argv){
MD5Init(&ctx);
MD5Update(&ctx, (unsigned char*)argv[1], (unsigned)strlen(argv[1]));
MD5Final(digest, &ctx);
- DigestToBase16(digest, interp->result);
+ DigestToBase16(digest, buf);
+ Tcl_SetResult(interp, buf, TCL_VOLATILE);
return TCL_OK;
}
@@ -318,6 +320,7 @@ static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){
MD5Context ctx;
unsigned char digest[16];
char zBuf[10240];
+ char buf[64];
if( argc!=2 ){
Tcl_AppendResult(interp,"wrong # args: should be \"", argv[0],
@@ -339,7 +342,8 @@ static int md5file_cmd(void*cd, Tcl_Interp*interp, int argc, const char **argv){
}
fclose(in);
MD5Final(digest, &ctx);
- DigestToBase16(digest, interp->result);
+ DigestToBase16(digest, buf);
+ Tcl_SetResult(interp, buf, TCL_VOLATILE);
return TCL_OK;
}
diff --git a/src/tclsqlite.c b/src/tclsqlite.c
index cc8daa1..7337ed7 100644
--- a/src/tclsqlite.c
+++ b/src/tclsqlite.c
@@ -1246,7 +1246,7 @@ int TCLSH_MAIN(int argc, char **argv){
}
if( Tcl_EvalFile(interp, argv[1])!=TCL_OK ){
const char *zInfo = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY);
- if( zInfo==0 ) zInfo = interp->result;
+ if( zInfo==0 ) zInfo = Tcl_GetStringResult(interp);
fprintf(stderr,"%s: %s\n", *argv, zInfo);
return TCL_ERROR;
}

22
sqlite-2.8.17-test.patch Normal file
View File

@ -0,0 +1,22 @@
diff -up sqlite-2.8.17/test/tclsqlite.test.orig sqlite-2.8.17/test/tclsqlite.test
--- sqlite-2.8.17/test/tclsqlite.test.orig 2005-04-23 17:43:22.000000000 -0500
+++ sqlite-2.8.17/test/tclsqlite.test 2009-03-20 10:36:39.235100000 -0500
@@ -61,16 +61,15 @@ do_test tcl-1.5 {
} msg]
lappend v $msg
} {0 {}}
+catch {expr x*} msg
do_test tcl-1.6 {
set v [catch {
db eval {SELECT * FROM t1} data {
expr x*
}
} msg]
- regsub {:.*$} $msg {} msg
lappend v $msg
-} {1 {syntax error in expression "x*"}}
-
+} [list 1 $msg]
if {[sqlite -encoding]=="UTF-8" && [sqlite -tcl-uses-utf]} {
catch {unset ::result}
do_test tcl-2.1 {

View File

@ -1,9 +1,11 @@
%{!?tcl_version: %global tcl_version %((echo 0; echo 'puts $tcl_version' | tclsh) | tail -1)}
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
Name: sqlite2 Name: sqlite2
Version: 2.8.17 Version: 2.8.17
Release: 1%{?dist} Release: 29%{?dist}
Summary: Embeddable SQL engine in a C library Summary: Embeddable SQL engine in a C library
Group: System Environment/Libraries
License: Public Domain License: Public Domain
URL: http://www.sqlite.org/ URL: http://www.sqlite.org/
Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz Source0: http://www.sqlite.org/sqlite-%{version}.tar.gz
@ -12,10 +14,23 @@ Patch2: sqlite-2.8.15-makefile.patch
Patch3: sqlite-2.8.3.test.rh9.patch Patch3: sqlite-2.8.3.test.rh9.patch
Patch4: sqlite-64bit-fixes.patch Patch4: sqlite-64bit-fixes.patch
Patch5: sqlite-2.8.15-arch-double-differences.patch Patch5: sqlite-2.8.15-arch-double-differences.patch
Patch6: sqlite-2.8.17-test.patch
Patch7: sqlite-2.8.17-tcl.patch
Patch8: sqlite-2.8.17-ppc64.patch
Patch9: sqlite-2.8.17-format-security.patch
Patch10: sqlite-2.8.17-tcl86.patch
Patch11: sqlite-2.8.17-cleanup-temp-c.patch
Patch12: sqlite-2.8.17-suse-cleanups.patch
Patch13: sqlite-2.8.17-suse-detect-sqlite3.patch
Patch14: sqlite-2.8.17-CVE-2007-1888.patch
Patch15: sqlite-2.8.17-lemon-snprintf.patch
Patch16: sqlite-2.8.17-fix-sort-syntax.patch
Patch17: sqlite-2.8.17-ldflags.patch
Patch18: sqlite-2.8.17-fix-unsigned-FTBFS.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gcc-c++
BuildRequires: ncurses-devel readline-devel %{_includedir}/tcl.h BuildRequires: ncurses-devel, readline-devel, %{_includedir}/tcl.h
Obsoletes: sqlite < 3 Obsoletes: sqlite < 3, sqlite%{?_isa} < 3
%description %description
SQLite is a small, fast, embeddable SQL database engine that supports SQLite is a small, fast, embeddable SQL database engine that supports
@ -27,10 +42,8 @@ available.
%package devel %package devel
Summary: Development files for SQLite Summary: Development files for SQLite
Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release}, pkgconfig
Requires: %{name} = %{version}-%{release} Obsoletes: sqlite-devel < 3, sqlite-devel%{?_isa} < 3
Requires: pkgconfig
Obsoletes: sqlite-devel < 3
%description devel %description devel
SQLite is a small, fast, embeddable SQL database engine that supports SQLite is a small, fast, embeddable SQL database engine that supports
@ -41,9 +54,13 @@ applications using sqlite.
%package tcl %package tcl
Summary: Tcl bindings for sqlite Summary: Tcl bindings for sqlite
Group: System Environment/Libraries %if 0%{?rhel}%{?fedora} > 5
Requires: tcl >= 8.3.3, %{name} = %{version}-%{release} Requires: tcl(abi) = %{tcl_version}
Obsoletes: sqlite-tcl < 3 %else
Requires: tcl%{?_isa} >= %{tcl_version}
%endif
Requires: %{name}%{?_isa} = %{version}-%{release}
Obsoletes: sqlite-tcl < 3, sqlite-tcl%{?_isa} < 3
%description tcl %description tcl
SQLite is a small, fast, embeddable SQL database engine that supports SQLite is a small, fast, embeddable SQL database engine that supports
@ -53,11 +70,25 @@ This package contains tcl bindings for sqlite.
%prep %prep
%setup -q -n sqlite-%{version} %setup -q -n sqlite-%{version}
find . -type d -name CVS -print0 | xargs -0 rm -r
%patch1 -p1 -b .rpath %patch1 -p1 -b .rpath
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1 -b .cleanup-tempc
%patch12 -p1 -b .suse
%patch13 -p1 -b .detect-sqlite3
%patch14 -p1 -b .CVE-2007-1888
%patch15 -p1 -b .snprintf
%patch16 -p1 -b .fix-sort-syntax
%patch17 -p1 -b .ldflags
%patch18 -p1 -b .unsigned-fix
sed -i.rpath 's!__VERSION__!%{version}!g' Makefile.in sed -i.rpath 's!__VERSION__!%{version}!g' Makefile.in
# Patch additional /usr/lib locations where we don't have $(libdir) # Patch additional /usr/lib locations where we don't have $(libdir)
# to substitute with. # to substitute with.
@ -68,47 +99,131 @@ CFLAGS="$RPM_OPT_FLAGS -DNDEBUG=1"
%configure --enable-utf8 --disable-static %configure --enable-utf8 --disable-static
make make
make tclsqlite libtclsqlite.la doc make tclsqlite libtclsqlite.la doc
%check
#obs. make test doesn't like root #obs. make test doesn't like root
make test make test
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
DIRECTORY=$RPM_BUILD_ROOT%{_libdir}/sqlite-%version DIRECTORY=$RPM_BUILD_ROOT%{_libdir}/sqlite-%{version}
install -d $DIRECTORY install -d $DIRECTORY
echo 'package ifneeded sqlite 2 [list load [file join $dir libtclsqlite.so]]' > $DIRECTORY/pkgIndex.tcl echo 'package ifneeded sqlite 2 [list load [file join $dir libtclsqlite.so]]' > $DIRECTORY/pkgIndex.tcl
%makeinstall %makeinstall
install -D -m 0644 sqlite.1 $RPM_BUILD_ROOT%{_mandir}/man1/sqlite.1 install -D -m 0644 sqlite.1 $RPM_BUILD_ROOT%{_mandir}/man1/sqlite.1
mkdir -p $RPM_BUILD_ROOT%{tcl_sitearch}
mv -f $DIRECTORY $RPM_BUILD_ROOT%{tcl_sitearch}/sqlite2
find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';'
rm -f $RPM_BUILD_ROOT%{_bindir}/tclsqlite
%clean %ldconfig_scriptlets
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files %files
%defattr(-,root,root,-)
%{_bindir}/sql* %{_bindir}/sql*
%{_libdir}/libsql*.so.* %{_libdir}/libsql*.so.*
%{_mandir}/man1/* %{_mandir}/man1/*
%files devel %files devel
%defattr(-,root,root,-) %doc README doc/*
%doc README doc/*
%{_libdir}/libsql*.so %{_libdir}/libsql*.so
%{_includedir}/* %{_includedir}/*
%{_libdir}/pkgconfig/* %{_libdir}/pkgconfig/*
%files tcl %files tcl
%defattr(-,root,root,-)
%doc doc/tclsqlite.html %doc doc/tclsqlite.html
%exclude %{_bindir}/tclsqlite %{tcl_sitearch}/sqlite2/
%{_libdir}/sqlite-%version
%changelog %changelog
* Sun Sep 10 2006 Mike McGrath <imlinux@gmail.com> 2.8.17-2 * Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.17-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Apr 10 2019 Tom Callaway <spot@fedoraproject.org> - 2.8.17-28
- bring in all the good fixes from suse and debian
... including the one that resolves the FTBFS since Fedora 26. yikes.
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.8.17-27
- Rebuild for readline 8.0
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.17-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.17-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.17-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.17-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.17-22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.17-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 2.8.17-20
- Rebuild for readline 7.x
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.17-19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Tue Jun 10 2014 Luis Bazan <lbazan@fedoraproject.org> - 2.8.17-16
- Don't ship CVS files thanks "Ville Skyttä ville.skytta@iki.fi"
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 21 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.8.17-14
- Rebuilt for https://fedoraproject.org/wiki/Changes/f21tcl86
* Sun Dec 08 2013 Robert Scheck <robert@fedoraproject.org> 2.8.17-13
- Solved build failures with "-Werror=format-security" (#1037335)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sun Sep 02 2012 Robert Scheck <robert@fedoraproject.org> - 2.8.17-10
- Use macros to ensure that the correct tcl version is always used
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Mar 23 2012 Robert Scheck <robert@fedoraproject.org> - 2.8.17-8
- Added a patch to avoid segmentation fault of tests on ppc64
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Aug 18 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 2.8.17-5
- Install tcl subpackage in correct place, thanks to hkoba for patch (#516411)
- Use new tclver define, depend on at least tcl 8.5
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.17-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Mar 23 2009 Alex Lancaster <alexlan[AT]fedoraproject org> - 2.8.17-3
- Add patches to build with new TCL and fix tests (#491726)
thanks to D. Marlin.
* Wed Oct 03 2007 Alex Lancaster <alexl@users.sourceforge.net> 2.8.17-2
- Rebuild for merged Fedora
* Sun Sep 10 2006 Mike McGrath <imlinux@gmail.com> 2.8.17-1
- New upstream source - New upstream source
* Tue Feb 28 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 2.8.16-3 * Tue Feb 28 2006 Ignacio Vazquez-Abrams <ivazquez@ivazquez.net> 2.8.16-3
@ -141,7 +256,7 @@ rm -rf $RPM_BUILD_ROOT
- Update to 2.8.15 - Update to 2.8.15
- Update patches - Update patches
* Fri Jun 19 2004 Nils O. Selåsdal <NOS@Utel.no> - 0:2.8.14-0.fdr.1 * Sat Jun 19 2004 Nils O. Selåsdal <NOS@Utel.no> - 0:2.8.14-0.fdr.1
- Update to 2.8.14 - Update to 2.8.14
- Update patches - Update patches
- --enable-releasemode - --enable-releasemode