From patchwork Fri Apr 26 10:50:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miguel Arruga Vivas X-Patchwork-Id: 13755 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 6898A16F46; Fri, 26 Apr 2019 11:51:09 +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=ham 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 B792F16F46 for ; Fri, 26 Apr 2019 11:51:08 +0100 (BST) Received: from localhost ([127.0.0.1]:44696 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyRf-0003HQ-9m for patchwork@mira.cbaines.net; Fri, 26 Apr 2019 06:51:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46280) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hJyRb-0003Gy-Ip for guix-patches@gnu.org; Fri, 26 Apr 2019 06:51:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hJyRa-0001WV-D9 for guix-patches@gnu.org; Fri, 26 Apr 2019 06:51:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46594) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hJyRa-0001WG-0m for guix-patches@gnu.org; Fri, 26 Apr 2019 06:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hJyRZ-0004Yv-Tc for guix-patches@gnu.org; Fri, 26 Apr 2019 06:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35394] [PATCH 3/4] gnu: grub: Add locale output for bootloading. References: <20190423151702.05258473@gmail.com> In-Reply-To: <20190423151702.05258473@gmail.com> Resent-From: Miguel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Apr 2019 10:51:01 +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.155627586017530 (code B ref 35394); Fri, 26 Apr 2019 10:51:01 +0000 Received: (at 35394) by debbugs.gnu.org; 26 Apr 2019 10:51:00 +0000 Received: from localhost ([127.0.0.1]:60138 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJyRX-0004Ye-Ru for submit@debbugs.gnu.org; Fri, 26 Apr 2019 06:51:00 -0400 Received: from mail-wm1-f53.google.com ([209.85.128.53]:33670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hJyRV-0004YR-9W for 35394@debbugs.gnu.org; Fri, 26 Apr 2019 06:50:57 -0400 Received: by mail-wm1-f53.google.com with SMTP id z6so3639653wmi.0 for <35394@debbugs.gnu.org>; Fri, 26 Apr 2019 03:50:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version; bh=kwFgi5YS7EbzJLvAh50FiJdOLCSVpFLxVEjVvljg9CA=; b=Xr/wLeL4Fg3l6eil08ZmwJLrftsHCqgGvvMVU3BTU6CC5Duv0LmxjiYoU1QQ0yZY0L mi05aUseu9fFamH04jmumTAtRhS8/claf2N1pjICsslCNQUWb41LgMzszgovk9U5gL9J bss68ZkjgNv0auGq/GnPv+WNeovQqVxO8BRZva8IBBDsIYbu1Zo3h2RM22qnSrW2yQGZ o52f8sh9F1tMQqqsmh5L7UAXjiSGZcyN4H6OZmShqW61jb+WfZGtEnXEoYdQvSIf1AVr OctCewSUQtKRrF6Rf1MyH4xKAG3XMDGH3Y6LAYparE/amuxGIOSbEEDWpNJmHmtn7FfC p4Hw== 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:mime-version; bh=kwFgi5YS7EbzJLvAh50FiJdOLCSVpFLxVEjVvljg9CA=; b=lmPoGeXCynrfbCJv4yp5QbPl/izZXNwCQcrX3fw2PthKLQGMEvxUKjYF+1N6jSVZLl aV+Mz0B3jNBATQjPUqFTDpF/ljVNk2hNK2MXzXW2+pTtR8l69fHNf+50sHCT0kEiG37c Exg4MwBDW9GuWJnCtF+4p46U3g4qq53l0NBTzj1pra5gACHhGEA1Ho8/nG4vR/nzR/nj 9P2m8BsIZqf0/35ZrwuKRJ4m9w8z28UT/zx6ENePpDTOer0nqSmTUoS26n4AZzqnleqp WruhgfL/W72icTtfzzjKhRoE+k8uLKOy/k//fBlb2qZJSPyFPpa9eqE9Ecu7UkXR4WQZ vPfQ== X-Gm-Message-State: APjAAAWnVwPI0Pe0/q5VEPnImej3mKaxgsgVefpfERSemR/l4qPrEMBE OiMEbKvJmKA1wC7XiW9KIgkPXae6FXs= X-Google-Smtp-Source: APXvYqx2S/yHMhX+yYBkK9hVEPk8SCSfdpVLVfu+ZNjahBUYWRKLS945EivkIdAnF67vIH0ILqMOqg== X-Received: by 2002:a1c:3d6:: with SMTP id 205mr7784303wmd.66.1556275849609; Fri, 26 Apr 2019 03:50:49 -0700 (PDT) Received: from localhost (19.49.134.37.dynamic.jazztel.es. [37.134.49.19]) by smtp.gmail.com with ESMTPSA id 204sm31060374wmc.1.2019.04.26.03.50.48 for <35394@debbugs.gnu.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Apr 2019 03:50:49 -0700 (PDT) Date: Fri, 26 Apr 2019 12:50:41 +0200 From: Miguel Message-ID: <20190426125041.4bd524e0@gmail.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) 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: grub: Add locale output for bootloading. * gnu/packages/bootloaders.scm (grub): Add needed modules and new output generated with new phase 'install-locale-folder. --- gnu/packages/bootloaders.scm | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) From bc6e8168155ea017aece23b3a6f099de4a2d2d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?= Date: Fri, 26 Apr 2019 11:56:43 +0200 Subject: [PATCH 3/4] gnu: grub: Add locale output for bootloading. * gnu/packages/bootloaders.scm (grub): Add needed modules and new output generated with new phase 'install-locale-folder. --- gnu/packages/bootloaders.scm | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index b4eabaea48..e3baff267d 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -94,7 +94,10 @@ "grub-efi-fat-serial-number.patch")))) (build-system gnu-build-system) (arguments - `(#:phases (modify-phases %standard-phases + `(#:modules ((ice-9 ftw) + (guix build utils) + (guix build gnu-build-system)) + #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-stuff (lambda* (#:key inputs #:allow-other-keys) (substitute* "grub-core/Makefile.in" @@ -127,7 +130,30 @@ (substitute* "Makefile.in" (("grub_cmd_date grub_cmd_set_date grub_cmd_sleep") "grub_cmd_date grub_cmd_sleep")) - #t))) + #t)) + (add-after 'install 'install-locale-folder + (lambda* (#:key outputs #:allow-other-keys) + ;; XXX: Better checks are needed here + (define (lang? file) + (not (or (string=? file ".") (string=? file "..")))) + (define (make-lang-installer to) + (lambda (in-file stat flag) + (if (eq? flag 'regular) + (copy-file in-file to) + #t))) + + (let* ((out (assoc-ref outputs "out")) + (locale (string-append out "/share/locale")) + (langs (scandir locale-dir lang?)) + (locale-out (assoc-ref outputs "locale"))) + (mkdir-p locale-out) + (for-each (lambda (lang) + (let ((from (string-append locale "/" lang)) + (to (string-append out-path "/" + lang ".mo"))) + (ftw from (make-lang-installer to)))) + langs) + #t)))) ;; Disable tests on ARM and AARCH64 platforms. #:tests? ,(not (any (cute string-prefix? <> (or (%current-target-system) (%current-system))) @@ -183,6 +209,7 @@ ("parted" ,parted) ("qemu" ,qemu-minimal-2.10) ("xorriso" ,xorriso))) + (outputs '("out" "locale")) (home-page "https://www.gnu.org/software/grub/") (synopsis "GRand Unified Boot loader") (description @@ -249,8 +276,6 @@ menu to select one of the installed operating systems.") ,@(package-inputs grub-efi))) (arguments (substitute-keyword-arguments (package-arguments grub-efi) - ((#:modules modules `((guix build utils) (guix build gnu-build-system))) - `((ice-9 ftw) ,@modules)) ((#:phases phases) `(modify-phases ,phases (add-after 'install 'install-non-efi -- 2.21.0