The package rpms/rEFInd.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rEFInd.git/commit/?id=3285cfd86d9....
Change:
+ExclusiveArch: %{efi}
Thanks.
Full change:
============
commit 3285cfd86d98ae412bef06d5985d60345d1945ea
Author: Neal Gompa <ngompa(a)fedoraproject.org>
Date: Mon Oct 24 13:05:15 2022 -0400
Initial import into Fedora
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..a5b30cd
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/os_fedora.png
+/refind-src-0.13.3.1.tar.gz
diff --git a/detect-efi-size.patch b/detect-efi-size.patch
new file mode 100644
index 0000000..ce107f2
--- /dev/null
+++ b/detect-efi-size.patch
@@ -0,0 +1,43 @@
+diff --git a/refind-install b/refind-install
+index dfb8781..88dcf40 100755
+--- a/refind-install
++++ b/refind-install
+@@ -285,13 +285,23 @@ DeterminePlatform() {
+ esac
+ ;;
+ linux*)
++ local EfiSize
++ if [[ -e /sys/firmware/efi/fw_platform_size ]]; then
++ EfiSize=$(cat /sys/firmware/efi/fw_platform_size)
++ fi
+ CpuType=$(uname -m)
+ case "$CpuType" in
+ aarch64)
+ Platform="aa64"
+ ;;
+ x86_64)
+- Platform="x64"
++ case "$EfiSize" in
++ 32)
++ Platform="ia32"
++ ;;
++ *)
++ Platform="x64"
++ ;;
+ ;;
+ i?86)
+ Platform="ia32"
+@@ -299,13 +309,6 @@ DeterminePlatform() {
+ # abort. Not in BIOS mode, though, since that could be used on an emergency
+ # disc to try to recover a troubled Linux installation.
+ if [[ -d /sys/firmware/efi ]] ; then
+- if [[ "$ShimSource" != "none" &&
"$TargetDir" != "/BOOT/EFI" ]] ; then
+- echo ""
+- echo "CAUTION: shim does not currently supports 32-bit systems, so
you should not"
+- echo "use the --shim option to install on such systems.
Aborting!"
+- echo ""
+- exit 1
+- fi
+ echo
+ echo "CAUTION: This Linux installation uses a 32-bit kernel. 32-bit
EFI-based"
+ echo "computers are VERY RARE. If you've installed a 32-bit version
of Linux"
diff --git a/fix-aarch64-efi-build.patch b/fix-aarch64-efi-build.patch
new file mode 100644
index 0000000..ddfb406
--- /dev/null
+++ b/fix-aarch64-efi-build.patch
@@ -0,0 +1,32 @@
+diff --git a/Make.common b/Make.common
+index 95a3a97..e384a89 100644
+--- a/Make.common
++++ b/Make.common
+@@ -34,21 +34,12 @@ ARCH ?= $(HOSTARCH)
+ # Note: TIANOBASE is defined in master Makefile and exported
+ GENFW = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw
+ prefix = /usr/bin/
+-ifeq ($(ARCH),aarch64)
+- CC = $(prefix)aarch64-linux-gnu-gcc
+- AS = $(prefix)aarch64-linux-gnu-as
+- LD = $(prefix)aarch64-linux-gnu-ld
+- AR = $(prefix)aarch64-linux-gnu-ar
+- RANLIB = $(prefix)aarch64-linux-gnu-ranlib
+- OBJCOPY = $(prefix)aarch64-linux-gnu-objcopy
+-else
+- CC = $(prefix)gcc
+- AS = $(prefix)as
+- LD = $(prefix)ld
+- AR = $(prefix)ar
+- RANLIB = $(prefix)ranlib
+- OBJCOPY = $(prefix)objcopy
+-endif
++CC = $(prefix)gcc
++AS = $(prefix)as
++LD = $(prefix)ld
++AR = $(prefix)ar
++RANLIB = $(prefix)ranlib
++OBJCOPY = $(prefix)objcopy
+
+ ifeq ($(MAKEWITH),TIANO)
+ # Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46,
or GCC47)
diff --git a/install-nvram-only.patch b/install-nvram-only.patch
new file mode 100644
index 0000000..612d828
--- /dev/null
+++ b/install-nvram-only.patch
@@ -0,0 +1,74 @@
+--- a/refind-install 2018-09-10 10:11:58.210756087 +0100
++++ b/refind-install 2018-09-10 19:31:00.916507826 +0100
+@@ -27,6 +27,8 @@
+ # Valid only under Linux.
+ # "--keepname" to keep refind_x64.efi name as such even when using shim.
+ # Valid only under Linux.
++# "--nvramonly" to just restore the boot entry in NVRAM.
++# Valid only under Linux.
+ # "--yes" to assume a "yes" response to all prompts
+ #
+ # This program is copyright (c) 2012-2020 by Roderick W. Smith
+@@ -155,6 +157,8 @@
+ ;;
+ --keepname) KeepName=1
+ ;;
++ --nvramonly) NvramOnly=1
++ ;;
+ --drivers | --alldrivers) InstallDrivers="all"
+ ;;
+ --nodrivers) InstallDrivers="none"
+@@ -164,7 +168,7 @@
+ * ) echo "Usage: $0 [--notesp | --usedefault {device-file} | --root {dir}
|"
+ echo " --ownhfs {device-file} ]
[--keepname]"
+ echo " [--nodrivers | --alldrivers] [--shim
{shimfile}]"
+- echo " [--localkeys [--encryptkeys]] [--keepname]
[--yes]"
++ echo " [--localkeys [--encryptkeys]] [--nvramonly]
[--yes]"
+ exit 1
+ esac
+ shift
+@@ -194,6 +198,10 @@
+ echo "The --keepname option is incompatible with --usedefault!
Aborting!"
+ exit 1
+ fi
++ if [[ "$NvramOnly" == 1 && "$OSTYPE" != "linux"
&& "$OSTYPE" != "linux-gnu" ]] ; then
++ echo "The --nvramonly option is valid only under Linux! Aborting!"
++ exit 1
++ fi
+ if [[ "$InstallDrivers" == "all" &&
"$TargetDir" != "/EFI/BOOT" ]] ; then
+ echo "The --alldrivers option is meant for creating USB flash drives with
(near-)"
+ echo "universal boot support. Using it on a hard disk partition runs the risk
of"
+@@ -1209,6 +1217,20 @@
+ echo "ESP was found at $InstallDir using $EspFilesystem"
+ } # FindMountedESP
+
++# Identifies the rEFInd EFI boot image filename.
++DetermineBootImageName() {
++ if [[ "$TargetDir" == '/EFI/BOOT' ]] ; then
++ Refind="boot$Platform.efi"
++ elif [[ "$ShimSource" != "none" ]] ; then
++ if [[ "$TargetShim" == "default" ]] ; then
++ TargetShim=`basename "$ShimSource"`
++ fi
++ Refind="$TargetShim"
++ else
++ Refind="refind_$Platform.efi"
++ fi
++} # DetermineBootImageName
++
+ # Uses efibootmgr to add an entry for rEFInd to the EFI's NVRAM, if necessary.
+ # If this fails, sets Problems=1
+ AddBootEntry() {
+@@ -1344,6 +1366,12 @@
+ DetermineTargetDir
+ fi
+
++ if [[ $NvramOnly == 1 ]] ; then
++ DetermineBootImageName
++ AddBootEntry
++ return
++ fi
++
+ if [[ $LocalKeys == 1 ]] ; then
+ ReSignBinaries
+ fi
diff --git a/rEFInd.spec b/rEFInd.spec
new file mode 100644
index 0000000..7f789e3
--- /dev/null
+++ b/rEFInd.spec
@@ -0,0 +1,212 @@
+# EFI/UEFI binaries are not ELF, but PE32/PE32+/COFF
+%global debug_package %{nil}
+
+# Disable LTO because it breaks EFI binary build
+%global _lto_cflags %{nil}
+
+# GNU-EFI static libraries
+%ifarch %{ix86}
+%global gnu_efi_libdir %{_libdir}
+%else
+%global gnu_efi_libdir %{_libdir}/gnuefi
+%endif
+
+%global _description %{expand:
+A graphical boot manager for EFI- and UEFI-based computers, such as all
+Intel-based Macs and recent (most 2011 and later) PCs. rEFInd presents a
+boot menu showing all the EFI boot loaders on the EFI-accessible
+partitions, and optionally BIOS-bootable partitions on Macs and BIOS boot
+entries on UEFI PCs with CSMs. EFI-compatible OSes, including Linux,
+provide boot loaders that rEFInd can detect and launch. rEFInd can launch
+Linux EFI boot loaders such as ELILO, GRUB Legacy, GRUB 2, and 3.3.0 and
+later kernels with EFI stub support. EFI file system drivers for ext2/3/4fs,
+ReiserFS, Btrfs, NTFS, HFS+, and ISO-9660 enable rEFInd to read boot
+loaders from these file systems, too. rEFInd's ability to detect boot
+loaders at run time makes it very easy to use, particularly when paired with
+Linux kernels that provide EFI stub support.
+}
+
+Name: rEFInd
+Version: 0.13.3.1
+Release: 3%{?dist}
+Summary: User friendly EFI boot manager
+License: GPL-3.0-or-later
+
+URL:
http://www.rodsbooks.com/refind/
+Source0:
https://sourceforge.net/projects/refind/files/%{version}/refind-src-%{ver...
+# Replace wrong Fedora icon with correct version
+Source1: os_fedora.png
+# Add --nvramonly option to refind-install
+Patch0: install-nvram-only.patch
+# Support 32-bit EFI on 64-bit OS (and vice versa)
+Patch1: detect-efi-size.patch
+# Fix building on AArch64 natively
+Patch2: fix-aarch64-efi-build.patch
+
+ExclusiveArch: %{efi}
+BuildRequires: gcc
+BuildRequires: make
+BuildRequires: gnu-efi-devel
+Requires: efi-filesystem
+Requires: efibootmgr
+Requires: %{name}-tools = %{version}-%{release}
+Requires: %{name}-bootloader = %{version}
+Suggests: %{name}-signed-%{efi_arch}
+
+# These were vendored and adapted into rEFInd long ago...
+## License: BSD-3-Clause
+Provides: bundled(libeg)
+## License: BSD-3-Clause
+Provides: bundled(LodePNG)
+## License: MIT
+Provides: bundled(NanoJPEG)
+
+%description %{_description}
+
+%files
+# Empty metpackage
+
+# ---------------------------------------------------------------
+
+%package tools
+Summary: User friendly EFI boot manager (management tools)
+BuildArch: noarch
+
+%description tools %{_description}
+This package provides the tools to manage the installation
+of %{name} on your system.
+
+%files tools
+%doc NEWS.txt README.txt docs/Styles docs/refind
+%doc VERSION README.install
+%license COPYING.txt LICENSE.txt CREDITS.txt
+%{_sbindir}/mkrlconf
+%{_sbindir}/mvrefind
+%{_sbindir}/refind-install
+%{_sbindir}/refind-mkdefault
+%{_mandir}/man8/mkrlconf.8*
+%{_mandir}/man8/mvrefind.8*
+%{_mandir}/man8/refind-install.8*
+%{_mandir}/man8/refind-mkdefault.8*
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/banners/
+%{_datadir}/%{name}/fonts/
+%{_datadir}/%{name}/refind-install
+%dir %{_datadir}/%{name}/refind
+%{_datadir}/%{name}/refind/icons/
+%{_datadir}/%{name}/refind/refind.conf-sample
+
+# ---------------------------------------------------------------
+
+%package unsigned-%{efi_arch}
+Summary: User friendly EFI boot manager (unsigned binaries)
+Requires: %{name}-tools = %{version}-%{release}
+Provides: %{name}-bootloader = %{version}
+BuildArch: noarch
+
+%description unsigned-%{efi_arch} %{_description}
+This package provides the unsigned EFI binaries for the rEFInd bootloader.
+
+This package is only useful if your system does not have UEFI Secure Boot
+enabled.
+
+
+%files unsigned-%{efi_arch}
+%{_datadir}/%{name}/refind/drivers_%{efi_arch}/
+%{_datadir}/%{name}/refind/refind_%{efi_arch}.efi
+%{_datadir}/%{name}/refind/tools_%{efi_arch}/
+
+# ---------------------------------------------------------------
+
+%prep
+%autosetup -n refind-%{version} -p1
+cp %{SOURCE1} icons/
+
+%build
+make GNUEFILIB=%{gnu_efi_libdir} EFILIB=%{gnu_efi_libdir} EFICRT0=%{gnu_efi_libdir}
LIBDIR=%{_libdir} all_gnuefi
+
+%install
+mkdir -p %{buildroot}%{_datadir}/%{name}/refind/
+
+# Copy the rEFInd binaries (rEFInd proper and drivers)
+install -Dp -m0644 refind/refind*.efi %{buildroot}%{_datadir}/%{name}/refind/
+mkdir -p %{buildroot}%{_datadir}/%{name}/refind/drivers_%{efi_arch}
+cp -a drivers_%{efi_arch}/* %{buildroot}%{_datadir}/%{name}/refind/drivers_%{efi_arch}/
+mkdir -p %{buildroot}%{_datadir}/%{name}/refind/tools_%{efi_arch}
+install -Dp -m0644 gptsync/gptsync_%{efi_arch}.efi
%{buildroot}%{_datadir}/%{name}/refind/tools_%{efi_arch}/gptsync_%{efi_arch}.efi
+
+# Copy configuration and support files
+install -Dp -m0644 refind.conf-sample %{buildroot}%{_datadir}/%{name}/refind/
+cp -a icons %{buildroot}%{_datadir}/%{name}/refind/
+rm -rf %{buildroot}%{_datadir}/%{name}/refind/icons/svg
+install -Dp -m0755 refind-install %{buildroot}%{_datadir}/%{name}/
+
+# Copy man pages
+mkdir -p %{buildroot}%{_mandir}/man8
+install -Dp -m0644 docs/man/mvrefind.8 %{buildroot}%{_mandir}/man8
+install -Dp -m0644 docs/man/mkrlconf.8 %{buildroot}%{_mandir}/man8
+install -Dp -m0644 docs/man/refind-install.8 %{buildroot}%{_mandir}/man8
+install -Dp -m0644 docs/man/refind-mkdefault.8 %{buildroot}%{_mandir}/man8
+
+# Copy scripts
+mkdir -p %{buildroot}%{_sbindir}
+install -Dp -m0755 mkrlconf %{buildroot}%{_sbindir}/
+install -Dp -m0755 mvrefind %{buildroot}%{_sbindir}/
+install -Dp -m0755 refind-mkdefault %{buildroot}%{_sbindir}/
+ln -sr %{buildroot}%{_datadir}/%{name}/refind-install %{buildroot}%{_sbindir}
+
+# Copy banners and fonts
+cp -a banners %{buildroot}%{_datadir}/%{name}/
+cp -a fonts %{buildroot}%{_datadir}/%{name}/
+
+# Create version file and install README file
+echo %{version} > VERSION
+echo "Version %{version} of the rEFInd boot manager is now available." >
README.install
+echo "To install it in the ESP, execute the command 'refind-install'."
>> README.install
+echo "If you are having no problems with booting your system, there is"
>> README.install
+echo "no need to install this update in the ESP."
>> README.install
+
+
+%changelog
+* Sun Oct 23 2022 Neal Gompa <ngompa(a)fedoraproject.org> - 0.13.3.1-3
+- Note bundled libraries
+- Use parallel make
+
+* Fri Apr 29 2022 Neal Gompa <ngompa(a)fedoraproject.org> - 0.13.3.1-2
+- Move management tools to their own noarch subpackage
+
+* Thu Apr 28 2022 Neal Gompa <ngompa(a)fedoraproject.org> - 0.13.3.1-1
+- Rebase to 0.13.3.1 and adapt for Fedora
+
+* Wed Jan 13 2021 Martin Whitaker <martinw(a)mageia.org> 0.12.0-2.mga8
++ Revision: 1671569
+- fix early-exit bug in refind-install script
+- set default background colour to Mageia dark blue (mga#28073)
+
+* Tue May 12 2020 Martin Whitaker <martinw(a)mageia.org> 0.12.0-1.mga8
++ Revision: 1583319
+- new version 0.12.0
+- fix build with GCC 10
+
+* Fri Feb 14 2020 Sysadmin Bot <umeabot(a)mageia.org> 0.11.4-2.mga8
++ Revision: 1521258
+- Mageia 8 Mass Rebuild
+
+* Mon Dec 17 2018 Martin Whitaker <martinw(a)mageia.org> 0.11.4-1.mga7
++ Revision: 1342446
+- new version 0.11.4
+- support 32-bit UEFI on 64-bit O/S
+
+* Thu Sep 13 2018 Martin Whitaker <martinw(a)mageia.org> 0.11.2-3.mga7
++ Revision: 1258909
+- don't automatically install in ESP
+ o the user may want to specify different install options
+
+* Tue Sep 11 2018 Martin Whitaker <martinw(a)mageia.org> 0.11.2-2.mga7
++ Revision: 1258466
+- add provides:bootloader
+
+* Tue Sep 11 2018 Martin Whitaker <martinw(a)mageia.org> 0.11.2-1.mga7
++ Revision: 1258338
+- imported package refind
+
diff --git a/sources b/sources
new file mode 100644
index 0000000..cd8b0fc
--- /dev/null
+++ b/sources
@@ -0,0 +1,2 @@
+SHA512 (os_fedora.png) =
0f4f6af9ee333a20659de8eb4df35ab9ed14681bb5cd89388c560928ca7e85520d888ceef4db3ca6be83a6ca249795913f97178fdc534288f3ac8ce20b07942a
+SHA512 (refind-src-0.13.3.1.tar.gz) =
7966df5dd8dc66cc49a329ed722a567672da8e2fa3f2334d53db65357cea17cba5a4dc5459e358de1079a938da3c63dc626d096ce28b6bf1fa2964be7359dbd1