From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 16:13:08 2022 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 To: guix-patches@gnu.org Subject: [PATCH] grub-configfile 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== X-Spam-Flag: NO 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-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --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-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 16:14:54 2022 Received: (at 59619) by debbugs.gnu.org; 26 Nov 2022 21:14:54 +0000 Received: from localhost ([127.0.0.1]:41579 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2Vi-0007K5-2R for submit@debbugs.gnu.org; Sat, 26 Nov 2022 16:14:54 -0500 Received: from knopi.disroot.org ([178.21.23.139]:33140) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2Vf-0007Jy-SX for 59619@debbugs.gnu.org; Sat, 26 Nov 2022 16:14:52 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 890F94118D; Sat, 26 Nov 2022 22:14:50 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QWPDPLyZ8B9W; Sat, 26 Nov 2022 22:14:49 +0100 (CET) Content-Type: multipart/signed; boundary=f6faceda778544fb47f15ca3d4eeccd4bfd9c5c89dc549e8f2a8184e72ce; micalg=pgp-sha512; protocol="application/pgp-signature" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1669497289; bh=GmcKijrreo3jkNt+KgUCw3R0X7b5IZmCBwEC80mtR4s=; h=Date:Subject:From:To:References:In-Reply-To:From; b=Hsuxxyg6vnATSDQmZjSxgwydBF5bOyyDN9JCPekk9eg2VgkOs9YqDmNA9ZYvUNaql JJUw72urRKfjafohxJMZgv5srkO+SLd9OiyZc4O6sOWy1sj1JJv54/SZyt3WyB2DkC A9isATREDc+lvvYNkAIiFtrrbk78gHIJiAOeoTO7X0RHP2UCSXhgn7UtiuReIe4jqB Mw+gigKt00oIH+hO6n8OgeOIzCGebF22NreOzefgm7L9Dz9D/2AsDQxbDe+MVUsWg0 z5sTTyKeaqaaJguhn64ZIL1VlCFh8Ino4dXVMS/+A5/aapYO9aqH2upWgGWTOR6nXG o64QV2eIHizAA== Date: Sat, 26 Nov 2022 21:14:48 +0000 Message-Id: Subject: Re: [bug#59619] [PATCH] grub-configfile From: "(" To: "Stefan Karrmann" , <59619@debbugs.gnu.org> References: In-Reply-To: X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 59619 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) --f6faceda778544fb47f15ca3d4eeccd4bfd9c5c89dc549e8f2a8184e72ce Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Sat Nov 26, 2022 at 9:12 PM GMT, Stefan Karrmann wrote: > somehow ~git send-mail~ seems not to work as expected. Therefore, I send > this patch manually. What's the error? :) -- ( --f6faceda778544fb47f15ca3d4eeccd4bfd9c5c89dc549e8f2a8184e72ce Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOCgckACgkQ7ImHg/nq I23xqgwArRIgu0iToEqqDL68fsYh2TaTxokKW/wJlkkwPP165qySeIHFFinUKmYn pl9709eNwXyZHzRro6zSqGTAO0F9MKvodqi/f8PW3ZqnjaucICiRtPvXl58u948n YZ3ARXU9AdRaBJWROOFGSxTjrfxGEbwtwlhseLY3P2mfGvUrpmhqi/JgpltvGkRH BW0+sWCQHQUXNqdvDtH569G4qTrmNmfA55WTGn53F6dgACFJa88vRdj3G15zZjY2 aThFy2NviZly8J4gV+a2V32LKhmqTujTkfN8OwcVn+yugeSBqrwpWLQx96GCZYXF 5tr3uryo95XQ8VUPmCLZpyF2djlJPBNaES77UUjkfFcVF2t1kInDnmHQypenFNu4 7b5fqwi5Vznz0NOZn7fOlaN3Olm0IhVAmS77uLhVZeg4gQMOnws5clrEhcKTg0BZ vtEt7irZIugmWEVbcL7ZtgFzlpZB/mmvq5Im6gbO86rzFrRKbDrMpliHVQrMMWM+ heXferhb =zuxX -----END PGP SIGNATURE----- --f6faceda778544fb47f15ca3d4eeccd4bfd9c5c89dc549e8f2a8184e72ce-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 16:23:38 2022 Received: (at 59619) by debbugs.gnu.org; 26 Nov 2022 21:23:38 +0000 Received: from localhost ([127.0.0.1]:41584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2eA-0007Oo-1O for submit@debbugs.gnu.org; Sat, 26 Nov 2022 16:23:38 -0500 Received: from mout.web.de ([212.227.17.12]:40561) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2e8-0007Og-0g for 59619@debbugs.gnu.org; Sat, 26 Nov 2022 16:23:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1669497809; bh=2HlrcgTlYcXxBzJWKHaji65ELq2d9YiLka2oKSqbUxk=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=dwGXx3S9S6H53RkswNtz+NqLFT3Q7+qIzlIHCf8C4jkwFwEw4CSLTelvRG/oqBNJe aaBstqlZa9ru6uUhvuvHA4fwi2WaD2eOSf1f/rwJSYijkzVtY95gZSSfGNSgCMVc2u cxaoCpxMig8tRedV0I0wX5ODGz0EOGVHsedwzTe9rN7T+Vzx6Rm/7cKYhuhimHk4RY 10zMPzAWEsRBQeQVrbagjOmyqVVUQOZ+Gzl7Bhq6Y1BqmN8UgljqTWv1DZlBCvamMV CUzzhBYveFIhFjIJfSxCteqh0Q4Dao58FfY4tVKOjZUVN+n7gWsMdicjEpZVyUh70N niMOyPB4aY/OQ== 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 1M1aDp-1p0yK20p59-003BjI; Sat, 26 Nov 2022 22:23:29 +0100 Date: Sat, 26 Nov 2022 22:23:23 +0100 From: Stefan Karrmann To: 59619@debbugs.gnu.org Subject: Re: bug#59619: Acknowledgement ([PATCH] grub-configfile) Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: X-Provags-ID: V03:K1:5+S8J4m86xbp2Zp2/q2doW/7ZuMO/txZZQvFmg7tRgR24+DlXG7 e9cpTTj4NnFxkQaoavA9lR05q18t2LNtDI32FBpa+2SXoFXVzsrnXlRNJ96NV6jgIfYC7oD 5CkqR0SCQVo7S1Ge7CxYNXZMCEU5SIwJhp7NSz1U+IuSO4MAzOhUUTw24B9y6qqroNEjee5 wExziskA6btlGgXvTM0lQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:9kt2E7umISo=;OV7VbESnjI06dG/rd9ClfcOmbpZ kNq/pZyqnif+605wnfNz5r392yt6UJBUCV5cWN3mW8C9ZJqkFaMr9jE4+UcaDg/CGdjyqdbDy CwJ/KI4TVhwepfPQQ/ApnjurGcszh9502JParO7yteYia1N2vnDva4TX2UGcadkgpj6g6zlQB ZsK8sN0y24FfyUJGVAtlWQUe0JMSgTF62TDDdFvZzKjuMNNjLsXKUqMl6qaNmUm5D4TM7G5Sd d+yXxdWYtfix9Kd3d53B9ZaDTRH6wfUZQbCd/7jhThk6kf8mCq/bniYFNQyS1ecKkRJHVrg4x xJmn7Ag6xWMRGCh8C9AKlD/DTmWSFtJWVFFuKb3fQ4bCb2JicojZrpmiaaUIKIhCI8qo6jt0V kPKFTYaML8SnuNuxwyl95mywZ/orfc7F35xWiK15DEAkL3A0GnxozkKCoRiO4eq5urjjblkWT qtKFWcMR1ZML3hXnyt89uUEVq6J7bEv9bjd92Uc7EAO7Frdp3Nyna1ftJQY5RDlgiXJCmWAnq O1cWfbxYV0Mtp3MraeKlnJFaiBpRABb4sK6iYT+IwEruqS9zfFn0WKLpDmz4YzQe0i2KqkbCP Ql08vUgwdZh1FG21MeVUwssYNkrIdIJclP+/ARO/xJmU4eRHmClBcRUnZTsmPsKcgYUPGUdwD ZegVmN+sQrsFB09iLBuEVWClLaDo/+YTOJEzghTHVaOFoWlFc9CHYW7JYmZVPzvRuJ40ZG/WC 8W7OCPvnkfHqouoiApk3LsGI0RzECSyH4SVFse8Or5RCzN34Ow2JjFCDnWJqrHpBebCQ7EabZ oNGRV+BABMW/PyP4nT3k6oeqOI6mXX8oTZ7ZcKP1PTBIqOiG8jIUx3DMVu3q7/BMF5t4RvwwK 0OOU9TcG76oompLhtBr6I84xBNIJpwc7CT4AWKydMT47/oIYdarD+/+gK2tybsxhGsry8NT3x wjtKudkVMdpxI3pOkbgjxGnV8kU= X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 59619 Cc: paren@disroot.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dear paren, all seems to work, but nothing got through to debbugs.gnu.org. Here is the output: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D $ git send-email --subject=3D'grub configfile' --to=3D'guix-patches@gnu.or= g' patches/0001-grub-configfile.patch --compose patches/0001-grub-configfile.patch E-Mail mit Zusammenfassung ist leer, wird ausgelassen Die folgenden Dateien sind 8-Bit, aber deklarieren kein Content-Transfer-Encoding. patches/0001-grub-configfile.patch Welches 8-Bit-Encoding soll deklariert werden [UTF-8]? (mbox) F=FCge cc: hinzu: "S.Karrmann" von Zeile 'From:= "S.Karrmann" ' From: "S.Karrmann" To: guix-patches@gnu.org Cc: "S.Karrmann" Subject: [PATCH] grub-configfile Date: Sat, 26 Nov 2022 22:02:33 +0100 Message-Id: <20221126210233.84924-1-S.Karrmann@web.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Die Cc-Liste oberhalb wurde um zus=E4tzliche Adressen erweitert, die i= n der Commit-Beschreibung des Patches gefunden wurden. Wenn dies passiert, w= erden Sie von send-email zu einer Eingabe aufgefordert. Dieses Verhalten wir= d durch die Konfigurationseinstellung sendemail.confirm gesteuert. F=FCr weitere Informationen, f=FChren Sie 'git send-email --help' aus. Um das aktuelle Verhalten beizubehalten, aber diese Meldung zu unterdr= =FCcken, f=FChren Sie 'git config --global sendemail.confirm auto' aus. Diese E-Mail versenden? (Ja [y]|Nein [n]|Bearbeiten [e]|Beenden [q]|Alle [= a]): y OK. Log enth=E4lt: Sendmail: /usr/sbin/sendmail -i guix-patches@gnu.org S.Karrmann@web.de From: "S.Karrmann" To: guix-patches@gnu.org Cc: "S.Karrmann" Subject: [PATCH] grub-configfile Date: Sat, 26 Nov 2022 22:02:33 +0100 Message-Id: <20221126210233.84924-1-S.Karrmann@web.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Ergebnis: OK =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Sorry, for LANG=3Dde Kind regards, =2D- Stefan Karrmann From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 16:25:54 2022 Received: (at 59619) by debbugs.gnu.org; 26 Nov 2022 21:25:54 +0000 Received: from localhost ([127.0.0.1]:41589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2gM-0007Q2-II for submit@debbugs.gnu.org; Sat, 26 Nov 2022 16:25:54 -0500 Received: from knopi.disroot.org ([178.21.23.139]:41290) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2gK-0007Pw-Fv for 59619@debbugs.gnu.org; Sat, 26 Nov 2022 16:25:53 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 2EDB7411B9; Sat, 26 Nov 2022 22:25:51 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eprmnW24zlMR; Sat, 26 Nov 2022 22:25:49 +0100 (CET) Content-Type: multipart/signed; boundary=48800f59bae846d0dcd635d84e6d6df3c39abdbd2d1cccd3cdede252c4b9; micalg=pgp-sha512; protocol="application/pgp-signature" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1669497949; bh=DpygLbak12+VscLLhlPmOiYFsK9kBqhrn3qyFVTVaNc=; h=Date:Subject:From:To:References:In-Reply-To:From; b=fwGgHHKkhcy8rvXq2rttC9YDiy1mHHqbQOei/+DMijBSqs6oLace1+/W5yTkEoqg7 OBM1n3nWa7aCi1MaXs+DJQOWSKqd9+vkAXx8cLPbu9ma+5INpG2tZJwAbF6d9oD1n1 91FaEM9R0zEbNvAD7NO3c9rSM7ImmoctmWLiYIy+BfMkppiKsKbajlxBJmEv3+wP/9 pxC4Td8Q+pn1LiyD2F0NYQGWHz31QTzrAbUolNwGjkNaCubKmRu1OXA2B0MlVq62zF h8NY0MgOuIAG8CxTjtfDFNsTlJXizPj52I1xbrOmqTAH/qWktW43USamQHW4VNmyaF z/JbNy2QUWJoQ== Date: Sat, 26 Nov 2022 21:25:47 +0000 Message-Id: Subject: Re: bug#59619: Acknowledgement ([PATCH] grub-configfile) From: "(" To: "Stefan Karrmann" , <59619@debbugs.gnu.org> References: In-Reply-To: X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 59619 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.9 (/) --48800f59bae846d0dcd635d84e6d6df3c39abdbd2d1cccd3cdede252c4b9 Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 On Sat Nov 26, 2022 at 9:23 PM GMT, Stefan Karrmann wrote: > all seems to work, but nothing got through to debbugs.gnu.org. Here is th= e > output: I'm not really sure what the problem is, but you might have more success fo= llowing these instructions: -- ( --48800f59bae846d0dcd635d84e6d6df3c39abdbd2d1cccd3cdede252c4b9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEE6Vh10NblKE5doNlW7ImHg/nqI20FAmOChF0ACgkQ7ImHg/nq I21R0QwA3LUVFxYVDPjPkgi2NM8O5gNRvnFIF/ffmSE77eyWK8EPMVqVQxE5hpBT 9TjdXwbEWo1pAB4YOW23cDUopGtRpKc/jybQIFrPeMEYa4vwCtIpDS13sXVWPpmZ nZqYk9hCGY4gSDKrVme+P00Cu+GjmB2Q3mZ6Jx6X6sqSOYdMRh9Bo9qMbqaQdjaU uuCdVw3TXuL5LzO9UBws6ltK7NkUiY4dyWLqyu9orLqXeXlvjoqLaac5voAAcXhW z+ojlES226BqTUkOi3q/nVeXn2PpAYTezizPlF+166KoQe7Bs4pkT0saFuyKslZs JNBvVv1+Tlayd69ROhQizuop/Psd6LlqNJSoMjZv+xGRq6Pwqha/ahsEjviTFNYn jq3gd4siIr8SEovzvXzMsVfnEYmhlmloGJibpXlzDnxgNtLe1WxROU7EBtQ2sCj4 d5DT1aZbtzX0DKvziezOmA2MO4HmgLC996ceuSEVvHssnqpKB0JM6MTLZwp6Ylnj fiAWyo1y =MMbx -----END PGP SIGNATURE----- --48800f59bae846d0dcd635d84e6d6df3c39abdbd2d1cccd3cdede252c4b9-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 26 16:33:10 2022 Received: (at submit) by debbugs.gnu.org; 26 Nov 2022 21:33:10 +0000 Received: from localhost ([127.0.0.1]:41598 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2nN-0007Ur-Uh for submit@debbugs.gnu.org; Sat, 26 Nov 2022 16:33:10 -0500 Received: from lists.gnu.org ([209.51.188.17]:57968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oz2nJ-0007Ue-3v for submit@debbugs.gnu.org; Sat, 26 Nov 2022 16:33:05 -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 1oz2nI-0007DB-Pu for guix-patches@gnu.org; Sat, 26 Nov 2022 16:33:04 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oz2nG-00069p-Nr for guix-patches@gnu.org; Sat, 26 Nov 2022 16:33:04 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 02a7817f; Sat, 26 Nov 2022 21:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=Mc2EUmtp+vmQ SplcidAgcOmVW32zFr346Ztm0YHAn8A=; b=X22Mwhz5juMJt34OgshFd6tcoSL9 OWVy5GZq3IUhBikBK5S4hnQ+RleHkvuPfAW7JL2eUtuGGG6bsZZgsy3gKXdcB8Ov aiR+9i5ndemnvHLxbyIJZ5AqSmnB1Okz6ASY4au5KNw8mWcruaJDXdY5JLkLYeML iTDNHDXw1VpLfU19UJA2cPCpI6HGbfLPXEy8CB/VU2gnp+T1XO5vtJ/9SSjxBZek VdSy6Txjlqqb2G1n34xZ2HXvqseLW6UrA9yBKsN4jRPILSRcc8yKCOXBzz8m6Yar zzz6F+mOTZ0R84cKZIqULVPtE6K6JhhErv4BCfrp42zAhNjtWsWtAske4A== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 07b0522f (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 26 Nov 2022 21:32:55 +0000 (UTC) Date: Sat, 26 Nov 2022 22:32:44 +0100 From: Julien Lepiller To: guix-patches@gnu.org, Stefan Karrmann , 59619@debbugs.gnu.org Subject: Re: [bug#59619] [PATCH] grub-configfile User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: <4FC721E0-4300-4978-90BA-F960CDDD1F48@lepiller.eu> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=----5XGQK2844IL5YTRGTN3F05R1H21UXN Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu 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, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) ------5XGQK2844IL5YTRGTN3F05R1H21UXN Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable If it's your first submission, it gets delayed for manual review, which mig= ht be what's happening with send-email=2E However this email should also ha= ve been delayed, so not sure what's happening=2E Regarding your patch, tomething seems to have gone wrong=2E I don't have t= he tool right now to figure it out, but you have quite a few lines that see= m to be identical but marked as changed=2E What happened there? One way to test it is to use pre-inst-env to use that new version of guix = and build a system (you wouldn't be able to use sudo, so you can't boot it,= but you can build and inspect)=2E Something like: guix gc -R $(=2E/pre-inst-env guix system build example=2Escm) | grep grub= =2Ecfg Will give you the name of the config file=2E For less builds, you could us= e -n and build the derivation for grub=2Ecfg only, manually=2E HTH! Le 26 novembre 2022 22:12:54 GMT+01:00, Stefan Karrmann a =C3=A9crit=C2=A0: >Dear all, > >somehow ~git send-mail~ seems not to work as expected=2E Therefore, I sen= d >this patch manually=2E > >The patch allows us to use the menuentry configfile for grub=2E As I'm st= ill >a newbie with regard to guix, I was not able to test it=2E > >My next step will be: >- patch guix, such that grub can work with btrfs subvolumes > >Kind regards, >-- >Stefan Karrmann >secure communication? GPG: 0x8C3260C01550B612E4C5730D22E42112094CE53F ------5XGQK2844IL5YTRGTN3F05R1H21UXN Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable If it's your first submission, it gets delayed for= manual review, which might be what's happening with send-email=2E However = this email should also have been delayed, so not sure what's happening=2E
Regarding your patch, tomething seems to have gone wrong=2E I don't h= ave the tool right now to figure it out, but you have quite a few lines tha= t seem to be identical but marked as changed=2E What happened there?
One way to test it is to use pre-inst-env to use that new version of guix = and build a system (you wouldn't be able to use sudo, so you can't boot it,= but you can build and inspect)=2E Something like:

guix gc -R $(=2E/= pre-inst-env guix system build example=2Escm) | grep grub=2Ecfg

Will= give you the name of the config file=2E For less builds, you could use -n = and build the derivation for grub=2Ecfg only, manually=2E

HTH!
Le 26 novembre 2022 22:12:54 GMT+01:00, Stefan= Karrmann <S=2EKarrmann@web=2Ede> a =C3=A9crit=C2=A0:
Dear all,

somehow ~git send-mail= ~ seems not to work as expected=2E Therefore, I send
this patch manually= =2E

The patch allows us to use the menuentry configfile for grub=2E = As I'm still
a newbie with regard to guix, I was not able to test it=2E<= br>
My next step will be:
- patch guix, such that grub can work with = btrfs subvolumes

Kind regards,
--
Stefan Karrmann
secure co= mmunication? GPG: 0x8C3260C01550B612E4C5730D22E42112094CE53F
------5XGQK2844IL5YTRGTN3F05R1H21UXN-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 29 13:33:34 2023 Received: (at 59619) by debbugs.gnu.org; 29 Jan 2023 18:33:35 +0000 Received: from localhost ([127.0.0.1]:45376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMCUg-0006rF-FI for submit@debbugs.gnu.org; Sun, 29 Jan 2023 13:33:34 -0500 Received: from mout.web.de ([212.227.17.11]:48081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMCUe-0006qz-Ol for 59619@debbugs.gnu.org; Sun, 29 Jan 2023 13:33:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1675017206; bh=+qXcis36pumd8VViJd02O3I1AO60Da+Rs+WGzPTyvDw=; h=X-UI-Sender-Class:Date:From:To:Subject; b=DuOesmFfP5MosDETBC3zrrKlIFeGx6almr7oZe5+T1vYDXd+s2Qvp/dBOAdPS9ofV bpKwhN6QQT93a0E8tJeP6oA45xvjeMerER0kSjZ/Z7wo4XIo8g5CBbKfrHPS+x22cI eOioxPO3nH/R/TfFJS+++fISvVst38vfAc/iGDSuyxuXon4qOAXeOKs5Tgnb/YGyu3 uNDCq7iWDm4pa4MAk2kSyG8d7U7An3MG84ePV9D75tqy77Aijfg7EJpbRMaM05MLZp XN41x2k8yI7NI7etVowPBs5rFMKXj4boZRLmsT0TNk7sMZkETFnaIf3Leb+5TNooOy ImXEzw+I8onxQ== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from localhost ([94.218.75.101]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MVJNd-1pC3qz1hNn-00SOd0 for <59619@debbugs.gnu.org>; Sun, 29 Jan 2023 19:33:26 +0100 Date: Sun, 29 Jan 2023 19:33:23 +0100 From: Stefan Karrmann To: 59619@debbugs.gnu.org Subject: [bug#59619] [PATCH] grub-configfile - guix shell ... ./pre-inst-env Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:A8Af6U1IU5lvlOVjgC/FNNb62AenXnSWKIcsd51b6Q6DzqnoSf0 4H7maSR43X2GK64HjNSSo878JRHKXA27UwJukybbaonjZ5QER6MuFCc/xY2CZ6rPvQ9kkao pW2NWnerWuMA1KNC8n33TvNxHb1NPDK37GQS1MQkBHfPvfJ1kKF8iuU3IrKf8z8HWAigdAu LBdO35WH0QQ/QKLmcXHSQ== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:Uvle34q1VhI=;305JKeldwzaff1tM7QPiFzQZq3t We11tI8RHvbhXwZYtIdD+5EBbRZywCuzisTzR82l3InChDskPt7Y5Mbmtna4HI5Sl5x3SFt1u lcNXdGAODWbAiHpQS0V0DswYLhQJLiazIEQEvK7YfM2yXJK8IslNhmGszvAGSelXxbGnvlp7Y rOsDF8VbBo7Xi8/eRPxQvFx7VcilVoCmy1+BVnqSIY1Bmffz5FSAjdtFPHrf28zTagOQFOXzp bf1B63Q0oF4RcNJqjXF5vdHvA5pkqN1H9cO5TW6P4n7tH+ETujFz3/MGQUbJsmm3RV3e9Uet9 ZZBU9TPf7jJyw8Lr5Zz2H7wVMDXwNq/fWbHTLuKftFGmxu56ixTQlTaozo5q8TdO7jUHOQvkT npFYogKiUywCP9OiFvRE1+1f5HXrG11SqqsyMX6H1qAT+1VmHcRIdTc18b5T5Sd/D/ED1/UA6 /xo+1iE+B4kLtSkpb1NhWkwnrCf2VbemE1zBy2C9ZhPik58wBPX4cFdxl99hrF/5EBhqBufCh hdzRmojal2CQq7sUmiOyUgwQLoVkUoxtU5U5Vp6eoHUyTovqhLThJYZCiOWNbnm1L860afvWw iZ7dtsIfp2sIo9QrCHaZLTo1Guwq0rhtz4mtHou6wXbGjDWQSslUZWF2Xmcgi8pLt0l8j5mv8 dvGHj/7HNF3kMw8fAQ0kiVAKvszSr8RgZfIUvQBY6k6kjit6EqLQzUSqlfKo7CEkXwJumEsY3 FkTairVOEmiiDtF0qC2uJikItNcxKv5ev0yRnolnSgFfTh6XjT5KKcZcMRMtN1Iebgj31awnT Lwomb9OsKqt7J/nPFHzSIkj+KntETwCgZEFKQ3ARyAMWsTmyy4CZHpcgTlZO/pGikxnxaF6Tc bmufO08yQQZUUUCCy3/dJ3O5VLU2ZWc3yXaGMGC++pRQUkkL5KlQ5Sa6zV78pGSISc8Dl41mR WYaU5A== X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59619 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Dear all, I managed to run guix directly in my guix git-clone. A peek shows that the new menu-entry works initially. Later, it runs into an record-abi-mismatch-error. I suspect, that this happens on the side of the guix-daemon. Is this really the problem? How can we handle it? $ ./pre-inst-env ~/guix-clone/scripts/guix system vm /home/sk/guix/system-= initial.scm --share=3D/ --full-boot --root=3D/home/sk/guix/vm ;;; (#< label: "Grub config" device: #< type: dce bv: #v= u8(92 187 154 112 163 200 67 132 160 133 158 104 150 5 131 67)> device-mou= nt-point: #f linux: #f linux-arguments: () initrd: #f multiboot-kernel: #f= multiboot-arguments: () multiboot-modules: () config-file: "/boot/grub/gr= ub.cfg" chain-loader: #f>) Backtrace: In guix/store.scm: 1300:8 19 (call-with-build-handler # ?) 2170:25 18 (run-with-store # ?) In guix/scripts/system.scm: 850:2 17 (_ _) In guix/gexp.scm: 1180:2 16 (_ _) 1046:2 15 (_ _) 892:4 14 (_ _) In guix/store.scm: 2055:12 13 (_ #) 1382:11 12 (map/accumulate-builds # ?) 1300:8 11 (call-with-build-handler # ?) 2170:25 10 (run-with-store # ?) In guix/gexp.scm: 897:13 9 (_ _) In guix/store.scm: 1998:13 8 (_ #) In guix/gexp.scm: 299:51 7 (_) In unknown file: 6 (with-fluids* (#) (#f) #) In guix/gexp.scm: 733:29 5 (_) In gnu/system/image.scm: 938:21 4 (_) In gnu/system.scm: 1448:26 3 (operating-system-bootcfg #< kernel:?> ?) 521:4 2 (boot-parameters->menu-entry _) In ice-9/boot-9.scm: 1685:16 1 (raise-exception _ #:continuable? _) 1685:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1685:16: In procedure raise-exception: Throw to key `record-abi-mismatch-error' with args `(abi-check "~a: record= ABI mismatch; recompilation needed" (#>) ())'. =2D--- system-config.scm ;; this is based on znavko's Dual Boot config ;; with the second OS in GRUB on the separate hdd /dev/sda9 ( grub: (hd1,g= pt8) ) (use-modules (gnu) (gnu system nss) (gnu system locale) ;;for locale-definition (gnu services desktop) (gnu services networking) ;;for remove ntp (gnu services avahi) ;;for remove avahi - an dns? (gnu services xorg) (gnu services admin) ;;for unattended-upgrades (gnu packages admin) ;;for wpa_supplicant (gnu packages suckless) (gnu packages networking) ;; iwd (srfi srfi-1) ;;for remove function ) (use-modules (system vm inspect) (ice-9 pretty-print)) ;; debugging$ (use-modules (gnu packages linux)) ;; free/libre linux (use-service-modules desktop networking base xorg) (use-package-modules certs wm suckless) (define (peek . stuff) (newline) (display ";;; ") (write stuff) (newline) (car (last-pair stuff))) (define pk peek) (define guix-ext-root (file-system (device (file-system-label "guix-ext")) (mount-point "/") (type "btrfs") ; (options "subvol=3Dguix-root/work,noatime") (needed-for-boot? #t))) (define guix-ext-boot (file-system (device (file-system-label "guix-ext-boot")) (mount-point "/boot") (options "subvol=3Dboot/work") (type "btrfs") (needed-for-boot? #f))) ; only by grub upto initrd (define guix-ext-efi (file-system (device (file-system-label "GUIX-EXT-EF")) (mount-point "/boot/efi") #;(mount-point "/sys/firmware/efi/efivars") (type "vfat"))) (operating-system (host-name "johann") (timezone "Europe/Berlin") (locale "de_DE.utf8") (keyboard-layout (keyboard-layout "de")) (initrd-modules (cons* "btrfs" %base-initrd-modules)) (kernel linux-libre) ; gnu libre (firmware (cons* %base-firmware)) (kernel-arguments (cons* "rootdelay=3D3" ; now default subvol: "rootflags=3Dsubvol=3D/guix-ext/= work" (remove (lambda (option) (string=3D? option "quiet")) = %default-kernel-arguments))) (bootloader (bootloader-configuration (bootloader (bootloader (inherit grub-bootloader) (installer #~(const #t)))) ; (bootloader grub-bootloader) (targets (list "/dev/sdb")) (keyboard-layout keyboard-layout) (menu-entries (list (pk (menu-entry (label "Grub config") (device (uuid "5cbb9a70-a3c8-4384-a085-9e689= 6058343")) (config-file "/boot/grub/grub.cfg"))) (menu-entry (label "Debian") (linux "(hd1,gpt8)/boot/vmlinuz") ; gen= erates nonsens: search --file --set /guix-root/work(hd1,gpt8)/boot/vmlinuz (linux-arguments '("root=3D/dev/sda9"))= ; dito dito (initrd "(hd1,gpt8)/boot/initrd.img")))= ))) (file-systems (cons* guix-ext-root guix-ext-boot guix-ext-efi %base-file-systems)) (swap-devices (list (swap-space (target (uuid "d48bfe0f-9715-4267-81c9-b1503144fab6"))= ))) (users (cons* (user-account (name "sk") (uid 1000) (group "sk") (supplementary-groups '("users" "wheel" "netdev" "audio" "= video")) (home-directory "/home/sk")) %base-user-accounts)) (groups (cons* (user-group (name "sk") (id 1000)) %base-groups)) ;; This is where we specify system-wide packages. (packages (cons* nss-certs ;for HTTPS access i3-wm i3status dmenu dwm iwd ; needs dbus... slock st %base-packages)) (locale-definitions (list (locale-definition (name "de_DE.utf8") (source = "de_DE")) (locale-definition (name "en_US.utf8") (source = "en_US")))) (services (cons* (set-xorg-configuration (xorg-configuration ;for Xorg (keyboard-layout keyboard-layout))) (screen-locker-service slock) (modify-services ;; removing unnecessary services (remove (lambda (service) (member (service-kind service) (list ntp-service-type avahi-service-type bluetooth-service gdm-service-type))) %desktop-services) ;end of remove lambda services ) ;;end of modify-services )) ;;end of services ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss) ;;blacklist ugly sound speaker, blacklist #;(kernel-arguments '("modprobe.blacklist=3Dpcspkr,snd_pcsp,bluetooth")) ) ;;end of operating-system =2D--- =2D- Stefan Karrmann Sichere Kommunikation? GPG: 0x8C3260C01550B612E4C5730D22E42112094CE53F An sich ist nichts weder gut noch b=F6se. Erst das Denken mach es dazu. -- William Shakespeare (Hamlet) From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 31 12:33:50 2023 Received: (at 59619) by debbugs.gnu.org; 31 Jan 2023 17:33:50 +0000 Received: from localhost ([127.0.0.1]:54895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMuVx-0006Bd-T5 for submit@debbugs.gnu.org; Tue, 31 Jan 2023 12:33:50 -0500 Received: from mout.web.de ([217.72.192.78]:57145) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pMuVu-0006BO-E1 for 59619@debbugs.gnu.org; Tue, 31 Jan 2023 12:33:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1675186420; bh=4CjD88McjXAzrZnnpoxPpxsonRj+NAQMyhLiHWOre8Q=; h=X-UI-Sender-Class:Date:From:To:Subject; b=i7ZAiEtmKXCfa5FGkgxNEbzaXIDgBqJjEiL+MEC6UJs83VUTO7eSv6O40vcXhaBBl jvj5SmcjIaevx8WBnES+q5Cr5WyUPDqRMrT2/uyzGiAJfh45y+PA5czkTnV1HhjcU2 Nj9p9TkWTnCukJYueQMT+HgHk+QVMlXVj383f9Pfad42OcS4tq14ahv6HjZf/RUXkj h58yJMhslu3xdYnYIWVJlIdCgoQnuAPf3vASafQz9SsKiYSmERUkhhDjlprlHlT3Td 4C6LxF3e5IspCHkgc0FBquaH4ThWZ77tZHN3DxwWnSaYRIHEzr/heDM2hiAnz+PFh8 1e8yTkRb7wWGA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from localhost ([188.98.113.9]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mvbn2-1oXq1l28FK-00sgw0 for <59619@debbugs.gnu.org>; Tue, 31 Jan 2023 18:33:39 +0100 Date: Tue, 31 Jan 2023 18:33:38 +0100 From: "S.Karrmann" To: 59619@debbugs.gnu.org Subject: [PATCH] grub-configfile tested successfully Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:LcBF5UTl6cI020bxJFcdg+n8JVP67GdZQEVYyyye1kT0Td92w8m 9basDkdd4HTvb0p2sFpJr0LAjHOJAyWlmZw0slUZs6O2LekSL71LSoFWXOM+7qTztxEDldL dUeu/wxn4aYq2siwBNzSB6Rz9UvSIxIFCa5RThTJaF2PKzZ/6xgE670CuA5qiGsCH1euq0e uFt3q5RHZfHyVYX6RiBHA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:3g1mBv4Kdlg=;YL6CiGFlcI0SQCV3bI7F/VebPy6 1Mg4lt2zvS8zrU4bu/SbcoD4j7JlvPYm+VRSWjB3e0XeuyeXyZZ2QXci90uC5ANrdEkaXTjBA GF1JXhz1FCQ1a51muNBanj7mFifW4CVoQrrLTENUkEL7AevPnMy6yHWvi6SzmfIr9/j6F0DuZ r+LEwL3z4zpFh0miDFXbiCXsHx7V6yumnn2hQG3Olv84p48LTOc2xoyfdh0GS+U/NBR398Ncc 0eiXK0eYulVdiQN+GD+tcXRSgjMk3Np0KZ5nHjj+vSGZA/l2w5Oc+szbkP2KSxLtinsdyz5Mc pmGrY1Ppls7JvVI979onW7qZhdxPrtEoKNU5587opSpiv2eBhuf/fA+dFj0yDB8Zz5SdhhNfa GNHeODwuf+e8p8IMAfvBSBOiaW+nsiee6CtwUgD4+RQAu6NFhTMc4KrTqhbzZTtfRYls69xJL aqOwtRVvnALKNF5zCFjHnZPPE51claS5KiPgr6buqlm0KqUJFfuksw/D0GtKoJRpiN3woWNAx y5KimWmeDc2BHAU7G7zl/r8jDAtwqUhbFmJ581xfRCads1tkcbGZFPGxGctZnZqAKMnzEm2CX OWQY9s3ydJXAzbcMFKrnt3QnqNCP+Ahhpae16eR8AUwcicVzxRbhFKwkSJzY0UcK4sBtM+HGG dAmb9Jp7MHfOTDShd//rrkKG71noQhgPVt7lZFmfMyM+iSM0bB085sHm64mg0kcumLOT1pbUq W74B10pNDmGjRa3K/TQqrH0jj2Ax9SsxBohcowANiMk+lme34Y1lZSC4ikMxtYQZNCaD8kP6C sIj7OlEOgXWiLenr7fxQ6AfYHV1NHYyd2Mu6+oBdpsWcMXdLfeDBj9QT9wJnDZE/wM3oWfXO2 +TUQX7956FWNxkIYkmL5EWtUG9TQYkDpJNFt4fCE536OZS4NaPsNba8kvpxT1v+b5h/3Xm/9r /hQSBwJtvnEZZqzIQtfkJJXgDxg= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59619 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Dear all, I tested my patch and generated a vm with configfile in its GRUB boot menu= , cf. ~system-config.scm~ in my last post. I needed ~make clean-go ; make make-go~ to get consistent compiled guile code. The guile manual suggested ~--fresh-auto-compile~, but for this I must call guile directly AFAICS. Some tool for guile-autocompile would be nice for such developments. I hope, this patch makes it into the master branch. It helps to test insta= ll Guix in parallel to another OS. So more people can test it and will fall i= n love with Guix, hopefully. Kind regards, Dr. Stefan Karrmann =2D-- doc/guix.texi | 39 +++++++++++++++++++++++++++++---------- gnu/bootloader.scm | 29 +++++++++++++++++++++++++---- gnu/bootloader/grub.scm | 11 +++++++++++ tests/boot-parameters.scm | 11 +++++++++++ 4 files changed, 76 insertions(+), 14 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 2b1ad77ba5..45f9ed23ed 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -112,6 +112,7 @@ Copyright @copyright{} 2022 John Kehayias@* Copyright @copyright{} 2022 Ivan Vilata-i-Balaguer@* Copyright @copyright{} 2023 Giacomo Leidi@* Copyright @copyright{} 2022 Antero Mejr@* +Copyright @copyright{} 2023 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 @@ -6159,7 +6160,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. @@ -6605,7 +6606,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. @@ -12564,7 +12565,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: @@ -23482,7 +23483,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 @@ -38666,6 +38667,24 @@ The list of commands for loading Multiboot module= s. For example: @dots{})) @end lisp +@item @code{config-file} (default: @code{#f}) +A string that can be accepted by @code{grub}'s @code{configfile} +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")) + (config-file "/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 @@ -40553,7 +40572,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} @@ -40602,7 +40621,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 @@ -40620,7 +40639,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) @@ -40652,7 +40671,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} @@ -43153,7 +43172,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 @@ -43182,7 +43201,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 2c36d8c6cf..7c24fd2ebf 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-config-file 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 + (config-file menu-entry-config-file + (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 config-file by specifying field @code{config-file}. @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 config-file) #f) + `(menu-entry (version 0) + (label ,label) + (device ,(device->sexp device)) + (device-mount-point ,mount-point) + (config-file ,config-file))) (_ (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) + ('config-file config-file) _ ...) + (menu-entry + (label label) + (device (sexp->device device)) + (device-mount-point mount-point) + (config-file config-file))) (('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 ecd44e7f3c..7ed0d155d8 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. ;;; @@ -377,6 +378,7 @@ when booting a root file system on a Btrfs subvolume." (device (menu-entry-device entry)) (device-mount-point (menu-entry-device-mount-point entry)) (multiboot-kernel (menu-entry-multiboot-kernel entry)) + (config-file (menu-entry-config-file entry)) (chain-loader (menu-entry-chain-loader entry))) (cond (linux @@ -417,6 +419,15 @@ menuentry ~s { #$root-index (string-join (list #$@arguments) " " 'pr= efix) (string-join (map string-join '#$modules) "\n module " 'prefix)))) + (config-file + #~(format port " +menuentry ~s { + ~a + config-file ~a +}~%" + #$label + #$(grub-root-search device config-file) + #$config-file)) (chain-loader #~(format port " menuentry ~s { diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm index 03a1d01aff..f2d1453b2c 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 %config-file-menu-entry + (menu-entry + (label "test-config-file") + (device (uuid "6d5b13d4-6092-46d0-8be4-073dc07413cc")) + (config-file "/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, config-file" + %config-file-menu-entry + (sexp->menu-entry (menu-entry->sexp %config-file-menu-entry))) + (test-end "boot-parameters") =2D- 2.30.2 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 02 08:39:02 2023 Received: (at 59619) by debbugs.gnu.org; 2 Feb 2023 13:39:02 +0000 Received: from localhost ([127.0.0.1]:32920 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNZnp-0002T5-Fm for submit@debbugs.gnu.org; Thu, 02 Feb 2023 08:39:02 -0500 Received: from lepiller.eu ([89.234.186.109]:41648) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNZnn-0002Su-5k for 59619@debbugs.gnu.org; Thu, 02 Feb 2023 08:39:00 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 280aa9ac; Thu, 2 Feb 2023 13:38:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:cc:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=dkim; bh=lm1l+UtRU/kP vM85Np74+76JkqL5JjUliX8dWD2KWjs=; b=ks38KbamO+u8M5vMUTkHoz4J0jT/ LrR5MCxEQJ0hVTbHoaGxEuZxHCsR85xv41kf2xT20pow7eu7c5Aq6Rj/RBupDG5+ heP2S8WCilEwOx4GrHBsecHKfie2kvwchR3/oWG1xid+WHg22Gd1NOIiTJ6dx3uQ gPZhHC2ODzm7ViDOjE2CI4V0t5qF/Lh3p2t4nyx57pzG+ntXxM3LgKU25Bb80aSl 9hjgaWsTT2yxacxq2QzXkSi1KO0vDeEYoW0u2Q3RWjpfN0Z0pHaSFUUbPZttYphe k0cuuc2ekwfBrsK05SaGmD1kBkjDJ9SkJJRU5KEHU/+/OgL5tOXmdvG4og== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 71afeec6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 2 Feb 2023 13:38:55 +0000 (UTC) Date: Thu, 2 Feb 2023 14:38:41 +0100 From: Julien Lepiller To: "S.Karrmann" Subject: Re: [bug#59619] [PATCH] grub-configfile tested successfully Message-ID: <20230202143841.0f4aeed6@tachikoma.lepiller.eu> In-Reply-To: References: X-Mailer: Claws Mail 4.1.1 (GTK 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 59619 Cc: 59619@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) thanks for the patch! I was not able to apply it, and it contains unchanged lines, which is weird. Could you rebase the patch on top of master before sending it again? I wasn't able to test it yet, but it looks good :) Le Tue, 31 Jan 2023 18:33:38 +0100, "S.Karrmann" a =C3=A9crit : > Dear all, >=20 > I tested my patch and generated a vm with configfile in its GRUB boot > menu, cf. ~system-config.scm~ in my last post. >=20 > I needed ~make clean-go ; make make-go~ to get consistent compiled > guile code. The guile manual suggested ~--fresh-auto-compile~, but > for this I must call guile directly AFAICS. Some tool for > guile-autocompile would be nice for such developments. >=20 > I hope, this patch makes it into the master branch. It helps to test > install Guix in parallel to another OS. So more people can test it > and will fall in love with Guix, hopefully. >=20 > Kind regards, > Dr. Stefan Karrmann >=20 > --- > doc/guix.texi | 39 > +++++++++++++++++++++++++++++---------- gnu/bootloader.scm | > 29 +++++++++++++++++++++++++---- gnu/bootloader/grub.scm | 11 > +++++++++++ tests/boot-parameters.scm | 11 +++++++++++ > 4 files changed, 76 insertions(+), 14 deletions(-) >=20 > diff --git a/doc/guix.texi b/doc/guix.texi > index 2b1ad77ba5..45f9ed23ed 100644 > --- a/doc/guix.texi > +++ b/doc/guix.texi > @@ -112,6 +112,7 @@ Copyright @copyright{} 2022 John Kehayias@* > Copyright @copyright{} 2022 Ivan Vilata-i-Balaguer@* > Copyright @copyright{} 2023 Giacomo Leidi@* > Copyright @copyright{} 2022 Antero Mejr@* > +Copyright @copyright{} 2023 Dr. Stefan Karrmann@* >=20 > Permission is granted to copy, distribute and/or modify this document > under the terms of the GNU Free Documentation License, Version 1.3 or > @@ -6159,7 +6160,7 @@ Transformation Options}) so it should be > lossless. >=20 > @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. >=20 > @@ -6605,7 +6606,7 @@ interpreted as packages that will be added to > the environment directly. >=20 > @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. >=20 > @@ -12564,7 +12565,7 @@ candidates, and even to test their impact on > packages that depend on them: >=20 > @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 >=20 > @dots{} or to build from a checkout in a pristine environment: > @@ -23482,7 +23483,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). >=20 > -Possible values are: > +Possible values are: >=20 > @itemize @bullet > @item > @@ -38666,6 +38667,24 @@ The list of commands for loading Multiboot > modules. For example: @dots{})) > @end lisp >=20 > +@item @code{config-file} (default: @code{#f}) > +A string that can be accepted by @code{grub}'s @code{configfile} > +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")) > + (config-file "/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 > @@ -40553,7 +40572,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} > @@ -40602,7 +40621,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 >=20 > In some cases multiple different configuration records might be > defined in the same file, but their serializers for the same type > might have to @@ -40620,7 +40639,7 @@ manually specify a custom > @var{serializer} for every field. >=20 > (define (bar-serialize-string field-name value) > @dots{}) > - > + > (define-configuration foo-configuration > (label > (string) > @@ -40652,7 +40671,7 @@ macro which is a shorthand of this. > (field > (string "test") > "Some documentation.")) > -@end lisp > +@end lisp > @end deffn >=20 > @deffn {Scheme Syntax} define-maybe @var{type} > @@ -43153,7 +43172,7 @@ down in its dependency graph. As it turns > out, GLib 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@@entry=3D1, argv=3Dargv@@entry=3D0x7fffffffcfd8, +#2 > 0x00007ffff7fe275a in call_init (l=3D, > argc=3Dargc@@entry=3D1, argv=3Dargv@@entry=3D0x7fffffffcfd8, > env=3Denv@@entry=3D0x7fffffffcfe8) at dl-init.c:72 #3 0x00007ffff7fe2866 > in call_init (env=3D0x7fffffffcfe8, argv=3D0x7fffffffcfd8, argc=3D1, > l=3D) at dl-init.c:118 @@ -43182,7 +43201,7 @@ Starting > program: /gnu/store/@dots{}-profile/bin/sh -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@@entry=3D3, argv=3Dargv@@entry=3D0x7fffffffd088, +#3 > 0x00007ffff7fe275a in call_init (l=3D, > argc=3Dargc@@entry=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 > 2c36d8c6cf..7c24fd2ebf 100644 --- a/gnu/bootloader.scm +++ > b/gnu/bootloader.scm @@ -6,6 +6,7 @@ ;;; Copyright =C2=A9 2020 Jan > (janneke) Nieuwenhuizen ;;; Copyright =C2=A9 2022 > Josselin Poiret ;;; Copyright =C2=A9 2022 Reza Alizadeh > Majd +;;; Copyright =C2=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-config-file >=20 > 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 > + (config-file menu-entry-config-file > + (default #f)) ; string, path of > grub.cfg file (chain-loader menu-entry-chain-loader > - (default #f))) ; string, path of efi file > + (default #f))) ; string, path of efi > file >=20 > (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 config-file by specifying field @code{config-file}. > @item chain-loader by specifying field @code{chain-loader}. > @end enumerate")))))) >=20 > @@ -141,7 +146,7 @@ > (match entry > (($ label device mount-point > (? identity linux) linux-arguments (? identity > initrd) > - #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 config-file) #f) > + `(menu-entry (version 0) > + (label ,label) > + (device ,(device->sexp device)) > + (device-mount-point ,mount-point) > + (config-file ,config-file))) > (_ (report-menu-entry-error entry)))) >=20 > (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) > + ('config-file config-file) _ ...) > + (menu-entry > + (label label) > + (device (sexp->device device)) > + (device-mount-point mount-point) > + (config-file config-file))) > (('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 ecd44e7f3c..7ed0d155d8 100644 > --- a/gnu/bootloader/grub.scm > +++ b/gnu/bootloader/grub.scm > @@ -9,6 +9,7 @@ > ;;; Copyright =C2=A9 2020 Stefan > ;;; Copyright =C2=A9 2022 Karl Hallsby > ;;; Copyright =C2=A9 2022 Denis 'GNUtoo' Carikli > +;;; Copyright =C2=A9 2022 Dr. Stefan Karrmann > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -377,6 +378,7 @@ when booting a root file system on a Btrfs > subvolume." (device (menu-entry-device entry)) > (device-mount-point (menu-entry-device-mount-point entry)) > (multiboot-kernel (menu-entry-multiboot-kernel entry)) > + (config-file (menu-entry-config-file entry)) > (chain-loader (menu-entry-chain-loader entry))) > (cond > (linux > @@ -417,6 +419,15 @@ menuentry ~s { > #$root-index (string-join (list #$@arguments) " > " 'prefix) (string-join (map string-join '#$modules) > "\n module " 'prefix)))) > + (config-file > + #~(format port " > +menuentry ~s { > + ~a > + config-file ~a > +}~%" > + #$label > + #$(grub-root-search device config-file) > + #$config-file)) > (chain-loader > #~(format port " > menuentry ~s { > diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm > index 03a1d01aff..f2d1453b2c 100644 > --- a/tests/boot-parameters.scm > +++ b/tests/boot-parameters.scm > @@ -1,6 +1,7 @@ > ;;; GNU Guix --- Functional package management for GNU > ;;; Copyright =C2=A9 2019, 2020 Miguel =C3=81ngel Arruga Vivas > ;;; Copyright =C2=A9 2022 Josselin Poiret > +;;; Copyright =C2=A9 2022 Dr. Stefan Karrmann > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -318,6 +319,12 @@ > (linux "/boot/bzImage") > (initrd "/boot/initrd.cpio.gz"))) >=20 > +(define %config-file-menu-entry > + (menu-entry > + (label "test-config-file") > + (device (uuid "6d5b13d4-6092-46d0-8be4-073dc07413cc")) > + (config-file "/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))) >=20 > +(test-equal "menu-entry roundtrip, config-file" > + %config-file-menu-entry > + (sexp->menu-entry (menu-entry->sexp %config-file-menu-entry))) > + > (test-end "boot-parameters") > -- > 2.30.2 >=20 >=20 >=20 >=20 From debbugs-submit-bounces@debbugs.gnu.org Thu Feb 02 14:04:34 2023 Received: (at 59619) by debbugs.gnu.org; 2 Feb 2023 19:04:34 +0000 Received: from localhost ([127.0.0.1]:35807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNess-0005vp-2y for submit@debbugs.gnu.org; Thu, 02 Feb 2023 14:04:34 -0500 Received: from mout.web.de ([217.72.192.78]:38909) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pNesp-0005vZ-CF for 59619@debbugs.gnu.org; Thu, 02 Feb 2023 14:04:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1675364662; bh=od+jNOLDWEjEdzkQsTpNdixOS0xk294Yyh5467hoDFc=; h=X-UI-Sender-Class:Date:From:To:Subject; b=ixpg53SsXl/rfllRwj2RqC0R1MJ8JIC+oTzTKyqpaFAM7BjNhuGVLhRtq/axpYUeQ R6Y5L5/5W+R96x9v+tnZhFtnceEtXYU5/GNUVoeU/WE313fj/Dr1A7vriS31QUt7L0 ZxslJRHTegp+2z/054yRFpRWRcnTLK0kjvKdK/Ml7XfYCm5rxdXdHRrUFDpVN9XETj 09KaMYcnBFhA6RQHgRNl4oWpFsCGdwaf0ZCwIBkIYHQbgOull++IXSWW0SDFvSthBQ qiwiiXFYAfZokfmyAdiXSN0EjT6vy6NtcPUMTVOC1HnUIBHhntW7iAep7Wx82YIMlW 9Yh63jGceDPIg== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from localhost ([188.98.113.9]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M43GU-1pNesg2F7Y-000DOM for <59619@debbugs.gnu.org>; Thu, 02 Feb 2023 20:04:22 +0100 Date: Thu, 2 Feb 2023 20:04:21 +0100 From: "S.Karrmann" To: 59619@debbugs.gnu.org Subject: [PATCH] grub-configfile tested Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Etmsa7wh/TLtiH3jnPYjyKmL9aLNGps4+B8IIdTW8kNbo0GNEEw gUHY0+C/C6j+wHGIbub3hdom5j8SKDe4Vyzi1m4AeGN7yG4K/qLwhVwzMlyIGwclvGUfr61 XR4AuuQFFEyvC5hCopCXPaf0IdyTmoGJRzIZyDZ8KzqROiDRCiWeETbReYd2yUp2tgLMS6h t5aQPAFWTRHhdBjOkSxAw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:6oPH58MOWqQ=;ZMyTanZUcOz2wT+NQr4iYbKoq0q cNanTnzmqInqCg9ah7m93PGPbXb7FD1Z2yvcEgzPk0yF9BvCH3gsPk9Gym6nxvCXNsieipEMC j3VdeckvJbzf+rZjUPgu3CBiPjAu3Do6iu1wkScNXlAKfyIyvqUhMIKWDwCDe8rfIlB/6CmrV IY7cGgXa9X4b50mOl4GTnzSKQd8OkjmsiPBEjAqZHWhVYtGJbWcNqWD6KAUxKuf7WyUdls+TI wZRne5GW/E21iInGUtKJWZ+2hypaRoym/TFeM7AznjbaJAPnZvFjumfGI4IHATz+F4zoR2qxa gaOCiNTSGtDxFh/AL02eE5Ytsee7wK+gRGxGzeUfVoc4jKH927R5CxmcqhWHxCJIXIabGDuUC keb5sSD3Cz3v1MueUmlOki8N5HMB3AzgeiV1hNP4yT3O04108Srq9SqMJjWeDomUF72IcH3sl VtHe9F5LTAD5HkiwAnFMJlxPg/qke8qysF4NY9zK5ab/Kq5fTBLCNHrYu0kLf6N0zjFXLQh/w B4wNW4iU1rL+/0Ne/9DSBpGLB8ZuLE/im+um8VkVQnj1ruMlSK/uDnQQXlVNvV8W2nBTW/Y+f J0FH3oqsHnyqoxmm5kXrKakJAaJsksZ3IvZEyYF0n5Z3V+haf+jbFA/qb/CjY7lU9C0xFzUmo 8QU4ZUZ8O3xNRq0PSD3dk9miXE6zwZxJsckdlCVdYGDeIbvNsW/+MRG8Isg08Zr+NSq1KPGHy dBApKVvsbvup2OlXsRLBHjjZmuoIRRVEdx/aCoxGgYLVqLplVisAYefGpW/smcSR+hJTopT3S C54ssJgGRV7SyarrpCNx8oyrbLJ4bTTMlW30kcfcwX/1iv2mwLayKims5EUmOw8GnUN/g+Lw+ FOTjIh8WICGgt7AuLj6oPGtmYKMqALVTUWlL+BZJTkm7/Jwovc6ksqQ3RtDDgCtUuDWv8eXbG KnL4tA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59619 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) now I generated this patch by: git pull git format-patch -o patches --ignore-space-at-eol origin/master..HEAD My Emacs deletes intentionally all space at eol. Therefore, the other patc= h may work with: git apply --whitespace=3Dwarn grub-configfile.patch =2D-- doc/guix.texi | 19 +++++++++++++++++++ gnu/bootloader.scm | 29 +++++++++++++++++++++++++---- gnu/bootloader/grub.scm | 11 +++++++++++ tests/boot-parameters.scm | 11 +++++++++++ 4 files changed, 66 insertions(+), 4 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 64873db00b..937f7c54cb 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -112,6 +112,7 @@ Copyright @copyright{} 2022 John Kehayias@* Copyright @copyright{} 2022 Ivan Vilata-i-Balaguer@* Copyright @copyright{} 2023 Giacomo Leidi@* Copyright @copyright{} 2022 Antero Mejr@* +Copyright @copyright{} 2023 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 @@ -38666,6 +38667,24 @@ The list of commands for loading Multiboot module= s. For example: @dots{})) @end lisp +@item @code{config-file} (default: @code{#f}) +A string that can be accepted by @code{grub}'s @code{configfile} +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")) + (config-file "/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 diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index 2c36d8c6cf..7c24fd2ebf 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 @@ (define-module (gnu bootloader) menu-entry-multiboot-arguments menu-entry-multiboot-modules menu-entry-chain-loader + menu-entry-config-file menu-entry->sexp sexp->menu-entry @@ -109,8 +111,10 @@ (define-record-type* (multiboot-modules menu-entry-multiboot-modules (default '())) ; list of multiboot commands, = where ; a command is a list of + (config-file menu-entry-config-file + (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 @@ (define (report-menu-entry-error menu-entry) @code{linux-arguments} and @code{linux-modules}, @item multiboot by specifying fields @code{multiboot-kernel}, @code{multiboot-arguments} and @code{multiboot-modules}, +@item config-file by specifying field @code{config-file}. @item chain-loader by specifying field @code{chain-loader}. @end enumerate")))))) @@ -141,7 +146,7 @@ (define (device->sexp device) (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 @@ (define (device->sexp device) (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 @@ (define (device->sexp device) (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 config-file) #f) + `(menu-entry (version 0) + (label ,label) + (device ,(device->sexp device)) + (device-mount-point ,mount-point) + (config-file ,config-file))) (_ (report-menu-entry-error entry)))) (define (sexp->menu-entry sexp) @@ -204,6 +216,15 @@ (define (sexp->device device-sexp) (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) + ('config-file config-file) _ ...) + (menu-entry + (label label) + (device (sexp->device device)) + (device-mount-point mount-point) + (config-file config-file))) (('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 ecd44e7f3c..7ed0d155d8 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. ;;; @@ -377,6 +378,7 @@ (define (menu-entry->gexp entry) (device (menu-entry-device entry)) (device-mount-point (menu-entry-device-mount-point entry)) (multiboot-kernel (menu-entry-multiboot-kernel entry)) + (config-file (menu-entry-config-file entry)) (chain-loader (menu-entry-chain-loader entry))) (cond (linux @@ -417,6 +419,15 @@ (define (menu-entry->gexp entry) #$root-index (string-join (list #$@arguments) " " 'pr= efix) (string-join (map string-join '#$modules) "\n module " 'prefix)))) + (config-file + #~(format port " +menuentry ~s { + ~a + config-file ~a +}~%" + #$label + #$(grub-root-search device config-file) + #$config-file)) (chain-loader #~(format port " menuentry ~s { diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm index 03a1d01aff..f2d1453b2c 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 @@ (define %file-system-label-menu-entry (linux "/boot/bzImage") (initrd "/boot/initrd.cpio.gz"))) +(define %config-file-menu-entry + (menu-entry + (label "test-config-file") + (device (uuid "6d5b13d4-6092-46d0-8be4-073dc07413cc")) + (config-file "/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 @@ (define %file-system-label-menu-entry %file-system-label-menu-entry (sexp->menu-entry (menu-entry->sexp %file-system-label-menu-entry))) +(test-equal "menu-entry roundtrip, config-file" + %config-file-menu-entry + (sexp->menu-entry (menu-entry->sexp %config-file-menu-entry))) + (test-end "boot-parameters") =2D- 2.39.1 From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 07 01:35:28 2023 Received: (at 59619) by debbugs.gnu.org; 7 Feb 2023 06:35:28 +0000 Received: from localhost ([127.0.0.1]:50841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPHZf-00042s-7o for submit@debbugs.gnu.org; Tue, 07 Feb 2023 01:35:28 -0500 Received: from mout.web.de ([212.227.15.4]:33587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pPHZc-00042f-Ff for 59619@debbugs.gnu.org; Tue, 07 Feb 2023 01:35:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1675751718; bh=XDDlfh+WFcQhqhKgL8Kt3ugZbrt4oxgTr8HWgNzjqSc=; h=X-UI-Sender-Class:Date:From:To:Subject; b=BQ5GoaEQZQYNd26QK1moJ9bhSq36NcwI5qv54WvqWk5g8JNYP3oK5Ikgwu+C99YkT OoCmArYNagoJV5bitMFTL5nMAuvYnylskJ0k2mk2fhir8p12HUu0rAPgqNJAZ/wqWo X+RZxzRIBhiAfQlvxdZC/KBTug/EYuY7qICBLwl4fKTMUDV3rrYzxV/0Gm+NL63pKW RA0vtW2EV8z/ST8aG3LrJN8+YFYJT/MXlE1V0f2K+oMQFrTPqPrglzis+6/3M+a5Uw cNtej5JUUuQILfJUvel6Nx7Z8VE4Wf94Jfy4TU6uAMh4cz6TU7c8RBUUmMu5YVVYNg 3JCqysrdhepAA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from localhost ([188.98.113.37]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1N79RI-1oX8qg0GJY-017YLE for <59619@debbugs.gnu.org>; Tue, 07 Feb 2023 07:35:18 +0100 Date: Tue, 7 Feb 2023 07:35:15 +0100 From: Stefan Karrmann To: 59619@debbugs.gnu.org Subject: [PATCH] grub-configfile Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="yI5vRw4ATpkmgFME" Content-Disposition: inline X-Provags-ID: V03:K1:ofvCQ/zn1Ei+5HiI2EqMB4p8H/fkI4S34YktZML/MKig+biU37G 8myIgCGXg7ow0aNjpBOG0Ot1XXnBJFkeSPqEuWJb95kDS9wlM87HMG5MNXpv1stchM4Q7YL zFF4nZlsadBoewsaPue40VyHipke9iMNAk1GxSsEr/h454Phujf+iTyNcG39VpasUsN7p13 sctzBGQ4r+rvyHIoZJahA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:bX1GspFPB30=;e2Kxpn+4BsMnF+MX7K5W2pPyZUT JLDv8m1P75RgYFdNemOQdteKD4coTojmHWGzpOxq/jDxrWK8TUvTXHbM+k+L1CSGHlk2RZ6+5 JzucKt0Cg5pBXRwxjblN1lxpwD9azk0S968SFfai3jV3mKThCkjMTR9XhzK6U16vxZAZfGqhM oVQl/tZNkbCNtObfnpA3pWr6d1Xt2fHoENGAAUiYaN72hwfYUIr3k3aWA2l5EnGYVtqL/oxXI 0MHRs87oyJBbFE21+aORLaWO2/ty/AarhNRkSFjBD454ygRSoUDDcL3HqqldWWWYjb7+4B6ZG g+HPq8ExfZDUdYUljaTxdQDWfe/8EFTooD/eZjHSxKabkEp6NbhmSxI1c4ZLK6ynSK/OK/kcZ a3M9kiM1rUQHtgTOOsqyAyH0EFY0xJ5oznhXw8BTx07WEcBuqpLYO4Sg3KvGl428AR2kI9XkM sREKjyBYDZA3lSTABoRu+/JFnMR8BHvjGs3hKF0VjtqqTChDwIRYomttwcot8A0xBWYP61/4c S8KDHVzx2SwOlzNcyw5HrYusG8U0yddsQCidusoa/pIJR507cLvqK0RdiuklM2sy3/5QLC1up 3Caz1yoqBbNIe2vt8gGo3unGgex0jrYg1InmISiH7cZjGmPiZIqj37MkIFOy2kzfLkBVt/tL+ 85CPdN7qKYVQo/tu1AWvRz+43em8kaarGNxbeOqBsFuSIZQZD4MQD5SyHHpAETLwZ72r4LIQg Ow42mNPNgMQM/+OMqw8g8NZ2vopQsVIHSVnjA3Ox3mnG7rCKRnea9iNWzov8sLpV1vhCKsR30 bNPRHRDqZ0fnRXRuxMzrZ2GW8c1vMnNr9kI/wVWDGKCZknTWnafl5ECEVYaCUXthdClIvVA08 5yVMvnU/K7IUFNtlCj9L88BfV0OJZEWmU3S6wWJ03aFZU10mQ05SbwiVKhU7Ui/H9OmB/2hSB cLOIlQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 59619 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --yI5vRw4ATpkmgFME Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Dear Julien, now I generated the diff by ~git diff > configfile.diff-patch~ and tested it on commit ~a582d863465990642d331bc05bf073f47fb80908~ by ~git apply configfile.diff-patch~. I hope you can apply it now, even on an updated origin. Kind regards, Stefan --yI5vRw4ATpkmgFME Content-Type: text/plain; charset=iso-8859-1 Content-Description: configfile.diff-patch Content-Disposition: attachment; filename="configfile.diff-patch" Content-Transfer-Encoding: quoted-printable diff --git a/doc/guix.texi b/doc/guix.texi index 359c9b7a47..8fb5e0eaa3 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -113,6 +113,7 @@ Copyright @copyright{} 2022 Bruno Victal@* Copyright @copyright{} 2022 Ivan Vilata-i-Balaguer@* Copyright @copyright{} 2023 Giacomo Leidi@* Copyright @copyright{} 2022 Antero Mejr@* +Copyright @copyright{} 2023 Dr. Stefan Karrmann@* Copyright @copyright{} 2022 Bruno Victal@* Permission is granted to copy, distribute and/or modify this document @@ -6161,7 +6162,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. @@ -6607,7 +6608,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. @@ -12566,7 +12567,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: @@ -23484,7 +23485,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 @@ -38946,6 +38947,24 @@ The list of commands for loading Multiboot module= s. For example: @dots{})) @end lisp +@item @code{config-file} (default: @code{#f}) +A string that can be accepted by @code{grub}'s @code{configfile} +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")) + (config-file "/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 @@ -40833,7 +40852,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} @@ -40882,7 +40901,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 @@ -40900,7 +40919,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) @@ -40932,7 +40951,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} @@ -43463,7 +43482,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 @@ -43492,7 +43511,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 2c36d8c6cf..7c24fd2ebf 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 @@ (define-module (gnu bootloader) menu-entry-multiboot-arguments menu-entry-multiboot-modules menu-entry-chain-loader + menu-entry-config-file menu-entry->sexp sexp->menu-entry @@ -109,8 +111,10 @@ (define-record-type* (multiboot-modules menu-entry-multiboot-modules (default '())) ; list of multiboot commands, = where ; a command is a list of + (config-file menu-entry-config-file + (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 @@ (define (report-menu-entry-error menu-entry) @code{linux-arguments} and @code{linux-modules}, @item multiboot by specifying fields @code{multiboot-kernel}, @code{multiboot-arguments} and @code{multiboot-modules}, +@item config-file by specifying field @code{config-file}. @item chain-loader by specifying field @code{chain-loader}. @end enumerate")))))) @@ -141,7 +146,7 @@ (define (device->sexp device) (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 @@ (define (device->sexp device) (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 @@ (define (device->sexp device) (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 config-file) #f) + `(menu-entry (version 0) + (label ,label) + (device ,(device->sexp device)) + (device-mount-point ,mount-point) + (config-file ,config-file))) (_ (report-menu-entry-error entry)))) (define (sexp->menu-entry sexp) @@ -204,6 +216,15 @@ (define (sexp->device device-sexp) (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) + ('config-file config-file) _ ...) + (menu-entry + (label label) + (device (sexp->device device)) + (device-mount-point mount-point) + (config-file config-file))) (('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 ecd44e7f3c..7ed0d155d8 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. ;;; @@ -377,6 +378,7 @@ (define (menu-entry->gexp entry) (device (menu-entry-device entry)) (device-mount-point (menu-entry-device-mount-point entry)) (multiboot-kernel (menu-entry-multiboot-kernel entry)) + (config-file (menu-entry-config-file entry)) (chain-loader (menu-entry-chain-loader entry))) (cond (linux @@ -417,6 +419,15 @@ (define (menu-entry->gexp entry) #$root-index (string-join (list #$@arguments) " " 'pr= efix) (string-join (map string-join '#$modules) "\n module " 'prefix)))) + (config-file + #~(format port " +menuentry ~s { + ~a + config-file ~a +}~%" + #$label + #$(grub-root-search device config-file) + #$config-file)) (chain-loader #~(format port " menuentry ~s { diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm index 03a1d01aff..f2d1453b2c 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 @@ (define %file-system-label-menu-entry (linux "/boot/bzImage") (initrd "/boot/initrd.cpio.gz"))) +(define %config-file-menu-entry + (menu-entry + (label "test-config-file") + (device (uuid "6d5b13d4-6092-46d0-8be4-073dc07413cc")) + (config-file "/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 @@ (define %file-system-label-menu-entry %file-system-label-menu-entry (sexp->menu-entry (menu-entry->sexp %file-system-label-menu-entry))) +(test-equal "menu-entry roundtrip, config-file" + %config-file-menu-entry + (sexp->menu-entry (menu-entry->sexp %config-file-menu-entry))) + (test-end "boot-parameters") --yI5vRw4ATpkmgFME--