GNU logs - #67109, boring messages


Message sent to othacehe@HIDDEN, GNUtoo@HIDDEN, bug-guix@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#67109: =?UTF-8?Q?=E2=80=98efi32-esp=E2=80=99?= image support pulls in host-side code
Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: othacehe@HIDDEN, GNUtoo@HIDDEN, bug-guix@HIDDEN
Resent-Date: Sat, 11 Nov 2023 15:47:02 +0000
Resent-Message-ID: <handler.67109.B.169971757118389 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 67109
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: 67109 <at> debbugs.gnu.org
Cc: Mathieu Othacehe <othacehe@HIDDEN>, Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
X-Debbugs-Original-To: bug-guix@HIDDEN
X-Debbugs-Original-Xcc: Mathieu Othacehe <othacehe@HIDDEN>, Denis 'GNUtoo' Carikli <GNUtoo@HIDDEN>
Received: via spool by submit <at> debbugs.gnu.org id=B.169971757118389
          (code B ref -1); Sat, 11 Nov 2023 15:47:02 +0000
Received: (at submit) by debbugs.gnu.org; 11 Nov 2023 15:46:11 +0000
Received: from localhost ([127.0.0.1]:54005 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1r1qBX-0004mW-0L
	for submit <at> debbugs.gnu.org; Sat, 11 Nov 2023 10:46:11 -0500
Received: from lists.gnu.org ([2001:470:142::17]:37644)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludovic.courtes@HIDDEN>) id 1r1qBU-0004kk-Pu
 for submit <at> debbugs.gnu.org; Sat, 11 Nov 2023 10:46:09 -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 <ludovic.courtes@HIDDEN>)
 id 1r1qAi-0004RG-GN
 for bug-guix@HIDDEN; Sat, 11 Nov 2023 10:45:21 -0500
Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludovic.courtes@HIDDEN>)
 id 1r1qAg-0007aJ-Cf
 for bug-guix@HIDDEN; Sat, 11 Nov 2023 10:45:20 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc;
 h=from:to:subject:date:message-id:mime-version;
 bh=ql+ncHpbI/ABquV28S2OoVXo5WYbfv53BhqHph+sNvM=;
 b=AX+IhguMwzA5l8Omn3lpF9qSnmI0mlnf5QIFeqIHk5r60QfkIpWGVA8h
 dlHunL656Yw8unL4OKDtuN7tLKSYtc7uVz2jz/jHwvi9s/ebZh8C+Wt9L
 BOPh6ztqCKi7DOw3VVb5hXffbo4TcPnrzKB8SQ4bCacu36h5eRQRiipck 0=;
Authentication-Results: mail2-relais-roc.national.inria.fr;
 dkim=none (message not signed) header.i=none;
 spf=SoftFail smtp.mailfrom=ludovic.courtes@HIDDEN;
 dmarc=fail (p=none dis=none) d=inria.fr
X-IronPort-AV: E=Sophos;i="6.03,295,1694728800"; d="scan'208";a="135854899"
Received: from vpn-0-27.aquilenet.fr (HELO ribbon) ([185.233.101.27])
 by mail2-relais-roc.national.inria.fr with
 ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2023 16:45:12 +0100
From: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Primidi 21 Brumaire an 232 de la =?UTF-8?Q?R=C3=A9volution,?= jour de la Bacchante
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Sat, 11 Nov 2023 16:45:09 +0100
Message-ID: <874jhs1egq.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=192.134.164.83;
 envelope-from=ludovic.courtes@HIDDEN;
 helo=mail2-relais-roc.national.inria.fr
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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,
 RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hello,

I noticed that 62c86c8391ceb8953ca972498fd75ea9298b85ff pulls in
host-side code on the =E2=80=9Cbuild side=E2=80=9D, via (guix utils), meani=
ng that the
closure of the (gnu build image) module would now include 80 modules.

This change also introduces uses of =E2=80=98target-x86?=E2=80=99 and =E2=
=80=98target-arm?=E2=80=99 on
the build side that are unlikely to have the intended effect because the
check is then done based on the native system type when running the
build process.  Last, the =E2=80=98cond=E2=80=99 form in that commit lacks =
an =E2=80=98else=E2=80=99
clause.

