From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qD3aMJ1y12HJUgAAgWs5BA (envelope-from ) for ; Thu, 06 Jan 2022 23:52:13 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id qDleKZ1y12GRfQAAG6o9tA (envelope-from ) for ; Thu, 06 Jan 2022 23:52:13 +0100 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 5128B40586 for ; Thu, 6 Jan 2022 23:52:13 +0100 (CET) Received: from localhost ([::1]:50264 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n5bcC-0003tC-Go for larch@yhetil.org; Thu, 06 Jan 2022 17:52:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57592) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n5bZE-0007dp-Iy for guix-patches@gnu.org; Thu, 06 Jan 2022 17:49:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49735) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n5bZD-000769-8O for guix-patches@gnu.org; Thu, 06 Jan 2022 17:49:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n5bZD-00006X-8T for guix-patches@gnu.org; Thu, 06 Jan 2022 17:49:07 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53063] [PATCH wip-harden-installer 14/14] installer: Add confirmation page when running external commands. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 06 Jan 2022 22:49:07 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53063 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 53063@debbugs.gnu.org Cc: Josselin Poiret Received: via spool by 53063-submit@debbugs.gnu.org id=B53063.164150932832740 (code B ref 53063); Thu, 06 Jan 2022 22:49:07 +0000 Received: (at 53063) by debbugs.gnu.org; 6 Jan 2022 22:48:48 +0000 Received: from localhost ([127.0.0.1]:42624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5bYu-0008Vu-7T for submit@debbugs.gnu.org; Thu, 06 Jan 2022 17:48:48 -0500 Received: from jpoiret.xyz ([206.189.101.64]:36774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n5bYp-0008V0-K8 for 53063@debbugs.gnu.org; Thu, 06 Jan 2022 17:48:44 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id CF382184D98; Thu, 6 Jan 2022 22:48:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1641509323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LV18XgneVGVIkuSVz2ReEPeLl642XDRL1w7A6TYk8Xg=; b=ivcgmSzKdJhNzCPYyil1MK4RsP6kZwOfaQDNqrq5qCpHCf8kZDdIB1F/vX0OyUi4QKIB/U p0ecUY37RjbT5+HycB8Z2GlBvKx9oXQ0xDitYpb0t/Fjwv2JjDt4WQUsUeMmNKTL8ZIMFL uDpcQsa8x3hDA2XMn+amdtppe5gDgUOskFQfC0QzON4MWfBctIBTP7R9qky/STSan4KOp2 w9qx13FK8YT7g194OA9p315HGcYxVBMQklMAwNQ9G7SHrg1kXmD8R4ydKXOp/XmRiRLuAa +s+Lonnv63pY6VUGG9Ig6esLTsVWEbVlFoxKrx5q1odgfs6zz/lB6Y+IvmF0Pw== Date: Thu, 6 Jan 2022 23:48:12 +0100 Message-Id: <393a78f61a46d3030a8d8bde9d415d031bb4f190.1641507696.git.dev@jpoiret.xyz> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spamd-Bar: / 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" Reply-to: Josselin Poiret X-ACL-Warn: , Josselin Poiret via Guix-patches From: Josselin Poiret via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641509533; 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-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=LV18XgneVGVIkuSVz2ReEPeLl642XDRL1w7A6TYk8Xg=; b=ZAdLUQG87tmwXioXRP0D3lylpWsGX/3QaSj6sqPb6SslSvz2we/op8c0zV6kRunG2mxj5B oZoCCj6/MR8A2CoGaWFKKR1t0EQ/GRQK2JkJrca1P1D7qikC8cq0ugjJwaNoaIaWl0KFQY EWMTbiMGvp+pKkgG+wCebGpa5li6sQF5KNcW9wYpmNkGh+GLYXilxIAO/X/EW9+7F2qAvz 0FaC7DkwmIzCw5PC7CdOuD7O9bVwA6KvdKcVaiFX714MJjpVXdVA42IrYKCDmLz3FlzeqW ER06/6Yx1dR4FkMIJnBdR/9Q9VJ1VcsXRBG3ne+bF+48E17lBUB9cF71GEhynA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641509533; a=rsa-sha256; cv=none; b=W+0lHaarmTC6WvsYLs9fCUy8rb1oT+1kJIhq8jiy6JawcABej8tEXOWJ6qhQrx251y5cD2 9fX40tiQVHc6H/6rVzTirQTPD2UrRF2RDLatsQR+1BwNY7cxgTyg5XZ+BMHWmxEHABFCmy MeW93oUnX/Mq+VjTMj7iO5ZRR2KezNYttRCXcwIfDqCQ1EsDB5plNfkZv91JpOHMi0vAie iRxDvQ1ZJaUSe+ud++tdT//pllBHOmxLUMWGo+s3bmGu2XrCnOJ/S8bIBk4ztQ/L2Y3lYj X05WfOHm42R+vVDsSrHM7YMdNVLBYsUdt8BNysm29DLaCD/Dcy6xJftQhP5TCQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=ivcgmSzK; 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" X-Migadu-Spam-Score: -3.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b=ivcgmSzK; 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" X-Migadu-Queue-Id: 5128B40586 X-Spam-Score: -3.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7zxFZIdqulAo * gnu/installer/newt.scm (newt-run-command): Add it. --- gnu/installer/newt.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm index fc851339d1..4830667d4d 100644 --- a/gnu/installer/newt.scm +++ b/gnu/installer/newt.scm @@ -80,6 +80,16 @@ (define (exit-error file report key args) (clear-screen)) (define (newt-run-command . args) + (define displayed-command + (string-join + (map (lambda (s) (string-append "\"" s "\"")) args) + " ")) + (run-confirmation-page + (format #f "The installer will run the following command:~%~a~%" + displayed-command) + "External command" + #:exit-button-procedure (lambda () + (abort-to-prompt 'installer-step 'abort))) (newt-suspend) (clear-screen) (define result (run-command args)) -- 2.34.0