get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2195586,
    "url": "http://patchwork.ozlabs.org/api/patches/2195586/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/swupdate/patch/20260211132740.597019-5-stefano.babic@swupdate.org/",
    "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": "<20260211132740.597019-5-stefano.babic@swupdate.org>",
    "list_archive_url": null,
    "date": "2026-02-11T13:27:35",
    "name": "[4/9] delta handler: retrieve URL from core if not present",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "fac203328170094a3fe726ad268e1aac9fd106f9",
    "submitter": {
        "id": 86869,
        "url": "http://patchwork.ozlabs.org/api/people/86869/?format=api",
        "name": "Stefano Babic",
        "email": "stefano.babic@swupdate.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/swupdate/patch/20260211132740.597019-5-stefano.babic@swupdate.org/mbox/",
    "series": [
        {
            "id": 491836,
            "url": "http://patchwork.ozlabs.org/api/series/491836/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/swupdate/list/?series=491836",
            "date": "2026-02-11T13:27:32",
            "name": "Introduce delta update with Hawkbit",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/491836/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2195586/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195586/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<swupdate+bncBD2ZDGN6SEKRBUUHWLGAMGQE4L4BBHI@googlegroups.com>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=googlegroups.com header.i=@googlegroups.com\n header.a=rsa-sha256 header.s=20230601 header.b=ozDEAJW5;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com\n (client-ip=2a00:1450:4864:20::53b; helo=mail-ed1-x53b.google.com;\n envelope-from=swupdate+bncbd2zdgn6sekrbuuhwlgamgqe4l4bbhi@googlegroups.com;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from mail-ed1-x53b.google.com (mail-ed1-x53b.google.com\n [IPv6:2a00:1450:4864:20::53b])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f9zl04NXRz1xx7\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 12 Feb 2026 00:27:56 +1100 (AEDT)",
            "by mail-ed1-x53b.google.com with SMTP id\n 4fb4d7f45d1cf-65813e881afsf7389802a12.0\n        for <incoming@patchwork.ozlabs.org>;\n Wed, 11 Feb 2026 05:27:56 -0800 (PST)",
            "by 2002:aa7:c156:0:b0:659:3d93:5dec with SMTP id\n 4fb4d7f45d1cf-659621fcb30ls7195871a12.0.-pod-prod-03-eu;\n Wed, 11 Feb 2026 05:27:45 -0800 (PST)",
            "from mout.kundenserver.de (mout.kundenserver.de. [212.227.17.10])\n        by gmr-mx.google.com with ESMTPS id\n 4fb4d7f45d1cf-65a3cd3f04asi45370a12.0.2026.02.11.05.27.44\n        for <swupdate@googlegroups.com>\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Wed, 11 Feb 2026 05:27:44 -0800 (PST)",
            "from paperello ([88.217.136.221]) by mrelayeu.kundenserver.de\n (mreue109 [212.227.17.181]) with ESMTPSA (Nemesis) id\n 1MC2sF-1vvz9p0ErV-00FOQO; Wed, 11 Feb 2026 14:27:44 +0100"
        ],
        "ARC-Seal": [
            "i=2; a=rsa-sha256; t=1770816469; cv=pass;\n        d=google.com; s=arc-20240605;\n        b=Y6A+ye2IjkeVf15wonMEXJlC3CD6iiWqw4Pm12UnkSHecyHeef41UPZJS9LFoVKok4\n         4UHIGazu2Z14X8GE9CIhr5DSYwHK3N7WgMvUJ7+DubmPPWsEvteTKxtix3Eh4cBeAHIA\n         e+7z9glTznhAvXt3ZH0ykbc/BeQ51p9/CfE21rt0Fv3fDWQTQ8Bw7H1eKJpuyD8l62j2\n         jtPzKSfBLur7l8BYhrQMofG43WM6By527CJB/UOSTjuwNUQi3k9AP52ARFB5Z6AiDgbm\n         jSGranOFdnZ6wBkn/6ZkJQJH1rL9f6CVcVg3AEo8+jnFRzTjYQWWPYZAAnUoxf8ACiGq\n         +7WA==",
            "i=1; a=rsa-sha256; t=1770816464; cv=none;\n        d=google.com; s=arc-20240605;\n        b=gvg44gZwLTsBunwROTcpTETO7A7bV3tf2/fwldtVTU3syTLbssTyD9+tGOfipjMWHX\n         P0nhgZFkMRFyGPaO9is+r/CeYgYv1AeRcwavd8MjH3YaldtTzaY9GEY7QhKV9xV7lMd8\n         1XgSa0DgoNmwj5AWMoA+f21zfkFiuF7HanVz0jYz/IXe9EmhHw+TL/l/EKu70w5n7QhC\n         5QF3oGU9ahMOAsirpQ5RLZCjZGTXVRTtskG2zzDYtZit27Is7txjWNc/YOcaWrB5SRgn\n         PbmmPwthLtFCuNdiFqbFORgzncYJUrJCW4UjNg0Vk+5hSAANp8cJTOwuevzvXsqgbQQK\n         FSuw=="
        ],
        "ARC-Message-Signature": [
            "i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n         :list-id:mailing-list:precedence:ui-outboundreport:mime-version\n         :references:in-reply-to:message-id:date:subject:cc:to:from:sender\n         :dkim-signature;\n        bh=yZv5TkV4mQK4yw7p7IRcO/lS/zKI2JhY71HCqzsw3Ks=;\n        fh=NWks7yiqZLIBGLYBf97VR1Z7w8HJyTRzCuQE3XxQKvo=;\n        b=Wcah9dTX7Maaqd2kOx9ntmbtd3mv8ozFhzHIcJ8mbj1tOXgRt+b4XlJ3Ge45Xh/PET\n         +B01Uabq6kIFdywevBFEwuN6EsuBYkOGg4Ohs62kb+VmJ/PgISr7APzuo5fvyuh5V+hd\n         03Ma6t5dq1MIvoBpgjOis0BMBo0FERELhiTrTG/iFWPCIfhqpXHXR1WH+Vn+GVLqxUcW\n         TfVnhQ4pnBrx7MwDtZikvQTNB7v/BoWHcPc4yc/TWkGjNRAaTMNup35aCP7GCW7UbBGO\n         rbWWJRc8H+KBCA1U79kEOTAta42gD3iKAAszkMwg99JBkPqcYlVjnqDQiMAvAROCko5V\n         wLSA==;\n        darn=patchwork.ozlabs.org",
            "i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n s=arc-20240605;\n        h=ui-outboundreport:content-transfer-encoding:mime-version:references\n         :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature;\n        bh=wV8SjH9U7C7yOHc1UGqTfGsWTnBw43gz86agqRWHors=;\n        fh=TiEWcqMcKpHk5s7uErzpntoONrNfOXwKpI5P8bIlggk=;\n        b=jFznX4wb3+FoV1USCKTJOnXkZpQ1lA2NEmDdgT7VJHvNBtwVseBi/FdapCUZ5bQMMx\n         hyWLczo9uTH0YZZZz2o1pyxehY2avHnnxh/1ZGn6i2WScxO9bFQuy/aYQsWWLNRtYpPM\n         PhwH+nT/3cVAresemalP1ztzF5erHg4wyaor0ibLFrv2nKUU8/hZLdwnDiKAcF3I5xmo\n         6Gb6s5xrR80tNyg4lZhhiOOPbd5leYLY5+wY+1a3AcofShXmngMgUQys7tip0BFv37Dp\n         VY/1+/9rgCAATyPJEqsSMOc9fUBWW0fm32HCd9jT8Dv8B81FyXoUL2nxyRCRDvz2qt0J\n         bD0Q==;\n        dara=google.com"
        ],
        "ARC-Authentication-Results": [
            "i=2; gmr-mx.google.com;\n       dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=aEWROK9J;\n       spf=pass (google.com: domain of stefano.babic@swupdate.org designates\n 212.227.17.10 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org;\n       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=swupdate.org",
            "i=1; gmr-mx.google.com;\n       dkim=pass header.i=@swupdate.org header.s=s1-ionos header.b=aEWROK9J;\n       spf=pass (google.com: domain of stefano.babic@swupdate.org designates\n 212.227.17.10 as permitted sender) smtp.mailfrom=stefano.babic@swupdate.org;\n       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=swupdate.org"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=googlegroups.com; s=20230601; t=1770816469; x=1771421269;\n darn=patchwork.ozlabs.org;\n        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n         :list-id:mailing-list:precedence:x-original-authentication-results\n         :x-original-sender:ui-outboundreport:mime-version:references\n         :in-reply-to:message-id:date:subject:cc:to:from:sender:from:to:cc\n         :subject:date:message-id:reply-to;\n        bh=yZv5TkV4mQK4yw7p7IRcO/lS/zKI2JhY71HCqzsw3Ks=;\n        b=ozDEAJW5B4ZsPQ6Ap5g073Iy04xmkhbYzRQ/pCv3gH0ZiRE8/wckMoZqaXja9XwXAA\n         090X5N3KMZIDcDDSrxmPaG2/7XOxya5PB6iJjNZWwD5TKWENd0fl3qDBhVEqNpKBYSi4\n         zDVgt+Vu7tav/dJ7hBU8HfjsqrVHXmDRgQsKPgFoj/g5ND5x0cLc6bBrJFTCFfLMuPso\n         ABHGoZJP+wOnmWCQsrmbyrNTqL8koGyGS4xOk98tCtUSfYIMRyHP/qZOt8pcSGh/ogj8\n         8Qt5hYn22TjI6Wde9RQNm9rRg07wDymZ060NzdljQjUNGRTRTWYyS9qs3nD8SLuixA1V\n         aq5Q==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20230601; t=1770816469; x=1771421269;\n        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post\n         :x-spam-checked-in-group:list-id:mailing-list:precedence\n         :x-original-authentication-results:x-original-sender\n         :ui-outboundreport:mime-version:references:in-reply-to:message-id\n         :date:subject:cc:to:from:x-beenthere:x-gm-message-state:sender:from\n         :to:cc:subject:date:message-id:reply-to;\n        bh=yZv5TkV4mQK4yw7p7IRcO/lS/zKI2JhY71HCqzsw3Ks=;\n        b=iuvDuwlnJ/yBbJ7iCNw+Y5KjUvVa6tfpZFE5NNEK2gvfeCASiTInxGcOJGC/VeX6p8\n         c38NG2uXoweeqmTVDKeZJaVeVVLUEFfpS4wS+n4Tzkf7iFuOA/CxkXEoQ/eTOSZlUwX1\n         reoibKKqO7TGJL/LR8bNt9auuSOX4NiYl2rZPxeQ93V/U3JoX0nkQ+GE/byASko/tX0H\n         nd8PDQOmKPm96A5HXVF/i9SsIbkNO29QWpjpCFgqLlDyOZuH0U0A0r2kvf8E6aUCqPxY\n         Mmg2+++bxJuNawi38A3JpcUa0WW3pl6sInSB/4LOf+j8R3RGCQvJUBrGh7GpY9oaLC71\n         /ZDw==",
        "Sender": "swupdate@googlegroups.com",
        "X-Forwarded-Encrypted": "i=2;\n AJvYcCWIJtdlOiCvoR0BDFgEuBzTlL/zLhuIm16tdmlejPOS81pz1WAFDeHhoeFANK+5L6eXY+BenIBc9w==@patchwork.ozlabs.org",
        "X-Gm-Message-State": "AOJu0YyvVdxB/++QP/rK8V2Ne2QxadYUqlqUFXUXH4GCn/edxx43VAYt\n\tIFKprKOb2mrcuJY7T910BWi7T2P/vqD2yxeUL/DFyHxdzgmOLZcEm1gi",
        "X-Received": [
            "by 2002:a05:6402:35cd:b0:659:3e7c:4640 with SMTP id\n 4fb4d7f45d1cf-65a3fcea19cmr981863a12.2.1770816468686;\n        Wed, 11 Feb 2026 05:27:48 -0800 (PST)",
            "by 2002:a17:906:dc8a:b0:b87:2b69:89ce with SMTP id\n a640c23a62f3a-b8f717f2d6emr109954666b.63.1770816464854;\n        Wed, 11 Feb 2026 05:27:44 -0800 (PST)"
        ],
        "X-BeenThere": "swupdate@googlegroups.com;\n h=\"AV1CL+FvvAo70eQ5AhsPaOuRhe28NLS7plBJ+j2mKpwVNyfk1g==\"",
        "Received-SPF": "pass (google.com: domain of stefano.babic@swupdate.org\n designates 212.227.17.10 as permitted sender) client-ip=212.227.17.10;",
        "X-UI-Sender-Class": "55c96926-9e95-11ee-ae09-1f7a4046a0f6",
        "From": "Stefano Babic <stefano.babic@swupdate.org>",
        "To": "swupdate@googlegroups.com",
        "Cc": "Stefano Babic <stefano.babic@swupdate.org>",
        "Subject": "[swupdate] [PATCH 4/9] delta handler: retrieve URL from core if not\n present",
        "Date": "Wed, 11 Feb 2026 14:27:35 +0100",
        "Message-ID": "<20260211132740.597019-5-stefano.babic@swupdate.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260211132740.597019-1-stefano.babic@swupdate.org>",
        "References": "<20260211132740.597019-1-stefano.babic@swupdate.org>",
        "MIME-Version": "1.0",
        "X-Provags-ID": "V03:K1:xM3FJ9ql9Xrod+ukAclOgD5NUkzdS9bKtNyQuVr+MGsoXaqD1Yo\n Zjx/Tf7TYLQvgP4oNi0KoscXG3oADhc4i7lE345pd5xu514exeDBlIW6popDUzIVKQPA7r1\n m1ovzkGYBi89VjNUXXdJiz4bNKflMsm414lQu175xLWMpdAw41wUYGPnQ/3+A9G5tspDz2f\n GYC2PQKWj//YPuvrtVyKQ==",
        "X-Spam-Flag": "NO",
        "UI-OutboundReport": "notjunk:1;M01:P0:/3JPnG37LTQ=;LLHu9FbZ+/DlBeNuV40JnsxKyCr\n cFJDiyScMA9F48cwXN/KT4Jwc/yG9bOoeQQhwyOusec1y32wiojvTY3cQP+/rGCVbobVUGlr+\n HedPcrviJc+qpY9Cvt0iVfKxDvJhx5KgXlDuSSP949tp6DMc6S229+qYNevrQZkTFKesPaJQt\n rbnVTAKvgelUO77/uPpUj8Jgqw4ZTkHolbFUbhGmuBTsdgDIUY7PdsuYmmrFARTme1UUyiOF4\n Wfgg4dejfRa+n9E36XL7+85jU2ZyERr5kcgIWJK2cQdqi0wyVQ3m+oQh/A3WMYEX0fK8d0vos\n rcwZ70YXau9efmvKIWGGJFUowu8Y1lyTon3RTk4JtFUDll621HBQowZt2gfKncqKOk/tMPJ22\n 3tGCdhQOOtnrx497VL5iGq3Iu3AIEfdiZUv8NCzThkQFBJ3qv8FpTqPgQQmPA63XQuhPCXm0q\n xrT+5FU511VtbU1/OO7JOjunxN0T1uD60U/p87fjAs86lH/HxYIDuKQBQNnXDmXemT4tlhkPi\n eKI4h9U/GVnCEqW0TXAcCSXLLNy12V+JjmwXniYIBdXCHIhAMb0ZDYYhOo6Rg0htGxPSOYQFC\n JFDwfq+cYt+mVv0e3eievUBny5KgQ8nBd/8di+cEeT44Mf+Yu9GV3RLsLsuqg4cdC6nNls3vk\n ftHa+mLE9vY2O8ZBAUSPWlUiO0kc72AuYDCS/9he4IgnzBS58+teR/5O9njuKxE6+1o9f5YNk\n bL9/omazGRxIj5r+I2/LHY2d8vNgNmSA70tjzzAZ1mWq9ruBo6jUS+QV3WywPco0YbXQ/inB2\n 2lHagaxhEFeSJzshc+qUl9PO+sTIOUuV+riZFCysUbVSPOfK9FvDwjY3SpYJvDGnnxpYm2JZb\n 63gwcE3qLqbsMj2atEwkNNAFl0Kwhl3IVX0cteAvnW+LaEy3Yj9dkkYaGIy6GMXQapD/1kFIR\n uq+H3rkzVHnmJ/czNeT24HZ8xXfJHCil0uqeR6KiIQBBMb71iitwwngWbVlH663pmsPcdXATS\n JECXse15LFD2BV945vTKLwLX5ERDgkEPU6+7K6lr87L7J68FqfD4XAkp5wYsp9uYsGxoDOAxc\n JocusgfTR+1t+NdFC/aPczSm9fLep9bfgRVF3WQqYkzXN14puW7AJdoC+86LpgSv6debwx6I8\n TnOoocQtMyBU90FfY1Z3fjl8XiO1EvHp56t/E76Ab70LMAJ6y3vI9ETRP8HM5nyhwjZfoSQ+N\n uiCnPYGUdRoQ5RItK+iF8AYP2ZlsVVoUZI5BulXTofIjt+wQCs/jLThlVygckjCNE+4/hktnl\n aAW9+NsNOhUi0VK1Urh+qFGEJUwG3M21gZYxb1eFIdoGxGC/ikADywogGUWi11VX5C5AryiB1\n wicVNsvJkDgUEDZuEdSSZ7oVbC7BSsZ/xWQy4u/86Vv8mj0PKYbhryShyYVeCFU2zRQJhlqW1\n uEmJJ69zAd3IQsCg/HmUqX2i7bwE7ERDLj4QERmYxqLQ0KY5iuqDcFOsn8jFmm7O15q6Ac57j\n Z75W4lhCqc+q5LOAOBBqXx0P2Z40YT6BZ8c4f37l7SrWrX8VEH0QTveCWDPC0CG6gvrRQXQTK\n 8WqpgGEqmX2k4yUz2kv/VLOfYcDYm1dBSA8S7v6EOujGo8XYERT0zdL0HnpjYAVbIBSFJ0CwV\n kC10Wkt8LlnK07vhkOd7g+xjO2Et50k/YQeXxq4PUe0MJoc9FIsn3sLR0WxeT2sKCRGg3i5Gx\n 6cSqC79nUJOphUeVIZsO7O5w1Lah6mIOosP2RjVp0BTKKFVvHxjeu5frllpjERFuTIAfMoojm\n zsG2S0Yfc91s07iqhjwzF0DDSSgT7Xm+kIe78K+x/v80o5h1tEvpf5xf9i6LpBXVbT4JyA2af\n CvS1Q3kt6sh8cnsCQ==",
        "X-Original-Sender": "stefano.babic@swupdate.org",
        "X-Original-Authentication-Results": "gmr-mx.google.com;       dkim=pass\n header.i=@swupdate.org header.s=s1-ionos header.b=aEWROK9J;       spf=pass\n (google.com: domain of stefano.babic@swupdate.org designates 212.227.17.10 as\n permitted sender) smtp.mailfrom=stefano.babic@swupdate.org;       dmarc=pass\n (p=NONE sp=NONE dis=NONE) header.from=swupdate.org",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Precedence": "list",
        "Mailing-list": "list swupdate@googlegroups.com;\n contact 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 <mailto:swupdate@googlegroups.com>",
        "List-Help": "<https://groups.google.com/support/>,\n <mailto:swupdate+help@googlegroups.com>",
        "List-Archive": "<https://groups.google.com/group/swupdate",
        "List-Subscribe": "<https://groups.google.com/group/swupdate/subscribe>,\n <mailto:swupdate+subscribe@googlegroups.com>",
        "List-Unsubscribe": "\n <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>,\n <https://groups.google.com/group/swupdate/subscribe>"
    },
    "content": "This solves delta update together with Hawkbit, because the URL for\nthe ZCK file cannot be easy set into sw-description and avoid\nwork-arounds on the server side. Thehandler checks for URL and if not\npresent, a \"zckfile\" with the name of the artifact (the name of ZCK file)\nis retrieved from property. This is used as key to retrieve a URL from a\nglobal list, that suricatta module for Hawkbit has provided to send to\nthe core when Hawkbit's answer is parsed.\n\nSigned-off-by: Stefano Babic <stefano.babic@swupdate.org>\n---\n core/swupdate.c          |  1 +\n doc/source/handlers.rst  | 53 ++++++++++++++++++++++++++++++++++++++++\n handlers/delta_handler.c | 22 ++++++++++++++---\n include/swupdate_image.h |  1 +\n parser/parser.c          |  1 +\n 5 files changed, 75 insertions(+), 3 deletions(-)",
    "diff": "diff --git a/core/swupdate.c b/core/swupdate.c\nindex cfac2f81..f8ce085c 100644\n--- a/core/swupdate.c\n+++ b/core/swupdate.c\n@@ -297,6 +297,7 @@ static void swupdate_init(struct swupdate_cfg *sw)\n \tLIST_INIT(&sw->bootloader);\n \tLIST_INIT(&sw->extprocs);\n \tLIST_INIT(&sw->swupdate_types);\n+\tLIST_INIT(&sw->external_urls);\n \tstrlcpy(update_type->type_name, \"default\", sizeof(update_type->type_name));\n \tLIST_INSERT_HEAD(&sw->swupdate_types, update_type, next);\n \tsw->update_type = update_type;\ndiff --git a/doc/source/handlers.rst b/doc/source/handlers.rst\nindex ec3c9418..f3ca094c 100644\n--- a/doc/source/handlers.rst\n+++ b/doc/source/handlers.rst\n@@ -1422,6 +1422,9 @@ The resulting header file must be packed inside the SWU.\n    |             |             | that is called after reassembling                  |\n    |             |             | the artifact.                                      |\n    +-------------+-------------+----------------------------------------------------+\n+   | zckfile     | string      | name of the external ZCK file. This is used only   |\n+   |             |             | if URL is not present or it is set to \"dynamic\"    |\n+   +-------------+-------------+----------------------------------------------------+\n    | max-ranges  | string      | Max number of ranges that a server can             |\n    |             |             | accept. Default value (150) should be ok           |\n    |             |             | for most servers.                                  |\n@@ -1464,6 +1467,56 @@ Example:\n                 };\n         }\n \n+It is not always possible to set the URL into sw-description. Hawkbit for example generates a URL when an\n+artifact is uploaded, and URL is not available during build. The Hawkbit connector will send the URL to\n+SWUpdate, that adds it to an own list. If the URL is not present as property, or it is set to \"dynamic\",\n+the handler asks the core for the URL for the \"zckfile\" property.\n+Note that the URL is then not part of sw-description and for this reason not verified. Anyway, this is not a\n+security issue, because all hashes related to the ZCK file are part of sw-description (as ZCK header),\n+and each mismatch will stop the update.\n+\n+The steps to use Delta Update are:\n+\n+Hawkbit\n+.......\n+\n+- create a distribution\n+- add a software module to the distribution\n+- in the \"Upload\", adds both the SWU and the ZCK file. If you have multiple artifacts that will be\n+  installed as delta update, upload all required ZCK.\n+\n+sw-description\n+..............\n+\n+Use the `dynamic` keyword to set the URL in the properties. SWUpdate will then check if there is\n+a URL for the value of `zckfile`. Value of zckfile must be set to the filename of the ZCK file uploaded\n+to the Hawkbit server. Example:\n+\n+::\n+\n+  images: (\n+\t{\n+                filename = \"software.zck.header\";\n+\t\ttype = \"delta\";\n+\n+\t\tdevice = \"/dev/sde4\";\n+\t\tproperties: {\n+\t\t\turl = \"dynamic\";\n+\t\t\tchain = \"raw\";\n+\t\t\tsource = \"/dev/sde5\";\n+\t\t\tzckloglevel = \"info\";\n+\t\t\tsource-size = \"detect\";\n+\t\t\tzckfile = \"software.rootfs.ext4.zck\";\n+\t\t};\n+\t}\n+\n+\n+Hawkbit has also some DOS countermeasures that should be deactivated, else Hawkbit thinks to be under attack and does not\n+deliver the required chunks.\n+\n+hawkbit.server.security.dos.filter.enabled=false\n+hawkbit.server.security.dos.maxStatusEntriesPerAction=-1\n+\n Memory issue with zchunk\n ........................\n \ndiff --git a/handlers/delta_handler.c b/handlers/delta_handler.c\nindex 2039413e..affbedd2 100644\n--- a/handlers/delta_handler.c\n+++ b/handlers/delta_handler.c\n@@ -306,17 +306,33 @@ static int delta_retrieve_attributes(struct img_type *img, struct hnd_priv *priv\n \n \tpriv->zckloglevel = ZCK_LOG_DDEBUG;\n \tpriv->url = dict_get_value(&img->properties, \"url\");\n+\n+\t/*\n+\t * Check if URL is not set and must be retrieved from the global list\n+\t */\n+\tif (!priv->url || !strcmp(priv->url, \"dynamic\")) {\n+\t\tchar *zckfile;\n+\t\tzckfile = dict_get_value(&img->properties, \"zckfile\");\n+\t\tif (!zckfile) {\n+\t\t\tERROR(\"External URL is not set neither in sw-description nor passed as URL\");\n+\t\t\treturn -EINVAL;\n+\t\t}\n+\t\tpriv->url = dict_get_value(img->urls, zckfile);\n+\t\tif (priv->url) {\n+\t\t\tTRACE(\"ZCK Url set to %s\", priv->url);\n+\t\t}\n+\t}\n+\n \tpriv->srcdev = dict_get_value(&img->properties, \"source\");\n \tpriv->chainhandler = dict_get_value(&img->properties, \"chain\");\n+\n \tif (!priv->url || !priv->srcdev ||\n \t\t!priv->chainhandler || !strcmp(priv->chainhandler, handlername)) {\n \t\tERROR(\"Wrong Attributes in sw-description: url=%s source=%s, handler=%s\",\n \t\t\tpriv->url, priv->srcdev, priv->chainhandler);\n-\t\tfree(priv->url);\n-\t\tfree(priv->srcdev);\n-\t\tfree(priv->chainhandler);\n \t\treturn -EINVAL;\n \t}\n+\n \terrno = 0;\n \tif (dict_get_value(&img->properties, \"max-ranges\"))\n \t\tpriv->max_ranges = strtoul(dict_get_value(&img->properties, \"max-ranges\"), NULL, 10);\ndiff --git a/include/swupdate_image.h b/include/swupdate_image.h\nindex 1bb37dc8..e9e9b023 100644\n--- a/include/swupdate_image.h\n+++ b/include/swupdate_image.h\n@@ -70,6 +70,7 @@ struct img_type {\n \t * that are alive during an installation. They can be used by handlers\n \t */\n \tstruct dict *bootloader;/* pointer to swupdate_cfg's bootloader dict for handlers to modify */\n+\tstruct dict *urls;\t/* pointer to swupdate_cfg's external URL */\n \tlua_State *L;\t\t/* pointer to swupdate_cfg's LUa state created by parser */\n \n \tlong long partsize;\ndiff --git a/parser/parser.c b/parser/parser.c\nindex 84bf036c..6666ff21 100644\n--- a/parser/parser.c\n+++ b/parser/parser.c\n@@ -406,6 +406,7 @@ static int is_image_higher(struct swver *sw_ver_list,\n static void set_img_globals(struct img_type *img, struct swupdate_cfg *sw)\n {\n \timg->bootloader = &sw->bootloader;\n+\timg->urls = &sw->external_urls;\n \timg->L = sw->lua_state;\n }\n \n",
    "prefixes": [
        "4/9"
    ]
}