# HG changeset patch # User Richard Westhaver # Date 1716580912 0 # Node ID 94227525d5ce7bdd16b1c2cd85c9f488ec414745 # Parent ee3bce140f7e4c815039a4466585123a7eb229cc move containers diff -r ee3bce140f7e -r 94227525d5ce .hgsubstate --- a/.hgsubstate Tue May 21 17:17:36 2024 -0400 +++ b/.hgsubstate Fri May 24 20:01:52 2024 +0000 @@ -1,2 +1,2 @@ -0000000000000000000000000000000000000000 etc -0000000000000000000000000000000000000000 home +3637c633768a600b964bcb567a3b0ba195963706 etc +13e2311f62218eb153de54dd7c51e422567df0ed home diff -r ee3bce140f7e -r 94227525d5ce Containerfile.alpine --- a/Containerfile.alpine Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -FROM alpine:latest -RUN apk add --no-cache openssh mercurial wireguard-tools liburing \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.archlinux --- a/Containerfile.archlinux Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -FROM archlinux:latest -RUN --network=host pacman-key --init -RUN --network=host pacman-key --populate archlinux -RUN --network=host pacman -Syu base-devel less uutils-coreutils openssh mercurial git sqlite btrfs-progs liburing wireguard-tools clang tree-sitter libxcb glibc openssl zstd --noconfirm \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.archriscv --- a/Containerfile.archriscv Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -FROM --platform=linux/riscv64 riscfive/archlinux -RUN pacman -Syu \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.base diff -r ee3bce140f7e -r 94227525d5ce Containerfile.box --- a/Containerfile.box Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -FROM localhost/archlinux:latest -RUN --network=host pacman -Sy uutils-coreutils sysstat iotop imagemagick giflib libgccjit libxaw snappy sbcl liburing libxkbcommon nuklear --noconfirm -# VOLUME /opt/store -# VOLUME /opt/stash -# custom -ARG DEV=dev -ARG DEV_HOME=/home/${DEV} -ARG ID=808 -# stage0 -RUN mkdir -p /usr/share/lisp /usr/local/share/lisp -WORKDIR /usr/local/src -RUN hg clone https://vc.compiler.company/comp/infra -RUN hg clone https://vc.compiler.company/comp/core -WORKDIR infra -RUN make build -ENV CARGO_HOME="/usr/local/share/cargo" -ENV RUSTUP_HOME="/usr/local/share/rustup" -# stage1 -RUN make rustup-install -ENV PATH="$PATH:/usr/local/share/cargo/bin" -RUN rustup update -# dev rustc components -RUN rustup default nightly -RUN rustup component add --toolchain nightly rust-src rust-analyzer rustc-dev llvm-tools-preview -# RUN sh scripts/install-nushell-pack.sh -# RUN sh scripts/install-emacs-pack.sh -# RUN sh scripts/install-sbcl-pack.sh -# RUN sh scripts/install-rocksdb-pack.sh -# RUN sh scripts/install-cargo-tools.sh -RUN make sbcl-install -RUN make quicklisp-install -RUN make tree-sitter-install -RUN make tree-sitter-langs-install -RUN make emacs-build-mini -RUN make emacs-install -RUN make rocksdb-build-shared -RUN make rocksdb-install -ADD etc/sbclrc /etc/sbclrc -COPY etc/skel/ /etc/skel/ -ADD etc/shells /etc/ -RUN useradd --system -s /usr/bin/bash -u ${ID} -k /etc/skel -m ${DEV} -RUN groupadd -g 128 engineer -U ${DEV} -RUN groupadd -g 256 operator -U ${DEV} -# RUN make core-install -WORKDIR /usr/local/src -RUN cp -rf core/lisp /usr/local/share/lisp/core -RUN rm -rf ./* -RUN chown -R ${DEV}:engineer /usr/local/share/ -RUN chown -R ${DEV}:engineer /usr/local/src/ -RUN chown -R ${DEV}:engineer /usr/local/bin/ -RUN chown -R ${DEV}:engineer /usr/local/etc/ -RUN chown -R ${DEV}:engineer /usr/local/man/ -USER ${DEV} -WORKDIR ${DEV_HOME} -RUN hg clone https://vc.compiler.company/comp/infra -RUN hg clone https://vc.compiler.company/comp/core -ENV DEV=${DEV} -ENV DEV_ID=${ID} \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.fedora.arm64v8 --- a/Containerfile.fedora.arm64v8 Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -FROM arm64v8/fedora:latest \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.mail --- a/Containerfile.mail Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1 +0,0 @@ -FROM stalwartlabs/mail-server:latest \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.operator --- a/Containerfile.operator Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2 +0,0 @@ -FROM localhost/box:latest -RUN infra/scripts/wg-gen-keys.sh private.key public.key \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.ubuntu --- a/Containerfile.ubuntu Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -FROM ubuntu:latest -RUN apt-get update -RUN apt -y install git ssh python3-pip -RUN pip install mercurial --upgrade \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.vc --- a/Containerfile.vc Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4 +0,0 @@ -FROM octobus/heptapod:latest -RUN gitlab-ctl upgrade -# TODO: configure instance here, pull from comp/etc -# COPY etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.vc-runner --- a/Containerfile.vc-runner Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,8 +0,0 @@ -FROM localhost/worker:latest -USER root -RUN curl -L --output /usr/local/bin/gitlab-runner https://download.heptapod.net/runner/runner/latest/binaries/heptapod-runner-linux-amd64 -ARG RUNNER_TOKEN -RUN chmod +x /usr/local/bin/gitlab-runner -RUN echo ${WORKER_USER} -RUN echo ${WORKER_HOME} -RUN gitlab-runner install --user=${WORKER_USER} --working-directory=${WORKER_HOME} \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce Containerfile.worker --- a/Containerfile.worker Tue May 21 17:17:36 2024 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -FROM localhost/alpine:latest -# VOLUME /opt/store -# VOLUME /opt/stash -ADD etc/skel/* /etc/skel/ -ARG ID=908 -ARG WORKER=worker -ARG WORKER_HOME=/home/${WORKER} -RUN apk add build-base zstd-dev curl make git linux-headers openssl-dev pkgconf clang m4 tree-sitter -RUN mkdir /usr/share/lisp -RUN mkdir /usr/local/share/lisp -WORKDIR /usr/local/src -RUN hg clone https://vc.compiler.company/comp/infra -RUN hg clone https://vc.compiler.company/comp/core -WORKDIR infra -ENV CARGO_HOME="/usr/local/share/cargo" -ENV RUSTUP_HOME="/usr/local/share/rustup" -RUN make build rustup-install tree-sitter-langs-install -ENV PATH="$PATH:/usr/local/share/cargo/bin" -RUN rustup update -#RUN rustup default nightly # disabled due to issue with zellij build -ADD etc/sbclrc /etc/sbclrc -RUN cd .. && rm -rf infra core -RUN adduser -D -u ${ID} -k /etc/skel ${WORKER} -USER ${WORKER} -WORKDIR ${WORKER_HOME} -ENV WORKER=${WORKER} -ENV WORKER_ID=${ID} -ENV WORKER_HOME=${WORKER_HOME} -ENTRYPOINT ["sh"] \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.alpine --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.alpine Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,2 @@ +FROM alpine:latest +RUN apk add --no-cache openssh mercurial wireguard-tools liburing \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.archlinux --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.archlinux Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,4 @@ +FROM archlinux:latest +RUN --network=host pacman-key --init +RUN --network=host pacman-key --populate archlinux +RUN --network=host pacman -Syu base-devel less uutils-coreutils openssh mercurial git sqlite btrfs-progs liburing wireguard-tools clang tree-sitter libxcb glibc openssl zstd --noconfirm \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.archriscv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.archriscv Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,2 @@ +FROM --platform=linux/riscv64 riscfive/archlinux +RUN pacman -Syu \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.base diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.box --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.box Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,58 @@ +FROM localhost/archlinux:latest +RUN --network=host pacman -Sy uutils-coreutils sysstat iotop imagemagick giflib libgccjit libxaw snappy sbcl liburing libxkbcommon nuklear --noconfirm +# VOLUME /opt/store +# VOLUME /opt/stash +# custom +ARG DEV=dev +ARG DEV_HOME=/home/${DEV} +ARG ID=808 +# stage0 +RUN mkdir -p /usr/share/lisp /usr/local/share/lisp +WORKDIR /usr/local/src +RUN hg clone https://vc.compiler.company/comp/infra +RUN hg clone https://vc.compiler.company/comp/core +WORKDIR infra +RUN make build +ENV CARGO_HOME="/usr/local/share/cargo" +ENV RUSTUP_HOME="/usr/local/share/rustup" +# stage1 +RUN make rustup-install +ENV PATH="$PATH:/usr/local/share/cargo/bin" +RUN rustup update +# dev rustc components +RUN rustup default nightly +RUN rustup component add --toolchain nightly rust-src rust-analyzer rustc-dev llvm-tools-preview +# RUN sh scripts/install-nushell-pack.sh +# RUN sh scripts/install-emacs-pack.sh +# RUN sh scripts/install-sbcl-pack.sh +# RUN sh scripts/install-rocksdb-pack.sh +# RUN sh scripts/install-cargo-tools.sh +RUN make sbcl-install +RUN make quicklisp-install +RUN make tree-sitter-install +RUN make tree-sitter-langs-install +RUN make emacs-build-mini +RUN make emacs-install +RUN make rocksdb-build-shared +RUN make rocksdb-install +ADD etc/sbclrc /etc/sbclrc +COPY etc/skel/ /etc/skel/ +ADD etc/shells /etc/ +RUN useradd --system -s /usr/bin/bash -u ${ID} -k /etc/skel -m ${DEV} +RUN groupadd -g 128 engineer -U ${DEV} +RUN groupadd -g 256 operator -U ${DEV} +# RUN make core-install +WORKDIR /usr/local/src +RUN cp -rf core/lisp /usr/local/share/lisp/core +RUN rm -rf ./* +RUN chown -R ${DEV}:engineer /usr/local/share/ +RUN chown -R ${DEV}:engineer /usr/local/src/ +RUN chown -R ${DEV}:engineer /usr/local/bin/ +RUN chown -R ${DEV}:engineer /usr/local/etc/ +RUN chown -R ${DEV}:engineer /usr/local/man/ +USER ${DEV} +WORKDIR ${DEV_HOME} +RUN hg clone https://vc.compiler.company/comp/infra +RUN hg clone https://vc.compiler.company/comp/core +ENV DEV=${DEV} +ENV DEV_ID=${ID} \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.fedora.arm64v8 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.fedora.arm64v8 Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,1 @@ +FROM arm64v8/fedora:latest \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.mail --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.mail Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,1 @@ +FROM stalwartlabs/mail-server:latest \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.operator --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.operator Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,2 @@ +FROM localhost/box:latest +RUN infra/scripts/wg-gen-keys.sh private.key public.key \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.ubuntu --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.ubuntu Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,3 @@ +FROM ubuntu:latest +RUN apt-get update +RUN apt -y install git ssh python3-pip mercurial diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.vc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.vc Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,4 @@ +FROM octobus/heptapod:latest +RUN gitlab-ctl upgrade +# TODO: configure instance here, pull from comp/etc +# COPY etc/gitlab/gitlab.rb /etc/gitlab/gitlab.rb \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.vc-runner --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.vc-runner Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,8 @@ +FROM localhost/worker:latest +USER root +RUN curl -L --output /usr/local/bin/gitlab-runner https://download.heptapod.net/runner/runner/latest/binaries/heptapod-runner-linux-amd64 +ARG RUNNER_TOKEN +RUN chmod +x /usr/local/bin/gitlab-runner +RUN echo ${WORKER_USER} +RUN echo ${WORKER_HOME} +RUN gitlab-runner install --user=${WORKER_USER} --working-directory=${WORKER_HOME} \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce containers/Containerfile.worker --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/containers/Containerfile.worker Fri May 24 20:01:52 2024 +0000 @@ -0,0 +1,29 @@ +FROM localhost/alpine:latest +# VOLUME /opt/store +# VOLUME /opt/stash +# ADD etc/skel/* /etc/skel/ +ARG ID=908 +ARG WORKER=worker +ARG WORKER_HOME=/home/${WORKER} +RUN apk add build-base zstd-dev curl make git linux-headers openssl-dev pkgconf clang m4 tree-sitter +RUN mkdir /usr/share/lisp +RUN mkdir /usr/local/share/lisp +WORKDIR /usr/local/src +RUN hg clone https://vc.compiler.company/comp/infra +RUN hg clone https://vc.compiler.company/comp/core +WORKDIR infra +ENV CARGO_HOME="/usr/local/share/cargo" +ENV RUSTUP_HOME="/usr/local/share/rustup" +RUN make rustup-install tree-sitter-langs-install +ENV PATH="$PATH:/usr/local/share/cargo/bin" +RUN rustup update +#RUN rustup default nightly # disabled due to issue with zellij build +ADD etc/sbclrc /etc/sbclrc +RUN cd .. && rm -rf infra core +RUN adduser -D -u ${ID} -k /etc/skel ${WORKER} +USER ${WORKER} +WORKDIR ${WORKER_HOME} +ENV WORKER=${WORKER} +ENV WORKER_ID=${ID} +ENV WORKER_HOME=${WORKER_HOME} +ENTRYPOINT ["sh"] \ No newline at end of file diff -r ee3bce140f7e -r 94227525d5ce makefile --- a/makefile Tue May 21 17:17:36 2024 -0400 +++ b/makefile Fri May 24 20:01:52 2024 +0000 @@ -17,21 +17,22 @@ B:=build D:=dist SRC:=code +CONTAINERS:=containers HG_COMMIT:=$(shell hg id -i) DESTINATION:=/mnt/y/data/packy # requires emacs-build-minimal # artifacts can deploy to dist/TARGET - need target triple first # init:sbcl rust emacs rocksdb code # dist/linux dist/rust dist/bundle -archlinux:Containerfile.archlinux;podman build -f $< -t archlinux -box:Containerfile.box archlinux;podman build -f $< -t box -alpine:Containerfile.alpine;podman build -f $< -t alpine -ubuntu:Containerfile.ubuntu;podman build -f $< -t ubuntu -worker:Containerfile.worker alpine;podman build -f $< -t worker -operator:Containerfile.operator box;podman build -f $< -t operator +archlinux:$(CONTAINERS)/Containerfile.archlinux;podman build -f $< -t archlinux +box:$(CONTAINERS)/Containerfile.box archlinux;podman build -f $< -t box +alpine:$(CONTAINERS)/Containerfile.alpine;podman build -f $< -t alpine +ubuntu:$(CONTAINERS)/Containerfile.ubuntu;podman build -f $< -t ubuntu +worker:$(CONTAINERS)/Containerfile.worker alpine;podman build -f $< -t worker +operator:$(CONTAINERS)/Containerfile.operator box;podman build -f $< -t operator pods:archlinux alpine ubuntu box worker operator quick:code -all:dist/cdn dist/code dist/lisp dist/rust dist/sbcl dist/rocksdb dist/emacs dist/pods +all:dist/code dist/lisp dist/rust dist/sbcl dist/rocksdb dist/emacs dist/pods clean:;rm -rf $(B) $(D) $(B):;mkdir -pv $@/src $(D):;mkdir -pv $@/bin $@/lib $@/include $@/bundle $@/share @@ -45,7 +46,7 @@ $< $(LINUX_VERSION) build build/$@/keyring.gpg cd build && unxz $@.tar.xz && tar -xvf $@.tar $(LINUX_TARGET) linux-config:$(LINUX_TARGET); - cd build/$< && make mrproper -j && zcat /proc/config.gz > .config && yes N | make localmodconfig + cd build/$< && make mrproper -j && zcat /proc/config.gz > .config && yes N | make localmodconfig clean-linux::;rm -rf build/$(LINUX_TARGET) ### Emacs