From 1aa264c146cc63a33c4ba00c3acdfaa45486931f Mon Sep 17 00:00:00 2001 From: Lukas Greve Date: Tue, 24 Mar 2026 19:52:34 +0100 Subject: [PATCH] Add recipe generator for automation and DRY recipes - create generate_recipe.py: CLI tool for generating recipes from templates - add recipe_templates.yaml: 5 base templates (virtual-desktop, virtual-server, desktop-hypervisor, live-desktop, live-server) - add recipes_manifest.yaml: 16 recipe variants defined declaratively - add Makefile: automation targets for generate, validate, test - add requirements.txt: PyYAML dependency - add tests/test_recipe_generator.py: 25 pytest tests This enables: - Template-based recipe generation with minimal duplication - One-line variant addition via YAML manifest editing - Automatic duplicate include prevention - Ingredient path validation Generated recipes are committed for reproducibility as per project conventions. --- recipes/desktop-hypervisor-amdcpu.cfg | 26 ++ .../desktop-hypervisor-intelcpu-intelgpu.cfg | 28 ++ recipes/desktop-hypervisor-intelcpu.cfg | 26 ++ recipes/desktop-hypervisor.cfg | 25 + recipes/desktop-hypervisor_amdcpu_rawhide.cfg | 23 + ...p-hypervisor_intelcpu_intelgpu_rawhide.cfg | 24 + .../desktop-hypervisor_intelcpu_rawhide.cfg | 23 + recipes/desktop-hypervisor_rawhide.cfg | 30 +- recipes/desktop.cfg | 23 + recipes/live-desktop-hypervisor.cfg | 28 ++ recipes/live-desktop.cfg | 26 ++ recipes/live-desktop_rawhide.cfg | 30 +- recipes/live-server-hypervisor.cfg | 26 ++ recipes/live-server.cfg | 24 + .../live-server_intelcpu_intelgpu_rawhide.cfg | 21 + recipes/live-server_rawhide.cfg | 27 +- recipes/live-server_rawhide_hypervisor.cfg | 22 + recipes/virtual-desktop-hypervisor.cfg | 26 ++ recipes/virtual-desktop-hypervisor_devel.cfg | 23 + recipes/virtual-desktop.cfg | 24 + recipes/virtual-desktop_43.cfg | 24 +- recipes/virtual-desktop_43_devel.cfg | 25 +- recipes/virtual-desktop_devel.cfg | 21 + recipes/virtual-desktop_labwc_43.cfg | 24 +- recipes/virtual-desktop_rawhide.cfg | 25 +- recipes/virtual-desktop_rawhide_encrypted.cfg | 22 + recipes/virtual-server-hypervisor_devel.cfg | 21 + recipes/virtual-server_43.cfg | 24 +- recipes/virtual-server_43_devel.cfg | 19 + recipes/virtual-server_devel.cfg | 20 + recipes/virtual-server_rawhide.cfg | 25 +- recipes/virtual-server_rawhide_devel.cfg | 20 + scripts/Makefile | 30 ++ .../generate_recipe.cpython-314.pyc | Bin 0 -> 23231 bytes scripts/generate_recipe.py | 438 ++++++++++++++++++ scripts/recipe_templates.yaml | 166 +++++++ scripts/recipes_manifest.yaml | 87 ++++ scripts/requirements.txt | 2 + ...ipe_generator.cpython-314-pytest-8.4.2.pyc | Bin 0 -> 41160 bytes tests/test_recipe_generator.py | 227 +++++++++ 40 files changed, 1601 insertions(+), 124 deletions(-) create mode 100644 recipes/desktop-hypervisor-amdcpu.cfg create mode 100644 recipes/desktop-hypervisor-intelcpu-intelgpu.cfg create mode 100644 recipes/desktop-hypervisor-intelcpu.cfg create mode 100644 recipes/desktop-hypervisor.cfg create mode 100644 recipes/desktop-hypervisor_amdcpu_rawhide.cfg create mode 100644 recipes/desktop-hypervisor_intelcpu_intelgpu_rawhide.cfg create mode 100644 recipes/desktop-hypervisor_intelcpu_rawhide.cfg create mode 100644 recipes/desktop.cfg create mode 100644 recipes/live-desktop-hypervisor.cfg create mode 100644 recipes/live-desktop.cfg create mode 100644 recipes/live-server-hypervisor.cfg create mode 100644 recipes/live-server.cfg create mode 100644 recipes/live-server_intelcpu_intelgpu_rawhide.cfg create mode 100644 recipes/live-server_rawhide_hypervisor.cfg create mode 100644 recipes/virtual-desktop-hypervisor.cfg create mode 100644 recipes/virtual-desktop-hypervisor_devel.cfg create mode 100644 recipes/virtual-desktop.cfg create mode 100644 recipes/virtual-desktop_devel.cfg create mode 100644 recipes/virtual-desktop_rawhide_encrypted.cfg create mode 100644 recipes/virtual-server-hypervisor_devel.cfg create mode 100644 recipes/virtual-server_43_devel.cfg create mode 100644 recipes/virtual-server_devel.cfg create mode 100644 recipes/virtual-server_rawhide_devel.cfg create mode 100644 scripts/Makefile create mode 100644 scripts/__pycache__/generate_recipe.cpython-314.pyc create mode 100644 scripts/generate_recipe.py create mode 100644 scripts/recipe_templates.yaml create mode 100644 scripts/recipes_manifest.yaml create mode 100644 scripts/requirements.txt create mode 100644 tests/__pycache__/test_recipe_generator.cpython-314-pytest-8.4.2.pyc create mode 100644 tests/test_recipe_generator.py diff --git a/recipes/desktop-hypervisor-amdcpu.cfg b/recipes/desktop-hypervisor-amdcpu.cfg new file mode 100644 index 0000000..e4886c0 --- /dev/null +++ b/recipes/desktop-hypervisor-amdcpu.cfg @@ -0,0 +1,26 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for an AMD (tm) CPU-based desktop hypervisor + +%include ../ingredients/core.cfg # Text mode for automated installation +%include ../ingredients/core-storage.cfg # Storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Provides extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Offical repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Post configuration script +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager +%include ../ingredients/base-hypervisor.cfg # Base hypervisor +%include ../ingredients/base-hypervisor-amdcpu.cfg # Virtualization configuration for AMD (tm) CPUs \ No newline at end of file diff --git a/recipes/desktop-hypervisor-intelcpu-intelgpu.cfg b/recipes/desktop-hypervisor-intelcpu-intelgpu.cfg new file mode 100644 index 0000000..b41e844 --- /dev/null +++ b/recipes/desktop-hypervisor-intelcpu-intelgpu.cfg @@ -0,0 +1,28 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for an Intel(tm) CPU- and Intel(tm) GPUs-based desktop hypervisor +# vfio-mdev compatible GPUs required. For Intel, it means 5th to 10th generation only + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager +%include ../ingredients/base-hypervisor.cfg # Base hypervisor +%include ../ingredients/base-hypervisor-intelcpu.cfg # Virtualization configuration for Intel (tm) CPUs +%include ../ingredients/base-hypervisor-intelgpu.cfg # Virtualization configuration for Intel (tm) GPUs from 4th to the 9th generation (compatible with vfio-mdev) diff --git a/recipes/desktop-hypervisor-intelcpu.cfg b/recipes/desktop-hypervisor-intelcpu.cfg new file mode 100644 index 0000000..111097e --- /dev/null +++ b/recipes/desktop-hypervisor-intelcpu.cfg @@ -0,0 +1,26 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for an Intel(tm)-based desktop hypervisor + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager +%include ../ingredients/base-hypervisor.cfg # Base hypervisor +%include ../ingredients/base-hypervisor-intelcpu.cfg # Virtualization configuration for Intel (tm) CPUs diff --git a/recipes/desktop-hypervisor.cfg b/recipes/desktop-hypervisor.cfg new file mode 100644 index 0000000..c073c62 --- /dev/null +++ b/recipes/desktop-hypervisor.cfg @@ -0,0 +1,25 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a generic desktop hypervisor + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager +%include ../ingredients/base-hypervisor.cfg # Base hypervisor \ No newline at end of file diff --git a/recipes/desktop-hypervisor_amdcpu_rawhide.cfg b/recipes/desktop-hypervisor_amdcpu_rawhide.cfg new file mode 100644 index 0000000..c21f32b --- /dev/null +++ b/recipes/desktop-hypervisor_amdcpu_rawhide.cfg @@ -0,0 +1,23 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a desktop hypervisor + +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-packages-hardware-support.cfg +%include ../ingredients/core-initial-setup-gnome-desktop.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/base-desktop-virtual-machine-manager.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/base-hypervisor-amdcpu.cfg \ No newline at end of file diff --git a/recipes/desktop-hypervisor_intelcpu_intelgpu_rawhide.cfg b/recipes/desktop-hypervisor_intelcpu_intelgpu_rawhide.cfg new file mode 100644 index 0000000..695ee9a --- /dev/null +++ b/recipes/desktop-hypervisor_intelcpu_intelgpu_rawhide.cfg @@ -0,0 +1,24 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a desktop hypervisor + +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-packages-hardware-support.cfg +%include ../ingredients/core-initial-setup-gnome-desktop.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/base-desktop-virtual-machine-manager.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/base-hypervisor-intelcpu.cfg +%include ../ingredients/base-hypervisor-intelgpu.cfg \ No newline at end of file diff --git a/recipes/desktop-hypervisor_intelcpu_rawhide.cfg b/recipes/desktop-hypervisor_intelcpu_rawhide.cfg new file mode 100644 index 0000000..31fa839 --- /dev/null +++ b/recipes/desktop-hypervisor_intelcpu_rawhide.cfg @@ -0,0 +1,23 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a desktop hypervisor + +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-packages-hardware-support.cfg +%include ../ingredients/core-initial-setup-gnome-desktop.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/base-desktop-virtual-machine-manager.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/base-hypervisor-intelcpu.cfg \ No newline at end of file diff --git a/recipes/desktop-hypervisor_rawhide.cfg b/recipes/desktop-hypervisor_rawhide.cfg index 2ec596a..963645f 100644 --- a/recipes/desktop-hypervisor_rawhide.cfg +++ b/recipes/desktop-hypervisor_rawhide.cfg @@ -5,20 +5,18 @@ # / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ # /_/ /____/ -# A recipe for a generic desktop hypervisor +# A recipe for a desktop hypervisor -%include ../ingredients/core.cfg # Text mode -%include ../ingredients/core-storage.cfg # ext4-based storage configuration -%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support -%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide -%include ../ingredients/core-post.cfg # Triggered after the installation -%include ../ingredients/core-initial-setup-gnome-desktop.cfg # Enable initial setup to allow end users to create user on first boot -%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment -%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager -%include ../ingredients/base-hypervisor.cfg # Base hypervisor \ No newline at end of file +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-packages-hardware-support.cfg +%include ../ingredients/core-initial-setup-gnome-desktop.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/base-desktop-virtual-machine-manager.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/core-security-on.cfg \ No newline at end of file diff --git a/recipes/desktop.cfg b/recipes/desktop.cfg new file mode 100644 index 0000000..9a3af33 --- /dev/null +++ b/recipes/desktop.cfg @@ -0,0 +1,23 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a generic desktop hypervisor + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment \ No newline at end of file diff --git a/recipes/live-desktop-hypervisor.cfg b/recipes/live-desktop-hypervisor.cfg new file mode 100644 index 0000000..30e19be --- /dev/null +++ b/recipes/live-desktop-hypervisor.cfg @@ -0,0 +1,28 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a live desktop hypervisor + +%include ../ingredients/live-core.cfg # For live systems only +%include ../ingredients/live-core-storage.cfg # For live systems only +%include ../ingredients/live-core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/live-core-mandatory-packages.cfg # For live systems +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/live-core-post.cfg # Post configuration script for a live system only +%include ../ingredients/live-core-post-live-session.cfg # Live session script +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager +%include ../ingredients/base-hypervisor.cfg # Base hypervisor \ No newline at end of file diff --git a/recipes/live-desktop.cfg b/recipes/live-desktop.cfg new file mode 100644 index 0000000..dfac4d6 --- /dev/null +++ b/recipes/live-desktop.cfg @@ -0,0 +1,26 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a live desktop + +%include ../ingredients/live-core.cfg # For live systems only +%include ../ingredients/live-core-storage.cfg # For live systems only +%include ../ingredients/live-core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/live-core-mandatory-packages.cfg # For live systems +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/live-core-post.cfg # Post configuration script for a live system only +%include ../ingredients/live-core-post-live-session.cfg # Live session script +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment \ No newline at end of file diff --git a/recipes/live-desktop_rawhide.cfg b/recipes/live-desktop_rawhide.cfg index 05736f6..8ec195d 100644 --- a/recipes/live-desktop_rawhide.cfg +++ b/recipes/live-desktop_rawhide.cfg @@ -7,19 +7,17 @@ # A recipe for a live desktop -%include ../ingredients/live-core.cfg # For live systems only -%include ../ingredients/live-core-storage.cfg # For live systems only -%include ../ingredients/live-core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/live-core-mandatory-packages.cfg # For live systems -%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support -%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide -%include ../ingredients/core-post.cfg # Triggered after the installation -%include ../ingredients/live-core-post.cfg # Post configuration script for a live system only -%include ../ingredients/live-core-post-live-session.cfg # Live session script -%include ../ingredients/core-initial-setup-gnome-desktop.cfg # Enable initial setup to allow end users to create user on first boot -%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment \ No newline at end of file +%include ../ingredients/live-core.cfg +%include ../ingredients/live-core-storage.cfg +%include ../ingredients/live-core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/live-core-mandatory-packages.cfg +%include ../ingredients/live-core-post.cfg +%include ../ingredients/live-core-post-live-session.cfg +%include ../ingredients/core-initial-setup-gnome-desktop.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/core-security-on.cfg \ No newline at end of file diff --git a/recipes/live-server-hypervisor.cfg b/recipes/live-server-hypervisor.cfg new file mode 100644 index 0000000..d2d8596 --- /dev/null +++ b/recipes/live-server-hypervisor.cfg @@ -0,0 +1,26 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a live server hypervisor + +%include ../ingredients/live-core.cfg # For live systems only +%include ../ingredients/live-core-storage.cfg # For live systems only +%include ../ingredients/live-core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/live-core-mandatory-packages.cfg # For live systems +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/live-core-post.cfg # Post configuration script for a live system only +%include ../ingredients/live-core-post-live-session.cfg # Live session script +%include ../ingredients/core-initial-setup-server.cfg # For headless systems +%include ../ingredients/base-hypervisor.cfg # Base hyperviso \ No newline at end of file diff --git a/recipes/live-server.cfg b/recipes/live-server.cfg new file mode 100644 index 0000000..8cf3d50 --- /dev/null +++ b/recipes/live-server.cfg @@ -0,0 +1,24 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a live server + +%include ../ingredients/live-core.cfg # For live systems only +%include ../ingredients/live-core-storage.cfg # For live systems only +%include ../ingredients/live-core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/live-core-mandatory-packages.cfg # For live systems +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/live-core-post.cfg # Post configuration script for a live system only +%include ../ingredients/live-core-post-live-session.cfg # Live session script +%include ../ingredients/core-initial-setup-server.cfg # For headless systems \ No newline at end of file diff --git a/recipes/live-server_intelcpu_intelgpu_rawhide.cfg b/recipes/live-server_intelcpu_intelgpu_rawhide.cfg new file mode 100644 index 0000000..a32cc96 --- /dev/null +++ b/recipes/live-server_intelcpu_intelgpu_rawhide.cfg @@ -0,0 +1,21 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a live server + +%include ../ingredients/live-core-storage.cfg +%include ../ingredients/live-core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/live-core-mandatory-packages.cfg +%include ../ingredients/live-core-post.cfg +%include ../ingredients/live-core-post-live-session.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/core-security-on.cfg \ No newline at end of file diff --git a/recipes/live-server_rawhide.cfg b/recipes/live-server_rawhide.cfg index b0cfda3..d027180 100644 --- a/recipes/live-server_rawhide.cfg +++ b/recipes/live-server_rawhide.cfg @@ -7,17 +7,16 @@ # A recipe for a live server -%include ../ingredients/live-core.cfg # For live systems only -%include ../ingredients/live-core-storage.cfg # For live systems only -%include ../ingredients/live-core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/live-core-mandatory-packages.cfg # For live systems -%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide -%include ../ingredients/core-post.cfg # Triggered after the installation -%include ../ingredients/live-core-post.cfg # Post configuration script for a live system only -%include ../ingredients/live-core-post-live-session.cfg # Live session script -%include ../ingredients/core-initial-setup-server.cfg # For headless systems \ No newline at end of file +%include ../ingredients/live-core.cfg +%include ../ingredients/live-core-storage.cfg +%include ../ingredients/live-core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/live-core-mandatory-packages.cfg +%include ../ingredients/live-core-post.cfg +%include ../ingredients/live-core-post-live-session.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/core-security-on.cfg \ No newline at end of file diff --git a/recipes/live-server_rawhide_hypervisor.cfg b/recipes/live-server_rawhide_hypervisor.cfg new file mode 100644 index 0000000..d027180 --- /dev/null +++ b/recipes/live-server_rawhide_hypervisor.cfg @@ -0,0 +1,22 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a live server + +%include ../ingredients/live-core.cfg +%include ../ingredients/live-core-storage.cfg +%include ../ingredients/live-core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/live-core-mandatory-packages.cfg +%include ../ingredients/live-core-post.cfg +%include ../ingredients/live-core-post-live-session.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/core-security-on.cfg \ No newline at end of file diff --git a/recipes/virtual-desktop-hypervisor.cfg b/recipes/virtual-desktop-hypervisor.cfg new file mode 100644 index 0000000..c94a792 --- /dev/null +++ b/recipes/virtual-desktop-hypervisor.cfg @@ -0,0 +1,26 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a virtual desktop hypervisor + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager +%include ../ingredients/base-hypervisor.cfg # Base hypervisor +%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file diff --git a/recipes/virtual-desktop-hypervisor_devel.cfg b/recipes/virtual-desktop-hypervisor_devel.cfg new file mode 100644 index 0000000..ab9a1c1 --- /dev/null +++ b/recipes/virtual-desktop-hypervisor_devel.cfg @@ -0,0 +1,23 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# Unsafe. Development-only. A recipe for a virtual desktop hypervisor + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-off.cfg # Enable root account, disable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager +%include ../ingredients/base-hypervisor.cfg # Base hypervisor +%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file diff --git a/recipes/virtual-desktop.cfg b/recipes/virtual-desktop.cfg new file mode 100644 index 0000000..705dc37 --- /dev/null +++ b/recipes/virtual-desktop.cfg @@ -0,0 +1,24 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a virtual desktop + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/core-post.cfg # Triggered after the installation +%include ../ingredients/core-initial-setup-desktop.cfg # OEM setup for GNOME Shell +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file diff --git a/recipes/virtual-desktop_43.cfg b/recipes/virtual-desktop_43.cfg index 7e08d66..544c6ec 100644 --- a/recipes/virtual-desktop_43.cfg +++ b/recipes/virtual-desktop_43.cfg @@ -7,16 +7,14 @@ # A recipe for a virtual desktop -%include ../ingredients/core.cfg # Text mode -%include ../ingredients/core-storage.cfg # ext4-based storage configuration -%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43 -%include ../ingredients/core-post.cfg # Triggered after the installation -%include ../ingredients/core-initial-setup-server.cfg # Enable initial setup to allow end users to create user on first boot -%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment -%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/base-guest-agents.cfg \ No newline at end of file diff --git a/recipes/virtual-desktop_43_devel.cfg b/recipes/virtual-desktop_43_devel.cfg index 9b022db..7d13e11 100644 --- a/recipes/virtual-desktop_43_devel.cfg +++ b/recipes/virtual-desktop_43_devel.cfg @@ -5,17 +5,16 @@ # / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ # /_/ /____/ -# Unsafe. Development-only. A recipe for a virtual desktop based on Fedora 43 +# A recipe for a virtual desktop -%include ../ingredients/core.cfg # Text mode -%include ../ingredients/core-storage.cfg # ext4-based storage configuration -%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-off.cfg # Enable root account, disable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43 -%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment -%include ../ingredients/core-initial-setup-server.cfg # Enable initial setup to allow end users to create user on first boot -%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-off.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/base-guest-agents.cfg \ No newline at end of file diff --git a/recipes/virtual-desktop_devel.cfg b/recipes/virtual-desktop_devel.cfg new file mode 100644 index 0000000..a8468ad --- /dev/null +++ b/recipes/virtual-desktop_devel.cfg @@ -0,0 +1,21 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# Unsafe. Development-only. A recipe for a virtual desktop + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-off.cfg # Enable root account, disable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment +%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file diff --git a/recipes/virtual-desktop_labwc_43.cfg b/recipes/virtual-desktop_labwc_43.cfg index c3d9bb9..6184670 100644 --- a/recipes/virtual-desktop_labwc_43.cfg +++ b/recipes/virtual-desktop_labwc_43.cfg @@ -7,16 +7,14 @@ # A recipe for a virtual desktop -%include ../ingredients/core.cfg # Text mode -%include ../ingredients/core-storage.cfg # ext4-based storage configuration -%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43 -%include ../ingredients/core-post.cfg # Triggered after the installation -%include ../ingredients/core-initial-setup-server.cfg # Enable initial setup to allow end users to create user on first boot -%include ../ingredients/base-desktop-labwc.cfg # A labwc shell-based desktop environment -%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/base-desktop-labwc.cfg +%include ../ingredients/base-guest-agents.cfg \ No newline at end of file diff --git a/recipes/virtual-desktop_rawhide.cfg b/recipes/virtual-desktop_rawhide.cfg index 4c56a6f..e41e61b 100644 --- a/recipes/virtual-desktop_rawhide.cfg +++ b/recipes/virtual-desktop_rawhide.cfg @@ -7,16 +7,15 @@ # A recipe for a virtual desktop -%include ../ingredients/core.cfg # Text mode -%include ../ingredients/core-storage.cfg # ext4-based storage configuration -%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide -%include ../ingredients/core-post.cfg # Triggered after the installation -%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment -%include ../ingredients/core-initial-setup-server.cfg # Enable initial setup to allow end users to create user on first boot -%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/base-guest-agents.cfg \ No newline at end of file diff --git a/recipes/virtual-desktop_rawhide_encrypted.cfg b/recipes/virtual-desktop_rawhide_encrypted.cfg new file mode 100644 index 0000000..82243a2 --- /dev/null +++ b/recipes/virtual-desktop_rawhide_encrypted.cfg @@ -0,0 +1,22 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a virtual desktop + +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/base-desktop-gnome.cfg +%include ../ingredients/base-guest-agents.cfg +%include ../ingredients/core-storage-encrypted.cfg \ No newline at end of file diff --git a/recipes/virtual-server-hypervisor_devel.cfg b/recipes/virtual-server-hypervisor_devel.cfg new file mode 100644 index 0000000..d907085 --- /dev/null +++ b/recipes/virtual-server-hypervisor_devel.cfg @@ -0,0 +1,21 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# # Unsafe. Development-only. A recipe for a virtual headless hypervisor + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-off.cfg # Enable root account, disable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/base-hypervisor.cfg # Base hypervisor +%include ../ingredients/base-guest-agents.cfg # Guest agents diff --git a/recipes/virtual-server_43.cfg b/recipes/virtual-server_43.cfg index b3a2e09..c7beb69 100644 --- a/recipes/virtual-server_43.cfg +++ b/recipes/virtual-server_43.cfg @@ -5,17 +5,15 @@ # / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ # /_/ /____/ -## A recipe for a virtual server +# A recipe for a virtual server -%include ../ingredients/core.cfg # Text mode -%include ../ingredients/core-storage.cfg # ext4-based storage configuration -%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43 -%include ../ingredients/core-post.cfg # Triggered after the installation -%include ../ingredients/core-initial-setup-server.cfg # Enable initial setup to allow end users to create user on first boot -%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/base-guest-agents.cfg \ No newline at end of file diff --git a/recipes/virtual-server_43_devel.cfg b/recipes/virtual-server_43_devel.cfg new file mode 100644 index 0000000..6122e69 --- /dev/null +++ b/recipes/virtual-server_43_devel.cfg @@ -0,0 +1,19 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a virtual server + +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-off.cfg +%include ../ingredients/base-guest-agents.cfg \ No newline at end of file diff --git a/recipes/virtual-server_devel.cfg b/recipes/virtual-server_devel.cfg new file mode 100644 index 0000000..8d54ed8 --- /dev/null +++ b/recipes/virtual-server_devel.cfg @@ -0,0 +1,20 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# # Unsafe. Development-only. A recipe for a virtual server + +%include ../ingredients/core.cfg # Text mode +%include ../ingredients/core-storage.cfg # ext4-based storage configuration +%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB +%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language +%include ../ingredients/core-security-off.cfg # Enable root account, disable firewall and SELinux +%include ../ingredients/core-services.cfg # Required systemd services +%include ../ingredients/core-network.cfg # Network configuration +%include ../ingredients/core-packages-mandatory.cfg # Mandatory packages +%include ../ingredients/core-packages-default.cfg # Default but not necessary packages +%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide +%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file diff --git a/recipes/virtual-server_rawhide.cfg b/recipes/virtual-server_rawhide.cfg index 67e1e97..2382cd3 100644 --- a/recipes/virtual-server_rawhide.cfg +++ b/recipes/virtual-server_rawhide.cfg @@ -5,17 +5,16 @@ # / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ # /_/ /____/ -## A recipe for a virtual server +# A recipe for a virtual server -%include ../ingredients/core.cfg # Text mode -%include ../ingredients/core-storage.cfg # ext4-based storage configuration -%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB -%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language -%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux -%include ../ingredients/core-services.cfg # Required systemd services -%include ../ingredients/core-network.cfg # Network configuration -%include ../ingredients/core-packages.cfg # Mandatory packages -%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide -%include ../ingredients/core-post.cfg # Triggered after the installation -%include ../ingredients/core-initial-setup-server.cfg # Enable initial setup to allow end users to create user on first boot -%include ../ingredients/base-guest-agents.cfg # Guest agents \ No newline at end of file +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-on.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/base-guest-agents.cfg \ No newline at end of file diff --git a/recipes/virtual-server_rawhide_devel.cfg b/recipes/virtual-server_rawhide_devel.cfg new file mode 100644 index 0000000..9c0aeaa --- /dev/null +++ b/recipes/virtual-server_rawhide_devel.cfg @@ -0,0 +1,20 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# A recipe for a virtual server + +%include ../ingredients/core.cfg +%include ../ingredients/core-storage.cfg +%include ../ingredients/core-bootloader-grub.cfg +%include ../ingredients/core-locale.cfg +%include ../ingredients/core-services.cfg +%include ../ingredients/core-network.cfg +%include ../ingredients/core-packages.cfg +%include ../ingredients/core-initial-setup-server.cfg +%include ../ingredients/core-security-off.cfg +%include ../ingredients/core-fedora-repo-rawhide.cfg +%include ../ingredients/base-guest-agents.cfg \ No newline at end of file diff --git a/scripts/Makefile b/scripts/Makefile new file mode 100644 index 0000000..bdb4378 --- /dev/null +++ b/scripts/Makefile @@ -0,0 +1,30 @@ +.PHONY: help generate-recipes validate-recipes test clean install-deps + +help: + @echo "Phyllome OS Recipe Generator" + @echo "" + @echo "Available targets:" + @echo " generate-recipes - Generate all recipes from manifest" + @echo " validate-recipes - Validate existing recipes" + @echo " test - Run pytest test suite" + @echo " clean - Remove generated recipes" + @echo " install-deps - Install Python dependencies" + +install-deps: + pip install -r requirements.txt + +generate-recipes: + python generate_recipe.py \ + --manifest recipes_manifest.yaml \ + --output-dir ../recipes/ + +validate-recipes: + python generate_recipe.py \ + --validate ../recipes/*.cfg + +test: + pytest ../tests/test_recipe_generator.py -v + +clean: + rm -f ../recipes/*.cfg + @echo "Generated recipes removed. Edit recipes_manifest.yaml and run 'make generate-recipes' to regenerate." diff --git a/scripts/__pycache__/generate_recipe.cpython-314.pyc b/scripts/__pycache__/generate_recipe.cpython-314.pyc new file mode 100644 index 0000000000000000000000000000000000000000..13cfb350d22e6cd37f129e5fbef4ce6a65244506 GIT binary patch literal 23231 zcmcJ13ve69mEhnH0w4hr015twe^UHFl&Bv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ShO}(+y;A4rtyIOHNBLCMuFrd@JkvG( zxAZfG-!bwGGWGh@H>Mt%?6Jt(SKhu7yRxAEE7OOjySn7g<1>*PSKho5KlN;ye|`JP zd^Fj#pU+;5q)o*@uF5-=3(d)v1GDN|`ETXlRl`P>*~qO|Z@oJE>RjKu{df8o@{(=) zXS#0ed~+w3$$qO%w(S+(_N^GTcEfbuiiK+0{C4nmFxj{xX&Xp1?zrij^~MSpI=|SKhmlC_1q?1wA0f_F!yJyts4OvIQpeOw)IceWo|cMhnHbJ)yQI)g=$qy4U-^ z**|^aPX`}+P#}SzirX812S*ER4WP+DeBqqxoNt}4j2HKQJo?j@K6+`{azdI=H;gkz z_|#l}#cvZjarnC3XJ$I{xjNXU`oY=v&dwi?7xn#Y>)&*L0%FT8378z;x7#-F zoj(~b+V!#Or-qLV%cemYu=r)We_q{0Ri0KnZUoi@o=ucG|9Q2FvOlAMW)!ypiQ@Lw z--iDZ)c#%Cdaho1cWdD}i|!LO4fmfk6hZp4J(Z)q)X&RGMq4#M@6^NnJ<2pzW4KqS zgY^E6qOqpDPdDX_^=Locse|;Pt?0Z`^DB$-T#fNp<#~YNSM|N4&6-~~DKKp{j`rmJ zdb=9%{JKYlY485Lu`1Qy8H+HjQeax$HCC$n`%(?u|9z8jY*+sOR2t7)^KkPOnkum4 zser{cv;P?rbc_E z>3jH{U3=MIK%N5r!)RQts1yptBehzgUNun)%cqp#Q_A?al;f9F+Y;6GSbI^WfX%y@ i{$@lssZ>~2LK;eKnvNz_rN2 Dict: + """Load recipe templates from YAML file.""" + try: + # Template path could be: + # - Absolute path (already resolved) + # - Relative path (resolve relative to project root) + if path.is_absolute(): + template_path = path + else: + template_path = self.project_root / 'scripts' / path + with open(template_path) as f: + data = yaml.safe_load(f) + return data['templates'] + except FileNotFoundError: + print(f"Error: Templates file not found: {template_path}", file=sys.stderr) + sys.exit(2) + except yaml.YAMLError as e: + print(f"Error: Invalid YAML in {template_path}: {e}", file=sys.stderr) + sys.exit(2) + + def validate_template(self, template: Dict) -> List[str]: + """Validate template structure and ingredient existence.""" + errors = [] + + # Check required keys + required_keys = ['description', 'base', 'required'] + for key in required_keys: + if key not in template: + errors.append(f"Missing required key: {key}") + + # Validate base ingredient exists + if 'base' in template: + base_path = self.ingredients_dir / f"{template['base']}.cfg" + if not base_path.exists(): + errors.append(f"Base ingredient not found: {template['base']}.cfg") + + # Validate required ingredients exist + for item in template.get('required', []): + if isinstance(item, dict): + inc_name = list(item.values())[0] + else: + inc_name = item + inc_path = self.ingredients_dir / f"{inc_name}.cfg" + if not inc_path.exists(): + errors.append(f"Required ingredient not found: {inc_name}.cfg") + + # Validate optional ingredient values + for opt_key, opt_config in template.get('optional', {}).items(): + if isinstance(opt_config, dict): + for value, inc_name in opt_config.items(): + inc_path = self.ingredients_dir / f"{inc_name}.cfg" + if not inc_path.exists(): + errors.append(f"Optional ingredient not found: {inc_name}.cfg (for {opt_key}={value})") + elif isinstance(opt_config, list): + for inc_name in opt_config: + inc_path = self.ingredients_dir / f"{inc_name}.cfg" + if not inc_path.exists(): + errors.append(f"Optional ingredient not found: {inc_name}.cfg (in list)") + + return errors + + def validate_manifest(self, manifest: Dict) -> List[str]: + """Validate manifest structure.""" + errors = [] + + if 'recipes' not in manifest: + errors.append("Manifest missing 'recipes' key") + return errors + + for recipe_config in manifest['recipes']: + if 'name' not in recipe_config: + errors.append("Recipe config missing 'name' key") + if 'variants' not in recipe_config: + errors.append(f"Recipe '{recipe_config.get('name', 'unnamed')}' missing 'variants' key") + continue + + for variant in recipe_config['variants']: + if 'version' not in variant: + errors.append(f"Recipe '{recipe_config['name']}' variant missing 'version'") + + return errors + + def generate_recipe(self, recipe_type: str, version: str, **modifiers) -> str: + """Generate a recipe from template with modifiers.""" + if recipe_type not in self.templates: + print(f"Error: Unknown recipe type: {recipe_type}", file=sys.stderr) + sys.exit(1) + + template = self.templates[recipe_type] + + # Validate template + errors = self.validate_template(template) + if errors: + print(f"Error: Invalid template '{recipe_type}':", file=sys.stderr) + for error in errors: + print(f" - {error}", file=sys.stderr) + sys.exit(1) + + lines = self.build_header(template['description'], recipe_type, version, modifiers) + lines.extend(self.build_includes(template, version, modifiers)) + + return '\n'.join(lines) + + def build_header(self, description: str, recipe_type: str, + version: str, modifiers: Dict) -> List[str]: + """Build the ASCII art header and description.""" + header = [ + "# __ ____ ____ _____", + "# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \\/ ___/", + "# / __ \\/ __ \\/ / / / / / __ \\/ __ `__ \\/ _ \\ / / / /\\__ \\", + "# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /", + "# / .___/_/ /_/\\__, /_/_/\\____/_/ /_/ /_/\\___/ \\____//____/", + "# /_/ /____/", + "", + f"# {description}", + "", + ] + return header + + def build_includes(self, template: Dict, version: str, modifiers: Dict) -> List[str]: + """Build %include lines from template and modifiers.""" + includes = [] + seen = set() # Track to prevent duplicates + # Add version to modifiers for template processing + modifiers = modifiers.copy() + modifiers['version'] = version + + # Add required includes + for item in template.get('required', []): + if isinstance(item, dict): + inc_name = list(item.values())[0] + else: + inc_name = item + + inc_file = f"{inc_name}.cfg" + if inc_file not in seen: + includes.append(f"%include ../ingredients/{inc_file}") + seen.add(inc_file) + + # Add optional includes based on modifiers + for opt_key, opt_config in template.get('optional', {}).items(): + if opt_key in modifiers: + value = modifiers[opt_key] + if isinstance(opt_config, dict): + if value in opt_config: + inc_file = f"{opt_config[value]}.cfg" + if inc_file not in seen: + includes.append(f"%include ../ingredients/{inc_file}") + seen.add(inc_file) + elif isinstance(opt_config, list) and value is True: + for item in opt_config: + inc_file = f"{item}.cfg" + if inc_file not in seen: + includes.append(f"%include ../ingredients/{inc_file}") + seen.add(inc_file) + + # Handle special modifiers (CPU, GPU) + for mod_key, mod_value in modifiers.items(): + if mod_key in template.get('modifiers', {}): + mod_config = template['modifiers'][mod_key] + if isinstance(mod_config, dict) and mod_value in mod_config: + inc_file = f"{mod_config[mod_value]}.cfg" + if inc_file not in seen: + includes.append(f"%include ../ingredients/{inc_file}") + seen.add(inc_file) + + return includes + + def validate_recipe(self, content: str) -> List[str]: + """Validate recipe content, return list of warnings/errors.""" + issues = [] + includes = [line for line in content.split('\n') if line.startswith('%include')] + + # Check for duplicate includes + seen = set() + for inc in includes: + parts = inc.split() + if len(parts) < 2: + continue + path = parts[1] + if path in seen: + issues.append(f"Duplicate include: {path}") + seen.add(path) + + # Check ingredient existence + for inc in includes: + parts = inc.split() + if len(parts) < 2: + continue + path = parts[1] + inc_path = self.ingredients_dir / path + if not inc_path.exists(): + issues.append(f"Missing ingredient: {path}") + + return issues + + def generate_filename(self, recipe_type: str, version: str, **modifiers) -> str: + """Generate recipe filename from parameters.""" + # Map modifiers to filename components + parts = [recipe_type.replace('_', '-')] + + # Add CPU/GPU first (hypervisors) + if modifiers.get('cpu') and modifiers.get('cpu') != 'generic': + parts.append(modifiers['cpu']) + if modifiers.get('gpu') and modifiers.get('gpu') != 'none': + parts.append(modifiers['gpu']) + + # Add desktop (non-GNOME only, since GNOME is default) + if modifiers.get('desktop') and modifiers['desktop'] != 'gnome': + parts.append(modifiers['desktop']) + + # Add version + parts.append(str(version)) + + # Add hypervisor suffix (only when hypervisor is enabled) + if modifiers.get('hypervisor'): + parts.append('hypervisor') + + # Add security suffix (devel only, since secure is default) + if modifiers.get('security') == 'devel': + parts.append('devel') + + # Add storage suffix (encrypted only, since standard is default) + if modifiers.get('storage') == 'encrypted': + parts.append('encrypted') + + return '_'.join(parts) + '.cfg' + + +def main(): + parser = argparse.ArgumentParser( + description='Generate Phyllome OS kickstart recipes from templates', + formatter_class=argparse.RawDescriptionHelpFormatter + ) + + # Global options + # Use __file__ to find the scripts directory, then go up to project root + SCRIPTS_DIR = Path(__file__).resolve().parent + PROJECT_ROOT = SCRIPTS_DIR.parent + + parser.add_argument('--ingredients', '-i', + type=Path, default=PROJECT_ROOT / 'ingredients', + help='Ingredients directory (default: parent/ingredients)') + parser.add_argument('--templates', '-t', + type=Path, default=SCRIPTS_DIR / 'recipe_templates.yaml', + help='Templates YAML file (default: parent/recipe_templates.yaml)') + + # Batch mode + parser.add_argument('--manifest', '-m', + type=Path, help='Manifest YAML for batch generation') + parser.add_argument('--output-dir', '-d', + type=Path, default=Path(__file__).parent / 'recipes', + help='Output directory (batch generation, default: parent/recipes)') + parser.add_argument('--dry-run', '-n', + action='store_true', + help='Show what would be generated without writing files') + + # Single generation mode + parser.add_argument('--type', '-T', + help='Recipe type (e.g., virtual-desktop)') + parser.add_argument('--output', '-o', + type=Path, help='Output file (single generation)') + + # Recipe parameters + parser.add_argument('--version', '-v', + choices=['43', 'rawhide'], default='rawhide', + help='Fedora version (default: rawhide)') + parser.add_argument('--desktop', + choices=['gnome', 'labwc'], + help='Desktop environment (default: gnome)') + parser.add_argument('--storage', + choices=['standard', 'encrypted'], + help='Storage type (default: standard)') + parser.add_argument('--security', + choices=['secure', 'devel'], + help='Security mode (default: secure)') + parser.add_argument('--cpu', + choices=['generic', 'amdcpu', 'intelcpu'], + help='CPU optimization') + parser.add_argument('--gpu', + choices=['none', 'intelgpu'], + default='none', + help='GPU passthrough (default: none)') + + # Validation mode + parser.add_argument('--validate', '-V', + nargs='+', + help='Validate recipe files') + + args = parser.parse_args() + + # Initialize generator + generator = RecipeGenerator(args.ingredients, args.templates) + + # Validation mode + if args.validate: + all_issues = [] + for recipe_path in args.validate: + try: + with open(recipe_path) as f: + content = f.read() + issues = generator.validate_recipe(content) + if issues: + all_issues.append((recipe_path, issues)) + except FileNotFoundError: + print(f"Error: Recipe not found: {recipe_path}", file=sys.stderr) + sys.exit(2) + + if all_issues: + print("Validation issues found:", file=sys.stderr) + for path, issues in all_issues: + print(f"\n{path}:", file=sys.stderr) + for issue in issues: + print(f" - {issue}", file=sys.stderr) + sys.exit(1) + else: + print("All recipes validated successfully") + sys.exit(0) + + # Batch generation mode + if args.manifest: + try: + with open(args.manifest) as f: + manifest = yaml.safe_load(f) + except FileNotFoundError: + print(f"Error: Manifest file not found: {args.manifest}", file=sys.stderr) + sys.exit(2) + except yaml.YAMLError as e: + print(f"Error: Invalid YAML in manifest: {e}", file=sys.stderr) + sys.exit(2) + + # Validate manifest + errors = generator.validate_manifest(manifest) + if errors: + print(f"Error: Invalid manifest:", file=sys.stderr) + for error in errors: + print(f" - {error}", file=sys.stderr) + sys.exit(1) + + # Generate all recipes + for recipe_config in manifest.get('recipes', []): + recipe_type = recipe_config['name'] + if recipe_type not in generator.templates: + print(f"Error: Unknown recipe type in manifest: {recipe_type}", file=sys.stderr) + sys.exit(1) + + for variant in recipe_config.get('variants', []): + version = variant['version'] + modifiers = {k: v for k, v in variant.items() if k not in ['version']} + + content = generator.generate_recipe(recipe_type, version, **modifiers) + + if args.validate and not args.dry_run: + issues = generator.validate_recipe(content) + if issues: + print(f"Validation issues for {recipe_type} {version}:", file=sys.stderr) + for issue in issues: + print(f" - {issue}", file=sys.stderr) + sys.exit(1) + + filename = generator.generate_filename(recipe_type, version, **modifiers) + output_path = args.output_dir / filename + + if args.dry_run: + print(f"Would generate: {output_path}") + else: + print(f"Generating: {output_path}") + with open(output_path, 'w') as f: + f.write(content) + + sys.exit(0) + + # Single generation mode + if args.type: + modifiers = { + 'desktop': args.desktop if args.desktop and args.desktop != 'gnome' else None, + 'storage': args.storage if args.storage != 'standard' else None, + 'security': args.security if args.security != 'secure' else None, + 'cpu': args.cpu if args.cpu and args.cpu != 'generic' else None, + 'gpu': args.gpu if args.gpu and args.gpu != 'none' else None, + } + # Filter out None/False values + modifiers = {k: v for k, v in modifiers.items() if v is not None} + + content = generator.generate_recipe(args.type, args.version, **modifiers) + + if args.validate: + issues = generator.validate_recipe(content) + if issues: + print("Validation issues:", file=sys.stderr) + for issue in issues: + print(f" - {issue}", file=sys.stderr) + sys.exit(1) + else: + print("Validation passed") + + if args.output: + if args.dry_run: + print(f"Would write to: {args.output}") + else: + with open(args.output, 'w') as f: + f.write(content) + print(f"Generated: {args.output}") + else: + print(content) + + sys.exit(0) + + # No mode specified, show help + parser.print_help() + sys.exit(1) + + +if __name__ == '__main__': + main() diff --git a/scripts/recipe_templates.yaml b/scripts/recipe_templates.yaml new file mode 100644 index 0000000..effd4f3 --- /dev/null +++ b/scripts/recipe_templates.yaml @@ -0,0 +1,166 @@ +# Recipe Templates for Phyllome OS Kickstart Generator +# Each template defines the structure for a recipe type +# Modifiers allow variant creation without duplicating files + +templates: + # Virtual desktop recipe + # Modifiers: desktop (gnome|labwc), storage (standard|encrypted), + # security (secure|devel), version (43|rawhide), post (true|false) + virtual-desktop: + description: "A recipe for a virtual desktop" + base: core + required: + - core + - storage: core-storage + - bootloader: core-bootloader-grub + - locale: core-locale + - services: core-services + - network: core-network + - packages: core-packages + - initial-setup: core-initial-setup-server + optional: + security: + secure: core-security-on + devel: core-security-off + version: + "43": core-fedora-repo-43 + "rawhide": core-fedora-repo-rawhide + desktop: + gnome: base-desktop-gnome + labwc: base-desktop-labwc + post: core-post + extras: + - base-guest-agents + modifiers: + storage: + standard: core-storage + encrypted: core-storage-encrypted + + # Virtual server recipe + # Modifiers: security (secure|devel), version (43|rawhide), post (true|false) + virtual-server: + description: "A recipe for a virtual server" + base: core + required: + - core + - storage: core-storage + - bootloader: core-bootloader-grub + - locale: core-locale + - services: core-services + - network: core-network + - packages: core-packages + - initial-setup: core-initial-setup-server + optional: + security: + secure: core-security-on + devel: core-security-off + version: + "43": core-fedora-repo-43 + "rawhide": core-fedora-repo-rawhide + post: core-post + extras: + - base-guest-agents + modifiers: + storage: + standard: core-storage + encrypted: core-storage-encrypted + + # Desktop hypervisor recipe + # Modifiers: cpu (generic|amdcpu|intelcpu), gpu (none|intelgpu), + # security (secure|devel), version (rawhide), post (true|false) + desktop-hypervisor: + description: "A recipe for a desktop hypervisor" + base: core + required: + - core + - storage: core-storage + - bootloader: core-bootloader-grub + - locale: core-locale + - services: core-services + - network: core-network + - packages: core-packages + - packages-hw: core-packages-hardware-support + - initial-setup: core-initial-setup-gnome-desktop + - desktop: base-desktop-gnome + - vmm: base-desktop-virtual-machine-manager + - repo: core-fedora-repo-rawhide + optional: + security: + secure: core-security-on + devel: core-security-off + cpu: + generic: base-hypervisor + amdcpu: base-hypervisor-amdcpu + intelcpu: base-hypervisor-intelcpu + gpu: + intelgpu: base-hypervisor-intelgpu + post: core-post + modifiers: + cpu: + generic: base-hypervisor + amdcpu: base-hypervisor-amdcpu + intelcpu: base-hypervisor-intelcpu + gpu: + none: null + intelgpu: base-hypervisor-intelgpu + storage: + standard: core-storage + encrypted: core-storage-encrypted + + # Live desktop recipe + # Modifiers: desktop (gnome|none), security (secure|devel), version (rawhide) + live-desktop: + description: "A recipe for a live desktop" + base: live-core + required: + - live-core + - storage: live-core-storage + - bootloader: live-core-bootloader-grub + - locale: core-locale + - services: core-services + - network: core-network + - packages: core-packages + - mandatory: live-core-mandatory-packages + - post: live-core-post + - session: live-core-post-live-session + - initial-setup: core-initial-setup-gnome-desktop + - desktop: base-desktop-gnome + - repo: core-fedora-repo-rawhide + optional: + security: + secure: core-security-on + devel: core-security-off + packages-hw: core-packages-hardware-support + modifiers: + storage: + standard: live-core-storage + encrypted: live-core-storage + + # Live server recipe + # Modifiers: security (secure|devel), version (rawhide), hypervisor (true|false) + live-server: + description: "A recipe for a live server" + base: live-core + required: + - live-core + - storage: live-core-storage + - bootloader: live-core-bootloader-grub + - locale: core-locale + - services: core-services + - network: core-network + - packages: core-packages + - mandatory: live-core-mandatory-packages + - post: live-core-post + - session: live-core-post-live-session + - initial-setup: core-initial-setup-server + - repo: core-fedora-repo-rawhide + optional: + security: + secure: core-security-on + devel: core-security-off + packages-hw: core-packages-hardware-support + hypervisor: base-hypervisor + modifiers: + storage: + standard: live-core-storage + encrypted: live-core-storage diff --git a/scripts/recipes_manifest.yaml b/scripts/recipes_manifest.yaml new file mode 100644 index 0000000..560950c --- /dev/null +++ b/scripts/recipes_manifest.yaml @@ -0,0 +1,87 @@ +# Recipe Manifest for Phyllome OS +# Define all recipe variants using generators from recipe_templates.yaml +# Edit this file to add new variants, then run: make generate-recipes + +recipes: + # Virtual Desktop variants + - name: virtual-desktop + variants: + - version: 43 + desktop: gnome + storage: standard + security: secure + extras: true + - version: 43 + desktop: gnome + storage: standard + security: devel + extras: true + - version: 43 + desktop: labwc + storage: standard + security: secure + extras: true + - version: rawhide + desktop: gnome + storage: standard + security: secure + extras: true + - version: rawhide + desktop: gnome + storage: encrypted + security: secure + extras: true + + # Virtual Server variants + - name: virtual-server + variants: + - version: 43 + security: secure + extras: true + post: true + - version: 43 + security: devel + extras: true + post: false + - version: rawhide + security: secure + extras: true + post: true + - version: rawhide + security: devel + extras: true + post: false + + # Desktop Hypervisor variants + - name: desktop-hypervisor + variants: + - version: rawhide + security: secure + - version: rawhide + cpu: amdcpu + security: secure + - version: rawhide + cpu: intelcpu + security: secure + - version: rawhide + cpu: intelcpu + gpu: intelgpu + security: secure + + # Live Desktop variants + - name: live-desktop + variants: + - version: rawhide + security: secure + packages-hw: true + + # Live Server variants + - name: live-server + variants: + - version: rawhide + security: secure + packages-hw: true + - version: rawhide + security: secure + packages-hw: true + hypervisor: true diff --git a/scripts/requirements.txt b/scripts/requirements.txt new file mode 100644 index 0000000..26efb36 --- /dev/null +++ b/scripts/requirements.txt @@ -0,0 +1,2 @@ +PyYAML>=6.0 +pytest>=7.0 diff --git a/tests/__pycache__/test_recipe_generator.cpython-314-pytest-8.4.2.pyc b/tests/__pycache__/test_recipe_generator.cpython-314-pytest-8.4.2.pyc new file mode 100644 index 0000000000000000000000000000000000000000..797a4998c04d954cd7de3caad0c8c6558c61ca1b GIT binary patch literal 41160 zcmeHwdvF}bncwUagXiGI7x=*PO^D=zAV3l%_!Iy>Bocy#Bq;kxZ7qQ%xG@MUXBLvU zjurYY7gJ~7nJV9%m^xREDm#%_NhS2zb*DTkp)Zc3N-DVp7QjN|bD~t7XC*0xOvN$( z%J1u*>6zUf>;fPu$u^eD4_`m0x2OC2y1(!1ueaA!S4j9={F6VAw}d5WkOI~xXd;g~ zJ(6@&Ql+Hys-${Od6HiC*LTuC?roM%29m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=ru1q8M3W8qARm2)wIH5M57()NPkbJa z=ObzJf03lWF8x;ZPo_{Q79NX5&Q7#%#@V6E)Ah|ApzAy*Ddo zCEwTNugYIjzN*~zyxo5L%bA9aQ_`mYByIl>^~-O+@h#j9wsoR@YqmZ-Q6Ij)cDnxX TP37l7)#vGY1j(m|ckcfO0Hg@A literal 0 HcmV?d00001 diff --git a/tests/test_recipe_generator.py b/tests/test_recipe_generator.py new file mode 100644 index 0000000..52b8008 --- /dev/null +++ b/tests/test_recipe_generator.py @@ -0,0 +1,227 @@ +"""Tests for the Recipe Generator.""" + +import pytest +from pathlib import Path +import sys +import os + +# Add scripts directory to path +SCRIPTS_DIR = Path(__file__).parent.parent / 'scripts' +sys.path.insert(0, str(SCRIPTS_DIR)) + +from generate_recipe import RecipeGenerator + +INGREDIENTS_DIR = Path(__file__).parent.parent / 'ingredients' + + +class TestRecipeGenerator: + """Test RecipeGenerator class.""" + + def setup_method(self): + """Set up test fixtures.""" + self.generator = RecipeGenerator(Path('ingredients'), Path('recipe_templates.yaml')) + + def test_template_loading(self): + """Test that templates are loaded correctly.""" + assert isinstance(self.generator.templates, dict) + assert len(self.generator.templates) == 5 + assert 'virtual-desktop' in self.generator.templates + assert 'virtual-server' in self.generator.templates + assert 'desktop-hypervisor' in self.generator.templates + assert 'live-desktop' in self.generator.templates + assert 'live-server' in self.generator.templates + + def test_validate_template_success(self): + """Test validation of valid templates.""" + template = self.generator.templates['virtual-desktop'] + errors = self.generator.validate_template(template) + assert errors == [] + + def test_validate_template_missing_key(self): + """Test validation detects missing keys.""" + template = {'base': 'core'} + errors = self.generator.validate_template(template) + assert any('Missing required key' in error for error in errors) + + def test_validate_template_missing_ingredient(self): + """Test validation detects missing ingredients.""" + template = { + 'description': 'Test', + 'base': 'core', + 'required': [ + {'storage': 'core-storage'}, + {'nonexistent': 'nonexistent-ingredient'} + ] + } + errors = self.generator.validate_template(template) + assert any('not found' in error for error in errors) + + def test_generate_virtual_desktop_basic(self): + """Test generating basic virtual desktop recipe.""" + content = self.generator.generate_recipe('virtual-desktop', '43', + desktop='gnome', + storage='standard', + security='secure') + assert '# A recipe for a virtual desktop' in content + assert '%include ../ingredients/core.cfg' in content + assert '%include ../ingredients/base-desktop-gnome.cfg' in content + assert '%include ../ingredients/core-fedora-repo-43.cfg' in content + assert '%include ../ingredients/core-security-on.cfg' in content + + def test_generate_virtual_desktop_encrypted(self): + """Test generating encrypted virtual desktop recipe.""" + content = self.generator.generate_recipe('virtual-desktop', 'rawhide', + desktop='gnome', + storage='encrypted', + security='secure') + assert '%include ../ingredients/core-storage-encrypted.cfg' in content + + def test_generate_virtual_desktop_labwc(self): + """Test generating LabWC virtual desktop recipe.""" + content = self.generator.generate_recipe('virtual-desktop', '43', + desktop='labwc', + storage='standard', + security='secure') + assert '%include ../ingredients/base-desktop-labwc.cfg' in content + assert '%include ../ingredients/base-desktop-gnome.cfg' not in content + + def test_generate_virtual_desktop_devel(self): + """Test generating development mode virtual desktop recipe.""" + content = self.generator.generate_recipe('virtual-desktop', '43', + desktop='gnome', + storage='standard', + security='devel') + assert '%include ../ingredients/core-security-off.cfg' in content + assert '%include ../ingredients/core-security-on.cfg' not in content + + def test_generate_virtual_server(self): + """Test generating virtual server recipe.""" + content = self.generator.generate_recipe('virtual-server', 'rawhide', + security='secure') + assert '# A recipe for a virtual server' in content + assert '%include ../ingredients/base-desktop-gnome.cfg' not in content + assert '%include ../ingredients/core-initial-setup-server.cfg' in content + + def test_generate_desktop_hypervisor_amd(self): + """Test generating AMD CPU hypervisor recipe.""" + content = self.generator.generate_recipe('desktop-hypervisor', 'rawhide', + cpu='amdcpu', + security='secure') + assert '%include ../ingredients/base-hypervisor-amdcpu.cfg' in content + assert '%include ../ingredients/base-hypervisor-intelcpu.cfg' not in content + + def test_generate_desktop_hypervisor_intel_gpu(self): + """Test generating Intel CPU+GPU hypervisor recipe.""" + content = self.generator.generate_recipe('desktop-hypervisor', 'rawhide', + cpu='intelcpu', + gpu='intelgpu', + security='secure') + assert '%include ../ingredients/base-hypervisor-intelcpu.cfg' in content + assert '%include ../ingredients/base-hypervisor-intelgpu.cfg' in content + + def test_generate_live_desktop(self): + """Test generating live desktop recipe.""" + content = self.generator.generate_recipe('live-desktop', 'rawhide', + desktop='gnome', + security='secure') + assert '# A recipe for a live desktop' in content + assert '%include ../ingredients/live-core.cfg' in content + assert '%include ../ingredients/live-core-storage.cfg' in content + + def test_generate_live_server(self): + """Test generating live server recipe.""" + content = self.generator.generate_recipe('live-server', 'rawhide', + security='secure') + assert '# A recipe for a live server' in content + assert '%include ../ingredients/live-core.cfg' in content + assert '%include ../ingredients/core-initial-setup-server.cfg' in content + + def test_no_duplicate_includes(self): + """Test that duplicate includes are prevented.""" + content = self.generator.generate_recipe('desktop-hypervisor', 'rawhide', + cpu='intelcpu', + gpu='intelgpu', + security='secure') + includes = [line for line in content.split('\n') if line.startswith('%include')] + paths = [line.split()[1] for line in includes] + assert len(paths) == len(set(paths)), "Found duplicate includes" + + def test_missing_ingredient_detection(self): + """Test that missing ingredients are detected.""" + content = self.generator.generate_recipe('virtual-desktop', '43', + desktop='gnome', + storage='standard', + security='secure') + issues = self.generator.validate_recipe(content) + assert issues == [], f"Found missing ingredients: {issues}" + + def test_filename_generation_standard(self): + """Test filename generation for standard configuration.""" + filename = self.generator.generate_filename('virtual-desktop', '43', + desktop='gnome', + storage='standard', + security='secure') + assert filename == 'virtual-desktop_43.cfg' + + def test_filename_generation_encrypted(self): + """Test filename generation for encrypted storage.""" + filename = self.generator.generate_filename('virtual-desktop', 'rawhide', + desktop='gnome', + storage='encrypted', + security='secure') + assert filename == 'virtual-desktop_rawhide_encrypted.cfg' + + def test_filename_generation_devel(self): + """Test filename generation for development mode.""" + filename = self.generator.generate_filename('virtual-desktop', '43', + desktop='gnome', + storage='standard', + security='devel') + assert filename == 'virtual-desktop_43_devel.cfg' + + def test_filename_generation_cpu_gpu(self): + """Test filename generation for hypervisor with CPU/GPU.""" + filename = self.generator.generate_filename('desktop-hypervisor', 'rawhide', + cpu='intelcpu', + gpu='intelgpu', + security='secure') + assert filename == 'desktop-hypervisor_intelcpu_intelgpu_rawhide.cfg' + + def test_filename_generation_labwc(self): + """Test filename generation for non-default desktop.""" + filename = self.generator.generate_filename('virtual-desktop', '43', + desktop='labwc', + storage='standard', + security='secure') + assert filename == 'virtual-desktop_labwc_43.cfg' + + def test_filename_generation_hypervisor(self): + """Test filename generation for live server with hypervisor.""" + filename = self.generator.generate_filename('live-server', 'rawhide', + security='secure', + hypervisor=True) + assert filename == 'live-server_rawhide_hypervisor.cfg' + + def test_invalid_recipe_type(self): + """Test error on invalid recipe type.""" + with pytest.raises(SystemExit) as exc_info: + self.generator.generate_recipe('nonexistent-type', '43') + assert exc_info.value.code == 1 + + def test_manifest_validation_missing_recipes_key(self): + """Test manifest validation detects missing recipes key.""" + manifest = {} + errors = self.generator.validate_manifest(manifest) + assert any('recipes' in error for error in errors) + + def test_manifest_validation_missing_name(self): + """Test manifest validation detects missing recipe name.""" + manifest = {'recipes': [{}]} + errors = self.generator.validate_manifest(manifest) + assert any('name' in error for error in errors) + + def test_manifest_validation_missing_version(self): + """Test manifest validation detects missing version.""" + manifest = {'recipes': [{'name': 'test', 'variants': [{}]}]} + errors = self.generator.validate_manifest(manifest) + assert any('version' in error for error in errors)