Skip to contentSkip to conversation

postinst-intercepts/update_font_cache: fix ownership of fontconfig cache

PATCH New Jonathan Liu 1 participant 1 message Mar 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 postinst-intercepts/update_font_cache: fix ownership of fontconfig cache

The file ownership of the cache files in /var/cache/fontconfig needs to be set to root:root otherwise it inherits the user and group id of the build user.

[YOCTO #7411]

---
 meta/classes/fontcache.bbclass                | 2 +-
 scripts/postinst-intercepts/update_font_cache | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
meta/classes/fontcache.bbclass +1 -1
index dcd1f04..dfbdfa1 100644
@@ -12,7 +12,7 @@ FONT_EXTRA_RDEPENDS ?= "fontconfig-utils"
 fontcache_common() {
 if [ "x$D" != "x" ] ; then
 	$INTERCEPT_DIR/postinst_intercept update_font_cache ${PKG} mlprefix=${MLPREFIX} bindir=${bindir} \
-		libdir=${libdir} base_libdir=${base_libdir}
+		libdir=${libdir} base_libdir=${base_libdir} localstatedir=${localstatedir}
 else
 	fc-cache
 fi
scripts/postinst-intercepts/update_font_cache +1 -0
index 78f3365..3907f25 100644
@@ -2,5 +2,6 @@
 
 PSEUDO_UNLOAD=1 qemuwrapper -L $D -E LD_LIBRARY_PATH=$D/${libdir}:$D/${base_libdir}\
 					$D${bindir}/fc-cache --sysroot=$D
+chown -R root:root $D${localstatedir}/cache/fontconfig
 
 
Signature · 1 line
2.3.1