diff --git a/0001-Set-arch-as-x86_64_v2.patch b/0001-Set-arch-as-x86_64_v2.patch new file mode 100644 index 0000000..8bf10ed --- /dev/null +++ b/0001-Set-arch-as-x86_64_v2.patch @@ -0,0 +1,36 @@ +From 7027f2276e0839584727e462d64b5cd4896d3ba7 Mon Sep 17 00:00:00 2001 +From: eabdullin +Date: Thu, 12 Sep 2024 15:30:28 +0300 +Subject: [PATCH] Set arch as x86_64_v2 + +--- + libdnf/hy-util.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/libdnf/hy-util.cpp b/libdnf/hy-util.cpp +index 9978c8e..2c7c73d 100644 +--- a/libdnf/hy-util.cpp ++++ b/libdnf/hy-util.cpp +@@ -108,6 +108,7 @@ hy_chksum_str(const unsigned char *chksum, int type) + } + + #define MAX_ARCH_LENGTH 64 ++#define ALMALINUX_X86_64_V2 + + int + hy_detect_arch(char **arch) +@@ -141,6 +142,11 @@ hy_detect_arch(char **arch) + strcpy(un.machine, "mips64el"); + #endif + *arch = g_strdup(un.machine); ++#if defined(ALMALINUX_X86_64_V2) ++ *arch = g_strdup("x86_64_v2"); ++#else ++ *arch = g_strdup(un.machine); ++#endif + return 0; + } + +-- +2.39.3 (Apple Git-146) + diff --git a/libdnf.spec b/libdnf.spec index 230b98c..d927999 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -56,7 +56,7 @@ Name: libdnf Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} -Release: 5%{?dist}.alma.2 +Release: 5%{?dist}.alma.3 Summary: Library providing simplified C and Python API to libsolv License: LGPL-2.1-or-later URL: https://github.com/rpm-software-management/libdnf @@ -73,6 +73,8 @@ Patch6: 0006-Add-tests-for-shell-style-variable-expansion.patch Patch1001: 0001-Add-link-to-AlmaLinux-bugtracker.patch Patch1002: 0001-Add-x86_64_v2-to-tests.patch Patch1003: 0001-Add-x86_64_v2-to-arch_map.patch +# x86_64_v2 patch, this patch is needed to replace basearch with x86_64_v2 +Patch1004: 0001-Set-arch-as-x86_64_v2.patch BuildRequires: cmake BuildRequires: gcc @@ -199,6 +201,9 @@ Python 3 bindings for the hawkey library. %prep %autosetup -p1 +%ifarch x86_64_v2 +%autopatch 1004 -p1 +%endif %if %{with python2} mkdir build-py2 %endif @@ -316,6 +321,9 @@ popd %endif %changelog +* Thu Sep 12 2024 Eduard Abdullin - 0.73.1-5.alma.3 +- Set arch as x86_64_v2 + * Thu Sep 12 2024 Eduard Abdullin - 0.73.1-5.alma.2 - Add x86_64_v2 to arch_map