From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id WI0COxNR7WZcfQAA62LTzQ:P1 (envelope-from ) for ; Fri, 20 Sep 2024 10:40:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id WI0COxNR7WZcfQAA62LTzQ (envelope-from ) for ; Fri, 20 Sep 2024 12:40:20 +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=lbDG6t+l; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=lxdp6eRv; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726828819; 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=KmgrhZIM7bLOfUU9MLGaqHtRJB8u7epytM/ovVdNuu8=; b=Nq5jmqf2QihyBMB6RbZIYi+hNElwxHvy7DHoROlEKVdGdKCLdnvx2NFn/F8bMRCjGFmkK7 zH4Ma1HTqeHJZDzxveUzdHZ+Q8s7MummNCF8VHscLaVCpLNh6w9fIK9n5uHSXFz5cx5bmQ H2fAcOVdRvMp25lpwu96slBx6XvELYfal8dvz/vwPH6dXMg31A4M9dGUCQ77N+5PfG/wzj 4kZgyg1txPwXwF1U9/h34MbkNKV9/di1QKgql77xsyuJG89EWMq/H02Ok6W161V8Jytjt3 XKg+fXQJzGQkfFUea0aOVlrfXosIFvO6H1DYf95xYXIqSjxq0NyePu8/fbObZQ== 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=lbDG6t+l; dkim=fail ("headers rsa verify failed") header.d=rimm.ee header.s=herman header.b=lxdp6eRv; 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"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726828819; a=rsa-sha256; cv=none; b=AcGOfc+hi3Dnc2QGAzUnS0BqKMQriKDB2OCyKNaMYXDqSCfcNmE00ws9DlRfnwydm2xf5H 3IJFf6lk2dClj3iM8w3A1dQSuK2cmqH9ofAT9sowD6yBIsejStPEyVYN+ioOqWTvcMB1Qq hiezdX8h3ojBmmKfTBa3fjFogPDfd/7P6sQR6JICUAUCsf8KVDIJ4/c1Zp/KI/PeRmXnBp BLoYzHMP0NKgXFcZLCDEyPAlzG7DSPldpnPkB5O4LSM7I/osl8dY3nH422nHFoOS+mN/Hx Hp60Fn1U1D44XF1AC96JD31cj2wvzOPtNO/AvP4kqzMSND4EKt1cjZowjrJyiQ== 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 95CBDA0F7 for ; Fri, 20 Sep 2024 12:40:19 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1srb3W-000528-TF; Fri, 20 Sep 2024 06:40:07 -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 1srb3B-0004xT-5o for guix-patches@gnu.org; Fri, 20 Sep 2024 06:39:45 -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 1srb3A-0006Tg-TZ for guix-patches@gnu.org; Fri, 20 Sep 2024 06:39:44 -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=KmgrhZIM7bLOfUU9MLGaqHtRJB8u7epytM/ovVdNuu8=; b=lbDG6t+l3q00saTCXPe40vyJLrINqD9Ya4kJYCTr/6NP0reP7eCt1EAzCSkoAxsR5b0xpchJ2cPhLHi9XdMdtKbeLCF/cR7aBNU8lG9OKgMZuhXyhQFrksKB0DcJZuMBIfU62H3/nakI0b0a6rHUTsYvZdbog80C699u931fUP1oar36HcHLPv63dAfYr4X9px3hAADn65friK3i7nezkGivu/U6zkncuCaQjReDjRTAeD8AzpN/zr9mqFROBhdmcS456JFtK1ixgwhubpEcaqsmlF5ki5IlxbXO/dfkF78xefMQOtVps4PtGuMCvKO9sN0In/iN1i3yyii+alzvAA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1srb3T-0001P0-Fr for guix-patches@gnu.org; Fri, 20 Sep 2024 06:40:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73202] [PATCH v2 02/15] gnu: system: Remove useless boot parameters. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 Sep 2024 10:40:03 +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: Lilah Tascheter Received: via spool by 73202-submit@debbugs.gnu.org id=B73202.17268287675186 (code B ref 73202); Fri, 20 Sep 2024 10:40:03 +0000 Received: (at 73202) by debbugs.gnu.org; 20 Sep 2024 10:39:27 +0000 Received: from localhost ([127.0.0.1]:34146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srb2s-0001LM-9F for submit@debbugs.gnu.org; Fri, 20 Sep 2024 06:39:27 -0400 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117]:54361 helo=email.rimm.ee) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1srb2o-0001KU-6D for 73202@debbugs.gnu.org; Fri, 20 Sep 2024 06:39:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1726828733; h=from:from: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: in-reply-to:in-reply-to:references:references; bh=KmgrhZIM7bLOfUU9MLGaqHtRJB8u7epytM/ovVdNuu8=; b=lxdp6eRv2npzxHxHKiw0vbbnIp/XTu4hzzh0UsKSM8bL9jIK/b+BJWXaxxyWSQxVavZRYS IWyxCaqJbdRJAk30LFRoNgHKqp5F6y+xuB8+hXZQCJNm8672kP+aRNi9YnJfAKMm2OTIzN 4tkOgZ+Qhow0zmZVEb9jHkF7ZDgiqngjJre7s8HpU96SrfDw3Ol3u0kPB34XCfdtMn48qW zeNDwklRAS/tfsGQlnCVJ1fGH9TQrZsAgWdm2oAzv4Fm/84uq+z+xl2RSQyAogBkx1auIN 2mGdpSDQpGgkIR3bQL0g3tA3V9n1mwbByd+Nkibmb0/GTvVRSJEBpHrH9H6Muw== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 654fd6f5 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO); Fri, 20 Sep 2024 10:38:53 +0000 (UTC) Date: Fri, 20 Sep 2024 12:37:47 +0200 Message-ID: <7779b50c171a053248705ebd18f6b7ba4ea68a48.1726827025.git.herman@rimm.ee> X-Mailer: git-send-email 2.45.2 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches From: Herman Rimm via Guix-patches via 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: -4.91 X-Spam-Score: -4.91 X-Migadu-Queue-Id: 95CBDA0F7 X-Migadu-Scanner: mx10.migadu.com X-TUID: fZK0Qe4Od3Ha From: Lilah Tascheter * 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 field. (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 | 18 +++++------------- 3 files changed, 5 insertions(+), 28 deletions(-) diff --git a/gnu/system.scm b/gnu/system.scm index 25afa96295..a3eee5aa24 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1298,8 +1298,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)) @@ -1341,11 +1339,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 833caef496..a898ab9549 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 @@ -112,8 +111,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) @@ -174,11 +171,6 @@ (define (read-boot-parameters port) ((_ args) 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..e1dc4620c3 100644 --- a/tests/boot-parameters.scm +++ b/tests/boot-parameters.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019, 2020 Miguel Ángel Arruga Vivas ;;; Copyright © 2022 Josselin Poiret +;;; Copyright © 2024 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -34,6 +35,7 @@ (define-module (test-boot-parameters) #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix tests) + #:use-module (ice-9 format) #:use-module (srfi srfi-34) #:use-module (srfi srfi-64) #:use-module (rnrs bytevectors)) @@ -64,7 +66,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 +108,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 +127,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 #f "(boot-parameters~@{~a~})" (sexp-or-nothing " (version ~S)" version) (sexp-or-nothing " (label ~S)" label) (sexp-or-nothing " (root-device ~S)" root-device) @@ -135,7 +135,7 @@ (define* (test-read-boot-parameters (sexp-or-nothing " (kernel-arguments ~S)" kernel-arguments) (sexp-or-nothing " (initrd ~S)" initrd) (if with-store - (format #false " (store~a~a~a~a)" + (format #f " (store~@{~a~})" (sexp-or-nothing " (device ~S)" store-device) (sexp-or-nothing " (mount-point ~S)" store-mount-point) @@ -145,9 +145,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 +168,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 +220,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 -- 2.45.2