From patchwork Thu Jun 11 06:13:28 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Heimer X-Patchwork-Id: 89734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71D46CD8CB9 for ; Thu, 11 Jun 2026 06:13:48 +0000 (UTC) Received: from MRWPR03CU001.outbound.protection.outlook.com (MRWPR03CU001.outbound.protection.outlook.com [40.107.130.16]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.39387.1781158419335035151 for ; Wed, 10 Jun 2026 23:13:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@est.tech header.s=selector1 header.b=L0jK2W18; spf=pass (domain: est.tech, ip: 40.107.130.16, mailfrom: anders.heimer@est.tech) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vBpVndk4cNrA+aBN+v1uF4Oy+ad82YT2kbWBpDA5xqGk0z1Z4gOeKjUSoYcLoPSudYOBRpR9e+vnBAcWW4Wo/OX6WSpiFeIurRjHMGMoqP35AEDfvhzmqvCuapR+loSSa7P5FWhtAS3YWxauVbfRkFP3D5Caqm+EqBTnUrmJ+xOT1lwtHBYTa3EXUlBnMb8KYhDPRgtKGwcSzjZR5u3BE5bjH9G4xF+/H2s5JA4W6w4UFObVyCIJjZtzR3wZ6BRIAi8L0GBJDfrAuWSGCkUjYpzjTUmhR0uoo0Mv7pY7Dq7WNU+dkyXjaDC+Ov3lJJRQLzZwgA/nMKKkMUj+I+KGFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=atvF2ul/mSkG8KCeGfKXrNDMnePDmOYqtNyld9rIv9Y=; b=qIFnYRVLe35MQjlr67Jhkdxsr/1ShcuRSSnAYv71pMhKQzgLTdmztzK/VQJeKzu9zIBURIynqYXQnT6AqCi6IDuG8AlIS0ZZhKBuMbyDXzEko5wa3yPhLUOthABor9Bxe+WG1psabxdWP/bQisCIhEVE3VWcvu72Aw1ymtRBObNOsOs08QR67iAt0hq7B0Q+j6HyAgjV6Ec+q5YDox8xn0CV/bOR62m1DPTzGgH49ukpNQdTOTyrW8aPh2MUdoSqmWDyK1SmAJJMvPsFtovnC1IJtepF5jEbbXED1vOrOyx914jmJ5nIHkLM5Yr6GXnPwIK9iSSKZHD16Owsb8luLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=est.tech; dmarc=pass action=none header.from=est.tech; dkim=pass header.d=est.tech; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=est.tech; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=atvF2ul/mSkG8KCeGfKXrNDMnePDmOYqtNyld9rIv9Y=; b=L0jK2W18Z8KFIsuoqSxOc5miSLzVsqGAiVRqQGewD7S6LGQ7hpzOx8UKK6BVPnerIXT6Xshyx13U3ti4bJ9mciQiwFIKXCjeL063K0n7xkDCCAYu0TgRht/Nl1vNTHUvBeRLtID84eR3veC7rard5Yy5ato+x5wulCYAh1KFrPMQHv4x/CgqXgBw7eA7s+dNQBrfWE2SBLE5+foXiv6Y7SS+1e4Vlm5BNm8O4Kvi9DwaUI+D7nQbTOGJ6game+8X8CB6MfVu4KTV7eL/CdthSLROznoWTKgrKVwH/8c9TBuu6oPcRyw2uYON5Jug6ifNl6oE7xEJl8M+8SSpSkm15g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=est.tech; Received: from DB9P189MB1641.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:2ac::9) by GV1P189MB3003.EURP189.PROD.OUTLOOK.COM (2603:10a6:150:263::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.92.12; Thu, 11 Jun 2026 06:13:34 +0000 Received: from DB9P189MB1641.EURP189.PROD.OUTLOOK.COM ([fe80::90da:b700:f102:5c82]) by DB9P189MB1641.EURP189.PROD.OUTLOOK.COM ([fe80::90da:b700:f102:5c82%6]) with mapi id 15.21.0113.013; Thu, 11 Jun 2026 06:13:34 +0000 From: Anders Heimer To: yocto-patches@lists.yoctoproject.org CC: anders.heimer@est.tech Subject: [PATCH 1/3] steps: avoid shell when writing repo metadata Date: Thu, 11 Jun 2026 08:13:28 +0200 Message-ID: <20260611061330.733392-2-anders.heimer@est.tech> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260611061330.733392-1-anders.heimer@est.tech> References: <20260611061330.733392-1-anders.heimer@est.tech> X-ClientProxiedBy: DU7P189CA0020.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:552::30) To DB9P189MB1641.EURP189.PROD.OUTLOOK.COM (2603:10a6:10:2ac::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9P189MB1641:EE_|GV1P189MB3003:EE_ X-MS-Office365-Filtering-Correlation-Id: dcd2ae73-ae93-49a8-cded-08dec7809189 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|23010399003|1800799024|376014|366016|6133799003|22082099003|18002099003|11063799006|56012099006|3023799007; X-Microsoft-Antispam-Message-Info: iRrEWUVR8883HOWr3D7n9xwx2aTvJJjR4xqRax+b4ntI2vbnuNCD9/ZZYkx5k2V2x4Ig3wK6YPMuHKg16SiIwyxrYxmBudyMcEHBdAgBI3eQz6YmDhdLKX1BzEIWVZGeOIem2l0mG+6Xe8hKBK1LOCu8XrUJxbH2ErlLf2maWqWbzMza9PN5RHz66BCrjwACS1QqTUTdQwQKbOE71JySJ4qstwUvZxQKzZytJDONrXMfv5H1Zty4UnTgLhXf7PI4wngYWBmw9QN2bKrjJuFSyDYizRXjYRYOWMYC9Hkqqhmu+573nI3KXeOjYULuE0ehgIUq2vqEwrjy3wJLIVG+e7KpHmYRUJwe5sB4/2BK0FaMhXc7o1X7KlmxgwCemseM6swAKUsIAlRIK6H6LQI5bO6EGGz0FOO+/EvxI97h3wUv8abS/KTZQduK54D9hBFp9uheuPYxHwG9cUnjIBAp89sKgnBrFYE9H50PWySZTeModXOLszuSpMa0brNHHuFAP0muF8bLVvrQ2WAzvUd7BuKdpj8HAVg89viPmXIG6mYKP3EVSL0uJwPWkRoT62QqOrJxQOCI+7WxyCxOwRUJ9waSZZwKvHgYS9k10VPF4uyQ+zIOwjP7TEfXTS3sdzYgVXynv9ee16GQoHKv0LA1EBwlK/xi17FgvONVZY+FD82ZJjr1GgJsEIb8Kb+kEIBk X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9P189MB1641.EURP189.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(23010399003)(1800799024)(376014)(366016)(6133799003)(22082099003)(18002099003)(11063799006)(56012099006)(3023799007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xGncwpp6oBK5VIbPIQxGmuaRBOlFufxAcsyDnYlKoOtiu234tMRAuV9RoX1ly2UIXuFIeWB/VyufC0dlCZD8BNBH/j2Erd1u4lSCIZURRTIv0tWD9wzpOKwEm7zbKFVyhLd9RT8QwEUCfxdFqMLBp2QwSF4dtrHxks1N2ek9kjasIj/+Of2uTmsJ/GNn87U7j4kcNLBxrJ6c65EAiSi/HLpN/y4YWS+gufzNT/3wO2ZH2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16nDxjw4rXdee7l3aVaoMyd9posoBAb4aTBuuJYAIDYgjsT1ssik7NNi8iQRQON+q2czrlgXazKqvtVGnNO0iSRujoXVeVDGNjICi4j43tmI4vltXaDLa+xhpUTxFVDHVQksTdy3qqVobSuzK62Yi4oy9LyENGhqok8jjkAHcg2TfQSM1SaUn85DnAFMDU/OcrNBsZBGLNu6cXkSAek0r4DDdpGDbLyex6vtmerJ5dqyj7aRh7hGoaHPevsQWVIcN28pEefD3BOHQpzNPPgO6pyUXN0b9l+5z0RqHJje+hKMnp4DKTNy6Pd9C0P4zC7TsyehRqP+c6rK5xEDns5yB+C4BfpGegcvU0xQIGMgeiFfVzC6GmkUPleqmpYKD3OiJlNc5sjvWvqYHmGtQG40RP82NR1vZRcgMLH1JJ6yuwsUCWrpsQ== X-OriginatorOrg: est.tech X-MS-Exchange-CrossTenant-Network-Message-Id: dcd2ae73-ae93-49a8-cded-08dec7809189 X-MS-Exchange-CrossTenant-AuthSource: DB9P189MB1641.EURP189.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jun 2026 06:13:34.5454 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: d2585e63-66b9-44b6-a76e-4f4b217d97fd X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: pf7RlGzfJwdqVQ7O1KcKfwrGMJKBSfIt0vIMHqSJvRw1RHiR91/xRjHu/GLVT7POCSyMu0+reW+aKkOIVERc8w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1P189MB3003 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 11 Jun 2026 06:13:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto-patches/message/4205 Use Buildbot StringDownload for repo metadata JSON instead of shell printf. This transfers scheduler-supplied repo values as file content without shell interpretation. AI-Generated: Claude Opus 4.6 Signed-off-by: Anders Heimer --- steps/writebbsetupjson.py | 19 +++++++------------ steps/writelayerinfo.py | 19 +++++++------------ 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/steps/writebbsetupjson.py b/steps/writebbsetupjson.py index da8d434..e1f1463 100644 --- a/steps/writebbsetupjson.py +++ b/steps/writebbsetupjson.py @@ -5,9 +5,8 @@ # from twisted.internet import defer -from buildbot.process import buildstep +from buildbot.plugins import steps import json -import os from yoctoabb import config @@ -15,11 +14,11 @@ mappings = { "oecore" : "openembedded-core", } -class WriteBBSetupJson(buildstep.ShellMixin, buildstep.BuildStep): +class WriteBBSetupJson(steps.StringDownload): name = "WriteBBSetupJson" def __init__(self, **kwargs): - buildstep.BuildStep.__init__(self, **kwargs) + super().__init__(s="", workerdest="bbsetup-overrides.json", **kwargs) def generateSetupJson(self): setupdata = {} @@ -66,14 +65,10 @@ class WriteBBSetupJson(buildstep.ShellMixin, buildstep.BuildStep): @defer.inlineCallbacks def run(self): - repojson = self.generateSetupJson() - layerinfo = os.path.join(self.getProperty("builddir"), - "bbsetup-overrides.json") - writerepos = "printf '%s' > %s" % (repojson, layerinfo) - cmd = yield self.makeRemoteShellCommand( - command=writerepos) - yield self.runCommand(cmd) - return cmd.results() + self.s = self.generateSetupJson() + self.workdir = self.getProperty("builddir") + result = yield super().run() + return result @defer.inlineCallbacks diff --git a/steps/writelayerinfo.py b/steps/writelayerinfo.py index a0669bd..009e9fc 100644 --- a/steps/writelayerinfo.py +++ b/steps/writelayerinfo.py @@ -3,18 +3,17 @@ # from twisted.internet import defer -from buildbot.process import buildstep +from buildbot.plugins import steps import json -import os from yoctoabb import config -class WriteLayerInfo(buildstep.ShellMixin, buildstep.BuildStep): +class WriteLayerInfo(steps.StringDownload): name = "WriteLayerInfo" def __init__(self, **kwargs): - buildstep.BuildStep.__init__(self, **kwargs) + super().__init__(s="", workerdest="layerinfo.json", **kwargs) def generateLayerInfo(self): layerinfo = {} @@ -34,14 +33,10 @@ class WriteLayerInfo(buildstep.ShellMixin, buildstep.BuildStep): @defer.inlineCallbacks def run(self): - repojson = self.generateLayerInfo() - layerinfo = os.path.join(self.getProperty("builddir"), - "layerinfo.json") - writerepos = "printf '%s' > %s" % (repojson, layerinfo) - cmd = yield self.makeRemoteShellCommand( - command=writerepos) - yield self.runCommand(cmd) - return cmd.results() + self.s = self.generateLayerInfo() + self.workdir = self.getProperty("builddir") + result = yield super().run() + return result @defer.inlineCallbacks