changeset 20: |
3166a511fafb |
parent 19: |
fd19fdc77a20 |
child 21: |
1059e7b52e47 |
author: |
ellis <ellis@rwest.io> |
date: |
Sat, 03 Jun 2023 19:57:10 -0400 |
files: |
Dockerfile demo.asd docs/notes.org install.lisp makefile pkg.lisp |
description: |
notes and dockerfile init |
1.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2+++ b/Dockerfile Sat Jun 03 19:57:10 2023 -0400
1.3@@ -0,0 +1,65 @@
1.4+ARG ROSWELL_IMAGE=fukamachi/roswell
1.5+ARG ROSWELL_VERSION
1.6+ARG OS=debian
1.7+FROM fukamachi/roswell:latest-$OS AS build-env
1.8+ARG OS
1.9+ARG VERSION
1.10+ADD https://github.com/sbcl/sbcl/archive/sbcl-$VERSION.tar.gz sbcl.tar.gz
1.11+
1.12+RUN set -x; \
1.13+ arch="$(case $(uname -m) in amd64|x86_64) echo x86-64;; aarch64) echo arm64;; *) uname -m ;; esac)"; \
1.14+ if [ "$OS" = "alpine" ]; then \
1.15+ apk add --update build-base linux-headers zstd-dev; \
1.16+ else \
1.17+ apt-get update && apt-get -y install --no-install-recommends \
1.18+ build-essential \
1.19+ zlib1g-dev \
1.20+ libzstd-dev \
1.21+ time; \
1.22+ fi; \
1.23+ ros install sbcl-bin/2.2.7 && \
1.24+ tar xvfz sbcl.tar.gz && rm sbcl.tar.gz && cd "sbcl-sbcl-${VERSION}" && \
1.25+ echo "\"$VERSION\"" > version.lisp-expr && \
1.26+ (sh make.sh \
1.27+ --with-sb-core-compression \
1.28+ "--xc-host=ros -L sbcl-bin without-roswell=t --no-rc run" \
1.29+ "--prefix=$HOME/.roswell/impls/$arch/linux/sbcl-bin/$VERSION/" || true) \
1.30+ && sh install.sh && \
1.31+ rm -f "/root/.roswell/impls/$arch/linux/sbcl-bin/$VERSION/lib/sbcl/sbcl.core.old" \
1.32+ && rm -f "/root/.roswell/impls/$arch/linux/sbcl-bin/$VERSION/bin/sbcl.old" \
1.33+ && find "/root/.roswell/impls/$arch/linux/sbcl-bin" -maxdepth 1 -mindepth 1 | grep -v "/sbcl-bin/$VERSION$" | xargs rm -rf || true \
1.34+ && rm -rf "/root/.roswell/impls/log"
1.35+
1.36+FROM $ROSWELL_IMAGE:$ROSWELL_VERSION-$OS
1.37+# hadolint ignore=DL3010
1.38+COPY --from=build-env /root/.roswell/impls /root/.roswell/impls
1.39+
1.40+ARG BUILD_DATE
1.41+ARG VCS_REF
1.42+ARG OS
1.43+ARG VERSION
1.44+
1.45+LABEL org.label-schema.build-date=$BUILD_DATE \
1.46+ org.label-schema.vcs-ref=$VCS_REF \
1.47+ org.label-schema.vcs-url="https://github.com/fukamachi/dockerfiles" \
1.48+ org.label-schema.version=$VERSION \
1.49+ org.label-schema.schema-version="1.0"
1.50+
1.51+# hadolint ignore=DL3018
1.52+RUN set -x; \
1.53+ if [ "$OS" = "alpine" ]; then \
1.54+ apk add --update --no-cache zstd-libs; \
1.55+ fi; \
1.56+ printf "setup.time\t0\t%s\n" "$(( $(date +%s) + 2208988800 ))" > ~/.roswell/config && \
1.57+ printf "sbcl-bin.version\t0\t%s\n" "$VERSION" >> ~/.roswell/config && \
1.58+ printf "default.lisp\t0\tsbcl-bin\n" >> ~/.roswell/config && \
1.59+ ros setup && \
1.60+ ros -e '(mapc (function ql-dist:uninstall) (ql-dist:installed-releases t))' \
1.61+ && rm -f /root/.roswell/lisp/quicklisp/tmp/quicklisp.tar \
1.62+ && rm -rf /root/.roswell/archives/* /root/.roswell/src/sbcl-* /root/.cache/common-lisp/sbcl-*/root/.roswell/lisp/quicklisp/dists/quicklisp/software
1.63+
1.64+RUN set -x; \
1.65+ printf '#!/bin/sh\nexec ros run -- "$@"\n' > /usr/local/bin/sbcl \
1.66+ && chmod u+x /usr/local/bin/sbcl
1.67+
1.68+ENTRYPOINT ["/usr/local/bin/sbcl"]
1.69\ No newline at end of file
2.1--- a/demo.asd Mon May 29 21:55:22 2023 -0400
2.2+++ b/demo.asd Sat Jun 03 19:57:10 2023 -0400
2.3@@ -26,9 +26,9 @@
2.4 (:file "ui")
2.5 (:file "demo"))
2.6 ;; :in-order-to ((test-op (test-op "demo/tests")))
2.7- ;; :defsystem-depends-on (:deploy)
2.8- ;; :build-operation "deploy"
2.9- :build-pathname "out/demo"
2.10+ :defsystem-depends-on (:deploy)
2.11+ :build-operation "deploy-op"
2.12+ :build-pathname "demo"
2.13 :entry-point "demo:main")
2.14
2.15 ;; (asdf:defsystem "cl-demo:tests"
2.16@@ -36,3 +36,8 @@
2.17 ;; :components ((:file "tests"))
2.18 ;; :perform (test-op (o c) (symbol-call :fiveam '#:run! :cl-demo))
2.19 ;; )
2.20+
2.21+;; (deploy:define-library cl+ssl::libssl
2.22+;; :path "/usr/local/Cellar/openssl@3/3.1.1/lib/libssl.dylib")
2.23+;; (deploy:define-library cl+ssl::libcrypto
2.24+;; :path "/usr/local/Cellar/openssl@3/3.1.1/lib/libcrypto.dylib")
3.1--- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2+++ b/docs/notes.org Sat Jun 03 19:57:10 2023 -0400
3.3@@ -0,0 +1,20 @@
3.4+* research
3.5+** [[https://github.com/screenshotbot/screenshotbot-oss][screenshotbot-oss]]
3.6+- monolithic repo, includes third-party dependencies
3.7+ - full quicklisp source
3.8+ - asdf, etc
3.9+- addresses many of my concerns about running CL in prod
3.10+- the repo is too heavy for my liking though
3.11+- I do like the idea of having many systems though
3.12+** DB
3.13+*** [[https://github.com/fukamachi/mito][mito]]
3.14+ORM, sqlite, postgres, mysql support
3.15+*** [[https://github.com/fukamachi/cl-dbi][cl-dbi]]
3.16+database independent interface
3.17+*** [[https://github.com/fukamachi/sxql][sxql]]
3.18+SQL generator
3.19+** LOGGING
3.20+*** [[https://github.com/sharplispers/log4cl/][log4cl]]
3.21+supports slime
3.22+** UI
3.23+[[https://mcclim.common-lisp.dev/][mcclim]]
4.1--- a/install.lisp Mon May 29 21:55:22 2023 -0400
4.2+++ b/install.lisp Sat Jun 03 19:57:10 2023 -0400
4.3@@ -4,9 +4,9 @@
4.4 (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))))
4.5 (when (probe-file quicklisp-init)
4.6 (load quicklisp-init)))
4.7-(load "demo.asd")
4.8+
4.9+(asdf:load-asd "cl-demo.asd")
4.10+(asdf:loadload "demo.asd")
4.11 (ql:quickload :demo)
4.12-;; (asdf:load-asd "cl-demo.asd")
4.13-;; (asdf:load-system "demo")
4.14 ;; (asdf:make :demo)
4.15 (sb-ext:save-lisp-and-die "out/demo" :toplevel #'demo:main :executable t)
5.1--- a/makefile Mon May 29 21:55:22 2023 -0400
5.2+++ b/makefile Sat Jun 03 19:57:10 2023 -0400
5.3@@ -1,15 +1,23 @@
5.4-M ?= release #mode
5.5-L ?= sbcl #lisp
5.6-P ?= python3 #python
5.7-RS:Cargo.toml build.rs lib.rs obj fig
5.8+M?=release
5.9+L?=sbcl
5.10+L_C=$(L) --no-userinit
5.11+L_S=$(L) --script
5.12+P?=python3
5.13+ARCH?=
5.14+A_C=ifeq ($(ARCH),x86_64) A_C=arch -$(ARCH) endif
5.15+.PHONY:
5.16+RS:Cargo.toml build.rs lib.rs obj
5.17 CL:*.asd *.lisp
5.18+deps:;
5.19 clean:;rm -rf *.fasl;cargo clean
5.20 fmt:$(RS);cargo fmt
5.21-build:$(RS) $(CL);cargo build --$(M);$L --script install.lisp
5.22+build:$(RS) $(CL);cargo build --$(M);$L --load demo.asd \
5.23+ --eval '(ql:quickload :demo)' \
5.24+ --eval '(asdf:make :demo)' \
5.25+ --eval '(quit)'
5.26 ffi:build;cp target/$(M)/libdemo.dylib ffi;cd ffi;$(P) ffi/build.py
5.27 docs:$(RS);cargo doc
5.28 test:$(RS) $(CL);cargo test;$L tests.lisp
5.29 #pack:;scripts/pack.ros
5.30 #check:;scripts/check.ros
5.31 ci:clean fmt build ffi docs test;
5.32-.PHONY:build
6.1--- a/pkg.lisp Mon May 29 21:55:22 2023 -0400
6.2+++ b/pkg.lisp Sat Jun 03 19:57:10 2023 -0400
6.3@@ -2,7 +2,7 @@
6.4 demo
6.5 > (demo:main)
6.6 |#
6.7-(defpackage #:demo
6.8+(defpackage :demo
6.9 (:use #:cl #:cffi)
6.10 (:local-nicknames
6.11 ;; (#:rdb #:cl-rocksdb)