Change the owner of /etc/skel/apps_rw to tizenglobalapp 94/68294/3
authorSemun Lee <sm79.lee@samsung.com>
Tue, 3 May 2016 09:13:46 +0000 (18:13 +0900)
committerjongmyeong ko <jongmyeong.ko@samsung.com>
Wed, 11 May 2016 01:49:45 +0000 (18:49 -0700)
app-installer that runs as tizenglobalapp will create
directories to /etc/skel/apps_rw for global applications

Change-Id: Iaa313ae496a84374ea5d07f083ddf981fa8b7d39
Signed-off-by: Semun Lee <sm79.lee@samsung.com>
packaging/pkgmgr.spec

index 6891d64..849b7d7 100644 (file)
@@ -117,6 +117,14 @@ chmod 755 %{buildroot}%{_sysconfdir}/package-manager/backend/pkgtool
 # Create tizenglobalapp user needed for global installation
 useradd %TZ_SYS_GLOBALAPP_USER -r -c "system user for common applications" -g root
 
+# change owner of TZ_USER_APP (/etc/skel/apps_rw) to tizenglobalapp
+saveHOME="$HOME"
+HOME="%{_sysconfdir}/skel"
+. "%{_sysconfdir}/tizen-platform.conf"
+
+chown %TZ_SYS_GLOBALAPP_USER:root $TZ_USER_APP
+HOME="$saveHOME"
+
 %post -n pkgmgr-client -p /sbin/ldconfig
 
 %postun -n pkgmgr-client -p /sbin/ldconfig