From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2MNBDhWp7mNFYQEAbAwnHQ (envelope-from ) for ; Thu, 16 Feb 2023 23:07:17 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 8EWFDRWp7mPjSQEAG6o9tA (envelope-from ) for ; Thu, 16 Feb 2023 23:07:17 +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 174792CFFF for ; Thu, 16 Feb 2023 23:07:15 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSmPA-0003ea-QS; Thu, 16 Feb 2023 17:07:04 -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 1pSmP8-0003eM-IC for bug-guix@gnu.org; Thu, 16 Feb 2023 17:07:02 -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 1pSmP8-0006pf-Az for bug-guix@gnu.org; Thu, 16 Feb 2023 17:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSmP7-0001Ol-Ns for bug-guix@gnu.org; Thu, 16 Feb 2023 17:07:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH 01/10] gnu: Add a 'update-mozilla-locales' helper for maintenance. Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 16 Feb 2023 22:07:01 +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: Maxim Cournoyer , 32026@debbugs.gnu.org Cc: ludo@gnu.org, Jonathan Brielmaier , Maxim Cournoyer Received: via spool by 32026-submit@debbugs.gnu.org id=B32026.16765851755314 (code B ref 32026); Thu, 16 Feb 2023 22:07:01 +0000 Received: (at 32026) by debbugs.gnu.org; 16 Feb 2023 22:06:15 +0000 Received: from localhost ([127.0.0.1]:37841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSmOM-0001Ne-OV for submit@debbugs.gnu.org; Thu, 16 Feb 2023 17:06:15 -0500 Received: from world.peace.net ([64.112.178.59]:37564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSmOG-0001NM-F0 for 32026@debbugs.gnu.org; Thu, 16 Feb 2023 17:06:13 -0500 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSmO8-0001Od-O7; Thu, 16 Feb 2023 17:06:00 -0500 From: Mark H Weaver In-Reply-To: <20230216043649.32119-1-maxim.cournoyer@gmail.com> References: <20230216043649.32119-1-maxim.cournoyer@gmail.com> Date: Thu, 16 Feb 2023 17:05:06 -0500 Message-ID: <87mt5dfeqa.fsf@netris.org> 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=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676585236; a=rsa-sha256; cv=none; b=SKbjI4jJkiVhMGotYPNl0U6FwBpK8osNIMoA5aNs2YznnaCt8hjFzUZnQqs2ezIMC+NcVq fwyCNP5BvC1WcrG+55f385MrQ9zUwILTowu+ZnbdFtlnZjCotXabeWmDnak6JzMuhjURCA f6U1svqbGgJGZhafyQkjrr0g5w1VqMKkKhH4wR7oq9MXPJNgFLr6QdJbzoycpEb7SF2Wjt XE+myLQh3W3lqdTDjeQSl+H+xET/sgmd78El2b1h3POlboDin4akZf8C4ZWUP+GBpRr5Ni RaRbfEikGt6GokQPEcvliQ3eB/ybeVrJ/URCMPe7sb1+/h30WLzUNI1En0h5qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676585236; 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; bh=CLi+YnZBsc9pNWTNJgQXIIWFnMgJpzaaHdCEUN3mMuM=; b=SCCNibG23+PIpYAzs3/yLFJ+5yWOJkzU/AeOtf9/SuF/ocp2htrMgYYijF72qdmoq64AxE qEj17+2fyLWcNPYtkt8cYAkmhm/8nT+xgDnT3d/CtP/mWYClybPHntsuOoejSYmbr0Exrt Fb2+DV/NIyGKbLLzd+Urarqxojnrtb10aKUEkYR+RARweFVp6rX52Q2jmwFiTonphN9cru PcLwg5ASiQqk0RH39bIzBF4HaOj9XxZ/dyWfIS1ZCB8XBxfQpzZoW4L3qaiu3v0NlXKBH2 R5ym39RyUD6fvOvDRofVYcTRdn5mLdBWB5mRcqHWT1KV0NJ+bj80fUP+1EbGaQ== Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none X-Migadu-Spam-Score: 0.43 X-Spam-Score: 0.43 X-Migadu-Queue-Id: 174792CFFF X-Migadu-Scanner: scn1.migadu.com X-TUID: coV3JNL8NR75 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? Thanks again for your work on this! Regards, Mark