Show a patch.

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

{
    "id": 2774,
    "url": "https://patchwork.libcamera.org/api/patches/2774/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/2774/",
    "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": "<20200205130420.8736-5-kieran.bingham@ideasonboard.com>",
    "date": "2020-02-05T13:04:19",
    "name": "[libcamera-devel,4/5] libcamera: ipa_manager: Search the runpath for IPA libraries",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "ee297c552c9653635f8ad4b1004d85ce086f9412",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/2774/mbox/",
    "series": [
        {
            "id": 661,
            "url": "https://patchwork.libcamera.org/api/series/661/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=661",
            "date": "2020-02-05T13:04:15",
            "name": "Support loading IPAs from the build tree",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/661/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/2774/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/2774/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<kieran.bingham@ideasonboard.com>",
        "Received": [
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D264760912\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Feb 2020 14:04:26 +0100 (CET)",
            "from localhost.localdomain\n\t(cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7B3664F8;\n\tWed,  5 Feb 2020 14:04:26 +0100 (CET)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1580907866;\n\tbh=F62auJcz8x0tN8NLTtSNSGfS7N/7zl7eW81saD4rxN0=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=MYfkVZYwxjs7O7GIdPKmOrHvTPQLsUHca6+7TxvXLYA+Ha4gGb2rRWTIYsAlgTkze\n\t/uJoz+3Nyk1p4vi1a6RCtLIWh0imS64KFxj6TtJzChKIRjoDVK6ivPeZdgi7JoQQ6N\n\tMwEKCmCHB3VvTloN2kzQ24+YR+YBQ45+NQZrzeWE=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "LibCamera Devel <libcamera-devel@lists.libcamera.org>",
        "Date": "Wed,  5 Feb 2020 13:04:19 +0000",
        "Message-Id": "<20200205130420.8736-5-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20200205130420.8736-1-kieran.bingham@ideasonboard.com>",
        "References": "<20200205130420.8736-1-kieran.bingham@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH 4/5] libcamera: ipa_manager: Search the\n\trunpath for IPA libraries",
        "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>",
        "X-List-Received-Date": "Wed, 05 Feb 2020 13:04:27 -0000"
    },
    "content": "Expose the IPA build path through the libcamera library runpath entry in\nthe elf string table. Utilise this path to search for compiled IPA\nlibraries when loading the IPAManager.\n\nThe build time path is removed during the library install phase.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n---\n src/libcamera/ipa_manager.cpp | 9 +++++++++\n src/libcamera/meson.build     | 1 +\n src/meson.build               | 7 +++++++\n 3 files changed, 17 insertions(+)",
    "diff": "diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\nindex 24fe709108fe..3dfe84fcf95e 100644\n--- a/src/libcamera/ipa_manager.cpp\n+++ b/src/libcamera/ipa_manager.cpp\n@@ -102,6 +102,15 @@ IPAManager::IPAManager()\n \tif (ret > 0)\n \t\tipaCount += ret;\n \n+\t/*\n+\t * Utilise the Elf runpath to supply the IPA build directory, allowing\n+\t * us to load IPA's before they are installed for testing and\n+\t * development.\n+\t */\n+\tconst char *runpath = utils::get_runpath();\n+\tif (runpath)\n+\t\tipaCount += addPath(runpath, true);\n+\n \tconst char *modulePaths = utils::secure_getenv(\"LIBCAMERA_IPA_MODULE_PATH\");\n \tif (!modulePaths) {\n \t\tif (!ipaCount)\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 68d89559b290..87c5bbbb17a4 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -107,6 +107,7 @@ libcamera = shared_library('camera',\n                            install : true,\n                            link_with : libcamera_link_with,\n                            include_directories : includes,\n+                           build_rpath : ipa_build_path,\n                            dependencies : libcamera_deps)\n \n libcamera_dep = declare_dependency(sources : [libcamera_api, libcamera_ipa_api, libcamera_h],\ndiff --git a/src/meson.build b/src/meson.build\nindex 5adcd61fd913..42e1eb984ccd 100644\n--- a/src/meson.build\n+++ b/src/meson.build\n@@ -2,6 +2,13 @@ if get_option('android')\n     subdir('android')\n endif\n \n+# Provide libcamera with a reference to the current build for IPA\n+# loading. This allows IPAs to be successfully loaded when tests and\n+# applications are run from the build tree, but is stripped during the\n+# install phase, ensuring we maintain reproducible builds.\n+\n+ipa_build_path = join_paths(meson.current_build_dir(), 'ipa')\n+\n subdir('libcamera')\n subdir('ipa')\n subdir('cam')\n",
    "prefixes": [
        "libcamera-devel",
        "4/5"
    ]
}