[{"id":26951,"web_url":"https://patchwork.libcamera.org/comment/26951/","msgid":"<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>","date":"2023-04-27T08:10:04","subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hi Naush\n\nOn Thu, Apr 27, 2023 at 08:16:52AM +0100, Naushir Patuck via libcamera-devel wrote:\n> Add a prefix parameter to IPAProxy::configurationFile(). This prefix is\n> added to the search path when locating IPA configuration files in the\n> system directories.\n>\n> For example, the system directories etc/libcamera/ipa/<prefix>/ and\n> share/libcamera/ipa/<prefix>/ will be used to search for the IPA\n> configuration files.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  include/libcamera/internal/ipa_proxy.h |  3 ++-\n>  src/libcamera/ipa_proxy.cpp            | 11 +++++++----\n>  2 files changed, 9 insertions(+), 5 deletions(-)\n>\n> diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\n> index 781c8b623605..9235b582edad 100644\n> --- a/include/libcamera/internal/ipa_proxy.h\n> +++ b/include/libcamera/internal/ipa_proxy.h\n> @@ -31,7 +31,8 @@ public:\n>\n>  \tbool isValid() const { return valid_; }\n>\n> -\tstd::string configurationFile(const std::string &file) const;\n> +\tstd::string configurationFile(const std::string &file,\n> +\t\t\t\t      const std::string &prefix = \"\") const;\n>\n>  protected:\n>  \tstd::string resolvePath(const std::string &file) const;\n> diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> index 3f2cc6b89f60..4a27b0a993fa 100644\n> --- a/src/libcamera/ipa_proxy.cpp\n> +++ b/src/libcamera/ipa_proxy.cpp\n> @@ -72,6 +72,7 @@ IPAProxy::~IPAProxy()\n>  /**\n>   * \\brief Retrieve the absolute path to an IPA configuration file\n>   * \\param[in] name The configuration file name\n> + * \\param[in] prefix The configuration directory prefix when searching system paths\n>   *\n>   * This function locates the configuration file for an IPA and returns its\n>   * absolute path. It searches the following directories, in order:\n> @@ -80,8 +81,8 @@ IPAProxy::~IPAProxy()\n>   *   environment variable ; or\n>   * - If libcamera is not installed, the src/ipa/ directory within the source\n>   *   tree ; otherwise\n> - * - The system sysconf (etc/libcamera/ipa) and the data (share/libcamera/ipa/)\n> - *   directories.\n> + * - The system sysconf (etc/libcamera/ipa/<prefix>/) and the data\n> + *   (share/libcamera/ipa/<prefix>/) directories.\n\nDoxygen doesn't seem happy with <prefix>\n\nsrc/libcamera/ipa_proxy.cpp:83: warning: Unsupported xml/html tag <prefix> found\nsrc/libcamera/ipa_proxy.cpp:84: warning: Unsupported xml/html tag <prefix> found\n\n\n>   *\n>   * The system directories are not searched if libcamera is not installed.\n>   *\n> @@ -92,7 +93,8 @@ IPAProxy::~IPAProxy()\n>   * \\return The full path to the IPA configuration file, or an empty string if\n>   * no configuration file can be found\n>   */\n> -std::string IPAProxy::configurationFile(const std::string &name) const\n> +std::string IPAProxy::configurationFile(const std::string &name,\n> +\t\t\t\t\tconst std::string &prefix) const\n>  {\n>  \tstruct stat statbuf;\n>  \tint ret;\n> @@ -139,7 +141,8 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n>  \t} else {\n>  \t\t/* Else look in the system locations. */\n>  \t\tfor (const auto &dir : utils::split(IPA_CONFIG_DIR, \":\")) {\n> -\t\t\tstd::string confPath = dir + \"/\" + ipaName + \"/\" + name;\n> +\t\t\tstd::string confPath = dir + \"/\" + prefix + \"/\" +\n> +\t\t\t\t\t       ipaName + \"/\" + name;\n>  \t\t\tret = stat(confPath.c_str(), &statbuf);\n>  \t\t\tif (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)\n>  \t\t\t\treturn confPath;\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 00E47C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 08:10:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 67D8A627D6;\n\tThu, 27 Apr 2023 10:10:09 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4C0C9627D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 10:10:07 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2001:b07:5d2e:52c9:1cf0:b3bc:c785:4625])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 3CE96C7E;\n\tThu, 27 Apr 2023 10:09:55 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682583009;\n\tbh=l0O6j7S2uDwR8qQXmJx7DPrswwmNrvW+gYjO2gyFi8s=;\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=dqUfbr3hmOR5pJAegaq4Yx05aTu3Kc0eUPfFqyygr/+QZhiRBjNWiPJ5iM622tTbH\n\tfU1C1nsrfI4YvnuKlTCzjlvQROu1fKJFldrZ1JS5QoRhSLNMbRHCzzbwlEwnUZ8TM3\n\tkweXkov4m2LGVhGJI1biKnDhLcD0bJ66nPi4De98eV5TsW8es9SF66QjZzjwOEz0Os\n\tdLN6OjRqOnpcDoI7+L3MlcrM5UldWiPUfREadr5k6CdIPgB2jQl1fGt0MW3WOAPZUY\n\tfUJwlI902lJG6gt1GKTtag4iSZIoO5wnFWdwNfdvR7HPX5e1SHlr5oVq1dTlnqT4+P\n\tJ8C9pPUbGGyhQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682582995;\n\tbh=l0O6j7S2uDwR8qQXmJx7DPrswwmNrvW+gYjO2gyFi8s=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=W8i+wlKuB4ciJY+MbhL73oi34Y/UYkfYSgrX6hwNqqVo5Z7ERcArT+xCFMAiTnUww\n\tStT3PE86cPu/3NcIlmtkN4WzUW8fp2hi4YGMAzR9ExdxUtpvw9D4S2KCFxvEsJdA7Q\n\tgJXkTtsPfL0mjil0Ti23XnHPwj3TRfzxrqoZfHbs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"W8i+wlKu\"; dkim-atps=neutral","Date":"Thu, 27 Apr 2023 10:10:04 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>","References":"<20230426131057.21550-3-naush@raspberrypi.com>\n\t<20230427071652.25828-1-naush@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230427071652.25828-1-naush@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@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":26953,"web_url":"https://patchwork.libcamera.org/comment/26953/","msgid":"<CAEmqJPqx5gB5g4abGQ3msHTGh=YiesOVV2QnyMMU7XXteQYWtA@mail.gmail.com>","date":"2023-04-27T08:24:16","subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Thu, 27 Apr 2023 at 09:10, Jacopo Mondi\n<jacopo.mondi@ideasonboard.com> wrote:\n>\n> Hi Naush\n>\n> On Thu, Apr 27, 2023 at 08:16:52AM +0100, Naushir Patuck via libcamera-devel wrote:\n> > Add a prefix parameter to IPAProxy::configurationFile(). This prefix is\n> > added to the search path when locating IPA configuration files in the\n> > system directories.\n> >\n> > For example, the system directories etc/libcamera/ipa/<prefix>/ and\n> > share/libcamera/ipa/<prefix>/ will be used to search for the IPA\n> > configuration files.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  include/libcamera/internal/ipa_proxy.h |  3 ++-\n> >  src/libcamera/ipa_proxy.cpp            | 11 +++++++----\n> >  2 files changed, 9 insertions(+), 5 deletions(-)\n> >\n> > diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\n> > index 781c8b623605..9235b582edad 100644\n> > --- a/include/libcamera/internal/ipa_proxy.h\n> > +++ b/include/libcamera/internal/ipa_proxy.h\n> > @@ -31,7 +31,8 @@ public:\n> >\n> >       bool isValid() const { return valid_; }\n> >\n> > -     std::string configurationFile(const std::string &file) const;\n> > +     std::string configurationFile(const std::string &file,\n> > +                                   const std::string &prefix = \"\") const;\n> >\n> >  protected:\n> >       std::string resolvePath(const std::string &file) const;\n> > diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> > index 3f2cc6b89f60..4a27b0a993fa 100644\n> > --- a/src/libcamera/ipa_proxy.cpp\n> > +++ b/src/libcamera/ipa_proxy.cpp\n> > @@ -72,6 +72,7 @@ IPAProxy::~IPAProxy()\n> >  /**\n> >   * \\brief Retrieve the absolute path to an IPA configuration file\n> >   * \\param[in] name The configuration file name\n> > + * \\param[in] prefix The configuration directory prefix when searching system paths\n> >   *\n> >   * This function locates the configuration file for an IPA and returns its\n> >   * absolute path. It searches the following directories, in order:\n> > @@ -80,8 +81,8 @@ IPAProxy::~IPAProxy()\n> >   *   environment variable ; or\n> >   * - If libcamera is not installed, the src/ipa/ directory within the source\n> >   *   tree ; otherwise\n> > - * - The system sysconf (etc/libcamera/ipa) and the data (share/libcamera/ipa/)\n> > - *   directories.\n> > + * - The system sysconf (etc/libcamera/ipa/<prefix>/) and the data\n> > + *   (share/libcamera/ipa/<prefix>/) directories.\n>\n> Doxygen doesn't seem happy with <prefix>\n>\n> src/libcamera/ipa_proxy.cpp:83: warning: Unsupported xml/html tag <prefix> found\n> src/libcamera/ipa_proxy.cpp:84: warning: Unsupported xml/html tag <prefix> found\n\nOops! Should I just use \"prefix\" instead?\n\n\"\"\n The system sysconf (etc/libcamera/ipa/prefix/) and the data\n (share/libcamera/ipa/prefix/) directories.\n\"\"\n\nRegards,\nNaush\n\n>\n>\n> >   *\n> >   * The system directories are not searched if libcamera is not installed.\n> >   *\n> > @@ -92,7 +93,8 @@ IPAProxy::~IPAProxy()\n> >   * \\return The full path to the IPA configuration file, or an empty string if\n> >   * no configuration file can be found\n> >   */\n> > -std::string IPAProxy::configurationFile(const std::string &name) const\n> > +std::string IPAProxy::configurationFile(const std::string &name,\n> > +                                     const std::string &prefix) const\n> >  {\n> >       struct stat statbuf;\n> >       int ret;\n> > @@ -139,7 +141,8 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n> >       } else {\n> >               /* Else look in the system locations. */\n> >               for (const auto &dir : utils::split(IPA_CONFIG_DIR, \":\")) {\n> > -                     std::string confPath = dir + \"/\" + ipaName + \"/\" + name;\n> > +                     std::string confPath = dir + \"/\" + prefix + \"/\" +\n> > +                                            ipaName + \"/\" + name;\n> >                       ret = stat(confPath.c_str(), &statbuf);\n> >                       if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)\n> >                               return confPath;\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 13A60C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 08:24:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9D881627DF;\n\tThu, 27 Apr 2023 10:24:27 +0200 (CEST)","from mail-yw1-x1136.google.com (mail-yw1-x1136.google.com\n\t[IPv6:2607:f8b0:4864:20::1136])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C6014627D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 10:24:26 +0200 (CEST)","by mail-yw1-x1136.google.com with SMTP id\n\t00721157ae682-54f9e41dfa7so63789907b3.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 01:24:26 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682583867;\n\tbh=co43KJyh7tzOUnGQvSuqwVlKpFKK0MfDBhh++NF3M/Q=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=tEEF+Vk3I70mAZsZ1ZNnv7e27hfWwy2xQpx+1UBskWQrrfKX9EpjUt+Tc+DTpYsmL\n\tHED1n6AWVJANt+NLSzWiGQgukKBJa9kMjiaAYnPhlgNFKgfoTuPI7wWLLYNnnVi5VK\n\tnJGLy0JR8vAp36PUSzOMa99SS6KA/vHMX9gZFLCuWh/kgviwWCGVlY22y7IDWlSCZq\n\tyFmriYpraEfnb3GmxI4055n9hwKGLbddGNroQlA14DrUjrtuPEuNKkFmAdjGKM4FcK\n\tGTPgjUB/U4uzhpelANJY050y4wJpT8VlLZP+lm1LlB5pTdBbj4IZ7N10zpLDMnwwmZ\n\teeP63cWIpKbAg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1682583865; x=1685175865;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=LmJW9e7P2XFjt4kPaftxFVtXgRH5uiO8lJGbb2zzB1M=;\n\tb=G/reH+PVHWW8DizJjxRg75RqqF1XbquCLqsY8lOWq0/qmCAxzr9PvaJzkvJPWLvPJM\n\tsLuGJXKon16Ztk/V36xBZJsJc+BU04X1FiFt6mokgYO3Y1Ul5C/flGiHbB9lJTypqOMO\n\tkRQwBtsHjOZw2GMyww/gddb8c0K/WVMXEVUXj0GvfL46aN1kS3VvEo2xARRW+hVAwvMj\n\teyXkvaG2XCxRZZkAsbdNjaRFNDKd4vJZ3KND6mycfULemB1TlEDWjN+tNTiEGBIbxXs5\n\tuOsF5Yzia9NFMf1ocw12QvwmGYp0JU8k/JMDopRXeyOeK7TTJop9lmX3BasBnoImU1xk\n\txtIA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"G/reH+PV\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1682583865; x=1685175865;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=LmJW9e7P2XFjt4kPaftxFVtXgRH5uiO8lJGbb2zzB1M=;\n\tb=JPmY92tKi++PSdr99n2r9fhntp9Xf1HR+z6PIJ444ZXcfvqp+0f2/TT2k3xx20AP6X\n\tCEd8xLvhmMd7u5MZTwQuzjKdRLz3NlDe1l+k9VNhLwuxfwCyjFiXglLez9LtW75sFoAx\n\t2GYil7nXssSCzbP7ZncUjoW3LgOPikBNxGXq6HAHuhmIuwmH/SlM3Qq0LpWMF+NixUnd\n\t2yFyEbdCBHkPPn5jpJ0b8bwFgaPwukLptsiawx+9N7TMmvpyE1nMeI4cQMK2IVjTqRpc\n\trCx+wbW8yPEetfq/jKecCX+Db69nXyPhDGiYeNeAE+AbSAJpnl54oeZSoHr/RLF73G7j\n\tzpJA==","X-Gm-Message-State":"AC+VfDwIzExmZoXB8Oy9mvhN3+MHMNCOl/DCxS2HK/JESerbXAZE185K\n\tLNZkq0r9zM6g2INDE2L7voHABQyqGZD2XN1/SdbYtwK/7ESxlPlUbLRR4w==","X-Google-Smtp-Source":"ACHHUZ4BeXevMn/GZ8BP590ETgf83b2MtcEr4sofeZ1NUSsZ2W1FxnpKaTxRarpUzdZotPk7mAo3v09lt4jPTHCl3Xg=","X-Received":"by 2002:a81:9185:0:b0:545:acb:e5da with SMTP id\n\ti127-20020a819185000000b005450acbe5damr618677ywg.28.1682583865677;\n\tThu, 27 Apr 2023 01:24:25 -0700 (PDT)","MIME-Version":"1.0","References":"<20230426131057.21550-3-naush@raspberrypi.com>\n\t<20230427071652.25828-1-naush@raspberrypi.com>\n\t<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>","In-Reply-To":"<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>","Date":"Thu, 27 Apr 2023 09:24:16 +0100","Message-ID":"<CAEmqJPqx5gB5g4abGQ3msHTGh=YiesOVV2QnyMMU7XXteQYWtA@mail.gmail.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.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":26954,"web_url":"https://patchwork.libcamera.org/comment/26954/","msgid":"<oqljeymfkpkgvow2uz3ub52htugkjoditlhwo473rx5mafhbor@jk6frya6xpd7>","date":"2023-04-27T08:28:38","subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Naush,\n   what would be the implications of setting the IPA module name to\n\"rpi/vc4\" ? That would make this patch not needed, right ? Are there\nundesired implications ?\n\nOn Thu, Apr 27, 2023 at 09:24:16AM +0100, Naushir Patuck wrote:\n> On Thu, 27 Apr 2023 at 09:10, Jacopo Mondi\n> <jacopo.mondi@ideasonboard.com> wrote:\n> >\n> > Hi Naush\n> >\n> > On Thu, Apr 27, 2023 at 08:16:52AM +0100, Naushir Patuck via libcamera-devel wrote:\n> > > Add a prefix parameter to IPAProxy::configurationFile(). This prefix is\n> > > added to the search path when locating IPA configuration files in the\n> > > system directories.\n> > >\n> > > For example, the system directories etc/libcamera/ipa/<prefix>/ and\n> > > share/libcamera/ipa/<prefix>/ will be used to search for the IPA\n> > > configuration files.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  include/libcamera/internal/ipa_proxy.h |  3 ++-\n> > >  src/libcamera/ipa_proxy.cpp            | 11 +++++++----\n> > >  2 files changed, 9 insertions(+), 5 deletions(-)\n> > >\n> > > diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\n> > > index 781c8b623605..9235b582edad 100644\n> > > --- a/include/libcamera/internal/ipa_proxy.h\n> > > +++ b/include/libcamera/internal/ipa_proxy.h\n> > > @@ -31,7 +31,8 @@ public:\n> > >\n> > >       bool isValid() const { return valid_; }\n> > >\n> > > -     std::string configurationFile(const std::string &file) const;\n> > > +     std::string configurationFile(const std::string &file,\n> > > +                                   const std::string &prefix = \"\") const;\n> > >\n> > >  protected:\n> > >       std::string resolvePath(const std::string &file) const;\n> > > diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> > > index 3f2cc6b89f60..4a27b0a993fa 100644\n> > > --- a/src/libcamera/ipa_proxy.cpp\n> > > +++ b/src/libcamera/ipa_proxy.cpp\n> > > @@ -72,6 +72,7 @@ IPAProxy::~IPAProxy()\n> > >  /**\n> > >   * \\brief Retrieve the absolute path to an IPA configuration file\n> > >   * \\param[in] name The configuration file name\n> > > + * \\param[in] prefix The configuration directory prefix when searching system paths\n> > >   *\n> > >   * This function locates the configuration file for an IPA and returns its\n> > >   * absolute path. It searches the following directories, in order:\n> > > @@ -80,8 +81,8 @@ IPAProxy::~IPAProxy()\n> > >   *   environment variable ; or\n> > >   * - If libcamera is not installed, the src/ipa/ directory within the source\n> > >   *   tree ; otherwise\n> > > - * - The system sysconf (etc/libcamera/ipa) and the data (share/libcamera/ipa/)\n> > > - *   directories.\n> > > + * - The system sysconf (etc/libcamera/ipa/<prefix>/) and the data\n> > > + *   (share/libcamera/ipa/<prefix>/) directories.\n> >\n> > Doxygen doesn't seem happy with <prefix>\n> >\n> > src/libcamera/ipa_proxy.cpp:83: warning: Unsupported xml/html tag <prefix> found\n> > src/libcamera/ipa_proxy.cpp:84: warning: Unsupported xml/html tag <prefix> found\n>\n> Oops! Should I just use \"prefix\" instead?\n>\n> \"\"\n>  The system sysconf (etc/libcamera/ipa/prefix/) and the data\n>  (share/libcamera/ipa/prefix/) directories.\n> \"\"\n\nNot sure it <> could be escaped with \\< and \\>\n>\n> Regards,\n> Naush\n>\n> >\n> >\n> > >   *\n> > >   * The system directories are not searched if libcamera is not installed.\n> > >   *\n> > > @@ -92,7 +93,8 @@ IPAProxy::~IPAProxy()\n> > >   * \\return The full path to the IPA configuration file, or an empty string if\n> > >   * no configuration file can be found\n> > >   */\n> > > -std::string IPAProxy::configurationFile(const std::string &name) const\n> > > +std::string IPAProxy::configurationFile(const std::string &name,\n> > > +                                     const std::string &prefix) const\n> > >  {\n> > >       struct stat statbuf;\n> > >       int ret;\n> > > @@ -139,7 +141,8 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n> > >       } else {\n> > >               /* Else look in the system locations. */\n> > >               for (const auto &dir : utils::split(IPA_CONFIG_DIR, \":\")) {\n> > > -                     std::string confPath = dir + \"/\" + ipaName + \"/\" + name;\n> > > +                     std::string confPath = dir + \"/\" + prefix + \"/\" +\n> > > +                                            ipaName + \"/\" + name;\n> > >                       ret = stat(confPath.c_str(), &statbuf);\n> > >                       if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)\n> > >                               return confPath;\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 0F927BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 08:28:45 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8CF91627DC;\n\tThu, 27 Apr 2023 10:28:44 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7E070627D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 10:28:42 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2001:b07:5d2e:52c9:1cf0:b3bc:c785:4625])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 7AC8EC7E;\n\tThu, 27 Apr 2023 10:28:30 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682584124;\n\tbh=tUW1Xo4780BqHNet3TYFmBEph26ASPkl/hqi2QhU82g=;\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=Upy5AyEBi4k7QgbifbShITw/f+FW5lv2LomrRp6Ei5+JCTW6Z/NSKMGAnjT+Mi/vs\n\tAUHN3gYo4EIRBTjWA6gZlzT1FnofXlpV+5J/sUOb1F1YtevVYqUM8B0ejMVxzVD3mW\n\tS3wYoDW9JdiqroeT/iHNGzS30go+EJtR01zkke4wyo5j3C+9fpRC2E7Y8j5J00wnyE\n\tfkUdRReTvVRcYFQi2HkBn/EUBczqJFihaFFFdV46nm1OehAAYU7NDucuL2vMGbx6jb\n\tjtVu5IrYeS/idvZzLI7av61H9RrI56maR0TUqNi59beXigOg0WG+Y9mtUWKpmAXb63\n\tx/MelVP7LSjLA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682584110;\n\tbh=tUW1Xo4780BqHNet3TYFmBEph26ASPkl/hqi2QhU82g=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Fo+/0W+VjaqU2/XHRDy/XzqUU1RIbgZThr7lyM2sKDHiKQm/azxZqwJc3Y3wFd5xb\n\tfXwVydhMmUQvT2gaItyxgde6B03mJA2Xk7Lbwc8PEyJ+kAhpOWDp19dixdhP3n352f\n\tSv/k9C05J5BCEbvP/Y/zaLj0QT+hCP4rbp1/8/KA="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"Fo+/0W+V\"; dkim-atps=neutral","Date":"Thu, 27 Apr 2023 10:28:38 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<oqljeymfkpkgvow2uz3ub52htugkjoditlhwo473rx5mafhbor@jk6frya6xpd7>","References":"<20230426131057.21550-3-naush@raspberrypi.com>\n\t<20230427071652.25828-1-naush@raspberrypi.com>\n\t<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>\n\t<CAEmqJPqx5gB5g4abGQ3msHTGh=YiesOVV2QnyMMU7XXteQYWtA@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPqx5gB5g4abGQ3msHTGh=YiesOVV2QnyMMU7XXteQYWtA@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26956,"web_url":"https://patchwork.libcamera.org/comment/26956/","msgid":"<CAEmqJPorZS5HqZG+-YdUkMQskRpSZETd-QahHf+sfS1Xcj28nw@mail.gmail.com>","date":"2023-04-27T08:47:02","subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi Jacopo,\n\nOn Thu, 27 Apr 2023 at 09:28, Jacopo Mondi\n<jacopo.mondi@ideasonboard.com> wrote:\n>\n> Naush,\n>    what would be the implications of setting the IPA module name to\n> \"rpi/vc4\" ? That would make this patch not needed, right ? Are there\n> undesired implications ?\n\nI did try to do this, but sadly it does not work.\nFrom https://git.libcamera.org/libcamera/libcamera.git/tree/src/libcamera/ipa_module.cpp#n303\n\n/* Validate the IPA module name. */\nstd::string ipaName = info_.name;\nauto iter = std::find_if_not(ipaName.begin(), ipaName.end(),\n     [](unsigned char c) -> bool {\n     return isprint(c) && c != '/' &&\n    c != '?' && c != '*' &&\n    c != '\\\\';\n     });\nif (iter != ipaName.end()) {\nLOG(IPAModule, Error)\n<< \"Invalid IPA module name '\" << ipaName << \"'\";\nreturn -EINVAL;\n}\n\nThis bit of code complains if the name string has a \"/\" character.\n\n\n>\n> On Thu, Apr 27, 2023 at 09:24:16AM +0100, Naushir Patuck wrote:\n> > On Thu, 27 Apr 2023 at 09:10, Jacopo Mondi\n> > <jacopo.mondi@ideasonboard.com> wrote:\n> > >\n> > > Hi Naush\n> > >\n> > > On Thu, Apr 27, 2023 at 08:16:52AM +0100, Naushir Patuck via libcamera-devel wrote:\n> > > > Add a prefix parameter to IPAProxy::configurationFile(). This prefix is\n> > > > added to the search path when locating IPA configuration files in the\n> > > > system directories.\n> > > >\n> > > > For example, the system directories etc/libcamera/ipa/<prefix>/ and\n> > > > share/libcamera/ipa/<prefix>/ will be used to search for the IPA\n> > > > configuration files.\n> > > >\n> > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > ---\n> > > >  include/libcamera/internal/ipa_proxy.h |  3 ++-\n> > > >  src/libcamera/ipa_proxy.cpp            | 11 +++++++----\n> > > >  2 files changed, 9 insertions(+), 5 deletions(-)\n> > > >\n> > > > diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\n> > > > index 781c8b623605..9235b582edad 100644\n> > > > --- a/include/libcamera/internal/ipa_proxy.h\n> > > > +++ b/include/libcamera/internal/ipa_proxy.h\n> > > > @@ -31,7 +31,8 @@ public:\n> > > >\n> > > >       bool isValid() const { return valid_; }\n> > > >\n> > > > -     std::string configurationFile(const std::string &file) const;\n> > > > +     std::string configurationFile(const std::string &file,\n> > > > +                                   const std::string &prefix = \"\") const;\n> > > >\n> > > >  protected:\n> > > >       std::string resolvePath(const std::string &file) const;\n> > > > diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> > > > index 3f2cc6b89f60..4a27b0a993fa 100644\n> > > > --- a/src/libcamera/ipa_proxy.cpp\n> > > > +++ b/src/libcamera/ipa_proxy.cpp\n> > > > @@ -72,6 +72,7 @@ IPAProxy::~IPAProxy()\n> > > >  /**\n> > > >   * \\brief Retrieve the absolute path to an IPA configuration file\n> > > >   * \\param[in] name The configuration file name\n> > > > + * \\param[in] prefix The configuration directory prefix when searching system paths\n> > > >   *\n> > > >   * This function locates the configuration file for an IPA and returns its\n> > > >   * absolute path. It searches the following directories, in order:\n> > > > @@ -80,8 +81,8 @@ IPAProxy::~IPAProxy()\n> > > >   *   environment variable ; or\n> > > >   * - If libcamera is not installed, the src/ipa/ directory within the source\n> > > >   *   tree ; otherwise\n> > > > - * - The system sysconf (etc/libcamera/ipa) and the data (share/libcamera/ipa/)\n> > > > - *   directories.\n> > > > + * - The system sysconf (etc/libcamera/ipa/<prefix>/) and the data\n> > > > + *   (share/libcamera/ipa/<prefix>/) directories.\n> > >\n> > > Doxygen doesn't seem happy with <prefix>\n> > >\n> > > src/libcamera/ipa_proxy.cpp:83: warning: Unsupported xml/html tag <prefix> found\n> > > src/libcamera/ipa_proxy.cpp:84: warning: Unsupported xml/html tag <prefix> found\n> >\n> > Oops! Should I just use \"prefix\" instead?\n> >\n> > \"\"\n> >  The system sysconf (etc/libcamera/ipa/prefix/) and the data\n> >  (share/libcamera/ipa/prefix/) directories.\n> > \"\"\n>\n> Not sure it <> could be escaped with \\< and \\>\n\nYes, it can!\n\nAnnoyingly, I forgot that I fixed this very thing for\nPipelineHandler::configurationFile()\nsome time back!\n\nI'll make the update.  Given that there are a number of changes now, should I\npost a v2 with your tags collected?\n\nRegards,\nNaush\n\n> >\n> > Regards,\n> > Naush\n> >\n> > >\n> > >\n> > > >   *\n> > > >   * The system directories are not searched if libcamera is not installed.\n> > > >   *\n> > > > @@ -92,7 +93,8 @@ IPAProxy::~IPAProxy()\n> > > >   * \\return The full path to the IPA configuration file, or an empty string if\n> > > >   * no configuration file can be found\n> > > >   */\n> > > > -std::string IPAProxy::configurationFile(const std::string &name) const\n> > > > +std::string IPAProxy::configurationFile(const std::string &name,\n> > > > +                                     const std::string &prefix) const\n> > > >  {\n> > > >       struct stat statbuf;\n> > > >       int ret;\n> > > > @@ -139,7 +141,8 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n> > > >       } else {\n> > > >               /* Else look in the system locations. */\n> > > >               for (const auto &dir : utils::split(IPA_CONFIG_DIR, \":\")) {\n> > > > -                     std::string confPath = dir + \"/\" + ipaName + \"/\" + name;\n> > > > +                     std::string confPath = dir + \"/\" + prefix + \"/\" +\n> > > > +                                            ipaName + \"/\" + name;\n> > > >                       ret = stat(confPath.c_str(), &statbuf);\n> > > >                       if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)\n> > > >                               return confPath;\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 B3741C0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 08:47:15 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 32CBD627DF;\n\tThu, 27 Apr 2023 10:47:15 +0200 (CEST)","from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com\n\t[IPv6:2607:f8b0:4864:20::112a])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 82E6D627D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 10:47:13 +0200 (CEST)","by mail-yw1-x112a.google.com with SMTP id\n\t00721157ae682-54f99770f86so96642507b3.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 01:47:13 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682585235;\n\tbh=kAn07jGR15xuEuDef7EQaaQAGCIDQX53iGf39ytjvk4=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=3DFdH0Cn0bxv3hQK0orRqLmoQlbtOT9UKBYEN0eQ0WucX5O0C2chCtQ6oSwFH2QD/\n\t4ErC3ZurAIB8rQnNAAhdjSp41iFX82z/NxQTKy7KhViQNMeGy7EylJDjO04LBnifJ5\n\t/0cWkQnzq0vF2alBSBK4OvS/n3ZxbKaJ6UOWO9olXMMMNRbV2fRA9oGJdEH0qEQuHN\n\tLvOFkx3Erbq0zb6DCkqmajOK5/ECMDw9ESbxoh8BxkqfWuw7jD3U0/hSbAHxyZGgBg\n\tFQucccP1rFFQqO1ZXYv4PPaZZmTJ0uxfHfxLPr+tauBRGGvNCMeqT6gYAD+B2Gdfta\n\tZN83OWX0RQdYQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1682585232; x=1685177232;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=4Z70RHcW/xx0jCUYX8yJwXek93puVFjjRhZoORnJaQI=;\n\tb=nYp821FADwriRbkV19ad8FgMGPfkpPequW5K7979GNdGDoYRW1myOuUIXI8ytH21wh\n\t1G1g73jeC21OJuwhTHbeS7Rv3XxY21dRYZpPipG/vAu23R9Aj5t6QIYY5s4zkIt2kvt+\n\tzvo1OYQRJjtByy6WMepwjUmoUu5voRrbSAi2bdcDxMJG3YQKryZ/lCTb3M9j+fqv7Owv\n\tls87KcxY2UQYG+BUA1K4cg+7+hfGg2JB5ZWUP0igbbJDpDQ+prYZ6o4Gc1/gabreSgFF\n\t8VaSL2SZFcy+dSFpwUSMORsJ+1IQLQt2kbAhLuwumjQJR6zWfzmpDRI9c7E5WGGZfz8M\n\tIEnQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"nYp821FA\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1682585232; x=1685177232;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=4Z70RHcW/xx0jCUYX8yJwXek93puVFjjRhZoORnJaQI=;\n\tb=MVMiwsHLINbA6c4fbn4+UTQ4TjvYx83IG24CNjkGoH5sHyjEyeo9iz+BAzYexSoxPZ\n\t2zlR/QERGGlqyUUPbCOdeWCdRVc/BWwfHzZj71sLfsHZeRFIr4oZ2yC8pZAT6/2TEl4c\n\tcRTU01PnwdMwREkcGEh7QHJaPIxgEJFNZwNbRwfOyeXHrjwyVSzNuOpQ7/PQOP3SnI3S\n\t4PHrT6ys2n7U573sr2KNZ0ANA76vsXsLIjme29cH3ETBIIQfcQ2U+RdRucxapW0uW5Ip\n\tSr3LwfZjrJGRA24Z6wyh9Q6BBEPfECp/naoOnYXX47F/CYzwx/3cSwbMJB8Cw7PxLBqk\n\t3PsA==","X-Gm-Message-State":"AC+VfDygif4ZWTfj4dvPUeZ91gCsIAn/tRUIXUMRd3yB/J5r2D45tfXM\n\t9t4MpsIJ48NPHSW5w3KYJqjv9QkONo0Zipk8KKM4S5F+Or3/CF4zjw4uYw==","X-Google-Smtp-Source":"ACHHUZ54DXCo71NgtB154M96+U+utnwnQsK372Q+pZLkYrfYXv427iRox5nzZCemQHHVhG3YyAlAnc3ZL9Y9Y/oxWk0=","X-Received":"by 2002:a81:9254:0:b0:548:daa4:5648 with SMTP id\n\tj81-20020a819254000000b00548daa45648mr459864ywg.39.1682585232351;\n\tThu, 27 Apr 2023 01:47:12 -0700 (PDT)","MIME-Version":"1.0","References":"<20230426131057.21550-3-naush@raspberrypi.com>\n\t<20230427071652.25828-1-naush@raspberrypi.com>\n\t<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>\n\t<CAEmqJPqx5gB5g4abGQ3msHTGh=YiesOVV2QnyMMU7XXteQYWtA@mail.gmail.com>\n\t<oqljeymfkpkgvow2uz3ub52htugkjoditlhwo473rx5mafhbor@jk6frya6xpd7>","In-Reply-To":"<oqljeymfkpkgvow2uz3ub52htugkjoditlhwo473rx5mafhbor@jk6frya6xpd7>","Date":"Thu, 27 Apr 2023 09:47:02 +0100","Message-ID":"<CAEmqJPorZS5HqZG+-YdUkMQskRpSZETd-QahHf+sfS1Xcj28nw@mail.gmail.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.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":26961,"web_url":"https://patchwork.libcamera.org/comment/26961/","msgid":"<tmcv7grdjne42ussww3idgb7ywldaf3b7gmg2ew3bd7exl2k3v@57hvnwct3hje>","date":"2023-04-27T11:03:25","subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"On Thu, Apr 27, 2023 at 09:47:02AM +0100, Naushir Patuck via libcamera-devel wrote:\n> Hi Jacopo,\n>\n> On Thu, 27 Apr 2023 at 09:28, Jacopo Mondi\n> <jacopo.mondi@ideasonboard.com> wrote:\n> >\n> > Naush,\n> >    what would be the implications of setting the IPA module name to\n> > \"rpi/vc4\" ? That would make this patch not needed, right ? Are there\n> > undesired implications ?\n>\n> I did try to do this, but sadly it does not work.\n> From https://git.libcamera.org/libcamera/libcamera.git/tree/src/libcamera/ipa_module.cpp#n303\n>\n> /* Validate the IPA module name. */\n> std::string ipaName = info_.name;\n> auto iter = std::find_if_not(ipaName.begin(), ipaName.end(),\n>      [](unsigned char c) -> bool {\n>      return isprint(c) && c != '/' &&\n>     c != '?' && c != '*' &&\n>     c != '\\\\';\n>      });\n> if (iter != ipaName.end()) {\n> LOG(IPAModule, Error)\n> << \"Invalid IPA module name '\" << ipaName << \"'\";\n> return -EINVAL;\n> }\n>\n> This bit of code complains if the name string has a \"/\" character.\n>\n\nAH right. I wonder if we should reconsider that..\nFor now, unless others are strongly in favour of changing this, let's\nleave it this way\n\n>\n> >\n> > On Thu, Apr 27, 2023 at 09:24:16AM +0100, Naushir Patuck wrote:\n> > > On Thu, 27 Apr 2023 at 09:10, Jacopo Mondi\n> > > <jacopo.mondi@ideasonboard.com> wrote:\n> > > >\n> > > > Hi Naush\n> > > >\n> > > > On Thu, Apr 27, 2023 at 08:16:52AM +0100, Naushir Patuck via libcamera-devel wrote:\n> > > > > Add a prefix parameter to IPAProxy::configurationFile(). This prefix is\n> > > > > added to the search path when locating IPA configuration files in the\n> > > > > system directories.\n> > > > >\n> > > > > For example, the system directories etc/libcamera/ipa/<prefix>/ and\n> > > > > share/libcamera/ipa/<prefix>/ will be used to search for the IPA\n> > > > > configuration files.\n> > > > >\n> > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > ---\n> > > > >  include/libcamera/internal/ipa_proxy.h |  3 ++-\n> > > > >  src/libcamera/ipa_proxy.cpp            | 11 +++++++----\n> > > > >  2 files changed, 9 insertions(+), 5 deletions(-)\n> > > > >\n> > > > > diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\n> > > > > index 781c8b623605..9235b582edad 100644\n> > > > > --- a/include/libcamera/internal/ipa_proxy.h\n> > > > > +++ b/include/libcamera/internal/ipa_proxy.h\n> > > > > @@ -31,7 +31,8 @@ public:\n> > > > >\n> > > > >       bool isValid() const { return valid_; }\n> > > > >\n> > > > > -     std::string configurationFile(const std::string &file) const;\n> > > > > +     std::string configurationFile(const std::string &file,\n> > > > > +                                   const std::string &prefix = \"\") const;\n> > > > >\n> > > > >  protected:\n> > > > >       std::string resolvePath(const std::string &file) const;\n> > > > > diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> > > > > index 3f2cc6b89f60..4a27b0a993fa 100644\n> > > > > --- a/src/libcamera/ipa_proxy.cpp\n> > > > > +++ b/src/libcamera/ipa_proxy.cpp\n> > > > > @@ -72,6 +72,7 @@ IPAProxy::~IPAProxy()\n> > > > >  /**\n> > > > >   * \\brief Retrieve the absolute path to an IPA configuration file\n> > > > >   * \\param[in] name The configuration file name\n> > > > > + * \\param[in] prefix The configuration directory prefix when searching system paths\n> > > > >   *\n> > > > >   * This function locates the configuration file for an IPA and returns its\n> > > > >   * absolute path. It searches the following directories, in order:\n> > > > > @@ -80,8 +81,8 @@ IPAProxy::~IPAProxy()\n> > > > >   *   environment variable ; or\n> > > > >   * - If libcamera is not installed, the src/ipa/ directory within the source\n> > > > >   *   tree ; otherwise\n> > > > > - * - The system sysconf (etc/libcamera/ipa) and the data (share/libcamera/ipa/)\n> > > > > - *   directories.\n> > > > > + * - The system sysconf (etc/libcamera/ipa/<prefix>/) and the data\n> > > > > + *   (share/libcamera/ipa/<prefix>/) directories.\n> > > >\n> > > > Doxygen doesn't seem happy with <prefix>\n> > > >\n> > > > src/libcamera/ipa_proxy.cpp:83: warning: Unsupported xml/html tag <prefix> found\n> > > > src/libcamera/ipa_proxy.cpp:84: warning: Unsupported xml/html tag <prefix> found\n> > >\n> > > Oops! Should I just use \"prefix\" instead?\n> > >\n> > > \"\"\n> > >  The system sysconf (etc/libcamera/ipa/prefix/) and the data\n> > >  (share/libcamera/ipa/prefix/) directories.\n> > > \"\"\n> >\n> > Not sure it <> could be escaped with \\< and \\>\n>\n> Yes, it can!\n>\n> Annoyingly, I forgot that I fixed this very thing for\n> PipelineHandler::configurationFile()\n> some time back!\n>\n> I'll make the update.  Given that there are a number of changes now, should I\n> post a v2 with your tags collected?\n>\n> Regards,\n> Naush\n>\n> > >\n> > > Regards,\n> > > Naush\n> > >\n> > > >\n> > > >\n> > > > >   *\n> > > > >   * The system directories are not searched if libcamera is not installed.\n> > > > >   *\n> > > > > @@ -92,7 +93,8 @@ IPAProxy::~IPAProxy()\n> > > > >   * \\return The full path to the IPA configuration file, or an empty string if\n> > > > >   * no configuration file can be found\n> > > > >   */\n> > > > > -std::string IPAProxy::configurationFile(const std::string &name) const\n> > > > > +std::string IPAProxy::configurationFile(const std::string &name,\n> > > > > +                                     const std::string &prefix) const\n> > > > >  {\n> > > > >       struct stat statbuf;\n> > > > >       int ret;\n> > > > > @@ -139,7 +141,8 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n> > > > >       } else {\n> > > > >               /* Else look in the system locations. */\n> > > > >               for (const auto &dir : utils::split(IPA_CONFIG_DIR, \":\")) {\n> > > > > -                     std::string confPath = dir + \"/\" + ipaName + \"/\" + name;\n> > > > > +                     std::string confPath = dir + \"/\" + prefix + \"/\" +\n> > > > > +                                            ipaName + \"/\" + name;\n> > > > >                       ret = stat(confPath.c_str(), &statbuf);\n> > > > >                       if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)\n> > > > >                               return confPath;\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 B4BBEC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 11:03:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C2831627E0;\n\tThu, 27 Apr 2023 13:03:29 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 48CCF627D6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 13:03:28 +0200 (CEST)","from ideasonboard.com (unknown\n\t[IPv6:2001:b07:5d2e:52c9:1cf0:b3bc:c785:4625])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2000C9DE;\n\tThu, 27 Apr 2023 13:03:16 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682593409;\n\tbh=dDZ/iAwsQJXhgijvUONkzMKpnsrSVhnn+xL+xPgZooo=;\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=UzH8eOPyvBs+Baq6H8osFaZyJwk2dRIhPbebP9heR9Z5HKjNG2cf43QmoKRmdo3Q5\n\t519q0zABPHydcALP9B+TZyxL7Bni/NFEeWNtzDoW5C1jS0b1HiVbnnJ3GGBHINalD3\n\tTZpLWWIVD+1UHhq86znRK9AsAnSdBq9flO8qDLN/7pPl+pdid0LeZhHlLq0MbkPRaA\n\tbtpnvzdiI3Z8Lt2BjP8XloedHHsZTe7ADOK9lQtrFkOre80eOV9s1q57VOyV+oW1f7\n\t2+VLhz8U6SDIFmB+ERNq7N8XwawNLkDs2VAGYNAuLfcwP3Pg053jcgcypxhMDBzQTq\n\tnUMFbf5M185ew==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682593396;\n\tbh=dDZ/iAwsQJXhgijvUONkzMKpnsrSVhnn+xL+xPgZooo=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=lRsUnFso7PySd4JrUNoSya5U/XAupZpVcugSxM39w2nEadebK9npKrbu6Y6Bth7rn\n\tkkeT80wGvGK9nV3HIUwod7/F3Fb9AHlekboBR1i/lrwgqQwHtTMSQCrlRym7ea89CI\n\toXKamMxAoHbdRjsn62gx/rTiEHr1zZVagsGKlaOw="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"lRsUnFso\"; dkim-atps=neutral","Date":"Thu, 27 Apr 2023 13:03:25 +0200","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<tmcv7grdjne42ussww3idgb7ywldaf3b7gmg2ew3bd7exl2k3v@57hvnwct3hje>","References":"<20230426131057.21550-3-naush@raspberrypi.com>\n\t<20230427071652.25828-1-naush@raspberrypi.com>\n\t<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>\n\t<CAEmqJPqx5gB5g4abGQ3msHTGh=YiesOVV2QnyMMU7XXteQYWtA@mail.gmail.com>\n\t<oqljeymfkpkgvow2uz3ub52htugkjoditlhwo473rx5mafhbor@jk6frya6xpd7>\n\t<CAEmqJPorZS5HqZG+-YdUkMQskRpSZETd-QahHf+sfS1Xcj28nw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPorZS5HqZG+-YdUkMQskRpSZETd-QahHf+sfS1Xcj28nw@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26979,"web_url":"https://patchwork.libcamera.org/comment/26979/","msgid":"<20230427165657.GL2326@pendragon.ideasonboard.com>","date":"2023-04-27T16:56:57","subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello,\n\nNaush, when sending a new version of a patch within a series, could you\ninclude the patch sequence count (02/13 in this case) in the subject\nline, as well a a version number (v1.1 in this case) ? That helps\ntracking patches. The next version of this patch (unless you post a new\nversion of the whole series, which may be a good idea actually as you've\nalready collected quite a few changes) would be\n\n[PATCH v1.2 02/13] libcamera: ipa_proxy: Allow a prefix for the configuration file\n\nOn Thu, Apr 27, 2023 at 01:03:25PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> On Thu, Apr 27, 2023 at 09:47:02AM +0100, Naushir Patuck via libcamera-devel wrote:\n> > On Thu, 27 Apr 2023 at 09:28, Jacopo Mondi wrote:\n> > >\n> > > Naush,\n> > >    what would be the implications of setting the IPA module name to\n> > > \"rpi/vc4\" ? That would make this patch not needed, right ? Are there\n> > > undesired implications ?\n> >\n> > I did try to do this, but sadly it does not work.\n> > From https://git.libcamera.org/libcamera/libcamera.git/tree/src/libcamera/ipa_module.cpp#n303\n> >\n> > /* Validate the IPA module name. */\n> > std::string ipaName = info_.name;\n> > auto iter = std::find_if_not(ipaName.begin(), ipaName.end(),\n> >      [](unsigned char c) -> bool {\n> >      return isprint(c) && c != '/' &&\n> >     c != '?' && c != '*' &&\n> >     c != '\\\\';\n> >      });\n> > if (iter != ipaName.end()) {\n> > LOG(IPAModule, Error)\n> > << \"Invalid IPA module name '\" << ipaName << \"'\";\n> > return -EINVAL;\n> > }\n> >\n> > This bit of code complains if the name string has a \"/\" character.\n> \n> AH right. I wonder if we should reconsider that..\n> For now, unless others are strongly in favour of changing this, let's\n> leave it this way\n\nI do like the idea of handling all this automatically.\n\nThe constraint on the IPA name comes from\n\ncommit 6e1cd1394e5d73dfd4c4334cbf8beee79072de21\nAuthor: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\nDate:   Mon Apr 27 04:09:42 2020 +0300\n\n    ipa: Name IPA modules after their source directory\n\n    The IPAModuleInfo::name field is currently a free-formed string that has\n    little use. Tighten its usage rules to make it suitable for building\n    file system paths to IPA-specific resources by matching the directory\n    name of the IPA module.\n\n    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n    Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nThe commit expanded the documentation of the IPAModuleInfo::name field\nwith\n\n * The name may be used to build file system paths to IPA-specific resources.\n * It shall only contain printable characters, and may not contain '/', '*',\n * '?' or '\\'. For IPA modules included in libcamera, it shall match the\n * directory of the IPA module in the source tree.\n\nThe reason for this is to make it safe(r) to build paths from the IPA\nmodule name.\n\nI think we could lift the constraint that forbids the '/' character, and\ninstead forbid \"..\". That should be enough to avoid walking the file\nsystem.\n\n> > > On Thu, Apr 27, 2023 at 09:24:16AM +0100, Naushir Patuck wrote:\n> > > > On Thu, 27 Apr 2023 at 09:10, Jacopo Mondi wrote:\n> > > > > On Thu, Apr 27, 2023 at 08:16:52AM +0100, Naushir Patuck via libcamera-devel wrote:\n> > > > > > Add a prefix parameter to IPAProxy::configurationFile(). This prefix is\n> > > > > > added to the search path when locating IPA configuration files in the\n> > > > > > system directories.\n> > > > > >\n> > > > > > For example, the system directories etc/libcamera/ipa/<prefix>/ and\n> > > > > > share/libcamera/ipa/<prefix>/ will be used to search for the IPA\n> > > > > > configuration files.\n> > > > > >\n> > > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > > ---\n> > > > > >  include/libcamera/internal/ipa_proxy.h |  3 ++-\n> > > > > >  src/libcamera/ipa_proxy.cpp            | 11 +++++++----\n> > > > > >  2 files changed, 9 insertions(+), 5 deletions(-)\n> > > > > >\n> > > > > > diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\n> > > > > > index 781c8b623605..9235b582edad 100644\n> > > > > > --- a/include/libcamera/internal/ipa_proxy.h\n> > > > > > +++ b/include/libcamera/internal/ipa_proxy.h\n> > > > > > @@ -31,7 +31,8 @@ public:\n> > > > > >\n> > > > > >       bool isValid() const { return valid_; }\n> > > > > >\n> > > > > > -     std::string configurationFile(const std::string &file) const;\n> > > > > > +     std::string configurationFile(const std::string &file,\n> > > > > > +                                   const std::string &prefix = \"\") const;\n> > > > > >\n> > > > > >  protected:\n> > > > > >       std::string resolvePath(const std::string &file) const;\n> > > > > > diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> > > > > > index 3f2cc6b89f60..4a27b0a993fa 100644\n> > > > > > --- a/src/libcamera/ipa_proxy.cpp\n> > > > > > +++ b/src/libcamera/ipa_proxy.cpp\n> > > > > > @@ -72,6 +72,7 @@ IPAProxy::~IPAProxy()\n> > > > > >  /**\n> > > > > >   * \\brief Retrieve the absolute path to an IPA configuration file\n> > > > > >   * \\param[in] name The configuration file name\n> > > > > > + * \\param[in] prefix The configuration directory prefix when searching system paths\n> > > > > >   *\n> > > > > >   * This function locates the configuration file for an IPA and returns its\n> > > > > >   * absolute path. It searches the following directories, in order:\n> > > > > > @@ -80,8 +81,8 @@ IPAProxy::~IPAProxy()\n> > > > > >   *   environment variable ; or\n> > > > > >   * - If libcamera is not installed, the src/ipa/ directory within the source\n> > > > > >   *   tree ; otherwise\n> > > > > > - * - The system sysconf (etc/libcamera/ipa) and the data (share/libcamera/ipa/)\n> > > > > > - *   directories.\n> > > > > > + * - The system sysconf (etc/libcamera/ipa/<prefix>/) and the data\n> > > > > > + *   (share/libcamera/ipa/<prefix>/) directories.\n> > > > >\n> > > > > Doxygen doesn't seem happy with <prefix>\n> > > > >\n> > > > > src/libcamera/ipa_proxy.cpp:83: warning: Unsupported xml/html tag <prefix> found\n> > > > > src/libcamera/ipa_proxy.cpp:84: warning: Unsupported xml/html tag <prefix> found\n> > > >\n> > > > Oops! Should I just use \"prefix\" instead?\n> > > >\n> > > > \"\"\n> > > >  The system sysconf (etc/libcamera/ipa/prefix/) and the data\n> > > >  (share/libcamera/ipa/prefix/) directories.\n> > > > \"\"\n> > >\n> > > Not sure it <> could be escaped with \\< and \\>\n> >\n> > Yes, it can!\n> >\n> > Annoyingly, I forgot that I fixed this very thing for\n> > PipelineHandler::configurationFile()\n> > some time back!\n> >\n> > I'll make the update.\n\nWhile at it, could you surround the paths with backticks ?\n\n * - If libcamera is not installed, the `src/ipa/` directory within the source\n *   tree ; otherwise\n * - The system sysconf (`etc/libcamera/ipa/\\<prefix\\>/`) and the data\n *   (`share/libcamera/ipa/\\<prefix\\>/`) directories.\n * - The system sysconf (`etc/libcamera/ipa`) and the data\n *   (`share/libcamera/ipa/`) directories.\n\n> > Given that there are a number of changes now, should I\n> > post a v2 with your tags collected?\n> >\n> > > > > >   *\n> > > > > >   * The system directories are not searched if libcamera is not installed.\n> > > > > >   *\n> > > > > > @@ -92,7 +93,8 @@ IPAProxy::~IPAProxy()\n> > > > > >   * \\return The full path to the IPA configuration file, or an empty string if\n> > > > > >   * no configuration file can be found\n> > > > > >   */\n> > > > > > -std::string IPAProxy::configurationFile(const std::string &name) const\n> > > > > > +std::string IPAProxy::configurationFile(const std::string &name,\n> > > > > > +                                     const std::string &prefix) const\n> > > > > >  {\n> > > > > >       struct stat statbuf;\n> > > > > >       int ret;\n> > > > > > @@ -139,7 +141,8 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n> > > > > >       } else {\n> > > > > >               /* Else look in the system locations. */\n> > > > > >               for (const auto &dir : utils::split(IPA_CONFIG_DIR, \":\")) {\n> > > > > > -                     std::string confPath = dir + \"/\" + ipaName + \"/\" + name;\n> > > > > > +                     std::string confPath = dir + \"/\" + prefix + \"/\" +\n> > > > > > +                                            ipaName + \"/\" + name;\n> > > > > >                       ret = stat(confPath.c_str(), &statbuf);\n> > > > > >                       if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)\n> > > > > >                               return confPath;","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 A39F0BDCBD\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 16:56:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id DD776627DF;\n\tThu, 27 Apr 2023 18:56:47 +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 3F503627B7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 18:56:47 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(133-32-181-51.west.xps.vectant.ne.jp [133.32.181.51])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 2A7A8C7E;\n\tThu, 27 Apr 2023 18:56:33 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682614607;\n\tbh=7uHq4PA1l/JnVQoqMGWoYNsgQDmuGiuPr/KSkgBVHqU=;\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=pogNozKzMt375XkWR2WC3A4uIDC7iBy8EKPH2feaFS727nSxQdeH/gB0kzVcy8II+\n\ty1RFbfFqN0k31tEW6rCpbXp9rb1VZEvPWV9ddyhvVpHd3BBy8jVAJ2+pdGH66UNfll\n\tR+A3fgOf0hlZY3nvfv4Zbgo/NSWRZ4KVAK7BjqnHKqa9DIoronQfQyI4gsMUuTVIsh\n\tEfE16A4p4JWY/OCCJDeP9WGyx+Xy7lF0Kc9zeIoovATPVw/IUaZjwjvEDx32Co//Y8\n\tfCIDul/usWz1H/trTaS3LKeF74yPr+JLJrqVAmbSFa+oAQO2RL4uLiXddn5pMooT07\n\tjMPS087WkLJaA==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1682614595;\n\tbh=7uHq4PA1l/JnVQoqMGWoYNsgQDmuGiuPr/KSkgBVHqU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=rvQU4wzpH2wojL6IH+y8+Xnnn3vzXJP94i6ZGvOUlV6nKA468X3OhUJpqzK6M7BVH\n\tCRIBdpghHbApwKaz01j45HQU9hg6tI0rAezp6Ii8Ko8thESOZm57jMMdsR9A7Bc+8g\n\tW61XN0pnaTMoNWq2Xm/dnoverffMAx/FAuy81he8="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"rvQU4wzp\"; dkim-atps=neutral","Date":"Thu, 27 Apr 2023 19:56:57 +0300","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Message-ID":"<20230427165657.GL2326@pendragon.ideasonboard.com>","References":"<20230426131057.21550-3-naush@raspberrypi.com>\n\t<20230427071652.25828-1-naush@raspberrypi.com>\n\t<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>\n\t<CAEmqJPqx5gB5g4abGQ3msHTGh=YiesOVV2QnyMMU7XXteQYWtA@mail.gmail.com>\n\t<oqljeymfkpkgvow2uz3ub52htugkjoditlhwo473rx5mafhbor@jk6frya6xpd7>\n\t<CAEmqJPorZS5HqZG+-YdUkMQskRpSZETd-QahHf+sfS1Xcj28nw@mail.gmail.com>\n\t<tmcv7grdjne42ussww3idgb7ywldaf3b7gmg2ew3bd7exl2k3v@57hvnwct3hje>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<tmcv7grdjne42ussww3idgb7ywldaf3b7gmg2ew3bd7exl2k3v@57hvnwct3hje>","Subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":26987,"web_url":"https://patchwork.libcamera.org/comment/26987/","msgid":"<CAEmqJPoN0cTzvb=BB-W-SpsqJPYR6jC=fwStxgpWLDxe-HhfzA@mail.gmail.com>","date":"2023-04-28T09:11:13","subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi,\n\nOn Thu, 27 Apr 2023 at 17:56, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hello,\n>\n> Naush, when sending a new version of a patch within a series, could you\n> include the patch sequence count (02/13 in this case) in the subject\n> line, as well a a version number (v1.1 in this case) ? That helps\n> tracking patches. The next version of this patch (unless you post a new\n> version of the whole series, which may be a good idea actually as you've\n> already collected quite a few changes) would be\n>\n> [PATCH v1.2 02/13] libcamera: ipa_proxy: Allow a prefix for the configuration file\n>\n> On Thu, Apr 27, 2023 at 01:03:25PM +0200, Jacopo Mondi via libcamera-devel wrote:\n> > On Thu, Apr 27, 2023 at 09:47:02AM +0100, Naushir Patuck via libcamera-devel wrote:\n> > > On Thu, 27 Apr 2023 at 09:28, Jacopo Mondi wrote:\n> > > >\n> > > > Naush,\n> > > >    what would be the implications of setting the IPA module name to\n> > > > \"rpi/vc4\" ? That would make this patch not needed, right ? Are there\n> > > > undesired implications ?\n> > >\n> > > I did try to do this, but sadly it does not work.\n> > > From https://git.libcamera.org/libcamera/libcamera.git/tree/src/libcamera/ipa_module.cpp#n303\n> > >\n> > > /* Validate the IPA module name. */\n> > > std::string ipaName = info_.name;\n> > > auto iter = std::find_if_not(ipaName.begin(), ipaName.end(),\n> > >      [](unsigned char c) -> bool {\n> > >      return isprint(c) && c != '/' &&\n> > >     c != '?' && c != '*' &&\n> > >     c != '\\\\';\n> > >      });\n> > > if (iter != ipaName.end()) {\n> > > LOG(IPAModule, Error)\n> > > << \"Invalid IPA module name '\" << ipaName << \"'\";\n> > > return -EINVAL;\n> > > }\n> > >\n> > > This bit of code complains if the name string has a \"/\" character.\n> >\n> > AH right. I wonder if we should reconsider that..\n> > For now, unless others are strongly in favour of changing this, let's\n> > leave it this way\n>\n> I do like the idea of handling all this automatically.\n>\n> The constraint on the IPA name comes from\n>\n> commit 6e1cd1394e5d73dfd4c4334cbf8beee79072de21\n> Author: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> Date:   Mon Apr 27 04:09:42 2020 +0300\n>\n>     ipa: Name IPA modules after their source directory\n>\n>     The IPAModuleInfo::name field is currently a free-formed string that has\n>     little use. Tighten its usage rules to make it suitable for building\n>     file system paths to IPA-specific resources by matching the directory\n>     name of the IPA module.\n>\n>     Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n>     Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>\n> The commit expanded the documentation of the IPAModuleInfo::name field\n> with\n>\n>  * The name may be used to build file system paths to IPA-specific resources.\n>  * It shall only contain printable characters, and may not contain '/', '*',\n>  * '?' or '\\'. For IPA modules included in libcamera, it shall match the\n>  * directory of the IPA module in the source tree.\n>\n> The reason for this is to make it safe(r) to build paths from the IPA\n> module name.\n>\n> I think we could lift the constraint that forbids the '/' character, and\n> instead forbid \"..\". That should be enough to avoid walking the file\n> system.\n>\n\nOk, I'll add a change to remove the \"/\" constraint and use \"rpi/vc4\" as the IPA\nname.  We can then remove this commit from the series.\n\nNaush\n\n\n> > > > On Thu, Apr 27, 2023 at 09:24:16AM +0100, Naushir Patuck wrote:\n> > > > > On Thu, 27 Apr 2023 at 09:10, Jacopo Mondi wrote:\n> > > > > > On Thu, Apr 27, 2023 at 08:16:52AM +0100, Naushir Patuck via libcamera-devel wrote:\n> > > > > > > Add a prefix parameter to IPAProxy::configurationFile(). This prefix is\n> > > > > > > added to the search path when locating IPA configuration files in the\n> > > > > > > system directories.\n> > > > > > >\n> > > > > > > For example, the system directories etc/libcamera/ipa/<prefix>/ and\n> > > > > > > share/libcamera/ipa/<prefix>/ will be used to search for the IPA\n> > > > > > > configuration files.\n> > > > > > >\n> > > > > > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > > > > > ---\n> > > > > > >  include/libcamera/internal/ipa_proxy.h |  3 ++-\n> > > > > > >  src/libcamera/ipa_proxy.cpp            | 11 +++++++----\n> > > > > > >  2 files changed, 9 insertions(+), 5 deletions(-)\n> > > > > > >\n> > > > > > > diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\n> > > > > > > index 781c8b623605..9235b582edad 100644\n> > > > > > > --- a/include/libcamera/internal/ipa_proxy.h\n> > > > > > > +++ b/include/libcamera/internal/ipa_proxy.h\n> > > > > > > @@ -31,7 +31,8 @@ public:\n> > > > > > >\n> > > > > > >       bool isValid() const { return valid_; }\n> > > > > > >\n> > > > > > > -     std::string configurationFile(const std::string &file) const;\n> > > > > > > +     std::string configurationFile(const std::string &file,\n> > > > > > > +                                   const std::string &prefix = \"\") const;\n> > > > > > >\n> > > > > > >  protected:\n> > > > > > >       std::string resolvePath(const std::string &file) const;\n> > > > > > > diff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\n> > > > > > > index 3f2cc6b89f60..4a27b0a993fa 100644\n> > > > > > > --- a/src/libcamera/ipa_proxy.cpp\n> > > > > > > +++ b/src/libcamera/ipa_proxy.cpp\n> > > > > > > @@ -72,6 +72,7 @@ IPAProxy::~IPAProxy()\n> > > > > > >  /**\n> > > > > > >   * \\brief Retrieve the absolute path to an IPA configuration file\n> > > > > > >   * \\param[in] name The configuration file name\n> > > > > > > + * \\param[in] prefix The configuration directory prefix when searching system paths\n> > > > > > >   *\n> > > > > > >   * This function locates the configuration file for an IPA and returns its\n> > > > > > >   * absolute path. It searches the following directories, in order:\n> > > > > > > @@ -80,8 +81,8 @@ IPAProxy::~IPAProxy()\n> > > > > > >   *   environment variable ; or\n> > > > > > >   * - If libcamera is not installed, the src/ipa/ directory within the source\n> > > > > > >   *   tree ; otherwise\n> > > > > > > - * - The system sysconf (etc/libcamera/ipa) and the data (share/libcamera/ipa/)\n> > > > > > > - *   directories.\n> > > > > > > + * - The system sysconf (etc/libcamera/ipa/<prefix>/) and the data\n> > > > > > > + *   (share/libcamera/ipa/<prefix>/) directories.\n> > > > > >\n> > > > > > Doxygen doesn't seem happy with <prefix>\n> > > > > >\n> > > > > > src/libcamera/ipa_proxy.cpp:83: warning: Unsupported xml/html tag <prefix> found\n> > > > > > src/libcamera/ipa_proxy.cpp:84: warning: Unsupported xml/html tag <prefix> found\n> > > > >\n> > > > > Oops! Should I just use \"prefix\" instead?\n> > > > >\n> > > > > \"\"\n> > > > >  The system sysconf (etc/libcamera/ipa/prefix/) and the data\n> > > > >  (share/libcamera/ipa/prefix/) directories.\n> > > > > \"\"\n> > > >\n> > > > Not sure it <> could be escaped with \\< and \\>\n> > >\n> > > Yes, it can!\n> > >\n> > > Annoyingly, I forgot that I fixed this very thing for\n> > > PipelineHandler::configurationFile()\n> > > some time back!\n> > >\n> > > I'll make the update.\n>\n> While at it, could you surround the paths with backticks ?\n>\n>  * - If libcamera is not installed, the `src/ipa/` directory within the source\n>  *   tree ; otherwise\n>  * - The system sysconf (`etc/libcamera/ipa/\\<prefix\\>/`) and the data\n>  *   (`share/libcamera/ipa/\\<prefix\\>/`) directories.\n>  * - The system sysconf (`etc/libcamera/ipa`) and the data\n>  *   (`share/libcamera/ipa/`) directories.\n>\n> > > Given that there are a number of changes now, should I\n> > > post a v2 with your tags collected?\n> > >\n> > > > > > >   *\n> > > > > > >   * The system directories are not searched if libcamera is not installed.\n> > > > > > >   *\n> > > > > > > @@ -92,7 +93,8 @@ IPAProxy::~IPAProxy()\n> > > > > > >   * \\return The full path to the IPA configuration file, or an empty string if\n> > > > > > >   * no configuration file can be found\n> > > > > > >   */\n> > > > > > > -std::string IPAProxy::configurationFile(const std::string &name) const\n> > > > > > > +std::string IPAProxy::configurationFile(const std::string &name,\n> > > > > > > +                                     const std::string &prefix) const\n> > > > > > >  {\n> > > > > > >       struct stat statbuf;\n> > > > > > >       int ret;\n> > > > > > > @@ -139,7 +141,8 @@ std::string IPAProxy::configurationFile(const std::string &name) const\n> > > > > > >       } else {\n> > > > > > >               /* Else look in the system locations. */\n> > > > > > >               for (const auto &dir : utils::split(IPA_CONFIG_DIR, \":\")) {\n> > > > > > > -                     std::string confPath = dir + \"/\" + ipaName + \"/\" + name;\n> > > > > > > +                     std::string confPath = dir + \"/\" + prefix + \"/\" +\n> > > > > > > +                                            ipaName + \"/\" + name;\n> > > > > > >                       ret = stat(confPath.c_str(), &statbuf);\n> > > > > > >                       if (ret == 0 && (statbuf.st_mode & S_IFMT) == S_IFREG)\n> > > > > > >                               return confPath;\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 EE11EC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 28 Apr 2023 09:11:23 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6A76F627DF;\n\tFri, 28 Apr 2023 11:11:23 +0200 (CEST)","from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com\n\t[IPv6:2607:f8b0:4864:20::b2e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 75CBC627CD\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Apr 2023 11:11:21 +0200 (CEST)","by mail-yb1-xb2e.google.com with SMTP id\n\t3f1490d57ef6-b9a6eec8611so7728009276.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 28 Apr 2023 02:11:21 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682673083;\n\tbh=b5UNMvfs68vUJuImFgxGZPP5SD2FYAiZPueD5CqVGhw=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=HrwCMifKAszZ3qiLmstKP5uagXFGu44Qq5yZPDbKHWrqvAxUa1W7PIFXH2cBREP0m\n\tKJKwpxnawzbJGnQUWJguP5gO7703V7WW3+rjMBP3qAY3LeZhgxsDeXFDAULjoNUsfw\n\t5J8OJ20KZ2wOZ7giCgCIQX2HOxQEZRv8LydRkTEuc7rQUDAVVlqbOU9WDrZGAQjj3D\n\tdl6IvL122bXwqlzaLWpZfrScdWnGQ15b89eQCeq766kV2PCFK6xVc3aBcVZ8fpm1EW\n\t9nOvqb1pQCKQMGxDTRd5Ih3ca5HCt+bJEwtU77NHg/spxEfY9VJhdv8dvwTzOEx0sG\n\tSI+mJWJqfZndQ==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1682673080; x=1685265080;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=KgmsFJ3MBvGZ+SWdcsaNUPS8Q3X0nCJIN+x4ZzrOX58=;\n\tb=YDwe9kuawZLCVEGHxJiXhfpqfmlOWOtjYmcBkOWHz940DZ1LoaSeOXb9/PgvY2yTCf\n\tjXk3nnLsB2kbzTDcmIf1sj54B2nNyFBBY0O8Di9yYDSjAhCko24NzjZxzTgIfVYMJcRW\n\t/kWdJ6y4fUtCC8fSL6yGCPdAGQVvW/v0ISkzuKZL52xmuQl/VbawmGm1qAtNUeb9STb2\n\t9Men+3cFwAlQ9kQvRUnq3mJ3nKEXWNEAf7znYYRAxW7smuBQ7Cvq8hg8FKBRBFmbkCc1\n\tIZXng78LoBXRw8EOUXsx3vtPRar1QxQS964xilbuivm5UfcJ0J/jCrrl8VwVIdbm4guF\n\t+A1A=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"YDwe9kua\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1682673080; x=1685265080;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=KgmsFJ3MBvGZ+SWdcsaNUPS8Q3X0nCJIN+x4ZzrOX58=;\n\tb=D+DX7PyDqZqrI8lnFJaXJple5Kc/VUnTvzFUoFhJuwkKOwwhS5E2GDKvlXIa875TJ3\n\tuDV1gdYNZBkiJT7tgfHxZUjafWkg0fHODAJXYqAnMeoEDN8aZsiAV34pe3KuZ6CWWped\n\t3RVLaAxAEJ5FFQr4zRlJrtpu65zNyBYzrYjVvTW9Nz80N6kI6T59iPLnOFbDH3Gx5ewi\n\tELZTVWkK3msCZaNCVH5UUycXe/EM1Z1i/h9VM9/aRz8yuUBGwFXn8YCFqsDdQLd3liFY\n\tL8s4iN7Br+Dnl5Yz3w62LOra3al3CpN+ZKv7tpqKyYNr/ioWl3GNRqb1KlVkgi7NoDds\n\tsZXg==","X-Gm-Message-State":"AC+VfDylFjp3xwSf+AdpLSb0t9b2d6iie6/eyhSdbv36OSl6BXAV1Tg3\n\tozNINL63eW39q57FicqfNLMYXqNGKhbefe0+3iYZXz9spWzDtoUhXEXY3A==","X-Google-Smtp-Source":"ACHHUZ59RjxIaifLrvPuBT45s/kBdORSfC96Vc4ALnqAYcCcMMRcph8YBhQREg3zGqyyCMaWXkOdNb5NYpXqYLQdDu4=","X-Received":"by 2002:a81:1b94:0:b0:54f:af2e:d7c1 with SMTP id\n\tb142-20020a811b94000000b0054faf2ed7c1mr6924462ywb.11.1682673080130;\n\tFri, 28 Apr 2023 02:11:20 -0700 (PDT)","MIME-Version":"1.0","References":"<20230426131057.21550-3-naush@raspberrypi.com>\n\t<20230427071652.25828-1-naush@raspberrypi.com>\n\t<xsuytyseuycbi5uh72ulhddfur7n4o4qd6xd7duewdxddl3s3f@ugzcjnrdsjq4>\n\t<CAEmqJPqx5gB5g4abGQ3msHTGh=YiesOVV2QnyMMU7XXteQYWtA@mail.gmail.com>\n\t<oqljeymfkpkgvow2uz3ub52htugkjoditlhwo473rx5mafhbor@jk6frya6xpd7>\n\t<CAEmqJPorZS5HqZG+-YdUkMQskRpSZETd-QahHf+sfS1Xcj28nw@mail.gmail.com>\n\t<tmcv7grdjne42ussww3idgb7ywldaf3b7gmg2ew3bd7exl2k3v@57hvnwct3hje>\n\t<20230427165657.GL2326@pendragon.ideasonboard.com>","In-Reply-To":"<20230427165657.GL2326@pendragon.ideasonboard.com>","Date":"Fri, 28 Apr 2023 10:11:13 +0100","Message-ID":"<CAEmqJPoN0cTzvb=BB-W-SpsqJPYR6jC=fwStxgpWLDxe-HhfzA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix\n\tfor the configuration file","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]