From af6e2512cd2706c0d405dbd956636e3dcea5eecf Mon Sep 17 00:00:00 2001 From: Pablo Greco Date: Dec 18 2019 22:31:20 +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 f1d8ff8..c5b67dc 100644 --- a/SPECS/libdnf.spec +++ b/SPECS/libdnf.spec @@ -60,6 +60,8 @@ Patch13: 0013-Fix-dnf_move_recursive-for-file-in-fallback-mode.patch Patch14: 0014-Mark-job-goalupgrade-with-sltr-as-targeted.patch Patch15: 0015-Apply-targeted-upgrade-only-for-selector-with-packages.patch +Patch9999: 6c4f7462b3004e39e82c4ec186175ea4a56035b4.patch + BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++