[{"id":26492,"web_url":"https://patchwork.libcamera.org/comment/26492/","msgid":"<Y/209BxPpHe4QFyz@pyrite.rasen.tech>","date":"2023-02-28T08:01:56","subject":"Re: [libcamera-devel] [PATCH] utils: Added a helper script to\n\tmanage dependencies","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"On Thu, Feb 23, 2023 at 06:17:08PM +0100, sfilbertf via libcamera-devel wrote:\n\nInteresting idea. However, you're missing both changelog as well as a\nSigned-off-by tag.\n\nHere are some resources:\n\nhttps://cbea.ms/git-commit/\nhttps://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin\n\n\nPaul\n\n> ---\n>  utils/bootstrap-deps.sh | 102 ++++++++++++++++++++++++++++++++++++++++\n>  1 file changed, 102 insertions(+)\n>  create mode 100755 utils/bootstrap-deps.sh\n> \n> diff --git a/utils/bootstrap-deps.sh b/utils/bootstrap-deps.sh\n> new file mode 100755\n> index 00000000..95e7e66c\n> --- /dev/null\n> +++ b/utils/bootstrap-deps.sh\n> @@ -0,0 +1,102 @@\n> +#!/usr/bin/env bash\n> +\n> +# Currently only for ubuntu and debian based distros\n> +apt_get_ext=$(command -v apt-get)\n> +if [ -z ${apt_get_ext} ]; then\n> +\texit\n> +fi\n> +\n> +# Help message\n> +function help {\n> +\techo \"Usage:\"\n> +\techo \"./bootstrap-deps.sh [arg1] [arg2] . . .\"\n> +\techo \"\"\n> +\techo \"Where argi can be:\"\n> +\techo \"-all       for all dependencies\"\n> +\techo \"-cam       for cam\"\n> +\techo \"-qcam      for qcam\"\n> +\techo \"-tracing   for tracing with lttng\"\n> +\techo \"-gstreamer for gstreamer\"\n> +\techo \"-hotplug   for device hotplug enumeration\"\n> +\techo \"-docs      for documentation\"\n> +\techo \"-ipams     for IPA module signing\"\n> +\techo \"-debug     for improved debugging\"\n> +\techo \"-android   for android\"\n> +\techo \"-lcc       for lc-compliance\"\n> +}\n> +\n> +if [ $# == 1 ] && [ $1 == \"-h\" ] || [ $1 == \"-help\" ]; then\n> +\thelp\n> +\texit\n> +fi\n> +\n> +# Dependencies\n> +CORE=\"libyaml-dev python3-yaml python3-ply python3-jinja2\"\n> +IPAMS=\"libgnutls28-dev\"\n> +DEBUG=\"libdw-dev libunwind-dev\"\n> +HOTPLUG=\"libudev-dev\"\n> +DOCS=\"python3-sphinx doxygen graphviz texlive-latex-extra\"\n> +GSTREAMER=\"libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev\"\n> +CAM=\"libevent-dev libdrm-dev libjpeg-dev libsdl2-dev\"\n> +QCAM=\"qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5 qttools5-dev-tools libtiff-dev\"\n> +TRACING=\"liblttng-ust-dev python3-jinja2 lttng-tools\"\n> +ANDROID=\"libexif-dev libjpeg-dev\"\n> +LCCOMP=\"libevent-dev\"\n> +\n> +# Meson build system\n> +pip3 install --user meson\n> +pip3 install --user --upgrade meson\n> +\n> +# libcamera core\n> +sudo apt-get install -y ${CORE}\n> +\n> +# Optional dependencies\n> +for arg in \"$@\"\n> +do\n> +\tcase ${arg} in \n> +\t\t# For all dependencies\n> +\t\t\"-all\")\n> +\t\t\tsudo apt-get install -y ${IPAMS} ${DEBUG} ${HOTPLUG} ${DOCS} ${GSTREAMER} ${CAM} ${QCAM} ${TRACING} ${ANDROID} ${LCCOMP}\t\n> +\t\t;;\n> +\t\t# For cam\n> +\t\t\"-cam\")\n> +\t\t\tsudo apt-get install -y ${CAM}\n> +\t\t;;\n> +\t\t# For qcam\n> +\t\t\"-qcam\")\n> +\t\t\tsudo apt-get install -y ${QCAM}\n> +\t\t;;\t\n> +\t\t# For tracing \n> +\t\t\"-tracing\")\n> +\t\t\tsudo apt-get install -y ${TRACING}\n> +\t\t;;\n> +\t\t# For gstreamer\n> +\t\t\"-gstreamer\")\n> +\t\t\tsudo apt-get install -y ${GSTREAMER}\n> +\t\t;;\n> +\t\t# For hotplug \n> +\t\t\"-hotplug\")\n> +\t\t\tsudo apt-get install -y ${HOTPLUG}\n> +\t\t;;\n> +\t\t# For documentation\n> +\t\t\"-docs\")\n> +\t\t\tsudo apt-get install -y ${DOCS}\n> +\t\t;;\n> +\t\t# For IPA module signing\n> +\t\t\"-ipams\")\n> +\t\t\tsudo apt-get install -y ${IPAMS}\n> +\t\t;;\n> +\t\t# For improved debugging\n> +\t\t\"-debug\")\n> +\t\t\tsudo apt-get install -y ${DEBUG}\n> +\t\t;;\n> +\t\t# For android\n> +\t\t\"-android\")\n> +\t\t\tsudo apt-get install -y ${ANDROID}\n> +\t\t;;\n> +\t\t# For lc-compliance\n> +\t\t\"-lcc\")\n> +\t\t\tsudo apt-get install -y ${LCCOMP}\n> +\t\t;;\n> +\tesac\t\n> +done\n> -- \n> 2.34.1\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 ECEEBBE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 Feb 2023 08:02:06 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5C9B662698;\n\tTue, 28 Feb 2023 09:02:06 +0100 (CET)","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 3116861EE1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Feb 2023 09:02:04 +0100 (CET)","from pyrite.rasen.tech (h175-177-042-159.catv02.itscom.jp\n\t[175.177.42.159])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 90FD156A;\n\tTue, 28 Feb 2023 09:02:02 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677571326;\n\tbh=D6DMICUKsn2qYsVVwIo4qoOpdIzy4nYb7ljmG3dp0Jk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=rMx+5bXIlrkpJOsPb5Yx/ktBlrDdNb3jznQGUzoiI8TrxmwMjzgoeSzSKt3oNYPkP\n\tDywhYuu9NRsL87HbM6oTnITyTtKhj/dZG2WLH0vv6DM6QA6WI4LXg/uQLR8JMoRbRB\n\tF1QwLy8vxWDwi71CUNJ8JhmNfFzPbYHqvfdXjWLAKnCsrZLSs6JbYeS6TnkR8gw73R\n\tsWVZVrjEGYImZyT5qpXMCzw23mi09Q41+e/QOhe04RCVnK37wG3PRXCwr5UouAvxwV\n\tSgbEcFR3Pzo2sjOVpH7qy4WbRweOlbFgd6MVYi6Y+tgbueRArmE6d5fxr3oSlewvOM\n\t1sie3vShg8xuw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677571323;\n\tbh=D6DMICUKsn2qYsVVwIo4qoOpdIzy4nYb7ljmG3dp0Jk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=GTfHcx5WM17JUfNgw7Oe6wsolTRfiSyvVIB0izJnQyPd3L+GXIGeDNCi38t0x2EZB\n\tcUFWL1b3AYx2kgRTsg1Hc22KmDTyWKwDEPLC4YtFr/HVtPDwR41wQGT3n9TT2nEqpO\n\t3XCUVDCWf8/m1pkwXPEi+mxNx0JyQWZACi2SW6hg="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"GTfHcx5W\"; dkim-atps=neutral","Date":"Tue, 28 Feb 2023 17:01:56 +0900","To":"sfilbertf <filbertfebrianto14@gmail.com>","Message-ID":"<Y/209BxPpHe4QFyz@pyrite.rasen.tech>","References":"<20230223171708.83117-1-filbertfebrianto14@gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20230223171708.83117-1-filbertfebrianto14@gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] utils: Added a helper script to\n\tmanage dependencies","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":"Paul Elder via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Paul Elder <paul.elder@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26497,"web_url":"https://patchwork.libcamera.org/comment/26497/","msgid":"<Y/4I3NxHTvw/Fa5u@pendragon.ideasonboard.com>","date":"2023-02-28T13:59:56","subject":"Re: [libcamera-devel] [PATCH] utils: Added a helper script to\n\tmanage dependencies","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Feb 28, 2023 at 05:01:56PM +0900, Paul Elder via libcamera-devel wrote:\n> On Thu, Feb 23, 2023 at 06:17:08PM +0100, sfilbertf via libcamera-devel wrote:\n> \n> Interesting idea. However, you're missing both changelog as well as a\n> Signed-off-by tag.\n> \n> Here are some resources:\n> \n> https://cbea.ms/git-commit/\n> https://docs.kernel.org/process/submitting-patches.html#sign-your-work-the-developer-s-certificate-of-origin\n\nI'm also a bit concerned about hiding a \"sudo\" call inside a script.\n\n> > ---\n> >  utils/bootstrap-deps.sh | 102 ++++++++++++++++++++++++++++++++++++++++\n> >  1 file changed, 102 insertions(+)\n> >  create mode 100755 utils/bootstrap-deps.sh\n> > \n> > diff --git a/utils/bootstrap-deps.sh b/utils/bootstrap-deps.sh\n> > new file mode 100755\n> > index 00000000..95e7e66c\n> > --- /dev/null\n> > +++ b/utils/bootstrap-deps.sh\n> > @@ -0,0 +1,102 @@\n> > +#!/usr/bin/env bash\n> > +\n> > +# Currently only for ubuntu and debian based distros\n> > +apt_get_ext=$(command -v apt-get)\n> > +if [ -z ${apt_get_ext} ]; then\n> > +\texit\n> > +fi\n> > +\n> > +# Help message\n> > +function help {\n> > +\techo \"Usage:\"\n> > +\techo \"./bootstrap-deps.sh [arg1] [arg2] . . .\"\n> > +\techo \"\"\n> > +\techo \"Where argi can be:\"\n> > +\techo \"-all       for all dependencies\"\n> > +\techo \"-cam       for cam\"\n> > +\techo \"-qcam      for qcam\"\n> > +\techo \"-tracing   for tracing with lttng\"\n> > +\techo \"-gstreamer for gstreamer\"\n> > +\techo \"-hotplug   for device hotplug enumeration\"\n> > +\techo \"-docs      for documentation\"\n> > +\techo \"-ipams     for IPA module signing\"\n> > +\techo \"-debug     for improved debugging\"\n> > +\techo \"-android   for android\"\n> > +\techo \"-lcc       for lc-compliance\"\n> > +}\n> > +\n> > +if [ $# == 1 ] && [ $1 == \"-h\" ] || [ $1 == \"-help\" ]; then\n> > +\thelp\n> > +\texit\n> > +fi\n> > +\n> > +# Dependencies\n> > +CORE=\"libyaml-dev python3-yaml python3-ply python3-jinja2\"\n> > +IPAMS=\"libgnutls28-dev\"\n> > +DEBUG=\"libdw-dev libunwind-dev\"\n> > +HOTPLUG=\"libudev-dev\"\n> > +DOCS=\"python3-sphinx doxygen graphviz texlive-latex-extra\"\n> > +GSTREAMER=\"libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev\"\n> > +CAM=\"libevent-dev libdrm-dev libjpeg-dev libsdl2-dev\"\n> > +QCAM=\"qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5 qttools5-dev-tools libtiff-dev\"\n> > +TRACING=\"liblttng-ust-dev python3-jinja2 lttng-tools\"\n> > +ANDROID=\"libexif-dev libjpeg-dev\"\n> > +LCCOMP=\"libevent-dev\"\n> > +\n> > +# Meson build system\n> > +pip3 install --user meson\n> > +pip3 install --user --upgrade meson\n\nInstalling meson in $HOME is discouraged, as having differents version\nin $HOME and in /usr can cause issues when running ninja install.\n\n> > +# libcamera core\n> > +sudo apt-get install -y ${CORE}\n> > +\n> > +# Optional dependencies\n> > +for arg in \"$@\"\n> > +do\n> > +\tcase ${arg} in \n> > +\t\t# For all dependencies\n> > +\t\t\"-all\")\n> > +\t\t\tsudo apt-get install -y ${IPAMS} ${DEBUG} ${HOTPLUG} ${DOCS} ${GSTREAMER} ${CAM} ${QCAM} ${TRACING} ${ANDROID} ${LCCOMP}\t\n> > +\t\t;;\n> > +\t\t# For cam\n> > +\t\t\"-cam\")\n> > +\t\t\tsudo apt-get install -y ${CAM}\n> > +\t\t;;\n> > +\t\t# For qcam\n> > +\t\t\"-qcam\")\n> > +\t\t\tsudo apt-get install -y ${QCAM}\n> > +\t\t;;\t\n> > +\t\t# For tracing \n> > +\t\t\"-tracing\")\n> > +\t\t\tsudo apt-get install -y ${TRACING}\n> > +\t\t;;\n> > +\t\t# For gstreamer\n> > +\t\t\"-gstreamer\")\n> > +\t\t\tsudo apt-get install -y ${GSTREAMER}\n> > +\t\t;;\n> > +\t\t# For hotplug \n> > +\t\t\"-hotplug\")\n> > +\t\t\tsudo apt-get install -y ${HOTPLUG}\n> > +\t\t;;\n> > +\t\t# For documentation\n> > +\t\t\"-docs\")\n> > +\t\t\tsudo apt-get install -y ${DOCS}\n> > +\t\t;;\n> > +\t\t# For IPA module signing\n> > +\t\t\"-ipams\")\n> > +\t\t\tsudo apt-get install -y ${IPAMS}\n> > +\t\t;;\n> > +\t\t# For improved debugging\n> > +\t\t\"-debug\")\n> > +\t\t\tsudo apt-get install -y ${DEBUG}\n> > +\t\t;;\n> > +\t\t# For android\n> > +\t\t\"-android\")\n> > +\t\t\tsudo apt-get install -y ${ANDROID}\n> > +\t\t;;\n> > +\t\t# For lc-compliance\n> > +\t\t\"-lcc\")\n> > +\t\t\tsudo apt-get install -y ${LCCOMP}\n> > +\t\t;;\n> > +\tesac\t\n> > +done\n\nHow about collecting all the needed packages in one variable and running\napt-get install once only ?","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 6A8F0BE08A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 28 Feb 2023 13:59:58 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id ABD30626A2;\n\tTue, 28 Feb 2023 14:59:57 +0100 (CET)","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 182D062671\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 28 Feb 2023 14:59:56 +0100 (CET)","from pendragon.ideasonboard.com\n\t(153.162-64-87.adsl-dyn.isp.belgacom.be [87.64.162.153])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 52D8056A;\n\tTue, 28 Feb 2023 14:59:55 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1677592797;\n\tbh=HCRwMdKnSbay+KQbfkDbP5lHWbUsMrTsO0rFKtqQOc8=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=q1MJAW7RLyK1tU2kuwgf0TUonAzqE5cw3eqeC4hauI8MqUQaPD6Ll5hO7zzHjxJ0P\n\tapafoNxAzQFLXexxyijxvgHOotZOKPWX5Mdv+6pvxpzk8Cet6swtCeTD83mQ+UtMQw\n\tE8CTZcj1i+L5KB50MHI416tiB6ihDL8QW5Mhh6GXsH2WCDPO67lThj0YYDWxVxTtW2\n\tTLElgHh/ANsYo5CGrD3ClXI9ylVBmk/CNFh3AT2nDhvrzSR2HFxT4uQYa7p5iGVcJg\n\t8alWV2efvKIS9RaE3sNFtcgHdIKDp7mz7wKBoRWiE5Wn8tro7qUUJ09IVMt8cIccGH\n\tjXeMAmXiSCSYg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1677592795;\n\tbh=HCRwMdKnSbay+KQbfkDbP5lHWbUsMrTsO0rFKtqQOc8=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tbtIgLI5RiiRuSGCRLNDx1bCGKQTQ3U0pkiNq9gRpE5ernC0KgNixeKDPG7LKNGa2\n\t7JlDOCL5iXlMida1RtHlTyyVv+8p8ulGLgfDl9vHtoRCZfLadFgzZ1giJOwjJrXZiy\n\tP4XYSkCfk5jrXY6lPmYyCSE4SRFTNPOdH5sMDTHY="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"tbtIgLI5\"; dkim-atps=neutral","Date":"Tue, 28 Feb 2023 15:59:56 +0200","To":"Paul Elder <paul.elder@ideasonboard.com>","Message-ID":"<Y/4I3NxHTvw/Fa5u@pendragon.ideasonboard.com>","References":"<20230223171708.83117-1-filbertfebrianto14@gmail.com>\n\t<Y/209BxPpHe4QFyz@pyrite.rasen.tech>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<Y/209BxPpHe4QFyz@pyrite.rasen.tech>","Subject":"Re: [libcamera-devel] [PATCH] utils: Added a helper script to\n\tmanage dependencies","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":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tsfilbertf <filbertfebrianto14@gmail.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]