Patch Detail
Show a patch.
GET /api/1.1/patches/14502/?format=api
{ "id": 14502, "url": "https://patchwork.libcamera.org/api/1.1/patches/14502/?format=api", "web_url": "https://patchwork.libcamera.org/patch/14502/", "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": "<20211014115951.2996808-2-naush@raspberrypi.com>", "date": "2021-10-14T11:59:50", "name": "[libcamera-devel,v4,1/2] utils: gen-version: Pass the meson source root to the gen-version.sh script", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "2b65a73d1d43668400a43becf067c4adf6cd5b8d", "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/14502/mbox/", "series": [ { "id": 2627, "url": "https://patchwork.libcamera.org/api/1.1/series/2627/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2627", "date": "2021-10-14T11:59:49", "name": "Preserve SHA1 versioning", "version": 4, "mbox": "https://patchwork.libcamera.org/series/2627/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/14502/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/14502/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 E848DBDB1C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 9 Nov 2021 17:50:33 +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 66D5FDEE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 9 Nov 2021 18:50:33 +0100 (CET)", "from perceval.ideasonboard.com\n\tby perceval.ideasonboard.com with LMTP id SKK/Bb4baGF+RgAA4E0KoQ\n\t(envelope-from <libcamera-devel-bounces@lists.libcamera.org>)\n\tfor <kbingham@ideasonboard.com>; Thu, 14 Oct 2021 13:59:58 +0200", "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\tby perceval.ideasonboard.com (Postfix) with ESMTPS\n\tid 02A581B48;\tThu, 14 Oct 2021 13:59:58 +0200 (CEST)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D1B4968541;\n\tThu, 14 Oct 2021 13:59:56 +0200 (CEST)", "from mail-wr1-x433.google.com (mail-wr1-x433.google.com\n\t[IPv6:2a00:1450:4864:20::433])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 0153268541\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Oct 2021 13:59:55 +0200 (CEST)", "by mail-wr1-x433.google.com with SMTP id v17so18613254wrv.9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 14 Oct 2021 04:59:54 -0700 (PDT)", "from naush-laptop.pitowers.org\n\t([2a00:1098:3142:14:26af:fb8f:5d03:5eab])\n\tby smtp.gmail.com with ESMTPSA id\n\ty191sm8658324wmc.36.2021.10.14.04.59.53\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tThu, 14 Oct 2021 04:59:53 -0700 (PDT)" ], "Authentication-Results": [ "perceval.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"ZVbxWenQ\"; dkim-atps=neutral", "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature\n\tverification failed\" (2048-bit key;\n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com header.b=\"ZVbxWenQ\";\tdkim-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=yP+LjnWU25B8Je3bqKbsTJp/P9y+WFJYKaiWQO8fOnc=;\n\tb=ZVbxWenQyqzSGgxChSKHG2aopBP/p9rN4Y/xB6BetTnv8mpR6rhxkNP7WTuMi0yZfe\n\tubyEUFnnrZvAuORPMAKh/STvsKbTIsKr3mb4Gy6XvRbxts03WoElfvE97grzJ8ZVBibE\n\trT9I/sENUPr5/XS5mLKJleu2f6wbhQ6WhhdGDEKz8y0rDSlRJgbZ8b8y1D0uJvkjeGkN\n\tg2rLdMg14k8tXbvKUAFNwikoZ6QMVRwMe7lXxvy4f8I6+BUTv2zm0+RGnLRnWr7CHuz7\n\tKkmTrBOV05VU/McQe1H9lFJttIZ2UCyd49CLn55lbaIOtut8RWgKCCHDLeOwUS02UiMe\n\tQrow==", "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=yP+LjnWU25B8Je3bqKbsTJp/P9y+WFJYKaiWQO8fOnc=;\n\tb=7OAXZNuHdarvizsmwh5kiM4pt0r6j79wxF6c3q6g8WzsqSNS/KU1GPD57To+tTQaBo\n\tXoRZU8PGv3OamjS1x90804sZzVpMgV1JHOXbyJV4h8bfBBtaqWrX0ZSADh//4AHjy2gp\n\tKwUdIViOCsvDFEAgDoV/eXKZ7ov0h98q+EIVnEg5qjlEjHq2JUl5bTs9Pco8XUq1Y0Go\n\tmo6DAzlPuerai3+D+Gzftu5Lvg7tV3yg+NHlokfUwcDur2WTHz0kzDXSi7JttOKD0yZa\n\tYgHxdRGYllzK8XCnqNOJlTbA6go1KiXcuEddXBgr1i1efNAutWK5ZkK5SRJxLz6IELs4\n\tkFYw==", "X-Gm-Message-State": "AOAM532XfSZwBJEn4jiY7wRxfnwbaRIUQUnmq9P7M99Rab1PG6T8pn3a\n\t/1Pb2rMkd64KG2Qu+Q7+RkaVulaLQZBY65pN", "X-Google-Smtp-Source": "=?utf-8?q?ABdhPJyQlwEORyqZqzls+MnEtUFzh37wpOtsryHYS?=\n\t=?utf-8?q?j2CBE6+58J3XPqdkqmAKgGSMcmRi/UIgdVFcg=3D=3D?=", "X-Received": "by 2002:a1c:3b44:: with SMTP id\n\ti65mr5326339wma.161.1634212794449; \n\tThu, 14 Oct 2021 04:59:54 -0700 (PDT)", "From": "Naushir Patuck <naush@raspberrypi.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Thu, 14 Oct 2021 12:59:50 +0100", "Message-Id": "<20211014115951.2996808-2-naush@raspberrypi.com>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20211014115951.2996808-1-naush@raspberrypi.com>", "References": "<20211014115951.2996808-1-naush@raspberrypi.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Subject": "[libcamera-devel] [PATCH v4 1/2] utils: gen-version: Pass the meson\n\tsource root to the gen-version.sh script", "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>", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>", "X-TUID": "MolLis3raJyb", "Resent-From": "Kieran Bingham <kieran.bingham@ideasonboard.com>", "Resent-To": "parsemail@patchwork.libcamera.org" }, "content": "The gen-version.sh script expects to be called from a git repo, and sets its\nsrc_root variable accordingly. This may not always be the case if it is built\nfrom a tarball source - full support for which is in a future commit.\n\nThe MESON_SOURCE_ROOT environnement variable does not get set when called from\nthe meson vcs_tag() function, but does when called from the run_command()\nfunction, so that cannot be used either.\n\nInstead, explicitly pass the meson source root to the gen-version.sh script.\n\nSigned-off-by: Naushir Patuck <naush@raspberrypi.com>\n---\n meson.build | 3 ++-\n src/libcamera/meson.build | 2 +-\n utils/gen-version.sh | 4 ++--\n 3 files changed, 5 insertions(+), 4 deletions(-)", "diff": "diff --git a/meson.build b/meson.build\nindex a49c484fe64e..556a3f7c42f8 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -17,7 +17,8 @@ project('libcamera', 'c', 'cpp',\n # git version tag, the build metadata (e.g. +211-c94a24f4) is omitted from\n # libcamera_git_version.\n libcamera_git_version = run_command('utils/gen-version.sh',\n- meson.build_root()).stdout().strip()\n+ meson.build_root(),\n+ meson.source_root()).stdout().strip()\n if libcamera_git_version == ''\n libcamera_git_version = meson.project_version()\n endif\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 243dd3c180eb..d8dd8344002c 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -95,7 +95,7 @@ libcamera_sources += control_sources\n \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(), meson.source_root()],\n input : 'version.cpp.in',\n output : 'version.cpp',\n fallback : meson.project_version())\ndiff --git a/utils/gen-version.sh b/utils/gen-version.sh\nindex b09ad495f86a..da191691a7c5 100755\n--- a/utils/gen-version.sh\n+++ b/utils/gen-version.sh\n@@ -4,10 +4,10 @@\n # Generate a version string using git describe\n \n build_dir=\"$1\"\n+src_dir=\"$2\"\n \n # Bail out if the directory isn't under git control\n-src_dir=$(git rev-parse --git-dir 2>&1) || exit 1\n-src_dir=$(readlink -f \"$src_dir/..\")\n+git rev-parse --git-dir > /dev/null 2>&1 || exit 1\n \n # Get a short description from the tree.\n version=$(git describe --abbrev=8 --match \"v[0-9]*\" 2>/dev/null)\n", "prefixes": [ "libcamera-devel", "v4", "1/2" ] }