Received: (at submit) by debbugs.gnu.org; 11 Nov 2023 15:46:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Nov 11 10:46:11 2023
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: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludovic.courtes@HIDDEN>
To: bug-guix@HIDDEN
Subject: =?utf-8?B?4oCYZWZpMzItZXNw4oCZ?= image support pulls in host-side code
User-Agent: Gnus/5.13 (Gnus v5.13)
X-Debbugs-Cc: Mathieu Othacehe <othacehe@HIDDEN>, Denis 'GNUtoo' Carikli
<GNUtoo@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: Primidi 21 Brumaire an 232 de la =?utf-8?Q?R=C3=A9vo?=
=?utf-8?Q?lution=2C?= 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-Debbugs-Envelope-To: submit
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
--=-=-=--
Ludovic Courtès <ludovic.courtes@HIDDEN>:othacehe@HIDDEN, GNUtoo@HIDDEN, bug-guix@HIDDEN.
Full text available.othacehe@HIDDEN, GNUtoo@HIDDEN, bug-guix@HIDDEN:bug#67109; Package guix.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.