- Changes done as per 3.0 branch
Change-Id: I115373f750eacb0121ba6d661a787be95ece1e56
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/10125
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
| ... | ... |
@@ -1,22 +1,23 @@ |
| 1 | 1 |
%define perl_vendorarchdir %(test %{_host} == %{_build} && echo %{perl_vendorarch} || echo %{perl_vendorarch} | sed 's/x86_64-linux-thread-multi/%{_arch}-linux/')
|
| 2 | 2 |
|
| 3 |
-# Got the intial spec from Fedora and modified it |
|
| 4 | 3 |
Summary: SQLite DBI Driver |
| 5 | 4 |
Name: perl-DBD-SQLite |
| 6 |
-Version: 1.62 |
|
| 7 |
-Release: 2%{?dist}
|
|
| 5 |
+Version: 1.64 |
|
| 6 |
+Release: 1%{?dist}
|
|
| 8 | 7 |
Group: Development/Libraries |
| 9 | 8 |
License: (GPL+ or Artistic) and Public Domain |
| 10 | 9 |
URL: http://search.cpan.org/dist/DBD-SQLite/ |
| 11 | 10 |
Source0: https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/DBD-SQLite-%{version}.tar.gz
|
| 12 |
-%define sha1 DBD-SQLite=e4fb2fca987e92f5949fb5a50990bc963f8fe164 |
|
| 11 |
+%define sha1 DBD-SQLite=ab3dc0e88e75f5db0be79656a515b4bb7804997c |
|
| 13 | 12 |
Vendor: VMware, Inc. |
| 14 | 13 |
Distribution: Photon |
| 14 |
+Patch0: use-system-sqlite.patch |
|
| 15 | 15 |
BuildRequires: sqlite-devel >= 3.22.0 |
| 16 | 16 |
BuildRequires: perl >= 5.28.0 |
| 17 | 17 |
BuildRequires: perl-DBI |
| 18 | 18 |
Requires: perl-DBI |
| 19 | 19 |
Requires: perl >= 5.28.0 |
| 20 |
+Requires: sqlite-libs >= 3.31.1 |
|
| 20 | 21 |
|
| 21 | 22 |
%description |
| 22 | 23 |
SQLite is a public domain RDBMS database engine that you can find at |
| ... | ... |
@@ -27,6 +28,8 @@ libraries. |
| 27 | 27 |
|
| 28 | 28 |
%prep |
| 29 | 29 |
%setup -q -n DBD-SQLite-%{version}
|
| 30 |
+%patch0 -p1 |
|
| 31 |
+rm sqlite* |
|
| 30 | 32 |
|
| 31 | 33 |
%build |
| 32 | 34 |
CFLAGS="%{optflags}" perl Makefile.PL INSTALLDIRS=vendor AR=%{_host}-ar CC=%{_host}-gcc LD=%{_host}-gcc OPTIMIZE="%{optflags}"
|
| ... | ... |
@@ -52,6 +55,8 @@ make test |
| 52 | 52 |
%{_mandir}/man3/*
|
| 53 | 53 |
|
| 54 | 54 |
%changelog |
| 55 |
+* Thu May 14 2020 Ankit Jain <ankitja@vmware.com> 1.64-1 |
|
| 56 |
+- Updated to 1.64, Use system sqlite instead of bundled one |
|
| 55 | 57 |
* Wed Jul 03 2019 Alexey Makhalov <amakhalov@vmware.com> 1.62-2 |
| 56 | 58 |
- Cross compilation support |
| 57 | 59 |
* Tue Jan 22 2019 Michelle Wang <michellew@vmware.com> 1.62-1 |
| 58 | 60 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,22 @@ |
| 0 |
+From d5d5e3c8baeef0c7897b1af3b03b338ae70ab5d8 Mon Sep 17 00:00:00 2001 |
|
| 1 |
+From: Ankit Jain <ankitja@vmware.com> |
|
| 2 |
+Date: Thu, 14 May 2020 12:29:22 +0000 |
|
| 3 |
+Subject: [PATCH] Use system sqlite instead of bundled one |
|
| 4 |
+ |
|
| 5 |
+--- |
|
| 6 |
+ Makefile.PL | 2 +- |
|
| 7 |
+ 1 file changed, 1 insertion(+), 1 deletion(-) |
|
| 8 |
+ |
|
| 9 |
+diff --git a/Makefile.PL b/Makefile.PL |
|
| 10 |
+index 5c832af..5f308ab 100644 |
|
| 11 |
+--- a/Makefile.PL |
|
| 12 |
+@@ -129,7 +129,7 @@ SCOPE: {
|
|
| 13 |
+ # a system sqlite is also sophisticated enough to have a patching system |
|
| 14 |
+ # that can change the if ( 0 ) to if ( 1 ) |
|
| 15 |
+ my ($sqlite_local, $sqlite_base, $sqlite_lib, $sqlite_inc); |
|
| 16 |
+-if ( 0 ) {
|
|
| 17 |
++if ( 1 ) {
|
|
| 18 |
+ require File::Spec; |
|
| 19 |
+ if ( $sqlite_base = (grep(/SQLITE_LOCATION=.*/, @ARGV))[0] ) {
|
|
| 20 |
+ $sqlite_base =~ /=(.*)/; |
| 0 | 21 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,79 @@ |
| 0 |
+From 4db7ab53f9c30e2e22731ace93ab6b18eef6c4ae Mon Sep 17 00:00:00 2001 |
|
| 1 |
+From: dan <dan@noemail.net> |
|
| 2 |
+Date: Fri, 3 Apr 2020 11:52:59 +0000 |
|
| 3 |
+Subject: [PATCH] Do not suppress errors when resolving references in an ORDER |
|
| 4 |
+ BY clause belonging to a compound SELECT within a view or trigger within |
|
| 5 |
+ ALTER TABLE. Fix for ticket [a10a14e9b4ba2]. |
|
| 6 |
+ |
|
| 7 |
+FossilOrigin-Name: 684293882c302600e112cf52553c19d84fdb31663d96e5dd7f8ac17dda00a026 |
|
| 8 |
+ |
|
| 9 |
+From c415d91007e1680e4eb17def583b202c3c83c718 Mon Sep 17 00:00:00 2001 |
|
| 10 |
+From: drh <drh@noemail.net> |
|
| 11 |
+Date: Fri, 3 Apr 2020 13:19:03 +0000 |
|
| 12 |
+Subject: [PATCH] In the event of a semantic error in an aggregate query, |
|
| 13 |
+ early-out the resetAccumulator() function to prevent problems due to |
|
| 14 |
+ incomplete or incorrect initialization of the AggInfo object. Fix for ticket |
|
| 15 |
+ [af4556bb5c285c08]. |
|
| 16 |
+ |
|
| 17 |
+From fb99e388ec7f30fe43e4878236e3695ff24ae58d Mon Sep 17 00:00:00 2001 |
|
| 18 |
+From: dan <dan@noemail.net> |
|
| 19 |
+Date: Fri, 3 Apr 2020 11:20:40 +0000 |
|
| 20 |
+Subject: [PATCH] Fix a case when a pointer might be used after being freed in |
|
| 21 |
+ the ALTER TABLE code. Fix for [4722bdab08cb1]. |
|
| 22 |
+ |
|
| 23 |
+FossilOrigin-Name: d09f8c3621d5f7f8c6d99d7d82bcaa8421855b3f470bea2b26c858106382b906 |
|
| 24 |
+ |
|
| 25 |
+Upstream Patch Source: https://www3.sqlite.org/cgi/src/info/b64674919f673602 |
|
| 26 |
+Upstream Patch Source: https://www.sqlite.org/src/info/d09f8c3621d5f7f8 |
|
| 27 |
+ |
|
| 28 |
+diff --git a/sqlite3.c b/sqlite3.c |
|
| 29 |
+index 55dc686..82eb682 100644 |
|
| 30 |
+--- a/sqlite3.c |
|
| 31 |
+@@ -97942,7 +97942,7 @@ static int resolveOrderByTermToExprList( |
|
| 32 |
+ nc.nErr = 0; |
|
| 33 |
+ db = pParse->db; |
|
| 34 |
+ savedSuppErr = db->suppressErr; |
|
| 35 |
+- db->suppressErr = 1; |
|
| 36 |
++ if( IN_RENAME_OBJECT==0 ) db->suppressErr = 1; |
|
| 37 |
+ rc = sqlite3ResolveExprNames(&nc, pE); |
|
| 38 |
+ db->suppressErr = savedSuppErr; |
|
| 39 |
+ if( rc ) return 0; |
|
| 40 |
+@@ -105374,6 +105374,21 @@ static void renameWalkWith(Walker *pWalker, Select *pSelect){
|
|
| 41 |
+ } |
|
| 42 |
+ } |
|
| 43 |
+ |
|
| 44 |
++/* |
|
| 45 |
++** Unmap all tokens in the IdList object passed as the second argument. |
|
| 46 |
++*/ |
|
| 47 |
++static void unmapColumnIdlistNames( |
|
| 48 |
++ Parse *pParse, |
|
| 49 |
++ IdList *pIdList |
|
| 50 |
++){
|
|
| 51 |
++ if( pIdList ){
|
|
| 52 |
++ int ii; |
|
| 53 |
++ for(ii=0; ii<pIdList->nId; ii++){
|
|
| 54 |
++ sqlite3RenameTokenRemap(pParse, 0, (void*)pIdList->a[ii].zName); |
|
| 55 |
++ } |
|
| 56 |
++ } |
|
| 57 |
++} |
|
| 58 |
++ |
|
| 59 |
+ /* |
|
| 60 |
+ ** Walker callback used by sqlite3RenameExprUnmap(). |
|
| 61 |
+ */ |
|
| 62 |
+@@ -105395,6 +105410,7 @@ static int renameUnmapSelectCb(Walker *pWalker, Select *p){
|
|
| 63 |
+ for(i=0; i<pSrc->nSrc; i++){
|
|
| 64 |
+ sqlite3RenameTokenRemap(pParse, 0, (void*)pSrc->a[i].zName); |
|
| 65 |
+ if( sqlite3WalkExpr(pWalker, pSrc->a[i].pOn) ) return WRC_Abort; |
|
| 66 |
++ unmapColumnIdlistNames(pParse, pSrc->a[i].pUsing); |
|
| 67 |
+ } |
|
| 68 |
+ } |
|
| 69 |
+ |
|
| 70 |
+@@ -133217,6 +133233,7 @@ static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
|
|
| 71 |
+ struct AggInfo_func *pFunc; |
|
| 72 |
+ int nReg = pAggInfo->nFunc + pAggInfo->nColumn; |
|
| 73 |
+ if( nReg==0 ) return; |
|
| 74 |
++ if( pParse->nErr ) return; |
|
| 75 |
+ #ifdef SQLITE_DEBUG |
|
| 76 |
+ /* Verify that all AggInfo registers are within the range specified by |
|
| 77 |
+ ** AggInfo.mnReg..AggInfo.mxReg */ |
| 0 | 78 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,81 @@ |
| 0 |
+diff -ru a/sqlite3.c b/sqlite3.c |
|
| 1 |
+--- a/sqlite3.c 2020-04-15 19:13:56.869715394 +0000 |
|
| 2 |
+@@ -17428,8 +17428,11 @@ |
|
| 3 |
+ */ |
|
| 4 |
+ #ifndef SQLITE_OMIT_VIRTUALTABLE |
|
| 5 |
+ # define IsVirtual(X) ((X)->nModuleArg) |
|
| 6 |
++# define ExprIsVtab(X) \ |
|
| 7 |
++ ((X)->op==TK_COLUMN && (X)->y.pTab!=0 && (X)->y.pTab->nModuleArg) |
|
| 8 |
+ #else |
|
| 9 |
+ # define IsVirtual(X) 0 |
|
| 10 |
++# define ExprIsVtab(X) 0 |
|
| 11 |
+ #endif |
|
| 12 |
+ |
|
| 13 |
+ /* |
|
| 14 |
+@@ -104133,19 +104136,25 @@ |
|
| 15 |
+ case TK_LT: |
|
| 16 |
+ case TK_LE: |
|
| 17 |
+ case TK_GT: |
|
| 18 |
+- case TK_GE: |
|
| 19 |
++ case TK_GE: {
|
|
| 20 |
++ Expr *pLeft = pExpr->pLeft; |
|
| 21 |
++ Expr *pRight = pExpr->pRight; |
|
| 22 |
+ testcase( pExpr->op==TK_EQ ); |
|
| 23 |
+ testcase( pExpr->op==TK_NE ); |
|
| 24 |
+ testcase( pExpr->op==TK_LT ); |
|
| 25 |
+ testcase( pExpr->op==TK_LE ); |
|
| 26 |
+ testcase( pExpr->op==TK_GT ); |
|
| 27 |
+ testcase( pExpr->op==TK_GE ); |
|
| 28 |
+- if( (pExpr->pLeft->op==TK_COLUMN && IsVirtual(pExpr->pLeft->y.pTab)) |
|
| 29 |
+- || (pExpr->pRight->op==TK_COLUMN && IsVirtual(pExpr->pRight->y.pTab)) |
|
| 30 |
++ /* The y.pTab=0 assignment in wherecode.c always happens after the |
|
| 31 |
++ ** impliesNotNullRow() test */ |
|
| 32 |
++ if( (pLeft->op==TK_COLUMN && ALWAYS(pLeft->y.pTab!=0) |
|
| 33 |
++ && IsVirtual(pLeft->y.pTab)) |
|
| 34 |
++ || (pRight->op==TK_COLUMN && ALWAYS(pRight->y.pTab!=0) |
|
| 35 |
++ && IsVirtual(pRight->y.pTab)) |
|
| 36 |
+ ){
|
|
| 37 |
+- return WRC_Prune; |
|
| 38 |
++ return WRC_Prune; |
|
| 39 |
+ } |
|
| 40 |
+- |
|
| 41 |
++ } |
|
| 42 |
+ default: |
|
| 43 |
+ return WRC_Continue; |
|
| 44 |
+ } |
|
| 45 |
+@@ -142591,7 +142600,8 @@ |
|
| 46 |
+ ** MATCH(expression,vtab_column) |
|
| 47 |
+ */ |
|
| 48 |
+ pCol = pList->a[1].pExpr; |
|
| 49 |
+- if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
|
|
| 50 |
++ testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 ); |
|
| 51 |
++ if( ExprIsVtab(pCol) ){
|
|
| 52 |
+ for(i=0; i<ArraySize(aOp); i++){
|
|
| 53 |
+ if( sqlite3StrICmp(pExpr->u.zToken, aOp[i].zOp)==0 ){
|
|
| 54 |
+ *peOp2 = aOp[i].eOp2; |
|
| 55 |
+@@ -142613,7 +142623,8 @@ |
|
| 56 |
+ ** with function names in an arbitrary case. |
|
| 57 |
+ */ |
|
| 58 |
+ pCol = pList->a[0].pExpr; |
|
| 59 |
+- if( pCol->op==TK_COLUMN && IsVirtual(pCol->y.pTab) ){
|
|
| 60 |
++ testcase( pCol->op==TK_COLUMN && pCol->y.pTab==0 ); |
|
| 61 |
++ if( ExprIsVtab(pCol) ){
|
|
| 62 |
+ sqlite3_vtab *pVtab; |
|
| 63 |
+ sqlite3_module *pMod; |
|
| 64 |
+ void (*xNotUsed)(sqlite3_context*,int,sqlite3_value**); |
|
| 65 |
+@@ -142636,10 +142647,12 @@ |
|
| 66 |
+ int res = 0; |
|
| 67 |
+ Expr *pLeft = pExpr->pLeft; |
|
| 68 |
+ Expr *pRight = pExpr->pRight; |
|
| 69 |
+- if( pLeft->op==TK_COLUMN && IsVirtual(pLeft->y.pTab) ){
|
|
| 70 |
++ testcase( pLeft->op==TK_COLUMN && pLeft->y.pTab==0 ); |
|
| 71 |
++ if( ExprIsVtab(pLeft) ){
|
|
| 72 |
+ res++; |
|
| 73 |
+ } |
|
| 74 |
+- if( pRight && pRight->op==TK_COLUMN && IsVirtual(pRight->y.pTab) ){
|
|
| 75 |
++ testcase( pRight && pRight->op==TK_COLUMN && pRight->y.pTab==0 ); |
|
| 76 |
++ if( pRight && ExprIsVtab(pRight) ){
|
|
| 77 |
+ res++; |
|
| 78 |
+ SWAP(Expr*, pLeft, pRight); |
|
| 79 |
+ } |
| ... | ... |
@@ -1,16 +1,19 @@ |
| 1 |
-%define sourcever 3260000 |
|
| 1 |
+%define sourcever 3310100 |
|
| 2 | 2 |
Summary: A portable, high level programming interface to various calling conventions |
| 3 | 3 |
Name: sqlite |
| 4 |
-Version: 3.26.0 |
|
| 4 |
+Version: 3.31.1 |
|
| 5 | 5 |
Release: 1%{?dist}
|
| 6 | 6 |
License: Public Domain |
| 7 | 7 |
URL: http://www.sqlite.org |
| 8 | 8 |
Group: System Environment/GeneralLibraries |
| 9 | 9 |
Vendor: VMware, Inc. |
| 10 | 10 |
Distribution: Photon |
| 11 |
-Source0: http://sqlite.org/2018/%{name}-autoconf-%{sourcever}.tar.gz
|
|
| 12 |
-%define sha1 sqlite=9af2df1a6da5db6e2ecf3f463625f16740e036e9 |
|
| 11 |
+Source0: http://sqlite.org/2020/%{name}-autoconf-%{sourcever}.tar.gz
|
|
| 12 |
+%define sha1 sqlite=0c30f5b22152a8166aa3bebb0f4bc1f3e9cc508b |
|
| 13 |
+Patch0: sqlite-CVE-2020-11656.patch |
|
| 14 |
+Patch1: sqlite-CVE-2020-9327.patch |
|
| 13 | 15 |
Obsoletes: sqlite-autoconf |
| 16 |
+Obsoletes: sqlite-devel <= 3.27.2-5 |
|
| 14 | 17 |
Requires: sqlite-libs = %{version}-%{release}
|
| 15 | 18 |
Provides: sqlite3 |
| 16 | 19 |
%description |
| ... | ... |
@@ -37,15 +40,17 @@ The sqlite3 library. |
| 37 | 37 |
|
| 38 | 38 |
%prep |
| 39 | 39 |
%setup -q -n %{name}-autoconf-%{sourcever}
|
| 40 |
+%patch0 -p1 |
|
| 41 |
+%patch1 -p1 |
|
| 40 | 42 |
|
| 41 | 43 |
%build |
| 42 | 44 |
%configure \ |
| 43 |
- CFLAGS="%{optflags}" \
|
|
| 44 |
- CXXFLAGS="%{optflags} \
|
|
| 45 |
+ CFLAGS="%{optflags} \
|
|
| 45 | 46 |
-DSQLITE_ENABLE_FTS3=1 \ |
| 46 | 47 |
-DSQLITE_ENABLE_COLUMN_METADATA=1 \ |
| 47 | 48 |
-DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \ |
| 48 | 49 |
-DSQLITE_SECURE_DELETE=1" \ |
| 50 |
+ CXXFLAGS="%{optflags}" \
|
|
| 49 | 51 |
--disable-static |
| 50 | 52 |
make |
| 51 | 53 |
|
| ... | ... |
@@ -77,15 +82,17 @@ rm -rf %{buildroot}/*
|
| 77 | 77 |
%files devel |
| 78 | 78 |
%defattr(-,root,root) |
| 79 | 79 |
%{_libdir}/libsqlite3.so
|
| 80 |
-%{_libdir}/libsqlite3.so.0
|
|
| 81 | 80 |
%{_libdir}/pkgconfig/*
|
| 82 | 81 |
%{_includedir}/*
|
| 83 | 82 |
|
| 84 | 83 |
%files libs |
| 85 | 84 |
%defattr(-,root,root) |
| 86 | 85 |
%{_libdir}/libsqlite3.so.0.8.6
|
| 86 |
+%{_libdir}/libsqlite3.so.0
|
|
| 87 | 87 |
|
| 88 | 88 |
%changelog |
| 89 |
+* Thu May 14 2020 Ankit Jain <ankitja@vmware.com> 3.31.1-1 |
|
| 90 |
+- Updated to 3.31.1 |
|
| 89 | 91 |
* Wed Feb 3 2019 Michelle Wang <michellew@vmware.com> 3.26.0-1 |
| 90 | 92 |
- Upgrade to 3.26.0 for a critical Vulnerability named 'Magallan'. |
| 91 | 93 |
* Fri Sep 21 2018 Srinidhi Rao <srinidhir@vmware.com> 3.25.1-1 |