Bump to sqlite 3.33.0 00/247500/1 backup/sqlite-3.33.0-20220215 sandbox/jinwang.an/sqlite_3.33.0_20201111 accepted/tizen/6.5/base/tool/20211027.120838 accepted/tizen/base/tool/20201219.095616 submit/sandbox/jinwang.an/sqlite_3.33.0_20201111/20201127.050226 submit/tizen/20201127.063301 submit/tizen_6.5_base/20211026.180901 submit/tizen_6.5_base/20211027.183101 submit/tizen_6.5_base/20211027.201101 submit/tizen_base/20201130.032914 submit/tizen_base/20201207.055733 submit/tizen_base/20201208.051231 submit/tizen_base/20201208.051733 submit/tizen_base/20201211.032252 submit/tizen_base/20201214.044014 tizen_6.5.m2_release
authorJinWang An <jinwang.an@samsung.com>
Mon, 19 Oct 2020 16:54:09 +0000 (01:54 +0900)
committerJinWang An <jinwang.an@samsung.com>
Wed, 11 Nov 2020 07:53:22 +0000 (16:53 +0900)
Change-Id: Idbd990fb4b6e4afdfb1438e35581c03d75fa5847
Signed-off-by: JinWang An <jinwang.an@samsung.com>
autogen.sh [new file with mode: 0755]
packaging/baselibs.conf [new file with mode: 0644]
packaging/sqlite.changes [new file with mode: 0644]
packaging/sqlite.manifest [new file with mode: 0644]
packaging/sqlite.spec [new file with mode: 0644]
packaging/sqlite_default_flag.patch [new file with mode: 0644]
packaging/sqlite_journal_mode_persist.patch [new file with mode: 0644]

diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..227e169
--- /dev/null
@@ -0,0 +1,5 @@
+aclocal
+#autoheader
+autoconf
+libtoolize --force --copy
+automake --add-missing
diff --git a/packaging/baselibs.conf b/packaging/baselibs.conf
new file mode 100644 (file)
index 0000000..2eb7c88
--- /dev/null
@@ -0,0 +1,3 @@
+libsqlite
+  obsoletes "sqlite-<targettype> <= <version>"
+  provides "sqlite-<targettype> = <version>"
diff --git a/packaging/sqlite.changes b/packaging/sqlite.changes
new file mode 100644 (file)
index 0000000..0ca15dc
--- /dev/null
@@ -0,0 +1,9 @@
+* Thu Apr 11 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130319.034032@4baf1c1
+- enable thread safe option
+
+* Sun Mar 17 2013 Anas Nashif <anas.nashif@intel.com> submit/trunk/20130104.051124@7fc6e9d
+- Update package groups
+
+* Thu Jan 03 2013 Anas Nashif <anas.nashif@intel.com> upstream/3.7.14@aad28b0
+- devel package requires exec
+
diff --git a/packaging/sqlite.manifest b/packaging/sqlite.manifest
new file mode 100644 (file)
index 0000000..017d22d
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+    <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/sqlite.spec b/packaging/sqlite.spec
new file mode 100644 (file)
index 0000000..b9a419e
--- /dev/null
@@ -0,0 +1,118 @@
+%global tarversion 3330000
+
+Name:           sqlite
+Version:        3.33.0
+Release:        0
+License:        Public-Domain
+Summary:        Embeddable SQL Database Engine
+Url:            http://www.sqlite.org/
+Group:          System/Database
+Source0:        sqlite-autoconf-%{tarversion}.tar.gz
+Source1:        baselibs.conf
+Source2:        sqlite_journal_mode_persist.patch
+Source3:        sqlite_default_flag.patch
+Source1001:    sqlite.manifest
+BuildRequires:  pkgconfig(pkg-config)
+Requires:       libsqlite = %{version}
+Provides:       sqlite3
+
+%description
+SQLite is a C library that implements an embeddable SQL database
+engine. Programs that link with the SQLite library can have SQL
+database access without running a separate RDBMS process.
+
+SQLite is not a client library used to connect to a big database
+server. SQLite is a server and the SQLite library reads and writes
+directly to and from the database files on disk.
+
+SQLite can be used via the sqlite command line tool or via any
+application that supports the Qt database plug-ins.
+
+%package -n libsqlite
+Summary:        Shared libraries for the Embeddable SQL Database Engine
+Group:          System/Database
+Provides:       libsqlite3
+
+%description -n libsqlite
+This package contains the shared libraries for the Embeddable SQL
+Database Engine.
+
+SQLite is a C library that implements an embeddable SQL database
+engine. Programs that link with the SQLite library can have SQL
+database access without running a separate RDBMS process.
+
+SQLite is not a client library used to connect to a big database
+server. SQLite is a server and the SQLite library reads and writes
+directly to and from the database files on disk.
+
+SQLite can be used via the sqlite command line tool or via any
+application that supports the Qt database plug-ins.
+
+%package devel
+Summary:        Embeddable SQL Database Engine
+Group:          Development/Libraries
+Requires:       glibc-devel
+Requires:       libsqlite = %{version}
+Requires:       sqlite
+Provides:       sqlite3-devel = %{version}
+Obsoletes:      sqlite3-devel < %{version}
+Conflicts:      sqlcipher-devel
+
+%description devel
+SQLite is a C library that implements an embeddable SQL database
+engine. Programs that link with the SQLite library can have SQL
+database access without running a separate RDBMS process.
+
+SQLite is not a client library used to connect to a big database
+server; SQLite is the server. The SQLite library reads and writes
+directly to and from the database files on disk.
+
+SQLite can be used via the sqlite command-line tool or via any
+application which supports the Qt database plug-ins.
+
+%prep
+%setup -q -n sqlite-autoconf-%tarversion
+cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE2}
+%{__patch} -p1 < %{SOURCE3}
+
+%build
+CFLAGS=`echo %{optflags} |sed -e 's/-ffast-math//g'`
+CFLAGS+=" -fPIE"
+LDFLAGS+=" -pie"
+%{?asan:CFLAGS+=" -lpthread -ldl "}
+chmod +x autogen.sh
+%autogen
+%configure -disable-dependency-tracking \
+    --enable-shared=yes \
+    --enable-static=no \
+    --enable-threadsafe \
+    --enable-fts5
+
+make
+
+%install
+%make_install
+
+%post -n libsqlite -p /sbin/ldconfig
+
+%postun -n libsqlite -p /sbin/ldconfig
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_bindir}/sqlite3
+
+%files -n libsqlite
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_libdir}/libsqlite*.so.*
+
+%files devel
+%manifest %{name}.manifest
+%defattr(-,root,root)
+%{_includedir}/*.h
+%{_libdir}/libsqlite*.so
+%{_libdir}/pkgconfig/sqlite3.pc
+
+%docs_package
diff --git a/packaging/sqlite_default_flag.patch b/packaging/sqlite_default_flag.patch
new file mode 100644 (file)
index 0000000..4b78d9c
--- /dev/null
@@ -0,0 +1,24 @@
+diff --git a/Makefile.am b/Makefile.am
+index 20af743..8c76d57 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -1,5 +1,18 @@
+-AM_CFLAGS = @BUILD_CFLAGS@ 
++AM_CFLAGS = @BUILD_CFLAGS@  \
++                -DSQLITE_ENABLE_COLUMN_METADATA \
++                -DSQLITE_ENABLE_MEMORY_MANAGEMENT \
++                -DSQLITE_DEFAULT_AUTOVACUUM=1 \
++                -DSQLITE_DEFAULT_PAGE_SIZE=4096 \
++                -Dfdatasync=fdatasync \
++                -DSQLITE_TIZEN_FEATURE \
++                -DSQLITE_TEMP_STORE=2 \
++                -DHAVE_USLEEP=1 \
++                -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=4194304 \
++                -DSQLITE_DEFAULT_FILE_FORMAT=4 \
++                -DSQLITE_POWERSAFE_OVERWRITE=1 \
++                -DSQLITE_ENABLE_ATOMIC_WRITE
++
+ lib_LTLIBRARIES = libsqlite3.la
+ libsqlite3_la_SOURCES = sqlite3.c
+ libsqlite3_la_LDFLAGS = -no-undefined -version-info 8:6:8
diff --git a/packaging/sqlite_journal_mode_persist.patch b/packaging/sqlite_journal_mode_persist.patch
new file mode 100644 (file)
index 0000000..7b11bcc
--- /dev/null
@@ -0,0 +1,16 @@
+diff --git a/sqlite3.c b/sqlite3.c
+index 8fd740b..ce02d70 100644
+--- a/sqlite3.c
++++ b/sqlite3.c
+@@ -55804,6 +55804,11 @@ act_like_temp_file:
+   }else if( memDb || memJM ){
+     pPager->journalMode = PAGER_JOURNALMODE_MEMORY;
+   }
++#ifdef SQLITE_TIZEN_FEATURE
++  else {
++      pPager->journalMode = PAGER_JOURNALMODE_PERSIST;
++  }
++#endif
+   /* pPager->xBusyHandler = 0; */
+   /* pPager->pBusyHandlerArg = 0; */
+   pPager->xReiniter = xReinit;