From patchwork Mon Apr 8 14:24:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 62848 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id A992627BBE9; Mon, 8 Apr 2024 15:26:38 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 05F9627BBE2 for ; Mon, 8 Apr 2024 15:26:38 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtpwj-0006hM-F0; Mon, 08 Apr 2024 10:26:05 -0400 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 1rtpwh-0006YV-Tn for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtpwa-0004iD-KE for guix-patches@gnu.org; Mon, 08 Apr 2024 10:25:57 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtpwh-0000uT-W8 for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70280] [PATCH 1/5] system: Remove =?utf-8?b?4oCYZ2xpYmMtMi4z?= =?utf-8?b?M+KAmQ==?= from =?utf-8?b?4oCYJWRlZmF1bHQtbG9jYWxlLWxpYmNz4oCZ?= =?utf-8?b?Lg==?= Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Apr 2024 14:26:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70280@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 70280-submit@debbugs.gnu.org id=B70280.17125863043054 (code B ref 70280); Mon, 08 Apr 2024 14:26:03 +0000 Received: (at 70280) by debbugs.gnu.org; 8 Apr 2024 14:25:04 +0000 Received: from localhost ([127.0.0.1]:47326 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvj-0000mr-0g for submit@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvg-0000lP-Im for 70280@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtpvT-0004Fn-Mt; Mon, 08 Apr 2024 10:24:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=iInYKZnw2sG35iq5Ac97U/eZS5uePUVEBFaUaxhr9s4=; b=qls7Kdyw6BJhFCZ6PmKS 5H3jLdsXa/2QeWS8to7D2TAX91tyiiZlRtgUx2vWuFcnwLqw6BxnMIi+1geYqUqdSdGlh6id5+Rg+ iEwUs1+RUnLqFPyNSGMtLURKGBmt6hffsHgNiBawLbQ3j4P53giMnzVi4TfVMYcjSfE4/RnR82I3k jTqn6zYN6s0y+dVlbqO18KKs0Me08LwC93fxch/Na27j+NVyxuMq5qoC2qj/fm+Dy1XAd7gBuWusz NlNlHbm0fzTOUygwvFeM6RHyyEI6FWlcgFTyV3m1hAepQi38i3fNHOVNyUT694+B/NY+BH8Sr8hPh eCEjWP8OutftJw==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 8 Apr 2024 16:24:31 +0200 Message-ID: <41f0a119e008fff73ae97faa3f55e5b8faf4ba2d.1712585810.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The transition from glibc 2.33 to 2.35 was done in c919bfefd98bf2e29549539b4e28e6dc2a8a6f32 (one year ago), so we can assume that the backward-compatible locales are no longer needed by default. This removes 92 MiB from the system closure. * gnu/system/locale.scm (%default-locale-libcs): Remove GLIBC-2.33. Change-Id: I85948bbe6b2d424f9f158eeafdb5543688c66c6b --- gnu/system/locale.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm index bc572baeb9..4ea82e24d5 100644 --- a/gnu/system/locale.scm +++ b/gnu/system/locale.scm @@ -150,7 +150,7 @@ (define %default-locale-libcs ;; The libcs for which we build locales by default. (if (system-hurd?) (list glibc/hurd) - (list glibc-2.33 glibc))) + (list glibc))) (define %default-locale-definitions ;; Arbitrary set of locales that are built by default. They are here mostly From patchwork Mon Apr 8 14:24:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 62849 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 65C6A27BBEA; Mon, 8 Apr 2024 15:26:43 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C842727BBE2 for ; Mon, 8 Apr 2024 15:26:42 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtpwp-0006lK-Hc; Mon, 08 Apr 2024 10:26:12 -0400 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 1rtpwh-0006Ye-Tm for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtpwb-0004iE-4L for guix-patches@gnu.org; Mon, 08 Apr 2024 10:25:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtpwi-0000ud-GM for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70280] [PATCH 2/5] system: =?utf-8?q?=E2=80=98operating-system?= =?utf-8?q?-locale-definitions=E2=80=99?= includes the =?utf-8?b?T1PigJk=?= locale. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Apr 2024 14:26:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70280@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 70280-submit@debbugs.gnu.org id=B70280.17125863083085 (code B ref 70280); Mon, 08 Apr 2024 14:26:04 +0000 Received: (at 70280) by debbugs.gnu.org; 8 Apr 2024 14:25:08 +0000 Received: from localhost ([127.0.0.1]:47332 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvn-0000nX-Er for submit@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvh-0000lY-CC for 70280@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtpvU-0004G5-JS; Mon, 08 Apr 2024 10:24:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=dNLoZne8UhuMwX71QqUqHTzRrS7ci50aViBq89NAu+g=; b=TVh8uvhg8pRevsrFFNs6 G+OsUy0cmlBV9LHEKT6qvnSzq0945eVaMmbGDqW9TDdFpCzqOrOPjfMjy3pRk/vmVC0hBQXfmLGbL s5/0JAN7GzUWrr/19CxzcxbioxXDCJC4NxZefoDgJBLMCSyyfz7ulfRAKjpsCukOPs4NzNo8rnREB sKJLhw+bsQ4jryoSS/fufaeKJHGUIy3kKACbggxc2ktc8z9NaLgB3msy3iPn/j4N1S0W2AQCjkTzd /AlaTNUsUDsAOrcvBvpOik4F1ulSChrczglRbFO4BEGCCwe2qcRzqS9/futUC+4/yTLXt2adP/jUu cip0ZUaRI9Nclg==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 8 Apr 2024 16:24:32 +0200 Message-ID: <184c38bf07d985a8831f60024a2ae94e2fd6804d.1712585810.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system.scm ()[locale-definitions]: Mark as thunked. Default to (operating-system-default-locale-definitions os). (operating-system-default-locale-definitions): New procedure. (operating-system-locale-directory): Remove logic to add the OS ‘locale’, instead assuming (operating-system-locale-directory os) has everything. * doc/guix.texi (operating-system Reference): Adjust accordingly. Change-Id: I8798fa0de7421e0bfc07870cc3cae6b7f99fa47d --- doc/guix.texi | 3 ++- gnu/system.scm | 28 +++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 5827e0de14..7ca06046ba 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -17502,7 +17502,8 @@ operating-system Reference The name of the default locale (@pxref{Locale Names,,, libc, The GNU C Library Reference Manual}). @xref{Locales}, for more information. -@item @code{locale-definitions} (default: @code{%default-locale-definitions}) +@item @code{locale-definitions} (default: @ + @code{(operating-system-default-locale-definitions os)}) The list of locale definitions to be compiled and that may be used at run time. @xref{Locales}. diff --git a/gnu/system.scm b/gnu/system.scm index aef81d8ccf..94d734b014 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -282,7 +282,9 @@ (define-record-type* operating-system (locale operating-system-locale ; string (default "en_US.utf8")) (locale-definitions operating-system-locale-definitions ; list of - (default %default-locale-definitions)) + (thunked) + (default (operating-system-default-locale-definitions + this-operating-system))) (locale-libcs operating-system-locale-libcs ; list of (default %default-locale-libcs)) (name-service-switch operating-system-name-service-switch ; @@ -1397,22 +1399,22 @@ (define (locale-name->definition* name) (raise (formatted-message (G_ "~a: invalid locale name") name))) (def def))) +(define (operating-system-default-locale-definitions os) + "Return the default locale definitions for OS, which includes that specified +in its 'locale' field." + (define name + (operating-system-locale os)) + + (if (member name (map locale-definition-name %default-locale-definitions)) + %default-locale-definitions + (cons (locale-name->definition* name) + %default-locale-definitions))) + (define (operating-system-locale-directory os) "Return the directory containing the locales compiled for the definitions listed in OS. The C library expects to find it under /run/current-system/locale." - (define name - (operating-system-locale os)) - - (define definitions - ;; While we're at it, check whether NAME is defined and add it if needed. - (if (member name (map locale-definition-name - (operating-system-locale-definitions os))) - (operating-system-locale-definitions os) - (cons (locale-name->definition* name) - (operating-system-locale-definitions os)))) - - (locale-directory definitions + (locale-directory (operating-system-locale-definitions os) #:libcs (operating-system-locale-libcs os))) (define* (kernel->boot-label kernel #:key hurd) From patchwork Mon Apr 8 14:24:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 62846 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E09E827BBEC; Mon, 8 Apr 2024 15:26:20 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5A82927BBE2 for ; Mon, 8 Apr 2024 15:26:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtpwq-0006oR-Fw; Mon, 08 Apr 2024 10:26:14 -0400 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 1rtpwi-0006Z6-0A for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtpwb-0004iF-JY for guix-patches@gnu.org; Mon, 08 Apr 2024 10:25:59 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtpwi-0000um-UF for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70280] [PATCH 3/5] locale: Shrink =?utf-8?b?4oCYJWRlZmF1bHQt?= =?utf-8?b?bG9jYWxlLWRlZmluaXRpb25z4oCZ?= from 34 to 10 locales. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Apr 2024 14:26:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70280@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 70280-submit@debbugs.gnu.org id=B70280.17125863083093 (code B ref 70280); Mon, 08 Apr 2024 14:26:04 +0000 Received: (at 70280) by debbugs.gnu.org; 8 Apr 2024 14:25:08 +0000 Received: from localhost ([127.0.0.1]:47334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvo-0000ng-1n for submit@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvi-0000lm-Au for 70280@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtpvV-0004HW-J3; Mon, 08 Apr 2024 10:24:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=nUc4gjExsWwKUIKNxmJidVYmj7Emp/nATzr6VgU4jsk=; b=TRe35b0XPgNfgS2AuoKx /BqLsurAWIu5Q/LWolNn+8sm9tp5uyGsZwFuaMFGNgOqgHbc02I/OUKDcDwDFARrm54wf8EniB30N HXblxajYfHvAQ9+F+wUk7JhdRj0QNJk0lVnPa/9Pv4S39hji3LZwNqtiCOtt3A+j31qcf0eY6/cif 2i/yPsbhWpNzpu1oEl/QiZN19+T+aG9pgXsbm+Y4CYO2UxwzWgceFL3CL312CmlAMvMFWS3cmsTy2 cd9djUtXcoRts2eo6dLOPXZKHIdL4gBf9TmALfkGIswV5qgbUeKfYMU+oan0vyqBRoAzhrZexgzqf EZq4I88Rb8vYug==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 8 Apr 2024 16:24:33 +0200 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches This reduces the default set of locales from 92 MiB to 28 MiB. * gnu/system/locale.scm (%default-locale-definitions): Reduce to 10 locales. Change-Id: I3c092604301d69db591957bcfd62a062c3ac5ab0 --- gnu/system/locale.scm | 56 ++++++++++++------------------------------- 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/gnu/system/locale.scm b/gnu/system/locale.scm index 4ea82e24d5..00eb902702 100644 --- a/gnu/system/locale.scm +++ b/gnu/system/locale.scm @@ -153,9 +153,10 @@ (define %default-locale-libcs (list glibc))) (define %default-locale-definitions - ;; Arbitrary set of locales that are built by default. They are here mostly - ;; to facilitate first-time use to some people, while others may have to add - ;; a specific . + ;; Arbitrary set of locales that are built by default. They come as a + ;; "bonus" in addition to that specified in the 'locale' field of the + ;; operating system, for the user's convenience, so they shouldn't take too + ;; much space. (letrec-syntax ((utf8-locale (syntax-rules () ((_ name*) (locale-definition @@ -167,44 +168,17 @@ (define %default-locale-definitions (utf8-locales (syntax-rules () ((_ name ...) (list (utf8-locale name) ...))))) - ;; Add "en_US.UTF-8" for compatibility with Guix 0.8. - (cons (locale-definition - (name "en_US.UTF-8") - (source "en_US") - (charset "UTF-8")) - (utf8-locales "ca_ES" - "cs_CZ" - "da_DK" - "de_DE" - "el_GR" - "en_AU" - "en_CA" - "en_GB" - "en_US" - "es_AR" - "es_CL" - "es_ES" - "es_MX" - "fi_FI" - "fr_BE" - "fr_CA" - "fr_CH" - "fr_FR" - "ga_IE" - "it_IT" - "ja_JP" - "ko_KR" - "nb_NO" - "nl_NL" - "pl_PL" - "pt_PT" - "ro_RO" - "ru_RU" - "sv_SE" - "tr_TR" - "uk_UA" - "vi_VN" - "zh_CN")))) + ;; The six UN official languages, with at most two variants per language. + (utf8-locales "ar_DZ" + "ar_JO" + "en_GB" + "en_US" + "es_AR" + "es_ES" + "fr_CA" + "fr_FR" + "ru_RU" + "zh_CN"))) ;;; From patchwork Mon Apr 8 14:24:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 62845 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4D96527BBE9; Mon, 8 Apr 2024 15:26:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 0B19B27BBE2 for ; Mon, 8 Apr 2024 15:26:17 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtpwj-0006ho-LE; Mon, 08 Apr 2024 10:26:05 -0400 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 1rtpwh-0006YY-Td for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtpwc-0004iH-HB for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtpwj-0000v3-Sz for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70280] [PATCH 4/5] services: build-vm: Provide only one locale. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 08 Apr 2024 14:26:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70280@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 70280-submit@debbugs.gnu.org id=B70280.17125863183153 (code B ref 70280); Mon, 08 Apr 2024 14:26:05 +0000 Received: (at 70280) by debbugs.gnu.org; 8 Apr 2024 14:25:18 +0000 Received: from localhost ([127.0.0.1]:47338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvt-0000oI-F4 for submit@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46094) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvj-0000lw-6x for 70280@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtpvW-0004Hc-EU; Mon, 08 Apr 2024 10:24:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=8QGDCSotZVbEDfJ9dYDP8Bmy8WaBy+9oFJ2YLEYdSsQ=; b=ln2c6jr63UDEAiG8wAPH kT78C8Bf68torr/2Sgqp9qy69nSWFOfmwbw8kfLmIUrah4L1/1pNfM9r9WZYCKz8uAPvPhzzcFB+g 5sxGhLh7tLSILNeVv5snYCKwT1/ieBrPTAdV5U0zBWq8eerBlQEXQ5X9OvlHkNm0s0iYNOJQycyHV NB+9XvTGT561m2FuDHLqfMtNURCIWjJxjV82xfadORwShksEclho9j7WSZxk0scpi5lyz2YHPJVzm F0vMQ17Th3Gb5IYBf89AgMQCiH4mL8pngncLSdx7RhewjGx5K8Fg20YCL0DL7LKBnUorAs4xMY/29 J0sQmw6ccBEN6g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 8 Apr 2024 16:24:34 +0200 Message-ID: <782fcd725ad7a8e576f6ee24259697d8aff714dd.1712585810.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/virtualization.scm (%virtual-build-machine-operating-system) [locale, locale-definitions]: New fields. Change-Id: Ieb24b3a0c210291d8c04412e4c263b5e377b5704 --- gnu/services/virtualization.scm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index fc5adb94d0..d87e494348 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -46,6 +46,7 @@ (define-module (gnu services virtualization) #:use-module (gnu system shadow) #:autoload (gnu system vm) (linux-image-startup-command virtualized-operating-system) + #:autoload (gnu system locale) (locale-definition) #:use-module (gnu system) #:use-module (guix derivations) #:use-module (guix gexp) @@ -1190,6 +1191,14 @@ (define %minimal-vm-syslog-config (define %virtual-build-machine-operating-system (operating-system (host-name "build-machine") + + (locale "en_US.utf8") + (locale-definitions + ;; Save space by providing only one locale. + (list (locale-definition (name "en_US.utf8") + (source "en_US") + (charset "UTF-8")))) + (bootloader (bootloader-configuration ;unused (bootloader grub-minimal-bootloader) (targets '("/dev/null")))) From patchwork Mon Apr 8 14:24:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 62847 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 2560227BBE2; Mon, 8 Apr 2024 15:26:22 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5E45827BBE9 for ; Mon, 8 Apr 2024 15:26:20 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtpwj-0006gP-78; Mon, 08 Apr 2024 10:26:05 -0400 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 1rtpwh-0006Yx-Vl for guix-patches@gnu.org; Mon, 08 Apr 2024 10:26:04 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtpwc-0004iG-1X; Mon, 08 Apr 2024 10:26:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtpwj-0000uv-E1; Mon, 08 Apr 2024 10:26:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70280] [PATCH 5/5] linux-initrd: Further strip the static Guile. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, guix-patches@gnu.org Resent-Date: Mon, 08 Apr 2024 14:26:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70280 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70280@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= , Ludovic =?utf-8?q?Court?= =?utf-8?q?=C3=A8s?= X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 70280-submit@debbugs.gnu.org id=B70280.17125863093102 (code B ref 70280); Mon, 08 Apr 2024 14:26:05 +0000 Received: (at 70280) by debbugs.gnu.org; 8 Apr 2024 14:25:09 +0000 Received: from localhost ([127.0.0.1]:47336 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvo-0000nq-Ks for submit@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtpvk-0000m3-3x for 70280@debbugs.gnu.org; Mon, 08 Apr 2024 10:25:05 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtpvX-0004Hn-CM; Mon, 08 Apr 2024 10:24:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=1WKWfZPtgZASpWRse19P3CuTAL/z/Fpc07XvH9Q+HpQ=; b=V8AZMlCVeJYNIvmjAxq7 vsmVHXK0uf8jsa3Cv0ekli5iCtJFp85qGVIei6zwmCJlVNlSeAIXhNmZBu9RMISf8F+k17NZ9kYvy Ttv4XHPnx40zWWLg/NzQyxhlY6sWwfqcfcma4Jm7Ymy35njyEvgjFPhcubLJuth49vUeF03C7Qapw eUTbiMLcbDRig0fKUvDZD5ZFTBj5OXtpffxLLFlehPWjqE1jr8+jNSj4aUfkJ0KC8XcDSzOA47GFx FtwTuR+rvpxQeIbdke40Ty3YlOj9K5oCGXWFn39s5f04vXs6T8Y0C6wFMs7Xp7J0DM+jbmNRPZ0L5 4zNAqZR3khwD+g==; From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Mon, 8 Apr 2024 16:24:35 +0200 Message-ID: <021746eea10ffcc41b5b870816210628f3685f99.1712585810.git.ludo@gnu.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches ‘guile-static-initrd’ weighs in at 46 MiB, compared to 54 MiB for ‘guile-static-stripped’ (15% reduction). * gnu/packages/make-bootstrap.scm (make-guile-static-stripped): Add ‘directories-to-remove’ parameter and honor it. (%guile-static-initrd): New variable. * gnu/system/linux-initrd.scm (expression->initrd): Default to ‘%guile-static-initrd’. * doc/guix.texi (Initial RAM Disk): Adjust accordingly. Change-Id: I2baf06fed7a3698433e7c83b1d7726054a8c746e --- doc/guix.texi | 2 +- gnu/packages/make-bootstrap.scm | 37 ++++++++++++++++++++++++++++----- gnu/system/linux-initrd.scm | 4 ++-- 3 files changed, 35 insertions(+), 8 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 7ca06046ba..705f7d7de2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41339,7 +41339,7 @@ Initial RAM Disk program to run in that initrd. @deffn {Procedure} expression->initrd exp @ - [#:guile %guile-static-stripped] [#:name "guile-initrd"] + [#:guile %guile-static-initrd] [#:name "guile-initrd"] Return as a file-like object a Linux initrd (a gzipped cpio archive) containing @var{guile} and that evaluates @var{exp}, a G-expression, upon booting. All the derivations referenced by @var{exp} are diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 7b40f395f3..4dd45a4a27 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012-2021, 2023 Ludovic Courtès +;;; Copyright © 2012-2021, 2023-2024 Ludovic Courtès ;;; Copyright © 2017, 2021 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2018, 2019 Mark H Weaver @@ -55,7 +55,8 @@ (define-module (gnu packages make-bootstrap) %guile-bootstrap-tarball %bootstrap-tarballs - %guile-static-stripped)) + %guile-static-stripped + %guile-static-initrd)) ;;; Commentary: ;;; @@ -674,7 +675,8 @@ (define %guile-static-3.0 "guile-3.0-linux-syscalls.patch" "guile-3.0-relocatable.patch"))) -(define* (make-guile-static-stripped static-guile) +(define* (make-guile-static-stripped static-guile + #:optional (directories-to-remove '())) (package (inherit static-guile) (name (string-append (package-name static-guile) "-stripped")) @@ -702,6 +704,12 @@ (define* (make-guile-static-stripped static-guile) (mkdir (string-append out "/bin")) (copy-file guile1 guile2) + ;; Optionally remove additional directories. + (for-each (lambda (directory) + (delete-file-recursively + (string-append out "/" directory))) + '#$directories-to-remove) + ;; Verify that the relocated Guile works. #$@(if (%current-target-system) '() @@ -720,10 +728,29 @@ (define* (make-guile-static-stripped static-guile) (synopsis "Minimal statically-linked and relocatable Guile"))) (define %guile-static-stripped - ;; A stripped static Guile 3.0 binary, for use in initrds - ;; and during bootstrap. + ;; A stripped static Guile 3.0 binary for use during bootstrap. (make-guile-static-stripped %guile-static-3.0)) +(define %guile-static-initrd + ;; A stripped static Guile 3.0 binary for use in initrds. Remove various + ;; modules that are useless in an initrd. Note: Keep most of language/ + ;; because it is needed for Bournish. + (package + (inherit + (make-guile-static-stripped + %guile-static-3.0 + (append-map (lambda (directory) + (list (string-append "lib/guile/3.0/ccache/" directory) + (string-append "share/guile/3.0/" directory))) + '("language/brainfuck" + "language/ecmascript" + "language/elisp" + "oop" + "scripts" + "texinfo" + "web")))) + (name "guile-static-initrd"))) + (define (tarball-package pkg) "Return a package containing a tarball of PKG." (package diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm index 561cfe2fd0..00221333da 100644 --- a/gnu/system/linux-initrd.scm +++ b/gnu/system/linux-initrd.scm @@ -36,7 +36,7 @@ (define-module (gnu system linux-initrd) #:use-module ((gnu packages xorg) #:select (console-setup xkeyboard-config)) #:use-module ((gnu packages make-bootstrap) - #:select (%guile-static-stripped)) + #:select (%guile-static-initrd)) #:use-module (gnu system file-systems) #:use-module (gnu system mapped-devices) #:use-module (gnu system keyboard) @@ -62,7 +62,7 @@ (define-module (gnu system linux-initrd) (define* (expression->initrd exp #:key - (guile %guile-static-stripped) + (guile %guile-static-initrd) (gzip gzip) (name "guile-initrd") (system (%current-system)))