From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kIteEt4Z5mBPWwAAgWs5BA (envelope-from ) for ; Wed, 07 Jul 2021 23:17:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id ABMRDt4Z5mB7CAAA1q6Kng (envelope-from ) for ; Wed, 07 Jul 2021 21:17:18 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B17AA1D924 for ; Wed, 7 Jul 2021 23:17:17 +0200 (CEST) Received: from localhost ([::1]:40870 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Eux-0004G4-IZ for larch@yhetil.org; Wed, 07 Jul 2021 17:17:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Euk-0004CD-B2 for guix-patches@gnu.org; Wed, 07 Jul 2021 17:17:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42105) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1Euk-0004cc-3V for guix-patches@gnu.org; Wed, 07 Jul 2021 17:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1Euj-0004uZ-Rj for guix-patches@gnu.org; Wed, 07 Jul 2021 17:17:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49107] [PATCH core-updates] gnu: fontconfig: Use (locally) deterministic caching Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jul 2021 21:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49107 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sarah Morgensen Cc: 49107@debbugs.gnu.org Received: via spool by 49107-submit@debbugs.gnu.org id=B49107.162569258318822 (code B ref 49107); Wed, 07 Jul 2021 21:17:01 +0000 Received: (at 49107) by debbugs.gnu.org; 7 Jul 2021 21:16:23 +0000 Received: from localhost ([127.0.0.1]:53651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1Eu7-0004tV-DS for submit@debbugs.gnu.org; Wed, 07 Jul 2021 17:16:23 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1Eu2-0004tG-Sg for 49107@debbugs.gnu.org; Wed, 07 Jul 2021 17:16:21 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:46186) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1Etv-0004W0-No; Wed, 07 Jul 2021 17:16:11 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42806 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1Etv-0008Q4-GU; Wed, 07 Jul 2021 17:16:11 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Wed, 07 Jul 2021 23:16:09 +0200 In-Reply-To: (Sarah Morgensen's message of "Fri, 18 Jun 2021 17:52:05 -0700") Message-ID: <87sg0pomee.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625692637; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=YXb2YWM7Tod3MxcjlMxAtuuFb1OcSgRpeaGxaopO+Ws=; b=bXIL4rra1v80DBzVcO+ej+rRO5qPu4UmJVPEkzBmdRVKKrTc0+K2zVcYXRUVa+b4xAeS93 SJP4rvZ5tAV+0ZWqlRwWfSNcNjXRfXW7XF8i11j4dj+++NYEVqEX16t7LGKGl598xMNdVG +iCTuwt9i+i0rPZRtbBSeB92WM9nNzqFH18s41VWao9cm2DaTBM5GAxNKQFOtcLM/e7PbX gkNA2xHUX7yfujqBDbIhQXXXJ5BLnL1Uru1bRK3//fkqJs6yuu96lqKMGMFhlNwj+7r47G SD21RQ7CIlBESJ8qM07MK4cebr94WQ2i4OEW8xMLsYnKWdTbaW3JMXmp5ifSpA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625692637; a=rsa-sha256; cv=none; b=InPXrLoontRtp4VeTzURpTyvfa8lURDixz0N9FOKomwn41DR9D1+5GQjoc+oQJcuKPO/2y tgjAefHwNBKyNwV9VY2A/SxbtlyvwxZnIsnJlsEqad/tWnMAgYklLbWeW3Sva0/HJZpYij 1EKeHai1SBdNg6uKpFdou63XfS0SM1vDSdSCWtPxChVJ0im1Cy8aaw0sFZbY9NUtFNmhQK JOpBTn9YfWWw44HhohRrO4HIQ6AgTGNHi7T9RGVKh8J1m7lF6elwrM8Jj9mAo+wk1CNOlH 7B8nAFO6n2EY13Kw+uay1RnMSqyAmmHQW+N8kwJ0++JtOxWu1OSfzDOENZgcNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.91 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: B17AA1D924 X-Spam-Score: -2.91 X-Migadu-Scanner: scn0.migadu.com X-TUID: j+gNWC0XR9/w Hi, Sarah Morgensen skribis: > Make fontconfig use directory contents rather than modification time to > determine cache validity (by pretending that mtime is broken). > > * gnu/packages/patches/fontconfig-cache-ignore-mtime.patch: New file. > * gnu/local.mk (dist_patch_DATA): Register it. > * gnu/packages/fontutils.scm (fontconfig)[source]: Use it. > [arguments]: Unset SOURCE_DATE_EPOCH for tests. > --- > gnu/local.mk | 1 + > gnu/packages/fontutils.scm | 7 ++++++- > .../patches/fontconfig-cache-ignore-mtime.patch | 15 +++++++++++++++ > 3 files changed, 22 insertions(+), 1 deletion(-) > create mode 100644 gnu/packages/patches/fontconfig-cache-ignore-mtime.pa= tch > > Hello Guix, > > This patch attempts to make fontconfig's caching work seamlessly on Guix, > instead of requiring users to manually run `fc-cache -f` after installing= or > removing fonts. This addresses . > > Fontconfig usually uses a directory's mtime as its checksum. However, when > fontconfig detects a "broken mtime" filesystem, it will generate a direct= ory > checksum from the directory listing contents. This is slightly slower, as= it has > to stat all the files in all font directories. Unconditionally enabling t= his > mode should get us more regular behavior. Nice, sounds like an improvement! Does Fontconfig stats all these files every time an application starts? Did you compare =E2=80=98strace -c some app=E2=80=99 with and without this = change, to get an idea of what it costs? > I am not confident this method is fully deterministic; particular filesys= tem > capabilities may still be an implicit imput in the checksums. This should= only > matter when distributing pre-generated caches. > > Fontconfig does honor SOURCE_DATE_EPOCH, but without a reliable mtime, > fontconfig has no way of knowing when to update such a cache. SOURCE_DATE= _EPOCH > is now disabled for the tests because they assume working cache invalidat= ion. So tests fail is we leave SOURCE_DATE_EPOCH, right? Thanks for addressing this longstanding issue! (And apologies for the delay=E2=80=A6 Now=E2=80=99s a good time to get semi-high-level changes li= ke this one in =E2=80=98core-updates=E2=80=99.) Ludo=E2=80=99.