From patchwork Wed Nov 6 09:02:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 52087 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 859CAD29FBF for ; Wed, 6 Nov 2024 09:02:55 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.web10.41688.1730883774650315571 for ; Wed, 06 Nov 2024 01:02:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=pRvx6xDh; spf=pass (domain: baylibre.com, ip: 209.85.128.47, mailfrom: jstephan@baylibre.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-431481433bdso57210295e9.3 for ; Wed, 06 Nov 2024 01:02:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730883773; x=1731488573; darn=lists.yoctoproject.org; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=yjc+cCaSrTj6YRBRbSTWLWixNioSKrrMjhlnx2xBkBo=; b=pRvx6xDhdKBjxNUcABTggrURX0/p7D5+vr6GOnRWRx0huxau5+KPJ9iolvEMDGFTlQ QqfWo8AgNatraDSthLGlHdOvGx2Uhp9BYo3shkNeBAmxyIIMwgLI60VUbxnL0hy3syFE rBqJy6v88Qglc6jfiNy0gq1Fm43ND+cWf4Mf6PA+Jck3BvZUikr0ztkjjZTBiRgBsGtI SHRIuMZH7Y7khESCrXEhSMuR5fCjyJk3EaV9oidhGdRSEYaASDHhQiQq8uBWY4bDzsPC 5Yrari29UR5zUcUNLx5uekOxSX2APJIgohjjKKyX4fD2ASjfQXsD8lNB2krAvSfFV5pd UOzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730883773; x=1731488573; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yjc+cCaSrTj6YRBRbSTWLWixNioSKrrMjhlnx2xBkBo=; b=QXADQkMynb7T0NugY2fHQ3WfWCO54bNUZR+R/rVFggFa1EjoDTbR40OlPsG9xC4+jO Ok/J28kF2HKfXaF1xqpJEY6nV7mQiFQ53Vqnck6N9j+1Uqk5S26HWsw4nH9pFP5Lmoiu k3YpBhWcRN2hP6UeSfdEYNAjBZur0u0zkChwYaH6sFdOSIUMbmnC1bf3qSRwSUyKbW7d PoKxUHl3E9/IG5Yya5M/3yy0XABJx/BgrW1BwIg8V9rb+WX/EA0QnLT7JLj5PfoHEaxF +QSulI6hsaccxqe2AFaM0byyuB2gT4TNkrxM/y62BhXaLPKsVCaG675OX0vb3HdSAnNR zqqg== X-Gm-Message-State: AOJu0YwFRweg5QfMjVkBCBuEBvBKUMGkSAaArtwOnfUeinUaODQF8G/L AM1kyjnXFD5p70ROWQcLGzoyVEzpxtun4f1dCeRYtmF9YYWfLs0SL6s/iZ9ZWLolPVMc6VgXfdz b3Yg= X-Google-Smtp-Source: AGHT+IERf6vTPGJjjk3Y25LctWVN9rSwSFV7estg4NLQ6NXq+VaOZmnasEGKoI4c7jIfz4bs4odnGQ== X-Received: by 2002:a5d:5a86:0:b0:381:e744:90c2 with SMTP id ffacd0b85a97d-381e744910fmr2600265f8f.36.1730883772436; Wed, 06 Nov 2024 01:02:52 -0800 (PST) Received: from jstephan-bl.local (2a02-842a-d52e-6101-6fd0-06c4-5d68-f0a5.rev.sfr.net. [2a02:842a:d52e:6101:6fd0:6c4:5d68:f0a5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e694sm18671637f8f.86.2024.11.06.01.02.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 01:02:52 -0800 (PST) From: Julien Stephan Date: Wed, 06 Nov 2024 10:02:40 +0100 Subject: [PATCH v4 1/3] styles: vocabularies: Yocto: add sstate MIME-Version: 1.0 Message-Id: <20241106-add-bblock-documentation-v4-1-9f24dfe69243@baylibre.com> References: <20241106-add-bblock-documentation-v4-0-9f24dfe69243@baylibre.com> In-Reply-To: <20241106-add-bblock-documentation-v4-0-9f24dfe69243@baylibre.com> To: docs@lists.yoctoproject.org, Julien Stephan X-Mailer: b4 0.14.2 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 06 Nov 2024 09:02:55 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/5692 Add sstate as an accepted word to avoid errors when runnign make stylecheck. Signed-off-by: Julien Stephan --- documentation/styles/config/vocabularies/Yocto/accept.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/documentation/styles/config/vocabularies/Yocto/accept.txt b/documentation/styles/config/vocabularies/Yocto/accept.txt index ca622ba41274c892f1fc1e16d8332a02f07a3531..7fedda8ae23c22f3660292faa0a1c3df23da353e 100644 --- a/documentation/styles/config/vocabularies/Yocto/accept.txt +++ b/documentation/styles/config/vocabularies/Yocto/accept.txt @@ -2,4 +2,5 @@ BitBake BSP crosstap OpenEmbedded +sstate Yocto From patchwork Wed Nov 6 09:02:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 52088 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 86E6ED3E78C for ; Wed, 6 Nov 2024 09:02:55 +0000 (UTC) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mx.groups.io with SMTP id smtpd.web11.41557.1730883774666643672 for ; Wed, 06 Nov 2024 01:02:54 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=R8ATs/5j; spf=pass (domain: baylibre.com, ip: 209.85.221.46, mailfrom: jstephan@baylibre.com) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-37d4b0943c7so4082817f8f.1 for ; Wed, 06 Nov 2024 01:02:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730883773; x=1731488573; darn=lists.yoctoproject.org; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=w5tXY0w5inM3IyaEZ/OV9NrTUpfncMLc0LDSBbGk8OY=; b=R8ATs/5jcFqPNdlDNL3WV4VsAb+GvRfBPz3WASnVM5NhOXqJ5Ubza/vT/iO+KcSSjn My9W5glUd5V25fwH/6Ir4YRRXRYjdyMOaRTDYecqZD3l5BrKwhEnSJMO5AC9gN4GxkQ4 y7zWN0ifsSM/sCsZUfSfFyUPNVj0yCfSYMYZC6K+SHttOlrUEiSS6iZY040ej84pgjGf bJ3POGaaVq5S0dnTT78H5JFfFkMfaGLDF06RzFA3Y/eyBjb2PFs+C9ITe/BUSnDm+jlq zsbHzLH2TYnN/fqMKp7qCRD5GwSt0X7SuVT+AmPAS+zHLT+AJ4rz9ZyPmmlWto9DOkDB XYBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730883773; x=1731488573; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=w5tXY0w5inM3IyaEZ/OV9NrTUpfncMLc0LDSBbGk8OY=; b=CqU2ugtgqmNXeBBn0cdg+s2dz8D7urawjSizWmCyaEDFE6SXUbukBdGva1CGTXyH00 aL59IzW43kbtlWNRItop4kLyNxk8D6PNsT/P+UJGJDlOHyywoljQ4EHpHEeTaTYZBjZw Af2wlCajP8psqpUkHZcWK9BdUY8ZoTPhj4zakcxnUzTlIrwzRy04zIx+bnHXoFpL7W7d AG/P2425QBvD3W7t18X4/ZI0eA1wXQ1vyx138CVTBxtBReBeKxdc1S7NFnaKBcFl3121 /KyeEqhoh7nMFcqPm+XfiwKoMI6HOD78xJwu+Y9VygjWr5YHfxyRcG3gxCCT+pm5vQHx RDCA== X-Gm-Message-State: AOJu0YwQjgqYaLldGZNHzpUfQBXhGxJCJN0UAWT++PbrMF0GhMOKWYjU 8uPbySZqeeijdI68qRVbwINerc1oycg+scsVJJiczy9pacE/Q7GO4eoqHpb641g= X-Google-Smtp-Source: AGHT+IFKt4MQiuFgnUbZxau73sPRc/YfTL1CqzmRjLw2w1gQAIjmIUZm7Op3SqTFbhixcEsIXgpZkw== X-Received: by 2002:a5d:6083:0:b0:37d:5436:4a1 with SMTP id ffacd0b85a97d-380610f2575mr24529935f8f.3.1730883773005; Wed, 06 Nov 2024 01:02:53 -0800 (PST) Received: from jstephan-bl.local (2a02-842a-d52e-6101-6fd0-06c4-5d68-f0a5.rev.sfr.net. [2a02:842a:d52e:6101:6fd0:6c4:5d68:f0a5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e694sm18671637f8f.86.2024.11.06.01.02.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 01:02:52 -0800 (PST) From: Julien Stephan Date: Wed, 06 Nov 2024 10:02:41 +0100 Subject: [PATCH v4 2/3] ref-manual: variables: add SIGGEN_LOCKEDSIGS* variables MIME-Version: 1.0 Message-Id: <20241106-add-bblock-documentation-v4-2-9f24dfe69243@baylibre.com> References: <20241106-add-bblock-documentation-v4-0-9f24dfe69243@baylibre.com> In-Reply-To: <20241106-add-bblock-documentation-v4-0-9f24dfe69243@baylibre.com> To: docs@lists.yoctoproject.org, Julien Stephan X-Mailer: b4 0.14.2 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 06 Nov 2024 09:02:55 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/5693 Variables SIGGEN_LOCKEDSIGS, SIGGEN_LOCKEDSIGS_TASKSIG_CHECK and SIGGEN_LOCKEDSIGS_TYPES are used to lock specific tasks to specific signatures. They are used by bitbake -S and bblock, so add documentation for them. Signed-off-by: Julien Stephan --- documentation/ref-manual/variables.rst | 44 ++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 07ed143ac5606617c720301ac6621355a341f90a..76fc50ecbfb841125860e7dac42d4d4c102942cf 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -7880,6 +7880,50 @@ system and gives an overview of their function and contents. might break at runtime if the interface of the recipe was changed after the other had been built. + :term:`SIGGEN_LOCKEDSIGS` + The list of locked tasks, with the form:: + + SIGGEN_LOCKEDSIGS += "::" + + If ```` exists for the specified ```` and ```` + in the sstate cache, BitBake will use the cached output instead of + rebuilding the ````. If it does not exist, BitBake will build the + ```` and the sstate cache will be used next time. + + Example:: + + SIGGEN_LOCKEDSIGS += "bc:do_compile:09772aa4532512baf96d433484f27234d4b7c11dd9cda0d6f56fa1b7ce6f25f0" + + You can obtain the signature of all the tasks for the recipe ``bc`` using:: + + bitbake -S none bc + + Then you can look at files in ``build/stamps//bc`` and search for the + file: ``.do_compile.sigdata.09772aa4532512baf96d433484f27234d4b7c11dd9cda0d6f56fa1b7ce6f25f0``. + + :term:`SIGGEN_LOCKEDSIGS_TASKSIG_CHECK` + Specifies the debug level of task signature check. 3 levels are supported: + + * ``info``: displays a "Note" message to remind the user that a task is locked + and the current signature matches the locked one. + * ``warn``: displays a "Warning" message if a task is locked and the current + signature does not match the locked one. + * ``error``: same as warn but displays an "Error" message and aborts. + + :term:`SIGGEN_LOCKEDSIGS_TYPES` + Allowed overrides for :term:`SIGGEN_LOCKEDSIGS`. This is mainly used + for architecture specific locks. A common value for + :term:`SIGGEN_LOCKEDSIGS_TYPES` is ``${PACKAGE_ARCHS}``:: + + SIGGEN_LOCKEDSIGS_TYPES += "${PACKAGE_ARCHS}" + + SIGGEN_LOCKEDSIGS_core2-64 += "bc:do_compile:09772aa4532512baf96d433484f27234d4b7c11dd9cda0d6f56fa1b7ce6f25f0" + SIGGEN_LOCKEDSIGS_cortexa57 += "bc:do_compile:12178eb6d55ef602a8fe638e49862fd247e07b228f0f08967697b655bfe4bb61" + + Here, the ``do_compile`` task from ``bc`` will be locked only for + ``core2-64`` and ``cortexa57`` but not for other architectures such as + ``mips32r2``. + :term:`SITEINFO_BITS` Specifies the number of bits for the target system CPU. The value should be either "32" or "64". From patchwork Wed Nov 6 09:02:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Stephan X-Patchwork-Id: 52089 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 7DA44D29FBF for ; Wed, 6 Nov 2024 09:03:05 +0000 (UTC) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mx.groups.io with SMTP id smtpd.web10.41689.1730883775722145964 for ; Wed, 06 Nov 2024 01:02:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=uU4poKNl; spf=pass (domain: baylibre.com, ip: 209.85.221.41, mailfrom: jstephan@baylibre.com) Received: by mail-wr1-f41.google.com with SMTP id ffacd0b85a97d-37d5689eea8so3780056f8f.1 for ; Wed, 06 Nov 2024 01:02:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1730883774; x=1731488574; darn=lists.yoctoproject.org; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=WGRUqq9LgjV0yFho074KfjA1nRBGS4aqTaV94QyREmI=; b=uU4poKNlXsMg4YBoJ8lkyZVtfxv6lM6ulxBlxkl3VQIhjHDDfRRpRLoynkC82QZ0kx 50EpPRmsEsNw1Rc7G+x9iNipB0V9eoBeG6KZqVOqZ4mMamfY0rcYFH1qxb+PR/ystR7M 5sjy5myvfnUsQaVm6Bf1CEJibQ62bVBymAJmcRhNgYKMng8bfF8a7YOgXNJiMyjokQ33 7lXau14a341W0RYNd5eNZjKHmTjaeANDVGu0OQE2WbrEMbdPgdSVC4XXwhTXo9LlTWLI rSw3/YBsOUUYsSRGi2yN17vl7VaaAjIoDtxaFnxComE7wCBOin+JyAl9fIgPfBkeuR81 HMNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730883774; x=1731488574; h=to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WGRUqq9LgjV0yFho074KfjA1nRBGS4aqTaV94QyREmI=; b=p6uNctZWck///eBSZWOY7mx02T0jyg4i7jp13Huy14CAaQmNmZA254jaL83a+Zke82 minMLr6Fj5tBaISZTRdvnyDQdmXE/tRAOssPdPgjQsBl3x0bhbrwxsrDoTs9NBXOZ/eN qMMPqNB7aCXZcHk/hW5QET2yGWrBN87a0SIYcAyKPDAFikRsH52G2LOh1sbJiIFI9el7 tt61RDABRebDbFvI3yk4fayJPxrfDHJ9W86NytBsw/Gy3tQ1x8otNRt/wAzp9e3pZhti oyjcIp4zwqzQDPwbKeFDHoGqD8CN2IyLKlOjWVcO8xMYj/GWM1Q2vZaM+SOGVmP1K9RP 94Kw== X-Gm-Message-State: AOJu0YxFZEoaB1CCXWE/KPlYr3vn71+7tq7vSeFQ3su2YYIuSYhvAsW4 VOugzMp1088hnJ+AkqjDHJaXS6q47mkqmhtPorKDnTkXMl+0APsckQcD8H5xxm2ZhotSkCGfFOT TKs8= X-Google-Smtp-Source: AGHT+IFkQuBBh5GenGZZNcWoZkdcDeYYMCRIL7K/xmtMwH89t/Qzbbei0aVZxuI5Xi9z9GCEVLl9kw== X-Received: by 2002:adf:eac9:0:b0:37d:4ebe:164c with SMTP id ffacd0b85a97d-38061200742mr28397312f8f.45.1730883774019; Wed, 06 Nov 2024 01:02:54 -0800 (PST) Received: from jstephan-bl.local (2a02-842a-d52e-6101-6fd0-06c4-5d68-f0a5.rev.sfr.net. [2a02:842a:d52e:6101:6fd0:6c4:5d68:f0a5]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-381c113e694sm18671637f8f.86.2024.11.06.01.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Nov 2024 01:02:53 -0800 (PST) From: Julien Stephan Date: Wed, 06 Nov 2024 10:02:42 +0100 Subject: [PATCH v4 3/3] dev-manual: add bblock documentation MIME-Version: 1.0 Message-Id: <20241106-add-bblock-documentation-v4-3-9f24dfe69243@baylibre.com> References: <20241106-add-bblock-documentation-v4-0-9f24dfe69243@baylibre.com> In-Reply-To: <20241106-add-bblock-documentation-v4-0-9f24dfe69243@baylibre.com> To: docs@lists.yoctoproject.org, Julien Stephan X-Mailer: b4 0.14.2 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 06 Nov 2024 09:03:05 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/5694 bblock is a helper tool to lock/unlock tasks and recipes to specific signatures. Add a documentation page for it. Signed-off-by: Julien Stephan --- documentation/dev-manual/bblock.rst | 129 +++++++++++++++++++++++++++++++++ documentation/dev-manual/index.rst | 1 + documentation/ref-manual/structure.rst | 9 +++ documentation/ref-manual/variables.rst | 3 + 4 files changed, 142 insertions(+) diff --git a/documentation/dev-manual/bblock.rst b/documentation/dev-manual/bblock.rst new file mode 100644 index 0000000000000000000000000000000000000000..68292903bab039ad66936a5061887a0ed569dfb4 --- /dev/null +++ b/documentation/dev-manual/bblock.rst @@ -0,0 +1,129 @@ +.. SPDX-License-Identifier: CC-BY-SA-2.0-UK + +Locking and Unlocking Recipes Using ``bblock`` +********************************************** + +By design, the OpenEmbedded build system builds everything from scratch +unless BitBake determines that specific tasks do not require rebuilding. +At startup, it computes a signature for all tasks, based on the task's input. +Then, it compares these signatures with the ones from the sstate cache (if they +exist). Any changes cause the task to rerun. + +During development, changes might trigger BitBake to rebuild certain +recipes, even when we know they do not require rebuilding at that stage. +For example, modifying a recipe can lead to rebuilding its native +counterpart, which might prove unnecessary. Editing the ``python3`` recipe, +for instance, can prompt BitBake to rebuild ``python3-native`` along with any +recipes that depend on it. + +To prevent this, use ``bblock`` to lock specific tasks or recipes to +specific signatures, forcing BitBake to use the sstate cache for them. + +.. attention:: + + Use ``bblock`` only during the development phase. + + Forcing BitBake to use the sstate cache, regardless of input changes, means + the recipe metadata no longer directly reflect the output. Use this feature + with caution. If you do not understand why signatures change, see the section + on :yocto_wiki:`understanding what changed `. + + +Locking tasks and recipes +------------------------- + +To lock a recipe, use:: + + $ bblock recipe + +You can also use a space-separated list of recipes to lock multiple recipes:: + + $ bblock recipe1 recipe2 + +Locking a recipe means locking all tasks of the recipe. If you need to +lock only particular tasks, use the `-t` option with a comma-separated +list of tasks:: + + $ bblock -t task1,task2 recipe + + +Unlocking tasks and recipes +--------------------------- + +To unlock a recipe, use the ``-r`` option:: + + $ bblock -r recipe + +You can also use a space-separated list of recipes to unlock multiple recipes:: + + $ bblock -r recipe1 recipe2 + +Unlocking a recipe means unlocking all tasks of the recipe. If you need to +unlock only particular tasks use the ``-t`` option with a comma-separated +list of tasks:: + + $ bblock -r -t task1,task2 recipe + +To unlock all recipes, do not specify any recipe:: + + $ bblock -r + + +Configuration file +------------------ + +``bblock`` will dump the signatures in the ``build/conf/bblock.conf`` file, +included by default in :oe_git:`meta/conf/bitbake.conf `. + +To dump the file, use the ``-d`` option:: + + $ bblock -d + + +Locking mechanism +----------------- + +``bblock`` computes the signature(s) of the task(s) and sets the 3 following +variables: :term:`SIGGEN_LOCKEDSIGS`, :term:`SIGGEN_LOCKEDSIGS_TYPES` +and :term:`SIGGEN_LOCKEDSIGS_TASKSIG_CHECK`. + +In particular, ``bblock`` sets:: + + SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "info" + SIGGEN_LOCKEDSIGS_TYPES += "${PACKAGE_ARCHS}" + + SIGGEN_LOCKEDSIGS_ += "::" + +This produces architecture specific locks and reminds user that some tasks +have locked signatures. + +Example +------- + +When working on the ``python3`` recipe, we can lock ``python3-native`` with +the following:: + + $ bblock python3-native + $ bblock -d + # Generated by bblock + SIGGEN_LOCKEDSIGS_TASKSIG_CHECK = "info" + SIGGEN_LOCKEDSIGS_TYPES += "${PACKAGE_ARCHS}" + + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_patch:865859c27e603ba42025b7bb766c3cd4c0f477e4962cfd39128c0619d695fce7" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_populate_sysroot:f8fa5d3194cef638416000252b959e86d0a19f6b7898e1f56b643c588cdd8605" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_prepare_recipe_sysroot:fe295ac505d9d1143313424b201c6f3f2a0a90da40a13a905b86b874705f226a" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_fetch:1b6e4728fee631bc7a8a7006855c5b8182a8224579e32e3d0a2db77c26459f25" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_unpack:2ad74d6f865ef75c35c0e6bbe3f9a90923a6b2c62c18a3ddef514ea31fbc588f" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_deploy_source_date_epoch:15f89b8483c1ad7507480f337619bb98c26e231227785eb3543db163593e7b42" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_configure:7960c13d23270fdb12b3a7c426ce1da0d2f5c7cf5e5d3f5bdce5fa330eb7d482" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_compile:012e1d4a63f1a78fc2143bd90d704dbcf5865c5257d6272aa7540ec1cd3063d9" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_install:d3401cc2afa4c996beb154beaad3e45fa0272b9c56fb86e9db14ec3544c68f9d" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_build:fa88bb7afb9046c0417c24a3fa98a058653805a8b00eda2c2d7fea68fc42f882" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_collect_spdx_deps:cc9c53ba7c495567e9a38ec4801830c425c0d1f895aa2fc66930a2edd510d9b4" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_create_spdx:766a1d09368438b7b5a1a8e2a8f823b2b731db44b57e67d8b3196de91966f9c5" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_create_package_spdx:46f80faeab25575e9977ba3bf14c819489c3d489432ae5145255635108c21020" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_recipe_qa:cb960cdb074e7944e894958db58f3dc2a0436ecf87c247feb3e095e214fec0e4" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_populate_lic:15657441621ee83f15c2e650e7edbb036870b56f55e72e046c6142da3c5783fd" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_create_manifest:24f0abbec221d27bbb2909b6e846288b12cab419f1faf9f5006ed80423d37e28" + SIGGEN_LOCKEDSIGS_x86_64 += "python3-native:do_addto_recipe_sysroot:bcb6a1905f113128de3f88d702b706befd6a786267c045ee82532759a7c214d7" + diff --git a/documentation/dev-manual/index.rst b/documentation/dev-manual/index.rst index 9ccf60f7012ea344612298e77ebabed84ad6de3e..7afd0d820e94d56cb2145962b9b1a976c7951936 100644 --- a/documentation/dev-manual/index.rst +++ b/documentation/dev-manual/index.rst @@ -48,5 +48,6 @@ Yocto Project Development Tasks Manual error-reporting-tool wayland qemu + bblock .. include:: /boilerplate.rst diff --git a/documentation/ref-manual/structure.rst b/documentation/ref-manual/structure.rst index bbeda78c791d430faa55356a3209f5eeb1402837..616c3c4c9bf375bb60ab34587b2c70bdb42d280b 100644 --- a/documentation/ref-manual/structure.rst +++ b/documentation/ref-manual/structure.rst @@ -335,6 +335,15 @@ Once the build process gets the sample file, it uses ``sed`` to substitute final version of the ``bblayers.conf.sample`` file in the ``meta-poky/conf/templates/default`` directory. +.. _structure-build-conf-bblock.conf: + +``build/conf/bblock.conf`` +-------------------------- + +This configuration file is generated by :doc:`bblock ` and +contains the signatures locked by ``bblock``. By default, it does not exist +and will be created upon the first invocation of ``bblock``. + .. _structure-build-downloads: ``build/downloads/`` diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index 76fc50ecbfb841125860e7dac42d4d4c102942cf..831b7c54c89bdeb64b8ce3bbf512a510b94dfc02 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -7901,6 +7901,9 @@ system and gives an overview of their function and contents. Then you can look at files in ``build/stamps//bc`` and search for the file: ``.do_compile.sigdata.09772aa4532512baf96d433484f27234d4b7c11dd9cda0d6f56fa1b7ce6f25f0``. + Alternatively, you can also use :doc:`bblock ` to + generate this line for you. + :term:`SIGGEN_LOCKEDSIGS_TASKSIG_CHECK` Specifies the debug level of task signature check. 3 levels are supported: