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.
This commit is contained in:
Lukas Greve
2026-03-24 19:52:34 +01:00
parent c1c5fa8d07
commit 1aa264c146
40 changed files with 1601 additions and 124 deletions
+26
View File
@@ -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
@@ -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)
+26
View File
@@ -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
+25
View File
@@ -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
@@ -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
@@ -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
@@ -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
+14 -16
View File
@@ -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.cfg
%include ../ingredients/core-storage.cfg # ext4-based storage configuration %include ../ingredients/core-storage.cfg
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/core-packages-hardware-support.cfg
%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support %include ../ingredients/core-initial-setup-gnome-desktop.cfg
%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide %include ../ingredients/base-desktop-gnome.cfg
%include ../ingredients/core-post.cfg # Triggered after the installation %include ../ingredients/base-desktop-virtual-machine-manager.cfg
%include ../ingredients/core-initial-setup-gnome-desktop.cfg # Enable initial setup to allow end users to create user on first boot %include ../ingredients/core-fedora-repo-rawhide.cfg
%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment %include ../ingredients/core-security-on.cfg
%include ../ingredients/base-desktop-virtual-machine-manager.cfg # Virtual Machine Manager
%include ../ingredients/base-hypervisor.cfg # Base hypervisor
+23
View File
@@ -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
+28
View File
@@ -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
+26
View File
@@ -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
+14 -16
View File
@@ -7,19 +7,17 @@
# A recipe for a live desktop # A recipe for a live desktop
%include ../ingredients/live-core.cfg # For live systems only %include ../ingredients/live-core.cfg
%include ../ingredients/live-core-storage.cfg # For live systems only %include ../ingredients/live-core-storage.cfg
%include ../ingredients/live-core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/live-core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/live-core-mandatory-packages.cfg
%include ../ingredients/live-core-mandatory-packages.cfg # For live systems %include ../ingredients/live-core-post.cfg
%include ../ingredients/core-packages-hardware-support.cfg # Extended hardware support %include ../ingredients/live-core-post-live-session.cfg
%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide %include ../ingredients/core-initial-setup-gnome-desktop.cfg
%include ../ingredients/core-post.cfg # Triggered after the installation %include ../ingredients/base-desktop-gnome.cfg
%include ../ingredients/live-core-post.cfg # Post configuration script for a live system only %include ../ingredients/core-fedora-repo-rawhide.cfg
%include ../ingredients/live-core-post-live-session.cfg # Live session script %include ../ingredients/core-security-on.cfg
%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
+26
View File
@@ -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
+24
View File
@@ -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
@@ -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
+13 -14
View File
@@ -7,17 +7,16 @@
# A recipe for a live server # A recipe for a live server
%include ../ingredients/live-core.cfg # For live systems only %include ../ingredients/live-core.cfg
%include ../ingredients/live-core-storage.cfg # For live systems only %include ../ingredients/live-core-storage.cfg
%include ../ingredients/live-core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/live-core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/live-core-mandatory-packages.cfg
%include ../ingredients/live-core-mandatory-packages.cfg # For live systems %include ../ingredients/live-core-post.cfg
%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide %include ../ingredients/live-core-post-live-session.cfg
%include ../ingredients/core-post.cfg # Triggered after the installation %include ../ingredients/core-initial-setup-server.cfg
%include ../ingredients/live-core-post.cfg # Post configuration script for a live system only %include ../ingredients/core-fedora-repo-rawhide.cfg
%include ../ingredients/live-core-post-live-session.cfg # Live session script %include ../ingredients/core-security-on.cfg
%include ../ingredients/core-initial-setup-server.cfg # For headless systems
@@ -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
+26
View File
@@ -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
@@ -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
+24
View File
@@ -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
+11 -13
View File
@@ -7,16 +7,14 @@
# A recipe for a virtual desktop # A recipe for a virtual desktop
%include ../ingredients/core.cfg # Text mode %include ../ingredients/core.cfg
%include ../ingredients/core-storage.cfg # ext4-based storage configuration %include ../ingredients/core-storage.cfg
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/core-initial-setup-server.cfg
%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43 %include ../ingredients/core-security-on.cfg
%include ../ingredients/core-post.cfg # Triggered after the installation %include ../ingredients/base-desktop-gnome.cfg
%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
%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment
%include ../ingredients/base-guest-agents.cfg # Guest agents
+12 -13
View File
@@ -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.cfg
%include ../ingredients/core-storage.cfg # ext4-based storage configuration %include ../ingredients/core-storage.cfg
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-off.cfg # Enable root account, disable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/core-initial-setup-server.cfg
%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43 %include ../ingredients/core-security-off.cfg
%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment %include ../ingredients/base-desktop-gnome.cfg
%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
%include ../ingredients/base-guest-agents.cfg # Guest agents
+21
View File
@@ -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
+11 -13
View File
@@ -7,16 +7,14 @@
# A recipe for a virtual desktop # A recipe for a virtual desktop
%include ../ingredients/core.cfg # Text mode %include ../ingredients/core.cfg
%include ../ingredients/core-storage.cfg # ext4-based storage configuration %include ../ingredients/core-storage.cfg
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/core-initial-setup-server.cfg
%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43 %include ../ingredients/core-security-on.cfg
%include ../ingredients/core-post.cfg # Triggered after the installation %include ../ingredients/base-desktop-labwc.cfg
%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
%include ../ingredients/base-desktop-labwc.cfg # A labwc shell-based desktop environment
%include ../ingredients/base-guest-agents.cfg # Guest agents
+12 -13
View File
@@ -7,16 +7,15 @@
# A recipe for a virtual desktop # A recipe for a virtual desktop
%include ../ingredients/core.cfg # Text mode %include ../ingredients/core.cfg
%include ../ingredients/core-storage.cfg # ext4-based storage configuration %include ../ingredients/core-storage.cfg
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/core-initial-setup-server.cfg
%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide %include ../ingredients/core-security-on.cfg
%include ../ingredients/core-post.cfg # Triggered after the installation %include ../ingredients/core-fedora-repo-rawhide.cfg
%include ../ingredients/base-desktop-gnome.cfg # A GNOME Shell-based desktop environment %include ../ingredients/base-desktop-gnome.cfg
%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
%include ../ingredients/base-guest-agents.cfg # Guest agents
@@ -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
@@ -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
+11 -13
View File
@@ -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.cfg
%include ../ingredients/core-storage.cfg # ext4-based storage configuration %include ../ingredients/core-storage.cfg
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/core-initial-setup-server.cfg
%include ../ingredients/core-fedora-repo-43.cfg # Official repositories for Fedora 43 %include ../ingredients/core-security-on.cfg
%include ../ingredients/core-post.cfg # Triggered after the installation %include ../ingredients/base-guest-agents.cfg
%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
+19
View File
@@ -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
+20
View File
@@ -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
+12 -13
View File
@@ -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.cfg
%include ../ingredients/core-storage.cfg # ext4-based storage configuration %include ../ingredients/core-storage.cfg
%include ../ingredients/core-bootloader-grub.cfg # Set bootloader to GRUB %include ../ingredients/core-bootloader-grub.cfg
%include ../ingredients/core-locale.cfg # System locale set to Swiss French as keyboard layout and English as language %include ../ingredients/core-locale.cfg
%include ../ingredients/core-security-on.cfg # Lock root account, enable firewall and SELinux %include ../ingredients/core-services.cfg
%include ../ingredients/core-services.cfg # Required systemd services %include ../ingredients/core-network.cfg
%include ../ingredients/core-network.cfg # Network configuration %include ../ingredients/core-packages.cfg
%include ../ingredients/core-packages.cfg # Mandatory packages %include ../ingredients/core-initial-setup-server.cfg
%include ../ingredients/core-fedora-repo-rawhide.cfg # Official repositories for Fedora Rawhide %include ../ingredients/core-security-on.cfg
%include ../ingredients/core-post.cfg # Triggered after the installation %include ../ingredients/core-fedora-repo-rawhide.cfg
%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
%include ../ingredients/base-guest-agents.cfg # Guest agents
+20
View File
@@ -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
+30
View File
@@ -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."
Binary file not shown.
+438
View File
@@ -0,0 +1,438 @@
#!/usr/bin/env python3
"""
Recipe Generator for Phyllome OS Kickstart Files
Generates .cfg recipe files from templates and YAML manifest.
"""
import argparse
import sys
import yaml
from pathlib import Path
from typing import Dict, List, Optional, Any
class RecipeGenerator:
"""Generate kickstart recipes from templates and modifiers."""
def __init__(self, ingredients_dir: Path, templates_file: Path):
# Resolve ingredients_dir relative to the project root (parent of scripts/)
self.project_root = Path(__file__).parent.parent
self.ingredients_dir = self.project_root / ingredients_dir
self.templates = self.load_templates(templates_file)
def load_templates(self, path: Path) -> 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()
+166
View File
@@ -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
+87
View File
@@ -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
+2
View File
@@ -0,0 +1,2 @@
PyYAML>=6.0
pytest>=7.0
+227
View File
@@ -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)