get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 108492,
    "url": "https://patches.dpdk.org/api/patches/108492/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20220302170637.24095-1-ohilyard@iol.unh.edu/",
    "project": {
        "id": 3,
        "url": "https://patches.dpdk.org/api/projects/3/?format=api",
        "name": "DTS",
        "link_name": "dts",
        "list_id": "dts.dpdk.org",
        "list_email": "dts@dpdk.org",
        "web_url": "",
        "scm_url": "git://dpdk.org/tools/dts",
        "webscm_url": "http://git.dpdk.org/tools/dts/",
        "list_archive_url": "https://inbox.dpdk.org/dts",
        "list_archive_url_format": "https://inbox.dpdk.org/dts/{}",
        "commit_url_format": ""
    },
    "msgid": "<20220302170637.24095-1-ohilyard@iol.unh.edu>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20220302170637.24095-1-ohilyard@iol.unh.edu",
    "date": "2022-03-02T17:06:37",
    "name": "vm_images: Update to handle additional host configurations",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "a872bb9e606333202dc8a4395ee4872b54001681",
    "submitter": {
        "id": 1829,
        "url": "https://patches.dpdk.org/api/people/1829/?format=api",
        "name": "Owen Hilyard",
        "email": "ohilyard@iol.unh.edu"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20220302170637.24095-1-ohilyard@iol.unh.edu/mbox/",
    "series": [
        {
            "id": 21990,
            "url": "https://patches.dpdk.org/api/series/21990/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=21990",
            "date": "2022-03-02T17:06:37",
            "name": "vm_images: Update to handle additional host configurations",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/21990/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/108492/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/108492/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dts-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 9B690A04A4;\n\tWed,  2 Mar 2022 18:06:53 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6E9FA42715;\n\tWed,  2 Mar 2022 18:06:52 +0100 (CET)",
            "from mail-il1-f225.google.com (mail-il1-f225.google.com\n [209.85.166.225])\n by mails.dpdk.org (Postfix) with ESMTP id 529DF40141\n for <dts@dpdk.org>; Wed,  2 Mar 2022 18:06:51 +0100 (CET)",
            "by mail-il1-f225.google.com with SMTP id k7so1897890ilo.8\n for <dts@dpdk.org>; Wed, 02 Mar 2022 09:06:51 -0800 (PST)",
            "from postal.iol.unh.edu (postal.iol.unh.edu.\n [2606:4100:3880:1234::84]) by smtp-relay.gmail.com with ESMTPS id\n q15-20020a0566380d0f00b00313f7c5132asm728754jaj.11.2022.03.02.09.06.50\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Wed, 02 Mar 2022 09:06:50 -0800 (PST)",
            "from iol.unh.edu (unknown [IPv6:2606:4100:3880:1257::105d])\n by postal.iol.unh.edu (Postfix) with ESMTP id 18AB5605246B;\n Wed,  2 Mar 2022 12:06:50 -0500 (EST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu;\n s=unh-iol;\n h=from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=naoA3C7oOawgJEwviOwHlgFOaNOgicJ8Nt5diFm8cKw=;\n b=Z7rhUw/dg5qPSy5gOE9EdhYCjFS0uZWbu2yG0bs041z6HNsLI1jkb7GFujV3OJKCRI\n 9mwC/tdo+eWDqCwQEROeEYMhzS7Gmffi7hgVYN4CmuTgpsMdVYvX7kk4vziV6mrPCdcg\n ivcZfsUz25Mn2evxFkmE7YwiO0JwZ4QlkNSkM=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20210112;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version\n :content-transfer-encoding;\n bh=naoA3C7oOawgJEwviOwHlgFOaNOgicJ8Nt5diFm8cKw=;\n b=bSiBp0/onBW8Fkmu+4uAudDtLKq9Ejjn38lYs0iyyPQYflCkcb/6sPHHNgTdoLRv7M\n pq6FlQylefpsosbQGpNLnN8qKIAz+qn2zma7rAxv3+DNzuHkvj327I3Glk5UfsuKqWD/\n 5yHcfSclUF7nIr43DZbhs2QG1EiPSzbC8WXuALb+BYtsY2XIqMPtyMbPyPNi39ckPoVv\n FSE2vvpdw0mIHR/8RCl7n/mTRVotJgoNEIARHa8H8yovKrTPugAHk3pYJ70rxhwr9jTv\n 5Oxae5mIEXp93ZWKQNPIg9kzrv5Kr9HRxN5imXKxnB1+VBgGMORTabwAmjUbdUlsZY/2\n rLLg==",
        "X-Gm-Message-State": "AOAM531DENX8WVBSzgX7Pr1xFq5FYPsR1iI9xH12KOSYzKbteVN+dG1A\n gAxq6RHprF8v6GJm00wYPom/FbkOwDi5achFArfjInTVaIVFAYh1zAeQka3vV7FmYxTOeetBEtX\n nGqQbRTr+ZwM6g3WxU+vZoeLkPWR7KBk80nYGQlL8QSp4pdTMEb0HiFng4ZRqNi7rbTXeDjPAvM\n ZV7YzYCwxJ+9WMfw==",
        "X-Google-Smtp-Source": "\n ABdhPJyYa7PtgMRiT5CRLrWfykxA+gvqrXOmBjBK2CI8NFC02MGDrajtbAgms84mgtjBZiuEfa0KVExLArID",
        "X-Received": "by 2002:a05:6e02:18c5:b0:2c2:ac0e:4eca with SMTP id\n s5-20020a056e0218c500b002c2ac0e4ecamr24535261ilu.7.1646240810653;\n Wed, 02 Mar 2022 09:06:50 -0800 (PST)",
        "X-Relaying-Domain": "iol.unh.edu",
        "From": "ohilyard@iol.unh.edu",
        "To": "dts@dpdk.org",
        "Cc": "Owen Hilyard <ohilyard@iol.unh.edu>",
        "Subject": "[PATCH] vm_images: Update to handle additional host configurations",
        "Date": "Wed,  2 Mar 2022 12:06:37 -0500",
        "Message-Id": "<20220302170637.24095-1-ohilyard@iol.unh.edu>",
        "X-Mailer": "git-send-email 2.30.2",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-BeenThere": "dts@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "test suite reviews and discussions <dts.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dts/>",
        "List-Post": "<mailto:dts@dpdk.org>",
        "List-Help": "<mailto:dts-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dts-bounces@dpdk.org"
    },
    "content": "From: Owen Hilyard <ohilyard@iol.unh.edu>\n\nWhile doing testing on UNH's ARM system, there were a few edge cases. Namely\nthat docker must be run in privileged mode. This is not due to ARM but\nSeLinux/AppArmor getting the way of accessing some of kvm's resources\nwhile in an unprivileged namespace. Issues with passing through the\nhardware clock resulted in both the addition of chronyd and trusting the\nssl certificates on python's pip repositories while installing meson due\nto issues with SSL and the VM time starting at Jan 1, 1970.\n\nSigned-off-by: Owen Hilyard <ohilyard@iol.unh.edu>\n---\n vm_images/Dockerfile         |  2 +-\n vm_images/create_vm_image.py | 12 ++++++++----\n 2 files changed, 9 insertions(+), 5 deletions(-)",
    "diff": "diff --git a/vm_images/Dockerfile b/vm_images/Dockerfile\nindex e3f1e0d9..ce4dbca4 100644\n--- a/vm_images/Dockerfile\n+++ b/vm_images/Dockerfile\n@@ -6,4 +6,4 @@ RUN apt-get update && apt-get upgrade -y\n \n RUN apt-get install --no-install-recommends -y libguestfs-tools \\\n     qemu linux-image-generic qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils \\\n-    linux-image-unsigned-5.11.0-46-generic\n\\ No newline at end of file\n+    linux-image-unsigned-5.11.0-46-generic qemu-system-x86\ndiff --git a/vm_images/create_vm_image.py b/vm_images/create_vm_image.py\nindex 88ffc7f9..8a010c99 100755\n--- a/vm_images/create_vm_image.py\n+++ b/vm_images/create_vm_image.py\n@@ -153,7 +153,7 @@ def run_subprocess(\n         \"docker\",\n         \"run\",\n         # The container needs to access QEMU/KVM\n-        # \"--privileged\",\n+        \"--privileged\",\n         \"-d\",\n         \"--platform\",\n     ]\n@@ -262,14 +262,13 @@ def get_virt_customize_command(\n     os_family_tags: Set[OsFamily], output_path: str, root_password: str\n ) -> str:\n     commands = [\n-        f\"virt-customize -a {output_path} --root-password password:{root_password} --update\",\n+        f\"virt-customize -a {output_path} --root-password password:{root_password} --update\"\n     ]\n \n     commands = commands + get_enable_additional_repos_commands(os_family_tags)\n \n     packages = get_packages_for_os_family(os_family_tags)\n     packagelist = \",\".join(packages)\n-    commands += (f\"--run-command dhclient\",)\n     commands += (f\"--install {packagelist}\",)\n     commands += (f\"--run-command {get_install_meson_command(os_family_tags)}\",)\n     commands += (f\"--run-command {get_setup_hugepages_command(os_family_tags)}\",)\n@@ -324,6 +323,7 @@ def get_packages_for_os_family(os_family_tags: Set[OsFamily]) -> List[str]:\n             \"python3-setuptools\",\n             \"python3-wheel\",\n             \"iperf\",\n+            \"chrony\",\n         ]\n     elif OsFamily.RHEL in os_family_tags:\n         return [\n@@ -354,7 +354,9 @@ def get_packages_for_os_family(os_family_tags: Set[OsFamily]) -> List[str]:\n \n def get_install_meson_command(os_family_tags: Set[OsFamily]) -> str:\n     if OsFamily.DEBIAN in os_family_tags or OsFamily.RHEL in os_family_tags:\n-        return '\"python3 -m pip install meson\"'\n+        # the \"--trusted-host\" flags are included because the date on the system will be Jan 1, 1970 due to the way\n+        # guestfs-tools starts the vm. This breaks pip's ssl, so making these hosts trusted fixes that.\n+        return '\"python3 -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org meson\"'\n     else:\n         error(f\"Unknown command to install meson for {os_family_tags}\")\n \n@@ -426,6 +428,8 @@ def get_image_info(base_image_path: str) -> (OsFamily, Arch):\n         base_image_path,\n     ]\n \n+    print(\" \".join(command))\n+\n     proc = subprocess.run(command, capture_output=True)\n     if proc.returncode != 0:\n         print(proc.stdout)\n",
    "prefixes": []
}