diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-29 13:15:08 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-04-29 16:08:56 -0700 |
commit | 6279bd8b9d742b858a095fbca1159b2cf1df2431 (patch) | |
tree | 866d96467eb262f896e98eb9032ef24124e7907c /src/property/installer.lisp | |
parent | 2f4355eda82335a7eef5696241f5ff5f6ede3a52 (diff) | |
download | consfigurator-6279bd8b9d742b858a095fbca1159b2cf1df2431.tar.gz |
move OS::ARCHITECTURE slot from OS:LINUX to OS:DEBIANLIKE
We already use this information in the sense of a distribution architecture
rather than a kernel architecture, and the latter are differently grained.
We might later want to have slots for both.
Make OS:SUPPORTS-ARCH-P take OS objects as this simplifies existing usage.
Restore the ORIGINAL-OS parameter to INSTALLER:CLEANLY-INSTALLED-ONCE. It was
previously replaced in 446b8f4a8ef78cb4605cfb551255bb455be411f0.
CHROOT::%OS-BOOTSTRAPPER-INSTALLED does not need the original host's
architecture in most cases, and accepting an arbitrary propapp means we don't
force the use of PACKAGE:INSTALLED.
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property/installer.lisp')
-rw-r--r-- | src/property/installer.lisp | 47 |
1 files changed, 24 insertions, 23 deletions
diff --git a/src/property/installer.lisp b/src/property/installer.lisp index d3e4311..83a7b75 100644 --- a/src/property/installer.lisp +++ b/src/property/installer.lisp @@ -303,18 +303,17 @@ using a combinator like ON-CHANGE, or applied manually with DEPLOY-THESE." (apply #'mrun "mount" efi-system-partition-mount-args)))))) (defproplist cleanly-installed-once :lisp - (original-os-architecture - &optional options - &aux (minimal-new-host - (make-host :hostattrs (list :os (get-hostattrs :os)))) - (original-host - (make-host - :propspec - (make-propspec - :propspec - `(eseqprops - (os:linux ,original-os-architecture) - (chroot:os-bootstrapped-for ,options "/new-os" ,minimal-new-host)))))) + (&optional options original-os + &aux + (new (make-host :hostattrs `(:os ,(get-hostattrs :os)))) + (original-host + (make-host + :propspec + (make-propspec + :propspec + `(eseqprops + ,(or original-os '(os:linux)) + (chroot:os-bootstrapped-for ,options "/new-os" ,new)))))) "Replaces whatever operating system the host has with a clean installation of the OS that the host is meant to have, and reboot, once. This is intended for freshly launched machines in faraway datacentres, where your provider has @@ -326,17 +325,19 @@ but not captured by your consfig. This property's approach can fail and leave the system unbootable, but it's an time-efficient way to ensure that you're starting from a truly clean slate for those cases in which it works. -ORIGINAL-OS-ARCHITECTURE is the architecture of the original OS as would be -supplied to the OS:LINUX property, e.g. :AMD64. OPTIONS will be passed on to -CHROOT:OS-BOOTSTRAPPED-FOR, which see. - -The internal property CHROOT::%OS-BOOTSTRAPPER-INSTALLED will attempt to use -PACKAGE:INSTALLED to install the OS bootstrapper (e.g. debootstrap(8) for -Debian). Alternatively, you can install the bootstrapper manually before -running Consfigurator; this is useful for original OSs whose package managers -Consfigurator doesn't yet know how to drive. You might apply an OS-agnostic -property before this one which manually downloads the bootstrapper and puts it -on PATH. +OPTIONS will be passed on to CHROOT:OS-BOOTSTRAPPED-FOR, which see. +ORIGINAL-OS, if supplied, is a propapp specifying the old OS, as you would +apply to a host with that OS. + +The internal property CHROOT::%OS-BOOTSTRAPPER-INSTALLED will attempt to +install the OS bootstrapper (e.g. debootstrap(8) for Debian). If ORIGINAL-OS +is supplied then installation will use a package manager property for that OS. +Otherwise, CHROOT::%OS-BOOTSTRAPPER-INSTALLED will fall back to trying +PACKAGE:INSTALLED. Alternatively, you can install the bootstrapper manually +before running Consfigurator and not supply ORIGINAL-OS. This is useful for +original OSs whose package managers Consfigurator doesn't yet know how to +drive. You might apply an OS-agnostic property before this one which manually +downloads the bootstrapper and puts it on PATH. The files from the old OS will be left in '/old-os'. Typically you will need to perform some additional configuration before rebooting to increase the |