Add %{efi_has_alt_arch}

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2018-05-02 10:12:47 -04:00
parent 90fc9fda87
commit 0f7061b948
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,30 @@
From a4358f78316160cf29e177daedf9562e6a0505f2 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
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 <pjones@redhat.com>
---
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

View File

@ -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 <pjones@redhat.com> - 2-4
- Add %%{efi_has_alt_arch}
* Tue May 01 2018 Peter Jones <pjones@redhat.com> - 2-3
- Make an efi-srpm-macros subpackage to pull in so %%{efi} works in
ExclusiveArch in koji.