Upgrade: Tizen 2.4 -> 3.0 upgrade scripts 84/101084/6 accepted/tizen/3.0/base/20161209.102355 submit/tizen_3.0_base/20161202.075535
authorSunmin Lee <sunm.lee@samsung.com>
Wed, 30 Nov 2016 08:05:39 +0000 (17:05 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Fri, 2 Dec 2016 07:31:22 +0000 (16:31 +0900)
The upgrade scripts for tizen platform update are added.
They would do basic operations for RW fs migration.

Change-Id: I2af834a3c888880439c4b8fee99412e745019c8c

packaging/200.filesystem-pre.patch.sh [new file with mode: 0755]
packaging/799.filesystem-post.patch.sh [new file with mode: 0755]
packaging/filesystem.spec

diff --git a/packaging/200.filesystem-pre.patch.sh b/packaging/200.filesystem-pre.patch.sh
new file mode 100755 (executable)
index 0000000..ad7b965
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+#
+# RW update filesystem-pre script
+#
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+OWNER_HOME=/opt/usr/home/owner
+
+rm -rf /var/lock
+ln -snf /run/lock /var/lock
+
+# The operations of generic-base.post
+chown root:root /opt/var/log
+chsmack -a '*' -t /opt/var/log
diff --git a/packaging/799.filesystem-post.patch.sh b/packaging/799.filesystem-post.patch.sh
new file mode 100755 (executable)
index 0000000..3a6e9a0
--- /dev/null
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# RW update filesystem-post script
+#
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+
+rm -rf /opt/usr/live
+rm -rf /opt/driver
+rm -rf /opt/storage
+
+# Migrate user contents to 3.0 path
+. /etc/tizen-platform.conf
+export `tzplatform-get --user $TZ_SYS_DEFAULT_USER TZ_USER_CONTENT`
+CONTENTS24=/opt/usr/media
+CONTENTS30=$TZ_USER_CONTENT
+
+cp -rT --preserve=mode,timestamps $CONTENTS24/DCIM      $CONTENTS30/Camera
+cp -rT --preserve=mode,timestamps $CONTENTS24/Documents $CONTENTS30/Documents
+cp -rT --preserve=mode,timestamps $CONTENTS24/Downloads $CONTENTS30/Downloads
+cp -rT --preserve=mode,timestamps $CONTENTS24/Images    $CONTENTS30/Images
+cp -rT --preserve=mode,timestamps $CONTENTS24/Music     $CONTENTS30/Music
+cp -rT --preserve=mode,timestamps $CONTENTS24/Others    $CONTENTS30/Others
+cp -rT --preserve=mode,timestamps $CONTENTS24/Sounds    $CONTENTS30/Sounds
+cp -rT --preserve=mode,timestamps $CONTENTS24/Videos    $CONTENTS30/Videos
+
+# Remove remain garbage files
+rm -rf $CONTENTS24
+mkdir -m 755 $CONTENTS24
+chsmack -a '_' $CONTENTS24
+rm -rf /opt/home/app
index 12f9f78..0b6295c 100644 (file)
@@ -80,6 +80,9 @@ while read LANG ; do
   done
 done < %{SOURCE3}
 
+# Tizen 2.4 to 3.0 upgrade scripts
+install -m 755 %{_sourcedir}/200.filesystem-pre.patch.sh %{buildroot}/usr/share/upgrade/scripts/
+install -m 755 %{_sourcedir}/799.filesystem-post.patch.sh %{buildroot}/usr/share/upgrade/scripts/
 
 %pretrans -p <lua>
 --#