From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uGGWMSRboF9LNgAA0tVLHw (envelope-from ) for ; Mon, 02 Nov 2020 19:16:52 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id cOdwLSRboF/0EgAAbx9fmQ (envelope-from ) for ; Mon, 02 Nov 2020 19:16:52 +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 2F9CD9404D3 for ; Mon, 2 Nov 2020 19:16:52 +0000 (UTC) Received: from localhost ([::1]:55070 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZfJx-0008CT-Lp for larch@yhetil.org; Mon, 02 Nov 2020 14:16:49 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53322) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZfJG-0008C2-0e for bug-guix@gnu.org; Mon, 02 Nov 2020 14:16:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:59351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZfJC-0005Yd-Aj for bug-guix@gnu.org; Mon, 02 Nov 2020 14:16:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZfJC-0006qf-4g for bug-guix@gnu.org; Mon, 02 Nov 2020 14:16:02 -0500 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: Mon, 02 Nov 2020 19:16:02 +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.160434451026263 (code B ref 44101); Mon, 02 Nov 2020 19:16:02 +0000 Received: (at 44101) by debbugs.gnu.org; 2 Nov 2020 19:15:10 +0000 Received: from localhost ([127.0.0.1]:42664 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZfIM-0006pX-5S for submit@debbugs.gnu.org; Mon, 02 Nov 2020 14:15:10 -0500 Received: from cascadia.aikidev.net ([173.255.214.101]:49844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZfIK-0006pC-HU for 44101@debbugs.gnu.org; Mon, 02 Nov 2020 14:15:08 -0500 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100b]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 6F3971AA41; Mon, 2 Nov 2020 11:15:02 -0800 (PST) From: Vagrant Cascadian In-Reply-To: <875z70mmdx.fsf@ponder> References: <87a6wgrfnp.fsf@ponder> <87zh4ezo7k.fsf@gnu.org> <87k0vi9g6q.fsf@ponder> <875z71jr61.fsf@gnu.org> <87y2jxib6n.fsf@gnu.org> <875z70mmdx.fsf@ponder> Date: Mon, 02 Nov 2020 11:14:58 -0800 Message-ID: <87pn4vo9jh.fsf@yucca> 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: ns3122888.ip-94-23-21.eu 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: 92CtO3Zjh0HE --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2020-10-23, Vagrant Cascadian wrote: > 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! Any reason not to apply this patch yet? Hope it can land in the next guix release, at least. 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-i= nstall' >> ;; 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/r= econfigure.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 ins= tall >> BOOTCFG to BOOTCFG-FILE, a target file name, on DEVICE, a file system d= evice, >> @@ -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 #$tar= get) >> + (#$disk-installer #$bootloader-package 0 #$devic= e))) >> (lambda args >> (delete-file new-gc-root) >> (match args >> @@ -272,11 +275,14 @@ additional configurations specified by MENU-ENTRIE= S 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 bootload= er))) >> (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-instal= ler >> package >> bootcfg >> bootcfg-file >> --=20 >> 2.28.0 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCX6BasgAKCRDcUY/If5cW qukMAQCnItRLdg7hEFRcsaVtvje/h1wWZeNC02jYfu5/K8qY2wEAoX0pLCkMaxai 6up9hl9Yt4U+unyUdfWgjmIqTayzVA0= =PXI3 -----END PGP SIGNATURE----- --=-=-=--