feat(katalog): Distributionen und Profile als YAML-Daten

Fünf Distributionen (Debian 12/13, Ubuntu 22.04/24.04/26.04) und drei
Profile liegen unter catalog/ und werden beim Start abgeglichen. Die
Datei ist maßgeblich für den Inhalt, die Datenbank nur für „aktiv“;
verschwundene Einträge werden markiert, nicht gelöscht.

Unbekannte Schlüssel sind Fehler, damit Tippfehler nicht still
verschwinden; eine kaputte Datei wird mit Pfad gemeldet und
übersprungen, statt den Start zu verhindern. Prüfsummen-Parser kennt
das Debian-, Ubuntu- und BSD-Format; bei mehreren LXC-Templates gewinnt
die höchste Version.

Closes #004

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-12 10:11:14 +02:00
co-authored by Claude Opus 5.5
parent 69cf8eb784
commit acae1bc2a4
32 changed files with 1359 additions and 15 deletions
@@ -0,0 +1,37 @@
-- CreateEnum
CREATE TYPE "Herkunft" AS ENUM ('KATALOG', 'EIGEN');
-- CreateTable
CREATE TABLE "Distribution" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"familie" TEXT NOT NULL,
"definition" JSONB NOT NULL,
"quelltext" TEXT NOT NULL,
"dateiHash" TEXT NOT NULL,
"aktiv" BOOLEAN NOT NULL DEFAULT true,
"entferntAm" TIMESTAMP(3),
"synchronisiertAm" TIMESTAMP(3) NOT NULL,
"geaendertVonId" TEXT,
CONSTRAINT "Distribution_pkey" PRIMARY KEY ("id")
);
-- CreateTable
CREATE TABLE "Profil" (
"id" TEXT NOT NULL,
"name" TEXT NOT NULL,
"beschreibung" TEXT,
"familien" TEXT[],
"herkunft" "Herkunft" NOT NULL,
"definition" JSONB NOT NULL,
"quelltext" TEXT NOT NULL,
"dateiHash" TEXT,
"aktiv" BOOLEAN NOT NULL DEFAULT true,
"entferntAm" TIMESTAMP(3),
"synchronisiertAm" TIMESTAMP(3),
"geaendertVonId" TEXT,
"geaendertAm" TIMESTAMP(3) NOT NULL,
CONSTRAINT "Profil_pkey" PRIMARY KEY ("id")
);