Patch Detail
Show a patch.
GET /api/1.1/patches/18562/?format=api
{ "id": 18562, "url": "https://patchwork.libcamera.org/api/1.1/patches/18562/?format=api", "web_url": "https://patchwork.libcamera.org/patch/18562/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/1.1/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20230427071652.25828-1-naush@raspberrypi.com>", "date": "2023-04-27T07:16:52", "name": "[libcamera-devel] libcamera: ipa_proxy: Allow a prefix for the configuration file", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "2260c857c4c83d993d3d10808f66e94b697bc87b", "submitter": { "id": 34, "url": "https://patchwork.libcamera.org/api/1.1/people/34/?format=api", "name": "Naushir Patuck", "email": "naush@raspberrypi.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/18562/mbox/", "series": [ { "id": 3848, "url": "https://patchwork.libcamera.org/api/1.1/series/3848/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=3848", "date": "2023-04-27T07:16:52", "name": "[libcamera-devel] libcamera: ipa_proxy: Allow a prefix for the configuration file", "version": 1, "mbox": "https://patchwork.libcamera.org/series/3848/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/18562/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/18562/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 08EDFC0DA4\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 Apr 2023 07:18:26 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6BA1C627D1;\n\tThu, 27 Apr 2023 09:18:25 +0200 (CEST)", "from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com\n\t[IPv6:2a00:1450:4864:20::32f])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 2E8C4627D1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 09:18:23 +0200 (CEST)", "by mail-wm1-x32f.google.com with SMTP id\n\t5b1f17b1804b1-3f18dacd392so50050715e9.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 Apr 2023 00:18:23 -0700 (PDT)", "from localhost.localdomain ([93.93.133.154])\n\tby smtp.gmail.com with ESMTPSA id\n\tc21-20020a7bc855000000b003f17300c7dcsm20136106wml.48.2023.04.27.00.18.20\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 27 Apr 2023 00:18:20 -0700 (PDT)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1682579905;\n\tbh=uB+BRb7BNK8OtUAotNtK7xOG1y07NAFCHW6mk6pmA0w=;\n\th=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=yUqAP3ciaeDwBp2R2Dh4QqfODDXhTJMAhVhKzlD4iiFH46h04iQmlDnjxHaUzTggp\n\tDu1zfT+U+/I5aLS4eGKHchehdvGrDg4BAPNsZBOsC+d3vp221CmyQiaWrGb4z/I7Kx\n\tgyVcEMAYZAPLVt9ACcVDtHV6GGfVDsICeV+iB/1hQ9NJ/KAYlYiN4Ktkf/JOEt0hbP\n\tC/B07qYQI4ZucnSqV54ELcI1rimb+SpnrpwFTflAd0Ghp+AkKrFdoxWzOnZkrAkgJ0\n\talggTd/JJ/HxmhYDmqr8ZeGB0Cjcm8rY8HGGMmxGXfa6Q47IOyjCuIG2wn0zZ+0Sgc\n\tSidBfRvOBhOVg==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1682579902; x=1685171902;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=d8D8b8rfewMtDh0RzsnJyjugoTZZ5Fj+dvSSJkOoOWM=;\n\tb=dDW1q+PxXzN57ATsoYXjh4l5PrlggtrzwZhApbHqqOdleR+SbcUnSHOvG3rk9VV5Fb\n\tTjskboYtHEN3Jm/0YxZXKtdt6a/yagSG8nNRDNoggwm4t5sPgyj/wOGdnmSeEb5boRtF\n\tUGsHGn7KBpzC/qFYdVwaaYL2Za9+5lMVXB0JM5nm9UUWYGhtfMO3HIfVnk+Lx5EB4zx0\n\tXfA6HPcDnDM6X/PJASZPFbzWkcN2JJwsfkdZEoJAHWjx0XWQZDDDmk+eckCBmDKT6D32\n\t8TsA0Tdb+9Q+toAwyxs+vFInwtIYsSRoC9etkbnYE4KiZsPXSnDngkYQu+5duw5KGnSL\n\tw4tA==" ], "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"dDW1q+Px\"; dkim-atps=neutral", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20221208; t=1682579902; x=1685171902;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc\n\t:subject:date:message-id:reply-to;\n\tbh=d8D8b8rfewMtDh0RzsnJyjugoTZZ5Fj+dvSSJkOoOWM=;\n\tb=EIE2pIUdhT3CINRpRX+rrO401qPkwVb7xTbX+LbkGWXH+WWB9LXGjKCCD0FgmeJf6k\n\tGxyEz0lMpCVRWoJamZKnjEHCI442FkhvDwzAZZ982JfhWFAxaAXgCOIUYfHBp/95alrp\n\t2QvigYM0HTFbwv+CWqRQJcpCFuq4ycDsUfMAiiGghn7OLQG7pLSsztWCgEMPcT0+022T\n\tcRm+jEJtoXuJMqj9FAzzSI75HHSiOh+w4Tkr+6Xt1JnsOLvkUisUwurPi6DqfH7V5nYf\n\tjFDul03GSWcsR7cM+jvkQ1Y5aA0eEfHPmaBXeGUQ/GnYIie9wiBgeyHHhXmLYhDrbEX8\n\thcJw==", "X-Gm-Message-State": "AC+VfDw7xh9oz7nkeKlnVfKdU2cRa7ogcriJVtUqNWNEBTQWpJf9THLU\n\tMHVswPqjp8vI+HYj9D+EJIGG+NZC3Wy0m8UwHaMgXw==", "X-Google-Smtp-Source": "ACHHUZ6aT3FuDmIGffs8dQ3qrUfGFuV6XVshRfxiyrTfR3akNPLQFIyw6hwnYO8UJvx/u+Ae84XiZA==", "X-Received": "by 2002:a7b:cbd5:0:b0:3f0:8108:406 with SMTP id\n\tn21-20020a7bcbd5000000b003f081080406mr595676wmi.28.1682579901721; \n\tThu, 27 Apr 2023 00:18:21 -0700 (PDT)", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 27 Apr 2023 08:16:52 +0100", "Message-Id": "<20230427071652.25828-1-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20230426131057.21550-3-naush@raspberrypi.com>", "References": "<20230426131057.21550-3-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH] libcamera: ipa_proxy: Allow a prefix for\n\tthe 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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Add a prefix parameter to IPAProxy::configurationFile(). This prefix is\nadded to the search path when locating IPA configuration files in the\nsystem directories.\n\nFor example, the system directories etc/libcamera/ipa/<prefix>/ and\nshare/libcamera/ipa/<prefix>/ will be used to search for the IPA\nconfiguration files.\n\nSigned-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(-)", "diff": "diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h\nindex 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;\ndiff --git a/src/libcamera/ipa_proxy.cpp b/src/libcamera/ipa_proxy.cpp\nindex 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 * 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", "prefixes": [ "libcamera-devel" ] }