From patchwork Sun Aug 4 03:55:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lilah Tascheter X-Patchwork-Id: 66656 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 AFE0627BBE2; Sun, 4 Aug 2024 04:57:28 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FROM_SUSPICIOUS_NTLD,MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 7FACC27BBEA for ; Sun, 4 Aug 2024 04:57:26 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1saSMP-0007Kb-Cu; Sat, 03 Aug 2024 23:56:45 -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 1saSMO-0007K3-21 for guix-patches@gnu.org; Sat, 03 Aug 2024 23:56:44 -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 1saSMN-00048I-NV for guix-patches@gnu.org; Sat, 03 Aug 2024 23:56:43 -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=t3putvifLmBtxRMBIO2MkhAQkvsLpbOrET+GfLPM8+U=; b=YYTwcmtnaUYbE04nJ7bUJlWSJsbPIsU4jL2Cor2C3VaxbPe4hFWezdlzEdWzRUcJ02srs9QdV00A5v9qbM9hNhC6y8+STRH2P6pTsFfocEK46/pq+UiAeUp4HqVV66A7ibyMpG4FIrcd3LQGOv3VD3SJzjnxSJt67q5oqWcy/pA6f9YtB9xFX0hUeMDejGj/xIEyjnAMwqtO78OfluZTayBuUe2igWToxL2ll23drIZboJKttj4ZjBF8dRFp/HqXf3NOz63czahrKBPhWIQZkGJgdWli8dFuh821nDV2ZTUQZHch0VMUK4NJn2LZH6RuLjWS/gCyrOG/lhU/OmBmHQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1saSMi-0001J1-5w for guix-patches@gnu.org; Sat, 03 Aug 2024 23:57:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72457] [PATCH 05/15] gnu: system: Remove useless boot parameters. Resent-From: Lilah Tascheter Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 04 Aug 2024 03:57:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72457 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72457@debbugs.gnu.org Cc: Lilah Tascheter Received: via spool by 72457-submit@debbugs.gnu.org id=B72457.17227438194948 (code B ref 72457); Sun, 04 Aug 2024 03:57:04 +0000 Received: (at 72457) by debbugs.gnu.org; 4 Aug 2024 03:56:59 +0000 Received: from localhost ([127.0.0.1]:55118 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saSMc-0001He-I2 for submit@debbugs.gnu.org; Sat, 03 Aug 2024 23:56:59 -0400 Received: from sendmail.purelymail.com ([34.202.193.197]:58128) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1saSMZ-0001Gj-S2 for 72457@debbugs.gnu.org; Sat, 03 Aug 2024 23:56:56 -0400 Authentication-Results: purelymail.com; auth=pass DKIM-Signature: a=rsa-sha256; b=bLM3mVoH2LHpCFLUrvVQUIB7bETwVtFqBwtnxphbgcvMKVCcUSxtTfW1rz2VYf2mzG02CwO7yASy4/oPHEOp0c+PLJB4M9UdwcmYPze2Yj5mLU4cAPR19kbCs/GZmeXYUqyOuGDxgVpbSzdOLXHhSbLRKNOmFSOPzk9wJoa7HjFJxOLVHssQK90b8d86T5+rwBCcN8hOMvv1f3r8bL8iP1fhiLC1etwvzFdcMBlacKRMHH5V5c+RBIz3/eP+Xam0Y5WDinasX/VdyDbYIL/RxpqwYVYfPTWBRx5nN1l7159bgNFPg8v20jPiBYEOGx4LB/4zpP/3InblXR5JwNr5MA==; s=purelymail2; d=lunabee.space; v=1; bh=ol1uWhvcd6jg8jrl+jAW7wdPNF/rhebpv51yL/ZJ3vU=; h=Received:From:To:Subject:Date; DKIM-Signature: a=rsa-sha256; b=UlaaVAvRDPX8QzG6OMFqNrZVVzE581ajm5a7Pqg4edntMGRmdBwYehrj9LcozbFg3YqVPqYBkRLDvyoobuGg9Ej/R/502NVRF9PEmU6yP62IdKyXYWiXEeZ+73RzwHPI+c2qZh4jK7iVBxMyEVNyn70BFKKghAEpxJu22B2pWYkz8w6OGi7xYmFvnewhRX2WFBNbS4lYxvTwoaqP71hFwaZdMfyFsGzPpfXybHSFiH+laY3UhBXby+PwagWVcDnd2qpyhbASofbVGEqrwTMpz02djRXvSOq+OoE+9r+T9QzbTAiROTlzL1EhPENXtjHS/c2TOtqKO2xWVSwZL7gvOA==; s=purelymail2; d=purelymail.com; v=1; bh=ol1uWhvcd6jg8jrl+jAW7wdPNF/rhebpv51yL/ZJ3vU=; h=Feedback-ID:Received:From:To:Subject:Date; Feedback-ID: 8937:2070:null:purelymail X-Pm-Original-To: 72457@debbugs.gnu.org Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id 1753051598; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 04 Aug 2024 03:56:22 +0000 (UTC) Date: Sat, 3 Aug 2024 22:55:25 -0500 Message-ID: <74d8f8ec6ba3b49562bb339dd736f3ddb10f9400.1722741997.git.lilah@lunabee.space> In-Reply-To: References: MIME-Version: 1.0 X-MIME-Autoconverted: from 8bit to quoted-printable by Purelymail 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: , X-Patchwork-Original-From: Lilah Tascheter via Guix-patches From: Lilah Tascheter Reply-To: Lilah Tascheter 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 * gnu/system.scm (operating-system-boot-parameters, operating-system-boot-parameters-file): Delete bootloader-menu-entries. * gnu/system/boot.scm (boot-parameters)[bootloader-menu-entries]: Delete fields. (read-boot-parameters): Don't read bootloader-menu-entries. * tests/boot-parameters.scm (%grub-boot-parameters, test-read-boot-parameters, test-read-boot-parameters): Don't include bootloader-menu-entries. ("read, bootloader-menu-entries, default value"): Delete test. Change-Id: I46d9cff4604dbfcf654b0820fdb77e72aecffbb4 --- gnu/system.scm | 7 ------- gnu/system/boot.scm | 8 -------- tests/boot-parameters.scm | 14 ++------------ 3 files changed, 2 insertions(+), 27 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index a345b52d55..66c1a80733 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1304,8 +1304,6 @@ (define* (operating-system-boot-parameters os root-device (initrd initrd) (multiboot-modules multiboot-modules) (bootloader-name bootloader-name) - (bootloader-menu-entries - (bootloader-configuration-menu-entries (operating-system-bootloader os))) (locale locale) (store-device (ensure-not-/dev (file-system-device store))) (store-directory-prefix (btrfs-store-subvolume-file-name file-systems)) @@ -1347,11 +1345,6 @@ (define* (operating-system-boot-parameters-file os) #$(boot-parameters-multiboot-modules params))) #~()) (bootloader-name #$(boot-parameters-bootloader-name params)) - (bootloader-menu-entries - #$(map menu-entry->sexp - (or (and=> (operating-system-bootloader os) - bootloader-configuration-menu-entries) - '()))) (locale #$(boot-parameters-locale params)) (store (device diff --git a/gnu/system/boot.scm b/gnu/system/boot.scm index 2b5302ce5f..4d89827ced 100644 --- a/gnu/system/boot.scm +++ b/gnu/system/boot.scm @@ -54,7 +54,6 @@ (define-module (gnu system boot) boot-parameters-label boot-parameters-root-device boot-parameters-bootloader-name - boot-parameters-bootloader-menu-entries boot-parameters-store-crypto-devices boot-parameters-store-device boot-parameters-store-directory-prefix @@ -113,8 +112,6 @@ (define-record-type* ;; partition. (root-device boot-parameters-root-device) (bootloader-name boot-parameters-bootloader-name) - (bootloader-menu-entries ;list of - boot-parameters-bootloader-menu-entries) (store-device boot-parameters-store-device) (store-mount-point boot-parameters-store-mount-point) (store-directory-prefix boot-parameters-store-directory-prefix) @@ -176,11 +173,6 @@ (define (read-boot-parameters port) ((_ args) (list args)) (#f 'grub))) ; for compatibility reasons. - (bootloader-menu-entries - (match (assq 'bootloader-menu-entries rest) - ((_ entries) (map sexp->menu-entry entries)) - (#f '()))) - ;; In the past, we would store the directory name of linux instead of ;; the absolute file name of its image. Detect that and correct it. (kernel (if (string=? kernel (direct-store-path kernel)) diff --git a/tests/boot-parameters.scm b/tests/boot-parameters.scm index 2e7976aa6c..f214de360d 100644 --- a/tests/boot-parameters.scm +++ b/tests/boot-parameters.scm @@ -64,7 +64,6 @@ (define %root-path "/") (define %grub-boot-parameters (boot-parameters (bootloader-name 'grub) - (bootloader-menu-entries '()) (root-device %default-root-device) (label %default-label) (kernel %default-kernel) @@ -107,7 +106,6 @@ (define* (test-read-boot-parameters #:key (version %boot-parameters-version) (bootloader-name 'grub) - (bootloader-menu-entries '()) (label %default-label) (root-device (quote-uuid %default-root-device)) (kernel %default-kernel) @@ -127,7 +125,7 @@ (define* (test-read-boot-parameters (cond ((eq? 'false val) (format #false fmt #false)) (val (format #false fmt val)) (else ""))) - (format #false "(boot-parameters~a~a~a~a~a~a~a~a~a~a)" + (format #false "(boot-parameters~a~a~a~a~a~a~a~a~a)" (sexp-or-nothing " (version ~S)" version) (sexp-or-nothing " (label ~S)" label) (sexp-or-nothing " (root-device ~S)" root-device) @@ -145,9 +143,7 @@ (define* (test-read-boot-parameters store-crypto-devices)) "") (sexp-or-nothing " (locale ~S)" locale) - (sexp-or-nothing " (bootloader-name ~a)" bootloader-name) - (sexp-or-nothing " (bootloader-menu-entries ~S)" - bootloader-menu-entries))) + (sexp-or-nothing " (bootloader-name ~a)" bootloader-name))) (let ((str (generate-boot-parameters))) (call-with-input-string str read-boot-parameters))) @@ -170,7 +166,6 @@ (define* (test-read-boot-parameters (test-assert "read, construction, optional fields" (and (test-read-boot-parameters #:bootloader-name #false) - (test-read-boot-parameters #:bootloader-menu-entries #false) (test-read-boot-parameters #:kernel-arguments #false) (test-read-boot-parameters #:with-store #false) (test-read-boot-parameters #:store-device #false) @@ -223,11 +218,6 @@ (define* (test-read-boot-parameters (boot-parameters-bootloader-name (test-read-boot-parameters #:bootloader-name #false))) -(test-eq "read, bootloader-menu-entries, default value" - '() - (boot-parameters-bootloader-menu-entries - (test-read-boot-parameters #:bootloader-menu-entries #false))) - (test-eq "read, kernel-arguments, default value" '() (boot-parameters-kernel-arguments