From: Ickhee Woo Date: Wed, 24 Aug 2016 07:05:15 +0000 (+0900) Subject: add command for generating DB files properly X-Git-Tag: accepted/tizen/common/20160824.154854^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d03f298e6daa051f60d0fc44d1299fbd575e8a66;p=platform%2Fcore%2Fappfw%2Fsppc.git add command for generating DB files properly Change-Id: Ib045e45cd4572d1b081989ff16348495dd40b5c9 Signed-off-by: Ickhee Woo --- diff --git a/packaging/push.spec b/packaging/push.spec index ba99373..c34fcc4 100644 --- a/packaging/push.spec +++ b/packaging/push.spec @@ -11,6 +11,7 @@ Source1: pushd.service Requires(post): /sbin/ldconfig Requires(post): /usr/bin/sqlite3 Requires(postun): /sbin/ldconfig +BuildRequires: pkgconfig(libtzplatform-config) %if %{_support_weblog} BuildRequires: pkgconfig(zlib) @@ -202,6 +203,15 @@ cp -a x86_64/share/push/*.cer %{buildroot}/usr/share/push/ %post bin +mkdir -p %{TZ_SYS_GLOBALUSER_DB} +sqlite3 %{TZ_SYS_GLOBALUSER_DB}/.push.db "PRAGMA journal_mode = PERSIST; create table a(a); drop table a;" > /dev/null +chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db +chown service_fw:service_fw %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal +chmod 660 %{TZ_SYS_GLOBALUSER_DB}/.push.db +chmod 660 %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal + +chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db +chsmack -a "*" %{TZ_SYS_GLOBALUSER_DB}/.push.db-journal %post -n libpush /sbin/ldconfig