2018-11-16 12:43:55 +01:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2020-03-30 12:24:56 +02:00
|
|
|
;;; Copyright © 2018, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
2024-10-21 08:00:56 +02:00
|
|
|
;;; Copyright © 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
|
2018-11-16 12:43:55 +01:00
|
|
|
;;;
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu installer newt)
|
2018-11-24 04:25:03 +01:00
|
|
|
#:use-module (gnu installer record)
|
2018-12-06 03:11:04 +01:00
|
|
|
#:use-module (gnu installer utils)
|
2022-01-15 14:50:11 +01:00
|
|
|
#:use-module (gnu installer dump)
|
2018-11-24 04:25:03 +01:00
|
|
|
#:use-module (gnu installer newt ethernet)
|
2018-12-05 06:30:16 +01:00
|
|
|
#:use-module (gnu installer newt final)
|
2020-04-08 10:16:25 +02:00
|
|
|
#:use-module (gnu installer newt parameters)
|
2018-11-24 04:25:03 +01:00
|
|
|
#:use-module (gnu installer newt hostname)
|
installer: Add "Kernel" page to select the Hurd.
This adds a "Kernel" page to the installer with the option to (cross-) install
the Hurd, if applicable (only available on x86 machines for now).
* gnu/installer/newt.scm (kernel-page): New procedure.
(newt-installer)[kernel-page]: New field.
* gnu/installer/kernel.scm,
gnu/installer/newt/kernel.scm: New files.
* gnu/local.mk (INSTALLER_MODULES): Add them.
* gnu/installer.scm (installer-steps): Use them to select kernel if
applicable.
* gnu/installer/newt/partition.scm (run-label-page): Default to "msdos" when
instaling the Hurd.
(run-fs-type-page): Add ext2 for the hurd.
(run-partitioning-page-partition): Remove `entire-encrypted' option when
installing the Hurd.
* gnu/installer/services.scm (system-services->configuration): Cater for the
Hurd with %base-services/hurd, and with %base-packages/hurd that must always
be set.
(%system-services): Change to procedure. When installing the the Hurd, do not
recommend `ntp-service-type' and USE `openssh-sans-x' package for
`openssh-service-type'.
(system-service-none): New variable.
* gnu/installer/newt/services.scm (run-network-management-page): Include it
when installing the Hurd.
(run-desktop-environments-cbt-page): When installing the Hurd, recommend to
not select any desktop enviroment. Update users.
* gnu/installer/parted.scm (efi-installation?): Return #f when installing for
the Hurd.
(create-ext2-file-system): New procedure.
(user-fs-type-name, user-fs-type->mount-type, partition-filesystem-user-type,
format-user-partitions): Support `ext2'.
(<user-partition> partition->user-partition): Use `ext2' when installing the
Hurd.
(auto-partition!): Likewise. No swap partition when installing the Hurd.
* gnu/installer/final.scm (install-system): Cater for cross installation of
the Hurd.
(bootloader-configuration): Use `grub-minimal-bootloader' when installing the
Hurd.
(user-partition-missing-modules): Cater for empty user-partitions.
(initrd-configuration, user-partitions->configuration): Cater for the Hurd.
* gnu/installer/steps.scm (format-configuration,
configuration->file): Cater for the Hurd.
* gnu/system/hurd.scm (%desktop-services/hurd): New variable.
* gnu/installer/tests.scm (choose-kernel): New procedure.
* gnu/tests/install.scm (gui-test-program): Use it.
Change-Id: Ifafb27b8a2f933944c77223a27ec151757237e36
2024-10-20 15:13:16 +02:00
|
|
|
#:use-module (gnu installer newt kernel)
|
2018-11-24 04:25:03 +01:00
|
|
|
#:use-module (gnu installer newt keymap)
|
|
|
|
#:use-module (gnu installer newt locale)
|
|
|
|
#:use-module (gnu installer newt menu)
|
|
|
|
#:use-module (gnu installer newt network)
|
2018-12-06 03:11:04 +01:00
|
|
|
#:use-module (gnu installer newt page)
|
2018-12-05 06:57:28 +01:00
|
|
|
#:use-module (gnu installer newt partition)
|
2018-12-05 06:41:48 +01:00
|
|
|
#:use-module (gnu installer newt services)
|
2020-12-04 11:33:16 +01:00
|
|
|
#:use-module (gnu installer newt substitutes)
|
2018-11-24 04:25:03 +01:00
|
|
|
#:use-module (gnu installer newt timezone)
|
|
|
|
#:use-module (gnu installer newt user)
|
|
|
|
#:use-module (gnu installer newt utils)
|
|
|
|
#:use-module (gnu installer newt welcome)
|
|
|
|
#:use-module (gnu installer newt wifi)
|
2018-12-06 03:11:04 +01:00
|
|
|
#:use-module (guix config)
|
2018-11-16 12:43:55 +01:00
|
|
|
#:use-module (guix discovery)
|
2018-11-24 04:25:03 +01:00
|
|
|
#:use-module (guix i18n)
|
2022-01-15 14:50:11 +01:00
|
|
|
#:use-module (srfi srfi-1)
|
2018-11-24 04:25:03 +01:00
|
|
|
#:use-module (srfi srfi-26)
|
2022-01-15 14:50:08 +01:00
|
|
|
#:use-module (srfi srfi-34)
|
|
|
|
#:use-module (srfi srfi-35)
|
2022-01-15 14:50:11 +01:00
|
|
|
#:use-module (ice-9 ftw)
|
|
|
|
#:use-module (ice-9 match)
|
2018-11-24 04:25:03 +01:00
|
|
|
#:use-module (newt)
|
2018-11-16 12:43:55 +01:00
|
|
|
#:export (newt-installer))
|
|
|
|
|
2018-11-24 04:25:03 +01:00
|
|
|
(define (init)
|
|
|
|
(newt-init)
|
|
|
|
(clear-screen)
|
2020-03-30 12:24:56 +02:00
|
|
|
(set-screen-size!)
|
2022-01-15 14:49:56 +01:00
|
|
|
(installer-log-line "Display is ~ax~a." (screen-columns) (screen-rows))
|
2020-03-30 12:24:56 +02:00
|
|
|
(push-help-line
|
2020-04-08 10:16:25 +02:00
|
|
|
(format #f (G_ "Press <F1> for installation parameters."))))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2018-11-24 04:25:03 +01:00
|
|
|
(define (exit)
|
2018-12-08 02:37:56 +01:00
|
|
|
(newt-finish)
|
|
|
|
(clear-screen))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2022-01-15 14:50:11 +01:00
|
|
|
(define (exit-error error)
|
2022-10-23 15:34:50 +02:00
|
|
|
;; Newt may be suspended in the context of the "install-system"
|
|
|
|
;; procedure. Resume it unconditionnally.
|
|
|
|
(newt-resume)
|
2018-12-06 03:11:04 +01:00
|
|
|
(newt-set-color COLORSET-ROOT "white" "red")
|
2022-01-15 14:50:11 +01:00
|
|
|
(define action
|
|
|
|
(run-textbox-page
|
|
|
|
#:info-text (G_ "The installer has encountered an unexpected problem. \
|
|
|
|
The backtrace is displayed below. You may choose to exit or create a dump \
|
|
|
|
archive.")
|
2018-12-06 03:11:04 +01:00
|
|
|
#:title (G_ "Unexpected problem")
|
2022-01-15 14:50:11 +01:00
|
|
|
#:content error
|
|
|
|
#:buttons-spec
|
|
|
|
(list
|
|
|
|
(cons (G_ "Dump") (const 'dump))
|
|
|
|
(cons (G_ "Exit") (const 'exit)))))
|
2018-12-06 03:11:04 +01:00
|
|
|
(newt-set-color COLORSET-ROOT "white" "blue")
|
2022-01-15 14:50:11 +01:00
|
|
|
action)
|
|
|
|
|
|
|
|
(define (report-page dump-archive)
|
|
|
|
(define text
|
|
|
|
(format #f (G_ "The dump archive was created as ~a. Would you like to \
|
|
|
|
send this archive to the Guix servers?") dump-archive))
|
|
|
|
(define title (G_ "Dump archive created"))
|
|
|
|
(when (run-confirmation-page text title)
|
|
|
|
(let* ((uploaded-name (send-dump-report dump-archive))
|
|
|
|
(text (if uploaded-name
|
|
|
|
(format #f (G_ "The dump was uploaded as ~a. Please \
|
|
|
|
report it by email to ~a.") uploaded-name %guix-bug-report-address)
|
|
|
|
(G_ "The dump could not be uploaded."))))
|
|
|
|
(run-error-page
|
|
|
|
text
|
|
|
|
(G_ "Dump upload result")))))
|
|
|
|
|
|
|
|
(define (dump-page dump-dir)
|
|
|
|
(define files
|
|
|
|
(scandir dump-dir (lambda (x)
|
|
|
|
(not (or (string=? x ".")
|
|
|
|
(string=? x ".."))))))
|
|
|
|
(fold (match-lambda*
|
|
|
|
(((file . enable?) acc)
|
|
|
|
(if enable?
|
|
|
|
(cons file acc)
|
|
|
|
acc)))
|
|
|
|
'()
|
|
|
|
(run-dump-page
|
|
|
|
dump-dir
|
|
|
|
(map (lambda (x)
|
|
|
|
(cons x #f))
|
|
|
|
files))))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2022-01-15 14:50:01 +01:00
|
|
|
(define (newt-run-command . args)
|
2022-01-15 14:50:08 +01:00
|
|
|
(define command-output "")
|
|
|
|
(define (line-accumulator line)
|
|
|
|
(set! command-output
|
2022-12-09 17:47:08 +01:00
|
|
|
(string-append/shared command-output line)))
|
2022-01-15 14:50:08 +01:00
|
|
|
(define result (run-external-command-with-line-hooks (list line-accumulator)
|
|
|
|
args))
|
|
|
|
(define exit-val (status:exit-val result))
|
|
|
|
(define term-sig (status:term-sig result))
|
|
|
|
(define stop-sig (status:stop-sig result))
|
|
|
|
|
|
|
|
(if (and exit-val (zero? exit-val))
|
|
|
|
#t
|
|
|
|
(let ((info-text
|
|
|
|
(cond
|
|
|
|
(exit-val
|
|
|
|
(format #f (G_ "External command ~s exited with code ~a")
|
|
|
|
args exit-val))
|
|
|
|
(term-sig
|
|
|
|
(format #f (G_ "External command ~s terminated by signal ~a")
|
|
|
|
args term-sig))
|
|
|
|
(stop-sig
|
|
|
|
(format #f (G_ "External command ~s stopped by signal ~a")
|
|
|
|
args stop-sig)))))
|
|
|
|
(run-textbox-page #:title (G_ "External command error")
|
|
|
|
#:info-text info-text
|
|
|
|
#:content command-output
|
|
|
|
#:buttons-spec
|
|
|
|
(list
|
|
|
|
(cons "Ignore" (const #t))
|
|
|
|
(cons "Abort"
|
|
|
|
(lambda ()
|
|
|
|
(abort-to-prompt 'installer-step 'abort)))
|
2022-01-15 14:50:11 +01:00
|
|
|
(cons "Report"
|
2022-01-15 14:50:08 +01:00
|
|
|
(lambda ()
|
|
|
|
(raise
|
|
|
|
(condition
|
|
|
|
((@@ (guix build utils)
|
|
|
|
&invoke-error)
|
|
|
|
(program (car args))
|
|
|
|
(arguments (cdr args))
|
|
|
|
(exit-status exit-val)
|
|
|
|
(term-signal term-sig)
|
|
|
|
(stop-signal stop-sig)))))))))))
|
2022-01-15 14:50:01 +01:00
|
|
|
|
installer: Add dry-run?
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
=>
"/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
2024-10-15 23:27:17 +02:00
|
|
|
(define (final-page result prev-steps dry-run?)
|
|
|
|
(run-final-page result prev-steps dry-run?))
|
2018-12-05 06:30:16 +01:00
|
|
|
|
2018-11-24 04:25:03 +01:00
|
|
|
(define* (locale-page #:key
|
|
|
|
supported-locales
|
|
|
|
iso639-languages
|
installer: Add dry-run?
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
=>
"/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
2024-10-15 23:27:17 +02:00
|
|
|
iso3166-territories
|
|
|
|
dry-run?)
|
2018-11-24 04:25:03 +01:00
|
|
|
(run-locale-page
|
|
|
|
#:supported-locales supported-locales
|
|
|
|
#:iso639-languages iso639-languages
|
installer: Add dry-run?
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
=>
"/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
2024-10-15 23:27:17 +02:00
|
|
|
#:iso3166-territories iso3166-territories
|
|
|
|
#:dry-run? dry-run?))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2018-11-24 04:25:03 +01:00
|
|
|
(define (timezone-page zonetab)
|
|
|
|
(run-timezone-page zonetab))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2022-11-03 17:57:51 +01:00
|
|
|
(define* (welcome-page logo #:key pci-database)
|
|
|
|
(run-welcome-page logo #:pci-database pci-database))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2018-11-24 04:25:03 +01:00
|
|
|
(define (menu-page steps)
|
|
|
|
(run-menu-page steps))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
installer: Add dry-run?
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
=>
"/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
2024-10-15 23:27:17 +02:00
|
|
|
(define (keymap-page layouts context dry-run?)
|
|
|
|
(run-keymap-page layouts #:context context #:dry-run? dry-run?))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2018-11-24 04:25:03 +01:00
|
|
|
(define (network-page)
|
|
|
|
(run-network-page))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2020-12-04 11:33:16 +01:00
|
|
|
(define (substitutes-page)
|
|
|
|
(run-substitutes-page))
|
|
|
|
|
2018-11-24 04:25:03 +01:00
|
|
|
(define (hostname-page)
|
|
|
|
(run-hostname-page))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
installer: Add "Kernel" page to select the Hurd.
This adds a "Kernel" page to the installer with the option to (cross-) install
the Hurd, if applicable (only available on x86 machines for now).
* gnu/installer/newt.scm (kernel-page): New procedure.
(newt-installer)[kernel-page]: New field.
* gnu/installer/kernel.scm,
gnu/installer/newt/kernel.scm: New files.
* gnu/local.mk (INSTALLER_MODULES): Add them.
* gnu/installer.scm (installer-steps): Use them to select kernel if
applicable.
* gnu/installer/newt/partition.scm (run-label-page): Default to "msdos" when
instaling the Hurd.
(run-fs-type-page): Add ext2 for the hurd.
(run-partitioning-page-partition): Remove `entire-encrypted' option when
installing the Hurd.
* gnu/installer/services.scm (system-services->configuration): Cater for the
Hurd with %base-services/hurd, and with %base-packages/hurd that must always
be set.
(%system-services): Change to procedure. When installing the the Hurd, do not
recommend `ntp-service-type' and USE `openssh-sans-x' package for
`openssh-service-type'.
(system-service-none): New variable.
* gnu/installer/newt/services.scm (run-network-management-page): Include it
when installing the Hurd.
(run-desktop-environments-cbt-page): When installing the Hurd, recommend to
not select any desktop enviroment. Update users.
* gnu/installer/parted.scm (efi-installation?): Return #f when installing for
the Hurd.
(create-ext2-file-system): New procedure.
(user-fs-type-name, user-fs-type->mount-type, partition-filesystem-user-type,
format-user-partitions): Support `ext2'.
(<user-partition> partition->user-partition): Use `ext2' when installing the
Hurd.
(auto-partition!): Likewise. No swap partition when installing the Hurd.
* gnu/installer/final.scm (install-system): Cater for cross installation of
the Hurd.
(bootloader-configuration): Use `grub-minimal-bootloader' when installing the
Hurd.
(user-partition-missing-modules): Cater for empty user-partitions.
(initrd-configuration, user-partitions->configuration): Cater for the Hurd.
* gnu/installer/steps.scm (format-configuration,
configuration->file): Cater for the Hurd.
* gnu/system/hurd.scm (%desktop-services/hurd): New variable.
* gnu/installer/tests.scm (choose-kernel): New procedure.
* gnu/tests/install.scm (gui-test-program): Use it.
Change-Id: Ifafb27b8a2f933944c77223a27ec151757237e36
2024-10-20 15:13:16 +02:00
|
|
|
(define (kernel-page)
|
|
|
|
(run-kernel-page))
|
|
|
|
|
2018-11-24 04:25:03 +01:00
|
|
|
(define (user-page)
|
|
|
|
(run-user-page))
|
2018-11-16 12:43:55 +01:00
|
|
|
|
2024-10-21 08:00:56 +02:00
|
|
|
(define (partitioning-page)
|
2020-09-20 21:09:19 +02:00
|
|
|
(run-partitioning-page))
|
2018-12-05 06:57:28 +01:00
|
|
|
|
2018-12-05 06:41:48 +01:00
|
|
|
(define (services-page)
|
|
|
|
(run-services-page))
|
|
|
|
|
2020-04-08 10:16:25 +02:00
|
|
|
(define (parameters-menu menu-proc)
|
2020-03-30 12:24:56 +02:00
|
|
|
(newt-set-help-callback menu-proc))
|
|
|
|
|
2020-04-08 10:16:25 +02:00
|
|
|
(define (parameters-page keyboard-layout-selection)
|
|
|
|
(run-parameters-page keyboard-layout-selection))
|
2020-03-30 12:24:56 +02:00
|
|
|
|
2018-11-16 12:43:55 +01:00
|
|
|
(define newt-installer
|
|
|
|
(installer
|
|
|
|
(name 'newt)
|
|
|
|
(init init)
|
|
|
|
(exit exit)
|
|
|
|
(exit-error exit-error)
|
2018-12-05 06:30:16 +01:00
|
|
|
(final-page final-page)
|
2018-11-16 12:43:55 +01:00
|
|
|
(keymap-page keymap-page)
|
installer: Add "Kernel" page to select the Hurd.
This adds a "Kernel" page to the installer with the option to (cross-) install
the Hurd, if applicable (only available on x86 machines for now).
* gnu/installer/newt.scm (kernel-page): New procedure.
(newt-installer)[kernel-page]: New field.
* gnu/installer/kernel.scm,
gnu/installer/newt/kernel.scm: New files.
* gnu/local.mk (INSTALLER_MODULES): Add them.
* gnu/installer.scm (installer-steps): Use them to select kernel if
applicable.
* gnu/installer/newt/partition.scm (run-label-page): Default to "msdos" when
instaling the Hurd.
(run-fs-type-page): Add ext2 for the hurd.
(run-partitioning-page-partition): Remove `entire-encrypted' option when
installing the Hurd.
* gnu/installer/services.scm (system-services->configuration): Cater for the
Hurd with %base-services/hurd, and with %base-packages/hurd that must always
be set.
(%system-services): Change to procedure. When installing the the Hurd, do not
recommend `ntp-service-type' and USE `openssh-sans-x' package for
`openssh-service-type'.
(system-service-none): New variable.
* gnu/installer/newt/services.scm (run-network-management-page): Include it
when installing the Hurd.
(run-desktop-environments-cbt-page): When installing the Hurd, recommend to
not select any desktop enviroment. Update users.
* gnu/installer/parted.scm (efi-installation?): Return #f when installing for
the Hurd.
(create-ext2-file-system): New procedure.
(user-fs-type-name, user-fs-type->mount-type, partition-filesystem-user-type,
format-user-partitions): Support `ext2'.
(<user-partition> partition->user-partition): Use `ext2' when installing the
Hurd.
(auto-partition!): Likewise. No swap partition when installing the Hurd.
* gnu/installer/final.scm (install-system): Cater for cross installation of
the Hurd.
(bootloader-configuration): Use `grub-minimal-bootloader' when installing the
Hurd.
(user-partition-missing-modules): Cater for empty user-partitions.
(initrd-configuration, user-partitions->configuration): Cater for the Hurd.
* gnu/installer/steps.scm (format-configuration,
configuration->file): Cater for the Hurd.
* gnu/system/hurd.scm (%desktop-services/hurd): New variable.
* gnu/installer/tests.scm (choose-kernel): New procedure.
* gnu/tests/install.scm (gui-test-program): Use it.
Change-Id: Ifafb27b8a2f933944c77223a27ec151757237e36
2024-10-20 15:13:16 +02:00
|
|
|
(kernel-page kernel-page)
|
2018-11-16 12:43:55 +01:00
|
|
|
(locale-page locale-page)
|
|
|
|
(menu-page menu-page)
|
|
|
|
(network-page network-page)
|
2020-12-04 11:33:16 +01:00
|
|
|
(substitutes-page substitutes-page)
|
2018-11-16 12:43:55 +01:00
|
|
|
(timezone-page timezone-page)
|
|
|
|
(hostname-page hostname-page)
|
|
|
|
(user-page user-page)
|
2024-10-21 08:00:56 +02:00
|
|
|
(partitioning-page partitioning-page)
|
2018-12-05 06:41:48 +01:00
|
|
|
(services-page services-page)
|
2020-03-30 12:24:56 +02:00
|
|
|
(welcome-page welcome-page)
|
2020-04-08 10:16:25 +02:00
|
|
|
(parameters-menu parameters-menu)
|
2021-12-29 13:45:26 +01:00
|
|
|
(parameters-page parameters-page)
|
2022-01-15 14:50:01 +01:00
|
|
|
(dump-page dump-page)
|
2022-01-15 14:50:11 +01:00
|
|
|
(run-command newt-run-command)
|
|
|
|
(report-page report-page)))
|