%define appname grub-btrfs Name: grub-btrfs-timeshift Version: 4.14 Release: 1%{?dist} Summary: Include btrfs snapshots at boot options. (Grub menu) License: GPL-3.0 URL: https://github.com/Antynea/grub-btrfs Source: %{url}/archive/refs/tags/v%{version}.tar.gz BuildArch: noarch BuildRequires: sed BuildRequires: make BuildRequires: systemd-rpm-macros Requires: grub2-common Requires: timeshift %description grub-btrfs improves the grub bootloader by adding a btrfs snapshots sub-menu, allowing the user to boot into snapshots. grub-btrfs supports manual snapshots as well as snapper, timeshift, and yabsnap created snapshots. - Automatically lists snapshots existing on the btrfs root partition. - Automatically detect if /boot is in a separate partition. - Automatically detect kernel, initramfs and Intel/AMD microcode in /boot directory within snapshots. - Automatically create corresponding menu entries in grub.cfg - Automatically detect the type/tags/triggers and descriptions/comments of Snapper/Timeshift/Yabsnap snapshots. - Automatically generate grub.cfg if you use the provided Systemd/ OpenRC service. %prep %autosetup -n %{appname}-%{version} %build sed -i '25,28d' Makefile sed -i 's|#GRUB_BTRFS_GRUB_DIRNAME="/boot/grub2"|GRUB_BTRFS_GRUB_DIRNAME="/boot/grub2"|' config sed -i 's|"#GRUB_BTRFS_MKCONFIG=/usr/bin/grub2-mkconfig|GRUB_BTRFS_MKCONFIG=/usr/bin/grub2-mkconfig|' config sed -i 's|"#GRUB_BTRFS_SCRIPT_CHECK=grub2-script-check|GRUB_BTRFS_SCRIPT_CHECK=grub2-script-check|' config sed -i 's|"#GRUB_BTRFS_MKCONFIG_LIB=/usr/share/grub2/grub-mkconfig_lib|GRUB_BTRFS_MKCONFIG_LIB=/usr/share/grub/grub-mkconfig_lib|' config sed -i 's|/.snapshots|--timeshift-auto|' grub-btrfsd.service %install make DESTDIR=%buildroot install %post %systemd_post grub-btrfsd.service %preun %systemd_preun grub-btrfsd.service %postun %systemd_postun_with_restart grub-btrfsd.service %files %license LICENSE %doc README.md %{_bindir}/grub-btrfsd %{_sysconfdir}/default/%{appname}/config %{_sysconfdir}/grub.d/41_snapshots-btrfs %{_unitdir}/grub-btrfsd.service %{_docdir}/%{appname}/initramfs-overlayfs.md %{_docdir}/%{appname}/README.md %{_mandir}/man8/*.8.gz %_defaultlicensedir/LICENSE %changelog %autochangelog