summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunmin Lee <sunm.lee@samsung.com>2016-09-06 19:12:30 +0900
committerSunmin Lee <sunm.lee@samsung.com>2016-09-08 13:04:12 +0900
commitbdd079a7728a280f2fdddfbd4588500998e7ccc6 (patch)
tree6158e404bb0eec199726121d1092d98620a4f9f6
parent55bd39bbd04019b9872e94bc900c65ad2379324e (diff)
downloadtizen-platform-config-accepted/tizen/mobile/20160912.053529.tar.gz
tizen-platform-config-accepted/tizen/mobile/20160912.053529.tar.bz2
tizen-platform-config-accepted/tizen/mobile/20160912.053529.zip
The upgrade script for RW update is added. Change-Id: I32fc65d550e7fec66263dfb915734de4cee99914 Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
-rw-r--r--packaging/tizen-platform-config.spec3
-rw-r--r--scripts/010.tizen-platform-config.patch.sh45
2 files changed, 48 insertions, 0 deletions
diff --git a/packaging/tizen-platform-config.spec b/packaging/tizen-platform-config.spec
index 91a3013..44972f0 100644
--- a/packaging/tizen-platform-config.spec
+++ b/packaging/tizen-platform-config.spec
@@ -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
index 0000000..b0f5606
--- /dev/null
+++ b/scripts/010.tizen-platform-config.patch.sh
@@ -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