Compare commits

..
Author SHA1 Message Date
openeuler-ci-bot 920187b9f1 !16 update sqlite to 3310100
Merge pull request !16 from lfl/master
2020-05-13 14:40:36 +08:00
wubo009 c6c12b31bc update pkg in lts branch 2020-05-12 23:06:17 +08:00
15 changed files with 510 additions and 171 deletions
-2
View File
@@ -1,2 +0,0 @@
*.zip filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
-2
View File
@@ -1,2 +0,0 @@
[lfs]
url = https://artlfs.openeuler.openatom.cn/src-openEuler/sqlite
+24
View File
@@ -0,0 +1,24 @@
diff -up sqlite-src-3120200/configure.ac.malloc_usable_size sqlite-src-3120200/configure.ac
--- sqlite-src-3120200/configure.ac.malloc_usable_size 2016-04-25 09:46:48.134690570 +0200
+++ sqlite-src-3120200/configure.ac 2016-04-25 09:48:41.622637181 +0200
@@ -108,7 +108,7 @@ AC_CHECK_HEADERS([sys/types.h stdlib.h s
#########
# Figure out whether or not we have these functions
#
-AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64])
+AC_CHECK_FUNCS([fdatasync gmtime_r isnan localtime_r localtime_s strchrnul usleep utime pread pread64 pwrite pwrite64])
#########
# By default, we use the amalgamation (this may be changed below...)
diff -up sqlite-src-3120200/configure.malloc_usable_size sqlite-src-3120200/configure
--- sqlite-src-3120200/configure.malloc_usable_size 2016-04-25 09:47:12.594679063 +0200
+++ sqlite-src-3120200/configure 2016-04-25 09:49:28.684615042 +0200
@@ -10275,7 +10275,7 @@ done
#########
# Figure out whether or not we have these functions
#
-for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
+for ac_func in fdatasync gmtime_r isnan localtime_r localtime_s strchrnul usleep utime pread pread64 pwrite pwrite64
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+105
View File
@@ -0,0 +1,105 @@
Index: src/expr.c
==================================================================
--- src/expr.c
+++ src/expr.c
@@ -2241,10 +2241,19 @@
}
default: break;
}
return rc;
}
+
+/*
+** Return true if p is a Column node that references a virtual table.
+*/
+int sqlite3ExprIsVtabRef(Expr *p){
+ if( p->op!=TK_COLUMN ) return 0;
+ if( p->y.pTab==0 ) return 0;
+ return IsVirtual(p->y.pTab);
+}
/*
** Return FALSE if there is no chance that the expression can be NULL.
**
** If the expression might be NULL or if the expression is too complex
@@ -5477,12 +5486,12 @@
testcase( pExpr->op==TK_NE );
testcase( pExpr->op==TK_LT );
testcase( pExpr->op==TK_LE );
testcase( pExpr->op==TK_GT );
testcase( pExpr->op==TK_GE );
- if( (pExpr->pLeft->op==TK_COLUMN && IsVirtual(pExpr->pLeft->y.pTab))
- || (pExpr->pRight->op==TK_COLUMN && IsVirtual(pExpr->pRight->y.pTab))
+ if( sqlite3ExprIsVtabRef(pExpr->pLeft)
+ || sqlite3ExprIsVtabRef(pExpr->pRight)
){
return WRC_Prune;
}
default:
Index: src/sqliteInt.h
==================================================================
--- src/sqliteInt.h
+++ src/sqliteInt.h
@@ -4276,10 +4276,11 @@
int sqlite3ExprIsTableConstant(Expr*,int);
#ifdef SQLITE_ENABLE_CURSOR_HINTS
int sqlite3ExprContainsSubquery(Expr*);
#endif
int sqlite3ExprIsInteger(Expr*, int*);
+int sqlite3ExprIsVtabRef(Expr*);
int sqlite3ExprCanBeNull(const Expr*);
int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
int sqlite3IsRowid(const char*);
void sqlite3GenerateRowDelete(
Parse*,Table*,Trigger*,int,int,int,i16,u8,u8,u8,int);
Index: src/whereexpr.c
==================================================================
--- src/whereexpr.c
+++ src/whereexpr.c
@@ -375,11 +375,11 @@
**
** vtab_column MATCH expression
** MATCH(expression,vtab_column)
*/
pCol = pList->a[1].pExpr;
- if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
+ if( sqlite3ExprIsVtabRef(pCol) ){
for(i=0; i<ArraySize(aOp); i++){
if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){
*peOp2 = aOp[i].eOp2;
*ppRight = pList->a[0].pExpr;
*ppLeft = pCol;
@@ -397,11 +397,11 @@
** Historically, xFindFunction expected to see lower-case function
** names. But for this use case, xFindFunction is expected to deal
** with function names in an arbitrary case.
*/
pCol = pList->a[0].pExpr;
- if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
+ if( sqlite3ExprIsVtabRef(pCol) ){
sqlite3_vtab *pVtab;
sqlite3_module *pMod;
void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**);
void *pNotUsed;
pVtab = sqlite3GetVTable(db, pCol->y.pTab)->pVtab;
@@ -420,14 +420,14 @@
}
}else if( pExpr->op==TK_NE || pExpr->op==TK_ISNOT || pExpr->op==TK_NOTNULL ){
int res = 0;
Expr *pLeft = pExpr->pLeft;
Expr *pRight = pExpr->pRight;
- if( pLeft->op==TK_COLUMN && IsVirtual(pLeft->y.pTab) ){
+ if( sqlite3ExprIsVtabRef(pLeft) ){
res++;
}
- if( pRight && pRight->op==TK_COLUMN && IsVirtual(pRight->y.pTab) ){
+ if( pRight && sqlite3ExprIsVtabRef(pRight) ){
res++;
SWAP(Expr*, pLeft, pRight);
}
*ppLeft = pLeft;
*ppRight = pRight;
+145
View File
@@ -0,0 +1,145 @@
Index: src/expr.c
==================================================================
--- src/expr.c
+++ src/expr.c
@@ -2242,19 +2242,10 @@
default: break;
}
return rc;
}
-/*
-** Return true if p is a Column node that references a virtual table.
-*/
-int sqlite3ExprIsVtabRef(Expr *p){
- if( p->op!=TK_COLUMN ) return 0;
- if( p->y.pTab==0 ) return 0;
- return IsVirtual(p->y.pTab);
-}
-
/*
** Return FALSE if there is no chance that the expression can be NULL.
**
** If the expression might be NULL or if the expression is too complex
** to tell return TRUE.
@@ -5479,23 +5470,29 @@
case TK_EQ:
case TK_NE:
case TK_LT:
case TK_LE:
case TK_GT:
- case TK_GE:
+ case TK_GE: {
+ Expr *pLeft = pExpr->pLeft;
+ Expr *pRight = pExpr->pRight;
testcase( pExpr->op==TK_EQ );
testcase( pExpr->op==TK_NE );
testcase( pExpr->op==TK_LT );
testcase( pExpr->op==TK_LE );
testcase( pExpr->op==TK_GT );
testcase( pExpr->op==TK_GE );
- if( sqlite3ExprIsVtabRef(pExpr->pLeft)
- || sqlite3ExprIsVtabRef(pExpr->pRight)
+ /* The y.pTab=0 assignment in wherecode.c always happens after the
+ ** impliesNotNullRow() test */
+ if( (pLeft->op==TK_COLUMN && ALWAYS(pLeft->y.pTab!=0)
+ && IsVirtual(pLeft->y.pTab))
+ || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0)
+ && IsVirtual(pRight->y.pTab))
){
- return WRC_Prune;
+ return WRC_Prune;
}
-
+ }
default:
return WRC_Continue;
}
}
Index: src/sqliteInt.h
==================================================================
--- src/sqliteInt.h
+++ src/sqliteInt.h
@@ -2151,12 +2151,15 @@
** done as a macro so that it will be optimized out when virtual
** table support is omitted from the build.
*/
#ifndef SQLITE_OMIT_VIRTUALTABLE
# define IsVirtual(X) ((X)->nModuleArg)
+# define ExprIsVtab(X) \
+ ((X)->op==TK_COLUMN && (X)->y.pTab!=0 && (X)->y.pTab->nModuleArg)
#else
# define IsVirtual(X) 0
+# define ExprIsVtab(X) 0
#endif
/*
** Macros to determine if a column is hidden. IsOrdinaryHiddenColumn()
** only works for non-virtual tables (ordinary tables and views) and is
@@ -4276,11 +4279,10 @@
int sqlite3ExprIsTableConstant(Expr*,int);
#ifdef SQLITE_ENABLE_CURSOR_HINTS
int sqlite3ExprContainsSubquery(Expr*);
#endif
int sqlite3ExprIsInteger(Expr*, int*);
-int sqlite3ExprIsVtabRef(Expr*);
int sqlite3ExprCanBeNull(const Expr*);
int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
int sqlite3IsRowid(const char*);
void sqlite3GenerateRowDelete(
Parse*,Table*,Trigger*,int,int,int,i16,u8,u8,u8,int);
Index: src/whereexpr.c
==================================================================
--- src/whereexpr.c
+++ src/whereexpr.c
@@ -375,11 +375,12 @@
**
** vtab_column MATCH expression
** MATCH(expression,vtab_column)
*/
pCol = pList->a[1].pExpr;
- if( sqlite3ExprIsVtabRef(pCol) ){
+ testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
+ if( ExprIsVtab(pCol) ){
for(i=0; i<ArraySize(aOp); i++){
if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){
*peOp2 = aOp[i].eOp2;
*ppRight = pList->a[0].pExpr;
*ppLeft = pCol;
@@ -397,11 +398,12 @@
** Historically, xFindFunction expected to see lower-case function
** names. But for this use case, xFindFunction is expected to deal
** with function names in an arbitrary case.
*/
pCol = pList->a[0].pExpr;
- if( sqlite3ExprIsVtabRef(pCol) ){
+ testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 );
+ if( ExprIsVtab(pCol) ){
sqlite3_vtab *pVtab;
sqlite3_module *pMod;
void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**);
void *pNotUsed;
pVtab = sqlite3GetVTable(db, pCol->y.pTab)->pVtab;
@@ -420,14 +422,16 @@
}
}else if( pExpr->op==TK_NE || pExpr->op==TK_ISNOT || pExpr->op==TK_NOTNULL ){
int res = 0;
Expr *pLeft = pExpr->pLeft;
Expr *pRight = pExpr->pRight;
- if( sqlite3ExprIsVtabRef(pLeft) ){
+ testcase( pLeft->op==TK_COLUMN && pLeft->y.pTab==0 );
+ if( ExprIsVtab(pLeft) ){
res++;
}
- if( pRight && sqlite3ExprIsVtabRef(pRight) ){
+ testcase( pRight && pRight->op==TK_COLUMN && pRight->y.pTab==0 );
+ if( pRight && ExprIsVtab(pRight) ){
res++;
SWAP(Expr*, pLeft, pRight);
}
*ppLeft = pLeft;
*ppRight = pRight;
+50
View File
@@ -0,0 +1,50 @@
From 156cc9423d4c4bade28468b2232226e2cd61aa6c Mon Sep 17 00:00:00 2001
From: shenkai8 <shenkai8@huawei.com>
Date: Thu, 16 Apr 2020 17:04:17 +0000
Subject: [PATCH] backport-Fix-CVE-2020-11655
In the event of a semantic error in an aggregate query,
early-out the resetAccumulator() function to prevent
problems due to incomplete or incorrect initialization
of the AggInfo object. Fix for ticket [af4556bb5c285c08].
Signed-off-by: drh <drh@noemail.net>
---
src/select.c | 1 +
test/window1.test | 9 +++++++++
2 files changed, 10 insertions(+)
diff --git a/src/select.c b/src/select.c
index 595b6eb..b5e5a75 100644
--- a/src/select.c
+++ b/src/select.c
@@ -5352,6 +5352,7 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
struct AggInfo_func *pFunc;
int nReg = pAggInfo->nFunc + pAggInfo->nColumn;
if( nReg==0 ) return;
+ if( pParse->nErr ) return;
#ifdef SQLITE_DEBUG
/* Verify that all AggInfo registers are within the range specified by
** AggInfo.mnReg..AggInfo.mxReg */
diff --git a/test/window1.test b/test/window1.test
index 833e211..18b9bdc 100644
--- a/test/window1.test
+++ b/test/window1.test
@@ -1593,5 +1593,14 @@ do_execsql_test 48.1 {
FROM (SELECT (SELECT sum(a) FROM t1 GROUP BY a) AS x FROM t1);
} {2 2 2}
+# 2020-04-03 ticket af4556bb5c285c08
+#
+reset_db
+do_catchsql_test 51.1 {
+ CREATE TABLE a(b, c);
+ SELECT c FROM a GROUP BY c
+ HAVING(SELECT(sum(b) OVER(ORDER BY b),
+ sum(b) OVER(PARTITION BY min(DISTINCT c), c ORDER BY b)));
+} {1 {row value misused}}
finish_test
--
1.8.3.1
+118
View File
@@ -0,0 +1,118 @@
From 9b063329ebbd9aafdad82ebf0b9103ce2dd1af18 Mon Sep 17 00:00:00 2001
From: shenkai8 <shenkai8@huawei.com>
Date: Thu, 16 Apr 2020 17:22:49 +0000
Subject: [PATCH] backport Fix CVE-2020-11656
Fix a case when a pointer might be used after being freed in
the ALTER TABLE code. Fix for [4722bdab08cb1].
(check-in: d09f8c36 user: dan tags: trunk)
Do not suppress errors when resolving references in an ORDER BY
clause belonging to a compound SELECT within a view or trigger
within ALTER TABLE. Fix for ticket [a10a14e9b4ba2].
(check-in: 68429388 user: dan tags: trunk)
Signed-off-by: dan <<dan@noemail.net>>
---
src/alter.c | 16 ++++++++++++++++
src/resolve.c | 2 +-
test/altertab.test | 31 ++++++++++++++++++++++++++++++-
3 files changed, 47 insertions(+), 2 deletions(-)
diff --git a/src/alter.c b/src/alter.c
index ee193d1..918df77 100644
--- a/src/alter.c
+++ b/src/alter.c
@@ -756,6 +756,21 @@ static void renameWalkWith(Walker *pWalker, Select *pSelect){
}
/*
+** Unmap all tokens in the IdList object passed as the second argument.
+*/
+static void unmapColumnIdlistNames(
+ Parse *pParse,
+ IdList *pIdList
+){
+ if( pIdList ){
+ int ii;
+ for(ii=0; ii<pIdList->nId; ii++){
+ sqlite3RenameTokenRemap(pParse, 0, (void*)pIdList->a[ii].zName);
+ }
+ }
+}
+
+/*
** Walker callback used by sqlite3RenameExprUnmap().
*/
static int renameUnmapSelectCb(Walker *pWalker, Select *p){
@@ -776,6 +791,7 @@ static int renameUnmapSelectCb(Walker *pWalker, Select *p){
for(i=0; i<pSrc->nSrc; i++){
sqlite3RenameTokenRemap(pParse, 0, (void*)pSrc->a[i].zName);
if( sqlite3WalkExpr(pWalker, pSrc->a[i].pOn) ) return WRC_Abort;
+ unmapColumnIdlistNames(pParse, pSrc->a[i].pUsing);
}
}
diff --git a/src/resolve.c b/src/resolve.c
index 119a07f..894958c 100644
--- a/src/resolve.c
+++ b/src/resolve.c
@@ -1177,7 +1177,7 @@ static int resolveOrderByTermToExprList(
nc.nErr = 0;
db = pParse->db;
savedSuppErr = db->suppressErr;
- db->suppressErr = 1;
+ if( IN_RENAME_OBJECT==0 ) db->suppressErr = 1;
rc = sqlite3ResolveExprNames(&nc, pE);
db->suppressErr = savedSuppErr;
if( rc ) return 0;
diff --git a/test/altertab.test b/test/altertab.test
index 7dcf8a5..01dd61a 100644
--- a/test/altertab.test
+++ b/test/altertab.test
@@ -594,7 +594,6 @@ reset_db
do_execsql_test 18.1.0 {
CREATE TABLE t0 (c0 INTEGER, PRIMARY KEY(c0)) WITHOUT ROWID;
}
-breakpoint
do_execsql_test 18.1.1 {
ALTER TABLE t0 RENAME COLUMN c0 TO c1;
}
@@ -613,4 +612,34 @@ do_execsql_test 18.2.2 {
SELECT sql FROM sqlite_master;
} {{CREATE TABLE t0 (c1 INTEGER, PRIMARY KEY(c1))}}
+# Ticket 4722bdab08cb14
+reset_db
+do_execsql_test 20.0 {
+ CREATE TABLE a(a);
+ CREATE VIEW b AS SELECT(SELECT *FROM c JOIN a USING(d, a, a, a) JOIN a) IN();
+}
+
+do_execsql_test 20.1 {
+ ALTER TABLE a RENAME a TO e;
+} {}
+
+reset_db
+do_execsql_test 21.0 {
+ CREATE TABLE a(b);
+ CREATE VIEW c AS
+ SELECT NULL INTERSECT
+ SELECT NULL ORDER BY
+ likelihood(NULL, (d, (SELECT c)));
+} {}
+do_catchsql_test 21.1 {
+ SELECT likelihood(NULL, (d, (SELECT c)));
+} {1 {second argument to likelihood() must be a constant between 0.0 and 1.0}}
+do_catchsql_test 21.2 {
+ SELECT * FROM c;
+} {1 {1st ORDER BY term does not match any column in the result set}}
+
+do_catchsql_test 21.3 {
+ ALTER TABLE a RENAME TO e;
+} {1 {error in view c: 1st ORDER BY term does not match any column in the result set}}
+
finish_test
--
1.8.3.1
-11
View File
@@ -1,11 +0,0 @@
--- a/tool/buildtclext.tcl 2024-11-18 14:01:05.040080030 +0800
+++ b/tool/buildtclext.tcl 2024-11-18 14:01:27.998394871 +0800
@@ -300,7 +300,7 @@
# Generate and execute the command with which to do the compilation.
#
- set cmd "$CMD -DUSE_TCL_STUBS tclsqlite3.c -o $OUT $LIBS"
+ set cmd "$CMD -DUSE_TCL_STUBS tclsqlite3.c -o $OUT $LIBS -lm"
puts $cmd
file delete -force $OUT
catch {exec {*}$cmd} errmsg
Binary file not shown.
Binary file not shown.
-3
View File
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bdbd4e47d52c64c7acc332d1294aa67ad6251ef370abeb0b086ee0cbec91186d
size 11390337
Binary file not shown.
-3
View File
@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:119862654b36e252ac5f8add2b3d41ba03f4f387b48eb024956c36ea91012d3f
size 14393097
+68 -146
View File
@@ -1,30 +1,40 @@
%bcond_without check
%global extver 3310100
%global tcl_version 8.6
%global tcl_sitearch %{_libdir}/tcl%{tcl_version}
%global year 2020
Name: sqlite
Version: 3.50.3
%global extver %(echo %{version} |awk -F. '{printf "%d%02d%02d00", $1,$2,$3}')
Release: 1
Version: 3.31.1
Release: 0
Summary: Embeded SQL database
License: Public Domain
URL: https://www.sqlite.org/
URL: http://www.sqlite.org/
Source0: https://www.sqlite.org/2025/sqlite-src-%{extver}.zip
Source1: https://www.sqlite.org/2025/sqlite-doc-%{extver}.zip
Patch0: sqlite-3.48.0-buildtclext.patch
Source0: http://www.sqlite.org/%{year}/sqlite-src-%{extver}.zip
Source1: http://www.sqlite.org/%{year}/sqlite-doc-%{extver}.zip
Source2: https://www.sqlite.org/%{year}/sqlite-autoconf-%{extver}.tar.gz
BuildRequires: gcc tcl tcl-devel
Patch0000: 0000-sqlite-no-malloc-usable-size.patch
Patch6000: 6000-0001-Fix-CVE-2020-9327.patch
Patch6001: 6001-0002-Fix-CVE-2020-9327.patch
Patch6002: 6002-Fix-CVE-2020-11655.patch
Patch6003: 6003-Fix-CVE-2020-11656.patch
BuildRequires: gcc autoconf tcl tcl-devel
BuildRequires: ncurses-devel readline-devel glibc-devel
BuildRequires: chrpath
BuildRequires: rpm_macro(tcl_sitearch)
Provides: %{name}-libs = %{version}-%{release}
Obsoletes: %{name}-libs < %{version}-%{release}
Provides: lemon = %{version}-%{release}
Obsoletes: lemon < %{version}-%{release}
Provides: %{name}-analyzer = %{version}-%{release}
Obsoletes: %{name}-analyzer < %{version}-%{release}
Provides: %{name}-tcl = %{version}-%{release}
Obsoletes: %{name}-tcl < %{version}-%{release}
Provides: %{name}-libs
Obsoletes: %{name}-libs
Provides: lemon
Obsoletes: lemon
Provides: %{name}-analyzer
Obsoletes: %{name}-analyzer
Provides: %{name}-tcl
Obsoletes: %{name}-tcl
%description
SQLite is a C-language library that implements a small, fast, self-contained,
@@ -36,6 +46,7 @@ use every day.It also include lemon and sqlite3_analyzer and tcl tools.
%package devel
Summary: Including header files and library for the developing of sqlite
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
%description devel
This contains dynamic libraries and header files for the developing of sqlite.
@@ -43,8 +54,8 @@ This contains dynamic libraries and header files for the developing of sqlite.
%package help
Summary: Man file and documentation for sqlite
BuildArch: noarch
Provides: %{name}-doc = %{version}-%{release}
Obsoletes: %{name}-doc < %{version}-%{release}
Provides: %{name}-doc
Obsoletes: %{name}-doc
%description help
This contains man files and HTML files for the using of sqlite.
@@ -53,10 +64,16 @@ This contains man files and HTML files for the using of sqlite.
%prep
#autosetup will fail because of 2 zip files
%setup -q -a1 -n %{name}-src-%{extver}
%autopatch -p1
%patch0000 -p1
%patch6000 -p0
%patch6001 -p0
%patch6002 -p1
%patch6003 -p1
rm -f %{name}-doc-%{extver}/sqlite.css~ || :
autoconf
%build
export CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 \
@@ -64,53 +81,55 @@ export CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 \
-DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_JSON1=1 \
-Wall -fno-strict-aliasing"
export CC=%{__cc}
%configure --fts5 \
%configure --enable-fts5 \
--enable-threadsafe \
--enable-threads-override-locks \
--enable-load-extension \
--disable-static \
--soname=legacy \
TCLLIBDIR=%{tcl_sitearch}/sqlite3
# rpath removal
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
%make_build
%make_build sqlite3_analyzer
%install
mkdir -p %{buildroot}/%{tcl_sitearch}/sqlite3
%make_install TCLLIBDIR=%{tcl_sitearch}/sqlite3
%delete_la
make DESTDIR=${RPM_BUILD_ROOT} install
install -D -m 755 lemon %{buildroot}%{_bindir}/lemon
install -D -m 644 tool/lempar.c %{buildroot}%{_datadir}/lemon/lempar.c
install -D -m 644 sqlite3.1 %{buildroot}%{_mandir}/man1/sqlite3.1
install -D -m 755 sqlite3_analyzer %{buildroot}%{_bindir}/sqlite3_analyzer
chmod 755 %{buildroot}/%{tcl_sitearch}/sqlite3/*.so
chrpath --delete $RPM_BUILD_ROOT/%{tcl_sitearch}/sqlite3/*.so
%if %{with check}
%check
export LD_LIBRARY_PATH=`pwd`/.libs
export MALLOC_CHECK_=3
#bypass zipfile.test
rm test/zipfile.test
%ifarch x86_64 %{ix86}
%else
rm test/csv01.test
%endif
%ifarch loongarch64
rm -rf test/thread1.test
rm -rf test/thread2.test
%endif
%make_build test
make test
%endif # with check
%ldconfig_scriptlets
%files
%doc README.md
%{_bindir}/{sqlite3,lemon,sqlite3_analyzer}
%{_libdir}/*.so.*
%{_datadir}/lemon
%{tcl_sitearch}/sqlite3
%exclude %{_libdir}/*.{la,a}
%files devel
%{_includedir}/*.h
@@ -122,126 +141,29 @@ rm -rf test/thread2.test
%{_mandir}/man*/*
%changelog
* Thu Jul 17 2025 Funda Wang <fundawang@yeah.net> - 3.50.3-1
- update to 3.50.3
* Sun Jun 29 2025 Funda Wang <fundawang@yeah.net> - 3.50.2-1
- update to 3.50.2
* Sat Jun 07 2025 Funda Wang <fundawang@yeah.net> - 3.50.1-1
- update to 3.50.1
* Fri May 30 2025 Funda Wang <fundawang@yeah.net> - 3.50.0-1
- update to 3.50.0
* Wed May 07 2025 Funda Wang <fundawang@yeah.net> - 3.49.2-1
- update to 3.49.2
* Mon Mar 10 2025 Funda Wang <fundawang@yeah.net> - 3.49.1-2
- remove rpath for tcl binding
* Wed Feb 19 2025 Funda Wang <fundawang@yeah.net> - 3.49.1-1
- update to 3.49.1
* Thu Feb 06 2025 Funda Wang <fundawang@yeah.net> - 3.49.0-1
- update to 3.49.0
* Sun Jan 19 2025 Funda Wang <fundawang@yeah.net> - 3.48.0-2
- set legacy soname, otherwise it changes too much
(see `./configure --help`)
* Tue Jan 14 2025 Funda Wang <fundawang@yeah.net> - 3.48.0-1
- update to 3.48.0
* Sun Dec 08 2024 Funda Wang <fundawang@yeah.net> - 3.47.2-1
- update to 3.47.2
* Tue Nov 26 2024 Funda Wang <fundawang@yeah.net> - 3.47.1-1
- update to 3.47.1
* Tue Oct 22 2024 Funda Wang <fundawang@yeah.net> - 3.47.0-1
- update to 3.47.0
* Tue Aug 13 2024 Funda Wang <fundawang@yeah.net> - 3.46.1-1
- update to 3.46.1
* Tue Feb 27 2024 Zheng Zhenyu <zheng.zhenyu@outlook.com> - 3.42.0-1
- Bump version to fix CVE-2024-0232
* Wed Jan 3 2024 mazhao <mazhao12@huawei.com> - 3.37.2-7
- fix the CVE-2023-7104
* Mon Aug 7 2023 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-6
- fix the CVE-2023-36191
* Fri Jan 13 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 3.37.2-5
- remove fail testcase for loongarch
* Wed Dec 14 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-4
- fix the CVE-2022-46908
* Wed Sep 14 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-3
- fix build problem
* Mon Sep 5 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-2
- fix integer overflow on gigabyte string
* Mon Aug 29 2022 zhuwentao <zhuwentao5@huawei.com> - 3.37.2-1
- update to 3.37.2
* Tue Aug 16 2022 liusirui <liusirui@huawei.com> - 3.36.0-3
- fix the CVE-2022-35737.
* Sat Nov 27 2021 wbq_sky <wangbingquan@huawei.com> - 3.36.0-2
- fix the CVE-2021-36690.
* Fri Nov 25 2021 wbq_sky <wangbingquan@huawei.com> - 3.36.0-1
- update to 3.36.0.
* Fri Sep 26 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-4
- fix the uninitialized value used in pattern match.
* Fri Sep 3 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-3
- fix the null reference in the tigger statement.
* Fri Sep 3 2021 wbq_sky <wangbingquan@huawei.com> - 3.34.0-2
- fix the infinite loop problem in the trim function while the pattern is well formed.
* Thu Jan 14 2021 yanglongkang <yanglongkang@huawei.com> - 3.34.0-1
- update package to 3.34.0
* Thu Sep 3 2020 lihaotian<lihaotian9@huawei.com> - 3.32.3-3
- update source0 url
* Tue Jul 21 2020 jixinjie <jixinjie@huawei.com> - 3.32.3-2
- update yaml file
* Tue Jul 21 2020 jixinjie <jixinjie@huawei.com> - 3.32.3-1
- update package to 3.32.3
* Tue Jun 30 2020 volcanodragon <linfeilong@huawei.com> - 3.24.0-12
* Fri Apr 17 2020 luoshijie <luoshijie1@huawei.com> - 3.31.1-0
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:rename patches
- SUG:restart
- DESC:update sqlite to 3.31.1.
* Tue Jun 23 2020 yanglongkang <yanglongkang@huawei.com> - 3.24.0-11
* Tue Mar 10 2020 guiyao <guiyao@huawei.com> - 3.24.0-11
- Type:cves
- ID:CVE-2020-13434 CVE-2020-13435 CVE-2020-13630 CVE-2020-13632
- SUG:NA
- DESC:fix CVE-2020-13434 CVE-2020-13435 CVE-2020-13630 CVE-2020-13632
- ID:CVE-2020-9327
- SUG: NA
- DESC: fix cve
* Sun Apr 19 2020 ethan848 <mingfangsen@huawei.com>
* Fri Feb 28 2020 sunshihao <sunshihao@huawei.com> - 3.24.0-10
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:CVE-2020-11655 fixed
- ID:
- SUG: NA
- DESC: remove suffix information
* Tue Mar 10 2020 steven <steven_ygui@163.com> - 3.24.0-9
- Type:enhancement
- ID:NA
* Wed Feb 26 2020 guiyao <guiyao@huawei.com> - 3.24.0-9
- Type:cves
- ID:CVE-2018-20505
- SUG:NA
- DESC:CVE-2018-20505, CVE-2020-9327 fixed
- DESC:fix cves
* Wed Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 3.24.0-8
- Type:enhancement
-4
View File
@@ -1,4 +0,0 @@
version_control: fossil
src_repo: https://www.sqlite.org/src
tag_prefix: "version-"
seperator: "."