From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Stateful system directories Date: Tue, 22 Oct 2019 15:27:10 +0200 Message-ID: <87zhhs29n5.fsf@gnu.org> References: <20191018073501.GB1224@E5400> <87ftjosas6.fsf@gnu.org> <20191020090356.GA2275@E5400> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:35922) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMuBu-0007jk-I2 for guix-devel@gnu.org; Tue, 22 Oct 2019 09:27:15 -0400 In-Reply-To: <20191020090356.GA2275@E5400> (Efraim Flashner's message of "Sun, 20 Oct 2019 12:03:56 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Efraim Flashner Cc: guix-devel@gnu.org Howdy! Efraim Flashner skribis: > On Sat, Oct 19, 2019 at 11:08:57PM +0200, Ludovic Court=C3=A8s wrote: >> Hello Efraim, >>=20 >> Efraim Flashner skribis: >>=20 >> > Ignoring the directories in users' home directories, /var/lib/gdm has >> > been a source of pain on GNOME upgrades, and we still have some proble= ms >> > with /var/cache/fontconfig and I believe there is something else with >> > permissions if you switch between ntp and openntpd. I actually have the >> > following snippet in my OS-config: >> > >> > ;; This directory shouldn't exist >> > (file-system >> > (device "none") >> > (mount-point "/var/cache/fontconfig") >> > (type "tmpfs") >> > (flags '(read-only)) >> > (check? #f)) >>=20 >> I think that would work, or we could even make it a writable tmpfs? > > I got angry with it and wanted to see if I could generate any error > messages. :) So far nothing. Of course there isn't a compelling reason > to really make it read-only if we recreate it each time, and it should > cut down on bugs for other directories. Yup, let=E2=80=99s do that. >> (Somehow, I do have /var/cache/fontconfig, but never hard any problems >> with it. It hasn=E2=80=99t been written to in months, and it=E2=80=99s = only writable by >> root anyway. Does that mean that people run into problem when they run >> GUIs as root?) > > I have it too, not sure from what. I'm guessing some of the packages > which have fontconfig as an input get a dbus-something to create the > directory if it's missing. Heh, these dbus things doing stuff behind our back. :-) >> > While we work on fixing these does it make sense to modify some of the= se >> > services to unconditionally recreate their home directories on >> > boot/activation? >>=20 >> Like /var/lib/gdm? Maybe. Or maybe =E2=80=98gdm-service-type=E2=80=99 = could extend >> =E2=80=98file-system-service-type=E2=80=99 with a tmpfs for /var/lib/gdm? >>=20 > > Sounds like a good idea. Would that also cause the directory to be > removed if gdm is removed? It should create a tmpfs and mount it over an > existing /var/lib/gdm, right? Yes. So the directory won=E2=80=99t be removed if gdm is removed, but that= =E2=80=99s fine, it=E2=80=99ll just be an empty directory sitting there. >> I suppose that might increase startup time a bit since it=E2=80=99d be >> rebuilding its cache every time. Perhaps we=E2=80=99d also lose bits of= state, >> no? > > The increase in startup time should be negligible, and according to > rekado, who seems to run into GDM issues the most, removing /var/lib/gdm > is one of the first steps when upgrading gnome or debugging gdm issues. Yeah, it=E2=80=99s a tradeoff, but we should try it on the bare metal to ge= t a feel. There=E2=80=99s quite a bit of data in there that we=E2=80=99d be re= creating at each boot: --8<---------------cut here---------------start------------->8--- $ sudo ls -l /var/lib/gdm/.cache totalo 16 drwxr-xr-x 2 gdm gdm 4096 Sep 19 08:45 fontconfig drwxr-xr-x 3 gdm gdm 4096 Apr 11 2019 ibus drwx------ 2 gdm gdm 4096 Apr 1 2019 libgweather drwxr-xr-x 97 gdm gdm 4096 Sep 19 08:45 mesa_shader_cache --8<---------------cut here---------------end--------------->8--- If you give it a spin, let us know how it goes! Ludo=E2=80=99.