From 6dfbfa19383b40482146f78c29090d77f33c5231 Mon Sep 17 00:00:00 2001 From: "Michal S." Date: Thu, 30 Jul 2026 21:57:33 +0100 Subject: [PATCH] Establish MOUSE ports collection --- Makefile | 4 ++++ README.md | 21 +++++++++++++++++++++ infrastructure/README.md | 4 ++++ ports/README.md | 7 +++++++ tests/check-layout.sh | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 69 insertions(+) create mode 100644 Makefile create mode 100644 README.md create mode 100644 infrastructure/README.md create mode 100644 ports/README.md create mode 100755 tests/check-layout.sh diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..35fe6ca --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +.PHONY: check + +check: + ./tests/check-layout.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..6805a55 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# MOUSE ports + +This repository is the independently versioned source-port collection for +MOUSE. It contains third-party recipes and patches only; the `mouse-port` +implementation, ports contract, base-system manifest, and release integration +belong to `mouse-src`. + +Each port lives below `ports/NAME` and follows the recipe contract shipped by +the compatible MOUSE base release. A MOUSE release pins one tested commit from +this repository, while installed systems may move to later compatible ports +revisions without replacing the base system. + +The adversarial and demonstration recipes used by the base-system acceptance +suite are deliberately not part of this collection. They live in +`mouse-src/tests/fixtures/ports`. + +Run the collection checks with: + +```sh +make check +``` diff --git a/infrastructure/README.md b/infrastructure/README.md new file mode 100644 index 0000000..8097859 --- /dev/null +++ b/infrastructure/README.md @@ -0,0 +1,4 @@ +# Infrastructure + +Collection-wide generation, lint, and publication tooling belongs here. Base +image assembly and the `mouse-port` implementation remain in `mouse-src`. diff --git a/ports/README.md b/ports/README.md new file mode 100644 index 0000000..0fe7127 --- /dev/null +++ b/ports/README.md @@ -0,0 +1,7 @@ +# Ports collection + +Each immediate child directory is one port named `[a-z][a-z0-9-]*` and contains +one `port.conf` plus its trusted `build.sh` and any port-owned patches or files. + +The collection is intentionally empty until the first real third-party port is +accepted. Test-only recipes do not belong here. diff --git a/tests/check-layout.sh b/tests/check-layout.sh new file mode 100755 index 0000000..d18581d --- /dev/null +++ b/tests/check-layout.sh @@ -0,0 +1,33 @@ +#!/bin/sh +set -eu + +root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd) +found=0 + +for directory in "$root"/ports/*; do + [ -d "$directory" ] || continue + [ "${directory##*/}" != README.md ] || continue + found=1 + name=${directory##*/} + case "$name" in + ""|[!a-z]*|*[!a-z0-9-]*) + printf '%s\n' "invalid port directory name: $name" >&2 + exit 1 + ;; + esac + [ -f "$directory/port.conf" ] || { + printf '%s\n' "missing recipe: ports/$name/port.conf" >&2 + exit 1 + } + [ -x "$directory/build.sh" ] || { + printf '%s\n' "missing executable build script: ports/$name/build.sh" >&2 + exit 1 + } + sh -n "$directory/build.sh" +done + +if [ "$found" -eq 0 ]; then + printf '%s\n' "ports collection is empty" +else + printf '%s\n' "ports layout check passed" +fi