[PATCH] services: Add fontconfig-file-system-service.

DoneSubmitted by Efraim Flashner.
Details
2 participants
  • Efraim Flashner
  • Ludovic Courtès
Owner
unassigned
Severity
normal
E
E
Efraim Flashner wrote on 18 Mar 11:46 +0100
(address . guix-patches@gnu.org)(name . Efraim Flashner)(address . efraim@flashner.co.il)
20200318104626.20381-1-efraim@flashner.co.il
* 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 formonths now without any problems. This adds it to %desktop-services.
--- gnu/services/desktop.scm | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-)
Toggle diff (70 lines)diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scmindex 1294d748ac..848ed25e3c 100644--- a/gnu/services/desktop.scm+++ b/gnu/services/desktop.scm@@ -5,7 +5,7 @@ ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2017 ng0 <ng0@n0.is>-;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>+;;; Copyright © 2018, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017, 2019 Christopher Baines <mail@cbaines.net> ;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@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
L
L
Ludovic Courtès wrote on 21 Mar 22:53 +0100
(name . Efraim Flashner)(address . efraim@flashner.co.il)(address . 40114@debbugs.gnu.org)
87zhc9wf0x.fsf@gnu.org
Hello!
Efraim Flashner <efraim@flashner.co.il> skribis:
Toggle quote (4 lines)> * gnu/services/desktop.scm (%fontconfig-file-system,> fontconfig-file-system-service): New variables.> (%desktop-services): Add fontconfig-file-system-service.
[...]
Toggle quote (11 lines)> +(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 pastdiscussions if we have one.
Otherwise LGTM, thank you!
Ludo’.
E
E
Efraim Flashner wrote on 22 Mar 08:09 +0100
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 40114-done@debbugs.gnu.org)
20200322070929.GB1685@E5400
On Sat, Mar 21, 2020 at 10:53:50PM +0100, Ludovic Courtès wrote:
Toggle quote (30 lines)> Hello!> > Efraim Flashner <efraim@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 inthe past. I added references to two of them.
Toggle quote (5 lines)> > Otherwise LGTM, thank you!> > Ludo’.
Thanks. Patch pushed.
-- Efraim Flashner <efraim@flashner.co.il> אפרים פלשנרGPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl53DygACgkQQarn3Mo9g1EfrA//SLck7B1/8VflPczbXyHMX9VogTsnRQUYtX77EqsdTmvYTVjwj675qgGHiFFFMzcX3SviGEUHOuzvZKpGJVOh7VaCaFXfGNOpK45/O8HH5/aQntiU76FW5oiOzpcX4f6Kg0NOGQAx7hIARLVJLD8GeIQuGUjW48wUUX/SEZeNr1YkZOi6C06Fa7Cf6in3EJismF+5ZEn6GsVwWp1f+ANvuXB8Ie5c1+KtSNu1MzEwYkIxzj0rXCsogmABZ7nSTy6fkSSdbTFPlZ4ebiJQRe2Ay+7fuG7qcFRJQJgisL5fJ+HJtHDuRcJi/98M0pVenQ9LLB6SALZCM7nbljKPdB2CknwZMqvFnop0QXg14S+mxetsC65UB72ZRoH1vT+AzspErVadLD2tziKVRkDtV/74SCoIMosB8froAZTKTdg89vgecTw7wU4EuA9vRHdpD2tCTInKKx35MEJsx85FO3c431YFiWY426YtQX/s52Zak3VWkbxDAhq2VALTCUCdiPcmiKDN9HPV6QciRihqiMtsYeYLlCDPJiPCkTmiM5GeESneqlEz+0bmiuMKMC9RJundCzHt18b8Zh8aDZD6/XCPSInuguugh+UTO6qi7kejOKT/ke9qVdj1XuQ7T9aKZhc3Xy/nUBVvlW2HMERv7j1xmSWTHCvBzx/9sniITjAZgpY==bx2l-----END PGP SIGNATURE-----

Closed
?