mbox series

[bug#53063,v2,wip-harden-installer,00/18] General improvements to the installer

Message ID 20220115135011.5817-1-dev@jpoiret.xyz
Headers show
Series General improvements to the installer | expand

Message

Josselin Poiret Jan. 15, 2022, 1:49 p.m. UTC
Hello again Mathieu and Ludo,

Here is a v2 that should follow the suggestions:  the installer now
only shows command output and status when the command fails, so that
shouldn't break the installer tests.

The internal mechanism to capture a command's output and error was
reworked along Ludo's advice, and now uses open-pipe* instead (with a
small workaround to avoid
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=52835).

The second to last commit makes password objects opaque, so that
installer dumps don't accidentally contain them in cleartext.

Finally, the last commit (a big one) lets users choose whether to dump
or not from the error page, and from there they can choose and edit
the files (using nano) they would like to include in the dump archive.
It expands upon the initial work of Mathieu in 84d0d8ad3d.  For now,
you can choose to include the installer backtrace, the installer
result alist, and the syslog and dmesg.  We could also include a more
stripped down installer-log that the new logging facility produces,
but I think that it should be enough for now.

Things work smoothly on my end, but the installer test
"gui-installed-os" seems to fail while running `guix system init`,
when building linux-libre, but it seems unrelated to this patchset.

Best,
Josselin

Josselin Poiret (18):
  installer: Use define instead of let at top-level.
  installer: Generalize logging facility.
  installer: Use new installer-log-line everywhere.
  installer: Un-export syslog syntax.
  installer: Keep PATH inside the install container.
  installer: Remove specific logging code.
  installer: Capture external commands output.
  installer: Add installer-specific run command process.
  installer: Use run-command-in-installer in (gnu installer parted).
  installer: Raise condition when mklabel fails.
  installer: Fix run-file-textbox-page when edit-button is #f.
  installer: Replace run-command by invoke in newt/page.scm.
  installer: Add nano to PATH.
  installer: Use named prompt to abort or break installer steps.
  installer: Add error page when running external commands.
  installer: Use dynamic-wind to setup installer.
  installer: Turn passwords into opaque records.
  installer: Make dump archive creation optional and selective.

 gnu/installer.scm                |  95 ++++++++++--------
 gnu/installer/dump.scm           |  67 ++++++++-----
 gnu/installer/final.scm          |  28 +++---
 gnu/installer/newt.scm           | 126 +++++++++++++++++++-----
 gnu/installer/newt/dump.scm      |  36 -------
 gnu/installer/newt/ethernet.scm  |   8 +-
 gnu/installer/newt/final.scm     |  12 +--
 gnu/installer/newt/keymap.scm    |   8 +-
 gnu/installer/newt/locale.scm    |  25 ++---
 gnu/installer/newt/network.scm   |  16 +--
 gnu/installer/newt/page.scm      | 163 +++++++++++++++++++++++++++++--
 gnu/installer/newt/partition.scm |  10 +-
 gnu/installer/newt/services.scm  |  16 +--
 gnu/installer/newt/timezone.scm  |   4 +-
 gnu/installer/newt/user.scm      |  11 +--
 gnu/installer/newt/welcome.scm   |   2 +-
 gnu/installer/newt/wifi.scm      |   4 +-
 gnu/installer/parted.scm         | 104 +++++++++-----------
 gnu/installer/record.scm         |  12 ++-
 gnu/installer/steps.scm          | 127 +++++++++++-------------
 gnu/installer/user.scm           |  18 +++-
 gnu/installer/utils.scm          | 158 +++++++++++++++++++++++++-----
 gnu/local.mk                     |   1 -
 23 files changed, 656 insertions(+), 395 deletions(-)
 delete mode 100644 gnu/installer/newt/dump.scm