1.1--- a/makefile Sat Dec 30 02:27:16 2023 -0500
1.2+++ b/makefile Sat Dec 30 20:11:16 2023 -0500
1.3@@ -25,6 +25,7 @@
1.4 clean:;rm -rf $(B) $(D)
1.5 $(B):;mkdir -pv $@/src
1.6 $(D):;mkdir -pv $@
1.7+
1.8 ### Linux
1.9 LINUX_TARGET:=linux-$(LINUX_VERSION)
1.10 linux:$(LINUX_TARGET) linux-config;
1.11@@ -61,6 +62,7 @@
1.12 rocksdb-install:$(ROCKSDB_TARGET)
1.13 cd $< && cp -rf $(ROCKSDB_TARGET)/include/* /usr/local/include/ && \
1.14 cp -f $(ROCKSDB_TARGET)/librocksdb.so* /usr/local/include/
1.15+
1.16 ### SBCL
1.17 SBCL_TARGET:=build/src/sbcl
1.18 $(SBCL_TARGET):scripts/get-sbcl.sh $(B);
1.19@@ -73,17 +75,18 @@
1.20 --with-core-compression \
1.21 --with-sb-xref-for-internals \
1.22 --dynamic-space-size=8Gb \
1.23- --fancy && \
1.24- cd doc/manual && make
1.25+ --fancy
1.26 sbcl:$(SBCL_TARGET)
1.27+sbcl-docs:sbcl;## REQURES TEXLIVE
1.28+ cd $(SBCL_TARGET)/doc/manual && make
1.29 sbcl-install:sbcl;cd $(SBCL_TARGET) && ./install.sh
1.30 clean-sbcl:$(SBCL_TARGET);cd $(SBCL_TARGET) && ./clean.sh
1.31
1.32 ### Rust
1.33 RUST_TARGET:=build/src/rust
1.34-rust:scripts/get-rust.sh $(B);
1.35- $<
1.36-rust-x:rust;
1.37+$(RUST_TARGET):scripts/get-rust.sh $(B);$<
1.38+rust:$(RUST_TARGET)
1.39+rust-install-x:rust;
1.40 cargo install --path $(RUST_TARGET)/src/tools/x
1.41 rust-build:rust rust-install-x;
1.42 cd $(RUST_TARGET) && x build library
2.1--- a/scripts/install-cargo-tools.sh Sat Dec 30 02:27:16 2023 -0500
2.2+++ b/scripts/install-cargo-tools.sh Sat Dec 30 20:11:16 2023 -0500
2.3@@ -1,5 +1,5 @@
2.4 #!/bin/sh
2.5-cargo install carg-add
2.6+cargo install cargo-add
2.7 cargo install cbindgen
2.8 cargo install cargo-asm
2.9 cargo install t-rec
3.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2+++ b/virt/build-alpine-base.sh Sat Dec 30 20:11:16 2023 -0500
3.3@@ -0,0 +1,7 @@
3.4+#!/usr/bin/env bash
3.5+
3.6+id=$(buildah from --pull alpine:latest)
3.7+buildah run --net host $id apk add --no-cache gnupg openssh mercurial wireguard-tools
3.8+buildah config --annotation alpine $id
3.9+buildah config --author='Richard Westhaver' $id
3.10+buildah commit $id alpine-base
4.1--- a/virt/build-box-base.sh Sat Dec 30 02:27:16 2023 -0500
4.2+++ b/virt/build-box-base.sh Sat Dec 30 20:11:16 2023 -0500
4.3@@ -4,7 +4,7 @@
4.4 buildah run $id useradd -ms /bin/bash $USER
4.5 buildah run $id mkdir -p /home/$USER/lab /var/local/data
4.6 buildah run --net host $id pacman -Syu make git sbcl base-devel zstd texlive llvm curl --noconfirm
4.7-buildah run --net host $id hg clone https://vc.compiler.company/comp/core /usr/src/core
4.8-buildah run --net host $id hg clone https://vc.compiler.company/comp/infra /usr/src/infra
4.9 buildah config --workingdir /home/$USER $id
4.10+buildah run --net host $id hg clone https://vc.compiler.company/comp/core
4.11+buildah run --net host $id hg clone https://vc.compiler.company/comp/infra
4.12 buildah commit $id box-base
5.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2+++ b/virt/build-ci-worker.sh Sat Dec 30 20:11:16 2023 -0500
5.3@@ -0,0 +1,4 @@
5.4+#!/usr/bin/env bash
5.5+
5.6+# these should be spawned as needed by a ci-leader box within a
5.7+# dedicated pod named 'ci'.
6.1--- a/virt/build-demo.sh Sat Dec 30 02:27:16 2023 -0500
6.2+++ b/virt/build-demo.sh Sat Dec 30 20:11:16 2023 -0500
6.3@@ -1,7 +1,16 @@
6.4 #!/usr/bin/env bash
6.5-id=$(buildah from box-base)
6.6-buildah run --net host $id hg clone https://vc.compiler.company/comp/demo /usr/src/demo
6.7-buildah run --net host $id /bin/sh -c 'cd /usr/src/infra && make sbcl-install && make rocksdb-install && make ts-langs && make dist/fasl'
6.8-buildah run $id cp /usr/src/infra/dist/fasl/* /usr/local/lib/sbcl/
6.9-buildah run $id hg clone /usr/src/demo # to /home/$USER
6.10+DIST=dist
6.11+id=$(buildah from alpine-base)
6.12+buildah run $id adduser demo
6.13+buildah run $id addgroup demo
6.14+buildah config --workingdir /home/demo --user demo -l=demo
6.15+buildah copy $id dist/sbcl
6.16+buildah copy $id dist/fasl/* sbcl
6.17+buildah copy $id dist/rocksdb/include/* /usr/local/include/
6.18+buildah copy $id dist/rocksdb/librocksdb.so* /usr/local/lib/
6.19+# buildah copy $id dist/tree-sitter/grammar/* /usr/local/share/tree-sitter/
6.20+buildah run --net host $id /bin/sh -c 'cd infra && make sbcl-install && make rocksdb-install && make ts-langs && make dist/fasl'
6.21+buildah run $id /bin/sh -c 'cp infra/dist/fasl/* /usr/local/lib/sbcl/'
6.22+# cleanup
6.23+buildah config --entrypoint
6.24 buildah commit $id demo
7.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
7.2+++ b/virt/build-packy.sh Sat Dec 30 20:11:16 2023 -0500
7.3@@ -0,0 +1,1 @@
7.4+#!/usr/bin/env bash
8.1--- a/virt/build-pod.sh Sat Dec 30 02:27:16 2023 -0500
8.2+++ b/virt/build-pod.sh Sat Dec 30 20:11:16 2023 -0500
8.3@@ -1,2 +1,8 @@
8.4 #!/bin/sh
8.5-podman pod create --name comp.lab --infra --publish 8080:80 --network bridge
8.6+
8.7+# to run a container in the pod:
8.8+# podman run -dt --pod comp box-base top
8.9+# podman container attach --latest
8.10+# sudo podman ps -ap
8.11+NAME=${1:-comp}
8.12+podman pod create --name $NAME
9.1--- a/virt/run.sh Sat Dec 30 02:27:16 2023 -0500
9.2+++ b/virt/run.sh Sat Dec 30 20:11:16 2023 -0500
9.3@@ -1,4 +1,4 @@
9.4 #!/bin/sh
9.5-box="$1:-demo"
9.6-ports="${2:-8080:80/tcp 9090:9090/udp}"
9.7-podman run -dt -p $ports localhost/$box
9.8+BOX="${1:-demo}"
9.9+NAME="${2:-demo0}"
9.10+podman run --name $NAME -dt localhost/$BOX