changelog shortlog graph tags branches changeset file revisions annotate raw help

Mercurial > org > docs / infra/quickstart.org

revision 33: aefeb7103fb8
parent 32: f3811af6b10d
child 34: bc53e27c0163
     1.1--- a/infra/quickstart.org	Sun Jun 16 22:16:34 2024 -0400
     1.2+++ b/infra/quickstart.org	Tue Jun 18 17:13:54 2024 -0400
     1.3@@ -15,54 +15,19 @@
     1.4   - git
     1.5   - zstd
     1.6 
     1.7-* TODO check.sh
     1.8-Check that the current host is a qualified builder.
     1.9+* bootstrap.sh
    1.10 
    1.11-This will interrogate the system, checking for minimum
    1.12-requirements. If any requirement isn't met an error is
    1.13-signaled. Environment variables are also reported here, but not
    1.14-set. On completion, the file =host.sxp= is written to the current
    1.15-directory.
    1.16-
    1.17-The minimum software dependencies above should be installed via your
    1.18-system's package manager. The remaining dependencies are installed via
    1.19-the =install.sh= script.
    1.20-
    1.21-#+begin_src shell
    1.22-./check.sh
    1.23-#+end_src
    1.24+The easiest way to get started is to run the top-level script
    1.25+=bootstrap.sh=. Running the script will:
    1.26 
    1.27-#+RESULTS:
    1.28-| STASH=          |
    1.29-| STORE=          |
    1.30-| DIST=           |
    1.31-| PACKY_URL=      |
    1.32-| VC_URL=         |
    1.33-| INSTALL_PREFIX= |
    1.34-| CC=             |
    1.35-| AR=             |
    1.36-| HG=             |
    1.37-| GIT=            |
    1.38-| LISP=           |
    1.39-| RUST=           |
    1.40-| LD=             |
    1.41-| SHELL=/bin/bash |
    1.42-| DEV=            |
    1.43-| DEV_HOME=       |
    1.44-| ID=             |
    1.45-| WORKER=         |
    1.46-| WORKER_ID=      |
    1.47-| WORKER_HOME=    |
    1.48-| CARGO_HOME=     |
    1.49-| RUSTUP_HOME=    |
    1.50+- run =check.sh=
    1.51+- install the latest cores and lisp runtime from
    1.52+  https://packy.compiler.company to the stash
    1.53+- load =autogen.lisp= and call the function =infra/autogen:autogen=
    1.54+  - check and apply the host config and profile
    1.55+  - build all features in parallel
    1.56 
    1.57-* TODO bootstrap.sh
    1.58-Bootstrap the core.
    1.59-
    1.60-- download and prepare target-specific dependencies
    1.61-- install the latest =sk= binary from https://packy.compiler.company
    1.62-  to the stash
    1.63-- compile and load =bootstrap.lisp=
    1.64+[[cdn:media/clip/infra-bootstrap.gif]]
    1.65 
    1.66 Upon completion a local =stash= directory is provisioned. At this
    1.67 point we no longer need to depend on shell scripting as we have a
    1.68@@ -72,6 +37,42 @@
    1.69 and select a target to build on your machine or in a container. Use
    1.70 =skel --help= for a list of other commands.
    1.71 
    1.72+** check.sh
    1.73+This script checks that the current host is qualified. It needs to be
    1.74+ran once before the =autogen.lisp= file is loaded, usually via
    1.75+=bootstrap.sh=.
    1.76+
    1.77+This will interrogate the system, checking for minimum
    1.78+requirements. If any requirement isn't met an error is signaled. On
    1.79+completion, the name of an SXP file is printed which contains the host
    1.80+config.
    1.81+
    1.82+The minimum software dependencies above should be installed via your
    1.83+system's package manager.
    1.84+
    1.85+#+begin_src shell
    1.86+./check.sh
    1.87+#+end_src
    1.88+
    1.89+#+RESULTS:
    1.90+: zor.sxp
    1.91+
    1.92+** autogen.lisp
    1.93+Once a core and lisp runtime are available, we load =autogen.lisp= and
    1.94+call =infra/autogen:autogen=. This will process the host configuration
    1.95+(=zor.sxp= in the example above) and the profile (defaults to
    1.96+=default.sxp=), update environment variables for the current shell and
    1.97+take any additional actions needed.
    1.98+
    1.99+The order of operations are loosely as follows:
   1.100+- initialize profile
   1.101+- update host environment variables
   1.102+- check features and ensure host dependencies
   1.103+- initialize host
   1.104+- initialize infra =skelfile=
   1.105+- process all features
   1.106+- quit
   1.107+
   1.108 * TODO deploy.lisp
   1.109 Deploy =infra= builds to a remote.
   1.110 
   1.111@@ -84,6 +85,5 @@
   1.112 
   1.113 Production deployments end up at https://packy.compiler.company.
   1.114 
   1.115-
   1.116 * TODO install.lisp
   1.117 Install core packages locally.