Ship Chez notices in Jerboa releases

ober

235f8da8cd32000e0c387fdb153dc0a38cbebaa5

diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..303b591
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,46 @@
+Jerboa
+======
+
+Jerboa vendors Chez Scheme under vendor/ChezScheme/ and may redistribute
+Chez-derived runtime code in source trees and binary release artifacts.
+
+The full Apache License 2.0 text for Chez Scheme is distributed with Jerboa in
+LICENSE-CHEZ and vendor/ChezScheme/LICENSE. The upstream Chez notice is also
+included in LICENSE-CHEZ and reproduced below.
+
+Chez Scheme notice
+------------------
+
+Chez Scheme Version 10.4.0
+Copyright 1984-2025 Cisco Systems, Inc.
+
+This product includes code developed by Cisco Systems, Inc.
+
+This product also includes separately copyrighted:
+
+* Unicode data files from the Unicode Consortium
+
+* Unicode data-file processing code developed by Abdulaziz Ghuloum and
+  R. Kent Dybvig
+
+* sorting code developed by Olin Shivers
+
+* example programs, an html formatting module, and documentation
+  support files developed by R. Kent Dybvig
+
+* test code and other code used for testing developed by
+  William D Clinger, by Dirk Lutzebaeck, and by Oscar Waddell and
+  R. Kent Dybvig.
+
+* code derived from C. David Boyer's command-line editor
+
+Builds of this product incorporate separately copyrighted code from:
+
+* the Nanopass Infrastructure, developed by Dipanwita Sarkar,
+  Andrew W. Keep, R. Kent Dybvig, and Oscar Waddell
+
+* the Zlib compression library, developed by Jean-loup Gailly and
+  Mark Adler
+
+* the LZ4 compression library, developed by Yann Collet and
+  contributors.
diff --git a/README.md b/README.md
index c0653ed..19e6da8 100644
--- a/README.md
+++ b/README.md
@@ -147,12 +147,23 @@ language needs:
 - Fast fixnum arithmetic and bytevector-heavy protocol code.
 - Stable FFI via `foreign-procedure` and `foreign-callable`.
 - A mature native-code compiler with whole-program optimization paths.
-- Apache 2.0 licensing.
+- Apache 2.0 licensing for Chez Scheme; see [`LICENSE-CHEZ`](LICENSE-CHEZ)
+  and [`NOTICE`](NOTICE).
 
 The repository can use stock Chez 10.x. It also vendors an additive
 Chez tree under [`vendor/ChezScheme/`](vendor/ChezScheme) for primitives
 the standard library can use without changing the user-facing language.
 
+## Licensing and Notices
+
+Jerboa vendors Chez Scheme under [`vendor/ChezScheme/`](vendor/ChezScheme).
+Chez Scheme is licensed under Apache License 2.0, and its upstream NOTICE text
+must remain available when Jerboa source or binary artifacts redistribute
+Chez-derived code. Keep [`LICENSE-CHEZ`](LICENSE-CHEZ), [`NOTICE`](NOTICE),
+`vendor/ChezScheme/LICENSE`, and `vendor/ChezScheme/NOTICE` with source
+distributions. Jerboa release tarballs include the top-level notice files and
+a `share/licenses/jerboa/` copy of the original Chez license and notice.
+
 ## Reader Syntax
 
 Jerboa extends the Chez reader with Gerbil-inspired syntax:
diff --git a/docs/release-artifacts.md b/docs/release-artifacts.md
index 11c9959..6cd092b 100644
--- a/docs/release-artifacts.md
+++ b/docs/release-artifacts.md
@@ -20,8 +20,17 @@ jerboa-vX.Y.Z-<target>/bin/jerbuild -> jerboa
 jerboa-vX.Y.Z-<target>/bin/jpkg     -> jerboa
 jerboa-vX.Y.Z-<target>/bin/jmcp     -> jerboa
 jerboa-vX.Y.Z-<target>/bin/jlsp     -> jerboa
+jerboa-vX.Y.Z-<target>/README.md
+jerboa-vX.Y.Z-<target>/NOTICE
+jerboa-vX.Y.Z-<target>/LICENSE-CHEZ
+jerboa-vX.Y.Z-<target>/share/licenses/jerboa/ChezScheme-LICENSE
+jerboa-vX.Y.Z-<target>/share/licenses/jerboa/ChezScheme-NOTICE
 ```
 
+The notice files are part of the artifact contract. Jerboa binaries embed
+Chez-derived runtime code, so release archives must ship the Apache 2.0 license
+and Chez NOTICE text alongside the executable.
+
 ## End-User Install
 
 Install the base Jerboa toolchain with:
diff --git a/support/package-jerboa-release.sh b/support/package-jerboa-release.sh
index 6aaea21..a7d3110 100755
--- a/support/package-jerboa-release.sh
+++ b/support/package-jerboa-release.sh
@@ -60,6 +60,13 @@ for link in jmcp jlsp jerbuild jpkg; do
     ln -sf jerboa "$tmp/$name/bin/$link"
 done
 
+for doc in README.md NOTICE LICENSE-CHEZ; do
+    cp "$doc" "$tmp/$name/$doc"
+done
+mkdir -p "$tmp/$name/share/licenses/jerboa"
+cp vendor/ChezScheme/LICENSE "$tmp/$name/share/licenses/jerboa/ChezScheme-LICENSE"
+cp vendor/ChezScheme/NOTICE "$tmp/$name/share/licenses/jerboa/ChezScheme-NOTICE"
+
 if [ -z "${SOURCE_DATE_EPOCH:-}" ]; then
     SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)
 fi