{"id":12416,"url":"https://patchwork.libcamera.org/api/patches/12416/?format=json","web_url":"https://patchwork.libcamera.org/patch/12416/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/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":"<20210526033101.1251279-1-paul.elder@ideasonboard.com>","date":"2021-05-26T03:31:00","name":"[libcamera-devel,v3,1/2] utils: update-mojo.sh: Add script for updating mojo","commit_ref":null,"pull_url":null,"state":"accepted","archived":false,"hash":"4bfeac24f2513812fc9015396754c86ea84600e7","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/?format=json","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/12416/mbox/","series":[{"id":2068,"url":"https://patchwork.libcamera.org/api/series/2068/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=2068","date":"2021-05-26T03:31:00","name":"[libcamera-devel,v3,1/2] utils: update-mojo.sh: Add script for updating mojo","version":3,"mbox":"https://patchwork.libcamera.org/series/2068/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/12416/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/12416/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 7B18DC3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 03:31:17 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 92F8A68921;\n\tWed, 26 May 2021 05:31:16 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EC8C1602AB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 05:31:14 +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 B91D1332;\n\tWed, 26 May 2021 05:31:12 +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=\"rDD8jRQz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1621999874;\n\tbh=Yo9nKiBtCaw8Gt/sSXLzuNENhApBC1eYrTCPZ7N4UTA=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=rDD8jRQz2G4w9z41TMjzbUUz6ZZRbD2h6YQrta3iRUt0o23jZPT+n1SIqVcWHACTJ\n\tXlI+/lZVmizF0kJ6vrwB2Smn+7oUtN/+v01iALzMpchse0M93mtXz35hEcmTdl9UVK\n\tMelwrW0toegKpxhKXP26SZ3mkoNngzqMIydAdpng=","From":"Paul Elder <paul.elder@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Wed, 26 May 2021 12:31:00 +0900","Message-Id":"<20210526033101.1251279-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 v3 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 v3:\n- remove the patch to template_expander.py\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---\n utils/update-mojo.sh | 66 ++++++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 66 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..fcbc81e7\n--- /dev/null\n+++ b/utils/update-mojo.sh\n@@ -0,0 +1,66 @@\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+cat <<EOF\n+------------------------------------------------------------\n+mojo updated. Please review and up-port local changes before\n+committing.\n+------------------------------------------------------------\n+EOF\n","prefixes":["libcamera-devel","v3","1/2"]}