From patchwork Fri Feb 21 23:20:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 20356 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 CC84327BBEA; Fri, 21 Feb 2020 23:21:20 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id A63A927BBE4 for ; Fri, 21 Feb 2020 23:21:20 +0000 (GMT) Received: from localhost ([::1]:37182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5Hbk-0004ZE-6f for patchwork@mira.cbaines.net; Fri, 21 Feb 2020 18:21:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48126) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j5HbV-0004FK-CZ for guix-patches@gnu.org; Fri, 21 Feb 2020 18:21:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j5HbU-00009S-DH for guix-patches@gnu.org; Fri, 21 Feb 2020 18:21:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:42437) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j5HbU-00009I-A7 for guix-patches@gnu.org; Fri, 21 Feb 2020 18:21:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j5HbU-0000XO-6a for guix-patches@gnu.org; Fri, 21 Feb 2020 18:21:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#39729] [PATCH 6/7] installer: Honor /tmp/installer-system-init-options. Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 21 Feb 2020 23:21:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39729 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 39729@debbugs.gnu.org Cc: Ludovic =?utf-8?q?Court=C3=A8s?= Received: via spool by 39729-submit@debbugs.gnu.org id=B39729.15823272622031 (code B ref 39729); Fri, 21 Feb 2020 23:21:04 +0000 Received: (at 39729) by debbugs.gnu.org; 21 Feb 2020 23:21:02 +0000 Received: from localhost ([127.0.0.1]:48403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5HbS-0000Wa-3Y for submit@debbugs.gnu.org; Fri, 21 Feb 2020 18:21:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1j5HbK-0000Um-Bv for 39729@debbugs.gnu.org; Fri, 21 Feb 2020 18:20:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44537) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1j5HbF-0008GX-9E; Fri, 21 Feb 2020 18:20:49 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40974 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1j5HbE-0000vc-Ky; Fri, 21 Feb 2020 18:20:48 -0500 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Sat, 22 Feb 2020 00:20:29 +0100 Message-Id: <20200221232030.27752-6-ludo@gnu.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221232030.27752-1-ludo@gnu.org> References: <20200221232030.27752-1-ludo@gnu.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/installer/final.scm (install-system): Honor "/tmp/installer-system-init-options". --- gnu/installer/final.scm | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm index 7193ecb8a4..869be8814b 100644 --- a/gnu/installer/final.scm +++ b/gnu/installer/final.scm @@ -111,9 +111,19 @@ cow-store service." Start COW-STORE service on target directory and launch guix install command in a subshell. LOCALE must be the locale name under which that command will run, or #f. Return #t on success and #f on failure." - (let ((install-command (list "guix" "system" "init" "--fallback" - (%installer-configuration-file) - (%installer-target-dir)))) + (let* ((options (catch 'system-error + (lambda () + ;; If this file exists, it can provide + ;; additional command-line options. + (call-with-input-file + "/tmp/installer-system-init-options" + read)) + (const '()))) + (install-command (append (list "guix" "system" "init" + "--fallback") + options + (list (%installer-configuration-file) + (%installer-target-dir))))) (mkdir-p (%installer-target-dir)) ;; We want to initialize user passwords but we don't want to store them in