From 3eee16130d858ae96510ec1c7d38d31290de2699 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 16 Dec 2016 14:44:37 +0100 Subject: gnu: grub: Add dependency on efibootmgr. Suggested by Marius Bakke . * gnu/packages/grub.scm (grub)[arguments]: In 'patch-stuff', set efibootmgr absolute file name in 'platform.c'. [inputs]: Add EFIBOOTMGR. --- gnu/packages/grub.scm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gnu/packages/grub.scm') diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index ef7395e95e..83304b8501 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -115,6 +115,12 @@ (define-public grub (assoc-ref inputs "mdadm") "/sbin/mdadm\""))) + ;; Ditto for efibootmgr. + (substitute* "grub-core/osdep/unix/platform.c" + (("efibootmgr") + (string-append (assoc-ref inputs "efibootmgr") + "/sbin/efibootmgr"))) + ;; Make the font visible. (copy-file (assoc-ref inputs "unifont") "unifont.bdf.gz") (system* "gunzip" "unifont.bdf.gz") @@ -129,6 +135,9 @@ (define-public grub (inputs `(("gettext" ,gettext-minimal) + ;; For {U,}EFI. + ("efibootmgr" ,efibootmgr) + ;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and ;; 'grub-install' to recognize mapped devices (LUKS, etc.) ("lvm2" ,lvm2) -- cgit v1.2.3 From 7d8f7ab9be28e212280d91b9b1f66127f1bd5616 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 19 Dec 2016 23:22:07 +0100 Subject: gnu: grub: Use qemu-minimal for tests. * gnu/packages/grub.scm (qemu-for-tests): Remove variable. (grub)[native-inputs]: Replace QEMU-FOR-TESTS with QEMU-MINIMAL. --- gnu/packages/grub.scm | 35 ++--------------------------------- 1 file changed, 2 insertions(+), 33 deletions(-) (limited to 'gnu/packages/grub.scm') diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index 83304b8501..866dfcfb25 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -36,38 +36,7 @@ (define-module (gnu packages grub) #:use-module (gnu packages man) #:use-module (gnu packages texinfo) #:use-module (gnu packages ncurses) - #:use-module (gnu packages cdrom) - #:use-module (srfi srfi-1)) - -(define qemu-for-tests - ;; Newer QEMU versions, such as 1.5.1, no longer support the 'shutdown' - ;; instruction. This leads to test hangs, as reported at - ;; and fixed at - ;; . - ;; Work around it by using an older QEMU. - (package (inherit qemu-minimal) - (version "1.3.1") - (source (origin - (method url-fetch) - (uri (string-append "http://wiki.qemu-project.org/download/qemu-" - version ".tar.bz2")) - (sha256 - (base32 - "1bqfrb5dlsxm8gxhkksz8qzi5fhj3xqhxyfwbqcphhcv1kpyfwip")))) - - ;; With recent GLib versions, we get a test failure: - ;; ERROR:tests/rtc-test.c:176:check_time: assertion failed (ABS(t - s) <= wiggle): (382597824 <= 2) - ;; Simply disable the tests. - (arguments `(#:tests? #f - ,@(substitute-keyword-arguments (package-arguments qemu-minimal) - ((#:phases phases) - ;; We disable the tests so we also skip the phase disabling - ;; the qga test, which fails due to changes in QEMU - `(modify-phases ,phases - (delete 'disable-test-qga)))))) - - ;; The manual fails to build with Texinfo 5.x. - (native-inputs (alist-delete "texinfo" (package-native-inputs qemu))))) + #:use-module (gnu packages cdrom)) (define unifont ;; GNU Unifont, . @@ -160,7 +129,7 @@ (define-public grub ;; Dependencies for the test suite. The "real" QEMU is needed here, ;; because several targets are used. ("parted" ,parted) - ("qemu" ,qemu-for-tests) + ("qemu" ,qemu-minimal) ("xorriso" ,xorriso))) (home-page "https://www.gnu.org/software/grub/") (synopsis "GRand Unified Boot loader") -- cgit v1.2.3 From 7d0910d4a7670d353f7eeab44ee72e943fed234b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 19 Dec 2016 18:39:19 +0100 Subject: Revert "gnu: grub: Add dependency on efibootmgr." This reverts commit 3eee16130d858ae96510ec1c7d38d31290de2699. Reverted in favor of separate grub-efi package. See discussion at https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00765.html . --- gnu/packages/grub.scm | 9 --------- 1 file changed, 9 deletions(-) (limited to 'gnu/packages/grub.scm') diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index 866dfcfb25..317ed03573 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -84,12 +84,6 @@ (define-public grub (assoc-ref inputs "mdadm") "/sbin/mdadm\""))) - ;; Ditto for efibootmgr. - (substitute* "grub-core/osdep/unix/platform.c" - (("efibootmgr") - (string-append (assoc-ref inputs "efibootmgr") - "/sbin/efibootmgr"))) - ;; Make the font visible. (copy-file (assoc-ref inputs "unifont") "unifont.bdf.gz") (system* "gunzip" "unifont.bdf.gz") @@ -104,9 +98,6 @@ (define-public grub (inputs `(("gettext" ,gettext-minimal) - ;; For {U,}EFI. - ("efibootmgr" ,efibootmgr) - ;; Depend on LVM2 for libdevmapper, used by 'grub-probe' and ;; 'grub-install' to recognize mapped devices (LUKS, etc.) ("lvm2" ,lvm2) -- cgit v1.2.3 From acb5f7c3fcdd0666ed21dd9979d905d6a2b064cd Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 20 Oct 2016 17:26:52 +0100 Subject: gnu: Add grub-efi. * gnu/packages/grub.scm (grub-efi): New variable. --- gnu/packages/grub.scm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'gnu/packages/grub.scm') diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index 317ed03573..3658f221ce 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -133,3 +133,29 @@ (define-public grub menu to select one of the installed operating systems.") (license gpl3+) (properties '((cpe-name . "grub2"))))) + +(define-public grub-efi + (package + (inherit grub) + (name "grub-efi") + (synopsis "GRand Unified Boot loader (UEFI version)") + (inputs + `(("efibootmgr" ,efibootmgr) + ,@(package-inputs grub))) + (arguments + `(;; TODO: Tests need a UEFI firmware for qemu. There is one at + ;; https://github.com/tianocore/edk2/tree/master/OvmfPkg . + ;; Search for 'OVMF' in "tests/util/grub-shell.in". + #:tests? #f + ,@(substitute-keyword-arguments (package-arguments grub) + ((#:configure-flags flags) `(cons* "--with-platform=efi" + ,flags)) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'patch-stuff 'use-absolute-efibootmgr-path + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "grub-core/osdep/unix/platform.c" + (("efibootmgr") + (string-append (assoc-ref inputs "efibootmgr") + "/sbin/efibootmgr"))) + #t))))))))) -- cgit v1.2.3