get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 808260,
    "url": "http://patchwork.ozlabs.org/api/patches/808260/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/swupdate/patch/20170831140759.436kek42e27kqebj@MD1KR9XC.ww002.siemens.net/",
    "project": {
        "id": 58,
        "url": "http://patchwork.ozlabs.org/api/projects/58/?format=api",
        "name": "swupdate development",
        "link_name": "swupdate",
        "list_id": "swupdate.googlegroups.com",
        "list_email": "swupdate@googlegroups.com",
        "web_url": "https://github.com/sbabic/swupdate",
        "scm_url": "git://github.com/sbabic/swupdate",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170831140759.436kek42e27kqebj@MD1KR9XC.ww002.siemens.net>",
    "list_archive_url": null,
    "date": "2017-08-31T14:07:59",
    "name": "Make socket paths and TMPDIR configurable?",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": false,
    "hash": "118daff5ebd213123cedd084db89b889817e212a",
    "submitter": {
        "id": 72180,
        "url": "http://patchwork.ozlabs.org/api/people/72180/?format=api",
        "name": "Storm, Christian",
        "email": "christian.storm@siemens.com"
    },
    "delegate": {
        "id": 1693,
        "url": "http://patchwork.ozlabs.org/api/users/1693/?format=api",
        "username": "sbabic",
        "first_name": "Stefano",
        "last_name": "Babic",
        "email": "sbabic@denx.de"
    },
    "mbox": "http://patchwork.ozlabs.org/project/swupdate/patch/20170831140759.436kek42e27kqebj@MD1KR9XC.ww002.siemens.net/mbox/",
    "series": [
        {
            "id": 838,
            "url": "http://patchwork.ozlabs.org/api/series/838/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/swupdate/list/?series=838",
            "date": "2017-08-31T14:07:59",
            "name": "Make socket paths and TMPDIR configurable?",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/838/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/808260/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/808260/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<swupdate+bncBDD6BWV65QPBBRVRUDGQKGQEDOSK3EQ@googlegroups.com>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=googlegroups.com\n\t(client-ip=2a00:1450:4010:c07::23a;\n\thelo=mail-lf0-x23a.google.com;\n\tenvelope-from=swupdate+bncbdd6bwv65qpbbrvrudgqkgqedosk3eq@googlegroups.com;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=googlegroups.com header.i=@googlegroups.com\n\theader.b=\"A6qgUrxj\"; dkim-atps=neutral"
        ],
        "Received": [
            "from mail-lf0-x23a.google.com (mail-lf0-x23a.google.com\n\t[IPv6:2a00:1450:4010:c07::23a])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjkmC54h4z9sD9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 00:10:18 +1000 (AEST)",
            "by mail-lf0-x23a.google.com with SMTP id p195sf508224lfd.17\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 31 Aug 2017 07:10:18 -0700 (PDT)",
            "by 10.46.21.10 with SMTP id s10ls640052ljd.51.gmail; Thu, 31 Aug\n\t2017 07:10:14 -0700 (PDT)",
            "from david.siemens.de (david.siemens.de. [192.35.17.14])\n\tby gmr-mx.google.com with ESMTPS id\n\tp65si233298wmg.1.2017.08.31.07.10.14\n\tfor <swupdate@googlegroups.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 31 Aug 2017 07:10:14 -0700 (PDT)",
            "from mail2.siemens.de (mail2.siemens.de [139.25.208.11])\n\tby david.siemens.de (8.15.2/8.15.2) with ESMTPS id v7VEADb2023301\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK)\n\tfor <swupdate@googlegroups.com>; Thu, 31 Aug 2017 16:10:13 +0200",
            "from localhost ([139.25.69.251])\n\tby mail2.siemens.de (8.15.2/8.15.2) with ESMTPS id v7VEAD8s029029\n\t(version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO)\n\tfor <swupdate@googlegroups.com>; Thu, 31 Aug 2017 16:10:13 +0200"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; t=1504188614; cv=pass;\n\td=google.com; s=arc-20160816;\n\tb=XvJyJnDwG1P4mAv5loHEYPDzPAQNZlDOF/AY4OpooeGVVWKeQODRqeBvosaV4D5B7L\n\tzrMY1Om1esm5IGp6SmibStohfRp4KwtWmC7qE+PqE4JUZiHQngk8x6SzXgUU3AFRmlFW\n\tBmYsJ2vkegT4cNAiV2tsoGeWe/9WysSyY1EHWEFFTylpBupMep3At+r17cucSgE8HMya\n\tzMe3vzFauFyDN7HpwwdtxDh8UYuUyHaEaCzPFvBSR9C3mKb3sTLtRYBGCLKl6PtvAQMV\n\tAHeyJljV3E0JmPmihw+H67vVrzrU4NhuWIZ6JT/jZLdhWTP9iXD7aOgMdbDiiQGLYS3q\n\tEUUg==",
            "i=1; a=rsa-sha256; t=1504188614; cv=none;\n\td=google.com; s=arc-20160816;\n\tb=sUZXvrRAeYV5nErlnzRpjeBeIu+Yat3ox66sv+NooJ7JqrS76qex3A201WlWBBJUl/\n\t3MXZhfs6w5yG0H/z6dgTEMKvegomak3fwPL1aiNtbuMcre/u6WdlHnnJxF91a3z1pauX\n\tumpqlN7lcT117fxDeG7JAHxjy2stW6a0AyH9sSmlPYXtdTQ/WDzVrJQeK2kgGNfBPYZI\n\tvlg5S+r0E6ZWLoSHKgpFkfcIRaDkHTG3if2AVxpOHfWEF2Lds9UGCi4ylj4Bjwl5PKLJ\n\to7O+u3oQ74e86tPrVHWZSI65Pxt6R436K5qyRlnDVtQx4v6FOhEYzCg/V2rSwRyGED92\n\t1iMw=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n\t:list-id:mailing-list:precedence:user-agent\n\t:content-transfer-encoding:content-disposition:mime-version\n\t:mail-followup-to:message-id:subject:to:from:date\n\t:arc-authentication-results:arc-message-signature:sender\n\t:dkim-signature:arc-authentication-results;\n\tbh=TkC3lahq92OWAKKa+rpPUTUNnogNt74a/NxbOdXk73w=;\n\tb=A70vOsuDefmteSGgm2ADWuZblK75JmRhYHdCBHsM0GIh8j4T1o4NyO89Aq5kcN6vDQ\n\tvje5SbKUhy+W7qRH1q1RkL+MU4/yj9slmAMltj6l0peYZ1Ldv28bFiBIxdUeGeNZldDm\n\t9tJxIGTGnwVwbb1yMQ+P913xg13e8i2e8Lix4wb7/l+u0VcVNcEDmbQU9Zenf13QQhmF\n\tZgEVBy542N2miFtsDnJqv08UIzC6DQIEzTZ7F/vk1z+a1BWGPFJ3VNiZjMI9bGB+2e8m\n\tdckz1wCfZGz9RvRf4kUOQmKSI3PHYTjjV/Cz/Qo74xShNJErOfE+AP2YZq97eE5Cqwx7\n\te5CA==",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=arc-20160816; \n\th=user-agent:content-transfer-encoding:content-disposition\n\t:mime-version:mail-followup-to:message-id:subject:to:from:date\n\t:arc-authentication-results;\n\tbh=5UqWmO2eCWp+Ckt5tTwUQnp6BelSnILj6flrpLtiMR4=;\n\tb=wZGK9s7hETR5gmnhuSv6sc/REGaI6ZvD7rxDIXya/ILz6QKoLRAjFHlppQi8nhD8kJ\n\tq27vY9ZHZGC6gwEQWXA6siNVj8rrph7OsgGzr7w2ISZVy5p0lofE0rwlI2IJJIMYloUd\n\tNOxmk4cCIYxwP7RTpGVE8gJQk7mY4q9GRMShoTS0YimG1yWwiffCbTcwHG7zi6VswVbL\n\tNAt+Y+pHqZh9nSYaPm0Bv4OLSjpJmOcJd6WIS9KUJZH7vNVitEkDyVjsuRGdDbRHNRvW\n\tRid4gR4NeZQs2Iq7y2gXt1OL7LXqsxnIX+op58HO2Pf2VZDIO9TSsuTqVZIa6vg1ucet\n\td0fQ=="
        ],
        "ARC-Authentication-Results": [
            "i=2; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.14 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com",
            "i=1; gmr-mx.google.com;\n\tspf=neutral (google.com: 192.35.17.14 is neither permitted nor denied\n\tby best guess record for domain of\n\tchristian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=googlegroups.com; s=20161025;\n\th=sender:date:from:to:subject:message-id:mail-followup-to\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:user-agent:x-original-sender:x-original-authentication-results\n\t:precedence:mailing-list:list-id:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=TkC3lahq92OWAKKa+rpPUTUNnogNt74a/NxbOdXk73w=;\n\tb=A6qgUrxjEEmJlUK2Grn+gdfP3FZc/+yG3rE+9k+aiJo6UGrB5dxqTZOLbn2YOw+xFr\n\tytyvd9uwV/N8oAem6hRIkQOqShkLjdfNo0b0aYmrIaxlHhCQg/LF/nSxZzznVWJ36ryK\n\tM2QQjdLCF+SpYjq0lTGbw0zS1X9AZE3ouF0viFbU1wMaB1bJw1F2CIu+faEnu/qyOMsH\n\tavKU2SiftS53P8kZchT7pMrWmrZO9Nn9BDi1UU1i5txjGIP8tZd6efeUIyqHLeMTumxU\n\tk8TcMjSz/5nFQOA2tIZmuTjhEE79HR+vGvP61P5kBRMc8WyQYEm86AmuEDr9UH9DAJcd\n\tDTcA==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=sender:x-gm-message-state:date:from:to:subject:message-id\n\t:mail-followup-to:mime-version:content-disposition\n\t:content-transfer-encoding:user-agent:x-original-sender\n\t:x-original-authentication-results:precedence:mailing-list:list-id\n\t:x-spam-checked-in-group:list-post:list-help:list-archive\n\t:list-subscribe:list-unsubscribe;\n\tbh=TkC3lahq92OWAKKa+rpPUTUNnogNt74a/NxbOdXk73w=;\n\tb=Od92YQYor9zXMYRg1iKuqoYiSVyM8D0qavtj2Rci/Nxz7Ba5gR/Ozb52alHOC0r/og\n\tf4WaKBa1XyEPJTPEfKaht+sfrejaqhbl41yJ5n+nQ9deb8ranpMBygEPd1+H6ywhkA+m\n\tbgtYOqj13JoJEF5lbJKTUdt/r3MTC/aqPBOB5s3qXouKxPhw5QdYpYUXuvLy7gtaL9Vn\n\ttFOvfgyN2b3c2IdVAen02J1oufoOyDHv0PxVNje5jbtTQbemW7hL5s3gYKJDqq8MzXzN\n\tj8umNGs5mMpWLNAlmZy281wOv15IQ106dpaguVtWfwDfXbR1VLqkg3a0VKPxOCCOkX1V\n\tGPkw==",
        "Sender": "swupdate@googlegroups.com",
        "X-Gm-Message-State": "AHPjjUhNsGaOPd47Tym5kQvVJWC8/0wclyVwFxovgwcrRbZhrylkVcGr\n\tP6Mf80Fvx/MVSQ==",
        "X-Google-Smtp-Source": "ADKCNb60dPpj5jV0r2BpxipYWN75d0DGV0nTKVttRVAnaN7PpiN3IJM4abKgMDSUl7bpF88FKjhE/g==",
        "X-Received": [
            "by 10.25.141.147 with SMTP id p141mr8718lfd.27.1504188614770;\n\tThu, 31 Aug 2017 07:10:14 -0700 (PDT)",
            "by 10.25.22.34 with SMTP id m34mr466213lfi.8.1504188614204;\n\tThu, 31 Aug 2017 07:10:14 -0700 (PDT)"
        ],
        "X-BeenThere": "swupdate@googlegroups.com",
        "Received-SPF": "neutral (google.com: 192.35.17.14 is neither permitted nor\n\tdenied by best guess record for domain of\n\tchristian.storm@siemens.com) client-ip=192.35.17.14; ",
        "Date": "Thu, 31 Aug 2017 16:07:59 +0200",
        "From": "Christian Storm <christian.storm@siemens.com>",
        "To": "swupdate@googlegroups.com",
        "Subject": "[swupdate] Make socket paths and TMPDIR configurable?",
        "Message-ID": "<20170831140759.436kek42e27kqebj@MD1KR9XC.ww002.siemens.net>",
        "Mail-Followup-To": "swupdate@googlegroups.com",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Disposition": "inline",
        "Content-Transfer-Encoding": "quoted-printable",
        "User-Agent": "Mutt/20170113 (1.7.2)",
        "X-Original-Sender": "christian.storm@siemens.com",
        "X-Original-Authentication-Results": "gmr-mx.google.com;       spf=neutral\n\t(google.com: 192.35.17.14 is neither permitted nor denied by best\n\tguess\n\trecord for domain of christian.storm@siemens.com)\n\tsmtp.mailfrom=christian.storm@siemens.com",
        "Precedence": "list",
        "Mailing-list": "list swupdate@googlegroups.com;\n\tcontact swupdate+owners@googlegroups.com",
        "List-ID": "<swupdate.googlegroups.com>",
        "X-Spam-Checked-In-Group": "swupdate@googlegroups.com",
        "X-Google-Group-Id": "605343134186",
        "List-Post": "<https://groups.google.com/group/swupdate/post>,\n\t<mailto:swupdate@googlegroups.com>",
        "List-Help": "<https://groups.google.com/support/>,\n\t<mailto:swupdate+help@googlegroups.com>",
        "List-Archive": "<https://groups.google.com/group/swupdate",
        "List-Subscribe": "<https://groups.google.com/group/swupdate/subscribe>,\n\t<mailto:swupdate+subscribe@googlegroups.com>",
        "List-Unsubscribe": "<mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n\t<https://groups.google.com/group/swupdate/subscribe>"
    },
    "content": "Hi,\n\nI'd like to see the various socket locations be configurable so that I\ncan put them into different directories and, e.g., give progress clients\naccess to the progress IPC socket only but not to, say, the control IPC\nsocket, including the ability to \"see\" the control socket at all.\nCurrently, they're all residing in /tmp/, hard-coded.\n\nAs a quick hack, consider something along the lines of the following:\n```\n```\n\nThis, however, breaks progress clients if they're compiled out-of-tree\nwithout a proper include/generated/autoconf.h defining, e.g.,\nCONFIG_SOCKET_CTRL_PATH. Hence, progress clients should get a command\nline parameter -s /path/to/socket specifying the path to the progress\nIPC socket (and a \"sane\" default as fallback which is the current\nhard-coded location in /tmp). The same is true for the other sockets.\n\n\nCarrying things further, TMPDIR as defined in include/util.h:115 and\nused in various locations may also be split according to the concern at\nhand so that not all temporary files regardless of their concern reside\nin /tmp.\n\n\nWhat do you think about this?\n\n\nAs a side note, what do you think about including systemd's socket-based\nactivation as an optional feature? Then, if a process wants to talk to\nthe control IPC socket created by systemd, systemd spawns SWUpdate and\nhands over the socket to SWUpdate...\n\n\n\nKind regards,\n   Christian",
    "diff": "--- a/Kconfig\n+++ b/Kconfig\n@@ -110,6 +110,25 @@ config SW_VERSIONS_FILE\n \t  but in some cases it can be required to do it. Having a check,\n \t  the risky-component is not always updated.\n \n+config SOCKET_CTRL_PATH\n+\tstring \"SWUpdate control socket path\"\n+\tdefault \"/tmp/sockinstctrl\"\n+\thelp\n+\t  Path to SWUpdate's IPC socket.\n+\n+config SOCKET_PROGRESS_PATH\n+\tstring \"SWUpdate progress socket path\"\n+\tdefault \"/tmp/swupdateprog\"\n+\thelp\n+\t  Path to the socket progress information is sent to.\n+\n+config SOCKET_REMOTE_HANDLER_DIRECTORY\n+\tstring \"SWUpdate remote handler socket directory\"\n+\tdefault \"/tmp/\"\n+\thelp\n+\t  Directory where sockets to remote handler processes\n+\t  are expected to be found.\n+\n\n--- a/handlers/remote_handler.c\n+++ b/handlers/remote_handler.c\n@@ -167,7 +167,7 @@ static int install_remote_image(struct img_type *img,\n \tstruct RHmsg RHmessage;\n \tchar bufcmd[80];\n \n-\tlen = strlen(img->type_data) + strlen(TMPDIR) + strlen(\"ipc://\") + 4;\n+\tlen = strlen(img->type_data) + strlen(CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY) + strlen(\"ipc://\") + 4;\n \n \t/*\n \t * Allocate maximum string\n@@ -177,7 +177,7 @@ static int install_remote_image(struct img_type *img,\n \t\tERROR(\"Not enough memory\");\n \t\treturn -ENOMEM;\n \t}\n-\tsnprintf(connect_string, len, \"ipc://%s%s\", TMPDIR,\n+\tsnprintf(connect_string, len, \"ipc://%s%s\", CONFIG_SOCKET_REMOTE_HANDLER_DIRECTORY,\n \t\t\timg->type_data);\n \n \tret = zmq_connect(request, connect_string);\n\n\n--- a/include/network_ipc.h\n+++ b/include/network_ipc.h\n@@ -24,7 +24,7 @@\n #include \"swupdate_status.h\"\n \n #define IPC_MAGIC\t\t0x14052001\n-#define SOCKET_CTRL_PATH\t\"/tmp/sockinstctrl\"\n+#define SOCKET_CTRL_PATH\tCONFIG_SOCKET_CTRL_PATH\n \n typedef enum {\n \tREQ_INSTALL,\n\n\n--- a/include/progress.h\n+++ b/include/progress.h\n@@ -24,7 +24,7 @@\n \n #include <swupdate_status.h>\n \n-#define SOCKET_PROGRESS_PATH \"/tmp/swupdateprog\"\n+#define SOCKET_PROGRESS_PATH CONFIG_SOCKET_PROGRESS_PATH\n \n /*\n  * Message sent via socket\n",
    "prefixes": []
}