From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id cK9dD6uBgmNlzAAAbAwnHQ (envelope-from ) for ; Sat, 26 Nov 2022 22:14:19 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iMNZD6uBgmOuIgAA9RJhRA (envelope-from ) for ; Sat, 26 Nov 2022 22:14:19 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id BF7102B398 for ; Sat, 26 Nov 2022 22:14:18 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oz2Uu-0003lP-QI; Sat, 26 Nov 2022 16:14:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz2Ut-0003hi-5k for guix-patches@gnu.org; Sat, 26 Nov 2022 16:14:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oz2Us-0003my-Ta for guix-patches@gnu.org; Sat, 26 Nov 2022 16:14:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oz2Us-0007JP-12 for guix-patches@gnu.org; Sat, 26 Nov 2022 16:14:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59619] [PATCH] grub-configfile Resent-From: Stefan Karrmann Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 26 Nov 2022 21:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59619 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59619@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166949718928090 (code B ref -1); Sat, 26 Nov 2022 21:14:01 +0000 Received: (at submit) by debbugs.gnu.org; 26 Nov 2022 21:13:09 +0000 Received: from localhost ([127.0.0.1]:41574 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2Tz-0007J0-Vc for submit@debbugs.gnu.org; Sat, 26 Nov 2022 16:13:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:38334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2Tw-0007Iu-8y for submit@debbugs.gnu.org; Sat, 26 Nov 2022 16:13:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz2Tw-0003SW-0l for guix-patches@gnu.org; Sat, 26 Nov 2022 16:13:04 -0500 Received: from mout.web.de ([212.227.17.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz2Tt-0003fC-JK for guix-patches@gnu.org; Sat, 26 Nov 2022 16:13:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1669497177; bh=wE9O+mGwPIIRNrSKaHS63FiK7+133QAjxrLZNq+PzSQ=; h=X-UI-Sender-Class:Date:From:To:Subject; b=lXDKv23gDFaz7mPcOBSPVFUYDaJGgn2BW44mVnJSv1zVMurFLCV9r2uqKQWr9F+Hr /q37P6coPjUXFkkZ4Dux9T3Rozi5DbBTWSUGdSgUdKDdyombta+JFAniGh/Efu3lxt lI5hYSPWJ1/BTVqhoRLdL//5glrYxCQf6BJlkBY1edBtewwwuUAYGH4nO7gN4ZbH8V MSXZnreY8HH7rHmexTB1UJFmt7NgY2EOhrA1zRIpBknGtK/RhfDhHdBWWmgsRtBQjw KP6xwNymEY2J2nuVyEAdR04hZKTnzlYAddG+MhcO3o5drespYRvcOOolQ2INBdyL4Z rVveSk2rdJL4g== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from localhost ([84.57.209.100]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M4bYy-1ozayl0mcI-001oDx for ; Sat, 26 Nov 2022 22:12:57 +0100 Date: Sat, 26 Nov 2022 22:12:54 +0100 From: Stefan Karrmann Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="fJdmjL/d6xyzFzGq" Content-Disposition: inline X-Provags-ID: V03:K1:H1dLFv0h7H86wjJ2FLdso5FSaH91KhjfXbUqF0QtfP48qnvpVaf y4+MNg4zMYDXGkTmrSkqr03PqCaYEla5opPPaHSvB6Lj2YRt+rOxnpYluhRAPKAhPTmeIgE gRHZXU5QN2GRLWNqj3TPSfhkjFA97kmX1Dm8lR6twF8eg3g4JVCAX+yWUuNzfH/HwfLWF8e fBg8XTRlvORfGFrU8w+tw== UI-OutboundReport: notjunk:1;M01:P0:J8W5I7T1r7s=;OcezbuVZYcmBnRsLuxZfskIU8Ec DWQ4+CtfFO0aog/YJWj5YooWyXwnkCTLWfaV1lAy0BCuLagKBfClj3b7u6AGz1oLhOSHtzlgb cQ5nkEV8BHXcAwFmG6yr1+TxDH8N9f7iCBNlyUXwcNHyhtceklCQAihvfoUK+ic38+p+vsviS J6VlXf1wAwoWlKssLcEql6gg4CLgFEOPUldtq6vR4APulIfVm8VS0w+dXwt135W82dhROpaT1 gcdO+ALEGzppyvl4QrrQqzrOCnq5ZpkAz5r3PAEjYXLwu0TAGMqfnD3B5bU/Oh5XOzjCpYIa1 MD73K1sIt/8qdjqVGfLf9BH0IT1nBNZMxUtLVtYRcHHekmvCCin6LX+moSmyiCAHSFFzQaRys cx5Xc5ztiBz+Lk6FXtMauw2OGBPBCqVe+6JL+VMUe0OaLWpFO9F1QhO6WdcovyD44cwEJKcpl dvfZNGi1jBvv+afgkfeMGRFPv0bk5T9sid9ukv2zZi7ua39T8k+7QRJqFiwIkR79q6cSwhdgA FvBw1mlHQzsTd7kHX6ikOdZQ/w5Xav78GQ0QlR13coDzqmFCf+8Ts71X8FsOLDkogXT3ow9oK 3/9swzilENGNXwY+O0Q2amy3AxdiJiByZ+go3O2Eq0fGlMPvGQ08GF57I8X01udvO2zZ/GOSu NBpKmC8vrU5RHh1Fa7tK3kroFuEr2KDDuzWR3n0H9VWzCaVVmHx5urNjFVuKMFnQko67RY27I 2Lc/DVnpTlatJqL+tTsdDZEQNSkU1sI5F2t49JMf2iYjQGgCPF2VSMUcypyAFj+l3j7+IyHRM Bw048xgUIVy6q/zLGutgXRuJbrzW1EriIbRqzEluskS6Ar2dy+EnmC8BZLZD0/5HKQNQ5OGBs v91TPQUkgcvZVbUVlDFY7Kzsf31n6sij2SM0lRO0G8zTGjcsctz0qHLu0hsEoLj7/i097pMMi fVwsEzmsMYUzx2SXaKzzGWhgUj4= Received-SPF: pass client-ip=212.227.17.12; envelope-from=s.karrmann@web.de; helo=mout.web.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1669497258; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=o0mNn3PNLit0wM9AMFooHbrRsOVkRDv5NxEZYxdpYek=; b=aLj+n0Z4U5IY4iVGV7JGIZHiboG3OWseLbx+BkoFTQmsrfScZETIn4i9QY+R6Ay5y9aVic OYXAhvYo3JA1jZuoiMiYuOZWL31RiOwaiLZPU3AaiRxVSrj32IOgUXlNswBUk3w5WLBout 0npYNMvlODqYEe4HFdCUd5ESEffJG8uIwM6aw3ll1ZZUv1moJnR7WFgzWMU5h2h3CITauy etosFNKCrQ6zno+Xx/Qg49ZAmElyiOBZzgyudWdKJp5x81ddNoNUdKI6Txbg3Y+Ea6x0Sp asXaaeZQSpK4YUJC/KqQQ8kWvKCMliKFXv5W9LBPkEXKNeoxz3U6Xbt4WySz8A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1669497258; a=rsa-sha256; cv=none; b=L5BI04ZVSNlrLZSV8n7U4lXJ6eJXk9PNP9mwcRS1R5d9KRRpxITkJt5jMFaZ7j6niQhjdy HyE3L3oHjr8LFTCRC66JcHccL//7UOzxPPB8WmWSEOgjuPZRBxyubXg7Tpae4d7nMYZ3Zt JrfzUuc1vhAFFW6tiLHfI+thX3fPM7OoGH1V325twwp1HDawLqLVUU2vY9AXjSDMpCfBez Y8p3+T42JK357r4pinZmPkwEDHXVMvuaFsU5Nltw0P2jWXhyWNzkzvQuubgRtFn8zUNZhO tJOcy2QwQreC1mBpTio6cUEzRIgCcdwCfg6qRYXQjQoKTxAbjV1ojMovbu/+Bg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=web.de header.s=s29768273 header.b=lXDKv23g; dmarc=fail reason="SPF not aligned (relaxed)" header.from=web.de (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 5.83 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=web.de header.s=s29768273 header.b=lXDKv23g; dmarc=fail reason="SPF not aligned (relaxed)" header.from=web.de (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: BF7102B398 X-Spam-Score: 5.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: p3KSop5O691i --fJdmjL/d6xyzFzGq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Dear all, somehow ~git send-mail~ seems not to work as expected. Therefore, I send this patch manually. The patch allows us to use the menuentry configfile for grub. As I'm still a newbie with regard to guix, I was not able to test it. My next step will be: - patch guix, such that grub can work with btrfs subvolumes Kind regards, =2D- Stefan Karrmann secure communication? GPG: 0x8C3260C01550B612E4C5730D22E42112094CE53F --fJdmjL/d6xyzFzGq Content-Type: text/x-diff; charset=iso-8859-1 Content-Description: patches/0001 Content-Disposition: attachment; filename="0001-grub-configfile.patch" Content-Transfer-Encoding: quoted-printable =46rom 34a4849d7023ff7756c048246bc9d7c303170748 Mon Sep 17 00:00:00 2001 From: "S.Karrmann" Date: Sun, 20 Nov 2022 21:12:52 +0100 Subject: [PATCH] grub-configfile =2D-- doc/guix.texi | 42 +++++++++++++++++++++++++++++---------- gnu/bootloader.scm | 29 +++++++++++++++++++++++---- gnu/bootloader/grub.scm | 10 ++++++++++ tests/boot-parameters.scm | 11 ++++++++++ 4 files changed, 78 insertions(+), 14 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index eaecfd0daa..c30880b8bc 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -109,6 +109,7 @@ Copyright @copyright{} 2022 Reily Siegel@* Copyright @copyright{} 2022 Simon Streit@* Copyright @copyright{} 2022 (@* Copyright @copyright{} 2022 John Kehayias@* +Copyright @copyright{} 2022 Dr. Stefan Karrmann@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -6127,7 +6128,7 @@ Transformation Options}) so it should be lossless. @item --profile=3D@var{profile} @itemx -p @var{profile} -Create an environment containing the packages installed in @var{profile}. +Create an environment containing the packages installed in @var{profile}. Use @command{guix package} (@pxref{Invoking guix package}) to create and manage profiles. @@ -6573,7 +6574,7 @@ interpreted as packages that will be added to the en= vironment directly. @item --profile=3D@var{profile} @itemx -p @var{profile} -Create an environment containing the packages installed in @var{profile}. +Create an environment containing the packages installed in @var{profile}. Use @command{guix package} (@pxref{Invoking guix package}) to create and manage profiles. @@ -12512,7 +12513,7 @@ candidates, and even to test their impact on packa= ges that depend on them: @example -guix build elogind --with-source=3D@dots{}/shepherd-0.9.0rc1.tar.gz +guix build elogind --with-source=3D@dots{}/shepherd-0.9.0rc1.tar.gz @end example @dots{} or to build from a checkout in a pristine environment: @@ -23294,7 +23295,7 @@ created for. Restricts all controllers to the specified transport. @code{'dual} means = both BR/EDR and LE are enabled (if supported by the hardware). -Possible values are: +Possible values are: @itemize @bullet @item @@ -38229,6 +38230,27 @@ The list of commands for loading Multiboot module= s. For example: @dots{})) @end lisp + (device (uuid "5cbb9a70-a3c8-4384-a085-9e6896058343")= ) + (configfile "/boot/grub/grub.cfg")))))) + +@item @code{configfile} (default: @code{#f}) +A string that can be accepted by @code{grub}'s @code{chainloader} +directive. This has no effect if either @code{linux} or +@code{multiboot-kernel} fields are specified. The following is an +example of switching to a different GNU/GRUB menu. + +@lisp +(bootloader + (bootloader-configuration + ;; @dots{} + (menu-entries + (list + (menu-entry + (label "GNU/Linux") + (device (uuid "5cbb9a70-a3c8-4384-a085-9e6896058343")) + (configfile "/boot/grub/grub.cfg")))))) +@end lisp + @item @code{chain-loader} (default: @code{#f}) A string that can be accepted by @code{grub}'s @code{chainloader} directive. This has no effect if either @code{linux} or @@ -40116,7 +40138,7 @@ A clause can have one of the following forms: (@var{field-name} (@var{type} @var{default-value}) @var{documentation}) - + (@var{field-name} (@var{type} @var{default-value}) @var{documentation} @@ -40165,7 +40187,7 @@ A simple serializer procedure could look like this= : (define (serialize-boolean field-name value) (let ((value (if value "true" "false"))) #~(string-append #$field-name #$value))) -@end lisp +@end lisp In some cases multiple different configuration records might be defined in the same file, but their serializers for the same type might have to @@ -40183,7 +40205,7 @@ manually specify a custom @var{serializer} for eve= ry field. (define (bar-serialize-string field-name value) @dots{}) - + (define-configuration foo-configuration (label (string) @@ -40215,7 +40237,7 @@ macro which is a shorthand of this. (field (string "test") "Some documentation.")) -@end lisp +@end lisp @end deffn @deffn {Scheme Syntax} define-maybe @var{type} @@ -42708,7 +42730,7 @@ down in its dependency graph. As it turns out, GL= ib does not have a from /gnu/store/@dots{}-glib-2.62.6/lib/libglib-2.0.so.0 #1 0x00007ffff608a7d6 in gobject_init_ctor () from /gnu/store/@dots{}-glib-2.62.6/lib/libgobject-2.0.so.0 -#2 0x00007ffff7fe275a in call_init (l=3D, argc=3Dargc@@en= try=3D1, argv=3Dargv@@entry=3D0x7fffffffcfd8, +#2 0x00007ffff7fe275a in call_init (l=3D, argc=3Dargc@@en= try=3D1, argv=3Dargv@@entry=3D0x7fffffffcfd8, env=3Denv@@entry=3D0x7fffffffcfe8) at dl-init.c:72 #3 0x00007ffff7fe2866 in call_init (env=3D0x7fffffffcfe8, argv=3D0x7ffff= fffcfd8, argc=3D1, l=3D) at dl-init.c:118 @@ -42737,7 +42759,7 @@ Starting program: /gnu/store/@dots{}-profile/bin/s= h -c exec\ inkscape #0 g_getenv (variable=3Dvariable@@entry=3D0x7ffff60c7a2e "GOBJECT_DEBUG"= ) at ../glib-2.62.6/glib/genviron.c:252 #1 0x00007ffff608a7d6 in gobject_init () at ../glib-2.62.6/gobject/gtype= .c:4380 #2 gobject_init_ctor () at ../glib-2.62.6/gobject/gtype.c:4493 -#3 0x00007ffff7fe275a in call_init (l=3D, argc=3Dargc@@en= try=3D3, argv=3Dargv@@entry=3D0x7fffffffd088, +#3 0x00007ffff7fe275a in call_init (l=3D, argc=3Dargc@@en= try=3D3, argv=3Dargv@@entry=3D0x7fffffffd088, env=3Denv@@entry=3D0x7fffffffd0a8) at dl-init.c:72 @dots{} @end example diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index da65b9d5d5..f34d222f69 100644 =2D-- a/gnu/bootloader.scm +++ b/gnu/bootloader.scm @@ -6,6 +6,7 @@ ;;; Copyright =A9 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright =A9 2022 Josselin Poiret ;;; Copyright =A9 2022 Reza Alizadeh Majd +;;; Copyright =A9 2022 Dr. Stefan Karrmann ;;; ;;; This file is part of GNU Guix. ;;; @@ -49,6 +50,7 @@ menu-entry-multiboot-arguments menu-entry-multiboot-modules menu-entry-chain-loader + menu-entry-configfile menu-entry->sexp sexp->menu-entry @@ -109,8 +111,10 @@ (multiboot-modules menu-entry-multiboot-modules (default '())) ; list of multiboot commands, = where ; a command is a list of + (configfile menu-entry-configfile + (default #f)) ; string, path of grub.cfg fil= e (chain-loader menu-entry-chain-loader - (default #f))) ; string, path of efi file + (default #f))) ; string, path of efi file (define (report-menu-entry-error menu-entry) (raise @@ -126,6 +130,7 @@ @code{linux-arguments} and @code{linux-modules}, @item multiboot by specifying fields @code{multiboot-kernel}, @code{multiboot-arguments} and @code{multiboot-modules}, +@item configfile by specifying field @code{configfile}. @item chain-loader by specifying field @code{chain-loader}. @end enumerate")))))) @@ -141,7 +146,7 @@ (match entry (($ label device mount-point (? identity linux) linux-arguments (? identity initr= d) - #f () () #f) + #f () () #f #f) `(menu-entry (version 0) (label ,label) (device ,(device->sexp device)) @@ -151,7 +156,7 @@ (initrd ,initrd))) (($ label device mount-point #f () #f (? identity multiboot-kernel) multiboot-arguments - multiboot-modules #f) + multiboot-modules #f #f) `(menu-entry (version 0) (label ,label) (device ,(device->sexp device)) @@ -159,13 +164,20 @@ (multiboot-kernel ,multiboot-kernel) (multiboot-arguments ,multiboot-arguments) (multiboot-modules ,multiboot-modules))) - (($ label device mount-point #f () #f #f () () + (($ label device mount-point #f () #f #f () () #f (? identity chain-loader)) `(menu-entry (version 0) (label ,label) (device ,(device->sexp device)) (device-mount-point ,mount-point) (chain-loader ,chain-loader))) + (($ label device mount-point #f () #f #f () () + (? identity configfile) #f) + `(menu-entry (version 0) + (label ,label) + (device ,(device->sexp device)) + (device-mount-point ,mount-point) + (configfile ,configfile))) (_ (report-menu-entry-error entry)))) (define (sexp->menu-entry sexp) @@ -204,6 +216,15 @@ record." (multiboot-kernel multiboot-kernel) (multiboot-arguments multiboot-arguments) (multiboot-modules multiboot-modules))) + (('menu-entry ('version 0) + ('label label) ('device device) + ('device-mount-point mount-point) + ('configfile configfile) _ ...) + (menu-entry + (label label) + (device (sexp->device device)) + (device-mount-point mount-point) + (configfile configfile))) (('menu-entry ('version 0) ('label label) ('device device) ('device-mount-point mount-point) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 7283257354..2afc1e0b09 100644 =2D-- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -9,6 +9,7 @@ ;;; Copyright =A9 2020 Stefan ;;; Copyright =A9 2022 Karl Hallsby ;;; Copyright =A9 2022 Denis 'GNUtoo' Carikli +;;; Copyright =A9 2022 Dr. Stefan Karrmann ;;; ;;; This file is part of GNU Guix. ;;; @@ -416,6 +417,15 @@ menuentry ~s { #$root-index (string-join (list #$@arguments) " " 'pr= efix) (string-join (map string-join '#$modules) "\n module " 'prefix)))) + (configfile + #~(format port " +menuentry ~s { + ~a + configfile ~a +}~% + #$label + #$(grub-root-search device configfile) + #$configfile")) (chain-loader #~(format port " menuentry ~s { diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm index 03a1d01aff..028cffc73c 100644 =2D-- a/tests/boot-parameters.scm +++ b/tests/boot-parameters.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =A9 2019, 2020 Miguel =C1ngel Arruga Vivas ;;; Copyright =A9 2022 Josselin Poiret +;;; Copyright =A9 2022 Dr. Stefan Karrmann ;;; ;;; This file is part of GNU Guix. ;;; @@ -318,6 +319,12 @@ (linux "/boot/bzImage") (initrd "/boot/initrd.cpio.gz"))) +(define %configfile-menu-entry + (menu-entry + (label "test-configfile") + (device (uuid "6d5b13d4-6092-46d0-8be4-073dc07413cc")) + (configfile "/boot/grub/grub.cfg"))) + (test-equal "menu-entry roundtrip, uuid" %uuid-menu-entry (sexp->menu-entry (menu-entry->sexp %uuid-menu-entry))) @@ -326,4 +333,8 @@ %file-system-label-menu-entry (sexp->menu-entry (menu-entry->sexp %file-system-label-menu-entry))) +(test-equal "menu-entry roundtrip, configfile" + %configfile-menu-entry + (sexp->menu-entry (menu-entry->sexp %configfile-menu-entry))) + (test-end "boot-parameters") =2D- 2.30.2 --fJdmjL/d6xyzFzGq--