refactor: Move recipe generator to cook/ directory and fix flattening bugs

- Move recipe-generator/ to cook/ for cleaner structure

- Fix ksflatten-relative path conversion to handle all %include paths

- Fix validation exit code to only fail on actual errors

- All recipes now generate and flatten successfully via make all
This commit is contained in:
Lukas Greve
2026-03-27 14:02:59 +01:00
parent 288ed0a249
commit 3ffb079981
137 changed files with 673 additions and 675 deletions
+67
View File
@@ -0,0 +1,67 @@
# __ ____ ____ _____
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
# Core DNF package group
# More information: https://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#id240
%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies. Package description courtesy of the Fedora project
@core
## Mandatory packages found in hidden `core` group (`dnf group info --hidden core`)
# audit # User space tools for kernel auditing
# basesystem # The skeleton package which defines a simple Fedora system
# bash # The Bourne Again SHell, a command-line interpreter.
# coreutils # A set of basic GNU tools commonly used in shell scripts
# curl # A utility for getting files from remote servers (FTP, HTTP, and others)
# dhcp-client # Provides the ISC DHCP client daemon and dhclient-script
# dnf5 # Command-line package manager
# e2fsprogs # Utilities for managing ext2, ext3, and ext4 file systems
# filesystem # The basic directory layout for a Linux system
# glibc # The GNU libc libraries
# hostname # Utility to set/show the host name or domain name
# iproute # Advanced IP routing and network device configuration tools
# iputils # Network monitoring tools including ping
# kbd # Tools for configuring the console (keyboard, virtual terminals, etc.)
# kernel # The Linux kernel
# less # A text file browser similar to more, but better. Can be excluded
# man-db # Tools for searching and reading man pages. Can be excluded
# ncurses # Ncurses support utilities
# openssh-clients # An open source SSH client applications. Can be excluded
# openssh-server # An open source SSH server daemon. Can be excluded
# parted # The GNU disk partition manipulation program
# policycoreutils # SELinux policy core utilities. Can be excluded
# procps-ng # System and process monitoring utilities
# rootfiles # The basic required files for the root user's directory
# rpm # The RPM package management system
# selinux-policy-targeted # SELinux targeted policy. Can be excluded
# setup # A set of system configuration and setup files
# shadow-utils # Utilities for managing accounts and shadow password files
# sssd-common # Common files for the SSSD. Can be excluded
# sssd-kcm # An implementation of a Kerberos KCM server. Can be excluded
# sudo # Allows restricted root access for specified users
# systemd # System and Service Manager
# util-linux # Collection of basic system utilities
# vim-minimal # A minimal version of the VIM editor
## Default packages found in hidden `core` group (`dnf group info --hidden core`)
# NetworkManager # Network connection manager and user applications
# dnf5-plugins # Plugins for dnf5
# dracut-config-rescue # dracut configuration to turn on rescue image generation
# firewalld # A firewall daemon with D-Bus interface providing a dynamic firewall
# fwupd # Firmware update daemon
# plymouth # Graphical Boot Animation and Logger
# prefixdevname # Udev helper utility that provides network interface naming using user defined prefix
# systemd-resolved # Network Name Resolution manager
# zram-generator-defaults # Default configuration for zram-generator
## Optionnal packages found in hidden `core` group (`dnf group info --hidden core`)
## Not installed by default unless "@core --optional" is used
# dracut-config-generic
# initial-setup
# initscripts
%end # End of the packages section
+18
View File
@@ -0,0 +1,18 @@
# __ ____ ____ _____
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
# Packages to be used to create a Fedora Remix and comply Fedora Remix legal guidelines: https://fedoraproject.org/wiki/Remix
%packages --exclude-weakdeps
fedora-remix-logos # Fedora Remix logos
generic-release # Generic release files
generic-logos # Icons and pictures
generic-release-common # Generic release files
generic-release-notes # Release Notes
%end # End of the packages section
+12
View File
@@ -0,0 +1,12 @@
# Hand-picked packages
%packages --exclude-weakdeps
pciutils # PCI bus related utilities
libusb # Library for accessing USB devices
usbutils # Linux USB utilities
curl # transfer a URL
wget # An advanced file and recursive website downloader
nano # A small text editor
%end # End of the packages section
@@ -0,0 +1,61 @@
# __ ____ ____ _____
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
# Extended physical hardware support. Useful for bare metal deployments.
%packages --exclude-weakdeps
@hardware-support
## Mandatory packages found in hidden `hardware-support` group
# alsa-sof-firmware # Audio drivers and firmware for ALSA. Essential for audio functionality.
# amd-gpu-firmware # Firmware for AMD GPUs. Required for proper GPU operation.
# atheros-firmware # Firmware for Atheros wireless network adapters. Critical for wireless connectivity.
# b43-fwcutter # Utility for cutting firmware files for B43 drivers. Needed for driver compatibility.
# b43-openfwwf # Driver and firmware for B43 network cards. Essential for network card operation.
# brcmfmac-firmware # Firmware for Broadcom MAC controllers. Required for wireless and wired network performance.
# cirrus-audio-firmware # Firmware for Cirrus Logic audio chips. Necessary for audio hardware support.
# intel-audio-firmware # Firmware for Intel audio processors. Required for integrated audio functionality.
# intel-gpu-firmware # Firmware for Intel GPUs. Essential for GPU operation.
# intel-vsc-firmware # Firmware for Intel Video Scheduling Controller. Required for GPU performance.
# iwlegacy-firmware # Legacy firmware for older Intel wireless cards. Needed for compatibility.
# iwlwifi-dvm-firmware # Firmware for Intel Wireless Link 5100/5200 series. Crucial for wireless connectivity.
# iwlwifi-mvm-firmware # Firmware for Intel Wireless Link 5300/5400 series. Required for wireless performance.
# libertas-firmware # Firmware for Broadcom wireless network cards. Essential for wireless connectivity.
# mt7xxx-firmware # Firmware for MediaTek wireless network adapters. Required for wireless connectivity.
# nvidia-gpu-firmware # Firmware for NVIDIA GPUs. Essential for GPU operation.
# nxpwireless-firmware # Firmware for NXP wireless network adapters. Required for wireless connectivity.
# realtek-firmware # Firmware for Realtek network adapters and audio devices. Essential for various device support.
# tiwilink-firmware # Firmware for TI WiLink wireless network adapters. Required for wireless connectivity.
## Optional packages found in hidden `hardware-support` group
## Not installed by default unless "@hardware-support --optional" is used
# acpi # Command-line ACPI client
# acpitool # Command line ACPI client
# alsa-firmware # Firmware for several ALSA-supported sound cards
# atmel-firmware # Firmware for Atmel at76c50x wireless network chips
# cmospwd # BIOS password cracker utility
# dvb-firmware # Firmware for various DVB broadcast receivers
# gpsd # Service daemon for mediating access to a GPS
# gpsd-clients # Clients for gpsd
# hddtemp # Hard disk temperature tool
# hdparm # A utility for displaying and/or setting hard disk parameters
# iscan-firmware # Firmware for Epson flatbed scanners
# libifp # General-purpose library-driver for iRiver's iFP portable audio players
# lsscsi # List SCSI devices (or hosts) and associated information
# mlxsw_spectrum-firmware # Firmware for Mellanox Spectrum 1/2/3 Switches
# mrvlprestera-firmware # Firmware for Marvell Prestera Switchdev/ASIC devices
# netronome-firmware # Firmware for Netronome Smart NICs
# opensc # Smart card library and applications
# pcsc-lite # PC/SC Lite smart card framework and applications
# pcsc-lite-ccid # Generic USB CCID smart card reader driver
# qcom-accel-firmware # Firmware for Qualcomm Technologies data center / Open-vRAN Accelerators
# qed-firmware # Firmware for Marvell FastLinQ adapters family
# radeontop # AMD Radeon video cards monitoring utility
# wpan-tools # Userspace tools for the Linux IEEE 802.15.4 stack
# zd1211-firmware # Firmware for wireless devices based on zd1211 chipset
%end # End of the packages section
@@ -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