Name: fedora-grub2-theme Version: 1.0 Release: %autorelease Summary: Hardened dark GRUB2 BootUX with BGRT and A/B fallback License: MIT URL: https://forge.fedoraproject.org/design/grub2-fedora-theme Source0: %{name}-%{version}.tar.xz BuildArch: noarch BuildRequires: systemd-rpm-macros Requires: grub2-common Requires: grub2-tools Requires: google-noto-sans-fonts Recommends: plymouth-system-theme # -------------------------------------------------- %description BootUX provides a minimal, modern, dark GRUB2 theme aligned with the Plymouth BGRT experience, with built-in resilience. Features: - Single dark theme (BGRT-aligned) - Noto Sans typography - Plymouth BGRT integration (OEM logo continuity) - A/B boot fallback system - Boot failure detection and recovery - Secure Boot awareness - Immutable OS compatibility - Self-healing configuration All logic is handled by grub2-theme-switch. # -------------------------------------------------- %package tools Summary: BootUX control CLI with A/B fallback system Requires: grub2-tools %description tools Provides grub2-theme-switch, a unified BootUX control tool implementing: - Theme management - Font installation - Plymouth BGRT sync - GRUB regeneration - Boot success tracking - A/B fallback recovery system # -------------------------------------------------- %prep %autosetup -p1 %build # -------------------------------------------------- %install install -d %{buildroot}/boot/grub2/themes/fedora cp -a themes/default/* %{buildroot}/boot/grub2/themes/fedora/ install -d %{buildroot}%{_bindir} install -m 0755 tools/grub2-theme-switch %{buildroot}%{_bindir}/grub2-theme-switch install -d %{buildroot}%{_unitdir} install -m 0644 systemd/grub2-theme-auto.service %{buildroot}%{_unitdir}/grub2-theme-auto.service install -m 0644 systemd/grub2-theme-auto.timer %{buildroot}%{_unitdir}/grub2-theme-auto.timer install -m 0644 systemd/bootux-success.service %{buildroot}%{_unitdir}/bootux-success.service install -d %{buildroot}/etc/bootux # -------------------------------------------------- %post /usr/bin/grub2-theme-switch --auto || : if command -v systemctl >/dev/null 2>&1; then systemctl daemon-reexec || : systemctl enable --now grub-theme-auto.timer || : systemctl enable bootux-success.service || : fi # -------------------------------------------------- %postun if [ $1 -eq 0 ]; then sed -i '/^GRUB_THEME=/d' /etc/default/grub || : grub2-mkconfig -o /boot/grub2/grub.cfg || : fi # -------------------------------------------------- %transfiletriggerin -p /bin/sh -- /etc/default/grub /boot/grub2/themes /usr/bin/grub2-theme-switch --rebuild || : %transfiletriggerun -p /bin/sh -- /etc/default/grub /boot/grub2/themes /usr/bin/grub2-theme-switch --rebuild || : # -------------------------------------------------- %check test -f themes/default/theme.txt bash -n tools/grub2-theme-switch # -------------------------------------------------- %files %license LICENSE %doc README.md /boot/grub2/themes/fedora %dir /etc/bootux %{_unitdir}/grub2-theme-auto.service %{_unitdir}/grub2-theme-auto.timer %{_unitdir}/bootux-success.service %files tools %{_bindir}/grub2-theme-switch %changelog %autochangelog