summaryrefslogtreecommitdiff
path: root/gnu/installer/utils.scm
AgeCommit message (Collapse)Author
2020-06-09Revert "installer: utils: Dump command output to syslog when testing."Mathieu Othacehe
This reverts commit f73ed5579157a074093bae7a2ffb59a85412be0d. This was pushed by error, as this is not reviewed yet.
2020-06-09installer: utils: Dump command output to syslog when testing.Mathieu Othacehe
When debugging the installation tests, it can be very handy to be able to read "run-command" output, for instance when executing "guix system init". Introduce a new "invoke-with-log" procedure that is able to log a command standard and error outputs to the syslog. Use it, only when running the installation tests, to dump "run-command" output. * gnu/installer/utils.scm (open-pipe-with-stderr, invoke-with-log): New procedures, (invoke-log-port): new variable, (run-command): move to the end of the file and use invoke-with-log when running the installation tests.
2020-04-10gnu: installer: Fix issue with "Esperanto" locale.Mathieu Othacehe
According to glibc manual, locale are under the following form: language[_territory[.codeset]][@modifier] The esperanto locale "epo" does not have a territory. Modify run-command to take this into account. Reported by Alex Sassmannshausen here: https://lists.gnu.org/archive/html/guix-devel/2020-04/msg00192.html. * gnu/installer/utils.scm (run-command): Handle locale without territory such as "epo".
2020-03-05installer: Run commands without hopping through the shell.Ludovic Courtès
* gnu/installer/utils.scm (run-shell-command): Rename to... (run-command): Remove call to 'call-with-temporary-output-file' and hop through Bash. Expect COMMAND to be a list of strings rather than a string. * gnu/installer/final.scm (install-system): Turn INSTALL-COMMAND into a list of strings and pass it to 'run-command'. * gnu/installer/newt/page.scm (edit-file): Likewise.
2020-03-05installer: Implement a dialog on /var/guix/installer-socket.Ludovic Courtès
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-02-22installer: Log important bits to syslog.Ludovic Courtès
* gnu/installer.scm (installer-program): Log crashes with 'syslog'. * gnu/installer/parted.scm (luks-format-and-open, luks-close) (mount-user-partitions, umount-user-partitions): Add 'syslog' calls. * gnu/installer/steps.scm (run-installer-steps): Log the running step with 'syslog'. * gnu/installer/utils.scm (run-shell-command): Add calls to 'syslog'.
2020-02-22installer: Add 'syslog' macro to write to syslog.Ludovic Courtès
* gnu/installer/utils.scm (open-syslog-port, syslog-port): New procedures. (syslog): New macro.
2019-04-26installer: Take 'guix system init' exit code into account.Ludovic Courtès
This allows the installer to distinguish success from failure, and also ensures the shell that runs 'guix system init' exits upon completion. * gnu/installer/utils.scm (run-shell-command)[pause]: New procedure. Add "exec" before COMMAND in the script. Guard 'invoke' call and handle 'invoke-error?'. Add call to 'pause' on completion. * gnu/installer/final.scm (install-system): Remove 'false-if-exception'.
2019-04-23installer: Run 'guix system init' with the right locale.Ludovic Courtès
* 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-01-17installer: Add new utils.Mathieu Othacehe
* gnu/installer/utils.scm (nearest-exact-integer): New exported procedure, (read-percentage): ditto, (run-shell-command): ditto.
2019-01-17gnu: Add graphical installer support.Mathieu Othacehe
* 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.