1 Star 0 Fork 7

ocs-commit-check/sqlite

forked from OpenCloudOS Stream/sqlite 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sqlite.spec 6.74 KB
一键复制 编辑 原始数据 按行查看 历史
%define realver 3420000
%define year 2023
# if version of tcl has been updated, we should change a new version
%global tcl_version 8.6
%global tcl_sitearch %{_libdir}/tcl%{tcl_version}
Summary: Library that implements an embeddable SQL database engine
Name: sqlite
Version: 3.42.0
Release: 6%{?dist}
License: blessing
URL: http://www.sqlite.org/
Source0: http://www.sqlite.org/%{year}/sqlite-src-%{realver}.zip
Source1: http://www.sqlite.org/%{year}/sqlite-doc-%{realver}.zip
Source2: http://www.sqlite.org/%{year}/sqlite-autoconf-%{realver}.tar.gz
BuildRequires: gcc, make, autoconf
BuildRequires: ncurses-devel readline-devel glibc-devel tcl-devel
Requires: %{name}-libs = %{version}-%{release}
# fix CVE-2023-7104
# commit id: 09f1652f36c5c4e8a6a640ce887f9ea0f48a7958
Patch0001: 0001-Fix-a-buffer-overread-in-the-sessions-extension-that.patch
# fix cve-2023-36191
# commit id:4e8a0eb4e773b808d9e9697af94319599777169a a3f943942c74a5a4030036b0400af87d8af5dc19
Patch0002: 0002-Fix-CLI-fault-on-missing-nonce-reported-by-forum-pos.patch
%description
SQLite is a C library that implements an SQL database engine. A large
subset of SQL92 is supported. A complete database is stored in a
single disk file. The API is designed for convenience and ease of use.
Applications that link against SQLite can enjoy the power and
flexibility of an SQL database without the administrative hassles of
supporting a separate database server. Version 2 and version 3 binaries
are named to permit each to be installed on a single host
%package libs
Summary: Shared library for the sqlite3 embeddable SQL database engine.
%description libs
This package contains the shared library for Sqlite.
%package devel
Summary: Development tools for the sqlite3 embeddable SQL database engine
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
%description devel
This package contains the header files and development documentation
for sqlite. If you like to develop programs using sqlite, you will need
to install sqlite-devel.
%package doc
Summary: Documentation for sqlite
BuildArch: noarch
%description doc
This package contains most of the static HTML files that comprise the
www.sqlite.org website, including all of the SQL Syntax and the
C/C++ interface specs and other miscellaneous documentation.
%package -n lemon
Summary: The Lemon LALR(1) Parser Generator
%description -n lemon
The SQL language parser for SQLite is generated using a code-generator program
called "Lemon". The Lemon program reads a grammar of the input language and
emits C-code to implement a parser for that language.
%package tools
Summary: Sqlite tools
Group: Development/Tools
%description tools
Sqlite related tools. Currently contains only sqldiff.
- sqldiff: The sqldiff binary is a command-line utility program
that displays the differences between SQLite databases.
%package tcl
Summary: Tcl module for the sqlite3 embeddable SQL database engine
Requires: %{name} = %{version}-%{release}
Requires: tcl(abi) = %{tcl_version}
%description tcl
This package contains the tcl modules for %{name}.
%package analyzer
Summary: An analysis program for sqlite3 database files
Requires: %{name} = %{version}-%{release}
Requires: tcl(abi) = %{tcl_version}
%description analyzer
This package contains the analysis program for %{name}.
%prep
%autosetup -p1 -a 1 -n %{name}-src-%{realver}
# Remove backup-file
rm -f %{name}-doc-%{realver}/sqlite.css~
autoconf
%build
export CFLAGS="$RPM_OPT_FLAGS $RPM_LD_FLAGS -Wall -fno-strict-aliasing \
-DSQLITE_ENABLE_COLUMN_METADATA=1 \
-DSQLITE_DISABLE_DIRSYNC=1 \
-DSQLITE_ENABLE_FTS3=1 \
-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 \
-DSQLITE_ENABLE_FTS4=1 \
-DSQLITE_ENABLE_MATH_FUNCTIONS \
-DSQLITE_ENABLE_DBPAGE_VTAB"
%configure \
--enable-fts4 \
--enable-fts5 \
--enable-threadsafe \
--enable-threads-override-locks \
--enable-load-extension \
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
# Build sqlite3_analyzer, depends on tcl
%make_build sqlite3_analyzer
%make_build sqldiff
%install
%make_install
install -D -m0644 sqlite3.1 %{buildroot}/%{_mandir}/man1/sqlite3.1
install -D -m0755 lemon %{buildroot}/%{_bindir}/lemon
install -D -m0644 tool/lempar.c %{buildroot}/%{_datadir}/lemon/lempar.c
install -D -m0755 sqlite3_analyzer %{buildroot}/%{_bindir}/sqlite3_analyzer
install -D -m0755 sqldiff %{buildroot}/%{_bindir}/sqldiff
rm -f %{buildroot}%{_libdir}/*.la
%check
export LD_LIBRARY_PATH=`pwd`/.libs
export MALLOC_CHECK_=3
%ifnarch x86_64
rm test/csv01.test
%endif
%ifnarch loongarch64
make test
%endif
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files
%{_bindir}/sqlite3
%{_mandir}/man?/*
%files libs
%doc README.md
%{_libdir}/*.so.*
%files devel
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.a
%files doc
%doc %{name}-doc-%{realver}/*
%files -n lemon
%{_bindir}/lemon
%{_datadir}/lemon
%files tcl
%{tcl_sitearch}/sqlite3
%files tools
%{_bindir}/sqldiff
%files analyzer
%{_bindir}/sqlite3_analyzer
%changelog
* Thu Sep 26 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 3.42.0-6
- Rebuilt for clarifying the packages requirement in BaseOS and AppStream
* Fri Aug 16 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 3.42.0-5
- Rebuilt for loongarch release
* Mon Jul 1 2024 Pengda Dou <doupengda@loongson> - 3.42.0-4
- [Type] other
- [DESC] disable test for loongarch64
* Mon Jun 03 2024 Yi Lin <nilusyi@tencent.com> - 3.42.0-3
- fix CVE-2023-36191
* Tue Mar 05 2024 Yi Lin <nilusyi@tencent.com> - 3.42.0-2
- fix CVE-2023-7104
* Thu Jan 04 2024 Upgrade Robot <upbot@opencloudos.org> - 3.42.0-1
- Upgrade to version 3.42.0
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 3.40.1-3
- Rebuilt for OpenCloudOS Stream 23.09
* Thu Aug 03 2023 cunshunxia <cunshunxia@tencent.com> - 3.40.1-2
- Rebuilt for tcl 8.6.13
* Fri Jul 28 2023 Wang Guodong <gordonwwang@tencent.com> - 3.40.1-1
- Upgrade to 3.40.1
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 3.39.0-3
- Rebuilt for OpenCloudOS Stream 23.05
* Fri Mar 31 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 3.39.0-2
- Rebuilt for OpenCloudOS Stream 23
* Thu Jul 07 2022 Zhao Zhen <jeremiazhao@tencent.com> - 3.39.0-1
- Initial building
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ocs-commit-check/sqlite.git
git@gitee.com:ocs-commit-check/sqlite.git
ocs-commit-check
sqlite
sqlite
master

搜索帮助