From cb7e6e87a97b4596e4cea14c4b2dcf6cbd0ac158 Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Dec 18 2019 22:22:35 +0000 Subject: Fix crypto detection in armhfp --- diff --git a/SOURCES/6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch b/SOURCES/6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch new file mode 100644 index 0000000..cd4efbe --- /dev/null +++ b/SOURCES/6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch @@ -0,0 +1,34 @@ +From 6c4f7462b3004e39e82c4ec186175ea4a56035b4 Mon Sep 17 00:00:00 2001 +From: Jaroslav Rohel +Date: Fri, 9 Aug 2019 09:54:49 +0200 +Subject: [PATCH] hy_detect_arch(): detect crypto only on arm version >= 8 + +Before patch: +It detected armv7 with crypto extension on some "qemu-arm" +configurations. New architecture string "armv7hcnl" was generated. + +After patch: +It detect crypto extension only if arm version >= 8. + +https://bugzilla.redhat.com/show_bug.cgi?id=1691430 + +Closes: #771 +Approved by: dmach +--- + libdnf/hy-util.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libdnf/hy-util.cpp b/libdnf/hy-util.cpp +index 61838cc36..f6de87d33 100644 +--- a/libdnf/hy-util.cpp ++++ b/libdnf/hy-util.cpp +@@ -118,7 +118,8 @@ hy_detect_arch(char **arch) + modifier++; + if (getauxval(AT_HWCAP) & HWCAP_ARM_VFP) + *modifier++ = 'h'; +- if (getauxval(AT_HWCAP2) & HWCAP2_AES) ++ // arm version >= 8 can have crypto extension ++ if ((atoi(un.machine+4) >= 8) && (getauxval(AT_HWCAP2) & HWCAP2_AES)) + *modifier++ = 'c'; + if (getauxval(AT_HWCAP) & HWCAP_ARM_NEON) + *modifier++ = 'n'; diff --git a/SPECS/libdnf.spec b/SPECS/libdnf.spec index adbe77a..d6ae073 100644 --- a/SPECS/libdnf.spec +++ b/SPECS/libdnf.spec @@ -58,6 +58,8 @@ Patch11: 0011-Expose-dnf_copy_file-and-dnf_copy_recursive-in-priva.patch Patch12: 0012-Add-dnf_remove_recursive_v2-that-support-unlink-of-f.patch Patch13: 0013-Fix-dnf_move_recursive-for-file-in-fallback-mode.patch +Patch9999: 6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch + BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++