diff --git a/0008-Add-efi_has_alt_arch-0-or-1.patch b/0008-Add-efi_has_alt_arch-0-or-1.patch new file mode 100644 index 0000000..7d66e58 --- /dev/null +++ b/0008-Add-efi_has_alt_arch-0-or-1.patch @@ -0,0 +1,30 @@ +From a4358f78316160cf29e177daedf9562e6a0505f2 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Wed, 2 May 2018 10:09:19 -0400 +Subject: [PATCH 8/8] Add %{efi_has_alt_arch} ("0" or "1") + +Signed-off-by: Peter Jones +--- + macros.efi.in | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/macros.efi.in b/macros.efi.in +index c61b3972f2d..66139a257d5 100644 +--- a/macros.efi.in ++++ b/macros.efi.in +@@ -80,3 +80,12 @@ end + local arch = rpm.expand("%{efi_alt_arch}") + print(string.upper(arch)) + } ++ ++%efi_has_alt_arch %{lua: ++ local arch = rpm.expand("%{efi_alt_arch}") ++ if arch == "" then ++ print("0") ++ else ++ print("1") ++ end ++} +-- +2.14.3 + diff --git a/efi-rpm-macros.spec b/efi-rpm-macros.spec index b3d19a9..a9f5e1a 100644 --- a/efi-rpm-macros.spec +++ b/efi-rpm-macros.spec @@ -1,7 +1,7 @@ Summary: Common RPM Macros for building EFI-related packages Name: efi-rpm-macros Version: 2 -Release: 3%{?dist} +Release: 4%{?dist} Group: Development/System License: GPLv3+ URL: https://github.com/rhboot/%{name}/ @@ -18,6 +18,7 @@ Patch0004: 0004-Add-efi_alt_arch-and-efi_alt_arch_upper.patch Patch0005: 0005-Return-nil-instead-of-on-unsupported-arches.patch Patch0006: 0006-efi_arch-turns-out-nil-is-definitely-not-what-we-wan.patch Patch0007: 0007-Make-a-macros.efi-srpm-that-defines-efi.patch +Patch0008: 0008-Add-efi_has_alt_arch-0-or-1.patch %global debug_package %{nil} %global _efi_vendor_ %(eval sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' /etc/os-release) @@ -56,6 +57,9 @@ efi-srpm-macros provides a set of SRPM macros for use in EFI-related packages. %{_rpmmacrodir}/macros.efi-srpm %changelog +* Wed May 02 2018 Peter Jones - 2-4 +- Add %%{efi_has_alt_arch} + * Tue May 01 2018 Peter Jones - 2-3 - Make an efi-srpm-macros subpackage to pull in so %%{efi} works in ExclusiveArch in koji.