Rebase for sqlite 3.21.0 15/167015/1
authorAnas Nashif <anas.nashif@intel.com>
Tue, 27 Nov 2012 21:12:02 +0000 (13:12 -0800)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 15 Jan 2018 02:00:41 +0000 (11:00 +0900)
Change-Id: Ibac99f8191f92772498b032b62033a9112e4e1c5
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Makefile.am
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]
sqlite3.c

index 8c046f8..36c22ea 100644 (file)
@@ -1,5 +1,22 @@
 
-AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ @FTS5_FLAGS@ @JSON1_FLAGS@ @SESSION_FLAGS@ -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE
+AM_CFLAGS = @THREADSAFE_FLAGS@ @DYNAMIC_EXTENSION_FLAGS@ \
+                               @FTS5_FLAGS@ \
+                               @JSON1_FLAGS@ \
+                               @SESSION_FLAGS@ \
+                               -DSQLITE_ENABLE_FTS3 \
+                               -DSQLITE_ENABLE_RTREE \
+                               -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
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..d699d84
--- /dev/null
@@ -0,0 +1,113 @@
+Name:           sqlite
+Version:        3.18.0
+Release:        0
+License:        Public-Domain
+%define tarversion 3180000
+Summary:        Embeddable SQL Database Engine
+Url:            http://www.sqlite.org/
+Group:          System/Database
+Source0:        sqlite-autoconf-%tarversion.tar.gz
+Source1:        baselibs.conf
+Source1001:    sqlite.manifest
+BuildRequires:  readline-devel
+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:       libsqlit3
+
+%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}
+
+%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} .
+
+%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
index 320d635..0fce5b4 100644 (file)
--- a/sqlite3.c
+++ b/sqlite3.c
@@ -52434,6 +52434,11 @@ act_like_temp_file:
   }else if( memDb ){
     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;