get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 624190,
    "url": "http://patchwork.ozlabs.org/api/patches/624190/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openwrt/patch/1463682077-19339-19-git-send-email-sven.eckelmann@open-mesh.com/",
    "project": {
        "id": 45,
        "url": "http://patchwork.ozlabs.org/api/projects/45/?format=api",
        "name": "OpenWrt development",
        "link_name": "openwrt",
        "list_id": "openwrt-devel.lists.openwrt.org",
        "list_email": "openwrt-devel@lists.openwrt.org",
        "web_url": "http://openwrt.org/",
        "scm_url": "git://git.openwrt.org/openwrt.git",
        "webscm_url": "https://dev.openwrt.org/browser",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<1463682077-19339-19-git-send-email-sven.eckelmann@open-mesh.com>",
    "list_archive_url": null,
    "date": "2016-05-19T18:21:02",
    "name": "[OpenWrt-Devel,CC,19/34] scripts/om-fwupgradecfg-gen.sh: Generate sha256sum for uboot verification",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "1a71128de825f2222a3db6e0df9f68539f4c0401",
    "submitter": {
        "id": 68437,
        "url": "http://patchwork.ozlabs.org/api/people/68437/?format=api",
        "name": "Sven Eckelmann",
        "email": "sven.eckelmann@open-mesh.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openwrt/patch/1463682077-19339-19-git-send-email-sven.eckelmann@open-mesh.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/624190/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/624190/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<openwrt-devel-bounces@lists.openwrt.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Received": [
            "from arrakis.dune.hu (caladan.dune.hu [78.24.191.180])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3r9fh45GlCz9sdg\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 20 May 2016 04:28:04 +1000 (AEST)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id 9598EB92071;\n\tThu, 19 May 2016 20:22:49 +0200 (CEST)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP;\n\tThu, 19 May 2016 20:22:49 +0200 (CEST)",
            "from arrakis.dune.hu (localhost [127.0.0.1])\n\tby arrakis.dune.hu (Postfix) with ESMTP id AF9CAB91FDE\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tThu, 19 May 2016 20:22:03 +0200 (CEST)",
            "from mail-wm0-f48.google.com (mail-wm0-f48.google.com\n\t[74.125.82.48]) by arrakis.dune.hu (Postfix) with ESMTPS\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tThu, 19 May 2016 20:22:03 +0200 (CEST)",
            "by mail-wm0-f48.google.com with SMTP id n129so48257956wmn.1\n\tfor <openwrt-devel@lists.openwrt.org>;\n\tThu, 19 May 2016 11:22:03 -0700 (PDT)",
            "from sven-desktop.home.narfation.org\n\t(p579E6DC9.dip0.t-ipconnect.de. [87.158.109.201])\n\tby smtp.gmail.com with ESMTPSA id\n\tcz3sm15686742wjb.14.2016.05.19.11.22.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 19 May 2016 11:22:02 -0700 (PDT)"
        ],
        "Authentication-Results": "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=open-mesh-com.20150623.gappssmtp.com\n\theader.i=@open-mesh-com.20150623.gappssmtp.com\n\theader.b=mR59DQvi; dkim-atps=neutral",
        "X-Spam-Checker-Version": "SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.1",
        "X-policyd-weight": "using cached result; rate:hard: -7",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=open-mesh-com.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=07Kaf7JARvy5DJqX/No3sn4OVxHlPYuXjl7dM2Si2IE=;\n\tb=mR59DQvi4JxO+d+e67E5Bgo1TLqs+EEAy2ENYAiRW1GNH1XfjUGu8XDluClufxlfi3\n\t059UBiJe3y4NSOBSw+R8KZaZUnhLqpuOLH8rNcvd39xXbLAYUgjGrgDJwmDMBxGPwOZB\n\th+5gme5DPK+5bHFoi3sOeGC5QnrcDqTVPyG6dLZE8n8LyYEpF/0vVAGmvFY+5bzCGyaw\n\tvvK8S7XcKDC/PVKwaT5YMRT7aJvh0q8AoCPzsvgXovwy35uSKAqh79epi8B1V4fb1WRA\n\tUQzrM7IrEPQSHno4wyyZNx5xYhhPVjrMZBtcg+qXlxJYr5g5RcC4yY7ky+gxnd/1qBdT\n\twiAw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20130820;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=07Kaf7JARvy5DJqX/No3sn4OVxHlPYuXjl7dM2Si2IE=;\n\tb=OvZ/MX0CPiLzXZJ/GnZpMNZBbfeYOyQzHI4QX2bQqX63SjkRXxF1NVQiLex6MebJGQ\n\tUp/OCccJVTEGK6D6uXwCMEvXOyoWZyYeIWIPuJ1FqBIC2AXAhR5Q4Oj1Gfglc17KHhcM\n\tucEiP4/bLxVus2FRGYizy1fgX/hVAo+/jrx8uj63I/uy0OoLjouBbtESsGDr96dRi6wO\n\tzSGLKXOrtZ24H87lsV+tnJcRey7m0dwSd/h3Xx2SPpF3OkRnR/TdpUr7sicwCpzTTbQ9\n\tAi4wrPQCzTivfbFiFAqUI6WsF3wege/AYb75yZkgTe669JuaNRy5dZiq+o1V4gMJxF90\n\t8+4w==",
        "X-Gm-Message-State": "AOPr4FX48vJRojFNoJpFRNvEYL4qjsxYyosz5G3Hcf7kq4ge/Gf0qYaj86puh4bcJHjXZMRh",
        "X-Received": "by 10.28.194.69 with SMTP id s66mr38659292wmf.87.1463682123252; \n\tThu, 19 May 2016 11:22:03 -0700 (PDT)",
        "From": "Sven Eckelmann <sven.eckelmann@open-mesh.com>",
        "To": "openwrt-devel@lists.openwrt.org",
        "Date": "Thu, 19 May 2016 20:21:02 +0200",
        "Message-Id": "<1463682077-19339-19-git-send-email-sven.eckelmann@open-mesh.com>",
        "X-Mailer": "git-send-email 2.8.1",
        "In-Reply-To": "<1463682077-19339-1-git-send-email-sven.eckelmann@open-mesh.com>",
        "References": "<1463682077-19339-1-git-send-email-sven.eckelmann@open-mesh.com>",
        "Subject": "[OpenWrt-Devel] [PATCH CC 19/34] scripts/om-fwupgradecfg-gen.sh:\n\tGenerate sha256sum for uboot verification",
        "X-BeenThere": "openwrt-devel@lists.openwrt.org",
        "X-Mailman-Version": "2.1.20",
        "Precedence": "list",
        "List-Id": "OpenWrt Development List <openwrt-devel.lists.openwrt.org>",
        "List-Unsubscribe": "<https://lists.openwrt.org/cgi-bin/mailman/options/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.openwrt.org/pipermail/openwrt-devel/>",
        "List-Post": "<mailto:openwrt-devel@lists.openwrt.org>",
        "List-Help": "<mailto:openwrt-devel-request@lists.openwrt.org?subject=help>",
        "List-Subscribe": "<https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>,\n\t<mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe>",
        "Cc": "Sven Eckelmann <sven.eckelmann@open-mesh.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "openwrt-devel-bounces@lists.openwrt.org",
        "Sender": "\"openwrt-devel\" <openwrt-devel-bounces@lists.openwrt.org>"
    },
    "content": "Future Open Mesh u-boot versions are changing the check of the image files\n(vmlinux, rootfs) from md5 to sha256. Having both in them should be enough\nto ensure backward and forward compatibility.\n\nSigned-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com>\n\nBackport of r49140\n---\n scripts/om-fwupgradecfg-gen.sh | 4 ++++\n 1 file changed, 4 insertions(+)",
    "diff": "diff --git a/scripts/om-fwupgradecfg-gen.sh b/scripts/om-fwupgradecfg-gen.sh\nindex fab1582..e208e6d 100644\n--- a/scripts/om-fwupgradecfg-gen.sh\n+++ b/scripts/om-fwupgradecfg-gen.sh\n@@ -42,6 +42,7 @@ CHECK_BS=65536\n \n KERNEL_SIZE=$(stat -c%s \"$KERNEL_PATH\")\n KERNEL_MD5=$(md5=$(md5sum $KERNEL_PATH); echo ${md5%% *})\n+KERNEL_SHA256=$(openssl dgst -sha256 $KERNEL_PATH | awk '{print $2}')\n KERNEL_PART_SIZE=$(size=$(($KERNEL_SIZE / $FLASH_BS)); [ $(($size * $FLASH_BS)) -lt $KERNEL_SIZE ] && size=$(($size + 1)); echo $(($size * $FLASH_BS / 1024)))\n \n ROOTFS_FLASH_ADDR=$(addr=$(($KERNEL_FLASH_ADDR + ($KERNEL_PART_SIZE * 1024))); printf \"0x%x\" $addr)\n@@ -49,6 +50,7 @@ ROOTFS_SIZE=$(stat -c%s \"$ROOTFS_PATH\")\n ROOTFS_CHECK_BLOCKS=$((($ROOTFS_SIZE / $CHECK_BS) - $MD5_SKIP_BLOCKS))\n ROOTFS_MD5=$(md5=$(dd if=$ROOTFS_PATH bs=$CHECK_BS count=$ROOTFS_CHECK_BLOCKS 2>&- | md5sum); echo ${md5%% *})\n ROOTFS_MD5_FULL=$(md5=$(md5sum $ROOTFS_PATH); echo ${md5%% *})\n+ROOTFS_SHA256_FULL=$(openssl dgst -sha256 $ROOTFS_PATH | awk '{print $2}')\n ROOTFS_CHECK_SIZE=$(printf '0x%x' $(($ROOTFS_CHECK_BLOCKS * $CHECK_BS)))\n ROOTFS_PART_SIZE=$(($MAX_PART_SIZE - $KERNEL_PART_SIZE))\n \n@@ -57,6 +59,7 @@ cat << EOF > $CFG_OUT\n filename=kernel\n md5sum=$KERNEL_MD5\n filemd5sum=$KERNEL_MD5\n+filesha256sum=$KERNEL_SHA256\n flashaddr=$KERNEL_FLASH_ADDR\n checksize=0x0\n cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; saveenv\n@@ -66,6 +69,7 @@ cmd_fail=reset\n filename=rootfs\n md5sum=$ROOTFS_MD5\n filemd5sum=$ROOTFS_MD5_FULL\n+filesha256sum=$ROOTFS_SHA256_FULL\n flashaddr=$ROOTFS_FLASH_ADDR\n checksize=$ROOTFS_CHECK_SIZE\n cmd_success=setenv bootseq 1,2; setenv kernel_size_1 $KERNEL_PART_SIZE; setenv rootfs_size_1 $ROOTFS_PART_SIZE; saveenv\n",
    "prefixes": [
        "OpenWrt-Devel",
        "CC",
        "19/34"
    ]
}