Patch Detail
Show a patch.
GET /api/1.1/patches/14494/?format=api
{ "id": 14494, "url": "https://patchwork.libcamera.org/api/1.1/patches/14494/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14494/", "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": "<20211012152410.978077-3-naush@raspberrypi.com>", "date": "2021-10-12T15:24:10", "name": "[RFC,2/2] build: Add a \"version_sha\" meson build option", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "ff5632b44ddf2292ee2b1e00353b0a3dc5c44697", "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/14494/mbox/", "series": [ { "id": 2618, "url": "https://patchwork.libcamera.org/api/1.1/series/2618/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2618", "date": "2021-10-12T15:24:08", "name": "Add new build option to override generate SHA", "version": 1, "mbox": "https://patchwork.libcamera.org/series/2618/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14494/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14494/checks/", "tags": {}, "headers": { "Return-Path": "<kieran.bingham@ideasonboard.com>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": [ "parsemail@patchwork.libcamera.org", "kbingham@ideasonboard.com" ], "Received": [ "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 875C0BDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 9 Nov 2021 17:41:34 +0000 (UTC)", "from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net\n\t[86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 15BB3501\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 9 Nov 2021 18:41:34 +0100 (CET)", "from perceval.ideasonboard.com\n\tby perceval.ideasonboard.com with LMTP id ODQgHq2oZWFYVgAA4E0KoQ\n\t(envelope-from <naush@raspberrypi.com>)\n\tfor <kbingham@ideasonboard.com>; Tue, 12 Oct 2021 17:24:29 +0200", "from mail-wr1-x435.google.com (mail-wr1-x435.google.com\n\t[IPv6:2a00:1450:4864:20::435])\tby perceval.ideasonboard.com (Postfix)\n\twith ESMTPS id 6BFABF1\tfor <kieran.bingham@ideasonboard.com>;\n\tTue, 12 Oct 2021 17:24:29 +0200 (CEST)", "by mail-wr1-x435.google.com with SMTP id e3so34423451wrc.11 \n\tfor <kieran.bingham@ideasonboard.com>;\n\tTue, 12 Oct 2021 08:24:29 -0700 (PDT)", "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:26ae:314c:5c3f:f0df]) by smtp.gmail.com with\n\tESMTPSA id s14sm10683449wro.76.2021.10.12.08.24.27 (version=TLS1_3\n\tcipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Oct 2021 08:24:27\n\t-0700 (PDT)" ], "Authentication-Results": "perceval.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"LpaRqYxk\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references\n\t:mime-version:content-transfer-encoding;\n\tbh=V75kjcsLywmMW/LLmyT1n9vuBzmEicER1Wde/5MtUvI=;\n\tb=LpaRqYxkWMdCIQBlZgwHO2IAP8C3Mvf+Y//SwgOX80Rhp9zvblScgHQgYQ2Fzc/lcG\n\tLOC62hezRSf8gdUlIbg88vqakRk4iXuXbwJsmWdJgUiymomdxBIytCfjyIXiNVqB1Y4J\n\t9DmCaNL1R37yLuC2tJGHJgQBDJ9EkvydeqUlrv6NWPTi/oyt9ZFEyqKdKWLnDNNSwIRH\n\t7pVyv0gbybmj3Se75DU+EOxYm8DUCxs/D/K2/xqUJg5dbYN9o9zl8Ks4wT828nkHOwmm\n\tD1HnqehyPKJF6mqWaVNMmQaDtmW8cGk5Yt4NxSzrWK2PiS75TV1VzQ53LiOGGjHNLRrw\n\t1hbA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references:mime-version:content-transfer-encoding;\n\tbh=V75kjcsLywmMW/LLmyT1n9vuBzmEicER1Wde/5MtUvI=;\n\tb=lNEav0Z29pS9GW8ZitjwDhxEd6RdKeivgAhbW7jIaP11f4oSYt2r5Z2tzXe3ECE/rA\n\ti41/62RzUbya4/t2qsijBfG2z7vsucI5N+WGJ8axUe7wlUJGtuRocZ/4E/P8g6BHcYBZ\n\tpN0lb7SZ0cHJKe3bzfT4MVkC0aVzXxvQT1kVXVtw47Dy+iuh3ywc7NBjv6F1UOSLL6wk\n\tq8jurmk4fWyhrijk+5EunR4xIWCMKgUbfw+ewjeHcafpQbk0HBPO4S+hdLfj6TwOyEmO\n\tnkSJJZPrrVDpvFw0LFItE+e3mVmt1HGpWbhcAKH6hKsdmxsG3U/UxGsHLLIWNQKZ3tbM\n\tepyQ==", "X-Gm-Message-State": "AOAM533en5TItUrj3+zCNe7QwsCrRMGSD6ZXR9Zih3NJ345VtslBfPfl\n\twqDGIR/YCZEsOioPFYEiNjEs3A==", "X-Google-Smtp-Source": "=?utf-8?q?ABdhPJzHu6qDT69tJ5wu131nKYkarqVUeg89Cn+Ug?=\n\t=?utf-8?q?0RR4P08IadY9RY9xOl5GI+KYaYG815hhPJQ5Q=3D=3D?=", "X-Received": "by 2002:a05:600c:4ed3:: with SMTP id\n\tg19mr6325005wmq.16.1634052269019; Tue, 12 Oct 2021 08:24:29 -0700\n\t(PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Cc": "Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>", "Subject": "[RFC 2/2] build: Add a \"version_sha\" meson build option", "Date": "Tue, 12 Oct 2021 16:24:10 +0100", "Message-Id": "<20211012152410.978077-3-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211012152410.978077-1-naush@raspberrypi.com>", "References": "<20211012152410.978077-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "X-TUID": "ExgVzqdk8IW0", "Resent-From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "Resent-To": "parsemail@patchwork.libcamera.org" }, "content": "This build option can be used to override the SHA value in the version string\ngenerated by utils/gen-version.sh.\n\nAn override is needed if distributions make libcamera builds outside of the\nupstream git tree. In these cases, the user can then use the correct SHA value\nof the upstream tree instead of the local downstream build tree.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n meson.build | 4 +++-\n meson_options.txt | 5 +++++\n src/libcamera/meson.build | 3 ++-\n 3 files changed, 10 insertions(+), 2 deletions(-)", "diff": "diff --git a/meson.build b/meson.build\nindex a49c484fe64e..cea6ca78cfa0 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -16,8 +16,10 @@ project('libcamera', 'c', 'cpp',\n # only. If the source tree isn't under git control, or if it matches the last\n # git version tag, the build metadata (e.g. +211-c94a24f4) is omitted from\n # libcamera_git_version.\n+version_sha_override = get_option('version_sha')\n libcamera_git_version = run_command('utils/gen-version.sh',\n- meson.build_root()).stdout().strip()\n+ meson.build_root(),\n+ version_sha_override).stdout().strip()\n if libcamera_git_version == ''\n libcamera_git_version = meson.project_version()\n endif\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 2c80ad8b5e0b..96db8de4cdeb 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -58,3 +58,8 @@ option('v4l2',\n type : 'boolean',\n value : false,\n description : 'Compile the V4L2 compatibility layer')\n+\n+option('version_sha',\n+ type : 'string',\n+ value : '',\n+ description : 'Custom version sha string to use')\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 243dd3c180eb..94cded2ce6c3 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -93,9 +93,10 @@ endforeach\n \n libcamera_sources += control_sources\n \n+version_sha_override = get_option('version_sha')\n gen_version = meson.source_root() / 'utils' / 'gen-version.sh'\n \n-version_cpp = vcs_tag(command : [gen_version, meson.build_root()],\n+version_cpp = vcs_tag(command : [gen_version, meson.build_root(), version_sha_override],\n input : 'version.cpp.in',\n output : 'version.cpp',\n fallback : meson.project_version())\n", "prefixes": [ "RFC", "2/2" ] }