Patch Detail
Show a patch.
GET /api/patches/12407/?format=api
{ "id": 12407, "url": "https://patchwork.libcamera.org/api/patches/12407/?format=api", "web_url": "https://patchwork.libcamera.org/patch/12407/", "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": "<20210525100750.1239934-1-paul.elder@ideasonboard.com>", "date": "2021-05-25T10:07:49", "name": "[libcamera-devel,v2,1/2] utils: update-mojo.sh: Add script for updating mojo", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "9d95cfd8abe8b09adb9ca4c5bd5f7c0e8653f2cb", "submitter": { "id": 17, "url": "https://patchwork.libcamera.org/api/people/17/?format=api", "name": "Paul Elder", "email": "paul.elder@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/12407/mbox/", "series": [ { "id": 2065, "url": "https://patchwork.libcamera.org/api/series/2065/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2065", "date": "2021-05-25T10:07:49", "name": "[libcamera-devel,v2,1/2] utils: update-mojo.sh: Add script for updating mojo", "version": 2, "mbox": "https://patchwork.libcamera.org/series/2065/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/12407/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/12407/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 45DA0C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 25 May 2021 10:08:05 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6C2A96891F;\n\tTue, 25 May 2021 12:08:04 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 427D06050E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 25 May 2021 12:08:03 +0200 (CEST)", "from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0F3BD344;\n\tTue, 25 May 2021 12:07:59 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"rqJ1xeYR\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621937281;\n\tbh=ry3WEenX65yWALv1EALH75uSdwEUCMdURYqg6dwYSpA=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=rqJ1xeYR4x/r//M9GkMkjYEBoPn5zKCc4kVtQs9wbtN1SIxl5W3/E3TPsS2AEUuqW\n\t1QBa7X3yHHU0lKMGnOQqvbWjVj7Z0axT4j//Gum3jK44Imww8HrelGBsY2KVkmrHSy\n\thqH3CAB8vn0YRE415qbpKXi35q/P2OWz0jl8Ibfo=", "From": "Paul Elder <paul.elder@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Tue, 25 May 2021 19:07:49 +0900", "Message-Id": "<20210525100750.1239934-1-paul.elder@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v2 1/2] utils: update-mojo.sh: Add script\n\tfor updating mojo", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add a script to ease updating mojo from a chromium source tree.\n\nSigned-off-by: Paul Elder <paul.elder@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n---\nChanges in v2:\n- clean mojo/public/tools/* first\n- use [ instead of test\n- use scope instead of restoring cd\n- add todo to remove the jinja2 3.0.0 patch\n\nNote that this script includes the little patch to template_expander.py\nto enable it to work with jinja2 3.0.0 (it still works with jinja2\n2.10.x).\n---\n utils/update-mojo.sh | 72 ++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 72 insertions(+)\n create mode 100755 utils/update-mojo.sh", "diff": "diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh\nnew file mode 100755\nindex 00000000..ebcf7836\n--- /dev/null\n+++ b/utils/update-mojo.sh\n@@ -0,0 +1,72 @@\n+#!/bin/sh\n+\n+# SPDX-License-Identifier: GPL-2.0-or-later\n+# Update mojo copy from a chromium source tree\n+\n+if [ $# != 1 ] ; then\n+\techo \"Usage: $0 <chromium dir>\"\n+\texit 1\n+fi\n+\n+ipc_dir=\"$(dirname \"$(realpath \"$0\")\")/ipc\"\n+chromium_dir=\"$1\"\n+\n+if [ ! -d \"${chromium_dir}/mojo\" ] ; then\n+\techo \"Directory ${chromium_dir} doesn't contain mojo\"\n+\texit 1\n+fi\n+\n+if [ ! -d \"${chromium_dir}/.git\" ] ; then\n+\techo \"Directory ${chromium_dir} doesn't contain a git tree\"\n+\texit 1\n+fi\n+\n+# Get the chromium commit id\n+version=$(git -C \"${chromium_dir}\" rev-parse --short HEAD)\n+\n+# Reject dirty trees\n+if [ -n \"$(git -C \"${chromium_dir}\" status --porcelain)\" ] ; then\n+\techo \"Chromium tree in ${chromium_dir} is dirty\"\n+\texit 1\n+fi\n+\n+# Copy the diagnosis file\n+cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" \"${ipc_dir}/tools/diagnosis\"\n+\n+# Copy the rest of mojo\n+cp \"${chromium_dir}/mojo/public/LICENSE\" \"${ipc_dir}/mojo/public\"\n+\n+rm -rf \"${ipc_dir}/mojo/public/tools/*\"\n+\n+(\n+\tcd \"${chromium_dir}\" || exit\n+\tfind ./mojo/public/tools -type f \\\n+\t -not -path \"*/generators/*\" \\\n+\t -not -path \"*/fuzzers/*\" \\\n+\t -exec cp --parents \"{}\" \"${ipc_dir}\" \";\"\n+)\n+\n+# Update the README files\n+readme=$(cat <<EOF\n+# SPDX-License-Identifier: CC0-1.0\n+\n+Files in this directory are imported from ${version} of Chromium. Do not\n+modify them manually.\n+EOF\n+)\n+\n+echo \"$readme\" > \"${ipc_dir}/mojo/README\"\n+echo \"$readme\" > \"${ipc_dir}/tools/README\"\n+\n+# Fix mojo support for jinja2 3.0.0\n+# TODO: remove this after this is merged:\n+# https://chromium-review.googlesource.com/c/chromium/src/+/2908396\n+template_expander=\"${ipc_dir}/mojo/public/tools/mojom/mojom/generate/template_expander.py\"\n+sed -i \"/py_compile=.*$/d\" \"${template_expander}\"\n+\n+cat <<EOF\n+------------------------------------------------------------\n+mojo updated. Please review and up-port local changes before\n+committing.\n+------------------------------------------------------------\n+EOF\n", "prefixes": [ "libcamera-devel", "v2", "1/2" ] }