From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 wNcyFytEImd3bAAAe85BDQ:P1 (envelope-from ) for ; Wed, 30 Oct 2024 14:35:23 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id wNcyFytEImd3bAAAe85BDQ (envelope-from ) for ; Wed, 30 Oct 2024 15:35:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=c8CUz0Xi; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=IPgacWtS; 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=1730298922; a=rsa-sha256; cv=none; b=Ga42ZpRBPwABn/9hpb6lbCergXFMNPEYoFeAtT1MX64A4hVIpxWkDNzxv+7R1qnGm7b6U+ 8lMyk0MfBwkAG2Bn8O9X5L2m7lG6s63INf16YKGggvyWGSR4D7MhfgPMUwVgDwyooep2wq 90RdHI52lX4XO8axClS/ziCuE/9ygT3RWuZmiKWFMihe6Gi1ZkLMgzWsqMWFf8uytyCn9q mSNU+fqXO7vl2ElQBBi0fM/Y74/wi4JTpwtmGBxdhbx1RuLTPAxg7CwpB7MFE2F9SwwpZb OR3+9deAVL3/YV2d1rTe9aQhn60isniv/VOGS7cfWPTVhuEKSfyT9cN+4Kh4Pg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=c8CUz0Xi; dkim=fail ("body hash did not verify") header.d=gnu.org header.s=fencepost-gnu-org header.b=IPgacWtS; 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=1730298922; h=from:from:sender:sender: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=cVQKqYlG11wxBjEINap5WcvTH2U+JSpdY38PpF7pa28=; b=K+7DLYCFaQrtaTTjwWbLCnp8pBx5Jw9FLSFgwDFHke6bABJtypf4B9aMs4Q3CnY+AtEWrc Tr0a7jrbInO6+RzQ1ArW6qJuvnuXIqVpSihaX9FucZX3nyc0gYy22Vkk3hols4b4eZOKpb juQ1uX5ySq/Sd5pVEr8iR1TH2rzKcaM3+EzNcpqmPFNJnE9TgFJBK/EgeUKO6/+U9bPzqg 32NnvQsGcA3UwMvuYDIUq+Vz6Wn9l+Tx+nZxk6FX/OpezAmPLG60X2XQzrt8f6AHTpOt2I romAES8j0nZlhIXuvFrVKcRYOl0VXF04NMc2H0iNbkIRwmxikgeh9J959VaUow== 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 A8C3577E0C for ; Wed, 30 Oct 2024 15:35:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t69n6-00032W-2V; Wed, 30 Oct 2024 10:35:21 -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 1t69ms-0002ob-Sp for guix-patches@gnu.org; Wed, 30 Oct 2024 10:35:07 -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 1t69mo-0003rC-N6; Wed, 30 Oct 2024 10:35:03 -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=66z09eNp2NsUEqlFl/pShqGkUl5/a7OKnCtzAjDTokw=; b=c8CUz0XiQta2KAl5ENTB1aSVW0Lz+285Q1lLJKaBpplys/nm8QpiBX21o5tOeMWfPZwfrgIfzGZgJozj6qcvjFdlmKCeZZ8gMdMdBMjgU5JFic1DrCPQgJkQK6IFKfEoMgU8Zizuzs1bhBu+jLzJY1yKmJ55rjsIseX2qbZ1o/E05vBEXbufs4EMSk8v2NtxqUmfbAOt0VRyiKMVy6w0t2fRZfrpCHXNlgUldJ/+ruGinvYS+DAGwBITIXU5F5qBqUtyLdaPNzDyeQRiETlks06xj+2pNU+FinEpNySgniNPHG7M4F6ASluzkrvhaEpIRU2sLZnM1xix9oDVTDUpDw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t69mo-00040v-Gc; Wed, 30 Oct 2024 10:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73927] [PATCH v4 14/18] installer: Use `%' for parameter %run-command-in-installer. Resent-From: Janneke Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: dev@jpoiret.xyz, ludo@gnu.org, othacehe@gnu.org, guix-patches@gnu.org Resent-Date: Wed, 30 Oct 2024 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73927 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73927@debbugs.gnu.org Cc: Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe X-Debbugs-Original-Xcc: Josselin Poiret , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Mathieu Othacehe Received: via spool by 73927-submit@debbugs.gnu.org id=B73927.173029885415365 (code B ref 73927); Wed, 30 Oct 2024 14:35:02 +0000 Received: (at 73927) by debbugs.gnu.org; 30 Oct 2024 14:34:14 +0000 Received: from localhost ([127.0.0.1]:35380 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t69m1-0003zj-Rv for submit@debbugs.gnu.org; Wed, 30 Oct 2024 10:34:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t69lg-0003wA-0L for 73927@debbugs.gnu.org; Wed, 30 Oct 2024 10:33:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t69jV-0003Np-67; Wed, 30 Oct 2024 10:31:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=66z09eNp2NsUEqlFl/pShqGkUl5/a7OKnCtzAjDTokw=; b=IPgacWtSAcZg2D5JO7I1 diVaEzeQuRrjOo8b+C3gMBjCzcxi8d5Kbqzuhn46jMnjE/ZRmrs/YSKMPGCyfGwZe2FXevJmYnFVo S+5eWaeVHsCtxgQfcfy5ShgkL5H4XU31kulHvsgpL4OHMY+YonGvmckos3aepwstuZKMngErJPBpJ nEqpKVH5iewcqAKDviwaqHqPATVb6NkT6PesbV021/QKhFLeqoMFEVIFzIKfdtYY8/SnnRFs9fFqt qyi5PFDpNoLzeexhoPWS02oLfP0JJl3BJMNq3WzzajWBP//xiyXynfdcIFGb4gwk9mnl7Fo7rJckr CoUo3Tq4vDWxPQ==; From: Janneke Nieuwenhuizen Date: Wed, 30 Oct 2024 15:30:43 +0100 Message-ID: <5ffe4e5ea10ac9920ea17673275f178c4a060442.1730296564.git.janneke@gnu.org> X-Mailer: git-send-email 2.46.0 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.46 X-Spam-Score: -2.46 X-Migadu-Queue-Id: A8C3577E0C X-Migadu-Scanner: mx10.migadu.com X-TUID: wNhcojCVE46n * gnu/installer/utils.scm (run-command-in-installer): Rename to... (%run-command-in-installer): ...this. * gnu/installer.scm (installer-program): Update accordingly. * gnu/installer/parted.scm (remove-logical-devices, create-btrfs-file-system, create-ext4-file-system, create-fat16-file-system, create-fat32-file-system, create-jfs-file-system, create-ntfs-file-system, create-xfs-file-system, create-swap-partition, luks-format-and-open, luks-ensure-open, luks-close): Update accordingly. Change-Id: I96ebc59ebc85fd8ebccb0cc57130b4e7532d287f --- gnu/installer.scm | 2 +- gnu/installer/parted.scm | 27 ++++++++++++++------------- gnu/installer/utils.scm | 6 +++--- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/gnu/installer.scm b/gnu/installer.scm index 3a05843cab..21809e4259 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -465,7 +465,7 @@ (define (installer-program) (installer-init current-installer) (lambda () (parameterize - ((run-command-in-installer + ((%run-command-in-installer (installer-run-command current-installer))) (catch #t (lambda () diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm index dbdec1bba8..e59df3d8e6 100644 --- a/gnu/installer/parted.scm +++ b/gnu/installer/parted.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2019-2020, 2022, 2024 Ludovic Courtès ;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; Copyright © 2022 Josselin Poiret +;;; Copyright © 2024 Janneke Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -363,7 +364,7 @@ (define* (force-device-sync device) (define (remove-logical-devices) "Remove all active logical devices." - ((run-command-in-installer) "dmsetup" "remove_all")) + ((%run-command-in-installer) "dmsetup" "remove_all")) (define (installer-root-partition-path) "Return the root partition path, or #f if it could not be detected." @@ -1183,7 +1184,7 @@ (define (set-user-partitions-file-name user-partitions) (define (create-btrfs-file-system partition) "Create a btrfs file-system for PARTITION file-name." - ((run-command-in-installer) "mkfs.btrfs" "-f" partition)) + ((%run-command-in-installer) "mkfs.btrfs" "-f" partition)) (define (create-ext4-file-system partition) "Create an ext4 file-system for PARTITION file-name." @@ -1192,32 +1193,32 @@ (define (create-ext4-file-system partition) ;; up and adding new files would fail with ENOSPC despite there being plenty ;; of free space and inodes: ;; . - ((run-command-in-installer) "mkfs.ext4" "-F" partition + ((%run-command-in-installer) "mkfs.ext4" "-F" partition "-O" "large_dir")) (define (create-fat16-file-system partition) "Create a fat16 file-system for PARTITION file-name." - ((run-command-in-installer) "mkfs.fat" "-F16" partition)) + ((%run-command-in-installer) "mkfs.fat" "-F16" partition)) (define (create-fat32-file-system partition) "Create a fat32 file-system for PARTITION file-name." - ((run-command-in-installer) "mkfs.fat" "-F32" partition)) + ((%run-command-in-installer) "mkfs.fat" "-F32" partition)) (define (create-jfs-file-system partition) "Create a JFS file-system for PARTITION file-name." - ((run-command-in-installer) "jfs_mkfs" "-f" partition)) + ((%run-command-in-installer) "jfs_mkfs" "-f" partition)) (define (create-ntfs-file-system partition) "Create a JFS file-system for PARTITION file-name." - ((run-command-in-installer) "mkfs.ntfs" "-F" "-f" partition)) + ((%run-command-in-installer) "mkfs.ntfs" "-F" "-f" partition)) (define (create-xfs-file-system partition) "Create an XFS file-system for PARTITION file-name." - ((run-command-in-installer) "mkfs.xfs" "-f" partition)) + ((%run-command-in-installer) "mkfs.xfs" "-f" partition)) (define (create-swap-partition partition) "Set up swap area on PARTITION file-name." - ((run-command-in-installer) "mkswap" "-f" partition)) + ((%run-command-in-installer) "mkswap" "-f" partition)) (define (call-with-luks-key-file password proc) "Write PASSWORD in a temporary file and pass it to PROC as argument." @@ -1246,9 +1247,9 @@ (define (luks-format-and-open user-partition) (lambda (key-file) (installer-log-line "formatting and opening LUKS entry ~s at ~s" label file-name) - ((run-command-in-installer) "cryptsetup" "-q" "luksFormat" + ((%run-command-in-installer) "cryptsetup" "-q" "luksFormat" file-name key-file) - ((run-command-in-installer) "cryptsetup" "open" "--type" "luks" + ((%run-command-in-installer) "cryptsetup" "open" "--type" "luks" "--key-file" key-file file-name label))))) (define (luks-ensure-open user-partition) @@ -1262,14 +1263,14 @@ (define (luks-ensure-open user-partition) (lambda (key-file) (installer-log-line "opening LUKS entry ~s at ~s" label file-name) - ((run-command-in-installer) "cryptsetup" "open" "--type" "luks" + ((%run-command-in-installer) "cryptsetup" "open" "--type" "luks" "--key-file" key-file file-name label)))))) (define (luks-close user-partition) "Close the encrypted partition pointed by USER-PARTITION." (let ((label (user-partition-crypt-label user-partition))) (installer-log-line "closing LUKS entry ~s" label) - ((run-command-in-installer) "cryptsetup" "close" label))) + ((%run-command-in-installer) "cryptsetup" "close" label))) (define (format-user-partitions user-partitions) "Format the records in USER-PARTITIONS list with diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm index c722e9af8f..170f036537 100644 --- a/gnu/installer/utils.scm +++ b/gnu/installer/utils.scm @@ -50,7 +50,7 @@ (define-module (gnu installer utils) run-external-command-with-handler/tty run-external-command-with-line-hooks run-command - run-command-in-installer + %run-command-in-installer syslog-port %syslog-line-hook @@ -222,13 +222,13 @@ (define* (run-command command #:key (tty? #f)) (pause) succeeded?) -(define run-command-in-installer +(define %run-command-in-installer (make-parameter (lambda (. args) (raise (condition (&serious) - (&message (message "run-command-in-installer not set"))))))) + (&message (message "%run-command-in-installer not set"))))))) ;;; -- Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com