From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id pZ8mH4qGk19jBQAA0tVLHw (envelope-from ) for ; Sat, 24 Oct 2020 01:42:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id IDt2GoqGk19qOgAA1q6Kng (envelope-from ) for ; Sat, 24 Oct 2020 01:42:34 +0000 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 274659401BD for ; Sat, 24 Oct 2020 01:42:33 +0000 (UTC) Received: from localhost ([::1]:57656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kW8Zi-0002wJ-WB for larch@yhetil.org; Fri, 23 Oct 2020 21:42:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40506) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kW8ZG-0002w7-7X for bug-guix@gnu.org; Fri, 23 Oct 2020 21:42:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47227) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kW8ZF-0000Pd-Ua for bug-guix@gnu.org; Fri, 23 Oct 2020 21:42:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kW8ZF-0006WC-Ss for bug-guix@gnu.org; Fri, 23 Oct 2020 21:42:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#44101: Unable to use /dev/disk/by-id/ symlinks with u-boot and guix system reconfigure Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 24 Oct 2020 01:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44101 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mathieu Othacehe Received: via spool by 44101-submit@debbugs.gnu.org id=B44101.160350370325030 (code B ref 44101); Sat, 24 Oct 2020 01:42:01 +0000 Received: (at 44101) by debbugs.gnu.org; 24 Oct 2020 01:41:43 +0000 Received: from localhost ([127.0.0.1]:58773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW8Yx-0006Ve-CS for submit@debbugs.gnu.org; Fri, 23 Oct 2020 21:41:43 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:37978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kW8Ys-0006VN-T9 for 44101@debbugs.gnu.org; Fri, 23 Oct 2020 21:41:42 -0400 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id BCAE61AA41; Fri, 23 Oct 2020 18:41:32 -0700 (PDT) From: Vagrant Cascadian In-Reply-To: <87y2jxib6n.fsf@gnu.org> References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> <875z71jr61.fsf@gnu.org> <87y2jxib6n.fsf@gnu.org> Date: Fri, 23 Oct 2020 18:40:58 -0700 Message-ID: <875z70mmdx.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 44101@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.11 X-TUID: AfxUcxm0YpUH --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2020-10-23, Mathieu Othacehe wrote: >>> ice-9/boot-9.scm:1669:16: In procedure raise-exception: >>> ERROR: >>> 1. &i/o-filename: "/dev/disk/by-id/mmc-SDU64_0xbaf3002e" >> >> Thanks for testing. This is probably a regression in >> "write-file-on-device" that fails to open this kind of files. I'll try >> to reproduce it locally. > > This is because the O_EXCL flag was passed, which causes open to fail if > the block device is mounted. > > The revised patch attached should fix it. Yes, this patch fixes the issue for me. Thanks! live well, vagrant > From 780327ebb0db74ca4cc43d26ba7cf945d64c7d30 Mon Sep 17 00:00:00 2001 > From: Mathieu Othacehe > Date: Wed, 21 Oct 2020 10:42:50 +0200 > Subject: [PATCH] system: reconfigure: Use the disk-installer if provided. > > --- > gnu/build/bootloader.scm | 4 ++-- > gnu/tests/reconfigure.scm | 4 +++- > guix/scripts/system/reconfigure.scm | 12 +++++++++--- > 3 files changed, 14 insertions(+), 6 deletions(-) > > diff --git a/gnu/build/bootloader.scm b/gnu/build/bootloader.scm > index 5ec839f902..06a2c3ab76 100644 > --- a/gnu/build/bootloader.scm > +++ b/gnu/build/bootloader.scm > @@ -39,9 +39,9 @@ > (let ((bv (get-bytevector-n input size))) > (call-with-port > (open-file-output-port device > - (file-options no-truncate no-create) > + (file-options no-truncate no-fail) > (buffer-mode block) > - (native-transcoder)) > + (make-transcoder (latin-1-codec))) > (lambda (output) > (seek output offset SEEK_SET) > (put-bytevector output bv))))))) > diff --git a/gnu/tests/reconfigure.scm b/gnu/tests/reconfigure.scm > index 928a210a94..52beeef447 100644 > --- a/gnu/tests/reconfigure.scm > +++ b/gnu/tests/reconfigure.scm > @@ -260,7 +260,9 @@ bootloader's configuration file." > ;; test suite, the bootloader installer script is omitted. 'grub-in= stall' > ;; would attempt to write directly to the virtual disk if the > ;; installation script were run. > - (test (install-bootloader-program #f #f bootcfg bootcfg-file #f "/"= ))))) > + (test > + (install-bootloader-program #f #f #f bootcfg bootcfg-file #f "/"))= ))) > + >=20=20 > (define %test-switch-to-system > (system-test > diff --git a/guix/scripts/system/reconfigure.scm b/guix/scripts/system/re= configure.scm > index d89caf80fc..b1982b20d2 100644 > --- a/guix/scripts/system/reconfigure.scm > +++ b/guix/scripts/system/reconfigure.scm > @@ -204,7 +204,8 @@ services as defined by OS." > ;;; Bootloader configuration. > ;;; >=20=20 > -(define (install-bootloader-program installer bootloader-package bootcfg > +(define (install-bootloader-program installer disk-installer > + bootloader-package bootcfg > bootcfg-file device target) > "Return an executable store item that, upon being evaluated, will inst= all > BOOTCFG to BOOTCFG-FILE, a target file name, on DEVICE, a file system de= vice, > @@ -246,10 +247,12 @@ BOOTLOADER-PACKAGE." > ;; a broken installation. > (switch-symlinks new-gc-root #$bootcfg) > (install-boot-config #$bootcfg #$bootcfg-file #$target) > - (when #$installer > + (when (or #$installer #$disk-installer) > (catch #t > (lambda () > - (#$installer #$bootloader-package #$device #$target)) > + (if #$installer > + (#$installer #$bootloader-package #$device #$targ= et) > + (#$disk-installer #$bootloader-package 0 #$device= ))) > (lambda args > (delete-file new-gc-root) > (match args > @@ -272,11 +275,14 @@ additional configurations specified by MENU-ENTRIES= can be selected." > (let* ((bootloader (bootloader-configuration-bootloader configuration)) > (installer (and run-installer? > (bootloader-installer bootloader))) > + (disk-installer (and run-installer? > + (bootloader-disk-image-installer bootloade= r))) > (package (bootloader-package bootloader)) > (device (bootloader-configuration-target configuration)) > (bootcfg-file (bootloader-configuration-file bootloader))) > (eval #~(parameterize ((current-warning-port (%make-void-port "w"))) > (primitive-load #$(install-bootloader-program installer > + disk-install= er > package > bootcfg > bootcfg-file > --=20 > 2.28.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHQEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCX5OGLAAKCRDcUY/If5cW qi+TAPUV4Hhkw1C7YurjPEb1ah6pagSugmaY+3UpynfPtVDFAQC5BqcIcH/FZEQr UwL3qXK8OFNBQ4WRGKE2OiKRR4ZqAA== =0w9F -----END PGP SIGNATURE----- --=-=-=--