Commit graph

11 commits

Author SHA1 Message Date
Mathieu Othacehe 876a8d9870
installer: final: Make sure 'bold' font files are loaded.
* gnu/installer/newt/final.scm (run-install-shell): Force kmscon to open
'bold' font files, before the cow-store overlay is mounted.
2020-06-14 17:42:36 +02:00
Ludovic Courtès 63b8c089c1
installer: Implement a dialog on /var/guix/installer-socket.
This will allow us to automate testing of the installer.

* gnu/installer/utils.scm (%client-socket-file)
(current-server-socket, current-clients): New variables.
(open-server-socket, call-with-server-socket): New procedure.
(with-server-socket): New macro.
(run-shell-command): Add call to 'send-to-clients'.  Select on both
current-input-port and current-clients.
* gnu/installer/steps.scm (run-installer-steps): Wrap 'call-with-prompt'
in 'with-socket-server'.  Call 'sigaction' for SIGPIPE.
* gnu/installer/newt/page.scm (watch-clients!, close-port-and-reuse-fd)
(run-form-with-clients, send-to-clients): New procedures.
(draw-info-page): Add call to 'run-form-with-clients'.
(run-input-page): Likewise.  Handle EXIT-REASON equal to 'exit-fd-ready.
(run-confirmation-page): Likewise.
(run-listbox-selection-page): Likewise.  Define 'choice->item' and use it.
(run-checkbox-tree-page): Likewise.
(run-file-textbox-page): Add call to 'run-form-with-clients'.  Handle
'exit-fd-ready'.
* gnu/installer/newt/partition.scm (run-disk-page): Pass
 #:client-callback-procedure to 'run-listbox-selection-page'.
* gnu/installer/newt/user.scm (run-user-page): Call
'run-form-with-clients'.  Handle 'exit-fd-ready'.
* gnu/installer/newt/welcome.scm (run-menu-page): Define
'choice->item' and use it.  Call 'run-form-with-clients'.
* gnu/installer/newt/final.scm (run-install-success-page)
(run-install-failed-page): When (current-clients) is non-empty, call
'send-to-clients' without displaying a choice window.
2020-03-05 23:40:22 +01:00
Mathieu Othacehe d008352bfb
installer: Fix installer restart dialog.
* gnu/installer/newt/final.scm (run-install-failed-page): Propose between
installer resume or restart. Do actually resume the installation by raising an
&installer-step-abort condition if "Resume" button is pressed. Otherwise, keep
going as the installer will be restarted by login.
* gnu/installer.scm (installer-program): Remove the associated TODO comment.
2020-02-12 10:52:17 +01:00
Ludovic Courtès 9ced0f376b
installer: Add an "Edit" button on the final page.
Fixes <https://bugs.gnu.org/36885>.
Reported by <lukasbf@tutanota.com>.

* gnu/installer/newt/page.scm (edit-file): New procedure.
(run-file-textbox-page): Add #:edit-button? and #:editor-locale
parameters.  Remove 'file-text' and add 'edit-button', and add it
to the horizontal stacked grid when EXIT-BUTTON? is true.  Wrap
body in 'loop'.  Handle case where ARGUMENT is EDIT-BUTTON by calling
'loop'.
* gnu/installer/newt/final.scm (run-config-display-page): Add #:locale
parameter.  Pass #:edit-button? and #:editor-locale to
'run-file-textbox-page'.
(run-final-page): Pass LOCALE to 'run-config-display-page'.
2020-01-12 23:26:39 +01:00
Ludovic Courtès d779de1817
installer: Tell the user where the config file is.
* gnu/installer/newt/final.scm (strip-prefix): New procedure.
(run-config-display-page): Add a sentence showing where the config file
is stored.
2019-04-28 22:57:08 +02:00
Ludovic Courtès 98f035482f
installer: Actually reboot when the user presses "Reboot."
* gnu/installer/newt/final.scm (run-install-success-page): Return
'success.
* gnu/installer.scm (installer-program): Check the result of the 'final
step and reboot upon success.
2019-04-26 14:19:36 +02:00
Ludovic Courtès 898677ed17
installer: Ask for user password and initialize /etc/shadow.
Partly fixes <https://bugs.gnu.org/35399>.

* gnu/installer/user.scm (<user>)[password]: New field.
* gnu/installer/final.scm (%seed): New variable.
(integer->alphanumeric-char, random-string)
(create-user-database): New procedures.
(install-system): Call 'create-user-database'.
* gnu/installer/newt/final.scm (run-install-shell): Add #:users and pass
it to 'install-system'.
(run-final-page): Pass #:users to 'run-install-shell'.
* gnu/installer/newt/user.scm (run-user-add-page): Add password entry.
Pass its result as the 'password' field of <user>.
2019-04-25 00:45:34 +02:00
Ludovic Courtès 7611074f67
installer: Run 'guix system init' with the right locale.
* gnu/installer/utils.scm (run-shell-command): Add #:locale and honor it.
* gnu/installer/newt/final.scm (run-install-shell): Add 'locale'
parameter; pass it to 'install-system'.
(run-final-page): Obtain locale from RESULT; pass it to 'run-install-shell'.
* gnu/installer/final.scm (install-system): Add 'locale' parameter; pass
it to 'run-shell-command'.
2019-04-23 00:34:47 +02:00
Ludovic Courtès 938ee975af
installer: Adjust messages on the final page.
* gnu/installer/newt/final.scm (run-config-display-page)
(run-install-success-page, run-install-failed-page): Adjust messages.
2019-01-17 14:04:28 +01:00
Mathieu Othacehe 7d812901da
installer: Turn "Cancel" buttons into "Exit" buttons.
This change and previous ones were,
Suggested-by: Thorsten Wilms <t_w_@freenet.de>
here: https://lists.gnu.org/archive/html/guix-devel/2018-11/msg00330.html

gnu/installer/newt/ethernet.scm: Turn cancel into exit.
gnu/installer/newt/final.scm: Ditto.
gnu/installer/newt/keymap.scm: Ditto.
gnu/installer/newt/locale.scm: Ditto.
gnu/installer/newt/network.scm: Ditto.
gnu/installer/newt/page.scm: Ditto.
gnu/installer/newt/partition.scm: Ditto.
gnu/installer/newt/services.scm: Ditto.
gnu/installer/newt/timezone.scm: Ditto.
gnu/installer/newt/user.scm: Ditto.
gnu/installer/newt/wifi.scm: Ditto.
2019-01-17 14:04:25 +01:00
Mathieu Othacehe dc5f3275ec
installer: Add configuration formatter.
* gnu/installer.scm (installer-steps): Add configuration-formatter procedures.
* gnu/installer/final.scm: New file.
* gnu/installer/locale.scm (locale->configuration): New exported procedure.
* gnu/installer/newt.scm (newt-installer): Add final page.
* gnu/installer/newt/final.scm: New file.
* gnu/installer/record.scm (installer): Add final-page field.
* gnu/installer/timezone.scm (posix-tz->configuration): New exported
procedure.
* gnu/installer/steps.scm (installer-step): Rename configuration-proc field to
configuration-formatter.
(%installer-configuration-file): New exported parameter,
(%installer-target-dir): ditto,
(%configuration-file-width): ditto,
(format-configuration): new exported procedure,
(configuration->file): new exported procedure.
2019-01-17 14:04:22 +01:00