get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 50916,
    "url": "http://patches.dpdk.org/api/patches/50916/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190307115448.54041-3-bruce.richardson@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": "<20190307115448.54041-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190307115448.54041-3-bruce.richardson@intel.com",
    "date": "2019-03-07T11:54:46",
    "name": "[2/4] build: use version number from config file",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "18b27ba577d042c1e99353fd2ff7aa503ce38fc9",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@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/20190307115448.54041-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 3660,
            "url": "http://patches.dpdk.org/api/series/3660/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=3660",
            "date": "2019-03-07T11:54:44",
            "name": "One versionfile to rule them all...",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/3660/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/50916/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/50916/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 3E1034CAF;\n\tThu,  7 Mar 2019 12:55:10 +0100 (CET)",
            "from mga04.intel.com (mga04.intel.com [192.55.52.120])\n\tby dpdk.org (Postfix) with ESMTP id 947C04CAB\n\tfor <dev@dpdk.org>; Thu,  7 Mar 2019 12:55:08 +0100 (CET)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Mar 2019 03:55:08 -0800",
            "from silpixa00399126.ir.intel.com (HELO\n\tsilpixa00399126.ger.corp.intel.com) ([10.237.222.236])\n\tby orsmga002.jf.intel.com with ESMTP; 07 Mar 2019 03:55:06 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.58,451,1544515200\"; d=\"scan'208\";a=\"139925621\"",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu,  7 Mar 2019 11:54:46 +0000",
        "Message-Id": "<20190307115448.54041-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "In-Reply-To": "<20190307115448.54041-1-bruce.richardson@intel.com>",
        "References": "<20190307115448.54041-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 2/4] build: use version number from config file",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Since we have the version number in a separate file at the root level,\nwe should not need to duplicate this in rte_version.h too. Best\napproach here is to move the macros for specifying the year/month/etc.\nparts from the version header file to the build config file - leaving\nthe other utility macros for e.g. printing the version string, where they\nare.\n\nFor make this is done by having a little bit of awk parse the version\nfile and pass the results through to the preprocessor for the config\ngeneration stage.\n\nFor meson, this is done by parsing the version and adding it to the\nstandard dpdk_conf object.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n DPDK_VERSION                                |  2 +-\n config/common_base                          | 14 +++++++++\n config/rte_config.h                         |  5 ++++\n lib/librte_eal/common/include/rte_version.h | 32 ---------------------\n meson.build                                 | 14 +++++++++\n mk/rte.sdkconfig.mk                         |  2 ++\n 6 files changed, 36 insertions(+), 33 deletions(-)",
    "diff": "diff --git a/DPDK_VERSION b/DPDK_VERSION\nindex c4a4cd00b..e013b54dd 100644\n--- a/DPDK_VERSION\n+++ b/DPDK_VERSION\n@@ -1 +1 @@\n-19.05.0-rc0\n+19.05.1\ndiff --git a/config/common_base b/config/common_base\nindex 0b09a9348..6292bc4af 100644\n--- a/config/common_base\n+++ b/config/common_base\n@@ -1,6 +1,20 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2010-2017 Intel Corporation\n \n+#\n+# String that appears before the version number\n+#\n+CONFIG_RTE_VER_PREFIX=\"DPDK\"\n+\n+#\n+# Version information completed when this file is processed for a build\n+#\n+CONFIG_RTE_VER_YEAR=__YEAR\n+CONFIG_RTE_VER_MONTH=__MONTH\n+CONFIG_RTE_VER_MINOR=__MINOR\n+CONFIG_RTE_VER_SUFFIX=__SUFFIX\n+CONFIG_RTE_VER_RELEASE=__RELEASE\n+\n #\n # define executive environment\n # RTE_EXEC_ENV values are the directories in mk/exec-env/\ndiff --git a/config/rte_config.h b/config/rte_config.h\nindex 7606f5d7b..5f1749dbb 100644\n--- a/config/rte_config.h\n+++ b/config/rte_config.h\n@@ -18,6 +18,11 @@\n \n #include <rte_build_config.h>\n \n+/**\n+ * String that appears before the version number\n+ */\n+#define RTE_VER_PREFIX \"DPDK\"\n+\n /****** library defines ********/\n \n /* compat defines */\ndiff --git a/lib/librte_eal/common/include/rte_version.h b/lib/librte_eal/common/include/rte_version.h\nindex a7eed7ab7..50867ea81 100644\n--- a/lib/librte_eal/common/include/rte_version.h\n+++ b/lib/librte_eal/common/include/rte_version.h\n@@ -19,38 +19,6 @@ extern \"C\" {\n #include <stdio.h>\n #include <rte_common.h>\n \n-/**\n- * String that appears before the version number\n- */\n-#define RTE_VER_PREFIX \"DPDK\"\n-\n-/**\n- * Major version/year number i.e. the yy in yy.mm.z\n- */\n-#define RTE_VER_YEAR 19\n-\n-/**\n- * Minor version/month number i.e. the mm in yy.mm.z\n- */\n-#define RTE_VER_MONTH 5\n-\n-/**\n- * Patch level number i.e. the z in yy.mm.z\n- */\n-#define RTE_VER_MINOR 0\n-\n-/**\n- * Extra string to be appended to version number\n- */\n-#define RTE_VER_SUFFIX \"-rc\"\n-\n-/**\n- * Patch release number\n- *   0-15 = release candidates\n- *   16   = release\n- */\n-#define RTE_VER_RELEASE 0\n-\n /**\n  * Macro to compute a version number usable for comparisons\n  */\ndiff --git a/meson.build b/meson.build\nindex 757618144..9d5320395 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -22,6 +22,20 @@ dpdk_app_link_libraries = []\n pver = meson.project_version().split('.')\n major_version = '@0@.@1@'.format(pver.get(0), pver.get(1))\n \n+# extract all version information into the build configuration\n+dpdk_conf.set('RTE_VER_YEAR', pver.get(0))\n+dpdk_conf.set('RTE_VER_MONTH', pver.get(1))\n+if pver.get(2).contains('-rc')\n+\trc_ver = pver.get(2).split('-rc')\n+\tdpdk_conf.set('RTE_VER_MINOR', rc_ver.get(0))\n+\tdpdk_conf.set_quoted('RTE_VER_SUFFIX', '-rc')\n+\tdpdk_conf.set('RTE_VER_RELEASE', rc_ver.get(1))\n+else\n+\tdpdk_conf.set('RTE_VER_MINOR', pver.get(2))\n+\tdpdk_conf.set_quoted('RTE_VER_SUFFIX', '')\n+\tdpdk_conf.set('RTE_VER_RELEASE', 0)\n+endif\n+\n pmd_subdir_opt = get_option('drivers_install_subdir')\n if pmd_subdir_opt.contains('<VERSION>')\n \tpmd_subdir_opt = major_version.join(pmd_subdir_opt.split('<VERSION>'))\ndiff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk\nindex 8dc31d7cf..bbfa24dee 100644\n--- a/mk/rte.sdkconfig.mk\n+++ b/mk/rte.sdkconfig.mk\n@@ -76,6 +76,8 @@ else\n $(RTE_OUTPUT)/.config: $(RTE_CONFIG_TEMPLATE) FORCE | $(RTE_OUTPUT)\n \t$(Q)if [ \"$(RTE_CONFIG_TEMPLATE)\" != \"\" -a -f \"$(RTE_CONFIG_TEMPLATE)\" ]; then \\\n \t\t$(CPP) -undef -P -x assembler-with-cpp \\\n+\t\t`cat $(RTE_SRCDIR)/DPDK_VERSION | sed -e 's/-rc/.-rc./' | \\\n+\t\tawk -F '.' '{print \"-D__YEAR=\"$$1, \"-D__MONTH=\"$$2, \"-D__MINOR=\"$$3, \"-D__SUFFIX=\\\"\"$$4\"\\\"\", \"-D__RELEASE=\"int($$5)}'` \\\n \t\t-ffreestanding \\\n \t\t-o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLATE) ; \\\n \t\tconfig=$$(cat $(RTE_OUTPUT)/.config_tmp) ; \\\n",
    "prefixes": [
        "2/4"
    ]
}