Upgrade: Tizen 2.4 -> 3.0 upgrade script added 12/87112/3 accepted/tizen/3.0/common/20161114.110047 accepted/tizen/3.0/ivi/20161011.065115 accepted/tizen/3.0/mobile/20161015.034409 accepted/tizen/3.0/tv/20161016.005723 accepted/tizen/3.0/wearable/20161015.084410 accepted/tizen/common/20160909.115014 accepted/tizen/ivi/20160912.053616 accepted/tizen/mobile/20160912.053529 accepted/tizen/tv/20160912.053545 accepted/tizen/wearable/20160912.053604 submit/tizen/20160909.055251 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000007 submit/tizen_3.0_mobile/20161015.000007 submit/tizen_3.0_tv/20161015.000005 submit/tizen_3.0_wearable/20161015.000006
authorSunmin Lee <sunm.lee@samsung.com>
Tue, 6 Sep 2016 10:12:30 +0000 (19:12 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Thu, 8 Sep 2016 04:04:12 +0000 (13:04 +0900)
The upgrade script for RW update is added.

Change-Id: I32fc65d550e7fec66263dfb915734de4cee99914
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
packaging/tizen-platform-config.spec
scripts/010.tizen-platform-config.patch.sh [new file with mode: 0644]

index 91a3013..44972f0 100644 (file)
@@ -1,5 +1,6 @@
 %define libname libtzplatform-config
 %define keepstatic 1
+%define upgrade 010.tizen-platform-config.patch.sh
 
 Name:           tizen-platform-config
 Version:        2.0
@@ -61,6 +62,7 @@ cp %{SOURCE1001} .
 
 %install
 %make_install
+install scripts/%{upgrade} -D %{buildroot}%{_datadir}/upgrade/scripts/%{upgrade}
 
 %post
 ##############################################
@@ -156,6 +158,7 @@ HOME="$saveHOME"
 %manifest %{name}.manifest
 %license LICENSE
 %config %{_sysconfdir}/tizen-platform.conf
+%{_datadir}/upgrade/scripts/%{upgrade}
 
 %files -n %{libname}
 %manifest %{name}.manifest
diff --git a/scripts/010.tizen-platform-config.patch.sh b/scripts/010.tizen-platform-config.patch.sh
new file mode 100644 (file)
index 0000000..b0f5606
--- /dev/null
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# RW update: tizen-platform-config
+#
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+# tizen-platform-config post script
+. "/etc/tizen-platform.conf"
+cat << ENDOFCAT |
+MODE 777
+SMACK System::Shared true
+$TZ_SYS_STORAGE
+$TZ_SYS_MEDIA
+
+MODE 775
+SMACK User::Home false
+$TZ_SYS_DB
+$TZ_SYS_RW_PACKAGES
+$TZ_SYS_RW_APP
+
+SMACK System::Shared false
+$TZ_SYS_ETC
+
+ENDOFCAT
+while read s1 s2 s3; do
+  case "$s1" in
+    MODE) m="$s2";;
+    SMACK) c="$s2"; t="$s3";;
+    "") ;;
+    *) echo "$s1 ${m:-700} ${c:-_} ${t:-false}";;
+  esac
+done |
+LANG=C sort |
+while read dirname mode context transmute; do
+        if [ -e "$dirname" ]; then
+                chmod "$mode" "$dirname"
+        else
+                mkdir -p -m "$mode" "$dirname"
+        fi
+        if [ "$transmute" = true ]; then
+                chsmack -a "$context" -t "$dirname"
+        else
+                chsmack -a "$context" "$dirname"
+        fi >&2
+done