From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 yLPxMp538mPx3QAAbAwnHQ (envelope-from ) for ; Sun, 19 Feb 2023 20:25:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IELKMp538mOeaAAAauVa8A (envelope-from ) for ; Sun, 19 Feb 2023 20:25:18 +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 A9CF6121B0 for ; Sun, 19 Feb 2023 20:25:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTpJ1-0005Uk-Uc; Sun, 19 Feb 2023 14:25:03 -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 1pTpJ0-0005TA-UJ for bug-guix@gnu.org; Sun, 19 Feb 2023 14:25: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 1pTpJ0-0006qv-6m for bug-guix@gnu.org; Sun, 19 Feb 2023 14:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTpJ0-0000mt-1w for bug-guix@gnu.org; Sun, 19 Feb 2023 14:25:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#32026: [PATCH v4 1/9] gnu: Add a 'update-mozilla-locales' helper for maintenance. References: <87po06puwt.fsf@gnu.org> In-Reply-To: <87po06puwt.fsf@gnu.org> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 19 Feb 2023 19:25: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: 32026@debbugs.gnu.org Cc: mhw@netris.org, ludo@gnu.org, Jonathan Brielmaier , Maxim Cournoyer Received: via spool by 32026-submit@debbugs.gnu.org id=B32026.16768346873003 (code B ref 32026); Sun, 19 Feb 2023 19:25:02 +0000 Received: (at 32026) by debbugs.gnu.org; 19 Feb 2023 19:24:47 +0000 Received: from localhost ([127.0.0.1]:49683 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTpIl-0000mN-Hr for submit@debbugs.gnu.org; Sun, 19 Feb 2023 14:24:47 -0500 Received: from mail-qt1-f179.google.com ([209.85.160.179]:39711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTpIk-0000m8-PN for 32026@debbugs.gnu.org; Sun, 19 Feb 2023 14:24:47 -0500 Received: by mail-qt1-f179.google.com with SMTP id i5so720201qtw.6 for <32026@debbugs.gnu.org>; Sun, 19 Feb 2023 11:24:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=PceRKjQWenz8l6anbU4mQSn+he9XYRU7hxj9gzK3gos=; b=J1GKSwxpBIgjisEO7oYpqXmElnG1TfcBEmW174HZzKCaCY+CA3Mj2okPioOyKtdCn2 rjI1+Q+pzMM5qHOeqZkjnm/3Z+TYmrJuX0fKVMcxV82Y4c3cEyB1Z8fH5PykPHZfaXYx FqZucpqNJZthq4alEaFnHk8PYnOiw2B8TGm1MlcffmtbYDdk7TbNkiK/KsCFXWF2qphk GLi9ZI28PHsFzDcG7mnJTuaQCEAFEwM/CtrufE/epOxWMZshXJsp77aGgFhEo7qvQc/F p8uAR23XPdNm3Y4x6CysgNHlcFCWzwCd2/wmzS/UOjaY8M/8QkMe68s1e2EWvtmrIPJ8 i4Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=PceRKjQWenz8l6anbU4mQSn+he9XYRU7hxj9gzK3gos=; b=4MAw0nGX7S88ZSD2X867Dhn9dyQ6IUqphtdbRMozvCcdHk+pMxLPBPRLSQHpU/IX3W fC/aTBA/JvVrDdWoRhYYNUyg5mVFtbF9FBJoMidHNB/K/lMUYZK6/gm87S45I9R5UukE CN1xaaGd+vYvuPjS2rdMoUdWvlPPHMzY9QkO5vhKfGiGPCzqXCJ3dhsdsLxtKEEVsc1B SbNimwOHpi5WpQBznfjN6Lm5G7IoB1AbS13kRBtN1nurho5MomcNSBfabqRkrreicGrc EiTS/Vby1rjOVbhZX4Bk2TTx7k7RR50zNsh7cZVTA3FQBFVU+QRFWh6I8s4W5gQoGPyb 0S2A== X-Gm-Message-State: AO0yUKUUagBN7BRA8R1NZCK9jB9cJ1uUQpwuPl5ILsfGVN3bw0I5JxN7 NXNpxLp59rpnb9XteT9U3nRvv8G6xhIzEA== X-Google-Smtp-Source: AK7set8uv5xkPf7DYjAvZPF6inRCaOcoJro4qeimaHzIyYTc+Nnx5V/F1PKKn+wCxKLNwbotrgLHRw== X-Received: by 2002:ac8:7fcf:0:b0:3bd:1835:b001 with SMTP id b15-20020ac87fcf000000b003bd1835b001mr16799926qtk.20.1676834681084; Sun, 19 Feb 2023 11:24:41 -0800 (PST) Received: from localhost.localdomain (dsl-158-213.b2b2c.ca. [66.158.158.213]) by smtp.gmail.com with ESMTPSA id bz18-20020a05622a1e9200b003be56bdd3b1sm3288914qtb.92.2023.02.19.11.24.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Feb 2023 11:24:40 -0800 (PST) From: Maxim Cournoyer Date: Sun, 19 Feb 2023 14:23:57 -0500 Message-Id: <20230219192405.26549-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=J1GKSwxp; 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=1676834718; a=rsa-sha256; cv=none; b=rXzpA6eEPLMM+nV1CVYRNCpzX1PKWRCEoLXZQO0O0cFd0aFkxuKp/PjaVZiLO7XBEh/eGO Kag8FX7xaJBmJRpGruF4XeJyQP2P54qqSZ7xJTZiHRTayHoDUPl2GG/lQmXPwoTu76UEIv O+ZPq7O6IfWITgmEos//DG6yY4sKX75oyh0c6WCDiDq9AwPsThfjhSSiQ+eN9ixLt6O+7M K7RCRkHfRRECX4hfbyBy2I/hiTvq1Dcp67dsYYIwc7oPv8Mo4PAOENYbBfF5HtxE656XuC bliCay3h1rS20wte9FLtF2UZT7PC1kz/PYbwTLc1McDV5+caCBu6GrX4qWi9xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676834718; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: 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:dkim-signature; bh=lBS8V8t0wwlsXqczqS0jMpfZ6F3xLnLQYlow0+W8J8s=; b=tYLqYxxuosdv2Bnf3ZCFkOx3c6gMdDrvl82XhFeWs0R8/EKHseqNNlzI7Bl9SCOo6VX01Z AHytdDUNEDJWXGHsgJ5d8MZhlBdqjQ8x87ccIgnwQIpqcP67aAtqsADZrpJPkv9XPTE5q/ 9ywyzxIr+a72h78Kz+dGA8AYESVh2EXZdNQRqazArfKIMhYG8FBIVgazQvgwkj+gdZC3tR qD+DpOo3CisCy9DwoPtX/BgO3Zc2FYUIaXMsXb82kendPQtWvPerWOh0AEAwwt6b+87UNN Tiq7DttAHkonMH1tDJv943cetzDbr8KTIrr5NOvcIJm11CQU03ZwdopPbuhjVw== X-Migadu-Spam-Score: -0.04 X-Spam-Score: -0.04 X-Migadu-Queue-Id: A9CF6121B0 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20210112 header.b=J1GKSwxp; 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-TUID: GEtm2QBGvcQU * gnu/packages/gnuzilla.scm (update-mozilla-locales): New procedure. (all-mozilla-locales): Comment how to proceed to update it. --- Changes in v4: - Strip useful comments, in the name of non-free source obfuscation gnu/packages/gnuzilla.scm | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnuzilla.scm b/gnu/packages/gnuzilla.scm index b2e0870fea..16e2208426 100644 --- a/gnu/packages/gnuzilla.scm +++ b/gnu/packages/gnuzilla.scm @@ -37,6 +37,7 @@ (define-module (gnu packages gnuzilla) #:use-module ((srfi srfi-1) #:hide (zip)) + #:use-module (ice-9 format) #:use-module (ice-9 match) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) @@ -91,7 +92,8 @@ (define-module (gnu packages gnuzilla) #:use-module (gnu packages xiph) #:use-module (gnu packages xdisorg) #:use-module (gnu packages readline) - #:use-module (gnu packages sqlite)) + #:use-module (gnu packages sqlite) + #:autoload (json parser) (json->scm)) (define-public mozjs (package @@ -348,6 +350,10 @@ (define-public mozjs-78 (inputs (list icu4c readline zlib)))) + +;;; +;;; Localization helper procedures. +;;; (define mozilla-compare-locales (origin (method hg-fetch) @@ -371,6 +377,18 @@ (define-syntax-rule (mozilla-locales (hash-string changeset locale) ...) (list (mozilla-locale locale changeset hash-string) ...)) +(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." + (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)))) + (define all-mozilla-locales (mozilla-locales ;; sha256 changeset locale base-commit: 636b771536b95d15a2fd68b468deeebac97d6bee -- 2.39.1