<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/gnu/installer/newt/final.scm, branch master</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>installer: Add dry-run?</title>
<updated>2024-11-11T06:28:35+00:00</updated>
<author>
<name>Janneke Nieuwenhuizen</name>
<email>janneke@gnu.org</email>
</author>
<published>2024-10-15T21:27:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=9aeb8e3dee32254a19a68971f26e214c7b717e5b'/>
<id>9aeb8e3dee32254a19a68971f26e214c7b717e5b</id>
<content type='text'>
This allows running the installer without root privileges.  Do something like

    ./pre-inst-env guix repl
    ,use (guix)
    ,use (gnu installer)
    (installer-program #:dry-run? #t)
    ,build $1
    =&gt;
    "/gnu/store/...-installer-program"

and run

    /gnu/store/...-installer-program

* gnu/installer/newt.scm (locale-page): Add #:dry-run? parameter.
(keymap-page): Likewise.
* gnu/installer/newt/keymap.scm (run-keymap-page): Likewise.
* gnu/installer/steps.scm (run-installer-steps): Likewise.  Use it to skip
writing to socket.
* gnu/installer/newt/final.scm (run-final-page): Rename to...
(run-final-page-install): ...this.
(dry-run-final-page, run-final-page): New procedures.
* gnu/installer/parted.scm (bootloader-configuration): Cater for empty user
partitions.
* gnu/installer/utils.scm (dry-run-command): New procedure.
* gnu/installer.scm (compute-locale-step): Add #:dry-run? parameter.  Use it
to avoid actually applying locale.
(compute-keymap-step): Add dry-run? parameter.  Pass it to
keymap-page.
(installer-program): Add #:dry-run? parameter.  If #:true
avoid writing to /proc, use dry-run-command, skip sync and reboot, and pass
dry-run? to...
(installer-steps): ...here.  Add #:dry-run? parameter.  Use it to disable
skip network, substitutes, partitioning pages, and pass it to...
compute-locale-step, compute-keymap-step, and final-page.

Change-Id: I0ff4c3b0a0c69539af617c27ba37654beed44619
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows running the installer without root privileges.  Do something like

    ./pre-inst-env guix repl
    ,use (guix)
    ,use (gnu installer)
    (installer-program #:dry-run? #t)
    ,build $1
    =&gt;
    "/gnu/store/...-installer-program"

and run

    /gnu/store/...-installer-program

* gnu/installer/newt.scm (locale-page): Add #:dry-run? parameter.
(keymap-page): Likewise.
* gnu/installer/newt/keymap.scm (run-keymap-page): Likewise.
* gnu/installer/steps.scm (run-installer-steps): Likewise.  Use it to skip
writing to socket.
* gnu/installer/newt/final.scm (run-final-page): Rename to...
(run-final-page-install): ...this.
(dry-run-final-page, run-final-page): New procedures.
* gnu/installer/parted.scm (bootloader-configuration): Cater for empty user
partitions.
* gnu/installer/utils.scm (dry-run-command): New procedure.
* gnu/installer.scm (compute-locale-step): Add #:dry-run? parameter.  Use it
to avoid actually applying locale.
(compute-keymap-step): Add dry-run? parameter.  Pass it to
keymap-page.
(installer-program): Add #:dry-run? parameter.  If #:true
avoid writing to /proc, use dry-run-command, skip sync and reboot, and pass
dry-run? to...
(installer-steps): ...here.  Add #:dry-run? parameter.  Use it to disable
skip network, substitutes, partitioning pages, and pass it to...
compute-locale-step, compute-keymap-step, and final-page.

Change-Id: I0ff4c3b0a0c69539af617c27ba37654beed44619
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: Skip the backtrace page on user abort.</title>
<updated>2022-11-02T14:52:19+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>othacehe@gnu.org</email>
</author>
<published>2022-10-31T15:43:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=62a3756bd90c922c701e899a6c01c556d8e3c75a'/>
<id>62a3756bd90c922c701e899a6c01c556d8e3c75a</id>
<content type='text'>
When the user aborts the installation because a core dump is discovered or the
installation command failed, displaying the abort backtrace doesn't make much
sense. Hide it when the abort condition is &amp;user-abort-error and skip directly
to the dump page.

* gnu/installer/steps.scm (&amp;user-abort-error): New variable.
(user-abort-error?): New procedure.
* gnu/installer/newt/final.scm (run-install-failed-page): Raise a
user-abort-error.
* gnu/installer/newt/welcome.scm (run-welcome-page): Ditto.
* gnu/installer.scm (installer-program): Hide the backtrace page and directly
propose to dump the report when the a &amp;user-abort-error is raised.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the user aborts the installation because a core dump is discovered or the
installation command failed, displaying the abort backtrace doesn't make much
sense. Hide it when the abort condition is &amp;user-abort-error and skip directly
to the dump page.

* gnu/installer/steps.scm (&amp;user-abort-error): New variable.
(user-abort-error?): New procedure.
* gnu/installer/newt/final.scm (run-install-failed-page): Raise a
user-abort-error.
* gnu/installer/newt/welcome.scm (run-welcome-page): Ditto.
* gnu/installer.scm (installer-program): Hide the backtrace page and directly
propose to dump the report when the a &amp;user-abort-error is raised.
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: Propose the user to report a "guix system init" failure.</title>
<updated>2022-10-20T08:50:50+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>othacehe@gnu.org</email>
</author>
<published>2022-10-14T15:33:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=2a5c2a6184d65a1314fdf15bcfa5ddda5756ec18'/>
<id>2a5c2a6184d65a1314fdf15bcfa5ddda5756ec18</id>
<content type='text'>
* gnu/installer/newt/final.scm (run-install-failed-page): Add a "Report the
failure" button.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/installer/newt/final.scm (run-install-failed-page): Add a "Report the
failure" button.
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: Use named prompt to abort or break installer steps.</title>
<updated>2022-02-02T15:46:44+00:00</updated>
<author>
<name>Josselin Poiret</name>
<email>dev@jpoiret.xyz</email>
</author>
<published>2022-01-15T13:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=726d0bd2f36363392ba2fcefd6e5d4aeed27dc9e'/>
<id>726d0bd2f36363392ba2fcefd6e5d4aeed27dc9e</id>
<content type='text'>
* gnu/installer/steps.scm (run-installer-steps): Set up
'installer-step prompt.
* gnu/installer/newt/ethernet.scm (run-ethernet-page)
* gnu/installer/newt/final.scm (run-config-display-page,
run-install-failed-page)
* gnu/installer/newt/keymap.scm (run-layout-page, run-variant-page)
* gnu/installer/newt/locale.scm (run-language-page,
run-territory-page, run-codeset-page, run-modifier-page,
run-locale-page)
* gnu/installer/newt/network.scm (run-technology-page,
wait-service-online)
* gnu/installer/newt/page.scm (run-listbox-selection-page,
run-checkbox-tree-page)
* gnu/installer/newt/partition.scm (button-exit-action)
* gnu/installer/newt/services.scm (run-desktop-environments-cbt-page,
run-networking-cbt-page, run-other-services-cbt-page,
run-network-management-page)
* gnu/installer/newt/timezone.scm (run-timezone-page)
* gnu/installer/newt/user.scm (run-user-page)
* gnu/installer/newt/welcome.scm (run-menu-page)
* gnu/installer/newt/wifi.scm (run-wifi-page): Use the 'installer-step
prompt to abort.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/installer/steps.scm (run-installer-steps): Set up
'installer-step prompt.
* gnu/installer/newt/ethernet.scm (run-ethernet-page)
* gnu/installer/newt/final.scm (run-config-display-page,
run-install-failed-page)
* gnu/installer/newt/keymap.scm (run-layout-page, run-variant-page)
* gnu/installer/newt/locale.scm (run-language-page,
run-territory-page, run-codeset-page, run-modifier-page,
run-locale-page)
* gnu/installer/newt/network.scm (run-technology-page,
wait-service-online)
* gnu/installer/newt/page.scm (run-listbox-selection-page,
run-checkbox-tree-page)
* gnu/installer/newt/partition.scm (button-exit-action)
* gnu/installer/newt/services.scm (run-desktop-environments-cbt-page,
run-networking-cbt-page, run-other-services-cbt-page,
run-network-management-page)
* gnu/installer/newt/timezone.scm (run-timezone-page)
* gnu/installer/newt/user.scm (run-user-page)
* gnu/installer/newt/welcome.scm (run-menu-page)
* gnu/installer/newt/wifi.scm (run-wifi-page): Use the 'installer-step
prompt to abort.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: Use new installer-log-line everywhere.</title>
<updated>2022-02-02T15:46:43+00:00</updated>
<author>
<name>Josselin Poiret</name>
<email>dev@jpoiret.xyz</email>
</author>
<published>2022-01-15T13:49:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=4f2fd33b4f27f590ec2337daef339cf3e2337dab'/>
<id>4f2fd33b4f27f590ec2337daef339cf3e2337dab</id>
<content type='text'>
* gnu/installer.scm (installer-program)
* gnu/installer/final.scm (install-locale)
* gnu/installer/newt.scm (init)
* gnu/installer/newt/final.scm (run-final-page)
* gnu/installer/newt/page.scm (run-form-with-clients)
* gnu/installer/newt/partition.scm (run-partitioning-page)
* gnu/installer/parted.scm (eligible-devices, mkpart,
luks-format-and-open, luks-close, mount-user-partitions,
umount-user-partitions, free-parted):
* gnu/installer/steps.scm (run-installer-steps):
* gnu/installer/utils.scm (run-command, send-to-clients): Use it.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/installer.scm (installer-program)
* gnu/installer/final.scm (install-locale)
* gnu/installer/newt.scm (init)
* gnu/installer/newt/final.scm (run-final-page)
* gnu/installer/newt/page.scm (run-form-with-clients)
* gnu/installer/newt/partition.scm (run-partitioning-page)
* gnu/installer/parted.scm (eligible-devices, mkpart,
luks-format-and-open, luks-close, mount-user-partitions,
umount-user-partitions, free-parted):
* gnu/installer/steps.scm (run-installer-steps):
* gnu/installer/utils.scm (run-command, send-to-clients): Use it.

Signed-off-by: Mathieu Othacehe &lt;othacehe@gnu.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: Limit listbox height.</title>
<updated>2020-11-07T12:19:25+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>othacehe@gnu.org</email>
</author>
<published>2020-11-06T09:59:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=8338d414b361e4fb961221642c1064e9dc89ba65'/>
<id>8338d414b361e4fb961221642c1064e9dc89ba65</id>
<content type='text'>
Fixes: &lt;https://issues.guix.gnu.org/44428&gt;.

* gnu/installer/newt.scm (init): Print screen size.
* gnu/installer/newt/page.scm (default-listbox-height): New variable.
(run-listbox-selection-page): Use it.
* gnu/installer/newt/wifi.scm (wifi-listbox-height): Ditto.
* gnu/installer/newt/network.scm (run-technology-page): Set the maximum
listbox height to 5.
* gnu/installer/newt/ethernet.scm (run-ethernet-page): Ditto.
* gnu/installer/newt/final.scm (run-config-display-page): Change listbox
height.
* gnu/installer/newt/partition.scm (run-disk-page): Ditto.
* gnu/installer/newt/welcome.scm (display-logo?): New procedure.
(run-menu-page): Use it.
* gnu/installer/steps.scm (%configuration-file-width): Remove it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes: &lt;https://issues.guix.gnu.org/44428&gt;.

* gnu/installer/newt.scm (init): Print screen size.
* gnu/installer/newt/page.scm (default-listbox-height): New variable.
(run-listbox-selection-page): Use it.
* gnu/installer/newt/wifi.scm (wifi-listbox-height): Ditto.
* gnu/installer/newt/network.scm (run-technology-page): Set the maximum
listbox height to 5.
* gnu/installer/newt/ethernet.scm (run-ethernet-page): Ditto.
* gnu/installer/newt/final.scm (run-config-display-page): Change listbox
height.
* gnu/installer/newt/partition.scm (run-disk-page): Ditto.
* gnu/installer/newt/welcome.scm (display-logo?): New procedure.
(run-menu-page): Use it.
* gnu/installer/steps.scm (%configuration-file-width): Remove it.
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: Use UUIDs in the 'swap-devices' field.</title>
<updated>2020-10-30T00:14:21+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-10-23T09:31:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=1c6d98533153bc8e0e36236e7fbcf1eb5e178d26'/>
<id>1c6d98533153bc8e0e36236e7fbcf1eb5e178d26</id>
<content type='text'>
Note: This change requires an updated 'guix' package that contains
Linux-swap support in (gnu build file-systems).

* gnu/installer/parted.scm (user-partitions-&gt;configuration): Use UUIDs
in the 'swap-devices' field.
* gnu/installer/newt/final.scm (run-final-page)[wait-for-clients]: New
procedure.   Use it.
* gnu/installer/tests.scm (choose-partitioning): Wait for
'starting-final-step' message and move configuration file dialog
handling to...
(conclude-installation): ... here.  Send over PORT the reply
corresponding to 'starting-final-step'.
* gnu/tests/install.scm (gui-test-program): When ENCRYPTED? is false,
invoke 'swaplabel' in the marionette.
(installation-target-os-for-gui-tests): When ENCRYPTED? is false, except
a fixed UUID.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note: This change requires an updated 'guix' package that contains
Linux-swap support in (gnu build file-systems).

* gnu/installer/parted.scm (user-partitions-&gt;configuration): Use UUIDs
in the 'swap-devices' field.
* gnu/installer/newt/final.scm (run-final-page)[wait-for-clients]: New
procedure.   Use it.
* gnu/installer/tests.scm (choose-partitioning): Wait for
'starting-final-step' message and move configuration file dialog
handling to...
(conclude-installation): ... here.  Send over PORT the reply
corresponding to 'starting-final-step'.
* gnu/tests/install.scm (gui-test-program): When ENCRYPTED? is false,
invoke 'swaplabel' in the marionette.
(installation-target-os-for-gui-tests): When ENCRYPTED? is false, except
a fixed UUID.
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: Run the installation inside a container.</title>
<updated>2020-09-02T15:05:23+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>othacehe@gnu.org</email>
</author>
<published>2020-08-13T12:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=8ce6f4dc2879919c12bc76a2f4b01200af97e019'/>
<id>8ce6f4dc2879919c12bc76a2f4b01200af97e019</id>
<content type='text'>
When the store overlay is mounted, other processes such as kmscon, udev
and guix-daemon may open files from the store, preventing the
underlying install support from being umounted. See:
https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00161.html.

To avoid this situation, mount the store overlay inside a container,
and run the installation from within that container.

* gnu/build/shepherd.scm (fork+exec-command/container): New procedure.
* gnu/services/base.scm (guix-shepherd-service): Support an optional PID
argument passed to the "start" method. If that argument is passed, ensure that
guix-daemon enters the given PID MNT namespace by using
fork+exec-command/container procedure.
* gnu/installer/final.scm (umount-cow-store): Remove it,
(install-system): run the installation from within a container.
* gnu/installer/newt/final.scm (run-install-shell): Remove the display hack.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the store overlay is mounted, other processes such as kmscon, udev
and guix-daemon may open files from the store, preventing the
underlying install support from being umounted. See:
https://lists.gnu.org/archive/html/guix-devel/2018-12/msg00161.html.

To avoid this situation, mount the store overlay inside a container,
and run the installation from within that container.

* gnu/build/shepherd.scm (fork+exec-command/container): New procedure.
* gnu/services/base.scm (guix-shepherd-service): Support an optional PID
argument passed to the "start" method. If that argument is passed, ensure that
guix-daemon enters the given PID MNT namespace by using
fork+exec-command/container procedure.
* gnu/installer/final.scm (umount-cow-store): Remove it,
(install-system): run the installation from within a container.
* gnu/installer/newt/final.scm (run-install-shell): Remove the display hack.
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: final: Make sure 'bold' font files are loaded.</title>
<updated>2020-06-14T15:42:36+00:00</updated>
<author>
<name>Mathieu Othacehe</name>
<email>othacehe@gnu.org</email>
</author>
<published>2020-06-14T11:10:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=876a8d987085b8c64f32c8a320e4219575af285c'/>
<id>876a8d987085b8c64f32c8a320e4219575af285c</id>
<content type='text'>
* gnu/installer/newt/final.scm (run-install-shell): Force kmscon to open
'bold' font files, before the cow-store overlay is mounted.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/installer/newt/final.scm (run-install-shell): Force kmscon to open
'bold' font files, before the cow-store overlay is mounted.
</pre>
</div>
</content>
</entry>
<entry>
<title>installer: Implement a dialog on /var/guix/installer-socket.</title>
<updated>2020-03-05T22:40:22+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2020-01-22T21:57:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=63b8c089c1596cd3e814ac13e1a8b3fa45bb2b54'/>
<id>63b8c089c1596cd3e814ac13e1a8b3fa45bb2b54</id>
<content type='text'>
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-&gt;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-&gt;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.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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-&gt;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-&gt;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.
</pre>
</div>
</content>
</entry>
</feed>
