[{"id":28380,"web_url":"https://patchwork.libcamera.org/comment/28380/","msgid":"<87edewum8f.fsf@redhat.com>","date":"2024-01-05T10:07:44","subject":"Re: [libcamera-devel] [PATCH 3/8] utils: update-mojo.sh: Change to\n\tthe libcamera source directory","submitter":{"id":177,"url":"https://patchwork.libcamera.org/api/people/177/","name":"Milan Zamazal","email":"mzamazal@redhat.com"},"content":"Laurent Pinchart <laurent.pinchart@ideasonboard.com> writes:\n\n> Instead of prefixing all paths to IPC files with ${ipc_dir}, change to\n> the libcamera sources root directory and use relative file paths. This\n> simplifies the update script.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Milan Zamazal <mzamazal@redhat.com>\n\n> ---\n>  utils/update-mojo.sh | 20 +++++++++++---------\n>  1 file changed, 11 insertions(+), 9 deletions(-)\n>\n> diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh\n> index 831f5ab8753b..b6fbc6d14f2d 100755\n> --- a/utils/update-mojo.sh\n> +++ b/utils/update-mojo.sh\n> @@ -11,7 +11,9 @@ if [ $# != 1 ] ; then\n>  fi\n>  \n>  ipc_dir=\"$(dirname \"$(realpath \"$0\")\")/ipc\"\n> -chromium_dir=\"$1\"\n> +chromium_dir=\"$(realpath \"$1\")\"\n> +\n> +cd \"${ipc_dir}/../../\"\n>  \n>  if [ ! -d \"${chromium_dir}/mojo\" ] ; then\n>  \techo \"Directory ${chromium_dir} doesn't contain mojo\"\n> @@ -33,16 +35,16 @@ if [ -n \"$(git -C \"${chromium_dir}\" status --porcelain)\" ] ; then\n>  fi\n>  \n>  # Remove the previously imported files.\n> -rm -rf \"${ipc_dir}/mojo/\"\n> -rm -rf \"${ipc_dir}/tools/\"\n> +rm -rf utils/ipc/mojo/\n> +rm -rf utils/ipc/tools/\n>  \n>  # Copy the diagnosis file\n> -mkdir -p \"${ipc_dir}/tools/diagnosis\"\n> -cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" \"${ipc_dir}/tools/diagnosis\"\n> +mkdir -p utils/ipc/tools/diagnosis/\n> +cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" utils/ipc/tools/diagnosis/\n>  \n>  # Copy the rest of mojo\n> -mkdir -p \"${ipc_dir}/mojo/public\"\n> -cp \"${chromium_dir}/mojo/public/LICENSE\" \"${ipc_dir}/mojo/public\"\n> +mkdir -p utils/ipc/mojo/public/\n> +cp \"${chromium_dir}/mojo/public/LICENSE\" utils/ipc/mojo/public/\n>  \n>  (\n>  \tcd \"${chromium_dir}\" || exit\n> @@ -61,8 +63,8 @@ modify them manually.\n>  EOF\n>  )\n>  \n> -echo \"$readme\" > \"${ipc_dir}/mojo/README\"\n> -echo \"$readme\" > \"${ipc_dir}/tools/README\"\n> +echo \"$readme\" > utils/ipc/mojo/README\n> +echo \"$readme\" > utils/ipc/tools/README\n>  \n>  cat <<EOF\n>  ------------------------------------------------------------","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 63AB7BDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  5 Jan 2024 10:07:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1FCBB62B52;\n\tFri,  5 Jan 2024 11:07:57 +0100 (CET)","from us-smtp-delivery-124.mimecast.com\n\t(us-smtp-delivery-124.mimecast.com [170.10.129.124])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B45661D7F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  5 Jan 2024 11:07:55 +0100 (CET)","from mail-lf1-f72.google.com (mail-lf1-f72.google.com\n\t[209.85.167.72]) by relay.mimecast.com with ESMTP with STARTTLS\n\t(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n\tus-mta-663-W-oF3KWRMaKM22GpWJdcQQ-1; Fri, 05 Jan 2024 05:07:47 -0500","by mail-lf1-f72.google.com with SMTP id\n\t2adb3069b0e04-50e7ce2713cso1187939e87.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 05 Jan 2024 02:07:47 -0800 (PST)","from nuthatch (ip-77-48-47-2.net.vodafone.cz. [77.48.47.2])\n\tby smtp.gmail.com with ESMTPSA id\n\tv11-20020a05600c444b00b0040d8390b199sm1073778wmn.12.2024.01.05.02.07.45\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tFri, 05 Jan 2024 02:07:45 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704449277;\n\tbh=SNUybPqtW8dtSS+iJ35x9PQe5e+xlsbHytPnMxXbZVI=;\n\th=To:In-Reply-To:References:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=bMvzZZr6oo09ID3H0dM+i4fI9hKyMC15amgst4g38ZWMG/6dfwrKEroYwnvf/aLvZ\n\t0ke3Xb3URDnst8LtLesREMylJr0kOv4zMvXx3AAVTvdknC+Z/w75N+9Q8ff02VCTwN\n\twaNHkUKwZJnVx5yIDOaGjBIauxR1XmspYuNgHEiQPnXAylxVsLbBzknikI2i/RbivN\n\tP1t40v5uv8VawQ+BTvfbcdkLxTd7kcjR/+KQQhRNuwsylkER8vf3dezpyFrqn6HlgE\n\tXMN1NBgKU+we6gYd2cvDBrJW1mGCitDrSlMpeC+IrvS4SCpjEjCtRLwYSno6Tf8eSK\n\tyvA1YPTIWlM/w==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n\ts=mimecast20190719; t=1704449274;\n\th=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n\tto:to:cc:cc:mime-version:mime-version:content-type:content-type:\n\tin-reply-to:in-reply-to:references:references;\n\tbh=I/jQhmlbW0QujAMXkLPwPLXLB2tarPJOMSyMYwY8bDo=;\n\tb=SWD/+aSIrnN907lboMZnU4O5mueTeWWTUfk9RCL2kqpK4oLWzjTPMC+l/LdR3/1lIuWKIt\n\tT3ENcILDx6RPTUCyCKEcmjJgb2M+2phhCWECFC0XQKNIbaB5tkOkMPrECB2Tc29VDBj7J9\n\trbHw7AfRzondPeYbDR2RTtXJ45snTc0="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=redhat.com\n\theader.i=@redhat.com header.b=\"SWD/+aSI\"; \n\tdkim-atps=neutral","X-MC-Unique":"W-oF3KWRMaKM22GpWJdcQQ-1","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1704449266; x=1705054066;\n\th=mime-version:user-agent:message-id:date:references:in-reply-to\n\t:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=I/jQhmlbW0QujAMXkLPwPLXLB2tarPJOMSyMYwY8bDo=;\n\tb=hiFEbCHmfC5NroFdzNDJcWuWwIRKRd3RElvpSVpKNhI3QbJ3L1uIDcAD/uCVm5JqnF\n\th8iOdbog/+nvdLsjroQiXgtAqrarutGjlHDd33lCv8PmJBM+7vTngGBHLsnHP0GviuM9\n\tlb5PpRZ32nz+7mxwip1fwC4DU/bsbpgQ2CKl19jbCV+ZcYxDdJDNXcDXPVs9KGxkPr9M\n\t9I+33SRzAnECDNDcgs9+lkCThp8tjFU2A45sl3JD9nz6O+3GLWKUL8z9JmXOPJkQnDOM\n\t5+mL10ypk/vk12ZJeufdecJbwMt9xAbK/4AnXl68V34XA7WoSFrdgWYA+8X/3Bgws93y\n\tNHMw==","X-Gm-Message-State":"AOJu0Yy7h1EKKCNSrfzIUFFpLERQ03cgh5LoAEHd0OV9dMd7wfY0Ibae\n\t3qiyHEenk+oo+lbwyJ+HUQOb5SPk7TOmY7njQ6h8Z0GdG8WObvGrSe3oEiAIGaAiemqS/cfZ/1L\n\ttSFbfXN5OHoLRiYycLLJE7isKmF1lx2mWRZPQIl8oJg==","X-Received":["by 2002:a05:6512:2207:b0:50e:b3bb:12aa with SMTP id\n\th7-20020a056512220700b0050eb3bb12aamr403823lfu.59.1704449266146; \n\tFri, 05 Jan 2024 02:07:46 -0800 (PST)","by 2002:a05:6512:2207:b0:50e:b3bb:12aa with SMTP id\n\th7-20020a056512220700b0050eb3bb12aamr403817lfu.59.1704449265815; \n\tFri, 05 Jan 2024 02:07:45 -0800 (PST)"],"X-Google-Smtp-Source":"AGHT+IGgUUZjG/HGzoseXzHjC/HydKaFp2p68JqHgO/fWWb0SagaDRivQY63fGI+wmO37HCgivWLtw==","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","In-Reply-To":"<20240104151548.2589-4-laurent.pinchart@ideasonboard.com>\n\t(Laurent Pinchart's message of \"Thu, 4 Jan 2024 17:15:43 +0200\")","References":"<20240104151548.2589-1-laurent.pinchart@ideasonboard.com>\n\t<20240104151548.2589-4-laurent.pinchart@ideasonboard.com>","Date":"Fri, 05 Jan 2024 11:07:44 +0100","Message-ID":"<87edewum8f.fsf@redhat.com>","User-Agent":"Gnus/5.13 (Gnus v5.13)","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain","Subject":"Re: [libcamera-devel] [PATCH 3/8] utils: update-mojo.sh: Change to\n\tthe libcamera source directory","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>","From":"Milan Zamazal via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Milan Zamazal <mzamazal@redhat.com>","Cc":"libcamera-devel@lists.libcamera.org, Khem Raj <raj.khem@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28403,"web_url":"https://patchwork.libcamera.org/comment/28403/","msgid":"<170480219712.3044059.17381075680050831344@ping.linuxembedded.co.uk>","date":"2024-01-09T12:09:57","subject":"Re: [libcamera-devel] [PATCH 3/8] utils: update-mojo.sh: Change to\n\tthe libcamera source directory","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2024-01-04 15:15:43)\n> Instead of prefixing all paths to IPC files with ${ipc_dir}, change to\n> the libcamera sources root directory and use relative file paths. This\n> simplifies the update script.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> ---\n>  utils/update-mojo.sh | 20 +++++++++++---------\n>  1 file changed, 11 insertions(+), 9 deletions(-)\n> \n> diff --git a/utils/update-mojo.sh b/utils/update-mojo.sh\n> index 831f5ab8753b..b6fbc6d14f2d 100755\n> --- a/utils/update-mojo.sh\n> +++ b/utils/update-mojo.sh\n> @@ -11,7 +11,9 @@ if [ $# != 1 ] ; then\n>  fi\n>  \n>  ipc_dir=\"$(dirname \"$(realpath \"$0\")\")/ipc\"\n> -chromium_dir=\"$1\"\n> +chromium_dir=\"$(realpath \"$1\")\"\n> +\n> +cd \"${ipc_dir}/../../\"\n>  \n>  if [ ! -d \"${chromium_dir}/mojo\" ] ; then\n>         echo \"Directory ${chromium_dir} doesn't contain mojo\"\n> @@ -33,16 +35,16 @@ if [ -n \"$(git -C \"${chromium_dir}\" status --porcelain)\" ] ; then\n>  fi\n>  \n>  # Remove the previously imported files.\n> -rm -rf \"${ipc_dir}/mojo/\"\n> -rm -rf \"${ipc_dir}/tools/\"\n> +rm -rf utils/ipc/mojo/\n> +rm -rf utils/ipc/tools/\n>  \n>  # Copy the diagnosis file\n> -mkdir -p \"${ipc_dir}/tools/diagnosis\"\n> -cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" \"${ipc_dir}/tools/diagnosis\"\n> +mkdir -p utils/ipc/tools/diagnosis/\n> +cp \"${chromium_dir}/tools/diagnosis/crbug_1001171.py\" utils/ipc/tools/diagnosis/\n>  \n>  # Copy the rest of mojo\n> -mkdir -p \"${ipc_dir}/mojo/public\"\n> -cp \"${chromium_dir}/mojo/public/LICENSE\" \"${ipc_dir}/mojo/public\"\n> +mkdir -p utils/ipc/mojo/public/\n> +cp \"${chromium_dir}/mojo/public/LICENSE\" utils/ipc/mojo/public/\n>  \n>  (\n>         cd \"${chromium_dir}\" || exit\n> @@ -61,8 +63,8 @@ modify them manually.\n>  EOF\n>  )\n>  \n> -echo \"$readme\" > \"${ipc_dir}/mojo/README\"\n> -echo \"$readme\" > \"${ipc_dir}/tools/README\"\n> +echo \"$readme\" > utils/ipc/mojo/README\n> +echo \"$readme\" > utils/ipc/tools/README\n>  \n>  cat <<EOF\n>  ------------------------------------------------------------\n> -- \n> Regards,\n> \n> Laurent Pinchart\n>","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 34E27C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Jan 2024 12:10:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D88F662B32;\n\tTue,  9 Jan 2024 13:10:01 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F1B0862B30\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jan 2024 13:09:59 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0AD44552;\n\tTue,  9 Jan 2024 13:08:56 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704802201;\n\tbh=/6WDvSDKDZ10Z6Qisn6DmGW7AYS3tPz+fkBqOKMm3AY=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=1EnkYuJeNG+ldIqWy0lSPkPIsOOSkLEITtFTjQ72HdRK0K9lLsmb7p61WWr8rr2MN\n\tXVagOtebOQaofK1z/19AboS9XHblsrhOPs4vUln0aDRnA5gsQe3mF8gI7gsJTAkTYn\n\tVnsF8BbAjp1/L3pViunHNVMBRvQPrR+IgUhJ4S7/NiUsCawgJWmpCFzmieIRKX7kBA\n\tA6fIvVqPX00zd6sPodSQiw3CufXNfQvj5TgyuhkOu/sZLwu/NERJdc+OmNqFA0/nwa\n\tRF8UDNatUP8Gx2IOofQNeBpgXLqpCuaz41/nr9eX6Sz/K4gGAYXJrb7A+f+2LJ5hf2\n\tn3RKHOGx3yL/g==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704802136;\n\tbh=/6WDvSDKDZ10Z6Qisn6DmGW7AYS3tPz+fkBqOKMm3AY=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=d6sR2mgvrzXV7e4I2NPDXsf9CWVYNkRip/73yPg0WnI/kGHjL0SCGZWgGSofRnh8n\n\teXNl37D0DwU4P73hImU+7YbUxALj15OebKEetuHQdLPDggCHqsMsRjwVD3VdzIGlSu\n\trqBiJcvcgY9GqfjN/j96lVIQ4h/fCsIJeLb3DbmA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"d6sR2mgv\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240104151548.2589-4-laurent.pinchart@ideasonboard.com>","References":"<20240104151548.2589-1-laurent.pinchart@ideasonboard.com>\n\t<20240104151548.2589-4-laurent.pinchart@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Tue, 09 Jan 2024 12:09:57 +0000","Message-ID":"<170480219712.3044059.17381075680050831344@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH 3/8] utils: update-mojo.sh: Change to\n\tthe libcamera source directory","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>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Khem Raj <raj.khem@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]