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 99F93E92734 for ; Mon, 29 Dec 2025 15:16:33 +0000 (UTC) Received: from 5.mo581.mail-out.ovh.net (5.mo581.mail-out.ovh.net [178.32.120.239]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.44886.1767021386369913040 for ; Mon, 29 Dec 2025 07:16:27 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@3mdeb.com header.s=ovhmo3617313-selector1 header.b=LYKRkQQ+; spf=softfail (domain: 3mdeb.com, ip: 178.32.120.239, mailfrom: daniil.klimuk@3mdeb.com) Received: from director10.ghost.mail-out.ovh.net (unknown [10.109.254.190]) by mo581.mail-out.ovh.net (Postfix) with ESMTP id 4dg0DS1mxBz5xX6 for ; Mon, 29 Dec 2025 15:16:23 +0000 (UTC) Received: from ghost-submission-7d8d68f679-pwml8 (unknown [10.111.182.237]) by director10.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 8DF4DC0F4E; Mon, 29 Dec 2025 15:16:23 +0000 (UTC) Received: from 3mdeb.com ([37.59.142.111]) by ghost-submission-7d8d68f679-pwml8 with ESMTPSA id 92apCEebUmmypCYAvvdGeg (envelope-from ); Mon, 29 Dec 2025 15:16:23 +0000 Authentication-Results: garm.ovh; auth=pass (GARM-111S0050e5e42ae-1c4c-427c-b077-a3bf721bb760, 6F64A10C1D0CE58CE329BB858DC4AFDCD05F0F8B) smtp.auth=daniil.klimuk@3mdeb.com X-OVh-ClientIp: 213.192.77.249 Message-ID: Date: Mon, 29 Dec 2025 16:16:22 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US Cc: Maciej Pijanowski , "piotr.krol@3mdeb.com" From: Danill Klimuk Subject: Dynamically load patch series from fetched rep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uuKm4XED3uYvFGe9GB97+SQqpXoVjKHi8o6W2in4DW15gPwGPL4DSVgPraF smEioV280TfrNDbJG5aznmGq2IVIl4A09Ztw4adEySXXKLIDNWYesRc5Ae9TIwtpgjXKgrLi tkwvqW2Us8kmHBeOgA5z9td3qycAEQEAAcLBfAQYAQgAJhYhBKcSgU7HMNDVVPP3pECEzhZn a9gWBQJoUCV/AhsMBQkFqUQqAAoJEECEzhZna9gWkv4P/1MF+9afcXFWPlQSTv+rrgTJXyCg WxJs+eVX7y5kG/At0/iak415bg0QVvDghidM7f0+jcjWWlWJor/h6a0j3T43iCfjVN+cUx8h E2FnatVgkE+9BdDVXl6LlhyQBv8PlMO2NLNSvIZ0joXe958xVB5EzZkZkmbFl+r9LQlqz+oY nfhsrclDyvcrHJKjLWme2dreayerCui/C9zbf2AWeuLQyd+TWhWydObGLh7Fgz5dam/k+Pom LriE23V/TeTV56MeQswci5MCe/w4/fUUPu8A0/0VZE6lFSS0XIt7tNkkFSvAJtwUaCcki7pu zw8+R5AIFZxBb/Sf5ELn+RXabtlENqKaxm8gt9YQ+bNpbpbMts4Wra40qHI90jC3DacMXW1s KP3we2J0u/U4/ig1CoRngk8btg3PzPDfsZji5ZOrkkaLimSzuvNybhtVCfteuhWIGYAmU83j lq+YpTx9PMhCa4iE8d7pAudh/dnKw7AaXCSa0N8HvoBV/wEAGds4aGnryruz824GR1QZumCH oVlvEohEE67fmjeWcO6Oms7wCdcIA0Wxjw6qZDQ4xpa31QqbGgcOH2uKkflNHh/DfgCOM6EV KWFN+TbmJv11d1e/Umb2dypn6liU+uAU6coJjkEJk/C8SpYohLhBRDBWobUi/4LbPGnrjMGA x3ry0XT0 Organization: 3mdeb To: yocto@lists.yoctoproject.org Content-Type: text/plain; charset=UTF-8; format=flowed X-Ovh-Tracer-Id: 11188911801580819472 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: dmFkZTFclavVnn7Xh62WupG8X79LEvHbrvG4W53P1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/x9KBLvdbzNxfo8usmAFIMs5JyVI9ajkAhY9k8UHGQ== Content-Transfer-Encoding: quoted-printable 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 ; Mon, 29 Dec 2025 15:16:33 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/yocto/message/66127 Hi everyone. I am looking for a way to use patches in recipes without=20 adding them to layers and then mentioning directly in SRC_URI. An=20 example workflow would be: 1. Fetch a repository that is added in SRC_URI, using either git or=20 other available methods. 2. Check out the specific head in the repository=C2=A0 (a branch or a com= mit). 3. Let do_fetch or do_patch search for either a "series" file or a list=20 of patches in the repository. 4. Apply the patches. The only problem I see in the proposed flow is the 3rd step. Some=20 repositories may contain patches that could be applied to different=20 tools or packages. And a recipe that is responsible for a package A can=20 try to apply patches for a package B that is being stored in the same=20 repository with patches. Hence, the 3rd step should be restricted=20 somehow. An example could be a variable that will point out the place in=20 the repository with patches where the recipe for package A should search=20 patches. The variable can utilize overrides to customize patch queues=20 further. An example of the repository with patches can be found here:=20 https://github.com/Dasharo/dasharo-pq/tree/flashrom-testing/flashrom .=20 The idea here is not to copy and paste the huge amount of patches into=20 different build systems, but to have a single place where all patches=20 are added and maintained. Other pros for this solution: * Clear separation of concerns: Build systems remain focused on=20 configuration and integration logic, while patch content and maintenance=20 are handled elsewhere. This keeps repositories smaller, cleaner, and=20 easier to reason about. * Single source of truth: A centralized patch repository establishes a=20 clear, authoritative source for all modifications. This avoids ambiguity=20 about which patch version is =E2=80=9Ccorrect=E2=80=9D and prevents subtl= e divergences=20 that can arise when the same patch is copied and slightly adjusted=20 across multiple build systems. * Simplified updates and backports: Bug fixes, improvements, or rebases=20 of patches need to be done only once. Downstream users automatically=20 benefit from updates without having to manually replicate changes or=20 re-evaluate multiple patch copies. * Reduced review and validation effort: Code review, testing, and=20 validation can focus on a single patch location. This is especially=20 valuable for large or security-sensitive patch sets, where duplicated=20 reviews across repositories would waste time and increase the chance of=20 missed issues. * Improved traceability and auditing: A centralized repository provides=20 a complete history of why and when patches were introduced, modified, or=20 dropped. This is important for audits, compliance requirements, and=20 post-mortem analyses, especially in firmware or low-level tooling context= s. * Lower risk during upstream transitions: When patches are eventually=20 upstreamed or dropped due to new upstream releases, central management=20 ensures that all consumers transition in lockstep. This avoids=20 situations where some build systems still rely on patches that are no=20 longer needed, or worse: no longer compatible. Let me know if you have a better proposition for the implementation flow=20 I have presented, or if I have missed some already existing technology=20 in the Yocto Project. Either my colleagues or I would be eager to=20 contribute such a feature to the project. --=20 Best regards, Daniil Klimuk. 3mdeb Zarhus Team Leader. https://3mdeb.com | @3mdeb_com