All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-multimedia][PATCH] libcamera: fix packaging and installation
@ 2020-07-27  9:21 Andrey Konovalov
       [not found] ` <a17180dc-a0ee-80b1-8c55-ee1c42d20e9e@ideasonboard.com>
  2020-07-27 15:28 ` Khem Raj
  0 siblings, 2 replies; 16+ messages in thread
From: Andrey Konovalov @ 2020-07-27  9:21 UTC (permalink / raw)
  To: openembedded-devel
  Cc: madhavan.krishnan, raj.khem, peter.griffin, libcamera-devel,
	Andrey Konovalov

libcamera checks if RPATH or RUNPATH dynamic tag is present in
libcamera.so. If it does, it assumes that libcamera binaries are
run directly from the build directory without installing them, and
tries to use resorces like IPA modules from the build directory.
Mainline meson strips RPATH/RUNPATH out at install time (for
meson versions up to 0.54; the things are somewhat changed in 0.55).
But openembedded-core patches meson to disable RPATH/RUNPATH removal.
That's why we need to remove this tag manually in do_install_append().

IPA module is signed (with openssl dgst) after it is built. But
during packaging the OE build system 1) splits out debugging info,
and 2) strips the binaries. So the IPA module *.so file installed
isn't the one which the signature was calculated against. Then
the signature check fails, and libcamera tries to run the IPA
module isolated (in a sandbox), which doesn't work if the IPA
module wasn't designed to run isolated. The easiest way to fix that
is to disable splitting out debug information and stripping the binaries
during packaging with INHIBIT_PACKAGE_DEBUG_SPLIT and
INHIBIT_PACKAGE_STRIP.

Signed-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>
---
 .../recipes-multimedia/libcamera/libcamera.bb            | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb
index 00a5c480d..573366f08 100644
--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb
+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb
@@ -18,13 +18,20 @@ PV = "202006+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
-DEPENDS = "python3-pyyaml-native udev gnutls boost"
+DEPENDS = "python3-pyyaml-native udev gnutls boost chrpath-native"
 DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}"
 
 RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}"
 
 inherit meson pkgconfig python3native
 
+do_install_append() {
+        chrpath -d ${D}${libdir}/libcamera.so
+}
+
 FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig"
 FILES_${PN} += " ${libdir}/libcamera.so"
 
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+INHIBIT_PACKAGE_STRIP = "1"
+
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2020-07-28  0:40 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27  9:21 [meta-multimedia][PATCH] libcamera: fix packaging and installation Andrey Konovalov
     [not found] ` <a17180dc-a0ee-80b1-8c55-ee1c42d20e9e@ideasonboard.com>
2020-07-27  9:58   ` [libcamera-devel] " Andrey Konovalov
2020-07-27 11:11     ` Laurent Pinchart
2020-07-27 15:37       ` [oe] " Khem Raj
2020-07-27 15:43         ` Laurent Pinchart
2020-07-27 15:46       ` Andrey Konovalov
2020-07-27 16:03         ` Laurent Pinchart
2020-07-27 16:17           ` Andrey Konovalov
2020-07-28  0:40             ` Laurent Pinchart
2020-07-27 15:31     ` Khem Raj
2020-07-27 15:28 ` Khem Raj
2020-07-27 15:36   ` Andrey Konovalov
2020-07-27 15:38     ` Khem Raj
2020-07-27 15:56       ` Andrey Konovalov
2020-07-27 15:45     ` [libcamera-devel] " Laurent Pinchart
2020-07-27 15:51       ` Andrey Konovalov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.