This commit is contained in:
eabdullin 2025-01-30 12:08:13 +03:00
parent 4783f4455f
commit 29a6cbfed5
2 changed files with 58 additions and 1 deletions

View File

@ -0,0 +1,51 @@
From 486798b19df2dc933e1814e9d56c03833e9f572e Mon Sep 17 00:00:00 2001
From: eabdullin <ed.abdullin.1@gmail.com>
Date: Wed, 16 Oct 2024 11:07:36 +0300
Subject: [PATCH] Fix: Treat x86_64_v2 as x86_64 in architecture checks
This change allows spec files to use x86_64_v2 as an alias for x86_64, ensuring compatibility with packages and build scripts expecting x86_64.
---
build/parsePreamble.c | 10 ++++++----
build/parseSpec.c | 4 ++++
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index de205d5..da1867c 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -424,11 +424,13 @@ static int isMemberInEntry(Header h, const char *name, rpmTagVal tag)
if (!headerGet(h, tag, &td, HEADERGET_MINMEM))
return -1;
+ int is_not_v2 = rstrcasecmp(name, "x86_64_v2");
+
while ((str = rpmtdNextString(&td))) {
- if (!rstrcasecmp(str, name)) {
- found = 1;
- break;
- }
+ if (!rstrcasecmp(str, name) || (!is_not_v2 && !rstrcasecmp(str, "x86_64"))) {
+ found = 1;
+ break;
+ }
}
rpmtdFreeData(&td);
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 3929c0a..ae918ef 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -425,6 +425,10 @@ do { \
return PART_ERROR; \
} \
match = matchTok(exp, s); \
+ /* Additional check for x86_64_v2 */ \
+ if (!match && !strcmp(exp, "x86_64_v2")) { \
+ match = matchTok("x86_64", s); \
+ } \
free(exp); \
} while (0)
--
2.39.5 (Apple Git-154)

View File

@ -36,7 +36,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
Release: %{?snapver:0.%{snapver}.}%{baserelease}%{?dist}
Release: %{?snapver:0.%{snapver}.}%{baserelease}%{?dist}.alma.1
Url: http://www.rpm.org/
License: GPL-2.0-or-later
Source0: http://ftp.rpm.org/releases/%{srcdir}/rpm-%{srcver}.tar.bz2
@ -48,6 +48,9 @@ Source21: rpmdb_migrate
Source30: macros.rpmsign-sequoia
# AlmaLinux Patch
Patch1: 0001-Fix-Treat-x86_64_v2-as-x86_64-in-architecture-checks.patch
Requires: coreutils
Requires: popt%{_isa} >= 1.10.2.1
Requires: curl
@ -628,6 +631,9 @@ fi
%doc %{_defaultdocdir}/rpm/API/
%changelog
* Thu Jan 30 2025 Eduard Abdullin <eabdullin@almalinux.org> - 4.19.1.1-9.alma.1
- Fix: Treat x86_64_v2 as x86_64 in architecture checks
* Wed Dec 04 2024 Panu Matilainen <pmatilai@redhat.com> - 4.19.1.1-9
- Revert the gnupg/sequoia sub-packages, too much headache
- Ship sequoia-signing enablement macros as documentation instead