From: Miguel <rosen644835@gmail.com>
To: 35394@debbugs.gnu.org
Subject: [bug#35394] [PATCH 3/4] gnu: grub: Add locale output for bootloading.
Date: Fri, 3 May 2019 14:27:12 +0200 [thread overview]
Message-ID: <20190503142712.5604f83f@gmail.com> (raw)
In-Reply-To: <20190426125041.4bd524e0@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 424 bytes --]
Last patches contain a couple of problems, unbound variables are fixed
in the attached patch. Commit message has been reworded.
-----
gnu: grub: Add locale output.
* gnu/packages/bootloaders.scm (grub): Add new phase 'install-locale-folder
to generate new output used for bootloader localization.
---
gnu/packages/bootloaders.scm | 33 +++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)
[-- Attachment #2: 0003-gnu-grub-Add-locale-output.patch --]
[-- Type: text/x-patch, Size: 3706 bytes --]
From d8462c2b980eb8fc5eff3d97292bffea63a89ea9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
<rosen644835@gmail.com>
Date: Fri, 26 Apr 2019 11:56:43 +0200
Subject: [PATCH 3/4] gnu: grub: Add locale output.
* gnu/packages/bootloaders.scm (grub): Add new phase 'install-locale-folder
to generate new output used for bootloader localization.
---
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 6e6e69ff3b..71411ca954 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 lang?))
+ (locale-out (assoc-ref outputs "locale")))
+ (mkdir-p locale-out)
+ (for-each (lambda (lang)
+ (let ((from (string-append locale "/" lang))
+ (to (string-append locale-out "/"
+ 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
next prev parent reply other threads:[~2019-05-03 12:30 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-23 13:17 [bug#35394] [PATCH 0/3] Bootloader localization Miguel
2019-04-23 13:26 ` [bug#35394] [PATCH 1/3] system: Add locale to boot-parameters Miguel
2019-04-23 13:26 ` [bug#35394] [PATCH 2/3] system: Provide locale information to the bootloader Miguel
2019-04-23 13:26 ` [bug#35394] [PATCH 3/3] system: Use locale information in grub.cfg Miguel
2019-04-26 10:50 ` [bug#35394] [PATCH 3/4] gnu: grub: Add locale output for bootloading Miguel
2019-05-03 12:27 ` Miguel [this message]
2019-04-26 10:51 ` [bug#35394] [PATCH 4/4] system: Use locale information in grub.cfg Miguel
2019-05-03 12:27 ` Miguel
2019-04-29 7:56 ` [bug#35394] [PATCH 0/3] Bootloader localization Ludovic Courtès
[not found] ` <20191021124035.531bed75@gmail.com>
2019-10-21 10:46 ` [bug#35394] [PATCH 1/3] system: Add locale to boot-parameters Miguel Arruga Vivas
2019-10-21 10:46 ` [bug#35394] [PATCH 2/3] system: Provide locale information to the bootloader Miguel Arruga Vivas
2019-10-21 10:46 ` [bug#35394] [PATCH 3/3] system: Use locale information in grub.cfg Miguel Arruga Vivas
2020-10-11 14:18 ` [bug#35394] [PATCH 1/1 v4] Grub i18n Miguel Ángel Arruga Vivas
2020-10-17 16:32 ` Ludovic Courtès
2020-10-18 15:09 ` [bug#35394] [PATCH 4/4 " Miguel Ángel Arruga Vivas
2020-10-18 15:43 ` Miguel Ángel Arruga Vivas
2020-10-19 8:50 ` Ludovic Courtès
2020-10-19 11:41 ` Miguel Ángel Arruga Vivas
2020-10-19 13:21 ` Ludovic Courtès
2020-10-19 13:44 ` Miguel Ángel Arruga Vivas
2020-10-20 20:50 ` Ludovic Courtès
2020-10-20 21:19 ` bug#35394: " Miguel Ángel Arruga Vivas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190503142712.5604f83f@gmail.com \
--to=rosen644835@gmail.com \
--cc=35394@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).