Show a patch.

GET /api/patches/9242/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 9242,
    "url": "https://patchwork.libcamera.org/api/patches/9242/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/9242/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/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": "<20200805184738.2478292-1-niklas.soderlund@ragnatech.se>",
    "date": "2020-08-05T18:47:38",
    "name": "[libcamera-devel,v2] libcamera: Add build time to version string for dirty builds",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "4bc0f1cfb7d666d16e8ee69ce97a04ca85bd58a7",
    "submitter": {
        "id": 5,
        "url": "https://patchwork.libcamera.org/api/people/5/?format=api",
        "name": "Niklas Söderlund",
        "email": "niklas.soderlund@ragnatech.se"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/9242/mbox/",
    "series": [
        {
            "id": 1200,
            "url": "https://patchwork.libcamera.org/api/series/1200/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1200",
            "date": "2020-08-05T18:47:38",
            "name": "[libcamera-devel,v2] libcamera: Add build time to version string for dirty builds",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/1200/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/9242/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/9242/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 1356BBD86F\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  5 Aug 2020 18:47:55 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A59D46059F;\n\tWed,  5 Aug 2020 20:47:54 +0200 (CEST)",
            "from bin-mail-out-06.binero.net (bin-mail-out-06.binero.net\n\t[195.74.38.229])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DA7846039D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  5 Aug 2020 20:47:52 +0200 (CEST)",
            "from bismarck.berto.se (p54ac52a8.dip0.t-ipconnect.de\n\t[84.172.82.168]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA\n\tid 26db7f47-d74c-11ea-92dc-005056917a89;\n\tWed, 05 Aug 2020 20:47:51 +0200 (CEST)"
        ],
        "X-Halon-ID": "26db7f47-d74c-11ea-92dc-005056917a89",
        "Authorized-sender": "niklas@soderlund.pp.se",
        "From": "=?utf-8?q?Niklas_S=C3=B6derlund?= <niklas.soderlund@ragnatech.se>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Wed,  5 Aug 2020 20:47:38 +0200",
        "Message-Id": "<20200805184738.2478292-1-niklas.soderlund@ragnatech.se>",
        "X-Mailer": "git-send-email 2.28.0",
        "MIME-Version": "1.0",
        "Subject": "[libcamera-devel] [PATCH v2] libcamera: Add build time to version\n\tstring for dirty builds",
        "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>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "Having the build time in the version string is useful when building from\na dirty worktree and deploying to targets as a quick way to identify the\nbinary have been deployed successfully.\n\nBefore this change the version string is reported as\n\n    libcamera v0.0.0+1692-aaff196a-dirty\n\nWhile with this change the version string is reported as\n\n    libcamera v0.0.0+1692-aaff196a-dirty 2020-08-05T12:55:11+00:00\n\nSigned-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n---\n utils/gen-version.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)",
    "diff": "diff --git a/utils/gen-version.sh b/utils/gen-version.sh\nindex 7f7872ceba7b038a..7536429c25bf3f18 100755\n--- a/utils/gen-version.sh\n+++ b/utils/gen-version.sh\n@@ -26,7 +26,7 @@ if [ -z \"$build_dir\" ] || (echo \"$build_dir\" | grep -q \"$src_dir\")\n then\n \tgit update-index --refresh > /dev/null 2>&1\n fi\n-git diff-index --quiet HEAD || version=\"$version-dirty\"\n+git diff-index --quiet HEAD || version=\"$version-dirty $(date --iso-8601=seconds --utc)\"\n \n # Replace first '-' with a '+' to denote build metadata, strip the 'g' in from\n # of the git SHA1 and remove the initial 'v'.\n",
    "prefixes": [
        "libcamera-devel",
        "v2"
    ]
}