summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-09 10:29:31 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-11-09 16:57:26 +0000
commit36cb71bf957c2af667abce7e6bb844a37ca022ed (patch)
tree3d7568edc00a1c8540f6f04d814e2109275f41cb
parente81981e317f8bece2807e39a05916fdc58f26017 (diff)
downloadpoky-36cb71bf957c2af667abce7e6bb844a37ca022ed.tar.gz
libdnf: Fix arm arch mapping issues for qemuarmv5
qemuarmv5 currently fails with: $ dnf --help Error: Incorrect or unknown "arch": armv5hl Fix this by removing the code in libdnf which is trying to be too clever, we don't need this mappings given the way OE configures rpm. (From OE-Core rev: 7d620c754c92da9dcc56a0a7ec9f3355c2ba733e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/libdnf/libdnf/armarch.patch42
-rw-r--r--meta/recipes-devtools/libdnf/libdnf_0.72.0.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-devtools/libdnf/libdnf/armarch.patch b/meta/recipes-devtools/libdnf/libdnf/armarch.patch
new file mode 100644
index 0000000000..99eaf1d521
--- /dev/null
+++ b/meta/recipes-devtools/libdnf/libdnf/armarch.patch
@@ -0,0 +1,42 @@
1We change the way rpm architectures work, we make the machine name the default machine
2specific package architecture.
3
4This arm mapping code can work or in the case of qemuarmv5, it doesn't as it creates
5armv5hl which doesn't exist and causes errrors. We can simply remove it, we don't need it.
6
7Upstream-Status: Inappropriate [Relies on OE rpm config]
8
9Index: git/libdnf/hy-util.cpp
10===================================================================
11--- git.orig/libdnf/hy-util.cpp
12+++ git/libdnf/hy-util.cpp
13@@ -117,29 +117,6 @@ hy_detect_arch(char **arch)
14 if (uname(&un) < 0)
15 return DNF_ERROR_FAILED;
16
17- if (!strncmp(un.machine, "armv", 4)) {
18- /* un.machine is armvXE, where X is version number and E is
19- * endianness (b or l); we need to add modifiers such as
20- * h (hardfloat), n (neon). Neon is a requirement of armv8 so
21- * as far as rpm is concerned armv8l is the equivilent of armv7hnl
22- * (or 7hnb) so we don't explicitly add 'n' for 8+ as it's expected. */
23- char endian = un.machine[strlen(un.machine)-1];
24- char *modifier = un.machine + 5;
25- while(isdigit(*modifier)) /* keep armv7, armv8, armv9, armv10, armv100, ... */
26- modifier++;
27- if (getauxval(AT_HWCAP) & HWCAP_ARM_VFP)
28- *modifier++ = 'h';
29- if ((atoi(un.machine+4) == 7) && (getauxval(AT_HWCAP) & HWCAP_ARM_NEON))
30- *modifier++ = 'n';
31- *modifier++ = endian;
32- *modifier = 0;
33- }
34-#ifdef __MIPSEL__
35- if (!strcmp(un.machine, "mips"))
36- strcpy(un.machine, "mipsel");
37- else if (!strcmp(un.machine, "mips64"))
38- strcpy(un.machine, "mips64el");
39-#endif
40 *arch = g_strdup(un.machine);
41 return 0;
42 }
diff --git a/meta/recipes-devtools/libdnf/libdnf_0.72.0.bb b/meta/recipes-devtools/libdnf/libdnf_0.72.0.bb
index d58ad0353f..a8685a1604 100644
--- a/meta/recipes-devtools/libdnf/libdnf_0.72.0.bb
+++ b/meta/recipes-devtools/libdnf/libdnf_0.72.0.bb
@@ -10,6 +10,7 @@ SRC_URI = "git://github.com/rpm-software-management/libdnf;branch=dnf-4-master;p
10 file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \ 10 file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
11 file://enable_test_data_dir_set.patch \ 11 file://enable_test_data_dir_set.patch \
12 file://0001-drop-FindPythonInstDir.cmake.patch \ 12 file://0001-drop-FindPythonInstDir.cmake.patch \
13 file://armarch.patch \
13 " 14 "
14 15
15SRCREV = "908dba63c9e18c86a2d81166ce7523559e65338c" 16SRCREV = "908dba63c9e18c86a2d81166ce7523559e65338c"