Adopt MPL 2.0 (compiler) + zlib (runtime/libs) — licensing rollout
- Type: task (meta / repo-wide) — Track A (headers in compiler/) + B (lib/) + D (docs/website copy)
- Status: backlog — decision made 2026-07-02, implementation open
- Owner: —
Decision (final)
- Compiler and tools (
compiler/**,tools/**): MPL 2.0. - Runtime and libraries embedded in compiled output (
lib/rtl,lib/pcl,lib/crtl,lib/asmcore,compiler/builtin/**): zlib license — user binaries produced by the compiler carry no obligations. - Examples (
examples/**): 0BSD (copy-paste freely). - Docs (
docs/**): CC BY 4.0. - Contributions: DCO sign-off required from the first external PR onward. While the sole human author remains the only copyright holder, relicensing stays a unilateral option; DCO keeps that traceable once contributors join.
- Name/identity: the license governs code, not the project name. When the website/identity pass happens (Track D), decide the name policy explicitly (forks may take the code, not the identity).
- Commercial support / paid feature work stays available as an offering; it needs no special license terms.
Implementation checklist
- Replace
LICENSE.mdplaceholder: MPL 2.0 full text asLICENSE, plus a shortLICENSE.mdoverview table mapping directories to licenses, with zlib/0BSD/CC-BY texts underlicenses/. - SPDX header line in every source file (
{ SPDX-License-Identifier: MPL-2.0 }in .pas/.inc;/* SPDX-License-Identifier: Zlib */in crtl C) — one line per file instead of a full license block; machine-readable for GitHub and license scanners. Script the sweep; headers are comments, but verifymake test+ self-host byte-identical after (that is the gate). - Update
README.mdLicense section (currently says "no license yet"). - Add DCO text (
docs/CONTRIBUTING.mdor repo root) — Track D wording pass. Enforce sign-off (Signed-off-by:) on external PRs from day one. - Website license page (Track D, when the site work starts).
Acceptance
LICENSE files in place, SPDX headers repo-wide, README/docs consistent,
make test + self-host green after the header sweep, board regenerated.
Done (2026-07-02)
LICENSE= MPL 2.0 (canonical text);licenses/Zlib.txt,licenses/0BSD.txt;LICENSE.md= per-directory map + third-party statement;CONTRIBUTING.mdwith DCO sign-off requirement; README License section updated.- SPDX one-liner in all 229 tracked source files (MPL-2.0: compiler+tools; Zlib: builtin/rtl/pcl/crtl/asmcore; 0BSD: examples). docs/devdocs/test covered by the LICENSE.md map, no per-file headers.
- Foreign-code audit: repo contains none.
test/dl.hwas a SYMLINK to the system dlfcn.h (never committed content) — replaced with a minimal project-owned prototype header (also fixes checkouts without glibc headers).library_candidates/(FreeBSD regex etc.) and the Lua corpus are fetched on demand into git-ignored paths. - Gates: full
make test+make lib-testgreen; compiler binary byte-identical after the header sweep (comments only) — no re-pin needed.
Addendum (2026-07-02): contributor license grant
User decision: pull requests additionally require a contributor license grant — contributor keeps copyright but grants the maintainer an irrevocable license including the right to RELICENSE, so the project can move off MPL 2.0 if it ever creates problems (no intention to, but the option must not depend on chasing past contributors). Implemented as a grant (not a waiver/assignment — waivers are unenforceable in several jurisdictions) in CONTRIBUTING.md; LICENSE.md references it. GitHub-side DCO enforcement + CI-before-compiler-PRs remain future work when contributions actually open up.