GNU bug report logs - #41746
[PATCH] gnu: grub: Support graphical gfxterm on all systems.

Previous Next

Package: guix;

Reported by: Stefan <stefan-guix <at> vodafonemail.de>

Date: Sun, 7 Jun 2020 12:16:01 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41746 in the body.
You can then email your comments to 41746 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#41746; Package guix. (Sun, 07 Jun 2020 12:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stefan <stefan-guix <at> vodafonemail.de>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sun, 07 Jun 2020 12:16:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stefan <stefan-guix <at> vodafonemail.de>
To: bug-guix <at> gnu.org
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>
Subject: [PATCH] gnu: grub: Support graphical gfxterm on all systems.
Date: Sun, 7 Jun 2020 14:14:59 +0200
* gnu/bootloaders/grub.scm (eye-candy): Use gfxterm depending only on
(bootloader-configuration (terminal-outputs …)), which defaults to '(gfxterm).
This makes the system argument obsolete.
---
 gnu/bootloader/grub.scm | 46 ++++++++++++-----------------------------
 1 file changed, 13 insertions(+), 33 deletions(-)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 2d9a39afc3..544847b9cd 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -135,41 +135,25 @@ file with the resolution provided in CONFIG."
            (_ #f)))))
 
 (define* (eye-candy config store-device store-mount-point
-                    #:key store-directory-prefix system port)
+                    #:key store-directory-prefix port)
   "Return a gexp that writes to PORT (a port-valued gexp) the 'grub.cfg' part
 concerned with graphics mode, background images, colors, and all that.
 STORE-DEVICE designates the device holding the store, and STORE-MOUNT-POINT is
 its mount point; these are used to determine where the background image and
-fonts must be searched for.  SYSTEM must be the target system string---e.g.,
-\"x86_64-linux\".  STORE-DIRECTORY-PREFIX is a directory prefix to prepend to
-any store file name."
-  (define setup-gfxterm-body
-    (let ((gfxmode
-           (or (and-let* ((theme (bootloader-configuration-theme config))
-                          (gfxmode (grub-theme-gfxmode theme)))
-                 (string-join gfxmode ";"))
-               "auto")))
-
-      ;; Intel and EFI systems need to be switched into graphics mode, whereas
-      ;; most other modern architectures have no other mode and therefore
-      ;; don't need to be switched.
-
-      ;; XXX: Do we really need to restrict to x86 systems?  We could imitate
-      ;; what the GRUB default configuration does and decide based on whether
-      ;; a user provided 'gfxterm' in the terminal-outputs field of their
-      ;; bootloader-configuration record.
-      (if (string-match "^(x86_64|i[3-6]86)-" system)
-          (format #f "
-  set gfxmode=~a
-  insmod all_video
-  insmod gfxterm~%" gfxmode)
-          "")))
-
+fonts must be searched for.  STORE-DIRECTORY-PREFIX is a directory prefix to
+prepend to any store file name."
   (define (setup-gfxterm config font-file)
     (if (memq 'gfxterm (bootloader-configuration-terminal-outputs config))
-        #~(format #f "if loadfont ~a; then
-  setup_gfxterm
-fi~%" #+font-file)
+        #~(format #f "
+if loadfont ~a; then
+  set gfxmode=~a
+  insmod all_video
+  insmod gfxterm
+fi~%"
+                  #$font-file
+                  #$(string-join
+                      (grub-theme-gfxmode (bootloader-theme config))
+                      ";"))
         ""))
 
   (define (theme-colors type)
@@ -190,8 +174,6 @@ fi~%" #+font-file)
 
   (and image
        #~(format #$port "
-function setup_gfxterm {~a}
-
 # Set 'root' to the partition that contains /gnu/store.
 ~a
 
@@ -206,7 +188,6 @@ else
   set menu_color_normal=cyan/blue
   set menu_color_highlight=white/blue
 fi~%"
-                 #$setup-gfxterm-body
                  #$(grub-root-search store-device font-file)
                  #$(setup-gfxterm config font-file)
                  #$(grub-setup-io config)
@@ -358,7 +339,6 @@ when booting a root file system on a Btrfs subvolume."
                (menu-entry-device (first all-entries))
                (menu-entry-device-mount-point (first all-entries))
                #:store-directory-prefix store-directory-prefix
-               #:system system
                #:port #~port))
 
   (define keyboard-layout-config
-- 
2.26.0





Information forwarded to bug-guix <at> gnu.org:
bug#41746; Package guix. (Tue, 09 Jun 2020 09:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 41746 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Stefan <stefan-guix <at> vodafonemail.de>
Cc: 41746 <at> debbugs.gnu.org
Subject: Re: bug#41746: [PATCH] gnu: grub: Support graphical gfxterm on all
 systems.
Date: Tue, 09 Jun 2020 11:12:13 +0200
Hey Stefan,

> * gnu/bootloaders/grub.scm (eye-candy): Use gfxterm depending only on
> (bootloader-configuration (terminal-outputs …)), which defaults to '(gfxterm).
> This makes the system argument obsolete.

This looks good, however due to recent changes in this file (multiboot
support), it doesn't apply well. Could you please rebase it and send and
updated version?

Thanks,

Mathieu




Information forwarded to bug-guix <at> gnu.org:
bug#41746; Package guix. (Tue, 09 Jun 2020 12:18:02 GMT) Full text and rfc822 format available.

Message #11 received at 41746 <at> debbugs.gnu.org (full text, mbox):

From: Stefan <stefan-guix <at> vodafonemail.de>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 41746 <at> debbugs.gnu.org
Subject: Re: bug#41746: [PATCH] gnu: grub: Support graphical gfxterm on all
 systems.
Date: Tue, 9 Jun 2020 14:16:59 +0200
* gnu/bootloaders/grub.scm (eye-candy): Use gfxterm depending only on
(bootloader-configuration (terminal-outputs …)), which defaults to '(gfxterm).
This makes the system argument obsolete.
---
 gnu/bootloader/grub.scm | 46 ++++++++++++-----------------------------
 1 file changed, 13 insertions(+), 33 deletions(-)

diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index d4dbb57131..e3b8416d6d 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -135,41 +135,25 @@ file with the resolution provided in CONFIG."
            (_ #f)))))
 
 (define* (eye-candy config store-device store-mount-point
-                    #:key store-directory-prefix system port)
+                    #:key store-directory-prefix port)
   "Return a gexp that writes to PORT (a port-valued gexp) the 'grub.cfg' part
 concerned with graphics mode, background images, colors, and all that.
 STORE-DEVICE designates the device holding the store, and STORE-MOUNT-POINT is
 its mount point; these are used to determine where the background image and
-fonts must be searched for.  SYSTEM must be the target system string---e.g.,
-\"x86_64-linux\".  STORE-DIRECTORY-PREFIX is a directory prefix to prepend to
-any store file name."
-  (define setup-gfxterm-body
-    (let ((gfxmode
-           (or (and-let* ((theme (bootloader-configuration-theme config))
-                          (gfxmode (grub-theme-gfxmode theme)))
-                 (string-join gfxmode ";"))
-               "auto")))
-
-      ;; Intel and EFI systems need to be switched into graphics mode, whereas
-      ;; most other modern architectures have no other mode and therefore
-      ;; don't need to be switched.
-
-      ;; XXX: Do we really need to restrict to x86 systems?  We could imitate
-      ;; what the GRUB default configuration does and decide based on whether
-      ;; a user provided 'gfxterm' in the terminal-outputs field of their
-      ;; bootloader-configuration record.
-      (if (string-match "^(x86_64|i[3-6]86)-" system)
-          (format #f "
-  set gfxmode=~a
-  insmod all_video
-  insmod gfxterm~%" gfxmode)
-          "")))
-
+fonts must be searched for.  STORE-DIRECTORY-PREFIX is a directory prefix to
+prepend to any store file name."
   (define (setup-gfxterm config font-file)
     (if (memq 'gfxterm (bootloader-configuration-terminal-outputs config))
-        #~(format #f "if loadfont ~a; then
-  setup_gfxterm
-fi~%" #+font-file)
+        #~(format #f "
+if loadfont ~a; then
+  set gfxmode=~a
+  insmod all_video
+  insmod gfxterm
+fi~%"
+                  #$font-file
+                  #$(string-join
+                      (grub-theme-gfxmode (bootloader-theme config))
+                      ";"))
         ""))
 
   (define (theme-colors type)
@@ -190,8 +174,6 @@ fi~%" #+font-file)
 
   (and image
        #~(format #$port "
-function setup_gfxterm {~a}
-
 # Set 'root' to the partition that contains /gnu/store.
 ~a
 
@@ -206,7 +188,6 @@ else
   set menu_color_normal=cyan/blue
   set menu_color_highlight=white/blue
 fi~%"
-                 #$setup-gfxterm-body
                  #$(grub-root-search store-device font-file)
                  #$(setup-gfxterm config font-file)
                  #$(grub-setup-io config)
@@ -380,7 +361,6 @@ menuentry ~s {
                  device
                  mount-point
                  #:store-directory-prefix store-directory-prefix
-                 #:system system
                  #:port #~port)))
 
   (define keyboard-layout-config
-- 
2.26.0





Information forwarded to bug-guix <at> gnu.org:
bug#41746; Package guix. (Tue, 09 Jun 2020 12:26:01 GMT) Full text and rfc822 format available.

Message #14 received at 41746 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Stefan <stefan-guix <at> vodafonemail.de>
Cc: 41746 <at> debbugs.gnu.org
Subject: Re: bug#41746: [PATCH] gnu: grub: Support graphical gfxterm on all
 systems.
Date: Tue, 09 Jun 2020 14:24:53 +0200
Thanks for rebasing :)

Your copyright is missing, is this ok for you if I use:

"Stefan <stefan-guix <at> vodafonemail.de>"

or would you prefer something else?

Mathieu




Information forwarded to bug-guix <at> gnu.org:
bug#41746; Package guix. (Tue, 09 Jun 2020 12:27:01 GMT) Full text and rfc822 format available.

Message #17 received at 41746 <at> debbugs.gnu.org (full text, mbox):

From: Stefan <stefan-guix <at> vodafonemail.de>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 41746 <at> debbugs.gnu.org
Subject: Re: bug#41746: [PATCH] gnu: grub: Support graphical gfxterm on all
 systems.
Date: Tue, 9 Jun 2020 14:26:05 +0200
Welcome. Yes, that’s fine.

> Am 09.06.2020 um 14:24 schrieb Mathieu Othacehe <othacehe <at> gnu.org>:
> 
> 
> Thanks for rebasing :)
> 
> Your copyright is missing, is this ok for you if I use:
> 
> "Stefan <stefan-guix <at> vodafonemail.de>"
> 
> or would you prefer something else?
> 
> Mathieu





Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Tue, 09 Jun 2020 15:21:02 GMT) Full text and rfc822 format available.

Notification sent to Stefan <stefan-guix <at> vodafonemail.de>:
bug acknowledged by developer. (Tue, 09 Jun 2020 15:21:02 GMT) Full text and rfc822 format available.

Message #22 received at 41746-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Stefan <stefan-guix <at> vodafonemail.de>
Cc: 41746-done <at> debbugs.gnu.org
Subject: Re: bug#41746: [PATCH] gnu: grub: Support graphical gfxterm on all
 systems.
Date: Tue, 09 Jun 2020 17:20:04 +0200
> Welcome. Yes, that’s fine.

I fixed indentation, added your copyright and pushed!

Thanks,

Mathieu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 08 Jul 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.