summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/libdnf
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:56:32 +0000
commit7d620c754c92da9dcc56a0a7ec9f3355c2ba733e (patch)
treeeb9d5e3b44392413af1a3826a7f07fe64e6dc2af /meta/recipes-devtools/libdnf
parente4d2bea88121f3600d1305fa2000def014e15280 (diff)
downloadopenembedded-core-7d620c754c92da9dcc56a0a7ec9f3355c2ba733e.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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/libdnf')
-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 @@
+We change the way rpm architectures work, we make the machine name the default machine
+specific package architecture.
+
+This arm mapping code can work or in the case of qemuarmv5, it doesn't as it creates
+armv5hl which doesn't exist and causes errrors. We can simply remove it, we don't need it.
+
+Upstream-Status: Inappropriate [Relies on OE rpm config]
+
+Index: git/libdnf/hy-util.cpp
+===================================================================
+--- git.orig/libdnf/hy-util.cpp
++++ git/libdnf/hy-util.cpp
+@@ -117,29 +117,6 @@ hy_detect_arch(char **arch)
+ if (uname(&un) < 0)
+ return DNF_ERROR_FAILED;
+
+- if (!strncmp(un.machine, "armv", 4)) {
+- /* un.machine is armvXE, where X is version number and E is
+- * endianness (b or l); we need to add modifiers such as
+- * h (hardfloat), n (neon). Neon is a requirement of armv8 so
+- * as far as rpm is concerned armv8l is the equivilent of armv7hnl
+- * (or 7hnb) so we don't explicitly add 'n' for 8+ as it's expected. */
+- char endian = un.machine[strlen(un.machine)-1];
+- char *modifier = un.machine + 5;
+- while(isdigit(*modifier)) /* keep armv7, armv8, armv9, armv10, armv100, ... */
+- modifier++;
+- if (getauxval(AT_HWCAP) & HWCAP_ARM_VFP)
+- *modifier++ = 'h';
+- if ((atoi(un.machine+4) == 7) && (getauxval(AT_HWCAP) & HWCAP_ARM_NEON))
+- *modifier++ = 'n';
+- *modifier++ = endian;
+- *modifier = 0;
+- }
+-#ifdef __MIPSEL__
+- if (!strcmp(un.machine, "mips"))
+- strcpy(un.machine, "mipsel");
+- else if (!strcmp(un.machine, "mips64"))
+- strcpy(un.machine, "mips64el");
+-#endif
+ *arch = g_strdup(un.machine);
+ return 0;
+ }
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
file://0001-Get-parameters-for-both-libsolv-and-libsolvext-libdn.patch \
file://enable_test_data_dir_set.patch \
file://0001-drop-FindPythonInstDir.cmake.patch \
+ file://armarch.patch \
"
SRCREV = "908dba63c9e18c86a2d81166ce7523559e65338c"