From f0cfb308617e55f2c8f8fb9a705ec5992dc53dce Mon Sep 17 00:00:00 2001 From: Yunmi Ha Date: Mon, 12 Sep 2016 10:13:26 +0900 Subject: [PATCH] Add gumd_upgrade.sh for 3.0 migration. 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 --- data/Makefile.am | 1 + data/Makefile.in | 4 +++- data/gumd_upgrade.sh | 13 +++++++++++++ packaging/gumd.spec | 4 ++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 data/gumd_upgrade.sh diff --git a/data/Makefile.am b/data/Makefile.am index 5a66951..516856e 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,6 +1,7 @@ EXTRA_DIST = \ gumd.conf.in \ gumd.service \ + gumd_upgrade.sh \ tizen gumdconfdir = ${sysconfdir}/gumd diff --git a/data/Makefile.in b/data/Makefile.in index 478fab4..156a24e 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -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 index 0000000..2526d99 --- /dev/null +++ b/data/gumd_upgrade.sh @@ -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 diff --git a/packaging/gumd.spec b/packaging/gumd.spec index ff56467..10f951e 100644 --- a/packaging/gumd.spec +++ b/packaging/gumd.spec @@ -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 -- 2.7.4