Make system cache folder in the post field of installation
authorYoungbok Shin <youngb.shin@samsung.com>
Fri, 18 Nov 2016 08:58:20 +0000 (17:58 +0900)
committerJEONGHYUN YUN <jh0506.yun@samsung.com>
Thu, 29 Dec 2016 10:36:40 +0000 (19:36 +0900)
Change-Id: I89c268c2f6822cd45d4a71d4ae91c9c541cfeb97

packaging/fontconfig.conf
packaging/fontconfig.spec

index c986446..dbec49d 100644 (file)
@@ -1,5 +1,3 @@
-t      /opt/var/cache/fontconfig       -       -       -       -       security.SMACK64="User::App::Shared"
-t      /opt/var/cache/fontconfig       -       -       -       -       security.SMACK64TRANSMUTE="TRUE"
 d      /opt/share/fonts        0755    app_fw  users
 t      /opt/share/fonts        -       -       -       -       security.SMACK64="User::App::Shared"
 t      /opt/share/fonts        -       -       -       -       security.SMACK64TRANSMUTE="TRUE"
index 1511de7..334b445 100644 (file)
@@ -98,6 +98,12 @@ mkdir -p %{TZ_SYS_RO_SHARE}/fonts
 mkdir -p %{TZ_SYS_RO_SHARE}/fallback_fonts
 mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
 
+mkdir -p %{TZ_SYS_VAR}/cache/fontconfig
+chown root:root %{TZ_SYS_VAR}/cache/fontconfig
+chmod 755 %{TZ_SYS_VAR}/cache/fontconfig
+chsmack -t %{TZ_SYS_VAR}/cache/fontconfig
+chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig
+
 # Skip making fontconfig cache folder for users. (/opt/home/app/.cache)
 # The path will be changed according to a name of user.
 #rm -rf %{TZ_USER_CACHE}/fontconfig
@@ -120,9 +126,6 @@ mkdir -p %{TZ_SYS_RO_SHARE}/app_fonts
 # The HOME setting is to avoid problems if HOME hasn't been reset
 if [ -x %{TZ_SYS_BIN}/fc-cache ] && %{TZ_SYS_BIN}/fc-cache --version 2>&1 | grep -q %{version} ; then
 fc-cache -rf --system-only
-chsmack -t %{TZ_SYS_VAR}/cache/fontconfig
-chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig
-chsmack -a User::App::Shared %{TZ_SYS_VAR}/cache/fontconfig/*
 fi
 
 %postun -p /sbin/ldconfig