get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 63779,
    "url": "http://patches.dpdk.org/api/patches/63779/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191211182147.19355-3-kevin.laatz@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": "<20191211182147.19355-3-kevin.laatz@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191211182147.19355-3-kevin.laatz@intel.com",
    "date": "2019-12-11T18:21:46",
    "name": "[v4,2/3] build: add abi checks to meson",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4aed64e004631dbfb84397d1b811f93a1b6ede06",
    "submitter": {
        "id": 921,
        "url": "http://patches.dpdk.org/api/people/921/?format=api",
        "name": "Kevin Laatz",
        "email": "kevin.laatz@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "http://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20191211182147.19355-3-kevin.laatz@intel.com/mbox/",
    "series": [
        {
            "id": 7802,
            "url": "http://patches.dpdk.org/api/series/7802/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7802",
            "date": "2019-12-11T18:21:44",
            "name": "Add ABI compatibility checks to the meson build",
            "version": 4,
            "mbox": "http://patches.dpdk.org/series/7802/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/63779/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/63779/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 75041A04F5;\n\tWed, 11 Dec 2019 19:22:23 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 4B1021BE82;\n\tWed, 11 Dec 2019 19:22:23 +0100 (CET)",
            "from mga12.intel.com (mga12.intel.com [192.55.52.136])\n by dpdk.org (Postfix) with ESMTP id 09FDE1BE3D\n for <dev@dpdk.org>; Wed, 11 Dec 2019 19:22:21 +0100 (CET)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n 11 Dec 2019 10:22:20 -0800",
            "from silpixa00399838.ir.intel.com (HELO\n silpixa00399838.ger.corp.intel.com) ([10.237.222.157])\n by orsmga007.jf.intel.com with ESMTP; 11 Dec 2019 10:22:19 -0800"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.69,302,1571727600\"; d=\"scan'208\";a=\"203655545\"",
        "From": "Kevin Laatz <kevin.laatz@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, david.marchand@redhat.com,\n bruce.richardson@intel.com,\n ray.kinsella@intel.com, Kevin Laatz <kevin.laatz@intel.com>",
        "Date": "Wed, 11 Dec 2019 18:21:46 +0000",
        "Message-Id": "<20191211182147.19355-3-kevin.laatz@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191211182147.19355-1-kevin.laatz@intel.com>",
        "References": "<20191129210905.1865-1-kevin.laatz@intel.com>\n <20191211182147.19355-1-kevin.laatz@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 2/3] build: add abi checks to meson",
        "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 to generate ABI dump files. These files will be\nrequired to perform ABI compatibility checks during the build later in the\npatchset. This script should be run on a DPDK version with a stable ABI.\n\nSince this is a tool designed for human use, we simplify it to just work\noff a whole build directory, taking the parameter of the builddir and\ngenerating the lib|drivers/abi dir. This is hardcoded into the script since\nthe meson build expects the .dump files in these directories.\n\nThe running of the scripts can be enabled/disabled using the new meson\noption added in this patch.  If enabled, the lib and drivers .so files will\nbe compared against any existing ABI dump files in lib|drivers/abi of the\nsource directory. If there are any incompatibilities, the build will fail\nand display the incompatibility.\n\nSigned-off-by: Kevin Laatz <kevin.laatz@intel.com>\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n\n---\nv2:\n  - fixed conditional around abi check custom target\nv3:\n  - fix typo in meson option name\nv4:\n  - squash commits 3,4,5,6 into a single commit\n  - changes meson option from type boolean to feature\n  - update travis packages\n  - move check for windows to earlier in build\n  - add abignore file to suppress experimental functions\n  - make the directories we store dump files in hidden\n---\n .travis.yml              |  9 +++++++--\n buildtools/dpdk.abignore |  2 ++\n buildtools/meson.build   |  3 +++\n config/meson.build       | 10 ++++++++++\n devtools/gen-abi-dump.sh | 24 ++++++++++++++++++++++++\n drivers/meson.build      | 13 +++++++++++++\n lib/meson.build          | 13 +++++++++++++\n meson.build              |  4 ++++\n meson_options.txt        |  2 ++\n 9 files changed, 78 insertions(+), 2 deletions(-)\n create mode 100644 buildtools/dpdk.abignore\n create mode 100755 devtools/gen-abi-dump.sh",
    "diff": "diff --git a/.travis.yml b/.travis.yml\nindex 8f90d06f2..c5654a530 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -21,7 +21,7 @@ aarch64_packages: &aarch64_packages\n \n extra_packages: &extra_packages\n   - *required_packages\n-  - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4]\n+  - [libbsd-dev, libpcap-dev, libcrypto++-dev, libjansson4, abigail-tools]\n \n build_32b_packages: &build_32b_packages\n   - *required_packages\n@@ -115,6 +115,11 @@ matrix:\n       apt:\n         packages:\n           - *extra_packages\n-\n+  - env: DEF_LIB=\"static\" OPTS=\"-Dcompat_checks=enabled -Dbuildtype=debug\" EXTRA_PACKAGES=1\n+    compiler: gcc\n+    addons:\n+      apt:\n+        packages:\n+          - *extra_packages\n \n script: ./.ci/${TRAVIS_OS_NAME}-build.sh\ndiff --git a/buildtools/dpdk.abignore b/buildtools/dpdk.abignore\nnew file mode 100644\nindex 000000000..b866b7f26\n--- /dev/null\n+++ b/buildtools/dpdk.abignore\n@@ -0,0 +1,2 @@\n+[suppress_function]\n+        symbol_version = EXPERIMENTAL\ndiff --git a/buildtools/meson.build b/buildtools/meson.build\nindex 6ef2c5721..378f8d07e 100644\n--- a/buildtools/meson.build\n+++ b/buildtools/meson.build\n@@ -7,6 +7,9 @@ pmdinfo = find_program('gen-pmdinfo-cfile.sh')\n \n check_experimental_syms = find_program('check-experimental-syms.sh')\n \n+abidiff = find_program('abidiff', required: compat_checks)\n+abignore = files('dpdk.abignore')\n+\n # set up map-to-def script using python, either built-in or external\n python3 = import('python').find_installation(required: false)\n if python3.found()\ndiff --git a/config/meson.build b/config/meson.build\nindex 01911ecf9..ea680af33 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -34,6 +34,16 @@ stable_so_version = abi_va.length() == 2 ? abi_va[0] : abi_va[0] + '.' + abi_va[\n experimental_abi_version = '0.' + ''.join(abi_va)\n experimental_so_version = '0.' + ''.join(stable_so_version.split('.'))\n \n+# compatibility checks not available on windows\n+compat_checks = disabler()\n+if not is_windows\n+\tcompat_checks = get_option('compat_checks')\n+endif\n+\n+if not get_option('debug') and compat_checks.enabled()\n+\terror('Build type must have debug symbols when compat_checks=enabled')\n+endif\n+\n # extract all version information into the build configuration\n dpdk_conf.set('RTE_VER_YEAR', pver.get(0).to_int())\n dpdk_conf.set('RTE_VER_MONTH', pver.get(1).to_int())\ndiff --git a/devtools/gen-abi-dump.sh b/devtools/gen-abi-dump.sh\nnew file mode 100755\nindex 000000000..bc6eac8c8\n--- /dev/null\n+++ b/devtools/gen-abi-dump.sh\n@@ -0,0 +1,24 @@\n+#!/bin/sh\n+\n+builddir=$1\n+\n+if [ -z \"$builddir\" ] ; then\n+\techo \"Usage: $(basename $0) build_dir\"\n+\texit 1\n+fi\n+\n+if [ ! -d \"$builddir\" ] ; then\n+\techo \"Error: build directory, '$builddir', doesn't exist\"\n+\texit 1\n+fi\n+\n+for d in lib drivers ; do\n+\tmkdir -p $d/.abi\n+\n+\tfor f in $builddir/$d/*.so* ; do\n+\t\ttest -L \"$f\" && continue\n+\n+\t\tlibname=$(basename $f)\n+\t\tabidw --out-file $d/.abi/${libname%.so*}.dump $f || exit 1\n+\tdone\n+done\ndiff --git a/drivers/meson.build b/drivers/meson.build\nindex 4b17662b7..db58a67b9 100644\n--- a/drivers/meson.build\n+++ b/drivers/meson.build\n@@ -196,6 +196,19 @@ foreach class:dpdk_driver_classes\n \t\t\t\t\tinclude_directories: includes,\n \t\t\t\t\tdependencies: static_deps)\n \n+\t\t\tif abidiff.found()\n+\t\t\t\tcustom_target('lib' + lib_name + '.abi_chk',\n+\t\t\t\t\tcommand: [abidiff, '--no-added-syms',\n+\t\t\t\t\t\t'--suppr', abignore,\n+\t\t\t\t\t\tfiles('.abi/lib' + lib_name + '.dump'),\n+\t\t\t\t\t\t'@INPUT@'],\n+\t\t\t\t\tinput: shared_lib,\n+\t\t\t\t\toutput: 'lib' + lib_name + '.abi_chk',\n+\t\t\t\t\tcapture: true,\n+\t\t\t\t\tinstall: false,\n+\t\t\t\t\tbuild_by_default: is_experimental == 0)\n+\t\t\tendif\n+\n \t\t\tdpdk_drivers += static_lib\n \n \t\t\tset_variable('shared_@0@'.format(lib_name), shared_dep)\ndiff --git a/lib/meson.build b/lib/meson.build\nindex 0af3efab2..f0aba6635 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -180,6 +180,19 @@ foreach l:libraries\n \t\t\t\t\tinclude_directories: includes,\n \t\t\t\t\tdependencies: shared_deps)\n \n+\t\t\tif abidiff.found()\n+\t\t\t\tcustom_target(dir_name + '.abi_chk',\n+\t\t\t\t\tcommand: [abidiff, '--no-added-syms',\n+\t\t\t\t\t\t'--suppr', abignore,\n+\t\t\t\t\t\tfiles('.abi/' + dir_name + '.dump'),\n+\t\t\t\t\t\t'@INPUT@'],\n+\t\t\t\t\tinput: shared_lib,\n+\t\t\t\t\toutput: dir_name + '.abi_chk',\n+\t\t\t\t\tcapture: true,\n+\t\t\t\t\tinstall: false,\n+\t\t\t\t\tbuild_by_default: is_experimental == 0)\n+\t\t\tendif\n+\n \t\t\tdpdk_libraries = [shared_lib] + dpdk_libraries\n \t\t\tdpdk_static_libraries = [static_lib] + dpdk_static_libraries\n \t\tendif # sources.length() > 0\ndiff --git a/meson.build b/meson.build\nindex b7ae9c8d9..e840ccea7 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -128,3 +128,7 @@ foreach drv:dpdk_drvs_disabled\n \toutput_message += drv + ':\\t' + reason + '\\n\\t'\n endforeach\n message(output_message + '\\n')\n+\n+if compat_checks.auto() and not get_option('debug')\n+\twarning('Build type must be have debug symbols to run compatibility checks!\\n')\n+endif\ndiff --git a/meson_options.txt b/meson_options.txt\nindex bc369d06c..0c651cef3 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -1,5 +1,7 @@\n # Please keep these options sorted alphabetically.\n \n+option('compat_checks', type: 'feature', value: 'auto',\n+\tdescription: 'Enable abi compatibility checks and experimental syms checks to run during the build. This requires debug build to be enabled.')\n option('disable_drivers', type: 'string', value: '',\n \tdescription: 'Comma-separated list of drivers to explicitly disable.')\n option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',\n",
    "prefixes": [
        "v4",
        "2/3"
    ]
}