[repo] Licence: CPAL-1.0 file headers instead of the MPL-2.0 notice
Each source file's three-line MPL-2.0 notice becomes an SPDX CPAL-1.0 header with the copyright line; the Exhibit A notice itself is in LICENSE (CPAL 3.5). Shell scripts' SPDX ids follow. Comments only: no code changes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
# SPDX-License-Identifier: CPAL-1.0
|
||||
#
|
||||
# Pre-commit hook (shared with Ianitor). Rejects staged files that must never be in git:
|
||||
# - binaries: any NUL byte anywhere in the staged blob (git attributes do not matter)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
# SPDX-License-Identifier: CPAL-1.0
|
||||
#
|
||||
# Self-test for .githooks/pre-commit. Creates a throw-away repository, points it at the
|
||||
# hook and checks that every forbidden case is rejected and normal files are accepted.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The Fabrica server, as the agent talks to it (docs/02_protocol.md).
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! A small HTTP/1.1 client over rustls: one request per connection, bodies framed by
|
||||
//! `Content-Length` or chunked encoding, every size bounded. The server's answers are hostile.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Legatus, the Fabrica Domi agent (docs/01_legatus.md): enroll with a one-time code, then
|
||||
//! long-poll the Fabrica server over mTLS for jobs, and run them only when the release is signed
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! `legatus`: enroll, run, status.
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! One job, start to end: guard, role, signature and manifest, download, size and SHA-256, and
|
||||
//! only then the target. Every refusal is reported; nothing unsigned reaches a target.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The agent's state dir: who it is, what it trusts, and the job ids it has seen.
|
||||
//!
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The targets this machine offers: Linux (systemd) on Linux, none elsewhere in v0.1.
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! TLS to the Fabrica server: the server is accepted only when its chain ends at the pinned Domi
|
||||
//! root and its leaf is valid for the server's name; the agent presents its own certificate
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! A Domi CA in real time, team release keys, fake targets, and a mock Fabrica server that speaks
|
||||
//! protocol v1 over real TLS with the reference logic (EnrollmentBook, Registry).
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! End to end over real TLS against a mock Fabrica that uses the reference server logic
|
||||
//! (mandatory, tests first): the enrollment code is single use; expired, replayed and foreign
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Nothing unsigned runs (mandatory, tests first): a tampered artifact, a wrong key, a missing or
|
||||
//! garbled signature, a release of something else: refused and reported, and the target is never
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! TEST ONLY: drives the Linux backend with real systemd for tests/linux (the container test).
|
||||
//! It skips the signature check on purpose, so it is an example, never part of a release.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Legatus's Linux (systemd) target (docs/01_legatus.md):
|
||||
//!
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
#![allow(dead_code, clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The Linux target (mandatory, tests first): the atomic symlink switch, the restart, the health
|
||||
//! check, and auto rollback when the check fails. Real files and symlinks; systemd and the health
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Unpacking (tests first): a signed archive can still hold a mistake; nothing escapes the
|
||||
//! release dir, links and special files are refused, and a refused archive leaves nothing behind.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Archive entries (hostile even when signed: a release key can sign a mistake): what may be
|
||||
//! unpacked, and where.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The enrollment code: `lgt1-` and base32 of version, root SHA-256, secret, server URL, checksum.
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The server's side of enrollment codes: issue, and redeem exactly once.
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The agent's job guard: expired, future, too long-lived and replayed jobs are refused.
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The Legatus protocol v1 (docs/02_protocol.md): what Legatus and the Fabrica server say to
|
||||
//! each other, and the checks both sides make. Pure: no files, no network, no clock; the caller
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The messages of protocol v1 (docs/02_protocol.md). Strict: unknown fields are refused, every
|
||||
//! body is bounded, every id and name is checked before anyone acts on it.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The server's agent registry: which certificate is each agent's current one.
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Nothing unsigned runs: the release manifest, its minisign signature by a pinned team release
|
||||
//! key, and the artifact's size and SHA-256.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Agent certificates at the server (mandatory, tests first): expired, replayed and foreign
|
||||
//! certificates are refused by `Registry::accept`, the check Fabrica runs on every request.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
#![allow(dead_code, clippy::unwrap_used, clippy::expect_used, clippy::panic)]
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! The enrollment code (mandatory, tests first): it round-trips, typos are caught before anything
|
||||
//! is sent, and it is single use: a second redeem is refused, as are expired and unknown codes.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Messages and jobs (tests first): strict parsing with limits, the replay guard, roles, safe
|
||||
//! archive paths, reports.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
// SPDX-License-Identifier: CPAL-1.0
|
||||
// Copyright (c) 2026 Marek Novák. Exhibit A notice: LICENSE at the repository root.
|
||||
|
||||
//! Nothing unsigned runs (mandatory, tests first): a missing or garbled signature, a wrong key, a
|
||||
//! manifest for another team, app or version, and a tampered artifact are all refused.
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
# SPDX-License-Identifier: CPAL-1.0
|
||||
# Legatus installer, served by the Fabrica server at /legatus/install.sh:
|
||||
# curl -fsSL https://<fabrica>/legatus/install.sh | sudo sh -s -- lgt1-<code>
|
||||
# Downloads the Legatus binary for this machine from the same server, checks its SHA-256 against
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
# SPDX-License-Identifier: CPAL-1.0
|
||||
# The Linux target against real systemd, in a container (Docker or Podman).
|
||||
# tests/linux/run.sh # from anywhere in the repo
|
||||
# Builds the test-only `deploy` example and a Debian image with systemd as PID 1 (Containerfile, from
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
# SPDX-License-Identifier: CPAL-1.0
|
||||
# Runs inside the systemd container: four releases of a small web app through the Linux target.
|
||||
# 1.0.0 healthy, 2.0.0 healthy, 3.0.0 crashes at start, 4.0.0 runs but its health URL fails.
|
||||
# Expected: 1 and 2 succeed; 3 and 4 are rolled back to 2.0.0, which keeps running.
|
||||
|
||||
Reference in New Issue
Block a user