Commit Graph

21 Commits

Author SHA1 Message Date
Mathieu Othacehe d52111450a
installer: Adapt to Guile-newt revision 2.
* gnu/installer/newt/page.scm (run-input-page): Remove component argument that
  is not longer passed to the procedure passed to 'add-component-callback',
 (run-listbox-selection-page): ditto.
 * gnu/installer/newt/user.scm (run-user-add-page): Ditto,
 (run-user-add-page): ditto.
2020-04-06 15:06:03 +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
Ludovic Courtès 6bd072ff66
installer: Make "TRANSLATORS" comment visible.
* gnu/installer/newt/user.scm (run-root-password-page): Move
"TRANSLATORS" comment right above 'G_' call.
2020-01-23 11:26:54 +01:00
Tobias Geerinckx-Rice 55c43108ac
installer: Show, don't Hide.
* gnu/installer/newt/user.scm (run-user-add-page): Change the input
visibility checkbox's text to ‘Show’, and default to unchecked.
* gnu/installer/newt/page.scm (run-input-page): Likewise.
Rename INPUT-HIDE-CHECKBOX? argument to INPUT-VISIBILITY-CHECKBOX?.
2019-08-26 15:56:32 +02:00
Ludovic Courtès ef250707d3
installer: Allow for arbitrary long passphrases and passwords.
Fixes <https://bugs.gnu.org/35716>.
Reported by sirmacik <sirmacik@wioo.waw.pl>.

* gnu/installer/newt/page.scm (run-input-page): Add FLAG-SCROLL to
INPUT-FLAGS*.
* gnu/installer/newt/user.scm (run-user-add-page): Add FLAG-SCROLL to
ENTRY-PASSWORD.
2019-05-14 12:11:04 +02:00
Ludovic Courtès fb98e430d4
installer: Add missing 'G_' call.
* gnu/installer/newt/user.scm (run-user-page): Add 'G_' call for "User
creation".
2019-05-09 12:11:36 +02:00
Ludovic Courtès 91936f153a
installer: "Exit" button in user page actually exits.
Fixes <https://bugs.gnu.org/35607>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/installer/newt/user.scm (run-user-page): Add 'cond' clause for
ARGUMENT = EXIT-BUTTON.
2019-05-07 12:18:44 +02:00
Mathieu Othacehe 445bd4d5e5
installer: Add password 'hide' checkbox.
* gnu/installer/newt/page.scm (run-input-page)[input-hide-checkbox?]: New
parameter adding a checkbox to toggle password hiding. By default, the
checkbox is active and the password is hence hided.
* gnu/installer/newt/partition.scm (prompt-luks-passwords): Enable the
previous parameter on both password input pages.
* gnu/installer/newt/user.scm (run-root-password-page): Enable the previous
parameter,
(confirm-password): ditto,
(run-user-add-page): add a checkbox to toggle password hiding.
2019-05-07 09:25:45 +02:00
Ludovic Courtès 04f4bdcd70
installer: Widen user dialog.
* gnu/installer/newt/user.scm (run-user-add-page)[pad-label]: Increase
2nd argument to 25.
[entry-width]: Increase to 35.
2019-05-06 23:21:32 +02:00
Ludovic Courtès ada4aeb068
installer: Fix handling of user password mismatches.
Previously, if we had a password mismatch, the 'password' field would
end up containing a <user> record instead of the actual password.

* gnu/installer/newt/user.scm (confirm-password): Make TRY-AGAIN
optional and adjust docstring.
(run-user-add-page): Move 'confirm-password' call one level higher.
2019-04-28 22:57:07 +02:00
Ludovic Courtès 0e8e963d73
installer: User accounts can now have a "real name."
* gnu/installer/newt/user.scm (run-user-add-page): Add #:real-name.  Add
a label and entry for the real name and initialize the 'real-name' field
of the <user> record.
* gnu/installer/final.scm (create-user-database): Set the 'comment'
field of the <user-account> record.
2019-04-28 22:57:07 +02:00
Ludovic Courtès 187122b902
installer: Ask for confirmation of the user passwords.
* gnu/installer/newt/user.scm (run-user-add-page): Add #:name and
 #:home-directory and honor them.  Add call to 'confirm-password'.
