recipe-generator: Update to new template structure with install and live templates

- Replaced individual templates with unified 'install' (desktop, server, hypervisor) and 'live' (live-desktop, live-server) templates

- Added new modifiers: variant_type, hypervisor-type, desktop, initial-setup, virtualization

- Updated generate_recipe.py to handle new modifier structure with additive flags

- Updated recipes_manifest.yaml with new modifier structure

- Added missing fragment files and directories
This commit is contained in:
Lukas Greve
2026-03-25 19:15:32 +01:00
parent 3782777058
commit 520657dcee
35 changed files with 465 additions and 532 deletions
+5 -65
View File
@@ -1,68 +1,8 @@
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies.
# VMM (Virtual Machine Manager) packages
virt-manager # Install virt-manager, a graphical front-end for QEMU/KVM
%packages --exclude-weakdeps
virtual-manager
libvirt-client-tools
%end
%post --nochroot --log=/mnt/sysimage/root/virt-manager-post.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
# Modify the default virt-manager behavior for misc. options
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.override<< EOF
# Modify the default virt-manager behavior for misc. options
[org.virt-manager.virt-manager]
xmleditor-enabled=true
manager-window-height=600
manager-window-width=200
# Libvirt URIs listed in the manager window
[org.virt-manager.virt-manager.connections]
uris=['qemu:///system', 'qemu:///session']
autoconnect=['qemu:///session']
# Show usage in the domain list
[org.virt-manager.virt-manager.vmlist-fields]
cpu-usage=false
# Settings related to statistics
[org.virt-manager.virt-manager.stats]
update-interval=3
enable-disk-poll=true
enable-memory-poll=true
enable-net-poll=true
# Default behavior for the console
[org.virt-manager.virt-manager.console]
scaling=2
resize-guest=1
autoconnect=false
# Do not show toolbar
[org.virt-manager.virt-manager.details]
show-toolbar=false
# Modify default values for new VMs
[org.virt-manager.virt-manager.new-vm]
storage-format='raw'
cpu-default='host-model'
graphics-type='spice'
# Modify the default virt-manager behavior for confirmation dialogues
[org.virt-manager.virt-manager.confirm]
forcepoweroff=false
removedev=false
unapplied-dev=false
EOF
glib-compile-schemas /mnt/sysimage/usr/share/glib-2.0/schemas/
%end # End of the %post section
+6 -53
View File
@@ -1,56 +1,9 @@
# Virt-manager post-installation configuration
# VMM post-installation scripts
%post --nochroot --log=/mnt/sysimage/root/vmm-post-scripts.log # Beginning of %post section
%post --erroronfail
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
# Start libvirt service
systemctl enable libvirtd
systemctl start libvirtd
# Modify the default virt-manager behavior for misc. options
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.override<< EOF
[org.virt-manager.virt-manager]
xmleditor-enabled=true
manager-window-height=600
manager-window-width=200
[org.virt-manager.virt-manager.connections]
uris=['qemu:///system', 'qemu:///session']
autoconnect=['qemu:///session']
[org.virt-manager.virt-manager.vmlist-fields]
cpu-usage=false
[org.virt-manager.virt-manager.stats]
update-interval=3
enable-disk-poll=true
enable-memory-poll=true
enable-net-poll=true
[org.virt-manager.virt-manager.console]
scaling=2
resize-guest=1
autoconnect=false
[org.virt-manager.virt-manager.details]
show-toolbar=false
[org.virt-manager.virt-manager.new-vm]
storage-format='raw'
cpu-default='host-model'
graphics-type='spice'
[org.virt-manager.virt-manager.confirm]
forcepoweroff=false
removedev=false
unapplied-dev=false
EOF
glib-compile-schemas /mnt/sysimage/usr/share/glib-2.0/schemas/
%end # End of the %post section
%end
@@ -1,25 +1 @@
# Initial setup - GNOME desktop mode
firstboot --enable # Initial Setup will start after the first reboot
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies.
# TO BE TESTED -> initial-setup-gui # Graphical user interface for the initial-setup utility
# TO BE TESTED -> initial-setup-gui-wayland-generic.x86_64 # Run the initial-setup GUI in Wayland
gnome-initial-setup # Add GNOME initial setup too to let user create local account.
%end # End of the packages section
# %post --nochroot --log=/mnt/sysimage/root/initial-setup-gnome.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
#
# truncate -s 0 /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf # remove content of vendor.conf so that all options are made available
#
# ## Append lines to existing vendor.conf file, so that options are skipped upon reboot
# cat >> /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf<< EOF
# [pages]
# skip=privacy
# [goa]
# providers=local-first!
# EOF
#
# %end # End of the %post section
# Desktop initial-setup configuration
@@ -1,9 +1,7 @@
# Initial setup packages - GNOME desktop mode
# Initial setup packages - desktop mode
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies.
# TO BE TESTED -> initial-setup-gui # Graphical user interface for the initial-setup utility
# TO BE TESTED -> initial-setup-gui-wayland-generic.x86_64 # Run the initial-setup GUI in Wayland
gnome-initial-setup # Add GNOME initial setup too to let user create local account.
initial-setup # Initial setup package
%end # End of the packages section
@@ -0,0 +1,25 @@
# Initial setup - GNOME desktop mode
firstboot --enable # Initial Setup will start after the first reboot
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies.
# TO BE TESTED -> initial-setup-gui # Graphical user interface for the initial-setup utility
# TO BE TESTED -> initial-setup-gui-wayland-generic.x86_64 # Run the initial-setup GUI in Wayland
gnome-initial-setup # Add GNOME initial setup too to let user create local account.
%end # End of the packages section
# %post --nochroot --log=/mnt/sysimage/root/initial-setup-gnome.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
#
# truncate -s 0 /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf # remove content of vendor.conf so that all options are made available
#
# ## Append lines to existing vendor.conf file, so that options are skipped upon reboot
# cat >> /mnt/sysimage/usr/share/gnome-initial-setup/vendor.conf<< EOF
# [pages]
# skip=privacy
# [goa]
# providers=local-first!
# EOF
#
# %end # End of the %post section
@@ -0,0 +1,9 @@
# Initial setup packages - GNOME desktop mode
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies.
# TO BE TESTED -> initial-setup-gui # Graphical user interface for the initial-setup utility
# TO BE TESTED -> initial-setup-gui-wayland-generic.x86_64 # Run the initial-setup GUI in Wayland
gnome-initial-setup # Add GNOME initial setup too to let user create local account.
%end # End of the packages section
+9 -5
View File
@@ -1,10 +1,14 @@
# Hypervisor package inclusion for live server
%packages --exclude-weakdeps
# Live desktop hypervisor configuration
# Enable virtualization support in live environment
%packages
qemu-kvm
libvirt
libvirt-client
virt-install
%end
%post --erroronfail
# Setup libvirt for live environment
mkdir -p /var/lib/libvirt
systemctl enable libvirtd
%end
@@ -0,0 +1,5 @@
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies.
virt-manager # Install virt-manager, a graphical front-end for QEMU/KVM
%end
@@ -0,0 +1,56 @@
# Virt-manager post-installation configuration
%post --nochroot --log=/mnt/sysimage/root/vmm-post-scripts.log # Beginning of %post section
# Create a file to autostart virt-manager
cat > /mnt/sysimage/etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
# Modify the default virt-manager behavior for misc. options
cat >> /mnt/sysimage/usr/share/glib-2.0/schemas/org.virt-manager.virt-manager.gschema.override<< EOF
[org.virt-manager.virt-manager]
xmleditor-enabled=true
manager-window-height=600
manager-window-width=200
[org.virt-manager.virt-manager.connections]
uris=['qemu:///system', 'qemu:///session']
autoconnect=['qemu:///session']
[org.virt-manager.virt-manager.vmlist-fields]
cpu-usage=false
[org.virt-manager.virt-manager.stats]
update-interval=3
enable-disk-poll=true
enable-memory-poll=true
enable-net-poll=true
[org.virt-manager.virt-manager.console]
scaling=2
resize-guest=1
autoconnect=false
[org.virt-manager.virt-manager.details]
show-toolbar=false
[org.virt-manager.virt-manager.new-vm]
storage-format='raw'
cpu-default='host-model'
graphics-type='spice'
[org.virt-manager.virt-manager.confirm]
forcepoweroff=false
removedev=false
unapplied-dev=false
EOF
glib-compile-schemas /mnt/sysimage/usr/share/glib-2.0/schemas/
%end # End of the %post section
@@ -0,0 +1 @@
# Server-specific post-install tasks