[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#53063] [PATCH wip-harden-installer 09/14] installer: Use the comman
From: |
Josselin Poiret |
Subject: |
[bug#53063] [PATCH wip-harden-installer 09/14] installer: Use the command capturing facility for guix init. |
Date: |
Thu, 6 Jan 2022 23:48:07 +0100 |
* gnu/installer/newt/final.scm (run-install-shell): Remove procedure,
as run-command-in-installer now takes care of everything.
(run-final-page): Directly use install-system.
* gnu/installer/final.scm (install-system): Restore PATH inside the
container, and use run-command-in-installer.
---
gnu/installer/final.scm | 17 +++--------------
gnu/installer/newt/final.scm | 10 +---------
2 files changed, 4 insertions(+), 23 deletions(-)
diff --git a/gnu/installer/final.scm b/gnu/installer/final.scm
index fbfac1f692..ba39dad354 100644
--- a/gnu/installer/final.scm
+++ b/gnu/installer/final.scm
@@ -169,6 +169,7 @@ (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"))
+ (path (getenv "PATH"))
(ret #f))
(mkdir-p (%installer-target-dir))
@@ -205,20 +206,8 @@ (define (assert-exit x)
(stop-service 'guix-daemon)
(start-service 'guix-daemon (list (number->string (getpid))))
- (setvbuf (current-output-port) 'none)
- (setvbuf (current-error-port) 'none)
-
- ;; If there are any connected clients, assume that we are running
- ;; installation tests. In that case, dump the standard and error
- ;; outputs to syslog.
- (set! ret
- (if (not (null? (current-clients)))
- (with-output-to-file "/dev/console"
- (lambda ()
- (with-error-to-file "/dev/console"
- (lambda ()
- (run-command install-command)))))
- (run-command install-command))))
+ (setenv "PATH" path)
+ (set! ret (apply (run-command-in-installer) install-command)))
(lambda ()
;; Restart guix-daemon so that it does no keep the MNT namespace
;; alive.
diff --git a/gnu/installer/newt/final.scm b/gnu/installer/newt/final.scm
index efe422f4f4..07e8cf3864 100644
--- a/gnu/installer/newt/final.scm
+++ b/gnu/installer/newt/final.scm
@@ -98,14 +98,6 @@ (define (run-install-failed-page)
(send-to-clients '(installation-failure))
#t)))
-(define* (run-install-shell locale
- #:key (users '()))
- (clear-screen)
- (newt-suspend)
- (let ((install-ok? (install-system locale #:users users)))
- (newt-resume)
- install-ok?))
-
(define (run-final-page result prev-steps)
(define (wait-for-clients)
(unless (null? (current-clients))
@@ -129,7 +121,7 @@ (define (wait-for-clients)
user-partitions
(configuration->file configuration)
(run-config-display-page #:locale locale)
- (run-install-shell locale #:users users))))
+ (install-system locale #:users users))))
(if install-ok?
(run-install-success-page)
(run-install-failed-page))))
--
2.34.0
- [bug#53063] [PATCH v2 wip-harden-installer 10/18] installer: Raise condition when mklabel fails., (continued)
- [bug#53063] [PATCH v2 wip-harden-installer 10/18] installer: Raise condition when mklabel fails., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 11/18] installer: Fix run-file-textbox-page when edit-button is #f., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 14/18] installer: Use named prompt to abort or break installer steps., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 15/18] installer: Add error page when running external commands., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 18/18] installer: Make dump archive creation optional and selective., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 01/18] installer: Use define instead of let at top-level., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 16/18] installer: Use dynamic-wind to setup installer., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH v2 wip-harden-installer 17/18] installer: Turn passwords into opaque records., Josselin Poiret, 2022/01/15
- [bug#53063] [PATCH wip-harden-installer 00/14] General improvements to the installer, Mathieu Othacehe, 2022/01/17
- [bug#53063] [PATCH wip-harden-installer 10/14] installer: Raise condition when mklabel fails., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 09/14] installer: Use the command capturing facility for guix init.,
Josselin Poiret <=
- [bug#53063] [PATCH wip-harden-installer 12/14] installer: Replace run-command by invoke in newt/page.scm., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 11/14] installer: Fix run-file-textbox-page when edit-button is #f., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 14/14] installer: Add confirmation page when running external commands., Josselin Poiret, 2022/01/06
- [bug#53063] [PATCH wip-harden-installer 13/14] installer: Use named prompt to abort or break installer steps., Josselin Poiret, 2022/01/06