From patchwork Mon Oct 21 10:46:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miguel Arruga Vivas X-Patchwork-Id: 15786 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 82B6E17282; Mon, 21 Oct 2019 11:47:21 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 16AA317275 for ; Mon, 21 Oct 2019 11:47:21 +0100 (BST) Received: from localhost ([::1]:37546 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMVDc-0002sW-54 for patchwork@mira.cbaines.net; Mon, 21 Oct 2019 06:47:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44893) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMVDR-0002qT-V6 for guix-patches@gnu.org; Mon, 21 Oct 2019 06:47:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMVDQ-0006zW-Ob for guix-patches@gnu.org; Mon, 21 Oct 2019 06:47:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46979) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iMVDQ-0006zQ-KD for guix-patches@gnu.org; Mon, 21 Oct 2019 06:47:08 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iMVDQ-000686-Go for guix-patches@gnu.org; Mon, 21 Oct 2019 06:47:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35394] [PATCH 3/3] system: Use locale information in grub.cfg. Resent-From: Miguel Arruga Vivas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 21 Oct 2019 10:47:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35394 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35394@debbugs.gnu.org Received: via spool by 35394-submit@debbugs.gnu.org id=B35394.157165480823512 (code B ref 35394); Mon, 21 Oct 2019 10:47:08 +0000 Received: (at 35394) by debbugs.gnu.org; 21 Oct 2019 10:46:48 +0000 Received: from localhost ([127.0.0.1]:55797 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMVD6-00067A-Hr for submit@debbugs.gnu.org; Mon, 21 Oct 2019 06:46:48 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:40372) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iMVCz-00066m-ED for 35394@debbugs.gnu.org; Mon, 21 Oct 2019 06:46:42 -0400 Received: by mail-wm1-f66.google.com with SMTP id b24so12246068wmj.5 for <35394@debbugs.gnu.org>; Mon, 21 Oct 2019 03:46:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version; bh=sakVTWkJXPVEDpMeLO0vjsyK6THjTeWJhhQyj1zRDfI=; b=RlZxbahshq29VOfrExeuUgVWMId5yQ9XF5GcT+BN7iCi1A8hUeghtj4vvdYp1xXMyM MT7pL4zSG8ghUOtNb/4l+B6TpcWKkfPAiPIgkRnnRQQBg61f+tJMjO4vtcjcYKTVz1tB AtstE3q9ENC0b14adTd/4LfTJ6Jnp8qrLmdmge0oJmYFYPKx8yd3Ot+FZh0SqEprHX+T pMnJgnmrC+ad+S6ITEPBoCmnRMzM48jeRznTwLVDOMWdhZ6vCDNYCokNHvaV4nDj0t3X 4c0CqKkwDDAGJI7t4RgvJxGAT5krer3k10Fqcypm596gT2WrI6yY00c1XzaKHO2SaVxM tFVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version; bh=sakVTWkJXPVEDpMeLO0vjsyK6THjTeWJhhQyj1zRDfI=; b=uTMhOi/t9o/gL47E34TNiGUadIORniTlr+xS24tPCgYs9pdy345VP6L4QUpTlTzxeR OXtJAz4o/FGUrFNGKp3lnoCjnFDdsT4TS3nWYbluIH/Njo/P78QHJW8gamOszYRO3tzq C9yotw9n/8vM6c+m1YN9IFUEP5Yp3BYZcVYJZHzxBrv9VKSzRW8Z96/au1GO1iaCjqcA a4nITjLlvg/13Gut29qI1L5o+gyOEss7h/9EDcwkfPl/lkssN9vO649oy5wc49Mi8lKK FQ6BSw5KwSx9r09bpKqO6ZdX1KnKxhHb8gxO3eaOP9r69dZsht3jHUmYFjqn9NzmXdH6 1Z9A== X-Gm-Message-State: APjAAAU4zNts+d68+ddauxgteBoq3H2dUBwdmanWkeK6+g+FJSf7kV8b Hm1yA/TiNe2sZqq4BYG6MPWg/u+Q X-Google-Smtp-Source: APXvYqzplmGKudrHveto0i/YfG5ROPUsduNKHqIv5MU6tOdjALuORS1J5W8CYO+BdsH2EDesySB78A== X-Received: by 2002:a05:600c:294b:: with SMTP id n11mr2811038wmd.70.1571654795520; Mon, 21 Oct 2019 03:46:35 -0700 (PDT) Received: from localhost (115.201.218.87.dynamic.jazztel.es. [87.218.201.115]) by smtp.gmail.com with ESMTPSA id y1sm17517515wrw.6.2019.10.21.03.46.34 for <35394@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2019 03:46:35 -0700 (PDT) Date: Mon, 21 Oct 2019 12:46:32 +0200 From: Miguel Arruga Vivas Message-ID: <20191021124632.7d050b48@gmail.com> In-Reply-To: <20191021124035.531bed75@gmail.com> References: <20190423151702.05258473@gmail.com> <87tvehi6s6.fsf@gnu.org> <20191021124035.531bed75@gmail.com> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" X-getmail-retrieved-from-mailbox: Patches * gnu/bootloader/grub.scm (define-module): Add new dependency. (grub-configuration-file)[locale-config]: New variable with generated locale configuration when locale parameter has been provided. [builder]: Add locale-config. --- gnu/bootloader/grub.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) From c5f4f7d0d3564731dc29f563b70a05ab83eec061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Sat, 19 Oct 2019 13:28:48 +0200 Subject: [PATCH 3/3] system: Use locale information in grub.cfg. * gnu/bootloader/grub.scm (define-module): Add new dependency. (grub-configuration-file)[locale-config]: New variable with generated locale configuration when locale parameter has been provided. [builder]: Add locale-config. --- gnu/bootloader/grub.scm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index a0d068d1bd..8c3bab6fa7 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Chris Marusich ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2017 Mathieu Othacehe +;;; Copyright © 2019 Miguel Ángel Arruga Vivas ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,6 +29,7 @@ #:use-module (gnu system uuid) #:use-module (gnu system file-systems) #:use-module (gnu system keyboard) + #:use-module (gnu system locale) #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages gtk) (guile-cairo guile-rsvg) #:autoload (gnu packages xorg) (xkeyboard-config) @@ -353,6 +355,20 @@ entries corresponding to old generations of the system." #:system system #:port #~port)) + (define locale-config + #~(let ((locale #$(and locale + (locale-definition-source + (locale-name->definition locale))))) + (when locale + (format port "\ +# Localization configuration. +if search --file --set boot_partition /grub/grub.cfg; then + set locale_dir=(${boot_partition})/grub/locale +else + set locale_dir=/boot/grub/locale +fi +set lang=~a~%" locale)))) + (define keyboard-layout-config (let ((layout (bootloader-configuration-keyboard-layout config)) (grub (bootloader-package @@ -372,6 +388,7 @@ keymap ~a~%" keymap))))) # will be lost upon reconfiguration. ") #$sugar + #$locale-config #$keyboard-layout-config (format port " set default=~a -- 2.23.0