get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 77448,
    "url": "http://patches.dpdk.org/api/patches/77448/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200911160332.256343-3-conor.walsh@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20200911160332.256343-3-conor.walsh@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200911160332.256343-3-conor.walsh@intel.com",
    "date": "2020-09-11T16:03:30",
    "name": "[v3,2/4] devtools: add generation of compressed abi dump archives",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b221fc6b2d73ff94c0ce62418b32c6f10179e014",
    "submitter": {
        "id": 1935,
        "url": "http://patches.dpdk.org/api/people/1935/?format=api",
        "name": "Conor Walsh",
        "email": "conor.walsh@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20200911160332.256343-3-conor.walsh@intel.com/mbox/",
    "series": [
        {
            "id": 12155,
            "url": "http://patches.dpdk.org/api/series/12155/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=12155",
            "date": "2020-09-11T16:03:30",
            "name": "abi breakage checks for meson",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/12155/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/77448/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/77448/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id F37E1A04C0;\n\tFri, 11 Sep 2020 18:03:51 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id D3D9F1B9B7;\n\tFri, 11 Sep 2020 18:03:50 +0200 (CEST)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by dpdk.org (Postfix) with ESMTP id 62325DE0\n for <dev@dpdk.org>; Fri, 11 Sep 2020 18:03:48 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 11 Sep 2020 09:03:47 -0700",
            "from silpixa00400466.ir.intel.com ([10.237.213.195])\n by orsmga002.jf.intel.com with ESMTP; 11 Sep 2020 09:03:44 -0700"
        ],
        "IronPort-SDR": [
            "\n Cw6qxpunFtGp+TXtYqbiQ65hNkFuFpZJ6TdAJV8Ihl5wVYXtPTEHW6g5islCPZELTIdNwh9FwW\n LdjyQ7zoh5ig==",
            "\n /yQTyAkH7+vqGdWJe+fk6h0NULLgzkEFQbRQejLUvwfsIEb2zFjvmyra8SABqTq8544iXA+A+M\n +HQ5xUTMoUnQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9741\"; a=\"220343468\"",
            "E=Sophos;i=\"5.76,416,1592895600\"; d=\"scan'208\";a=\"220343468\"",
            "E=Sophos;i=\"5.76,416,1592895600\"; d=\"scan'208\";a=\"318321556\""
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Conor Walsh <conor.walsh@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com, ray.kinsella@intel.com, nhorman@tuxdriver.com,\n aconole@redhat.com, maicolgabriel@hotmail.com, thomas@monjalon.net,\n bruce.richardson@intel.com, Conor Walsh <conor.walsh@intel.com>",
        "Date": "Fri, 11 Sep 2020 16:03:30 +0000",
        "Message-Id": "<20200911160332.256343-3-conor.walsh@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20200911160332.256343-1-conor.walsh@intel.com>",
        "References": "<20200910142121.3995680-1-conor.walsh@intel.com>\n <20200911160332.256343-1-conor.walsh@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 2/4] devtools: add generation of compressed\n\tabi dump archives",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This patch adds a script that generates a compressed archive\ncontaining .dump files which can be used to perform ABI\nbreakage checking for the build specified in the parameters.\nInvoke using \"./gen-abi-tarball.py -t <tag> -a <arch> [-cf <cross-file>]\"\n - <tag>: dpdk tag e.g. \"v20.11\"\n - <arch>: required architecture e.g. \"arm\" or \"x86_64\"\n - <cross-file>: configuration file for cross compiling for another\n                 system, this flag is not required.\n                 e.g. \"config/arm/arm64_armv8_linux_gcc\"\nE.g. \"./gen-abi-tarball.py -t latest -a x86_64\"\nIf a compiler is not specified using the CC environmental variable then\nthe script will default to using gcc.\nUsing these parameters the script will produce a .tar.gz archive\ncontaining .dump files required to do ABI breakage checking\n\nSigned-off-by: Conor Walsh <conor.walsh@intel.com>\n---\n devtools/gen-abi-tarball.py | 125 ++++++++++++++++++++++++++++++++++++\n 1 file changed, 125 insertions(+)\n create mode 100755 devtools/gen-abi-tarball.py",
    "diff": "diff --git a/devtools/gen-abi-tarball.py b/devtools/gen-abi-tarball.py\nnew file mode 100755\nindex 000000000..06761fca6\n--- /dev/null\n+++ b/devtools/gen-abi-tarball.py\n@@ -0,0 +1,125 @@\n+#!/usr/bin/env python3\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright(c) 2020 Intel Corporation\n+\n+import sys\n+import os\n+import argparse\n+\n+# Get command line arguments\n+parser = argparse.ArgumentParser(usage='\\rThis script is intended to generate ABI dump tarballs\\n'+\n+                                       'Supported environmental variables\\n'+\n+                                       '\\t- CC: The required compiler will be determined using this environmental variable.\\n')\n+parser.add_argument('-t', '--tag', type=str, dest='tag', help='DPDK tag e.g. latest or v20.11')\n+parser.add_argument('-cf', '--cross-file', type=str, dest='crosscompile', help='Set the location of a cross compile config')\n+parser.add_argument('-a', '--arch', type=str, dest='arch', help='Arch arm or x86_64')\n+args = parser.parse_args()\n+\n+# Get the DPDK tag if not supplied set as latest\n+if args.tag:\n+    user_tag = args.tag\n+else:\n+    user_tag = 'latest'\n+    print('No tag supplied defaulting to latest')\n+\n+# Get the cross-compile option\n+if args.crosscompile:\n+    cross_comp = args.crosscompile\n+    if not args.arch:\n+        sys.stderr.write('ERROR Arch must be set using -a when using cross compile\\n')\n+        exit(1)\n+    cross_comp = os.path.abspath(cross_comp)\n+    cross_comp_meson = '--cross-file '+cross_comp\n+else:\n+    cross_comp = ''\n+    cross_comp_meson = ''\n+\n+# Get the required system architecture if not supplied set as x86_64\n+if args.arch:\n+    arch = args.arch\n+else:\n+    arch = os.popen('uname -m').read().strip()\n+    print('No system architecture supplied defaulting to '+arch)\n+\n+tag = ''\n+# If the user did not supply tag or wants latest then get latest tag\n+if user_tag == 'latest':\n+    # Get latest quarterly build tag from git repo\n+    tag = os.popen('git ls-remote --tags http://dpdk.org/git/dpdk | grep -v \"rc\\|{}\" | tail -n 1 | sed \"s/.*\\///\"').read().strip()\n+else:\n+    tag = user_tag\n+    # If the user supplied tag is not in the DPDK repo then fail\n+    tag_check = int(os.popen('git ls-remote http://dpdk.org/git/dpdk refs/tags/'+tag+' | wc -l').read().strip())\n+    if tag_check != 1:\n+        sys.stderr.write('ERROR supplied tag does not exist in DPDK repo\\n')\n+        exit(1)\n+\n+# Get the specified compiler from system\n+comp_env = 'CC'\n+if comp_env in os.environ:\n+    comp = os.environ[comp_env]\n+    comp_default = ''\n+else:\n+    print('No compiler specified, defaulting to gcc')\n+    comp = 'gcc'\n+    comp_default = 'CC=gcc'\n+\n+# Print the configuration to the user\n+print('\\nSelected Build: '+tag+', Compiler: '+comp+', Architecture: '+arch+', Cross Compile: '+cross_comp)\n+\n+# Store the base directory script is working from\n+baseDir = os.getcwd()\n+# Store devtools dir\n+devtoolsDir = os.path.abspath(os.path.dirname(os.path.realpath(sys.argv[0])))\n+\n+# Create directory for DPDK git repo and build\n+try:\n+    os.mkdir('dump_dpdk')\n+except OSError as error:\n+    sys.stderr.write('ERROR The dump_dpdk directory could not be created, ensure it does not exist before start\\n')\n+    exit(1)\n+os.chdir('dump_dpdk')\n+# Clone DPDK and switch to specified tag\n+print('Cloning '+tag+' from DPDK git')\n+os.popen('git clone --quiet http://dpdk.org/git/dpdk >/dev/null').read()\n+os.chdir('dpdk')\n+os.popen('git checkout --quiet '+tag+' >/dev/null').read()\n+\n+# Create build folder with meson and set debug build and cross compile (if needed)\n+print('Configuring Meson')\n+os.popen(comp_default+' meson dumpbuild '+cross_comp_meson+' >/dev/null').read()\n+os.chdir('dumpbuild')\n+os.popen('meson configure -Dbuildtype=debug >/dev/null').read()\n+print('Building DPDK . . .')\n+#Build DPDK with ninja\n+os.popen('ninja >/dev/null').read()\n+gccDir = os.getcwd()\n+\n+# Create directory for abi dump files\n+dumpDir = os.path.join(baseDir,tag+'-'+comp+'-'+arch+'-abi_dump')\n+try:\n+    os.mkdir(dumpDir)\n+except OSError as error:\n+    sys.stderr.write('ERROR The '+dumpDir+' directory could not be created\\n')\n+    os.popen('rm -rf '+os.path.join(baseDir,'dump_dpdk')).read()\n+    exit(1)\n+\n+# Create dump files and output to dump directory\n+print('Generating ABI dump files')\n+genabiout = os.popen(os.path.join(devtoolsDir,'gen-abi.sh')+' '+gccDir).read()\n+os.popen('cp dump/* '+dumpDir).read()\n+\n+# Compress the dump directory\n+print('Creating Tarball of dump files')\n+os.chdir(baseDir)\n+origSize = os.popen('du -sh '+dumpDir+' | sed \"s/\\s.*$//\"').read()\n+os.popen('tar -czf '+dumpDir.split('/')[-1]+'.tar.gz '+dumpDir.split('/')[-1]+' >/dev/null').read()\n+newSize = os.popen('du -sh '+dumpDir+'.tar.gz | sed \"s/\\s.*$//\"').read()\n+\n+# Remove all temporary directories\n+print('Cleaning up temporary directories')\n+os.popen('rm -rf '+dumpDir).read()\n+os.popen('rm -rf '+os.path.join(baseDir,'dump_dpdk')).read()\n+\n+#Print output of the script to the user\n+print('\\nDump of DPDK ABI '+tag+' is available in '+dumpDir.split('/')[-1]+'.tar.gz (Original Size: '+origSize.strip()+', Compressed Size:'+newSize.strip()+')\\n')\n",
    "prefixes": [
        "v3",
        "2/4"
    ]
}