Show a patch.

GET /api/patches/9096/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 9096,
    "url": "https://patchwork.libcamera.org/api/patches/9096/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9096/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20200731143919.25825-1-andrey.konovalov@linaro.org>",
    "date": "2020-07-31T14:39:19",
    "name": "[libcamera-devel,meta-multimedia,v2] libcamera: fix packaging and installation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "6de2c9fe4adfafbf4317fef0c0a20a87545eacc1",
    "submitter": {
        "id": 25,
        "url": "https://patchwork.libcamera.org/api/people/25/?format=api",
        "name": "Andrey Konovalov",
        "email": "andrey.konovalov@linaro.org"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9096/mbox/",
    "series": [
        {
            "id": 1170,
            "url": "https://patchwork.libcamera.org/api/series/1170/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1170",
            "date": "2020-07-31T14:39:19",
            "name": "[libcamera-devel,meta-multimedia,v2] libcamera: fix packaging and installation",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1170/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9096/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9096/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 50A07BD878\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 31 Jul 2020 14:39:40 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D999B61A14;\n\tFri, 31 Jul 2020 16:39:39 +0200 (CEST)",
            "from mail-lj1-x242.google.com (mail-lj1-x242.google.com\n\t[IPv6:2a00:1450:4864:20::242])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 75A4E60398\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 Jul 2020 16:39:38 +0200 (CEST)",
            "by mail-lj1-x242.google.com with SMTP id q4so32686349lji.2\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 31 Jul 2020 07:39:38 -0700 (PDT)",
            "from localhost.localdomain (37-144-159-139.broadband.corbina.ru.\n\t[37.144.159.139]) by smtp.googlemail.com with ESMTPSA id\n\ti20sm561303ljb.90.2020.07.31.07.39.36\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 31 Jul 2020 07:39:36 -0700 (PDT)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"CgkMkrLz\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n\th=from:to:cc:subject:date:message-id;\n\tbh=tuKsKgQeAsC+TMas+rdCYzvgJmYJK+nAIwmmPeHmja8=;\n\tb=CgkMkrLzYNPy/aA+tcxJow8FwdM8py6yoxMbpzl+vQDKfAVo4P5j9Sk6d2UtoqfHb2\n\tPvC957ELX3DpQ5dyL+C2AsWPZ0RtzVaS24VB/+mT+VSnRhpltrJETi5ZNOetKvJXwuko\n\tvdxEN9C0ovoZ8e5Ae1QLPuYlc5CuKjgSDpEhHNYLRXw2sboQG3AKvGIEisH4XK7JcMPB\n\tQzakQlANCjkMDXMn3W/ZTbvbZYb/y/TNgt/0Us28C+eyljpFv+oWCjNBjrTqnDe+IqlY\n\tddSdcAh8Hvn/EjVAuazV2IsHrNXs/IBkNS60V3c3gbvg5/b1ZbchdNM7jMzQZ1CUX8am\n\tVylA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=tuKsKgQeAsC+TMas+rdCYzvgJmYJK+nAIwmmPeHmja8=;\n\tb=nGZothZR6Opc7yu8e9TPJRHPfenOIFGHCgkld198HTCr2GzGqEPt0Yqp4DCtRiOtnG\n\t8K8gj7NiJUdthl1e/jn9pbFHmDanb444ti1Et9AuXYX6JdiK5H10bz75HbpPPSRAWdWW\n\tCDO17wuR8H6UCzRYurcPdBQKWeruWP343oU0B/sU5wbvvdZoim0Cklog3IzDG2i9Vr7K\n\tN488S4ZlYNFudxZ2zWqpowZ4jAQr5STfBgzhqYLTtV38JHafaMtJ+DEu55cq7QLkxADx\n\tmPuJKYfFNu6s8SEfOE4x7DLTExc0rU3bmBAddp8NndBXFCF56mV2K2eRE2hz1kcy6I0Q\n\tgS4A==",
        "X-Gm-Message-State": "AOAM533KWilFzpMiRarqrl0urq0AlzHswAE0JIe92r9pY8xVhi8UZCfU\n\thar8DGlHqYfF13j91kPRddNHcA==",
        "X-Google-Smtp-Source": "ABdhPJwaE6JeJ7EsuOAPysR9+89djLexgEqr6az3uadGq07zGk5Q37mlJmXLN2ygozdHFiTrPpm9QQ==",
        "X-Received": "by 2002:a2e:8e70:: with SMTP id t16mr2228260ljk.81.1596206377645;\n\tFri, 31 Jul 2020 07:39:37 -0700 (PDT)",
        "From": "Andrey Konovalov <andrey.konovalov@linaro.org>",
        "To": "openembedded-devel@lists.openembedded.org",
        "Date": "Fri, 31 Jul 2020 17:39:19 +0300",
        "Message-Id": "<20200731143919.25825-1-andrey.konovalov@linaro.org>",
        "X-Mailer": "git-send-email 2.17.1",
        "Subject": "[libcamera-devel] [meta-multimedia][PATCH v2] libcamera: fix\n\tpackaging and installation",
        "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, raj.khem@gmail.com,\n\tmadhavan.krishnan@linaro.org",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "libcamera checks if RPATH or RUNPATH dynamic tag is present in\nlibcamera.so. If it does, it assumes that libcamera binaries are\nrun directly from the build directory without installing them, and\ntries to use resorces like IPA modules from the build directory.\nMainline meson strips RPATH/RUNPATH out from libcamera.so file\nat install time. But openembedded-core patches meson to disable\nRPATH/RUNPATH removal. That's why  we need to remove this tag manually\nin do_install_append().\n\nIPA module is signed (with openssl dgst) after it is built. But\nduring packaging the OE build system 1) splits out debugging info,\nand 2) strips the binaries. So the IPA module so file installed\nisn't the one which the signature was calculated against. Then\nthe signature check fails, and libcamera tries to run the IPA\nmodule isolated (in a sandbox), which doesn't work if the IPA\nmodule wasn't designed to run isolated. The solution is to\nrecalculate the IPA modules signatures in ${PKGD} after do_package().\n\nSigned-off-by: Andrey Konovalov <andrey.konovalov@linaro.org>\n---\n Changes in v2:\n  - Recalculate the IPA modules signatures after do_package()\n    instead of disabling stripping and splitting libcamera package\n\n .../recipes-multimedia/libcamera/libcamera.bb     | 15 ++++++++++++++-\n 1 file changed, 14 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb b/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb\nindex 00a5c480d..30c6600e5 100644\n--- a/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb\n+++ b/meta-multimedia/recipes-multimedia/libcamera/libcamera.bb\n@@ -18,13 +18,26 @@ PV = \"202006+git${SRCPV}\"\n \n S = \"${WORKDIR}/git\"\n \n-DEPENDS = \"python3-pyyaml-native udev gnutls boost\"\n+DEPENDS = \"python3-pyyaml-native udev gnutls boost chrpath-native\"\n DEPENDS += \"${@bb.utils.contains('DISTRO_FEATURES', 'qt', 'qtbase qtbase-native', '', d)}\"\n \n RDEPENDS_${PN} = \"${@bb.utils.contains('DISTRO_FEATURES', 'wayland qt', 'qtwayland', '', d)}\"\n \n inherit meson pkgconfig python3native\n \n+do_install_append() {\n+    chrpath -d ${D}${libdir}/libcamera.so\n+}\n+\n+addtask do_recalculate_ipa_signatures_package after do_package before do_packagedata\n+do_recalculate_ipa_signatures_package() {\n+    for module in $(find \"${PKGD}/usr/lib/libcamera\" -name \"*.so.sign\"); do\n+        if [ -f \"${module%.sign}\" ] ; then\n+            \"${S}/src/ipa/ipa-sign.sh\" \"${B}/src/ipa-priv-key.pem\" \"${module%.sign}\" \"${module}\"\n+        fi\n+    done\n+}\n+\n FILES_${PN}-dev = \"${includedir} ${libdir}/pkgconfig\"\n FILES_${PN} += \" ${libdir}/libcamera.so\"\n \n",
    "prefixes": [
        "libcamera-devel",
        "meta-multimedia",
        "v2"
    ]
}