Update chez-ssl/chez-https refs to jerboa-ssl/jerboa-https
ober
dee1a2a0dd7f6781d183ef3f7773554fc0c1c265
--- a/Makefile +++ b/Makefile @@ -2,13 +2,13 @@ JERBOA_HOME ?= $(HOME)/mine/jerboa SCHEME ?= $(JERBOA_HOME)/.chez/bin/scheme JERBOA ?= $(JERBOA_HOME)/lib GHERKIN ?= $(HOME)/mine/gherkin/src -CHEZHTTPS ?= $(HOME)/mine/chez-https/src -CHEZSSL ?= $(HOME)/mine/chez-ssl/src -LIBDIRS = lib:$(JERBOA):$(GHERKIN):$(CHEZHTTPS):$(CHEZSSL) +JERBOAHTTPS ?= $(HOME)/mine/jerboa-https/src +JERBOASSL ?= $(HOME)/mine/jerboa-ssl/src +LIBDIRS = lib:$(JERBOA):$(GHERKIN):$(JERBOAHTTPS):$(JERBOASSL) COMPILE = $(SCHEME) -q --libdirs $(LIBDIRS) --compile-imported-libraries # Cross-compile uses libdirs minus gherkin (unused by jerboa-aws code). -XC_LIBDIRS = lib:$(JERBOA):$(CHEZHTTPS):$(CHEZSSL) +XC_LIBDIRS = lib:$(JERBOA):$(JERBOAHTTPS):$(JERBOASSL) MUSL_OPENSSL_DIR ?= $(HOME)/musl-openssl FREEBSD_SYSROOT ?= $(HOME)/freebsd-sysroot @@ -57,12 +57,12 @@ clean: rm -f petite_boot.h scheme_boot.h jaws_program.h # ── Cross-compile targets ────────────────────────────────────────────────── -# Linux x86_64 musl (static): bundles chez-ssl/chez-https + AWS code into a +# Linux x86_64 musl (static): bundles jerboa-ssl/jerboa-https + AWS code into a # single ELF. Requires: # - $(JERBOA_HOME)/.chez-cross-ta6le (cross-built Chez install) # - x86_64-linux-musl-gcc on PATH # - $(MUSL_OPENSSL_DIR)/usr/{lib,include} (Alpine static libssl.a + libcrypto.a) -# - $(CHEZSSL)/../chez_ssl_shim-linux-musl.o +# - $(JERBOASSL)/../jerboa_ssl_shim-linux-musl.o # linux: linux-amd64 linux-amd64: jerboa-aws-linux-amd64 @@ -73,8 +73,8 @@ jerboa-aws-linux-amd64: echo "Error: $(JERBOA_HOME)/.chez-cross-ta6le missing. cd $(JERBOA_HOME) && make binary"; exit 1; } @test -f $(MUSL_OPENSSL_DIR)/usr/lib/libssl.a || { \ echo "Error: $(MUSL_OPENSSL_DIR)/usr/lib/libssl.a missing."; exit 1; } - @test -f $(CHEZSSL)/../chez_ssl_shim-linux-musl.o || { \ - echo "Error: chez_ssl_shim-linux-musl.o missing. cd $(CHEZSSL)/.. && make chez_ssl_shim-linux-musl.o"; exit 1; } + @test -f $(JERBOASSL)/../jerboa_ssl_shim-linux-musl.o || { \ + echo "Error: jerboa_ssl_shim-linux-musl.o missing. cd $(JERBOASSL)/.. && make jerboa_ssl_shim-linux-musl.o"; exit 1; } JERBOA_HOME=$(JERBOA_HOME) MUSL_OPENSSL_DIR=$(MUSL_OPENSSL_DIR) \ $(SCHEME) -q --libdirs "$(XC_LIBDIRS)" --script build-jaws-cross.ss @@ -83,7 +83,7 @@ jerboa-aws-linux-amd64: # - $(JERBOA_HOME)/.chez-cross-ta6fb (cross-built Chez install) # - x86_64-unknown-freebsd14-clang wrapper on PATH # - $(FREEBSD_SYSROOT) (extracted base.txz) -# - $(CHEZSSL)/../chez_ssl_shim-freebsd-amd64.o +# - $(JERBOASSL)/../jerboa_ssl_shim-freebsd-amd64.o # freebsd: freebsd-amd64 freebsd-amd64: jerboa-aws-freebsd-amd64 @@ -94,8 +94,8 @@ jerboa-aws-freebsd-amd64: echo "Error: $(JERBOA_HOME)/.chez-cross-ta6fb missing. cd $(JERBOA_HOME) && make binary"; exit 1; } @test -d $(FREEBSD_SYSROOT) || { \ echo "Error: $(FREEBSD_SYSROOT) missing. Extract base.txz to ~/freebsd-sysroot"; exit 1; } - @test -f $(CHEZSSL)/../chez_ssl_shim-freebsd-amd64.o || { \ - echo "Error: chez_ssl_shim-freebsd-amd64.o missing. cd $(CHEZSSL)/.. && make chez_ssl_shim-freebsd-amd64.o"; exit 1; } + @test -f $(JERBOASSL)/../jerboa_ssl_shim-freebsd-amd64.o || { \ + echo "Error: jerboa_ssl_shim-freebsd-amd64.o missing. cd $(JERBOASSL)/.. && make jerboa_ssl_shim-freebsd-amd64.o"; exit 1; } JERBOA_HOME=$(JERBOA_HOME) FREEBSD_SYSROOT=$(FREEBSD_SYSROOT) \ $(SCHEME) -q --libdirs "$(XC_LIBDIRS)" --script build-jaws-freebsd-cross.ss --- a/build-jaws-cross.ss +++ b/build-jaws-cross.ss @@ -9,14 +9,14 @@ ;;; - $JERBOA_HOME/.chez-cross-ta6le/ — cross-built Chez install (ta6le) ;;; - $JERBOA_HOME/build/chez/xc-ta6le/s/xpatch — host -> ta6le emit-mode loader ;;; - x86_64-linux-musl-gcc — C compile + final static link -;;; - ~/mine/chez-ssl/chez_ssl_shim-linux-musl.o (built by chez-ssl Makefile) +;;; - ~/mine/jerboa-ssl/jerboa_ssl_shim-linux-musl.o (built by jerboa-ssl Makefile) ;;; - ~/musl-openssl/usr/{lib,include} — Alpine static libssl.a + libcrypto.a ;;; ;;; Produces: jerboa-aws-linux-amd64 (static Linux x86_64 ELF). ;;; ;;; Architecture: WPO-as-program (single .wp.so loaded via Sscheme_program). The -;;; chez-ssl C surface (chez_ssl_*/chez_tcp_*) is statically linked from -;;; chez_ssl_shim.o and registered via Sforeign_symbol so a -static binary +;;; jerboa-ssl C surface (jerboa_ssl_*/jerboa_tcp_*) is statically linked from +;;; jerboa_ssl_shim.o and registered via Sforeign_symbol so a -static binary ;;; resolves it without dlsym. (import (chezscheme)) @@ -33,13 +33,13 @@ (define entry-script "aws.ss") (define aws-repo (current-directory)) -(define chez-ssl-repo - (or (getenv "CHEZSSL_REPO") (format "~a/mine/chez-ssl" (getenv "HOME")))) -(define chez-https-repo - (or (getenv "CHEZHTTPS_REPO") (format "~a/mine/chez-https" (getenv "HOME")))) -(define chez-ssl-shim-o - (or (getenv "CHEZ_SSL_SHIM_LINUX_O") - (format "~a/chez_ssl_shim-linux-musl.o" chez-ssl-repo))) +(define jerboa-ssl-repo + (or (getenv "JERBOASSL_REPO") (format "~a/mine/jerboa-ssl" (getenv "HOME")))) +(define jerboa-https-repo + (or (getenv "JERBOAHTTPS_REPO") (format "~a/mine/jerboa-https" (getenv "HOME")))) +(define jerboa-ssl-shim-o + (or (getenv "JERBOA_SSL_SHIM_LINUX_O") + (format "~a/jerboa_ssl_shim-linux-musl.o" jerboa-ssl-repo))) (define musl-openssl-dir (or (getenv "MUSL_OPENSSL_DIR") (format "~a/musl-openssl" (getenv "HOME")))) @@ -66,7 +66,7 @@ (require-file (format "~a/petite.boot" cross-csv-dir)) (require-file (format "~a/scheme.boot" cross-csv-dir)) (require-file entry-script) -(require-file chez-ssl-shim-o) +(require-file jerboa-ssl-shim-o) (require-file (format "~a/usr/lib/libssl.a" musl-openssl-dir)) (require-file (format "~a/usr/lib/libcrypto.a" musl-openssl-dir)) @@ -75,7 +75,7 @@ (printf " cross csv-dir: ~a~n" cross-csv-dir) (printf " xpatch: ~a~n" xpatch) (printf " cross-cc: ~a~n" cross-cc) -(printf " chez-ssl shim: ~a~n" chez-ssl-shim-o) +(printf " jerboa-ssl shim: ~a~n" jerboa-ssl-shim-o) (printf " musl openssl: ~a~n" musl-openssl-dir) (printf " output: ~a~n" output) (printf "~n") @@ -89,8 +89,8 @@ (append (list (cons (format "~a/lib" aws-repo) (format "~a/lib" aws-repo)) (cons (format "~a/lib" jerboa-home) (format "~a/lib" jerboa-home)) - (cons (format "~a/src" chez-https-repo) (format "~a/src" chez-https-repo)) - (cons (format "~a/src" chez-ssl-repo) (format "~a/src" chez-ssl-repo))) + (cons (format "~a/src" jerboa-https-repo) (format "~a/src" jerboa-https-repo)) + (cons (format "~a/src" jerboa-ssl-repo) (format "~a/src" jerboa-ssl-repo))) orig-libdirs)) (compile-imported-libraries #t) @@ -139,23 +139,23 @@ ;; ── Stage 5: generate main.c ─────────────────────────────────────────────── (define main-c-path (string-append output "-main.c")) -;; chez-ssl/chez_ssl_shim.c symbol surface — must match the foreign-procedure -;; declarations in chez-ssl.sls. -(define chez-ssl-symbols - '("chez_ssl_init" "chez_ssl_cleanup" - "chez_ssl_connect" "chez_ssl_write" "chez_ssl_read" - "chez_ssl_read_all" "chez_ssl_free_buf" "chez_ssl_close" - "chez_ssl_memcpy" - "chez_ssl_server_ctx" "chez_ssl_server_accept" "chez_ssl_server_ctx_free" - "chez_tcp_listen" "chez_tcp_accept" - "chez_tcp_connect" "chez_tcp_close" - "chez_tcp_read" "chez_tcp_write" "chez_tcp_read_all" - "chez_tcp_set_timeout" - "chez_tcp_conn_wrap" - "chez_conn_write" "chez_conn_read")) +;; jerboa-ssl/jerboa_ssl_shim.c symbol surface — must match the foreign-procedure +;; declarations in jerboa-ssl.sls. +(define jerboa-ssl-symbols + '("jerboa_ssl_init" "jerboa_ssl_cleanup" + "jerboa_ssl_connect" "jerboa_ssl_write" "jerboa_ssl_read" + "jerboa_ssl_read_all" "jerboa_ssl_free_buf" "jerboa_ssl_close" + "jerboa_ssl_memcpy" + "jerboa_ssl_server_ctx" "jerboa_ssl_server_accept" "jerboa_ssl_server_ctx_free" + "jerboa_tcp_listen" "jerboa_tcp_accept" + "jerboa_tcp_connect" "jerboa_tcp_close" + "jerboa_tcp_read" "jerboa_tcp_write" "jerboa_tcp_read_all" + "jerboa_tcp_set_timeout" + "jerboa_tcp_conn_wrap" + "jerboa_conn_write" "jerboa_conn_read")) -(printf "==> [5/6] generate ~a (~a chez-ssl symbols)~n" - main-c-path (length chez-ssl-symbols)) +(printf "==> [5/6] generate ~a (~a jerboa-ssl symbols)~n" + main-c-path (length jerboa-ssl-symbols)) (define (write-main-c) (call-with-port @@ -185,11 +185,11 @@ (display "static char dlerror_msg[] = \"static binary: dlopen stubbed\";\n" out) (display "char *dlerror(void) { return dlerror_msg; }\n\n" out) - ;; extern decls for chez-ssl symbols - (display "/* chez_ssl_shim.o exports — registered with Sforeign_symbol below. */\n" out) + ;; extern decls for jerboa-ssl symbols + (display "/* jerboa_ssl_shim.o exports — registered with Sforeign_symbol below. */\n" out) (for-each (lambda (sym) (display (format "extern void ~a(void);\n" sym) out)) - chez-ssl-symbols) + jerboa-ssl-symbols) (newline out) (display "int main(int argc, char *argv[]) {\n" out) @@ -216,12 +216,12 @@ (display " Sregister_boot_file_bytes(\"petite\", (void*)petite_boot, petite_boot_size);\n" out) (display " Sregister_boot_file_bytes(\"scheme\", (void*)scheme_boot, scheme_boot_size);\n\n" out) - (display " /* Register chez_ssl_shim symbols so a -static binary resolves\n" out) - (display " * (foreign-procedure \"chez_ssl_*\" ...) without dlsym. */\n" out) + (display " /* Register jerboa_ssl_shim symbols so a -static binary resolves\n" out) + (display " * (foreign-procedure \"jerboa_ssl_*\" ...) without dlsym. */\n" out) (for-each (lambda (sym) (display (format " Sforeign_symbol(\"~a\", (void*)~a);\n" sym sym) out)) - chez-ssl-symbols) + jerboa-ssl-symbols) (newline out) (display " Sbuild_heap(NULL, NULL);\n" out) @@ -250,7 +250,7 @@ "-o ~a") cross-cc cross-csv-dir musl-openssl-dir - main-c-path chez-ssl-shim-o + main-c-path jerboa-ssl-shim-o cross-csv-dir cross-csv-dir cross-csv-dir musl-openssl-dir musl-openssl-dir output)) --- a/build-jaws-freebsd-cross.ss +++ b/build-jaws-freebsd-cross.ss @@ -9,7 +9,7 @@ ;;; - $JERBOA_HOME/.chez-cross-ta6fb/ — cross-built Chez install (ta6fb) ;;; - $JERBOA_HOME/build/chez/xc-ta6fb/s/xpatch — host -> ta6fb emit-mode loader ;;; - x86_64-unknown-freebsd14-clang — wrapper with sysroot + lld + libpath -;;; - ~/mine/chez-ssl/chez_ssl_shim-freebsd-amd64.o +;;; - ~/mine/jerboa-ssl/jerboa_ssl_shim-freebsd-amd64.o ;;; - ~/freebsd-sysroot/usr/lib/{libssl,libcrypto,...}.so (dynamic link) ;;; ;;; Produces: jerboa-aws-freebsd-amd64 (dynamic FreeBSD x86_64 ELF). Dynamic @@ -30,13 +30,13 @@ (define entry-script "aws.ss") (define aws-repo (current-directory)) -(define chez-ssl-repo - (or (getenv "CHEZSSL_REPO") (format "~a/mine/chez-ssl" (getenv "HOME")))) -(define chez-https-repo - (or (getenv "CHEZHTTPS_REPO") (format "~a/mine/chez-https" (getenv "HOME")))) -(define chez-ssl-shim-o - (or (getenv "CHEZ_SSL_SHIM_FREEBSD_O") - (format "~a/chez_ssl_shim-freebsd-amd64.o" chez-ssl-repo))) +(define jerboa-ssl-repo + (or (getenv "JERBOASSL_REPO") (format "~a/mine/jerboa-ssl" (getenv "HOME")))) +(define jerboa-https-repo + (or (getenv "JERBOAHTTPS_REPO") (format "~a/mine/jerboa-https" (getenv "HOME")))) +(define jerboa-ssl-shim-o + (or (getenv "JERBOA_SSL_SHIM_FREEBSD_O") + (format "~a/jerboa_ssl_shim-freebsd-amd64.o" jerboa-ssl-repo))) (define freebsd-sysroot (or (getenv "FREEBSD_SYSROOT") (format "~a/freebsd-sysroot" (getenv "HOME")))) @@ -63,7 +63,7 @@ (require-file (format "~a/petite.boot" cross-csv-dir)) (require-file (format "~a/scheme.boot" cross-csv-dir)) (require-file entry-script) -(require-file chez-ssl-shim-o) +(require-file jerboa-ssl-shim-o) (require-file (format "~a/usr/lib/libssl.so" freebsd-sysroot)) (printf "==> build-jaws-freebsd-cross~n") @@ -71,7 +71,7 @@ (printf " cross csv-dir: ~a~n" cross-csv-dir) (printf " xpatch: ~a~n" xpatch) (printf " cross-cc: ~a~n" cross-cc) -(printf " chez-ssl shim: ~a~n" chez-ssl-shim-o) +(printf " jerboa-ssl shim: ~a~n" jerboa-ssl-shim-o) (printf " freebsd sysroot: ~a~n" freebsd-sysroot) (printf " output: ~a~n" output) (printf "~n") @@ -84,8 +84,8 @@ (append (list (cons (format "~a/lib" aws-repo) (format "~a/lib" aws-repo)) (cons (format "~a/lib" jerboa-home) (format "~a/lib" jerboa-home)) - (cons (format "~a/src" chez-https-repo) (format "~a/src" chez-https-repo)) - (cons (format "~a/src" chez-ssl-repo) (format "~a/src" chez-ssl-repo))) + (cons (format "~a/src" jerboa-https-repo) (format "~a/src" jerboa-https-repo)) + (cons (format "~a/src" jerboa-ssl-repo) (format "~a/src" jerboa-ssl-repo))) orig-libdirs)) (compile-imported-libraries #t) @@ -134,21 +134,21 @@ ;; ── Stage 5: generate main.c ─────────────────────────────────────────────── (define main-c-path (string-append output "-main.c")) -(define chez-ssl-symbols - '("chez_ssl_init" "chez_ssl_cleanup" - "chez_ssl_connect" "chez_ssl_write" "chez_ssl_read" - "chez_ssl_read_all" "chez_ssl_free_buf" "chez_ssl_close" - "chez_ssl_memcpy" - "chez_ssl_server_ctx" "chez_ssl_server_accept" "chez_ssl_server_ctx_free" - "chez_tcp_listen" "chez_tcp_accept" - "chez_tcp_connect" "chez_tcp_close" - "chez_tcp_read" "chez_tcp_write" "chez_tcp_read_all" - "chez_tcp_set_timeout" - "chez_tcp_conn_wrap" - "chez_conn_write" "chez_conn_read")) - -(printf "==> [5/6] generate ~a (~a chez-ssl symbols)~n" - main-c-path (length chez-ssl-symbols)) +(define jerboa-ssl-symbols + '("jerboa_ssl_init" "jerboa_ssl_cleanup" + "jerboa_ssl_connect" "jerboa_ssl_write" "jerboa_ssl_read" + "jerboa_ssl_read_all" "jerboa_ssl_free_buf" "jerboa_ssl_close" + "jerboa_ssl_memcpy" + "jerboa_ssl_server_ctx" "jerboa_ssl_server_accept" "jerboa_ssl_server_ctx_free" + "jerboa_tcp_listen" "jerboa_tcp_accept" + "jerboa_tcp_connect" "jerboa_tcp_close" + "jerboa_tcp_read" "jerboa_tcp_write" "jerboa_tcp_read_all" + "jerboa_tcp_set_timeout" + "jerboa_tcp_conn_wrap" + "jerboa_conn_write" "jerboa_conn_read")) + +(printf "==> [5/6] generate ~a (~a jerboa-ssl symbols)~n" + main-c-path (length jerboa-ssl-symbols)) (define (write-main-c) (call-with-port @@ -173,11 +173,11 @@ (display "extern int *__error(void);\n" out) (display "int *__errno_location(void) { return __error(); }\n\n" out) - ;; extern decls for chez-ssl symbols - (display "/* chez_ssl_shim.o exports — registered with Sforeign_symbol below. */\n" out) + ;; extern decls for jerboa-ssl symbols + (display "/* jerboa_ssl_shim.o exports — registered with Sforeign_symbol below. */\n" out) (for-each (lambda (sym) (display (format "extern void ~a(void);\n" sym) out)) - chez-ssl-symbols) + jerboa-ssl-symbols) (newline out) (display "int main(int argc, char *argv[]) {\n" out) @@ -206,11 +206,11 @@ (display " Sregister_boot_file_bytes(\"petite\", (void*)petite_boot, petite_boot_size);\n" out) (display " Sregister_boot_file_bytes(\"scheme\", (void*)scheme_boot, scheme_boot_size);\n\n" out) - (display " /* Register chez_ssl_shim symbols so the WPO resolves them at runtime. */\n" out) + (display " /* Register jerboa_ssl_shim symbols so the WPO resolves them at runtime. */\n" out) (for-each (lambda (sym) (display (format " Sforeign_symbol(\"~a\", (void*)~a);\n" sym sym) out)) - chez-ssl-symbols) + jerboa-ssl-symbols) (newline out) (display " Sbuild_heap(NULL, NULL);\n" out) @@ -239,7 +239,7 @@ "-o ~a") cross-cc cross-csv-dir - main-c-path chez-ssl-shim-o + main-c-path jerboa-ssl-shim-o cross-csv-dir cross-csv-dir cross-csv-dir output)) --- a/lib/jerboa-aws/api.sls +++ b/lib/jerboa-aws/api.sls @@ -88,7 +88,7 @@ (aws-client-secret-key client) ts ds)] [all-headers (cons (cons "Authorization" auth) headers)] - ;; Convert (name . value) pairs to (name :: value) for chez-https + ;; Convert (name . value) pairs to (name :: value) for jerboa-https [https-headers (map (lambda (h) (list (car h) ':: (cdr h))) all-headers)] [url (string-append "https://" host "/")] --- a/lib/jerboa-aws/json-api.sls +++ b/lib/jerboa-aws/json-api.sls @@ -85,7 +85,7 @@ (aws-json-client-secret-key client) ts ds)] [all-headers (cons (cons "Authorization" auth) headers)] - ;; Convert (name . value) pairs to (name :: value) for chez-https + ;; Convert (name . value) pairs to (name :: value) for jerboa-https [https-headers (map (lambda (h) (list (car h) ':: (cdr h))) all-headers)] [url (string-append "https://" host "/")] --- a/lib/jerboa-aws/request.sls +++ b/lib/jerboa-aws/request.sls @@ -1,6 +1,6 @@ #!chezscheme ;;; (jerboa-aws request) -- HTTPS HTTP client via bundled Rustls -;;; Re-exports the old chez-https-shaped API for AWS API calls. +;;; Re-exports the old jerboa-https-shaped API for AWS API calls. (library (jerboa-aws request) (export http-get http-post http-put http-delete http-head @@ -9,7 +9,7 @@ (import (chezscheme) (prefix (std net request) req:)) - ;; Compatibility shim for the old chez-https call shape used by the AWS + ;; Compatibility shim for the old jerboa-https call shape used by the AWS ;; modules: (http-post url 'headers: '(("x" :: "y")) 'data: body). (define (kw-ref args key default) (let loop ([xs args]) --- a/lib/jerboa-aws/s3/api.sls +++ b/lib/jerboa-aws/s3/api.sls @@ -93,7 +93,7 @@ (s3-client-secret-key client) ts ds)] [all-headers (cons (cons "Authorization" auth) headers)] - ;; Convert (name . value) pairs to (name :: value) for chez-https + ;; Convert (name . value) pairs to (name :: value) for jerboa-https [https-headers (map (lambda (h) (list (car h) ':: (cdr h))) all-headers)] [url (string-append "https://" host path)])