Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c0ec09d417 | |||
| a88f4c308c | |||
| a64a525169 | |||
| 347848fa14 |
@@ -1,2 +0,0 @@
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -1,2 +0,0 @@
|
||||
[lfs]
|
||||
url = https://artlfs.openeuler.openatom.cn/src-openEuler/sqlite
|
||||
@@ -0,0 +1,41 @@
|
||||
From 6a7c9be9502ea2023c4b5cf39a0d5a5a55b320f7 Mon Sep 17 00:00:00 2001
|
||||
From: Lixiaokeng <lixiaokeng@huawei.com>
|
||||
Date: Wed, 17 Jul 2024 10:31:56 +0800
|
||||
Subject: [PATCH] sqlite no malloc_usable_size
|
||||
|
||||
Reference:https://gitee.com/src-openeuler/sqlite/blob/openEuler-22.03-LTS-SP3/0001-sqlite-no-malloc-usable-size.patch
|
||||
Conflict:NA
|
||||
|
||||
---
|
||||
configure | 2 +-
|
||||
configure.ac | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 29ca76b..d67183a 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -10292,7 +10292,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"
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 53be0a6..6f9b1e1 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -108,7 +108,7 @@ AC_CHECK_HEADERS([sys/types.h stdlib.h stdint.h inttypes.h malloc.h])
|
||||
#########
|
||||
# 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...)
|
||||
--
|
||||
2.33.0
|
||||
@@ -0,0 +1,68 @@
|
||||
From defded46ea50037500590122d847ba6a7cb96110 Mon Sep 17 00:00:00 2001
|
||||
From: eulerstorage <eulerstoragemt@huawei.com>
|
||||
Date: Sat, 11 Jan 2020 11:33:54 +0800
|
||||
Subject: [PATCH] remove fail testcase in no free fd situation
|
||||
|
||||
Reference:https://gitee.com/src-openeuler/sqlite/blob/openEuler-22.03-LTS-SP3/0002-remove-fail-testcase-in-no-free-fd-situation.patch
|
||||
Conflict:NA
|
||||
|
||||
Remove testcase 1.1.1, 1.1.2 and 1.1.3, since it can not success in
|
||||
some situation if there is no enough fd resource.
|
||||
---
|
||||
test/oserror.test | 27 ---------------------------
|
||||
1 file changed, 27 deletions(-)
|
||||
|
||||
diff --git a/test/oserror.test b/test/oserror.test
|
||||
index a51301c..d46218f 100644
|
||||
--- a/test/oserror.test
|
||||
+++ b/test/oserror.test
|
||||
@@ -40,47 +40,6 @@ proc do_re_test {tn script expression} {
|
||||
|
||||
}
|
||||
|
||||
-#--------------------------------------------------------------------------
|
||||
-# Tests oserror-1.* test failures in the open() system call.
|
||||
-#
|
||||
-
|
||||
-# Test a failure in open() due to too many files.
|
||||
-#
|
||||
-# The xOpen() method of the unix VFS calls getcwd() as well as open().
|
||||
-# Although this does not appear to be documented in the man page, on OSX
|
||||
-# a call to getcwd() may fail if there are no free file descriptors. So
|
||||
-# an error may be reported for either open() or getcwd() here.
|
||||
-#
|
||||
-if {![clang_sanitize_address]} {
|
||||
- unset -nocomplain rc
|
||||
- unset -nocomplain nOpen
|
||||
- set nOpen 20000
|
||||
- do_test 1.1.1 {
|
||||
- set ::log [list]
|
||||
- set ::rc [catch {
|
||||
- for {set i 0} {$i < $::nOpen} {incr i} { sqlite3 dbh_$i test.db -readonly 1 }
|
||||
- } msg]
|
||||
- if {$::rc==0} {
|
||||
- # Some system (ex: Debian) are able to create 20000+ file descriptiors
|
||||
- # such systems will not fail here
|
||||
- set x ok
|
||||
- } elseif {$::rc==1 && $msg=="unable to open database file"} {
|
||||
- set x ok
|
||||
- } else {
|
||||
- set x [list $::rc $msg]
|
||||
- }
|
||||
- } {ok}
|
||||
- do_test 1.1.2 {
|
||||
- catch { for {set i 0} {$i < $::nOpen} {incr i} { dbh_$i close } }
|
||||
- } $::rc
|
||||
- if {$rc} {
|
||||
- do_re_test 1.1.3 {
|
||||
- lindex $::log 0
|
||||
- } {^os_unix.c:\d+: \(\d+\) (open|getcwd)\(.*test.db\) - }
|
||||
- }
|
||||
-}
|
||||
-
|
||||
-
|
||||
# Test a failure in open() due to the path being a directory.
|
||||
#
|
||||
do_test 1.2.1 {
|
||||
--
|
||||
1.8.3.1
|
||||
@@ -0,0 +1,26 @@
|
||||
From 26ea25aacc1e70f4d142d8f041da2065509c0b51 Mon Sep 17 00:00:00 2001
|
||||
From: zwtmichael <zhuwentao5@huawei.com>
|
||||
Date: Tue, 30 Aug 2022 17:02:04 +0800
|
||||
Subject: [PATCH] fix memory problem in the rtree test suite
|
||||
|
||||
Reference:https://gitee.com/src-openeuler/sqlite/blob/openEuler-22.03-LTS-SP3/0004-fix-memory-problem-in-the-rtree-test-suite.patch
|
||||
Conflict: BoxQueryCtx change to BoxGeomCtx
|
||||
---
|
||||
ext/rtree/test_rtreedoc.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ext/rtree/test_rtreedoc.c b/ext/rtree/test_rtreedoc.c
|
||||
index cdbcb2e..59a7942 100644
|
||||
--- a/ext/rtree/test_rtreedoc.c
|
||||
+++ b/ext/rtree/test_rtreedoc.c
|
||||
@@ -188,7 +188,7 @@ static int SQLITE_TCLAPI register_box_geom(
|
||||
}
|
||||
if( getDbPointer(interp, Tcl_GetString(objv[1]), &db) ) return TCL_ERROR;
|
||||
|
||||
- pCtx = (BoxGeomCtx*)ckalloc(sizeof(BoxGeomCtx*));
|
||||
+ pCtx = (BoxGeomCtx*)ckalloc(sizeof(BoxGeomCtx));
|
||||
pCtx->interp = interp;
|
||||
pCtx->pScript = Tcl_DuplicateObj(objv[2]);
|
||||
Tcl_IncrRefCount(pCtx->pScript);
|
||||
--
|
||||
2.33.0
|
||||
@@ -0,0 +1,34 @@
|
||||
From c5c8e025ff6cf0f7400b17aec73014e9cdc00935 Mon Sep 17 00:00:00 2001
|
||||
From: zwtmichael <zhuwentao5@huawei.com>
|
||||
Date: Mon, 7 Aug 2023 15:10:32 +0800
|
||||
Subject: [PATCH] fix segmentation violation
|
||||
|
||||
Reference:https://gitee.com/src-openeuler/sqlite/blob/openEuler-22.03-LTS-SP3/0007-CVE-2023-36191.patch
|
||||
Conflict:context adaptation
|
||||
|
||||
Signed-off-by: zwtmichael <zhuwentao5@huawei.com>
|
||||
---
|
||||
src/shell.c.in | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/shell.c.in b/src/shell.c.in
|
||||
index 72e4498..355b4bb 100644
|
||||
--- a/src/shell.c.in
|
||||
+++ b/src/shell.c.in
|
||||
@@ -12219,8 +12219,12 @@ int SQLITE_CDECL wmain(int argc, wchar_t **wargv){
|
||||
}else if( cli_strcmp(z,"-bail")==0 ){
|
||||
bail_on_error = 1;
|
||||
}else if( cli_strcmp(z,"-nonce")==0 ){
|
||||
- free(data.zNonce);
|
||||
- data.zNonce = strdup(argv[++i]);
|
||||
+ if( data.zNonce ) free(data.zNonce);
|
||||
+ if( i + 1 < argc ) data.zNonce = strdup(argv[++i]);
|
||||
+ else{
|
||||
+ data.zNonce = 0;
|
||||
+ break;
|
||||
+ }
|
||||
}else if( cli_strcmp(z,"-unsafe-testing")==0 ){
|
||||
ShellSetFlag(&data,SHFLG_TestingMode);
|
||||
}else if( cli_strcmp(z,"-safe")==0 ){
|
||||
--
|
||||
2.33.0
|
||||
@@ -0,0 +1,46 @@
|
||||
From 310e27eec4eb0e6c5cbc7bad6d3c0ad71619cb44 Mon Sep 17 00:00:00 2001
|
||||
From: dan <Dan Kennedy>
|
||||
Date: Thu, 7 Sep 2023 13:53:09 +0000
|
||||
Subject: [PATCH] Fix a buffer overread in the sessions extension that could
|
||||
occur when processing a corrupt changeset.
|
||||
|
||||
Reference:https://sqlite.org/src/info/0e4e7a05c4204b47
|
||||
Conflict:NA
|
||||
|
||||
---
|
||||
ext/session/sqlite3session.c | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/ext/session/sqlite3session.c b/ext/session/sqlite3session.c
|
||||
index a892804..72ad427 100644
|
||||
--- a/ext/session/sqlite3session.c
|
||||
+++ b/ext/session/sqlite3session.c
|
||||
@@ -3050,15 +3050,19 @@ static int sessionReadRecord(
|
||||
}
|
||||
}
|
||||
if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
|
||||
- sqlite3_int64 v = sessionGetI64(aVal);
|
||||
- if( eType==SQLITE_INTEGER ){
|
||||
- sqlite3VdbeMemSetInt64(apOut[i], v);
|
||||
+ if( (pIn->nData-pIn->iNext)<8 ){
|
||||
+ rc = SQLITE_CORRUPT_BKPT;
|
||||
}else{
|
||||
- double d;
|
||||
- memcpy(&d, &v, 8);
|
||||
- sqlite3VdbeMemSetDouble(apOut[i], d);
|
||||
+ sqlite3_int64 v = sessionGetI64(aVal);
|
||||
+ if( eType==SQLITE_INTEGER ){
|
||||
+ sqlite3VdbeMemSetInt64(apOut[i], v);
|
||||
+ }else{
|
||||
+ double d;
|
||||
+ memcpy(&d, &v, 8);
|
||||
+ sqlite3VdbeMemSetDouble(apOut[i], d);
|
||||
+ }
|
||||
+ pIn->iNext += 8;
|
||||
}
|
||||
- pIn->iNext += 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.33.0
|
||||
@@ -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
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
# Generate and execute the command with which to do the compilation.
|
||||
#
|
||||
- set cmd "$CMD tclsqlite3.c -o $OUT $LIBS"
|
||||
+ set cmd "$CMD tclsqlite3.c -o $OUT $LIBS -lm"
|
||||
puts $cmd
|
||||
file delete -force $OUT
|
||||
catch {exec {*}$cmd} errmsg
|
||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ac992f7fca3989de7ed1fe99c16363f848794c8c32a158dafd4eb927a2e02fd5
|
||||
size 3337615
|
||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3dc137fcd7c6acb326af60a61b9844dd15d3773cb05e7a9ce276c41f713d765a
|
||||
size 11391112
|
||||
Binary file not shown.
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2d7b032b6fdfe8c442aa809f850687a81d06381deecd7be3312601d28612e640
|
||||
size 14350897
|
||||
+51
-50
@@ -1,31 +1,37 @@
|
||||
%bcond_without check
|
||||
|
||||
%global extver 3420000
|
||||
%global tcl_version 8.6
|
||||
%global tcl_sitearch %{_libdir}/tcl%{tcl_version}
|
||||
|
||||
Name: sqlite
|
||||
Version: 3.48.0
|
||||
%global extver %(echo %{version} |awk -F. '{printf "%d%02d%02d00", $1,$2,$3}')
|
||||
Version: 3.42.0
|
||||
Release: 3
|
||||
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
|
||||
Source2: https://www.sqlite.org/2025/sqlite-autoconf-%{extver}.tar.gz
|
||||
Patch0: sqlite-3.48.0-buildtclext.patch
|
||||
Source0: https://www.sqlite.org/2023/sqlite-src-%{extver}.zip
|
||||
Source1: http://www.sqlite.org/2023/sqlite-doc-%{extver}.zip
|
||||
Source2: https://www.sqlite.org/2023/sqlite-autoconf-%{extver}.tar.gz
|
||||
|
||||
BuildRequires: gcc tcl tcl-devel
|
||||
Patch6000: backport-0001-sqlite-no-malloc-usable-size.patch
|
||||
Patch6001: backport-0002-remove-fail-testcase-in-no-free-fd-situation.patch
|
||||
Patch6002: backport-0003-fix-memory-problem-in-the-rtree-test-suite.patch
|
||||
Patch6003: backport-0004-CVE-2023-36191.patch
|
||||
Patch6004: backport-CVE-2023-7104.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,
|
||||
@@ -37,6 +43,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.
|
||||
@@ -44,8 +51,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.
|
||||
@@ -54,40 +61,47 @@ 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
|
||||
%patch6000 -p1
|
||||
%patch6001 -p1
|
||||
%patch6002 -p1
|
||||
%patch6003 -p1
|
||||
%patch6004 -p1
|
||||
|
||||
rm -f %{name}-doc-%{extver}/sqlite.css~ || :
|
||||
|
||||
%build
|
||||
|
||||
autoconf
|
||||
export CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1 \
|
||||
-DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=3 \
|
||||
-DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=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
|
||||
@@ -103,15 +117,18 @@ 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
|
||||
@@ -123,27 +140,11 @@ rm -rf test/thread2.test
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 10 2025 Funda Wang <fundawang@yeah.net> - 3.48.0-3
|
||||
- remove rpath for tcl binding
|
||||
* Mon Nov 11 2024 wangmian <wangmian19@h-partners.com> - 3.42.0-3
|
||||
- sync the patch from 2203
|
||||
|
||||
* 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
|
||||
* Wed Sep 4 2024 wangmian <wangmian19@h-partners.com> - 3.42.0-2
|
||||
- sync the CVE-2023-7104 from 2203
|
||||
|
||||
* Tue Feb 27 2024 Zheng Zhenyu <zheng.zhenyu@outlook.com> - 3.42.0-1
|
||||
- Bump version to fix CVE-2024-0232
|
||||
|
||||
Reference in New Issue
Block a user