From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gOs4H6jR4mG8wAAAgWs5BA (envelope-from ) for ; Sat, 15 Jan 2022 14:52:40 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kPERHKjR4mGvAAAAauVa8A (envelope-from ) for ; Sat, 15 Jan 2022 14:52:40 +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 49E6C2A10A for ; Sat, 15 Jan 2022 14:52:40 +0100 (CET) Received: from localhost ([::1]:39888 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n8jTz-0006NY-GD for larch@yhetil.org; Sat, 15 Jan 2022 08:52:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n8jSS-0005Ds-5J for guix-patches@gnu.org; Sat, 15 Jan 2022 08:51:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:46619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n8jSR-0004Ek-Ag for guix-patches@gnu.org; Sat, 15 Jan 2022 08:51:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n8jSR-0001qi-AU for guix-patches@gnu.org; Sat, 15 Jan 2022 08:51:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#53063] [PATCH v2 wip-harden-installer 05/18] installer: Keep PATH inside the install container. Resent-From: Josselin Poiret Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 15 Jan 2022 13:51:03 +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: Mathieu Othacehe Cc: 53063@debbugs.gnu.org, ludo@gnu.org, Josselin Poiret Received: via spool by 53063-submit@debbugs.gnu.org id=B53063.16422546386954 (code B ref 53063); Sat, 15 Jan 2022 13:51:03 +0000 Received: (at 53063) by debbugs.gnu.org; 15 Jan 2022 13:50:38 +0000 Received: from localhost ([127.0.0.1]:39492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8jS2-0001o3-3N for submit@debbugs.gnu.org; Sat, 15 Jan 2022 08:50:38 -0500 Received: from jpoiret.xyz ([206.189.101.64]:48758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n8jRs-0001ma-Qa for 53063@debbugs.gnu.org; Sat, 15 Jan 2022 08:50:29 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 68A3F18506B; Sat, 15 Jan 2022 13:50:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1642254627; 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=tOwdgrzuOYtn3xYvEURZFgaseGrFEkEaeRODXcanMsI=; b=Q5APLl2/x3t4kufa+FDJRhIsEJ+ZSRYezbWDNnz+y5gBeiIvtEsh9QUsBjfhlocewgzW7y e1kS/EY5Hdo0qcyh/HE3j8mPKvAdyyWrZocSJyImgCJntjtsoDwEKMr1UVl/Ce9LI0qycN YbHbHHLlHAuttQy6Cjo7yE5ODDE+FGk/hv4V0qjhogj8nDaHtvutKXfvbmNsdP9VX2Jy0S tCXBUFR8BlkEPIv8yqg0FLWygoj7poNYHR58q+djNolMlgp5veMiPZ/2IyeNtDZwthSVof x5r8nKB8ffjHKX6Pn0u39mGJorWX2KhuakWSve8UIyiUdFnoL1IEGlYr9swk9A== Date: Sat, 15 Jan 2022 14:49:58 +0100 Message-Id: <20220115135011.5817-6-dev@jpoiret.xyz> In-Reply-To: <20220115135011.5817-1-dev@jpoiret.xyz> References: <8735lz4xsv.fsf@gnu.org> <20220115135011.5817-1-dev@jpoiret.xyz> 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=1642254760; 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=tOwdgrzuOYtn3xYvEURZFgaseGrFEkEaeRODXcanMsI=; b=SrCSEa94vLvJ1lML6mcgAXm7K32zQpZC6iiEsngtAw+BsWDUcNwgojG4Xn+viFAozcUrBR oTm+dPiHOTDHNrwRlOHalKcTUgqSE5T1KZlcZpfNR5pK3Kxf3pT7Vx0mP9t3G429NcgQbi 9bADI4udtbRYS3GtPYDpdBCnCbRczsxwK+goe0Dm4Wviku4HXdO4vgThDFPeQuljaP5aK9 imEaZ2LLbrwgUSEGh1rnnwnGKwjejTVYaYpeYGeYzMV/epiD3vBdVRTB5nAkeh2fOSeTW0 g77+IKQP0ed+i4exRJbZ7/z+raXGSTF9Crvjnyi6Ek72qRcsHcin7MRjcjlwBA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642254760; a=rsa-sha256; cv=none; b=oPb+WyU9LA/UCOvUvb26wWLZkmwvudSTr3H4kPvUUaaHwGwlZ/ojmjbMQN41f1E/f07Sq3 Wt4AAofaBBLWlsM55+FIkqxU0+t/SziPh7SrGGi8Ufm12Ox2OiunU7otK86iWxzCxVF4Qz /84iwM742SxXfq07BMTRe4sPcGENGb1p8OfWn1mIhUZBMF5k96BE2lILx4hYhGXNWTuhk1 6PkjlO6950dDhrXukhQQRL24eZjhNvnB83ZAgwwhVPGnXOnp8KB5PevhXfupjRdQphnYg3 hPi33sDkgUbbrf63UuzZXw4qgjVOSZb0Ai5zUFSzaRneanN2gweK7dx4a2yNFg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b="Q5APLl2/"; 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.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=jpoiret.xyz header.s=dkim header.b="Q5APLl2/"; 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: 49E6C2A10A X-Spam-Score: -3.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: EmtjfdfDWSa6 * gnu/installer/final.scm (install-system): Set PATH inside the container. --- gnu/installer/final.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index fbfac1f692..7d5eca4c7e 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -169,7 +169,8 @@ (define (assert-exit x) (database-dir "/var/guix/db") (database-file (string-append database-dir "/db.sqlite")) (saved-database (string-append database-dir "/db.save")) - (ret #f)) + (ret #f) + (path (getenv "PATH"))) (mkdir-p (%installer-target-dir)) ;; We want to initialize user passwords but we don't want to store them in @@ -208,6 +209,8 @@ (define (assert-exit x) (setvbuf (current-output-port) 'none) (setvbuf (current-error-port) 'none) + (setenv "PATH" path) + ;; If there are any connected clients, assume that we are running ;; installation tests. In that case, dump the standard and error ;; outputs to syslog. -- 2.34.0