Thus I=E2=80=99m proposing the fix below.  How can I test it though?  I get:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix system image -t efi32-raw gnu/system/examples/bare-bo=
nes.tmpl
guix system: error: EFI bootloader required with GPT partitioning
--8<---------------cut here---------------end--------------->8---

Thanks in advance!

Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

diff --git a/gnu/build/image.scm b/gnu/build/image.scm
index 49dc01c0d1..63262a4ffe 100644
--- a/gnu/build/image.scm
+++ b/gnu/build/image.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright =C2=A9 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovi=
c Court=C3=A8s <ludo@HIDDEN>
+;;; Copyright =C2=A9 2013-2020, 2023 Ludovic Court=C3=A8s <ludo@HIDDEN>
 ;;; Copyright =C2=A9 2016 Christine Lemmer-Webber <cwebber@HIDDEN>
 ;;; Copyright =C2=A9 2016, 2017 Leo Famulari <leo@HIDDEN>
 ;;; Copyright =C2=A9 2017 Marius Bakke <mbakke@HIDDEN>
@@ -29,7 +29,6 @@ (define-module (gnu build image)
   #:use-module (guix build syscalls)
   #:use-module (guix build utils)
   #:use-module (guix store database)
-  #:use-module (guix utils)
   #:use-module (gnu build bootloader)
   #:use-module (gnu build install)
   #:use-module (gnu build linux-boot)
@@ -191,13 +190,11 @@ (define* (initialize-efi-partition root
 (define* (initialize-efi32-partition root
                                      #:key
                                      grub-efi32
+                                     grub-targets
                                      #:allow-other-keys)
   "Install in ROOT directory, an EFI 32bit loader using GRUB-EFI32."
   (install-efi-loader grub-efi32 root
-                      #:targets (cond ((target-x86?)
-                                       '("i386-efi" . "BOOTIA32.EFI"))
-                                      ((target-arm?)
-                                       '("arm-efi" . "BOOTARM.EFI")))))
+                      #:targets grub-targets))
=20
 (define* (initialize-root-partition root
                                     #:key
diff --git a/gnu/system/image.scm b/gnu/system/image.scm
index a990c4f861..49d4287a74 100644
--- a/gnu/system/image.scm
+++ b/gnu/system/image.scm
@@ -136,7 +136,17 @@ (define esp-partition
 (define esp32-partition
   (partition
    (inherit esp-partition)
-   (initializer (gexp initialize-efi32-partition))))
+   (initializer
+    (let-system (system target)
+      (let ((targets (cond ((target-x86? (or target system))
+                            #~'("i386-efi" . "BOOTIA32.EFI"))
+                           ((target-arm? (or target system))
+                            #~'("arm-efi" . "BOOTARM.EFI"))
+                           (else #f))))
+        #~(lambda (root . args)
+            (apply initialize-efi32-partition root
+                   #:grub-targets #$targets
+                   args)))))))
=20
 (define root-partition
   (partition

--=-=-=--




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.505 (Entity 5.505)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@HIDDEN>
Subject: bug#67109: Acknowledgement (=?UTF-8?Q?=E2=80=98efi32-esp=E2=80=99?=
 image support pulls in host-side code)
Message-ID: <handler.67109.B.169971757118389.ack <at> debbugs.gnu.org>
References: <874jhs1egq.fsf@HIDDEN>
X-Gnu-PR-Message: ack 67109
X-Gnu-PR-Package: guix
Reply-To: 67109 <at> debbugs.gnu.org
Date: Sat, 11 Nov 2023 15:47:02 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

As you requested using X-Debbugs-CC, your message was also forwarded to
  Mathieu Othacehe <othacehe@HIDDEN>, Denis 'GNUtoo' Carikli <GNUtoo@cyber=
dimension.org>
(after having been given a bug report number, if it did not have one).

Your message has been sent to the package maintainer(s):
 bug-guix@HIDDEN

If you wish to submit further information on this problem, please
send it to 67109 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
67109: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D67109
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems



Last modified: Sat, 11 Nov 2023 16:00:02 UTC

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