feat: Change license from MIT to Apache-2.0

- Added LICENSE.md file with Apache License 2.0 text.
- Created NOTICE file for attribution of third-party components.
- Updated README.md to reflect the new license and included details about the Apache-2.0 license.
- Documented the license change in the diary entry for July 12, 2026.
- Updated installation instructions in getting-started.md to reflect per-user installation.
- Added reusable license header to all source files.
- Updated various documentation files to mention the new Apache-2.0 license.
- Changed legal mentions in example content to reflect the new license.
This commit is contained in:
2026-07-12 19:29:20 +02:00
parent 7065c0773c
commit eb098f9ff3
26 changed files with 501 additions and 151 deletions
+25 -13
View File
@@ -1,7 +1,8 @@
# GitCover.WebStaticBuilder — Produktbeschreibung & Umsetzungsplan
> Status: Implementierung (Phase 1 abgeschlossen, Build verifiziert). Eigenständiges OSS-Static-Site-Tool der GitCover Commons.
> Lizenz: MIT. Sprachen: C# / .NET 10 (keine Python-Abhängigkeiten).
> Status: Implementierung (Phase 13 abgeschlossen, Build verifiziert, zwei reale Sites gebaut). Eigenständiges OSS-Static-Site-Tool der GitCover Commons.
> Lizenz: Apache-2.0 (explizite Patentlizenz §3 + Retorsionsklausel gegen Patentklagen). Sprachen: C# / .NET 10 (keine Python-Abhängigkeiten).
> Version: `1.0.0.0`.
## 1. Zweck
`GitCover.WebStaticBuilder` (CLI-Befehl `webstatic`) ist ein schlanker, kompilierter Static-Site-Generator für mehrsprachige, SEO-optimierte, compliance-freundliche Websites. Er liest Markdown-Quellen mit YAML-Frontmatter, rendert sie pro Sprache zu statischem HTML, erzeugt Navigation, SEO-Kopf (OpenGraph/JSON-LD), Sitemap, robots.txt und einen client-seitigen Volltextindex (Pagefind) — ohne Server, Datenbank oder Build-Service.
@@ -34,17 +35,19 @@ Das Tool ist die Verallgemeinerung des Builders, der die GCBoK-Website erzeugt,
- Kultur-korrekte Datums-/Zahlformate über `System.Globalization` (vorbereitet).
- Optional: MT-Provider (Azure/DeepL) erzeugt **Entwürfe** für fehlende Inhaltsübersetzungen (klar markiert, separater Ordner `.translation-drafts/`).
## 6. Umgebungen (Arbeitsumgebung / Review / Staging / Public Deployment)
## 6. Umgebungen (Arbeitsumgebung / Staging / Public Deployment)
| Umgebung | `--env` | baseUrl (Beispiel) | cdn | Zweck / Ort |
|---|---|---|---|---|
| **Arbeitsumgebung** | `work` (`--preview`) | `http://localhost:8000` | `/assets` | Lokale Entwicklung; Build→lokales `dist/`, Vorschau via `serve` |
| **Review** | `review` | `https://review.gitcover.org` | CDN | Freigabe/Vorschau (Konzept) |
| **Arbeitsumgebung** | `development` (`--preview`/`--work`/`--review` sind Aliase) | `http://localhost:8000` | `/assets` | Lokale Entwicklung; Build→lokales `dist/`, Vorschau via `serve` |
| **Staging** | `staging` | `https://gcbok.gitcover.org` | `https://gitcover.org/assets` | Abnahme (brx5 `/var/www/gcbok.gitcover.org`) |
| **Public Deployment** | `deploy` | `https://gcbok.org` | `https://gitcover.org/assets` | Production (manueller Upload WebFTP) |
Hinweis: `work`/`preview`/`review` werden im Code alle auf `development` gefaltet.
Die Default-Environments in `BuildConfig.Defaults()` sind `development`/`staging`/`deploy`.
## 7. CLI-Referenz
```
webstatic build --env <work|review|staging|deploy> [--content DIR] [--templates DIR]
webstatic build --env <development|staging|deploy> [--content DIR] [--templates DIR]
[--assets DIR] [--output DIR] [--base-url URL] [--cdn PATH]
[--langs de,en,vi] [--default-lang de] [--config FILE] [--root DIR]
[--verbose] [--dry-run]
@@ -52,15 +55,19 @@ webstatic translate --check # fehlende Übersetzungen melden
webstatic translate --draft # Entwürfe erzeugen (MT, API-Key nötig)
webstatic init <sitename> # KMU-Onboarding: Site scaffolden
webstatic serve [--port 8000] # lokale Vorschau (.NET HttpListener)
webstatic status # rendert der Site README.md im Terminal
```
Aliase `--preview`=`work`, `--staging`=`staging`, `--deploy`=`deploy` bleiben erhalten.
Aliase `--preview`/`--work`/`--review` = `development`, `--staging` = `staging`,
`--deploy` = `deploy`. Subcommands: `build`, `serve`, `init`, `translate`, `status`.
## 8. Konfiguration (`webstatic.json`)
- `site` (name/title/description je Sprache), `default_language`, `languages` (name/og_locale/href_lang/label), `paths` (content/templates/assets/output/legal/i18n), `glossary_section` + `glossary.href/label`, `pagefind` (bool), `translator` (provider/key_env/endpoint/region), `environments` (work/review/staging/deploy mit base_url/cdn).
- `site` (name/title/description je Sprache), `default_language`, `languages` (name/og_locale/href_lang/label), `paths` (content/templates/assets/output/legal/i18n), `glossary_section` + `glossary.href/label`, `pagefind` (bool), `translator` (provider/key_env/endpoint/region), `environments` (`development`/`staging`/`deploy` mit base_url/cdn).
- Priorität: CLI-Flags > `webstatic.json` > eingebaute Defaults.
## 9. Installation für KMU (`install.sh`)
- Bash-Skript (kein Python): prüft .NET 10, `dotnet build -c Release`, kopiert nach **`/opt/GitCover/webstatic`**, Symlink `webstatic`→App nach `/usr/local/bin`, setzt `WEBSTATIC_BUILDER`.
- Bash-Skript (kein Python): prüft .NET 10, `dotnet build -c Release`.
- **Default (per-user):** kopiert nach `~/.local/share/GitCover/webstatic`, Launcher `~/.local/bin/webstatic`; Updates via `webstatic update`.
- **Optional (System, root):** `WEBSTATIC_INSTALL_DIR=/opt/GitCover/webstatic WEBSTATIC_BIN_DIR=/usr/local/bin ./install.sh` kopiert nach `/opt/GitCover/webstatic`, Symlink `webstatic`→App nach `/usr/local/bin`.
- Idempotent; meldet Voraussetzungen.
## 10. Onboarding-Flow für KMU
@@ -77,18 +84,23 @@ build_webstatic/
src/ # C#-Quellcode (GitCover.WebStaticBuilder)
tests/ # (künftig) Unit/Integrationstests
webstatic.example/ # Vorlage-Site für KMU
install.sh README.md LICENSE (MIT) AGENTS.md MEMORY.md SKILLS.md
install.sh README.md LICENSE (Apache-2.0) NOTICE AGENTS.md MEMORY.md SKILLS.md
```
## 12. Lizenz & Compliance
- Code: **MIT** (`LICENSE`). Kompatibel mit allen genutzten NuGet-Paketen.
- Code: **Apache-2.0** (`LICENSE.md`, `NOTICE`). Bietet im Gegensatz zu MIT eine
**explizite Patentlizenz** (§3) sowie eine **Retorsionsklausel** (Patentlizenz
erlischt bei Patentklage über die Software) — bewusst gewählt, weil der Builder
an vielen Stellen patentrelevante Logik implementiert. Kompatibel mit den
NuGet-Deps `Markdig` (BSD-2) und `YamlDotNet` (MIT); deren Lizenzen bleiben in
`NOTICE` erhalten. GPLv2-inkompatibel, GPLv3+ ok.
- Inhalte der GCBoK-Site: separat (angestrebt CC BY-SA 4.0) — betrifft das Tool nicht.
## 13. Umsetzungsphasen
- **Phase 0 — Dev-Setup:** `build_webstatic` auf `/mnt/brx5/work/OSS/build_webstatic` (kopiert aus `www/build`, Python/`build.csx` entfernt, Verzeichnisstruktur plans/docs/diary/src/tests).
- **Phase 1 — Refactor (DONE):** Umbenennung `GitCover.WebStaticBuilder`; Python entfernt; Config/Umgebungsmodell; i18n (`I18n.cs` + Platzhalter); MT-Helfer; Pagefind; `webstatic.example`; `install.sh`; Docs/LIZENZ. Build & Verify auf Beispielsite ✓.
- **Phase 2 — Install & Verify:** `install.sh``/opt/GitCover/webstatic`; Standalone-Smoke-Test.
- **Phase 3 — Website-Repo:** Submodul `www/build` entfernen; `www/build.sh` durch Bash ersetzen; alle Docs (AGENTS/MEMORY/SKILLS/CONTEXT/README/docs/DEPLOYMENT/oss/*/.hermes) auf neuen Pfad/Tool/Umgebungen/kein-Python aktualisieren; GCBoK-Preview-Build + Dead-Link-Check.
- **Phase 2 — Install & Verify (DONE):** Per-user Betatester-Install unter `~/.local/share/GitCover/webstatic` (Launcher `~/.local/bin/webstatic`) ist die **aktive** Installation; optionale System-Installation unter `/opt/GitCover/webstatic` (root). `webstatic update` aktualisiert den per-user-Clone (stash/pull/merge/rebuild, Hermes-Konzept). Standalone-Smoke-Test.
- **Phase 3 — Website-Repo (DONE):** GCBoK-Repo und GCC-Repo nutzen ausschließlich die `webstatic`-CLI (Python/`www/build*` entfernt). gcc.gitcover.org am 2026-07-12 migriert (Multi-Page, `*.de.md` autoritativ, Banner aus gcbok, Eyebrow+Titel als Seiten-Header auf allen Seiten). `pagefind` pro Site per `pagefind: false` abschaltbar.
- **Phase 4 — Onboarding:** `init`/`serve`/`build` als KMU-Flow (Konzept finalisieren).
- **Phase 5 — Abschluss:** Zusammenfassung; Commit/Signierung nur auf Wunsch.
+20 -30
View File
@@ -1,8 +1,8 @@
# Plan 01 — Offensichtliche Fixes
> Status: Draft (2026-07-11). Aus der Code-Inspektion und Testläufen gegen das
> GCBoK-Website-Repo (`/mnt/brx5/REPOS/GCC/gcbok.gitcover.org`) und das
> Dev-Quell-Repo (`/mnt/brx5/work/OSS/build_webstatic`) abgeleitet.
> Status: **Größtenteils umgesetzt (Stand 2026-07-12).** Die meisten Fixes sind
> bereits im Code landen (Commits `18c2108` CLI-Fixes, `7065c07` Link-Fixes u. a.).
> Fix 1 ist gegenstandslos (keine `/opt`-Installation vorhanden).
## Kontext
@@ -12,32 +12,22 @@ Dabei zeigten sich Probleme, die hier zur Behebung anstehen.
## Fix 1 — Installierte Binary ist veraltet (`/opt/GitCover/webstatic`)
**Symptom:** `webstatic --version` und `webstatic --help` crashen mit
`DirectoryNotFoundException: .../content` — der Build läuft los, bevor
`--help`/`--version` ausgewertet werden.
**Status: gegenstandslos (2026-07-12).** Es existiert **keine** Installation
unter `/opt/GitCover/webstatic`. Die aktiv genutzte Installation ist die
**per-user Betatester-Install** unter `~/.local/share/GitCover/webstatic`
(Launcher `~/.local/bin/webstatic`, Commit `7065c07`). Ein Remote-Stand
(`89f720a`) ist verfügbar → Aktualisierung via `webstatic update`.
**Ursache:** `/opt/GitCover/webstatic/src/Program.cs` (7223 B, 11. Jul 15:59)
ist älter als der aktuelle Dev-Stand (`src/Program.cs`, 380 Zeilen). Die
installierte Binary wurde aus einem Zwischenstand gebaut, in dem
`--help`/`--version`-Checks erst *nach* `Builder.Build()` kamen. Der aktuelle
Dev-Stand hat die Checks bereits an richtiger Position (Zeile 5064, vor dem
Build-Aufruf Zeile 118).
Das ursprüngliche Symptom (Crash von `--help`/`--version` wegen fehlender
`content/`-Prüfung) ist ohnehin bereits behoben (Commit `18c2108`:
„CLI-Fixes: Help/Version vor Build, Content-Check, Default-Envs, Artefakte aus
Git"). `webstatic --version` liefert `1.0.0.0` + Commit-Hash (Exit 0).
**Maßnahme:**
1. Dev-Quellbaum baut sauber (`dotnet build -c Release` ✓ verifiziert).
2. System-Installation aktualisieren:
```bash
sudo env PATH="$PATH" \
WEBSTATIC_INSTALL_DIR=/opt/GitCover/webstatic \
WEBSTATIC_BIN_DIR=/usr/local/bin \
/mnt/brx5/work/OSS/build_webstatic/install.sh
```
(oder `webstatic update`, falls die Installation ein Clone ist —
`/opt/GitCover/webstatic/.git` prüfen).
3. Verifizieren: `webstatic --version` (erwartet: `1.0.0.0` + Commit-Hash),
`webstatic --help` (erwartet: Hilfe-Text, Exit 0),
`webstatic build --root /mnt/brx5/REPOS/GCC/gcbok.gitcover.org/www --env development --verbose`
(erwartet: erfolgreicher Build, Exit 0).
**Maßnahme (falls dennoch eine System-Installation gewünscht):**
```bash
sudo env PATH="$PATH" WEBSTATIC_INSTALL_DIR=/opt/GitCover/webstatic \
WEBSTATIC_BIN_DIR=/usr/local/bin ./install.sh
```
## Fix 2 — `--help`/`--version` sollten VOR Config-Laden und `Directories.Init` geprüft werden
@@ -150,9 +140,9 @@ dotnet bin/Release/net10.0/webstatic.dll --help # Exit 0
dotnet bin/Release/net10.0/webstatic.dll build --root . # klare Fehlermeldung, Exit 1
dotnet bin/Release/net10.0/webstatic.dll build --root webstatic.example --env development # Exit 0
git status # keine Artefakte, clean
# System-Install aktualisieren und GCBoK bauen:
sudo env PATH="$PATH" WEBSTATIC_INSTALL_DIR=/opt/GitCover/webstatic \
WEBSTATIC_BIN_DIR=/usr/local/bin ./install.sh
# Per-user-Install aktualisieren und GCBoK bauen:
cd ~/.local/share/GitCover/webstatic && git stash && git pull && ./install.sh
webstatic --version
webstatic build --root /mnt/brx5/REPOS/GCC/gcbok.gitcover.org/www --env development --verbose
webstatic build --root /mnt/brx5/REPOS/GCC/gcc.gitcover.org/www --env development --verbose
```