Skip to contentSkip to conversation

diffoscope: Ensure the correct magic file is used

PATCH New Richard Purdie 1 participant 2 messages Feb 23, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 diffoscope: Ensure the correct magic file is used

diffoscope uses libmagic and it was searching in file-native's sysroot for the magic file. Wrap it and set MAGIC in the environment to ensure the file is found correctly and avoid build failures.

---
 meta/recipes-support/diffoscope/diffoscope_167.bb | 4 ++++
 1 file changed, 4 insertions(+)
meta/recipes-support/diffoscope/diffoscope_167.bb +4 -0
index 9ce59a0ba01..1882d549a4d 100644
@@ -14,4 +14,8 @@ RDEPENDS_${PN} += "binutils vim squashfs-tools python3-libarchive-c python3-magi
 # Dependencies don't build for musl
 COMPATIBLE_HOST_libc-musl = 'null'
 
+do_install_append_class-native() {
+	create_wrapper ${D}${bindir}/diffoscope MAGIC=${STAGING_DIR_NATIVE}${datadir_native}/misc/magic.mgc
+}
+
 BBCLASSEXTEND = "native"
Signature · 1 line
2.27.0
#1 lore raw

PATCH 2/2 babeltrace2: Fix reproducibility

babeltrace2-ptest was referencing the host's python version in it's makefiles. Whilst this could be fixed, its easier to correct the python version being found to the target one which works much more effectively and solves the issue.

---
 meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/lttng/babeltrace2_2.0.3.bb +1 -1
index c65882581d3..32ba75bf366 100644
@@ -17,7 +17,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>2(\.\d+)+)$"
 
 S = "${WORKDIR}/git"
 
-inherit autotools pkgconfig ptest
+inherit autotools pkgconfig ptest python3targetconfig
 
 EXTRA_OECONF = "--disable-debug-info"
 
Signature · 1 line
2.27.0