Package: fontconfig-config
Followup-For: Bug #962420
Control: tags -1 patch

I attach a patch that fixes this problem.

/usr/local/share/fonts will be root:staff 2775 only if 
/etc/staff-group-for-usr-local exists
>From ee17357e3fb18323d5373a575ec6cb3c77ba6a89 Mon Sep 17 00:00:00 2001
From: Your Name <y...@example.com>
Date: Fri, 4 Aug 2023 12:44:30 +0000
Subject: [PATCH] use staff group only when requested

---
 debian/fontconfig-config.postinst | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/debian/fontconfig-config.postinst 
b/debian/fontconfig-config.postinst
index 457cce5..a6e17b1 100644
--- a/debian/fontconfig-config.postinst
+++ b/debian/fontconfig-config.postinst
@@ -142,11 +142,13 @@ fi # end changes applied only for initial config / 
reconfiguration
 
 # Create /usr/local/share/fonts
 LOCALDIR=/usr/local/share/fonts
-if [ ! -d $LOCALDIR ]; then
-  if mkdir $LOCALDIR 2>/dev/null ; then
-    chmod 2775 $LOCALDIR
-    chown root:staff $LOCALDIR
-  fi
+if [ ! -d "$LOCALDIR" ]; then
+    if mkdir "$LOCALDIR" 2>/dev/null; then
+        if [ -f /etc/staff-group-for-usr-local ]; then
+            chmod 2775 "$LOCALDIR"
+            chown root:staff "$LOCALDIR"
+        fi
+    fi
 fi
 
 # fontconfig-config 2.11.0-5 (and earlier) created /etc/fonts.conf.d by mistake
-- 
2.39.2

Reply via email to