{"id":10395,"url":"https://patchwork.libcamera.org/api/1.1/patches/10395/?format=json","web_url":"https://patchwork.libcamera.org/patch/10395/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201109011656.2560957-3-niklas.soderlund@ragnatech.se>","date":"2020-11-09T01:16:56","name":"[libcamera-devel,2/2] media-libs/libcamera: Do not strip IPA binaries","commit_ref":null,"pull_url":null,"state":"not-applicable","archived":false,"hash":"8616b81cbfeb8c5b5808b1e0977ec68e5828cba1","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/1.1/people/5/?format=json","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"delegate":{"id":16,"url":"https://patchwork.libcamera.org/api/1.1/users/16/?format=json","username":"neg","first_name":"Niklas","last_name":"Söderlund","email":"niklas.soderlund@ragnatech.se"},"mbox":"https://patchwork.libcamera.org/patch/10395/mbox/","series":[{"id":1451,"url":"https://patchwork.libcamera.org/api/1.1/series/1451/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1451","date":"2020-11-09T01:16:55","name":"media-libs/libcamera: Small fixes for IPA builds","version":1,"mbox":"https://patchwork.libcamera.org/series/1451/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/10395/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/10395/checks/","tags":{},"headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 17E24BDB89\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  9 Nov 2020 01:17:18 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7F87D63073;\n\tMon,  9 Nov 2020 02:17:16 +0100 (CET)","from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CD7C96033F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  9 Nov 2020 02:17:11 +0100 (CET)","from bismarck.berto.se (p4fca2458.dip0.t-ipconnect.de\n\t[79.202.36.88])\n\tby bin-vsp-out-03.atm.binero.net (Halon) with ESMTPA\n\tid 4acd9c29-2229-11eb-954c-0050569116f7;\n\tMon, 09 Nov 2020 02:17:11 +0100 (CET)"],"X-Halon-ID":"4acd9c29-2229-11eb-954c-0050569116f7","Authorized-sender":"niklas.soderlund@fsdn.se","From":"=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>","To":"Tomasz Figa <tfiga@chromium.org>","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\n\tIPA binaries","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"Libcamera signs its IPA modules (.so files) after they are built. The\nsignature is later verified when loading the IPA modules and if they do\nnot match the IPA is treated as a untrusted module. The CrOS build\nsystem by default strips all binaries after the build step and modify\nthe IPA .so files in so they fail the signature check.\n\nThe build system inject hooks after the post_src_install hook that\nstrips binaries and creates the packet that is installed on target. It\nis therefor not possible to to generate the IPA module signature for the\nstripped modules without also packeting the private key and doing so in\npre_pkg_preinst. Stripping and generating signatures for the IPA .so\nfiles in src_install is not possible as the exact method for stripping\nthem may differ between the ebuild and the build system hook.\n\nSafest route is to never stripp the IPA modules. Instead of restricting\nstripping of all libcamera binaries use dostrip to only disable\nstripping of the IPA modules. The EAPI needs to be increased to version\n7 to support dostrip.\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n media-libs/libcamera/libcamera-9999.ebuild | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)","diff":"diff --git a/media-libs/libcamera/libcamera-9999.ebuild b/media-libs/libcamera/libcamera-9999.ebuild\nindex 57ff00337309f30c..ce4183a89ef095de 100644\n--- a/media-libs/libcamera/libcamera-9999.ebuild\n+++ b/media-libs/libcamera/libcamera-9999.ebuild\n@@ -1,7 +1,7 @@\n # Copyright 2019 The Chromium OS Authors. All rights reserved.\n # Distributed under the terms of the GNU General Public License v2\n \n-EAPI=6\n+EAPI=7\n \n CROS_WORKON_PROJECT=\"chromiumos/third_party/libcamera\"\n CROS_WORKON_INCREMENTAL_BUILD=\"1\"\n@@ -49,4 +49,6 @@ src_install() {\n \tmeson_src_install\n \n \tdosym ../libcamera.so \"/usr/$(get_libdir)/camera_hal/libcamera.so\"\n+\n+\tdostrip -x /usr/$(get_libdir)/libcamera/\n }\n","prefixes":["libcamera-devel","2/2"]}