changeset 266: |
0e3229b8409f |
parent 265: |
fab40b02d833 |
child 267: |
1d466eeed96a |
author: |
Richard Westhaver <ellis@rwest.io> |
date: |
Sun, 16 Jun 2024 03:03:00 +0000 |
files: |
autogen.lisp bootstrap.sh skelfile |
description: |
autogen src |
1.1--- a/autogen.lisp Sun Jun 16 02:43:16 2024 +0000
1.2+++ b/autogen.lisp Sun Jun 16 03:03:00 2024 +0000
1.3@@ -40,6 +40,15 @@
1.4 (setf (gethash k table) (sb-posix:getenv k)))))
1.5 (defun getenv (k) (gethash *host-env* k))
1.6
1.7+(defun build-default ()
1.8+ (let ((comp-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :repos))))
1.9+ (packy-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :packy-repos))))
1.10+ (sbcl-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :sbcl :sbcl-shared))))
1.11+ (operator-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :archlinux :operator))))
1.12+ (worker-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :alpine :worker)))))
1.13+ (std/thread:wait-for-threads
1.14+ (list comp-builder packy-builder operator-builder worker-builder))))
1.15+
1.16 (defun autogen ()
1.17 "Auto-generate the INFRA system."
1.18 (info! "starting autogen.lisp" sb-ext:*core-pathname*)
1.19@@ -56,15 +65,9 @@
1.20 do (format t " ~A = ~:A~%" k v))
1.21 (println "profile:")
1.22 (loop for (k v) on *profile* by 'cddr
1.23- do (format t " ~A = ~A~%" k v)))
1.24+ do (format t " ~A = ~A~%" k v))
1.25
1.26-(defun build-default ()
1.27- (let ((rocksdb-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :rocksdb))))
1.28- (sbcl-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :sbcl :sbcl-shared))))
1.29- (operator-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :archlinux :operator))))
1.30- (worker-builder (sb-thread:make-thread (lambda () (sk-call* *skel-project* :alpine :worker)))))
1.31- (std/thread:wait-for-threads
1.32- (list rocksdb-builder sbcl-builder operator-builder worker-builder))))
1.33+ (build-default))
1.34
1.35 ;;; *host*
1.36 ;; The host profile is generated automatically by 'check.sh'. After running
1.37@@ -75,10 +78,10 @@
1.38 ;; configuration and override it with INFRA_PROFILE
1.39
1.40 ;; (sb-ext:quit)
1.41+
1.42 (unless (probe-file #p".stash")
1.43 (sk-call* *skel-project* :bootstrap))
1.44
1.45 ;; (build-default)
1.46 (autogen)
1.47-(sb-ext:quit)
1.48
2.1--- a/bootstrap.sh Sun Jun 16 02:43:16 2024 +0000
2.2+++ b/bootstrap.sh Sun Jun 16 03:03:00 2024 +0000
2.3@@ -25,21 +25,21 @@
2.4 ensure mkdir -p "${_stash}/include"
2.5 cd "${_stash}"
2.6 local _sbcl_pack="sbcl.tar.zst"
2.7- local _rocksdb_pack="rocksdb.tar.zst"
2.8+ # local _rocksdb_pack="rocksdb.tar.zst"
2.9 local _core_pack="core.tar.zst"
2.10 local _core_src_pack="core-source.tar.zst"
2.11 local _sbcl_url="${_url}/${_sbcl_pack}"
2.12- local _rocksdb_url="${_url}/${_rocksdb_pack}"
2.13+ # local _rocksdb_url="${_url}/${_rocksdb_pack}"
2.14 local _core_url="${_url}/${_core_pack}"
2.15 local _core_src_url="${_url}/${_core_src_pack}"
2.16 ensure download "$_sbcl_url" "$_sbcl_pack" "$_arch"
2.17 unzstd "${_sbcl_pack}"
2.18 tar -xf "sbcl.tar"
2.19 cd sbcl && INSTALL_ROOT=$(realpath ..) sh install.sh && cd ..
2.20- # ensure download "$_core_src_url" "$_core_src_pack" "$_arch"
2.21- # unzstd "${_core_src_pack}"
2.22- # tar -xvf "core-source.tar"
2.23- # mv core src/
2.24+ ensure download "$_core_src_url" "$_core_src_pack" "$_arch"
2.25+ unzstd "${_core_src_pack}"
2.26+ tar -xvf "core-source.tar"
2.27+ mv core src/
2.28 # ensure download "$_rocksdb_url" "${_rocksdb_pack}" "$_arch"
2.29 # unzstd "${_rocksdb_pack}"
2.30 # tar -xvf "pack/rocksdb.tar"
2.31@@ -74,7 +74,6 @@
2.32 _retry_supported="--retry 3 -C -"
2.33 fi
2.34 fi
2.35-
2.36 RETVAL="$_retry_supported"
2.37 }
2.38
2.39@@ -87,7 +86,6 @@
2.40 RETVAL="$TLS_CIPHERSUITES"
2.41 return
2.42 fi
2.43-
2.44 local _openssl_syntax="no"
2.45 local _gnutls_syntax="no"
2.46 local _backend_supported="yes"
2.47@@ -102,7 +100,6 @@
2.48 else
2.49 _backend_supported="no"
2.50 fi
2.51-
2.52 local _args_supported="no"
2.53 if [ "$_backend_supported" = "yes" ]; then
2.54 # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc.
2.55@@ -110,7 +107,6 @@
2.56 _args_supported="yes"
2.57 fi
2.58 fi
2.59-
2.60 local _cs=""
2.61 if [ "$_args_supported" = "yes" ]; then
2.62 if [ "$_openssl_syntax" = "yes" ]; then
2.63@@ -119,7 +115,6 @@
2.64 _cs=$(get_strong_ciphersuites_for "gnutls")
2.65 fi
2.66 fi
2.67-
2.68 RETVAL="$_cs"
2.69 }
2.70
2.71@@ -132,7 +127,6 @@
2.72 RETVAL="$TLS_CIPHERSUITES"
2.73 return
2.74 fi
2.75-
2.76 local _cs=""
2.77 if wget -V | grep -q '\-DHAVE_LIBSSL'; then
2.78 # "unspecified" is for arch, allows for possibility old OS using macports, homebrew, etc.
2.79@@ -145,7 +139,6 @@
2.80 _cs=$(get_strong_ciphersuites_for "gnutls")
2.81 fi
2.82 fi
2.83-
2.84 RETVAL="$_cs"
2.85 }
2.86
2.87@@ -157,7 +150,6 @@
2.88 shift
2.89 _cmd="$1"
2.90 shift
2.91-
2.92 local _category
2.93 if "$_cmd" --help | grep -q 'For all options use the manual or "--help all".'; then
2.94 _category="all"
2.95@@ -166,7 +158,6 @@
2.96 fi
2.97
2.98 case "$_arch" in
2.99-
2.100 *darwin*)
2.101 if check_cmd sw_vers; then
2.102 case $(sw_vers -productVersion) in
2.103@@ -190,15 +181,12 @@
2.104 esac
2.105 fi
2.106 ;;
2.107-
2.108 esac
2.109-
2.110 for _arg in "$@"; do
2.111 if ! "$_cmd" --help "$_category" | grep -q -- "$_arg"; then
2.112 return 1
2.113 fi
2.114 done
2.115-
2.116 true # not strictly needed
2.117 }
2.118
2.119@@ -233,7 +221,6 @@
2.120 else
2.121 _dld='curl or wget' # to be used in error message of need_cmd
2.122 fi
2.123-
2.124 if [ "$1" = --check ]; then
2.125 need_cmd "$_dld"
2.126 elif [ "$_dld" = curl ]; then
3.1--- a/skelfile Sun Jun 16 02:43:16 2024 +0000
3.2+++ b/skelfile Sun Jun 16 03:03:00 2024 +0000
3.3@@ -13,6 +13,11 @@
3.4 :rules
3.5 ((check () #$./check.sh$#)
3.6 (clean () #$rm -rvf .stash$#)
3.7+ (src () #$mkdir -pv .stash/src$#)
3.8+ (bin () #$mkdir -pv .stash/bin$#)
3.9+ ;; src
3.10+ (repos (src) #$hg clone https://vc.compiler.company/comp/repos .stash/src/comp$#)
3.11+ (packy-repos (src) #$hg clone https://vc.compiler.company/comp/repos .stash/src/packy$#)
3.12 ;; containers
3.13 (archlinux () #$podman build -f pod/Containerfile.archlinux --no-cache -t localhost/archlinux$#)
3.14 (alpine () #$podman build -f pod/Containerfile.alpine --no-cache -t localhost/alpine$#)
3.15@@ -22,8 +27,6 @@
3.16 (operator (box) #$podman build -f pod/Containerfile.operator --no-cache -t localhost/operator$#)
3.17 (containers (archlinux alpine ubuntu box worker operator))
3.18 ;; programs
3.19- (src () #$mkdir -pv .stash/src$#)
3.20- (bin () #$mkdir -pv .stash/bin$#)
3.21 (bootstrap () #$./bootstrap.sh$#)
3.22 (emacs (src) #$./scripts/get-emacs.sh$#
3.23 #$cd .stash/src/emacs && ./autogen.sh$#