Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 617b553e80 | |||
| 2dbe5ae354 | |||
| 48cda60f9d | |||
| 9640b332c6 | |||
| 080b939885 | |||
| 4e33528100 | |||
| 538d9d59d9 | |||
| bddc04586e | |||
| a628f02a4b | |||
| 4376163380 | |||
| fbe58057fb | |||
| c0290d3976 | |||
| 0b520cc93e | |||
| e798a0f31e |
@@ -0,0 +1,2 @@
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
@@ -0,0 +1,2 @@
|
||||
[lfs]
|
||||
url = https://artlfs.openeuler.openatom.cn/src-openEuler/sqlite
|
||||
@@ -1,45 +0,0 @@
|
||||
it From a756d158b3e55831975feb45b753ba499d2adeda Mon Sep 17 00:00:00 2001
|
||||
From: mazhao <mazhao12@huawei.com>
|
||||
Date: Wed, 3 Jan 2024 12:00:45 +0800
|
||||
Subject: [PATCH] Fix a buffer overread in the sessions extension that could
|
||||
occur when processing a corrupt changeset.
|
||||
|
||||
Signed-off-by: mazhao <mazhao12@huawei.com>
|
||||
---
|
||||
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.34.1
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- 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.
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ac992f7fca3989de7ed1fe99c16363f848794c8c32a158dafd4eb927a2e02fd5
|
||||
size 3337615
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3dc137fcd7c6acb326af60a61b9844dd15d3773cb05e7a9ce276c41f713d765a
|
||||
size 11391112
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2d7b032b6fdfe8c442aa809f850687a81d06381deecd7be3312601d28612e640
|
||||
size 14350897
|
||||
+52
-43
@@ -1,34 +1,31 @@
|
||||
%bcond_without check
|
||||
|
||||
%global extver 3420000
|
||||
%global tcl_version 8.6
|
||||
%global tcl_sitearch %{_libdir}/tcl%{tcl_version}
|
||||
|
||||
Name: sqlite
|
||||
Version: 3.42.0
|
||||
Release: 2
|
||||
Version: 3.48.0
|
||||
%global extver %(echo %{version} |awk -F. '{printf "%d%02d%02d00", $1,$2,$3}')
|
||||
Release: 3
|
||||
Summary: Embeded SQL database
|
||||
License: Public Domain
|
||||
URL: http://www.sqlite.org/
|
||||
URL: https://www.sqlite.org/
|
||||
|
||||
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
|
||||
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
|
||||
|
||||
Patch1: 0001-CVE-2023-7104.patch
|
||||
|
||||
BuildRequires: gcc autoconf tcl tcl-devel
|
||||
BuildRequires: gcc tcl tcl-devel
|
||||
BuildRequires: ncurses-devel readline-devel glibc-devel
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: rpm_macro(tcl_sitearch)
|
||||
|
||||
|
||||
Provides: %{name}-libs
|
||||
Obsoletes: %{name}-libs
|
||||
Provides: lemon
|
||||
Obsoletes: lemon
|
||||
Provides: %{name}-analyzer
|
||||
Obsoletes: %{name}-analyzer
|
||||
Provides: %{name}-tcl
|
||||
Obsoletes: %{name}-tcl
|
||||
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}
|
||||
|
||||
%description
|
||||
SQLite is a C-language library that implements a small, fast, self-contained,
|
||||
@@ -40,7 +37,6 @@ 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.
|
||||
@@ -48,8 +44,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
|
||||
Obsoletes: %{name}-doc
|
||||
Provides: %{name}-doc = %{version}-%{release}
|
||||
Obsoletes: %{name}-doc < %{version}-%{release}
|
||||
|
||||
%description help
|
||||
This contains man files and HTML files for the using of sqlite.
|
||||
@@ -58,43 +54,40 @@ 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}
|
||||
%patch1 -p1
|
||||
%autopatch -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"
|
||||
|
||||
%configure --enable-fts5 \
|
||||
export CC=%{__cc}
|
||||
%configure --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
|
||||
make DESTDIR=${RPM_BUILD_ROOT} install
|
||||
mkdir -p %{buildroot}/%{tcl_sitearch}/sqlite3
|
||||
%make_install TCLLIBDIR=%{tcl_sitearch}/sqlite3
|
||||
%delete_la
|
||||
|
||||
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
|
||||
@@ -110,18 +103,15 @@ rm -rf test/thread1.test
|
||||
rm -rf test/thread2.test
|
||||
%endif
|
||||
|
||||
make test
|
||||
%make_build 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
|
||||
@@ -133,8 +123,27 @@ make test
|
||||
%{_mandir}/man*/*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 4 2024 wangmian <wangmian19@h-partners.com> - 3.42.0-2
|
||||
- sync the CVE-2023-7104 from 2203
|
||||
* Mon Mar 10 2025 Funda Wang <fundawang@yeah.net> - 3.48.0-3
|
||||
- remove rpath for tcl binding
|
||||
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user