From patchwork Mon Nov 9 01:16:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10393 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 7CF5BBDB89 for ; Mon, 9 Nov 2020 01:17:16 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 13B596306D; Mon, 9 Nov 2020 02:17:16 +0100 (CET) Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 47A5363067 for ; Mon, 9 Nov 2020 02:17:11 +0100 (CET) X-Halon-ID: 4a773f55-2229-11eb-954c-0050569116f7 Authorized-sender: niklas.soderlund@fsdn.se Received: from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de [79.202.36.88]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id 4a773f55-2229-11eb-954c-0050569116f7; Mon, 09 Nov 2020 02:17:10 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Tomasz Figa Date: Mon, 9 Nov 2020 02:16:55 +0100 Message-Id: <20201109011656.2560957-2-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109011656.2560957-1-niklas.soderlund@ragnatech.se> References: <20201109011656.2560957-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/2] media-libs/libcamera: Android support is a feature not a boolean X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libcamera-devel@lists.libcamera.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Upstream switched the android option from a boolean to a meson feature, update ebuild to reflect this. Signed-off-by: Niklas Söderlund --- media-libs/libcamera/libcamera-9999.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/media-libs/libcamera/libcamera-9999.ebuild b/media-libs/libcamera/libcamera-9999.ebuild index 4273adbc9e1e0f33..57ff00337309f30c 100644 --- a/media-libs/libcamera/libcamera-9999.ebuild +++ b/media-libs/libcamera/libcamera-9999.ebuild @@ -35,7 +35,7 @@ src_configure() { local emesonargs=( $(meson_use doc documentation) $(meson_use test) - -Dandroid="true" + -Dandroid=enabled -Dpipelines="$(pipeline_list "${pipelines[@]}")" ) meson_src_configure From patchwork Mon Nov 9 01:16:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 10395 X-Patchwork-Delegate: niklas.soderlund@ragnatech.se Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 17E24BDB89 for ; Mon, 9 Nov 2020 01:17:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 7F87D63073; Mon, 9 Nov 2020 02:17:16 +0100 (CET) Received: from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net [195.74.38.229]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CD7C96033F for ; Mon, 9 Nov 2020 02:17:11 +0100 (CET) X-Halon-ID: 4acd9c29-2229-11eb-954c-0050569116f7 Authorized-sender: niklas.soderlund@fsdn.se Received: from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de [79.202.36.88]) by bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA id 4acd9c29-2229-11eb-954c-0050569116f7; Mon, 09 Nov 2020 02:17:11 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: Tomasz Figa Date: Mon, 9 Nov 2020 02:16:56 +0100 Message-Id: <20201109011656.2560957-3-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201109011656.2560957-1-niklas.soderlund@ragnatech.se> References: <20201109011656.2560957-1-niklas.soderlund@ragnatech.se> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] media-libs/libcamera: Do not strip IPA binaries X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libcamera-devel@lists.libcamera.org Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Libcamera signs its IPA modules (.so files) after they are built. The signature is later verified when loading the IPA modules and if they do not match the IPA is treated as a untrusted module. The CrOS build system by default strips all binaries after the build step and modify the IPA .so files in so they fail the signature check. The build system inject hooks after the post_src_install hook that strips binaries and creates the packet that is installed on target. It is therefor not possible to to generate the IPA module signature for the stripped modules without also packeting the private key and doing so in pre_pkg_preinst. Stripping and generating signatures for the IPA .so files in src_install is not possible as the exact method for stripping them may differ between the ebuild and the build system hook. Safest route is to never stripp the IPA modules. Instead of restricting stripping of all libcamera binaries use dostrip to only disable stripping of the IPA modules. The EAPI needs to be increased to version 7 to support dostrip. Signed-off-by: Niklas Söderlund --- media-libs/libcamera/libcamera-9999.ebuild | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/media-libs/libcamera/libcamera-9999.ebuild b/media-libs/libcamera/libcamera-9999.ebuild index 57ff00337309f30c..ce4183a89ef095de 100644 --- a/media-libs/libcamera/libcamera-9999.ebuild +++ b/media-libs/libcamera/libcamera-9999.ebuild @@ -1,7 +1,7 @@ # Copyright 2019 The Chromium OS Authors. All rights reserved. # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 CROS_WORKON_PROJECT="chromiumos/third_party/libcamera" CROS_WORKON_INCREMENTAL_BUILD="1" @@ -49,4 +49,6 @@ src_install() { meson_src_install dosym ../libcamera.so "/usr/$(get_libdir)/camera_hal/libcamera.so" + + dostrip -x /usr/$(get_libdir)/libcamera/ }