From 61c89c1e63b4459e0f9930910fcd8fb444905791 Mon Sep 17 00:00:00 2001 From: Myungki Lee Date: Mon, 5 Sep 2016 22:28:46 +0900 Subject: [PATCH] Add a scripts to upgrade shortcut db Change-Id: I21911fbdc8f773caf45b82f98047c11d4f793a6e Signed-off-by: Myungki Lee --- packaging/libshortcut.spec | 6 ++++++ scripts/107.shortcut_upgrade.sh | 17 +++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 scripts/107.shortcut_upgrade.sh diff --git a/packaging/libshortcut.spec b/packaging/libshortcut.spec index ba2eb54..169bd4d 100755 --- a/packaging/libshortcut.spec +++ b/packaging/libshortcut.spec @@ -21,6 +21,8 @@ BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(aul) BuildRequires: pkgconfig(libtzplatform-config) +%define upgrade_script_path /usr/share/upgrade/scripts + %description [Shortcut] AddToHome feature supporting library for menu/home screen developers. @@ -46,6 +48,9 @@ rm -rf %{buildroot} %make_install mkdir -p %{buildroot}%{TZ_SYS_DB} +mkdir -p %{buildroot}%{upgrade_script_path} +cp -f scripts/107.shortcut_upgrade.sh %{buildroot}%{upgrade_script_path} + %post /sbin/ldconfig @@ -89,6 +94,7 @@ chsmack -a User::Home %{TZ_SYS_DB}/.shortcut_service.db-journal %{_libdir}/*.so* %{_sysconfdir}/package-manager/parserlib/* %{_datarootdir}/license/* +%{upgrade_script_path}/107.shortcut_upgrade.sh %files devel %manifest %{name}.manifest diff --git a/scripts/107.shortcut_upgrade.sh b/scripts/107.shortcut_upgrade.sh new file mode 100644 index 0000000..3502b0a --- /dev/null +++ b/scripts/107.shortcut_upgrade.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +#------------------------------------------# +# shortcut upgrade (2.4 -> 3.0) # +#------------------------------------------# + +# Macro +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +DB_DIR=/opt/dbspace +DB_SHORTCUT=$DB_DIR/.shortcut_service.db + +chown owner:users $DB_SHORTCUT +chown owner:users $DB_SHORTCUT-journal + +chsmack -a User::Home $DB_SHORTCUT +chsmack -a User::Home $DB_SHORTCUT-journal -- 2.7.4