From 8b76186e82a0fb82dcca96d658ccca04e8d1e87b Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Tue, 1 May 2018 14:49:43 -0400 Subject: [PATCH] Fix the non-efi and non-efi-alt-arch cases, hopefully. Signed-off-by: Peter Jones --- ...ut-nil-is-definitely-not-what-we-wan.patch | 57 +++++++++++++++++++ efi-rpm-macros.spec | 6 +- 2 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 0006-efi_arch-turns-out-nil-is-definitely-not-what-we-wan.patch diff --git a/0006-efi_arch-turns-out-nil-is-definitely-not-what-we-wan.patch b/0006-efi_arch-turns-out-nil-is-definitely-not-what-we-wan.patch new file mode 100644 index 0000000..7354697 --- /dev/null +++ b/0006-efi_arch-turns-out-nil-is-definitely-not-what-we-wan.patch @@ -0,0 +1,57 @@ +From 3f4b280e8578d4de3d03b4af205106813a2fdbd1 Mon Sep 17 00:00:00 2001 +From: Peter Jones +Date: Tue, 1 May 2018 14:44:17 -0400 +Subject: [PATCH 6/6] %efi_arch: turns out %{nil} is definitely not what we + want. + +Signed-off-by: Peter Jones +--- + macros.efi.in | 17 +++++------------ + 1 file changed, 5 insertions(+), 12 deletions(-) + +diff --git a/macros.efi.in b/macros.efi.in +index a0bd67d9b69..f4c70617ae7 100644 +--- a/macros.efi.in ++++ b/macros.efi.in +@@ -48,17 +48,14 @@ elseif ifarch("%{arm}") then + elseif ifarch("ia64") then + print("ia64") + else +- print("%{nil}") ++ rpm.expand("%%{error:Not an EFI architecture}") ++ print("") + end + } + + %efi_arch_upper %{lua: + local arch = rpm.expand("%{efi_arch}") +- if arch == '%{nil}' +- print(arch) +- else +- print(string.upper(arch)) +- end ++ print(string.upper(arch)) + } + + %efi_alt_arch %{lua: +@@ -75,15 +72,11 @@ end + if ifarch("x86_64") then + print("ia32") + else +- print("%{nil}") ++ print("") + end + } + + %efi_alt_arch_upper %{lua: + local arch = rpm.expand("%{efi_alt_arch}") +- if arch == '%{nil}' +- print(arch) +- else +- print(string.upper(arch)) +- end ++ print(string.upper(arch)) + } +-- +2.14.3 + diff --git a/efi-rpm-macros.spec b/efi-rpm-macros.spec index eff1711..fc0c6f0 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: 1%{?dist} +Release: 2%{?dist} Group: Development/System License: GPLv3+ URL: https://github.com/rhboot/%{name}/ @@ -16,6 +16,7 @@ Patch0002: 0002-Add-a-changelog-entry-to-the-.spec-for-version-2.patch Patch0003: 0003-efi-rpm-macros.spec.in-use-autosetup.patch 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 %global debug_package %{nil} %global _efi_vendor_ %(eval sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' /etc/os-release) @@ -39,6 +40,9 @@ Patch0005: 0005-Return-nil-instead-of-on-unsupported-arches.patch %{_rpmmacrodir}/* %changelog +* Tue May 01 2018 Peter Jones - 2-2 +- Fix the non-efi and non-efi-alt-arch cases, hopefully. + * Tue May 01 2018 Peter Jones - 2-1 - Lots of rpmlint fixups and the like.