From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EE7cONPl7mNwBQEAbAwnHQ (envelope-from ) for ; Fri, 17 Feb 2023 03:26:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id OPrgN9Pl7mPbywAAG6o9tA (envelope-from ) for ; Fri, 17 Feb 2023 03:26:27 +0100 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 965D33F9BB for ; Fri, 17 Feb 2023 03:26:27 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSqRp-00040J-0k; Thu, 16 Feb 2023 21:26:05 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSqRn-0003yb-M3 for bug-guix@gnu.org; Thu, 16 Feb 2023 21:26:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSqRm-0002w0-Sn for bug-guix@gnu.org; Thu, 16 Feb 2023 21:26:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSqRm-0008N5-8j for bug-guix@gnu.org; Thu, 16 Feb 2023 21:26:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Feb 2023 02:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 32026 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mark H Weaver Cc: 32026@debbugs.gnu.org, ludo@gnu.org, Jonathan Brielmaier Received: via spool by 32026-submit@debbugs.gnu.org id=B32026.167660071832125 (code B ref 32026); Fri, 17 Feb 2023 02:26:02 +0000 Received: (at 32026) by debbugs.gnu.org; 17 Feb 2023 02:25:18 +0000 Received: from localhost ([127.0.0.1]:38107 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSqR4-0008M5-3d for submit@debbugs.gnu.org; Thu, 16 Feb 2023 21:25:18 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:36811) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSqR2-0008Lo-10 for 32026@debbugs.gnu.org; Thu, 16 Feb 2023 21:25:16 -0500 Received: by mail-qt1-f180.google.com with SMTP id t16so1693206qto.3 for <32026@debbugs.gnu.org>; Thu, 16 Feb 2023 18:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=crONdxzpHtQOGi8hP9orynMyNSu4I4rXrco5QHxpBGQ=; b=QnKfB+bljwmIgYYnJ2e+0NZobxxfWfXxeSz5j+Ji8xCLkrT2pl5WR5kQXlM5wCimDL XDb0kDfH5TWFGBRSG0cZZQ4kXjlW8AzW7ELctQLWdSSSHVXKmoRk8jsohC92DfN14zaA as5ipllLpxAGJWyzm6lF/492gAandEoTcuCcIaH8BIwRl4de8CmtRlfmNdQ3D4sotwsD NVaGdQY/CO1p1ceaqjj63OTmloy+6JWwCB1mpgLQ4+hE26NThfGN5o2JuC9b0gS/7YvT 2pHLyjotVwhCWmW00HtaeM7subrWAKCav0qFJSN8eUT0YgIxKIrjqykRvzUQ8Moq7FXb FKxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=crONdxzpHtQOGi8hP9orynMyNSu4I4rXrco5QHxpBGQ=; b=GXvfAP3+AeJPa1gexUY5W7EM+r0BGZWodmDgjYghvn9varoIUWmDe8AdV8EI0meH9H a9P8tf+5C4MdyalAplZ2lAkYq9z+6+bPJBFsuGp/7k8o/fMiCQ5LH1+TSFwiHr7j2mtg mKixVXO39/rHM/deLh3Yb+TVuDpOPrakBXoW7U6PEhAaC/XzCELlL0C5hwJCJF2WV8lA +r1PXPSVuoM32kIbd9qRnPIuWtCPPGFw7/dLCqivVRF8TpDnCoMhxBshJUbEm5lDUyu4 FTAmxHUzrFEsctaMXDokogDRAftfLt4EvzdC9WNo3HxOYsv+3adVhRZepQEqRMZUM4+4 lXjg== X-Gm-Message-State: AO0yUKXTIs+6CaiaGvRGZ9hq5jqfKmhlJusGRE25WuW6wUhXGO7fX8WO bpYjV9Wrq2l3j7S/4Ps94IY= X-Google-Smtp-Source: AK7set/M/IY8yAEUpxXxoM6Y6wpUVaMlnzEIAvm082dgWLGtu/XNxTTCxtWxM9B2gpOJ2ihZEyG6Ww== X-Received: by 2002:ac8:5c82:0:b0:3b8:5f26:e81f with SMTP id r2-20020ac85c82000000b003b85f26e81fmr7364429qta.26.1676600710452; Thu, 16 Feb 2023 18:25:10 -0800 (PST) Received: from hurd (dsl-152-188.b2b2c.ca. [66.158.152.188]) by smtp.gmail.com with ESMTPSA id g9-20020ac84b69000000b003b9bb59543fsm2346605qts.61.2023.02.16.18.25.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 18:25:10 -0800 (PST) From: Maxim Cournoyer References: <20230216043649.32119-1-maxim.cournoyer@gmail.com> <87mt5dfeqa.fsf@netris.org> Date: Fri, 17 Feb 2023 03:25:05 +0100 In-Reply-To: <87mt5dfeqa.fsf@netris.org> (Mark H. Weaver's message of "Thu, 16 Feb 2023 17:05:06 -0500") Message-ID: <87wn4ht4e6.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=QnKfB+bl; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676600787; a=rsa-sha256; cv=none; b=VxJdwcZyuhHRiE6STaYIIbsGDbJnGMfrjDA9BjLsvKsieQSH+CHZL39R0xebvWMaax2wpA f0wRkGksxL0KWGIfASDMSja++PtA3Kg9cylXK2QNyq6SYPFigHamfnPx3J+YLqAUUVPmVo AQtTxFkEagtllQtMaaoJxSZkaivw5VgGEYYjOkK9rOPeNWvXUpMPTz+x5Tw5DR6O3l9XoS vxwFWPrYdm9m61K9FZzF0M8FMuscMRrVXS1resbLF8eLJ1CqB5kjlJG1luHTfLz8y5oWca vEBhATlS+xVWcICtSB1LKSIshzbnmozoOXz5RCOmVyHRKpVudP7qPVo0UXHbNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676600787; 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: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: dkim-signature; bh=crONdxzpHtQOGi8hP9orynMyNSu4I4rXrco5QHxpBGQ=; b=YVFvExJMYwbBGJk2mCncoq7HGFbjuKNLf1HjoykJZJjEiInY4lPXlfUSJZ5q/yJgkZrbQV Z+eafl+labyCz9jZeZmdZyP4HH5Xn/8XoB6uJSj2ZIi/AD7E+3vvkHnfzmL9Z0ICRIwkhu rz4RSs3/R7c1evDotWvCgWM1q0Y78DZi0FC3yvB3vCiKfMJIm6Q13dWZKs/XbxFslChoDc DWf1TsHNm1h3IoLe482Ot+PR35A36li71JOJ9RIQqNLMVfEE7J/mTw173wSuspYSjGhMOn oWe1ewUcKxGaeuu6VOZxXRCnB5W1eTHqgHdXUuxLkxEx8XztAClj76qcgTonFA== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=QnKfB+bl; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.77 X-Spam-Score: -2.77 X-Migadu-Queue-Id: 965D33F9BB X-TUID: X26iwoy3Sa3C Hi Mark, Mark H Weaver writes: > Hi Maxim, > > Maxim Cournoyer writes: > >> * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. >> (all-mozilla-locales): Comment how to proceed to update it. > > [...] > >> +(define (update-mozilla-locales changesets.json) >> + "Output a new list of Mozilla locales, to update the ALL-MOZILLA-LOCALES >> +variable defined bellow. It requires guile-json to be installed." >> + ;; To extract the file used as argument, do: >> + ;; tar -xf $(./pre-inst-env guix build \ >> + ;; -e '(@@ (gnu packages gnuzilla) upstream-firefox-source)') \ >> + ;; --strip-components=3 \ >> + ;; --wildcards '*/browser/locales/l10n-changesets.json' >> + (match (call-with-input-file changesets.json json->scm) >> + (((lang ("revision" . revision) platforms pin) ...) >> + (let ((data (reverse (map (lambda (rev lang) >> + `(,(list->string (make-list 40 #\0)) >> + ,(string-take rev 12) ,lang)) >> + revision lang)))) >> + (format #t "~{~s~%~}" data) >> + data)))) > > Thanks very much for this! I didn't know about the > browser/locales/l10n-changesets.json file, and neither does the code in > the upstream 'makeicecat' script, which simply uses "hg clone" to fetch > the latest revisions at the time the 'makeicecat' script is run. Now we > can change that code to use the revisions listed in > 'l10n-changesets.json' instead, and thus eliminate a source of > nondeterminism for non-Guix users of IceCat. > > However, I'd like to propose a different way to make use of this code. > > Instead of adding this new toplevel procedure that must be run manually, > which involves steering the user toward the 'upstream-firefox-source' > variable (which therefore must be promoted to a toplevel binding), all > of which makes me extremely uncomfortable, how about the following: > > I propose adding a check to the code that populates the l10n directory > in 'icecat-source'. That code has access to the unpacked firefox source > directory, and already makes use of '#+all-mozilla-locales'. It's in a > perfect position to check whether '#+all-mozilla-locales' is up-to-date > w.r.t. browser/locales/l10n-changesets.json. > > My suggestion would be this: if '#+all-mozilla-locales' is not > up-to-date, print an error report with the relevant information and > force the derivation to *fail*. > > What do you think? If the idea sounds good to you, would you like to > work on it, or should I? It's a good idea, but I don't think it's worth implementing at this point, given that Mozilla will soon provide us with a strings_all.tar.zst tarball per release, which will include both Firefox and Thunderbird l10n data (it'll be available along the releases tarball) [0]. This will obsolete all this tedious work of keeping hashes up to date. [0] https://bugzilla.mozilla.org/show_bug.cgi?id=1817086 -- Thanks, Maxim