Add support for versioned x86_64 arches

This commit is contained in:
Andrew Lukoshko 2024-08-05 14:03:54 +00:00
parent 16eebb16b6
commit 95407c7875
2 changed files with 59 additions and 1 deletions

View File

@ -0,0 +1,53 @@
From 20e624e0ed69a65e8c2365225287206c2cf81215 Mon Sep 17 00:00:00 2001
From: Andrew Lukoshko <alukoshko@almalinux.org>
Date: Mon, 5 Aug 2024 13:59:24 +0000
Subject: [PATCH] Add support for versioned x86_64 arches
---
Makefile | 2 +-
efi-rpm-macros.spec.in | 2 +-
macros.efi-srpm.in | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index d410bc4..1d12fba 100644
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ override EFI_ESP_ROOT=/boot/efi
endif
EFI_ARCHES ?= $(call get-config,arches)
ifeq ($(EFI_ARCHES),)
-override EFI_ARCHES="x86_64 aarch64 %{arm} %{ix86}"
+override EFI_ARCHES="%{x86_64} aarch64 %{arm} %{ix86}"
endif
EFI_VENDOR ?= $(call get-config,vendor)
diff --git a/efi-rpm-macros.spec.in b/efi-rpm-macros.spec.in
index 6f0e7b0..4c22053 100644
--- a/efi-rpm-macros.spec.in
+++ b/efi-rpm-macros.spec.in
@@ -36,7 +36,7 @@ machine bootloaders and tools.
%autosetup -S git_am -n %{name}-@@EFI_SOURCE_VERSION@@
git config --local --add efi.vendor "%{_efi_vendor_}"
git config --local --add efi.esp-root /boot/efi
-git config --local --add efi.arches "x86_64 aarch64 %{arm} %{ix86}"
+git config --local --add efi.arches "%{x86_64} aarch64 %{arm} %{ix86}"
%build
%make_build clean all
diff --git a/macros.efi-srpm.in b/macros.efi-srpm.in
index f91ea31..3f0780a 100644
--- a/macros.efi-srpm.in
+++ b/macros.efi-srpm.in
@@ -29,7 +29,7 @@
local function getarch()
if arch("ia64") then
return("ia64")
- elseif arch("x86_64") then
+ elseif arch("%{x86_64}") then
return("x64")
elseif arch("%{ix86}") then
return("ia32")
--
2.43.5

View File

@ -10,6 +10,8 @@ BuildArch: noarch
Source0: https://github.com/rhboot/%{name}/releases/download/%{version}/%{name}-6.tar.bz2
Patch0001: 0001-Add-support-for-versioned-x86_64-arches.patch
%global debug_package %{nil}
%global _efi_vendor_ %(eval echo $(sed -n -e 's/rhel/redhat/' -e 's/^ID=//p' /etc/os-release))
@ -37,7 +39,7 @@ machine bootloaders and tools.
%autosetup -S git_am -n %{name}-6
git config --local --add efi.vendor "%{_efi_vendor_}"
git config --local --add efi.esp-root /boot/efi
git config --local --add efi.arches "x86_64 x86_64_v2 aarch64 %{arm} %{ix86}"
git config --local --add efi.arches "%{x86_64} aarch64 %{arm} %{ix86}"
%build
%make_build clean all
@ -66,6 +68,9 @@ git config --local --add efi.arches "x86_64 x86_64_v2 aarch64 %{arm} %{ix86}"
%dir /boot/efi/EFI/%{_efi_vendor_}
%changelog
* Mon Aug 05 2024 Andrew Lukoshko <alukoshko@almalinux.org> - 6-3.alma.1
- Add support for versioned x86_64 arches
* Tue Jul 30 2024 Nicolas Frayer <nfrayer@redhat.com> - 6-3
- Update to efi-rpm-macros version 6
- Resolves: #RHEL-50848