From patchwork Sat Feb 24 01:05:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Lechner X-Patchwork-Id: 2288 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6659427BBEA; Sat, 24 Feb 2024 01:08:59 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 9355D27BBE2 for ; Sat, 24 Feb 2024 01:08:53 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdgWz-0001yn-UA; Fri, 23 Feb 2024 20:08:45 -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 ) id 1rdgWx-0001y9-GC for guix-patches@gnu.org; Fri, 23 Feb 2024 20:08:43 -0500 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 1rdgWv-0007IE-E0; Fri, 23 Feb 2024 20:08:42 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rdgXG-0000yT-Hr; Fri, 23 Feb 2024 20:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69343] [PATCH 00/12] Simplify bootloader data structures and procedures Resent-From: Felix Lechner Original-Sender: "Debbugs-submit" Resent-CC: guix@cbaines.net, dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, rekado@elephly.net, zimon.toutoune@gmail.com, me@tobias.gr, guix-patches@gnu.org Resent-Date: Sat, 24 Feb 2024 01:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69343 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69343@debbugs.gnu.org Cc: Felix Lechner , Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Christopher Baines , Josselin Poiret , Ludovic =?utf-8?q?Court=C3=A8s?= , Mathieu Othacehe , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice Received: via spool by submit@debbugs.gnu.org id=B.17087368983605 (code B ref -1); Sat, 24 Feb 2024 01:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Feb 2024 01:08:18 +0000 Received: from localhost ([127.0.0.1]:60582 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdgWX-0000w4-9q for submit@debbugs.gnu.org; Fri, 23 Feb 2024 20:08:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:44954) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rdgWU-0000vo-IM for submit@debbugs.gnu.org; Fri, 23 Feb 2024 20:08:15 -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 ) id 1rdgW6-00019L-7V for guix-patches@gnu.org; Fri, 23 Feb 2024 20:07:50 -0500 Received: from sail-ipv4.us-core.com ([208.82.101.137]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1rdgW3-00077u-67 for guix-patches@gnu.org; Fri, 23 Feb 2024 20:07:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=2017; bh=BSgVcUpqjfMU8RQ Ezi6CC5edwpWgCv06f5NF9C9pBa4=; h=date:subject:cc:to:from; d=lease-up.com; b=bwTZMkkJYo1QX9Ugpija1Ypx+Wls6ZFeMvyLMZOEmiHsyrTtBiIQ c5wfG2MhtCRoEZ7nJwEtkHc+LXSIbZZ+9JS/PA+m6B5OaOmzQ3pwNGg841C2yWz1jcP2W2 SHKwPkKksIfmaAoU7AxWwkOyzGOnGsRZVSg0ONR8RdaIWANJ0= Received: by sail-ipv4.us-core.com (OpenSMTPD) with ESMTPSA id 187341b2 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Sat, 24 Feb 2024 01:07:44 +0000 (UTC) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 579c22a2; Sat, 24 Feb 2024 01:07:44 +0000 (UTC) Date: Fri, 23 Feb 2024 17:05:59 -0800 Message-ID: X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=208.82.101.137; envelope-from=felix.lechner@us-core.com; helo=sail-ipv4.us-core.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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: , Reply-to: Felix Lechner X-ACL-Warn: , Felix Lechner via Guix-patches X-Patchwork-Original-From: Felix Lechner via Guix-patches via From: Felix Lechner Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches The bootloader data structures are hard to understand because the boot-parameter records are modified on the fly. It happened because those records are versioned when stored on disk, and changing the data structure was deemed to difficult. (I agree with that assessment.) This commit series uses a new record type to separate the on-disk and the in-memory concerns. As for the bug fix, I never actually saw the bug but believe from reading the code that a bug existed. The existence was not verified. Felix Lechner (12): Fix bug where the extra menu entries for a bootloader were shown twice. Move record to a separate file. Also move boot-parameters->menu-entry. Rename seconds->string procedure to epoch->date-string. Move epoch->date-string to gnu/system/boot.scm and use it elsewhere. Offer a uniform decorated-boot-label and use it. Rename boot-parameters to boot-alternatives when appropriate. Rename two remote variables confusingly named 'generations'. Give a separate name to a commonly used expression. Simplify profile->boot-alternatives. Split generation->boot-parameters out of profile->boot-alternatives. Encapsulate to retain generation, system-path and epoch. gnu/machine/ssh.scm | 74 ++++----- gnu/system.scm | 252 +--------------------------- gnu/system/boot.scm | 336 ++++++++++++++++++++++++++++++++++++++ guix/scripts/system.scm | 71 ++++---- tests/boot-parameters.scm | 1 + 5 files changed, 412 insertions(+), 322 deletions(-) create mode 100644 gnu/system/boot.scm base-commit: c0f88cd18649c31c75bcddf8247b14ef3e3a66a5