GNU bug report logs - #40114
[PATCH] services: Add fontconfig-file-system-service.

Previous Next

Package: guix-patches;

Reported by: Efraim Flashner <efraim <at> flashner.co.il>

Date: Wed, 18 Mar 2020 10:48:02 UTC

Severity: normal

Tags: patch

Done: Efraim Flashner <efraim <at> flashner.co.il>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 40114 in the body.
You can then email your comments to 40114 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#40114; Package guix-patches. (Wed, 18 Mar 2020 10:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Efraim Flashner <efraim <at> flashner.co.il>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 18 Mar 2020 10:48:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: guix-patches <at> gnu.org
Cc: Efraim Flashner <efraim <at> flashner.co.il>
Subject: [PATCH] services: Add fontconfig-file-system-service.
Date: Wed, 18 Mar 2020 12:46:26 +0200
* gnu/services/desktop.scm (%fontconfig-file-system,
fontconfig-file-system-service): New variables.
(%desktop-services): Add fontconfig-file-system-service.
---

I've been using a tmpfs mounted read-only at /var/cache/fontconfig for
months now without any problems. This adds it to %desktop-services.

---
 gnu/services/desktop.scm | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 1294d748ac..848ed25e3c 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -5,7 +5,7 @@
 ;;; Copyright © 2016 Sou Bunnbu <iyzsong <at> gmail.com>
 ;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2017 ng0 <ng0 <at> n0.is>
-;;; Copyright © 2018 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2018, 2020 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2017, 2019 Christopher Baines <mail <at> cbaines.net>
 ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen <at> yahoo.de>
@@ -36,7 +36,7 @@
   #:use-module (gnu services networking)
   #:use-module (gnu services sound)
   #:use-module ((gnu system file-systems)
-                #:select (%elogind-file-systems))
+                #:select (%elogind-file-systems file-system))
   #:use-module (gnu system)
   #:use-module (gnu system shadow)
   #:use-module (gnu system pam)
@@ -106,6 +106,8 @@
             elogind-service
             elogind-service-type
 
+            fontconfig-file-system-service
+
             accountsservice-service-type
             accountsservice-service
 
@@ -797,6 +799,25 @@ when they log out."
 
 
 ;;;
+;;; Fontconfig and other desktop file-systems.
+;;;
+
+(define %fontconfig-file-system
+  (file-system
+    (device "none")
+    (mount-point "/var/cache/fontconfig")
+    (type "tmpfs")
+    (flags '(read-only))
+    (check? #f)))
+
+;; The global fontconfig directory is unused in Guix and has been
+;; known to cause problems so we mount it read-only.
+(define fontconfig-file-system-service
+  (simple-service 'fontconfig-file-system
+                  file-system-service-type
+                  (list %fontconfig-file-system)))
+
+;;;
 ;;; AccountsService service.
 ;;;
 
@@ -1185,6 +1206,10 @@ or setting its password with passwd.")))
          ;; perform administrative tasks (similar to "sudo").
          polkit-wheel-service
 
+         ;; The global fontconfig directory is unused in Guix and has been
+         ;; known to cause problems so we mount it read-only.
+         fontconfig-file-system-service
+
          ;; NetworkManager and its applet.
          (service network-manager-service-type)
          (service wpa-supplicant-service-type)    ;needed by NetworkManager
-- 
2.25.1





Information forwarded to guix-patches <at> gnu.org:
bug#40114; Package guix-patches. (Sat, 21 Mar 2020 21:54:02 GMT) Full text and rfc822 format available.

Message #8 received at 40114 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 40114 <at> debbugs.gnu.org
Subject: Re: [bug#40114] [PATCH] services: Add fontconfig-file-system-service.
Date: Sat, 21 Mar 2020 22:53:50 +0100
Hello!

Efraim Flashner <efraim <at> flashner.co.il> skribis:

> * gnu/services/desktop.scm (%fontconfig-file-system,
> fontconfig-file-system-service): New variables.
> (%desktop-services): Add fontconfig-file-system-service.

[...]

> +(define %fontconfig-file-system
> +  (file-system
> +    (device "none")
> +    (mount-point "/var/cache/fontconfig")
> +    (type "tmpfs")
> +    (flags '(read-only))
> +    (check? #f)))
> +
> +;; The global fontconfig directory is unused in Guix and has been
> +;; known to cause problems so we mount it read-only.

What about something like:

  ;; The global fontconfig cache directory can sometimes contain stale
  ;; entries, possibly referencing fonts that have been GC’d, so mount
  ;; it read-only.

I think that’s a correct summary?  Perhaps we could link to past
discussions if we have one.

Otherwise LGTM, thank you!

Ludo’.




Reply sent to Efraim Flashner <efraim <at> flashner.co.il>:
You have taken responsibility. (Sun, 22 Mar 2020 07:11:01 GMT) Full text and rfc822 format available.

Notification sent to Efraim Flashner <efraim <at> flashner.co.il>:
bug acknowledged by developer. (Sun, 22 Mar 2020 07:11:02 GMT) Full text and rfc822 format available.

Message #13 received at 40114-done <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 40114-done <at> debbugs.gnu.org
Subject: Re: [bug#40114] [PATCH] services: Add fontconfig-file-system-service.
Date: Sun, 22 Mar 2020 09:09:29 +0200
[Message part 1 (text/plain, inline)]
On Sat, Mar 21, 2020 at 10:53:50PM +0100, Ludovic Courtès wrote:
> Hello!
> 
> Efraim Flashner <efraim <at> flashner.co.il> skribis:
> 
> > * gnu/services/desktop.scm (%fontconfig-file-system,
> > fontconfig-file-system-service): New variables.
> > (%desktop-services): Add fontconfig-file-system-service.
> 
> [...]
> 
> > +(define %fontconfig-file-system
> > +  (file-system
> > +    (device "none")
> > +    (mount-point "/var/cache/fontconfig")
> > +    (type "tmpfs")
> > +    (flags '(read-only))
> > +    (check? #f)))
> > +
> > +;; The global fontconfig directory is unused in Guix and has been
> > +;; known to cause problems so we mount it read-only.
> 
> What about something like:
> 
>   ;; The global fontconfig cache directory can sometimes contain stale
>   ;; entries, possibly referencing fonts that have been GC’d, so mount
>   ;; it read-only.
> 
> I think that’s a correct summary?  Perhaps we could link to past
> discussions if we have one.

I didn't find a canonical bug report but it was mentioned in several in
the past. I added references to two of them.

> 
> Otherwise LGTM, thank you!
> 
> Ludo’.

Thanks. Patch pushed.

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 19 Apr 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 7 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.