add platform upgrade script 79/85179/4 accepted/tizen/common/20160824.154832 accepted/tizen/ivi/20160825.050818 accepted/tizen/mobile/20160825.050719 accepted/tizen/tv/20160825.050741 accepted/tizen/wearable/20160825.050756 submit/tizen/20160824.065208
authorJiwoong Im <jiwoong.im@samsung.com>
Wed, 24 Aug 2016 05:21:20 +0000 (14:21 +0900)
committerJiwoong Im <jiwoong.im@samsung.com>
Wed, 24 Aug 2016 06:19:14 +0000 (15:19 +0900)
Change-Id: If4e92db59b39af2f662d1e6266c86b943c650665
Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
packaging/buxton2.spec
scripts/100.buxton2_upgrade.sh [new file with mode: 0644]

index 8440c9b..6e80a81 100644 (file)
@@ -1,5 +1,6 @@
 %define dbdir %{_localstatedir}/lib/%{name}
 %define basedbdir %{_sysconfdir}/%{name}
+%define upgrade_script_path /usr/share/upgrade/scripts
 
 Name:           buxton2
 Version:        1.1
@@ -135,6 +136,9 @@ install -m 644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
 install -m 755 -d %{buildroot}%{_unitdir}/sockets.target.wants
 ln -sf ../%{name}.socket %{buildroot}%{_unitdir}/sockets.target.wants/
 
+mkdir -p %{buildroot}%{upgrade_script_path}
+cp -f scripts/100.buxton2_upgrade.sh %{buildroot}%{upgrade_script_path}
+
 %post
 /sbin/ldconfig
 
@@ -178,6 +182,7 @@ chsmack -a System %{basedbdir}/*
 %{_unitdir}/sockets.target.wants/%{name}.socket
 %attr(0700,buxton,buxton) %dir %{_localstatedir}/lib/%{name}
 %attr(0700,buxton,buxton) %dir %{basedbdir}
+%{upgrade_script_path}/100.buxton2_upgrade.sh
 
 %files devel
 %manifest %{name}.manifest
diff --git a/scripts/100.buxton2_upgrade.sh b/scripts/100.buxton2_upgrade.sh
new file mode 100644 (file)
index 0000000..bbd3273
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# buxton upgrade initialize script (2.4 -> 3.0)
+#
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+RW_DB_PATH=/var/lib/buxton2
+
+mkdir -p $RW_DB_PATH
+chown -R buxton:buxton $RW_DB_PATH
+chmod 700 $RW_DB_PATH
+chsmack -a System $RW_DB_PATH
+chsmack -t $RW_DB_PATH