Name: fedora-asahi-remix-scripts Version: 20241123 Release: 1%{?dist} Summary: Fedora Asahi Remix utility scripts License: MIT URL: https://pagure.io/fedora-asahi/fedora-asahi-remix-scripts Source: %{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: systemd-rpm-macros Requires: dnf Requires: systemd Requires: btrfs-progs %description Utility scripts for the Fedora Asahi Remix. %prep %autosetup %build # Nothing to build %install install -Dpm0644 -t %{buildroot}%{_unitdir} asahi-extras-firstboot.service install -Dpm0644 -t %{buildroot}%{_unitdir} asahi-setup-swap-firstboot.service install -Dpm0755 -t %{buildroot}%{_libexecdir}/%{name} install-extras.sh install -Dpm0755 -t %{buildroot}%{_libexecdir}/%{name} setup-swap.sh install -Dpm0755 -t %{buildroot}%{_libexecdir}/%{name} asahi-enable-zswap.conf %post %systemd_post asahi-extras-firstboot.service %systemd_post asahi-setup-swap-firstboot.service # Switch zram to zswap for systems installed prior to the updated script if [ $1 -gt 1 ] && grep -q '^/var/swap/swapfile' /etc/fstab && [ ! -e /etc/systemd/zram-generator.conf ] && [ ! -e /etc/tmpfiles.d/asahi-enable-zswap.conf ]; then echo "# disable zram-generator-defaults config in favor of zswap on Apple systems with swap" >/etc/systemd/zram-generator.conf cp %{_libexecdir}/%{name}/asahi-enable-zswap.conf /etc/tmpfiles.d/ fi %preun %systemd_preun asahi-extras-firstboot.service %systemd_preun asahi-setup-swap-firstboot.service %postun %systemd_postun asahi-extras-firstboot.service %systemd_postun asahi-setup-swap-firstboot.service %files %license LICENSE %{_unitdir}/asahi-extras-firstboot.service %{_unitdir}/asahi-setup-swap-firstboot.service %{_libexecdir}/%{name}/ %changelog * Fri Nov 22 2024 Hector Martin - 20241123-1 - Switch out zram for zswap on swapful systems * Tue Dec 19 2023 Hector Martin - 20231219-1 - Add SELinux policies to swap setup script * Mon Dec 18 2023 Hector Martin - 20231218-1 - Add swap setup script * Wed Sep 06 2023 Davide Cavalca - 20230906-2 - Simplify logic in the install script * Wed Sep 06 2023 Davide Cavalca - 20230906-1 - Initial version