860ffc
From: Cole Robinson <crobinso@redhat.com>
860ffc
Date: Fri, 20 May 2016 15:50:16 -0400
860ffc
Subject: [PATCH] spec: Advertise nvram paths of official fedora edk2 builds
860ffc
860ffc
Fedora now ships edk2 firmware in its official repos, so adapt
860ffc
the nvram path list to match. Eventually we can remove the nightly
860ffc
links as well once some integration kinks have been worked out,
860ffc
and documentation updated.
860ffc
860ffc
Move the macro building into the %build target, which lets us
860ffc
build up a shell variable and make things a bit more readable
860ffc
860ffc
https://bugzilla.redhat.com/show_bug.cgi?id=1335395
860ffc
---
860ffc
 libvirt.spec.in | 18 ++++++++++++------
860ffc
 1 file changed, 12 insertions(+), 6 deletions(-)
860ffc
860ffc
diff --git a/libvirt.spec.in b/libvirt.spec.in
860ffc
index 935ca89..20aecf6 100644
860ffc
--- a/libvirt.spec.in
860ffc
+++ b/libvirt.spec.in
860ffc
@@ -348,12 +348,6 @@
860ffc
 %endif
860ffc
 
860ffc
 
860ffc
-# Advertise OVMF and AAVMF from nightly firmware repo
860ffc
-%if 0%{?fedora}
860ffc
-    %define with_loader_nvram --with-loader-nvram="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
860ffc
-%endif
860ffc
-
860ffc
-
860ffc
 # The RHEL-5 Xen package has some feature backports. This
860ffc
 # flag is set to enable use of those special bits on RHEL-5
860ffc
 %if 0%{?rhel} == 5
860ffc
@@ -1488,6 +1482,18 @@ rm -rf .git
860ffc
     %endif
860ffc
 %endif
860ffc
 
860ffc
+%if 0%{?fedora}
860ffc
+    # Nightly firmware repo x86/OVMF
860ffc
+    LOADERS="/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd"
860ffc
+    # Nightly firmware repo aarch64/AAVMF
860ffc
+    LOADERS="$LOADERS:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw"
860ffc
+    # Fedora official x86/OVMF
860ffc
+    LOADERS="$LOADERS:/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd"
860ffc
+    # Fedora official aarch64/AAVMF
860ffc
+    LOADERS="$LOADERS:/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw"
860ffc
+    %define with_loader_nvram --with-loader-nvram="$LOADERS"
860ffc
+%endif
860ffc
+
860ffc
 # place macros above and build commands below this comment
860ffc
 
860ffc
 %if 0%{?enable_autotools}