Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2195302/?format=api
{ "id": 2195302, "url": "http://patchwork.ozlabs.org/api/patches/2195302/?format=api", "web_url": "http://patchwork.ozlabs.org/project/swupdate/patch/de38f3ac-4287-45e2-b258-3df00330c2d2n@googlegroups.com/", "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": "<de38f3ac-4287-45e2-b258-3df00330c2d2n@googlegroups.com>", "list_archive_url": null, "date": "2026-02-10T17:26:58", "name": "[meta-swupdate] Add check for cpio file size limits in swupdate_create_cpio", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "b2d95ffeca4c7b3a7ebd289d95de064cc46a2de4", "submitter": { "id": 92620, "url": "http://patchwork.ozlabs.org/api/people/92620/?format=api", "name": "Cameron McQuinn", "email": "cameron.mcquinn@gmail.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/swupdate/patch/de38f3ac-4287-45e2-b258-3df00330c2d2n@googlegroups.com/mbox/", "series": [ { "id": 491717, "url": "http://patchwork.ozlabs.org/api/series/491717/?format=api", "web_url": "http://patchwork.ozlabs.org/project/swupdate/list/?series=491717", "date": "2026-02-10T17:26:58", "name": "[meta-swupdate] Add check for cpio file size limits in swupdate_create_cpio", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/491717/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2195302/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2195302/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<swupdate+bncBDYMXJHA3MJBBZGUVXGAMGQENPWVOFQ@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=OHfTNOQ6;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20230601 header.b=TZ4zO7FL;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com\n (client-ip=2001:4860:4864:20::3a; helo=mail-oa1-x3a.google.com;\n envelope-from=swupdate+bncbdymxjha3mjbbzguvxgamgqenpwvofq@googlegroups.com;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from mail-oa1-x3a.google.com (mail-oa1-x3a.google.com\n [IPv6:2001:4860:4864:20::3a])\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 4f9T5V4lsKz1xtr\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 11 Feb 2026 04:27:09 +1100 (AEDT)", "by mail-oa1-x3a.google.com with SMTP id\n 586e51a60fabf-40450320b4fsf15340742fac.0\n for <incoming@patchwork.ozlabs.org>;\n Tue, 10 Feb 2026 09:27:09 -0800 (PST)", "by 2002:a05:6870:e9a1:b0:40a:60d4:63ab with SMTP id\n 586e51a60fabf-40a74be496cls4347857fac.2.-pod-prod-01-us; Tue, 10 Feb 2026\n 09:26:59 -0800 (PST)" ], "DKIM-Signature": [ "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=googlegroups.com; s=20230601; t=1770744422; x=1771349222;\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-sender:mime-version\n :subject:message-id:to:from:date:sender:from:to:cc:subject:date\n :message-id:reply-to;\n bh=TWtsXd7W7e+aD4QiOVHW4mhXQ/cN5YfPLhBKU1dFCHY=;\n b=OHfTNOQ67BzRLimbR6Vn+714eupr6+KSCCagj6y006q0NTU+4HgyxEzpkWbfG78Wug\n 7Y8eH3NMkXRgAMJqZp73ppFLWc367CZCIYqIy0uwY9C4L7ohbt2gGbRHyzOwrsrgH1RU\n hdTaEMP8cJiEOWWvjXOiSwEZv4gtMPYXuhDDOk61yG5/LJ7Rb+k1kXwErJRRyIlJ94kv\n /8hdKVp7M6z6aHABJq/brQ0XFYGgfiR519znBftwtM1sCiZs35/YunuTiMC8WgSC4b55\n nb8ns0+ywMtkvH/jl7lFlPUrmiqwDk7BCUdsFcRhkCZhSYpXmrCUyWveX0m1bZIEziLC\n bmog==", "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20230601; t=1770744422; x=1771349222;\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-sender:mime-version\n :subject:message-id:to:from:date:from:to:cc:subject:date:message-id\n :reply-to;\n bh=TWtsXd7W7e+aD4QiOVHW4mhXQ/cN5YfPLhBKU1dFCHY=;\n b=TZ4zO7FLc4Z8SZrEBdCiFhnJRCgsD9u6Q8kD6r7OwLYQNFnFWDcWPhi2O11l3BdEGg\n 38BSdYtC+qferWsbJn7ihbCypNex7mxfXNvLdmLG7hq9azSHnkcWwE8yKM2BHzBczRky\n 05Njv+Beu0l/kpPjj/8Yje1OALym5lw1s81RBtQXcE74GDdmOEWWOxTq3VRjqA7cJo1R\n bQeV+wcc7mVNcD1HU/qteKcJN1Y/xsxcoD4WVi1WY/Bf+p1xuPpd7Frx02Z66IXKI3qO\n 0ohAV+16aad+DrxKBNyWTcA8iXW1W0sHK4YUaQ5TU0oF+5r8Vo5oDeYLABxi6iVImhuL\n ojfg==" ], "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770744422; x=1771349222;\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-sender:mime-version:subject:message-id:to:from:date\n :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date\n :message-id:reply-to;\n bh=TWtsXd7W7e+aD4QiOVHW4mhXQ/cN5YfPLhBKU1dFCHY=;\n b=ekCEKg/BPVN3SkBYz7nW+jmehBS+X8KpDzlgsc79/tmKQpZpQmv5briULCO6upAGLa\n R0JkoBR33IB1ZEuJQN7GKvB35zi01LUitunJA8C/5i0SNENHAQF7LuI7QBieY7MESxq2\n r3bAsPdSyUhzibYWPWlsRskTDa3q303rLP87b8f+Xc0//9JSbY4KEDtSoHeQoyfH65Ox\n 48252bYHyVle0u4I24WSiFLVndh5vWkzxu0sH76CLS9wu3yx5DFMxnHGaZqx56JeG1TK\n YKHyCsiOI9l1epbcu/dorDR7aLnI+bth4xvLI0F2x8ys5ydJno5xD/x5ugnp1G6gyYcd\n 8JjQ==", "Sender": "swupdate@googlegroups.com", "X-Forwarded-Encrypted": "i=1;\n AJvYcCU86vh7DQvUFze/J7ea6S7/je3dqADsp2dmPVo0Pkln4GUog93jTfevmv9s6gMiNvElX/MBuPBaow==@patchwork.ozlabs.org", "X-Gm-Message-State": "AOJu0YwPBx+zmtq10CoRE9VLTl4uhw9JjT2+j3fMnYN91pudvUFg94q8\n\t1ucaOs8ig+MgArciz9+8lbBWeRjtEjNEtdFoRQxKuU/NhBNC8xe3GC2S", "X-Received": [ "by 2002:a05:6870:9215:b0:409:7a3d:6c12 with SMTP id\n 586e51a60fabf-40e514aac28mr1583968fac.21.1770744422124;\n Tue, 10 Feb 2026 09:27:02 -0800 (PST)", "by 2002:a05:6808:4f23:b0:45f:42d6:2ffb with SMTP id\n 5614622812f47-462fd051fdamr7093634b6e.41.1770744419185;\n Tue, 10 Feb 2026 09:26:59 -0800 (PST)" ], "X-BeenThere": "swupdate@googlegroups.com;\n h=\"AV1CL+HFaSyKo95D2kX6m1wtH9NGW2qVV2Oc2tYtwjuZjtAH2g==\"", "Date": "Tue, 10 Feb 2026 09:26:58 -0800 (PST)", "From": "Cameron McQuinn <cameron.mcquinn@gmail.com>", "To": "swupdate <swupdate@googlegroups.com>", "Message-Id": "<de38f3ac-4287-45e2-b258-3df00330c2d2n@googlegroups.com>", "Subject": "[swupdate] [meta-swupdate][PATCH] Add check for cpio file size limits\n in swupdate_create_cpio", "MIME-Version": "1.0", "Content-Type": "multipart/mixed;\n\tboundary=\"----=_Part_251308_785560461.1770744418052\"", "X-Original-Sender": "cameron.mcquinn@gmail.com", "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": "Currently, `do_swuimage` will fail silently if a file exceeds the 4GB limit \nimposed by CPIO. This patch adds a check to fail the task if any file \nexceeds this maximum size.\n\nSigned-off-by: Cameron McQuinn <cameron.mcquinn@gmail.com>\n---\n classes-recipe/swupdate-common.bbclass | 38 ++++++++++++++++++++++++++\n 1 file changed, 38 insertions(+)\n\n os.chdir(workdir)\n updateimage = d.getVar('IMAGE_NAME') + '.swu'", "diff": "diff --git a/classes-recipe/swupdate-common.bbclass \nb/classes-recipe/swupdate-common.bbclass\nindex 80a5d5b..2925a7c 100644\n--- a/classes-recipe/swupdate-common.bbclass\n+++ b/classes-recipe/swupdate-common.bbclass\n@@ -316,7 +316,45 @@ def swupdate_add_artifacts(d, list_for_cpio):\n bb.fatal(\"swupdate cannot find %s image file\" % image)\n \n \n+def swupdate_check_cpio_file_sizes(d, list_for_cpio):\n+ \"\"\"\n+ Fail the task if any file exceeds the cpio CRC 4GB limit.\n+ \"\"\"\n+ s = d.getVar('S')\n+ max_size = (4 * 1024 * 1024 * 1024) - 1 # 4GB - 1 byte\n+\n+ oversized = []\n+\n+ for relpath in list_for_cpio:\n+ path = os.path.join(s, relpath)\n+\n+ if not os.path.exists(path):\n+ bb.fatal(f\"SWUpdate: file listed for SWU does not exist: \n{relpath}\")\n+\n+ size = os.stat(path).st_size\n+ if size > max_size:\n+ oversized.append((relpath, size))\n+\n+ if oversized:\n+ msg = [\n+ \"SWUpdate image creation failed:\",\n+ \"The following files exceed the 4GB cpio CRC format limit:\"\n+ ]\n+\n+ for name, size in oversized:\n+ msg.append(f\" - {name}: {size} bytes\")\n+\n+ msg.append(\n+ \"cpio (SVR4 CRC format) cannot pack files >= 4GB.\\n\"\n+ \"Consider splitting the artifact, compressing it, or \ndelivering it via an external handler.\"\n+ )\n+\n+ bb.fatal(\"\\n\".join(msg))\n+\n def swupdate_create_cpio(d, swudeploydir, list_for_cpio):\n+ # Check sizes\n+ swupdate_check_cpio_file_sizes(d, list_for_cpio)\n+\n workdir = d.getVar('WORKDIR')\n", "prefixes": [ "meta-swupdate" ] }