From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2HviCkt4/2ay4wAAqHPOHw:P1 (envelope-from ) for ; Fri, 04 Oct 2024 05:08:27 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id 2HviCkt4/2ay4wAAqHPOHw (envelope-from ) for ; Fri, 04 Oct 2024 07:08:27 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=GPiyi+Cy; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail2 header.b=ie+eT7ZZ; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail2 header.b="jiuCeF/1"; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728018507; a=rsa-sha256; cv=none; b=KxomYPmxDU2BsyE5rFCUHsAIaZy/adJjbdo5suMcSuZgG+1Qr/AU2ke9Ic2SDUG+Ry+8St 4uZjY0ijSuNiab2BC66xBDX3De0cM31J263qqeD2Wk7gYHOUJx8Pur4ZR/7Grhh42Sw3pQ wHY1T7Gb48K1jfL2o3xvRVCInIaO7X3r0GKx/zehYBvwbBq+dOOwRiabuIjfzMil+2wVtX 9PRVkqGp1BGRBGJVw6SyFR/0kK15CeZqO9XNoFNivk5bz8ErbbJRe3BRwNWU5B26zIRhoN D4FxGn38xdOOUQAutMRAazLZRE7hOHKbk2mJYMJurfe+SqFEd9WYSDKEZnLKig== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=GPiyi+Cy; dkim=fail ("headers rsa verify failed") header.d=lunabee.space header.s=purelymail2 header.b=ie+eT7ZZ; dkim=fail ("headers rsa verify failed") header.d=purelymail.com header.s=purelymail2 header.b="jiuCeF/1"; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728018507; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: 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=xMC9hbmPJ+rFWRfUUjNd1c9n1aujQBlyu1713pExJ0E=; b=OEI6ToFdhZpUrY2MB0UPZ8QJ/AXE/ZESQPZqFQP0gnX9oq8mfaItpsFkbdaPVCVTP/HHdH oyD8va44oaFaaO4j3VhNJq/k/pCcgUkV7t4f3V1hKUf+REf0dhQkoCQehekSoSRpG60azF /gbuwNHdhkmCrFfQTk3QmYL8n1W4UdIRSvwwzr6koClDxYbUUN3M6l/PxbvK4xD3WfTOiT j3bn/iz7vN83NndscqDNLYSULqtjgIzQV6BQ4jqLbAytc2Fi/aAr2FAQnmXsyDFuLBS1FW v87XiTf17HRQzhfWVFCjnCDonxjd4VlDDtBodGXQr22bRgsZqer2wqfcV2F3Kw== 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 793F2665E0 for ; Fri, 04 Oct 2024 07:08:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1swaY0-0006yT-Gd; Fri, 04 Oct 2024 01:08:13 -0400 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 ) id 1swaXq-0006xm-25 for guix-patches@gnu.org; Fri, 04 Oct 2024 01:08:03 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1swaXo-0002oq-5U for guix-patches@gnu.org; Fri, 04 Oct 2024 01:08:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=xMC9hbmPJ+rFWRfUUjNd1c9n1aujQBlyu1713pExJ0E=; b=GPiyi+CyXJI4azO7i1f05Eu5gEv4xDl6ycUWr+ymBhkcEjRvalkIH9AFgq99Qo2VzPL0tAZrzBMH70QRdxnVc+E3/HV8jiz4hVpyQdihkxoE0oMyv03xQLm6Vgy/Wcha8m6pBeBD2VDILeJAwCwg8dilaW9YzmHbpJwYXoMkujzGpCHt5CQumtzIum+AxX1R5NLw30y7WruDX20D4Hw7iFACeAZTw1yDPkumOOdIyr/sDaqZV4jUrkpbl5jV3/OZ4O5kzI3lS5nt/UJOvfF5FqbF0ManvBAGV/M0cq0kdU3qUOMhVQFDcCihbTVGviHt+e0wvaoI6s+1pkks/36L+A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1swaXq-0004LA-B8 for guix-patches@gnu.org; Fri, 04 Oct 2024 01:08:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73202] [PATCH] Preparation for bootloader rewrite. Resent-From: Lilah Tascheter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 04 Oct 2024 05:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73202 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73202@debbugs.gnu.org Cc: Herman Rimm Received: via spool by 73202-submit@debbugs.gnu.org id=B73202.172801845016641 (code B ref 73202); Fri, 04 Oct 2024 05:08:02 +0000 Received: (at 73202) by debbugs.gnu.org; 4 Oct 2024 05:07:30 +0000 Received: from localhost ([127.0.0.1]:34238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swaXJ-0004KK-GN for submit@debbugs.gnu.org; Fri, 04 Oct 2024 01:07:29 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:35780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1swaXH-0004K7-Fx for 73202@debbugs.gnu.org; Fri, 04 Oct 2024 01:07:28 -0400 DKIM-Signature: a=rsa-sha256; b=ie+eT7ZZYw2A9zzLl7eilYAHg0Y4XzJpTqZxE8a29VY4zLh3z8uTovaSSNqY83kKLxcvaVVKuGbb132WGlrepO/r+ks8nmdWbqiZ+FvNDEiQHUyavD0aEYPxyX/9eLCS1XAubRxRSc9yUv8l3ObBPOg/+ZsNsJ0dzVwClgZbarbQIrXJbpHkF4+P5ujlHhF7wdAtuJTMfutyYVsp7pB/CyYv+whqcKj0XojrDzz/2FhFC5rMUmzDfVYAGFgmfIYaD1AfH/wsQpVLPyX7eSKs5zHN2AMwVNVpiBUKEDqeyNw6xxpb9a9vsZpltBD7pw5BNHIL1NUI8OG9DQybbScX5A==; s=purelymail2; d=lunabee.space; v=1; bh=xMC9hbmPJ+rFWRfUUjNd1c9n1aujQBlyu1713pExJ0E=; h=Received:Subject:From:To:Date; DKIM-Signature: a=rsa-sha256; b=jiuCeF/1QfAJ3yaA5i1/pNA1BnmsdxJrBLr7KSp8prKjfCD9tCwjOIzzz/E2yS8BSGxdUVBd+Mx1Zl/jIwqLrMLlvBox79Jp5idnauXylE5i1GbZwTTIOpUwyphnMk0vd+LPv0RxqVQai38HqyVT/k4kt4iL/4VxbsB+NQ+GaB+H2sYrGevhXceKjhHnS6vBc1aJ7BSU5dzJHT9exoNrtyifgXo/DLAGzmC4NkAYS0Yz07NhKIQrcDJVafBqRjE9W6C9hbQNk5ieEZdl9FMEXtD33TpnPn3VAcy3b7E6+7YOIRdZSjd2M7qwp1TvK6zKgcyU7Fw9vGGuNIleS7BU8g==; s=purelymail2; d=purelymail.com; v=1; bh=xMC9hbmPJ+rFWRfUUjNd1c9n1aujQBlyu1713pExJ0E=; h=Feedback-ID:Received:Subject:From:To:Date; Feedback-ID: 8937:2070:null:purelymail X-Pm-Original-To: 73202@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 404818011; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Fri, 04 Oct 2024 05:07:17 +0000 (UTC) Message-ID: Date: Fri, 04 Oct 2024 00:07:16 -0500 In-Reply-To: <4fnudiucjxequd3m4ayy7drqsgjokybfvsu6l2tbssurhlr5wd@odqr53qw5qqz> References: <4fnudiucjxequd3m4ayy7drqsgjokybfvsu6l2tbssurhlr5wd@odqr53qw5qqz> Organization: Dissociation for Heresiographal Computation Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 MIME-Version: 1.0 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: , From: Lilah Tascheter via Guix-patches Reply-To: Lilah Tascheter Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.43 X-Spam-Score: 0.43 X-Migadu-Queue-Id: 793F2665E0 X-Migadu-Scanner: mx12.migadu.com X-TUID: FEiq4eyk8zYP hey herman! > ;; In (gnu bootloader grub): > (define (grub-efi-default-targets esp) > =C2=A0 (tree->target ; like arborify > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 (bootloader-target > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (type 'esp) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (path esp) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (targets ; counterpart of offset > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (list (bootloader-target > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (type 'vendir) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (path "EFI/Guix")= ) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (bootloader-target > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (type 'install) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (path "grub")))))= )) how would this handle root offsets, eg by guix system init? is everything assumed to be offset from root? I'm also worried about indentation growing too quickly. otherwise, though, it's definately an improvement over offset! > ;; This is the same as (grub-efi-default-targets "boot").=C2=A0 It could > be > ;; exported standalone, instead of using bootloader default-targets. > (define %grub-efi-default-targets > =C2=A0 '((esp=C2=A0=C2=A0=C2=A0=C2=A0 . "/boot") > =C2=A0=C2=A0=C2=A0 (install . "/boot/EFI/Guix") > =C2=A0=C2=A0=C2=A0 (vendir=C2=A0 . "/boot/grub"))) >=20 > ;; A simple consequence of this change is that this: > (with-targets %grub-efi-default-targets > =C2=A0 (('install =3D> (path :path)) > =C2=A0=C2=A0 ...)) > ;; becomes: > (let ((install-path (assoc-ref %grub-efi-default-targets 'install))) > =C2=A0 ...) >=20 > ;; But e.g. device is provided separately (or derived from path): > (with-targets %grub-efi-default-targets > =C2=A0 (('esp =3D> (device :device)) > =C2=A0=C2=A0 ...)) > ;; becomes: > (let* ((path (assoc-ref %grub-efi-default-targets 'esp)) > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ;; A single root-device is provided = in addition to targets. > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (device (root-device->block-device r= oot-device path))) > =C2=A0 ...) >=20 > ;; This procedure is in (gnu bootloader).=C2=A0 Something like: > (define (root-device->block-device device path) > =C2=A0 (match device > =C2=A0=C2=A0=C2=A0 ((? block-device?) device) ; string with /dev/ prefix > =C2=A0=C2=A0=C2=A0 ((? uuid?) (find-partition-for-uuid device)) > =C2=A0=C2=A0=C2=A0 ((? string?) (find-partition-for-label device)) > =C2=A0=C2=A0=C2=A0 ;; This might be necessary, but should not be relied o= n. > =C2=A0=C2=A0=C2=A0 (_ (mount-source (find-mount path))))) how are you replacing device-local paths? some bootloaders need that information to access files before fully loading. also, if the path, device, label, and uuid fields are combined, the guix system image won't be able to get all the info it needs to the bootloader installers. uuid or label needs to be there to identify the device on- boot, but also path, device, and devpath are required to actually install bootloader files. also, one reason with-targets exists is as a safeguard for future people writing bootloaders. guix system image tends to be overlooked, so it performs checks to make sure the bootloader targets requested are available during image generation. > ;; Example user configuration: > (define %grub-efi-bootloader > =C2=A0 (bootloader-configuration > =C2=A0=C2=A0=C2=A0 (bootloader grub-efi-bootloader) > =C2=A0=C2=A0=C2=A0 ;; This is for bootloader configuration (not installat= ion), e.g. > =C2=A0=C2=A0=C2=A0 ;; GRUB search or install-efi disk argument. > =C2=A0=C2=A0=C2=A0 (root-device "UUID, label, or block device.") > =C2=A0=C2=A0=C2=A0 ;; This is complementary to root-device.=C2=A0 It will= configure some > =C2=A0=C2=A0=C2=A0 ;; files to be fetched remotely instead of installed. > =C2=A0=C2=A0=C2=A0 (tftp "Varies for UEFI/GRUB/U-Boot."))) >=20 > (operating-system > =C2=A0 (bootloader (list %grub-efi-bootloader)) > =C2=A0 ;; This is shared between bootloaders.=C2=A0 Ideally, it does not = affect > =C2=A0 ;; which files are installed or their contents, but only the > location. > =C2=A0 (bootloader-targets (grub-efi-default-targets "boot"))) I do really like the conceptual separation between configuration and installation! though, users would now need to enter the root device details three times, potentially in inconsistant formats. - lilah