diff --git a/0001-Set-host_cpu-for-rpm-as-x86_64_v2.patch b/0001-Set-host_cpu-for-rpm-as-x86_64_v2.patch new file mode 100644 index 0000000..2aadee8 --- /dev/null +++ b/0001-Set-host_cpu-for-rpm-as-x86_64_v2.patch @@ -0,0 +1,40 @@ +From 5515dbd33eb106067ce2263722d19fa0b6a24fa0 Mon Sep 17 00:00:00 2001 +From: eabdullin +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) + diff --git a/rpm.spec b/rpm.spec index 34747ad..e857106 100644 --- a/rpm.spec +++ b/rpm.spec @@ -36,7 +36,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}%{baserelease}%{?dist}.alma.1 +Release: %{?snapver:0.%{snapver}.}%{baserelease}%{?dist}.alma.2 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,7 @@ Requires(pre): sed %patchlist # AlmaLinux specific patches 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 rpm-4.17.x-rpm_dbpath.patch @@ -619,6 +620,9 @@ fi %doc %{_defaultdocdir}/rpm/API/ %changelog +* Thu Sep 12 2024 Eduard Abdullin - 4.19.1.1-3.alma.2 +- Set host_cpu for rpm as x86_64_v2 + * Thu Aug 01 2024 Eduard Abdullin - 4.19.1.1-3.alma.1 - Fix: Treat x86_64_v2 as x86_64 in architecture checks