2019-04-25 12:23:54 +02:00
Ludovic Courtès 8f2b7e3cb4
installer: Ask for confirmation of the root password.
* gnu/installer/newt/user.scm (confirm-password): New procedure.
(run-root-password-page): Add call to 'confirm-password'.
2019-04-25 12:23:54 +02:00
Ludovic Courtès e7c7b73320
installer: Preserve order of user accounts.
* gnu/installer/newt/user.scm (run-user-page): Add call to 'reverse'.
2019-04-25 00:45:35 +02:00
Ludovic Courtès 91a7c4998f
installer: Ask for the root account password.
Fixes <https://bugs.gnu.org/35399>.

* gnu/installer/newt/user.scm (run-root-password-page): New procedure.
* gnu/installer/user.scm (users->configuration): Filter out the "root"
account.
* gnu/installer/final.scm (create-user-database): Set 'uid' field in
'user-account' form.
2019-04-25 00:45:35 +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
Mathieu Othacehe ebb36deccc
installer: Rename "Ok" buttons to "OK".
* gnu/installer/newt/page.scm: s/Ok/OK/.
* gnu/installer/newt/partition.scm: Ditto.
* gnu/installer/newt/user.scm: Ditto.
2019-01-17 14:04:27 +01:00
Mathieu Othacehe d700d131be
installer: Make sure every sentence is dot terminated.
gnu/installer/newt/hostname.scm: Finish sentences by a dot.
gnu/installer/newt/network.scm: Ditto.
gnu/installer/newt/page.scm: Ditto.
gnu/installer/newt/partition.scm: Ditto.
gnu/installer/newt/user.scm: Ditto.
gnu/installer/newt/wifi.scm: Ditto.
2019-01-17 14:04:25 +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 35e99a23b5
installer: Remove group selection in user page.
Assume that the user's group is always "users".

* gnu/installer/newt/user.scm (run-user-add-page): Remove group fields,
(run-user-page): ditto.
2019-01-17 14:04:24 +01:00
Mathieu Othacehe d0f3a672dc
gnu: Add graphical installer support.
* configure.ac: Require that guile-newt is available.
* gnu/installer.scm: New file.
* gnu/installer/aux-files/logo.txt: New file.
* gnu/installer/build-installer.scm: New file.
* gnu/installer/connman.scm: New file.
* gnu/installer/keymap.scm: New file.
* gnu/installer/locale.scm: New file.
* gnu/installer/newt.scm: New file.
* gnu/installer/newt/ethernet.scm: New file.
* gnu/installer/newt/hostname.scm: New file.
* gnu/installer/newt/keymap.scm: New file.
* gnu/installer/newt/locale.scm: New file.
* gnu/installer/newt/menu.scm: New file.
* gnu/installer/newt/network.scm: New file.
* gnu/installer/newt/page.scm: New file.
* gnu/installer/newt/timezone.scm: New file.
* gnu/installer/newt/user.scm: New file.
* gnu/installer/newt/utils.scm: New file.
* gnu/installer/newt/welcome.scm: New file.
* gnu/installer/newt/wifi.scm: New file.
* gnu/installer/steps.scm: New file.
* gnu/installer/timezone.scm: New file.
* gnu/installer/utils.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add previous files.
* gnu/system.scm: Export %root-account.
* gnu/system/install.scm (%installation-services): Use kmscon instead of linux
VT for all tty.
(installation-os)[users]: Add the graphical installer as shell of the root
account.
[packages]: Add font related packages.
* po/guix/POTFILES.in: Add installer files.
2019-01-17 14:04:20 +01:00