Consider x86_64_v2 as x86_64

i10-v2 changed/i10-v2/rpm-4.19.1.1-7.el10.inferit
Sergey Cherevko 4 weeks ago
parent 5e1559b286
commit 12e6fb9375
Signed by: scherevko
GPG Key ID: D87CBBC16D2E4A72

@ -0,0 +1,57 @@
From 02a8058b3ab0fb695c528c56b51fef3df3815de1 Mon Sep 17 00:00:00 2001
From: Sergey Cherevko <s.cherevko@msvsphere-os.ru>
Date: Tue, 3 Dec 2024 12:19:02 +0300
Subject: [PATCH] Consider x86_64_v2 as x86_64
---
build/parsePreamble.c | 4 ++++
build/parseSpec.c | 17 +++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index de205d5..cdd36a4 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -425,6 +425,10 @@ static int isMemberInEntry(Header h, const char *name, rpmTagVal tag)
return -1;
while ((str = rpmtdNextString(&td))) {
+ if (!rstrcasecmp(str, "x86_64") && !rstrcasecmp(name, "x86_64_v2")) {
+ found = 1;
+ break;
+ }
if (!rstrcasecmp(str, name)) {
found = 1;
break;
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 3929c0a..445c994 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -425,7 +425,24 @@ do { \
return PART_ERROR; \
} \
match = matchTok(exp, s); \
+ /* Additional check for x86_64_v2 */ \
+ char *s_copy = strdup(s); \
+ if (s_copy == NULL) { \
+ rpmlog(RPMLOG_ERR, _("Memory allocation error\n")); \
+ return PART_ERROR; \
+ } \
+ char *newline = strchr(s_copy, '\n'); \
+ if (newline) *newline = '\0'; \
+ char *token_ptr = strtok(s_copy, " "); \
+ while (token_ptr != NULL) { \
+ if (!match && strcmp(token_ptr, "x86_64") == 0 && strcmp(exp, "x86_64_v2") == 0) { \
+ match = 1; \
+ break; \
+ } \
+ token_ptr = strtok(NULL, " "); \
+ } \
free(exp); \
+ free(s_copy); \
} while (0)
--
2.43.5

@ -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}.inferit
Url: http://www.rpm.org/
License: GPL-2.0-or-later
Source0: http://ftp.rpm.org/releases/%{srcdir}/rpm-%{srcver}.tar.bz2
@ -126,6 +126,9 @@ Requires(pre): findutils
Requires(pre): sed
%patchlist
# MSVSphere
0001-Consider-x86_64_v2-as-x86_64.patch
# Set rpmdb path to /usr/lib/sysimage/rpm
rpm-4.17.x-rpm_dbpath.patch
# Disable autoconf config.site processing (#962837)
@ -639,6 +642,9 @@ fi
%doc %{_defaultdocdir}/rpm/API/
%changelog
* Tue Dec 03 2024 Sergey Cherevko <s.cherevko@msvsphere-os.ru> - 4.19.1.1-7.inferit
- Consider x86_64_v2 as x86_64
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 4.19.1.1-7
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018

Loading…
Cancel
Save