Fix the non-efi and non-efi-alt-arch cases, hopefully.

Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
Peter Jones 2018-05-01 14:49:43 -04:00
parent b28a7eb98d
commit 8b76186e82
2 changed files with 62 additions and 1 deletions

View File

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

View File

@ -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 <pjones@redhat.com> - 2-2
- Fix the non-efi and non-efi-alt-arch cases, hopefully.
* Tue May 01 2018 Peter Jones <pjones@redhat.com> - 2-1
- Lots of rpmlint fixups and the like.