## START: Set by rpmautospec ## (rpmautospec version 0.2.6) %define autorelease(e:s:pb:) %{?-p:0.}%{lua: release_number = 4; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{?dist} ## END: Set by rpmautospec Name: asahi-scripts Version: 20221027 Release: %autorelease Summary: Miscellaneous admin scripts for Asahi Linux License: MIT URL: https://github.com/AsahiLinux/asahi-scripts Source: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Source: update-m1n1.sysconfig # Add asahi-fwextract script Patch: %{url}/commit/c749ccaa5d9b16d49b8ae49052f14c5838917cd7.patch # asahi-fwextract: fix overzealous quoting Patch: %{url}/commit/780b7f21f8dc002a3a073b34036291655af7dd38.patch # PR#9: Add dracut module Patch: %{url}/pull/9.patch BuildArch: noarch BuildRequires: make BuildRequires: sed Requires: coreutils Requires: grep Requires: sed Requires: util-linux-core %description This package contains miscellaneous admin scripts for the Asahi Linux reference distro. %package -n asahi-fwextract Summary: Asahi Linux firmware extractor Requires: %{name} = %{version}-%{release} Requires: python3dist(asahi-firmware) %description -n asahi-fwextract Asahi Linux firmware extractor. %package -n dracut-asahi Summary: Dracut config for Apple Silicon Macs Requires: dracut Requires: linux-firmware-vendor = %{version}-%{release} Provides: dracut-config-asahi = %{version}-%{release} Obsoletes: dracut-config-asahi < 20220821-5 Provides: update-vendor-firmware = %{version}-%{release} Obsoletes: update-vendor-firmware < 20220918.2-8 %description -n dracut-asahi Dracut config for Apple Silicon Macs. %package -n linux-firmware-vendor Summary: Ensure /lib/firmware/vendor exists for firmware handoff Requires: linux-firmware %description -n linux-firmware-vendor This package ensures /lib/firmware/vendor exists so that firmware can be handed over properly from the initramfs. %package -n update-m1n1 Summary: Keep m1n1 up to date Requires: %{name} = %{version}-%{release} Requires: bash Requires: gzip Requires: m1n1 Requires: uboot-images-armv8 >= 2022.10-0.3.rc1 %description -n update-m1n1 Keep m1n1 up to date on Apple Silicon systems. %prep %autosetup -p1 %build # nothing to do here %install %make_install install-fedora \ PREFIX="%{_prefix}" \ BIN_DIR="%{_sbindir}" \ CONFIG_DIR="%{_sysconfdir}/sysconfig" install -Ddpm0755 %{buildroot}%{_prefix}/lib/firmware/vendor install -Dpm0644 %SOURCE1 %{buildroot}%{_sysconfdir}/sysconfig/update-m1n1 %transfiletriggerin -n update-m1n1 -- %{_libdir}/m1n1 %{_datadir}/uboot/apple_m1 /boot/dtb- %{_sbindir}/update-m1n1 || : %files %license LICENSE %{_datadir}/%{name}/ %files -n asahi-fwextract %license LICENSE %{_sbindir}/asahi-fwextract %files -n dracut-asahi %license LICENSE %{_prefix}/lib/dracut/dracut.conf.d/10-asahi.conf %{_prefix}/lib/dracut/modules.d/99asahi-firmware/ %files -n linux-firmware-vendor %license LICENSE %dir %{_prefix}/lib/firmware/vendor %files -n update-m1n1 %license LICENSE %config(noreplace) %{_sysconfdir}/m1n1.conf %config(noreplace) %{_sysconfdir}/sysconfig/update-m1n1 %{_sbindir}/update-m1n1 %changelog * Tue Nov 01 2022 Davide Cavalca 20221027-4 - Refresh PR#9 patch * Tue Nov 01 2022 Davide Cavalca 20221027-3 - Add linux-firmware-vendor subpackage * Tue Nov 01 2022 Davide Cavalca 20221027-2 - Backport asahi-fwextract bugfix * Mon Oct 31 2022 Davide Cavalca 20221027-1 - Update to 20221027; Fixes: RHBZ#2137760 * Mon Sep 19 2022 Davide Cavalca 20220918.2-7 - Add asahi-fwextract subpackage * Mon Sep 19 2022 Davide Cavalca 20220918.2-6 - Refresh dracut module patch * Mon Sep 19 2022 Davide Cavalca 20220918.2-5 - Add missing Requires for dracut-asahi * Sun Sep 18 2022 Davide Cavalca 20220918.2-4 - Add trailing slash to folders * Sun Sep 18 2022 Davide Cavalca 20220918.2-3 - Rename dracut-config-asahi to dracut-asahi * Sun Sep 18 2022 Davide Cavalca 20220918.2-2 - Add dracut module * Sun Sep 18 2022 Davide Cavalca 20220918.2-1 - Update to 20220918.2 * Sun Sep 18 2022 Davide Cavalca 20220821-4 - Refresh dracut config and install it in the correct path * Sun Aug 28 2022 Davide Cavalca 20220821-3 - Add dracut-config-asahi subpackage * Sat Aug 27 2022 Davide Cavalca 20220821-2 - Add update-m1n1 subpackage * Sat Aug 27 2022 Davide Cavalca 20220821-1 - Update to 20220821 * Sun Aug 14 2022 Davide Cavalca 20220712-1 - Update to 20220712; Fixes: RHBZ#2118188 * Wed Jul 20 2022 Fedora Release Engineering - 20220318.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Mar 25 2022 Davide Cavalca - 20220318.1-1 - Initial import; Fixes: RHBZ#2068554