From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id yOgJMS4sEGNDdwAAbAwnHQ (envelope-from ) for ; Thu, 01 Sep 2022 05:51:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gIr3Ly4sEGN2DAAAG6o9tA (envelope-from ) for ; Thu, 01 Sep 2022 05:51:10 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4623D1738A for ; Thu, 1 Sep 2022 05:51:10 +0200 (CEST) Received: from localhost ([::1]:54068 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oTbET-0001i0-DY for larch@yhetil.org; Wed, 31 Aug 2022 23:51:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56762) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oTbEM-0001hb-K2 for guix-patches@gnu.org; Wed, 31 Aug 2022 23:51:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oTbEM-0002xf-Bx for guix-patches@gnu.org; Wed, 31 Aug 2022 23:51:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oTbEL-0006Kk-SG for guix-patches@gnu.org; Wed, 31 Aug 2022 23:51:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57496] [PATCH 1/2] gnu: bootloader: Extend `' for chain-loader. Resent-From: tiantian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 01 Sep 2022 03:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57496 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 57496@debbugs.gnu.org Received: via spool by 57496-submit@debbugs.gnu.org id=B57496.166200423924316 (code B ref 57496); Thu, 01 Sep 2022 03:51:01 +0000 Received: (at 57496) by debbugs.gnu.org; 1 Sep 2022 03:50:39 +0000 Received: from localhost ([127.0.0.1]:40830 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTbDz-0006K7-8F for submit@debbugs.gnu.org; Wed, 31 Aug 2022 23:50:39 -0400 Received: from out162-62-57-252.mail.qq.com ([162.62.57.252]:41701) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oTbDu-0006Je-LC for 57496@debbugs.gnu.org; Wed, 31 Aug 2022 23:50:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1662004225; bh=sqt04XIdmMx5m4kvae7xf9WbWCZ21NbUW96Tos4Rwc8=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=P8ZSf7uZGsxyjGJTRLFoojGv5a2g0vGZ9wiVHP5mmPj8MHpZKMC1ZeUa91eErUsZS owx43HyLX7IU3gMf8s5IdaDoasCZsUe3D7nd+f9OhUZs931D8/A75MaqRBaDknYAAC awI7tdNcGJKzne9HvTPn5zGRPLBmIIvOES/Q46ww= Received: from guix-pc ([240e:398:28aa:8901:2e5d:53be:47ef:3da]) by newxmesmtplogicsvrszc14.qq.com (NewEsmtp) with SMTP id C97318C3; Thu, 01 Sep 2022 11:50:23 +0800 X-QQ-mid: xmsmtpt1662004223to7goyjla Message-ID: X-QQ-XMAILINFO: NvwY87Cbq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ent: mu4e 1.8.9; emacs 28.1 From: tiantian Date: Thu, 01 Sep 2022 10:33:51 +0800 In-reply-to: <20220831213406.3ec92474@sybil.lepiller.eu> Message-ID: <7xy1v37ny8.fsf@foxmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662004270; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=sqt04XIdmMx5m4kvae7xf9WbWCZ21NbUW96Tos4Rwc8=; b=ZOD/+uGwNKJs67Ypt53tIw3Df6PLrybHZ12hE4jy0DeeUgPZh7Qb07orm4sKj0B/uIg71J 20TBffwYf55TuLIJ+oXBzqbwPUQ+gFIgA+Uos8bIBLXwpB3RL/hpH0c70BXvaa5OzU0pHF kOn5yJZqu548oX1dG7Q48AIaSDbJNAFI7cVyFADBX4Xyft1gn9N2qT4NAAGDBk9oN89xBD qyfuYXJ4mTVyN7WnZrOvectMjxF9gsgCOe3L41+wmD9NODl9TkqRjCOas7fBaZ5FSkBhVd yZFLF6kh9JzNdKaY+4rX61zFgSx9okneAnzDMl8oAvTMxE/vRtwDjhFkIBPDtg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662004270; a=rsa-sha256; cv=none; b=MAlGHqS8PbdhEIZUMo3WiZ4v47V311OcgWrF6PiZQ+aDTpdQ4s9FP90l4WnnXOlExR4u9i 9mt4J5qF89GvWBavxdnP8GmuLE2O9C943P0beNlam0N+cSfHfQwY5Vh4uEpZDdWx4+lJfl DFPp4Q4xOm7UOXv+uSEaSH4sJoAgs9MyTCHRV1J+Z11TelYLtZ/EN7e4kkQ8UGyb8i3rAp jco9iZYHse1R8ysdYpsfCCA4Ebgvgh3W2myNPpnDprHzxOLQIMpuBN1RvbkB1px/AQQhlb s6LVyrSSrxnKVmxKgNKcKcB0R0Dn2fV5MtDkOwTCTUnfGNdzQ0lc7zMQqjEEvg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=foxmail.com header.s=s201512 header.b=P8ZSf7uZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=foxmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 12.62 X-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=foxmail.com header.s=s201512 header.b=P8ZSf7uZ; dmarc=fail reason="SPF not aligned (relaxed)" header.from=foxmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 4623D1738A X-Spam-Score: 12.62 X-Migadu-Spam: Yes X-Migadu-Scanner: scn0.migadu.com X-TUID: 4jsXDa2MKb5x Hi, Julien Lepiller writes: > Le Thu, 1 Sep 2022 01:55:34 +0800, > tiantian a =C3=A9crit : > >> Dear Mr/Ms Lepiller, >>=20 >> I'm sorry. I didn't notice the wrong sender name. > > You don't have to apologize. I received your email and I didn't even > notice the sender name :) > Thank you for your generosity. > > Let's try something like this: > > @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 > @code{linux-multiboot} fields are specified. The following is an > example of chainloading a different GNU/Linux system. > Thank you for your help. I will change it in next patch. But I have a little doubt. 'linux-multiboot' has never appeared in the documentation. Will it be difficult to understand the document? I don't know much about multiboot. I haven't seen the "linux-" prefix in multiboot before. Does multiboot only support linux? > > OK, I see now. I don't really understand why they were separate, but > let's keep them separate for now. > OK, I will keep them separate. > > I prefer this variant where the pattern is explicit. > > As with what we have today, if the user specifies more than one of > linux, linux-multiboot and chainloader, they get an unhelpful "no > matching pattern" error. > > This could be done later if you don't have time, but I would suggest to > fix it by adding a default case that matches all incorrect cases, like > so: > > (_ (raise (condition (&message (message (G_ "Your error message > here")))))) > > Have a look at other "&message" conditions for inspiration. > > Also I noticed that if all of linux, linux-multiboot and chainloader > are #f, then the first pattern matches and will lead to a different > error message. I haven't tested so I'm not sure what we get, but it > might be interresting to match on all of them being #f, and print a > different message. Again, this can be done later. > Thank you for your suggestions. I will use in the pattern to specify all fields of in next patch. I didn't know how to throw an error message before. I may need to spend time reading code and learning. If possible, I will implement it in v3 patch. >> It can also use device to specify the disk partition. The following is >> the menu-entry that I am using. >>=20 >> --- >8 ---=20=20 >>=20 >> (menu-entries >> (list >> (menu-entry >> (label "ArchLinux") >> (device (uuid "1C31-A17C" 'fat)) >> (chain-loader "/EFI/ArchLinux/grubx64.efi")))) >>=20 >> --- <8 --- >>=20 >> The examples in the document were written before the bug#57307 was >> fixed. At that time, only this example passed the test on my >> computer. I didn't take into account that the example was bad. I'm >> sorry. > > This new example is perfect. Could you add it to your next patch? > No problem. In order to avoid the possible controversy over the Linux distribution, I will change ArchLinux to GNU/Linux. > > Could you send a v2 with the changes we discussed so far? > > Thanks, > Julien > No problem. I will finish v2 patch as soon as possible. The mail server seems to have rejected my last mail, which is not displayed in the mail list. I hope this email can be displayed normally. Thanks, tiantian