Add gumd_upgrade.sh for 3.0 migration. 63/87863/2 accepted/tizen/common/20160912.181145 accepted/tizen/ivi/20160912.215224 accepted/tizen/mobile/20160912.215134 accepted/tizen/tv/20160912.215150 accepted/tizen/wearable/20160912.215207 submit/tizen/20160912.022310
authorYunmi Ha <yunmi.ha@samsung.com>
Mon, 12 Sep 2016 01:13:26 +0000 (10:13 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Mon, 12 Sep 2016 01:32:47 +0000 (10:32 +0900)
gumd_upgrade.sh script will be excuted when flatform upgrade to 3.0 from 2.4.
This script only create default user's info file.

Change-Id: Ia08de528e3c90e4abe5a285d604725882852321b
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
data/Makefile.am
data/Makefile.in
data/gumd_upgrade.sh [new file with mode: 0644]
packaging/gumd.spec

index 5a66951..516856e 100644 (file)
@@ -1,6 +1,7 @@
 EXTRA_DIST = \
       gumd.conf.in \
       gumd.service \
+      gumd_upgrade.sh \
       tizen
 
 gumdconfdir = ${sysconfdir}/gumd
index 478fab4..156a24e 100644 (file)
@@ -183,7 +183,6 @@ GLIB_LIBS = @GLIB_LIBS@
 GLIB_MKENUMS = @GLIB_MKENUMS@
 GREP = @GREP@
 GTKDOC_CHECK = @GTKDOC_CHECK@
-GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@
 GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
 GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
 GTKDOC_MKPDF = @GTKDOC_MKPDF@
@@ -245,6 +244,8 @@ SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
+TZ_PLATFORM_CONFIG_CFLAGS = @TZ_PLATFORM_CONFIG_CFLAGS@
+TZ_PLATFORM_CONFIG_LIBS = @TZ_PLATFORM_CONFIG_LIBS@
 VERSION = @VERSION@
 abs_builddir = @abs_builddir@
 abs_srcdir = @abs_srcdir@
@@ -302,6 +303,7 @@ top_srcdir = @top_srcdir@
 EXTRA_DIST = \
       gumd.conf.in \
       gumd.service \
+      gumd_upgrade.sh \
       tizen
 
 gumdconfdir = ${sysconfdir}/gumd
diff --git a/data/gumd_upgrade.sh b/data/gumd_upgrade.sh
new file mode 100644 (file)
index 0000000..2526d99
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+#-----------------------------------------------#
+# gumd patch for upgrade (2.4 -> 3.0) #
+#-----------------------------------------------#
+
+# Macro
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+USERDATA_DIR=/var/lib/gumd/user
+
+# Create default user data
+mkdir -p $USERDATA_DIR
+touch $USERDATA_DIR/5001
index ff56467..10f951e 100644 (file)
@@ -116,6 +116,8 @@ rm -rf %{buildroot}
 rm -f %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
 install -m 755 -d %{buildroot}%{_sysconfdir}/%{name}
 install -m 644 data/tizen/etc/%{name}/%{name}-tizen-common.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
+install -m 755 -d %{buildroot}%{_datadir}/upgrade/scripts
+install -m 644 data/gumd_upgrade.sh %{buildroot}%{_datadir}/upgrade/scripts
 %if "%{TIZEN_PRODUCT_TV}" !=  "1"
 install -m 755 -d %{buildroot}%{_unitdir}
 install -m 644 data/gumd.service %{buildroot}%{_unitdir}
@@ -162,6 +164,8 @@ install -d -m 755 %{_localstatedir}/lib/%{name}/user
 %doc AUTHORS COPYING.LIB NEWS README
 %{_bindir}/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
+%dir %{_datadir}/upgrade/scripts
+%{_datadir}/upgrade/scripts/gumd_upgrade.sh
 %if %{dbus_type} == "system"
 %dir %{_datadir}/dbus-1/system-services
 %{_datadir}/dbus-1/system-services/*UserManagement*.service