Set host_cpu for rpm as x86_64_v2
This commit is contained in:
parent
2ec8cfdba7
commit
1aa44399dc
40
0001-Set-host_cpu-for-rpm-as-x86_64_v2.patch
Normal file
40
0001-Set-host_cpu-for-rpm-as-x86_64_v2.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 5515dbd33eb106067ce2263722d19fa0b6a24fa0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: eabdullin <ed.abdullin.1@gmail.com>
|
||||||
|
Date: Thu, 12 Sep 2024 14:28:59 +0300
|
||||||
|
Subject: [PATCH] Set host_cpu for rpm as x86_64_v2
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/rpmrc.c | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
|
||||||
|
index 5bd1d95..b8357b1 100644
|
||||||
|
--- a/lib/rpmrc.c
|
||||||
|
+++ b/lib/rpmrc.c
|
||||||
|
@@ -1113,6 +1113,8 @@ static void read_auxv(void)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#define ALMALINUX_X86_64_V2
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
|
||||||
|
@@ -1131,10 +1133,14 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
|
||||||
|
while (!ctx->machDefaults) {
|
||||||
|
if (!rpmPlatform(ctx, platform_path)) {
|
||||||
|
char * s = rpmExpand("%{_host_cpu}", NULL);
|
||||||
|
+#if defined(ALMALINUX_X86_64_V2)
|
||||||
|
+ rstrlcpy(un.machine, "x86_64_v2", sizeof(un.machine));
|
||||||
|
+#else
|
||||||
|
if (s) {
|
||||||
|
rstrlcpy(un.machine, s, sizeof(un.machine));
|
||||||
|
free(s);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
s = rpmExpand("%{_host_os}", NULL);
|
||||||
|
if (s) {
|
||||||
|
rstrlcpy(un.sysname, s, sizeof(un.sysname));
|
||||||
|
--
|
||||||
|
2.39.3 (Apple Git-146)
|
||||||
|
|
6
rpm.spec
6
rpm.spec
@ -36,7 +36,7 @@
|
|||||||
Summary: The RPM package management system
|
Summary: The RPM package management system
|
||||||
Name: rpm
|
Name: rpm
|
||||||
Version: %{rpmver}
|
Version: %{rpmver}
|
||||||
Release: %{?snapver:0.%{snapver}.}%{baserelease}%{?dist}.alma.1
|
Release: %{?snapver:0.%{snapver}.}%{baserelease}%{?dist}.alma.2
|
||||||
Url: http://www.rpm.org/
|
Url: http://www.rpm.org/
|
||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Source0: http://ftp.rpm.org/releases/%{srcdir}/rpm-%{srcver}.tar.bz2
|
Source0: http://ftp.rpm.org/releases/%{srcdir}/rpm-%{srcver}.tar.bz2
|
||||||
@ -126,6 +126,7 @@ Requires(pre): sed
|
|||||||
%patchlist
|
%patchlist
|
||||||
# AlmaLinux specific patches
|
# AlmaLinux specific patches
|
||||||
0001-Fix-Treat-x86_64_v2-as-x86_64-in-architecture-checks.patch
|
0001-Fix-Treat-x86_64_v2-as-x86_64-in-architecture-checks.patch
|
||||||
|
0001-Set-host_cpu-for-rpm-as-x86_64_v2.patch
|
||||||
|
|
||||||
# Set rpmdb path to /usr/lib/sysimage/rpm
|
# Set rpmdb path to /usr/lib/sysimage/rpm
|
||||||
rpm-4.17.x-rpm_dbpath.patch
|
rpm-4.17.x-rpm_dbpath.patch
|
||||||
@ -619,6 +620,9 @@ fi
|
|||||||
%doc %{_defaultdocdir}/rpm/API/
|
%doc %{_defaultdocdir}/rpm/API/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 12 2024 Eduard Abdullin <eabdullin@almalinux.org> - 4.19.1.1-3.alma.2
|
||||||
|
- Set host_cpu for rpm as x86_64_v2
|
||||||
|
|
||||||
* Thu Aug 01 2024 Eduard Abdullin <eabdullin@almalinux.org> - 4.19.1.1-3.alma.1
|
* Thu Aug 01 2024 Eduard Abdullin <eabdullin@almalinux.org> - 4.19.1.1-3.alma.1
|
||||||
- Fix: Treat x86_64_v2 as x86_64 in architecture checks
|
- Fix: Treat x86_64_v2 as x86_64 in architecture checks
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user