From patchwork Wed Sep 20 08:15:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30778 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 40C48CE79AD for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by mx.groups.io with SMTP id smtpd.web10.32190.1695197764550383958 for ; Wed, 20 Sep 2023 01:16:05 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=KneFNWoF; spf=pass (domain: bootlin.com, ip: 217.70.183.199, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 7C79DFF80C; Wed, 20 Sep 2023 08:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197762; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gmt6rdccRiV6HSJewSWHfg/UDhkaEMulrQZpTG0+U1U=; b=KneFNWoFdmWPSwEpH0aGbgad3L3e5CXN9L6HU4VRQ3RdVZxbGHX2M2r/1YoAClywI1GWWC orqPlOyWFrhun05UZHiP+kGHx6bj1cyyiESWgMGMXbBDvzFvqI1EpyEni1CHwyjgrV0NSC 4eZmI5hfnrGNd8E4sDiAf3EFSwUoWfDuxy9O+bxChBdYAFhOWZKy+LzbMi/I0khE4eDaEH xqMHrRCY89a+yMXNTcVjYMqDu2lBg6ct2hSL+1NZXAU7y/dRqLuBy4beaF0InSnwA8+PXS jVe9OhmqXAxXTyotY1DAy/SrXXP4YRviIQpHx5zUTYvCgl8hgt4OPXXPGHbq6A== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirkstone][PATCH 01/10] sdk-manual: extensible.rst: align with master branch Date: Wed, 20 Sep 2023 10:15:35 +0200 Message-Id: <20230920081544.1226760-2-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4249 From: Michael Opdenacker In particular, this addresses multiple formatting issues. Aligning with the master branch as all updates apply to kirkstone too. Signed-off-by: Michael Opdenacker --- documentation/sdk-manual/extensible.rst | 389 ++++++++++++------------ 1 file changed, 202 insertions(+), 187 deletions(-) diff --git a/documentation/sdk-manual/extensible.rst b/documentation/sdk-manual/extensible.rst index 18a2b59c96..355c6cb0e4 100644 --- a/documentation/sdk-manual/extensible.rst +++ b/documentation/sdk-manual/extensible.rst @@ -41,6 +41,44 @@ functionality. Installing the Extensible SDK ============================= +Two ways to install the Extensible SDK +-------------------------------------- + +Extensible SDK can be installed in two different ways, and both have +their own pros and cons: + +#. *Setting up the Extensible SDK environment directly in a Yocto build*. This + avoids having to produce, test, distribute and maintain separate SDK + installer archives, which can get very large. There is only one environment + for the regular Yocto build and the SDK and less code paths where things can + go not according to plan. It's easier to update the SDK: it simply means + updating the Yocto layers with git fetch or layer management tooling. The + SDK extensibility is better than in the second option: just run ``bitbake`` + again to add more things to the sysroot, or add layers if even more things + are required. + +#. *Setting up the Extensible SDK from a standalone installer*. This has the + benefit of having a single, self-contained archive that includes all the + needed binary artifacts. So nothing needs to be rebuilt, and there is no + need to provide a well-functioning binary artefact cache over the network + for developers with underpowered laptops. + +Setting up the Extensible SDK environment directly in a Yocto build +------------------------------------------------------------------- + +#. Set up all the needed layers and a Yocto :term:`Build Directory`, e.g. a regular Yocto + build where ``bitbake`` can be executed. + +#. Run:: + + $ bitbake meta-ide-support + $ bitbake -c populate_sysroot gtk+3 + # or any other target or native item that the application developer would need + $ bitbake build-sysroots + +Setting up the Extensible SDK from a standalone installer +--------------------------------------------------------- + The first thing you need to do is install the SDK on your :term:`Build Host` by running the ``*.sh`` installation script. @@ -102,16 +140,7 @@ must be writable for whichever users need to use the SDK. The following command shows how to run the installer given a toolchain tarball for a 64-bit x86 development host system and a 64-bit x86 target architecture. The example assumes the SDK installer is located in -``~/Downloads/`` and has execution rights. - -.. note:: - - If you do not have write permissions for the directory into which you - are installing the SDK, the installer notifies you and exits. For - that case, set up the proper permissions in the directory and run the - installer again. - -:: +``~/Downloads/`` and has execution rights:: $ ./Downloads/poky-glibc-x86_64-core-image-minimal-core2-64-toolchain-ext-2.5.sh Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.5 @@ -132,11 +161,23 @@ architecture. The example assumes the SDK installer is located in Each time you wish to use the SDK in a new shell session, you need to source the environment setup script e.g. $ . /home/scottrif/poky_sdk/environment-setup-core2-64-poky-linux +.. note:: + + If you do not have write permissions for the directory into which you + are installing the SDK, the installer notifies you and exits. For + that case, set up the proper permissions in the directory and run the + installer again. + Running the Extensible SDK Environment Setup Script =================================================== Once you have the SDK installed, you must run the SDK environment setup -script before you can actually use the SDK. This setup script resides in +script before you can actually use the SDK. + +When using a SDK directly in a Yocto build, you will find the script in +``tmp/deploy/images/qemux86-64/`` in your :term:`Build Directory`. + +When using a standalone SDK installer, this setup script resides in the directory you chose when you installed the SDK, which is either the default ``poky_sdk`` directory or the directory you chose during installation. @@ -154,11 +195,14 @@ script is for an IA-based target machine using i586 tuning:: SDK environment now set up; additionally you may now run devtool to perform development tasks. Run devtool --help for further details. -Running the setup script defines many environment variables needed in -order to use the SDK (e.g. ``PATH``, -:term:`CC`, -:term:`LD`, and so forth). If you want to -see all the environment variables the script exports, examine the +When using the environment script directly in a Yocto build, it can +be run similarly:: + + $ source tmp/deploy/images/qemux86-64/environment-setup-core2-64-poky-linux + +Running the setup script defines many environment variables needed in order to +use the SDK (e.g. ``PATH``, :term:`CC`, :term:`LD`, and so forth). If you want +to see all the environment variables the script exports, examine the installation file itself. Using ``devtool`` in Your SDK Workflow @@ -172,11 +216,8 @@ system. .. note:: - The use of - devtool - is not limited to the extensible SDK. You can use - devtool - to help you easily develop any project whose build output must be + The use of ``devtool`` is not limited to the extensible SDK. You can use + ``devtool`` to help you easily develop any project whose build output must be part of an image built using the build system. The ``devtool`` command line is organized similarly to @@ -186,15 +227,10 @@ all the commands. .. note:: - See the " - devtool -  Quick Reference - " in the Yocto Project Reference Manual for a - devtool - quick reference. + See the ":doc:`/ref-manual/devtool-reference`" + section in the Yocto Project Reference Manual. -Three ``devtool`` subcommands provide entry-points into -development: +Three ``devtool`` subcommands provide entry-points into development: - *devtool add*: Assists in adding new software to be built. @@ -233,9 +269,9 @@ shows common development flows you would use with the ``devtool add`` command: .. image:: figures/sdk-devtool-add-flow.png - :align: center + :width: 100% -1. *Generating the New Recipe*: The top part of the flow shows three +#. *Generating the New Recipe*: The top part of the flow shows three scenarios by which you could use ``devtool add`` to generate a recipe based on existing source code. @@ -252,7 +288,7 @@ command: - *Left*: The left scenario in the figure represents a common situation where the source code does not exist locally and needs to be extracted. In this situation, the source code is extracted - to the default workspace - you do not want the files in some + to the default workspace --- you do not want the files in some specific location outside of the workspace. Thus, everything you need will be located in the workspace:: @@ -267,13 +303,12 @@ command: - *Middle*: The middle scenario in the figure also represents a situation where the source code does not exist locally. In this case, the code is again upstream and needs to be extracted to some - local area - this time outside of the default workspace. + local area --- this time outside of the default workspace. .. note:: - If required, - devtool - always creates a Git repository locally during the extraction. + If required, ``devtool`` always creates a Git repository locally + during the extraction. Furthermore, the first positional argument ``srctree`` in this case identifies where the ``devtool add`` command will locate the @@ -282,8 +317,7 @@ command: $ devtool add recipe srctree fetchuri - In summary, - the source code is pulled from fetchuri and extracted into the + In summary, the source code is pulled from fetchuri and extracted into the location defined by ``srctree`` as a local Git repository. Within workspace, ``devtool`` creates a recipe named recipe along @@ -302,28 +336,26 @@ command: recipe for the code and places the recipe into the workspace. Because the extracted source code already exists, ``devtool`` does - not try to relocate the source code into the workspace - only the + not try to relocate the source code into the workspace --- only the new recipe is placed in the workspace. Aside from a recipe folder, the command also creates an associated append folder and places an initial ``*.bbappend`` file within. -2. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the +#. *Edit the Recipe*: You can use ``devtool edit-recipe`` to open up the editor as defined by the ``$EDITOR`` environment variable and modify the file:: $ devtool edit-recipe recipe - From within the editor, you - can make modifications to the recipe that take effect when you build - it later. + From within the editor, you can make modifications to the recipe that + take effect when you build it later. -3. *Build the Recipe or Rebuild the Image*: The next step you take +#. *Build the Recipe or Rebuild the Image*: The next step you take depends on what you are going to do with the new code. If you need to eventually move the build output to the target - hardware, use the following ``devtool`` command: - :; + hardware, use the following ``devtool`` command:: $ devtool build recipe @@ -334,7 +366,7 @@ command: $ devtool build-image image -4. *Deploy the Build Output*: When you use the ``devtool build`` command +#. *Deploy the Build Output*: When you use the ``devtool build`` command to build out your recipe, you probably want to see if the resulting build output works as expected on the target hardware. @@ -348,20 +380,22 @@ command: development machine. You can deploy your build output to that target hardware by using the - ``devtool deploy-target`` command: $ devtool deploy-target recipe - target The target is a live target machine running as an SSH server. + ``devtool deploy-target`` command:: + + $ devtool deploy-target recipe target + + The target is a live target machine running as an SSH server. You can, of course, also deploy the image you build to actual hardware by using the ``devtool build-image`` command. However, ``devtool`` does not provide a specific command that allows you to deploy the image to actual hardware. -5. *Finish Your Work With the Recipe*: The ``devtool finish`` command +#. *Finish Your Work With the Recipe*: The ``devtool finish`` command creates any patches corresponding to commits in the local Git repository, moves the new recipe to a more permanent layer, and then resets the recipe so that the recipe is built normally rather than - from the workspace. - :: + from the workspace:: $ devtool finish recipe layer @@ -379,11 +413,9 @@ command: .. note:: - You can use the - devtool reset - command to put things back should you decide you do not want to - proceed with your work. If you do use this command, realize that - the source tree is preserved. + You can use the ``devtool reset`` command to put things back should you + decide you do not want to proceed with your work. If you do use this + command, realize that the source tree is preserved. Use ``devtool modify`` to Modify the Source of an Existing Component -------------------------------------------------------------------- @@ -401,9 +433,9 @@ diagram shows common development flows for the ``devtool modify`` command: .. image:: figures/sdk-devtool-modify-flow.png - :align: center + :width: 100% -1. *Preparing to Modify the Code*: The top part of the flow shows three +#. *Preparing to Modify the Code*: The top part of the flow shows three scenarios by which you could use ``devtool modify`` to prepare to work on source files. Each scenario assumes the following: @@ -430,11 +462,9 @@ command: $ devtool modify recipe - Once - ``devtool``\ locates the recipe, ``devtool`` uses the recipe's - :term:`SRC_URI` statements to - locate the source code and any local patch files from other - developers. + Once ``devtool`` locates the recipe, ``devtool`` uses the recipe's + :term:`SRC_URI` statements to locate the source code and any local + patch files from other developers. With this scenario, there is no ``srctree`` argument. Consequently, the default behavior of the ``devtool modify`` command is to extract @@ -470,11 +500,7 @@ command: .. note:: - You cannot provide a URL for - srctree - using the - devtool - command. + You cannot provide a URL for ``srctree`` using the ``devtool`` command. As with all extractions, the command uses the recipe's :term:`SRC_URI` statements to locate the source files and any associated patch @@ -512,11 +538,11 @@ command: append file for the recipe in the ``devtool`` workspace. The recipe and the source code remain in their original locations. -2. *Edit the Source*: Once you have used the ``devtool modify`` command, +#. *Edit the Source*: Once you have used the ``devtool modify`` command, you are free to make changes to the source files. You can use any editor you like to make and save your source code modifications. -3. *Build the Recipe or Rebuild the Image*: The next step you take +#. *Build the Recipe or Rebuild the Image*: The next step you take depends on what you are going to do with the new code. If you need to eventually move the build output to the target @@ -527,9 +553,11 @@ command: On the other hand, if you want an image to contain the recipe's packages from the workspace for immediate deployment onto a device (e.g. for testing purposes), you can use the ``devtool build-image`` - command: $ devtool build-image image + command:: + + $ devtool build-image image -4. *Deploy the Build Output*: When you use the ``devtool build`` command +#. *Deploy the Build Output*: When you use the ``devtool build`` command to build out your recipe, you probably want to see if the resulting build output works as expected on target hardware. @@ -554,13 +582,12 @@ command: ``devtool`` does not provide a specific command to deploy the image to actual hardware. -5. *Finish Your Work With the Recipe*: The ``devtool finish`` command +#. *Finish Your Work With the Recipe*: The ``devtool finish`` command creates any patches corresponding to commits in the local Git repository, updates the recipe to point to them (or creates a ``.bbappend`` file to do so, depending on the specified destination layer), and then resets the recipe so that the recipe is built - normally rather than from the workspace. - :: + normally rather than from the workspace:: $ devtool finish recipe layer @@ -568,8 +595,7 @@ command: Any changes you want to turn into patches must be staged and committed within the local Git repository before you use the - devtool finish - command. + ``devtool finish`` command. Because there is no need to move the recipe, ``devtool finish`` either updates the original recipe in the original layer or the @@ -584,11 +610,9 @@ command: .. note:: - You can use the - devtool reset - command to put things back should you decide you do not want to - proceed with your work. If you do use this command, realize that - the source tree is preserved. + You can use the ``devtool reset`` command to put things back should you + decide you do not want to proceed with your work. If you do use this + command, realize that the source tree is preserved. Use ``devtool upgrade`` to Create a Version of the Recipe that Supports a Newer Version of the Software ------------------------------------------------------------------------------------------------------- @@ -602,27 +626,25 @@ counterparts. .. note:: - Several methods exist by which you can upgrade recipes - - ``devtool upgrade`` - happens to be one. You can read about all the methods by which you - can upgrade recipes in the - :ref:`dev-manual/upgrading-recipes:upgrading recipes` section - of the Yocto Project Development Tasks Manual. + Several methods exist by which you can upgrade recipes --- + ``devtool upgrade`` happens to be one. You can read about all the methods by + which you can upgrade recipes in the + :ref:`dev-manual/upgrading-recipes:upgrading recipes` section of the Yocto + Project Development Tasks Manual. -The ``devtool upgrade`` command is flexible enough to allow you to -specify source code revision and versioning schemes, extract code into -or out of the ``devtool`` -:ref:`devtool-the-workspace-layer-structure`, -and work with any source file forms that the -:ref:`bitbake:bitbake-user-manual/bitbake-user-manual-fetching:fetchers` support. +The ``devtool upgrade`` command is flexible enough to allow you to specify +source code revision and versioning schemes, extract code into or out of the +``devtool`` :ref:`devtool-the-workspace-layer-structure`, and work with any +source file forms that the +:ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers` support. The following diagram shows the common development flow used with the ``devtool upgrade`` command: .. image:: figures/sdk-devtool-upgrade-flow.png - :align: center + :width: 100% -1. *Initiate the Upgrade*: The top part of the flow shows the typical +#. *Initiate the Upgrade*: The top part of the flow shows the typical scenario by which you use the ``devtool upgrade`` command. The following conditions exist: @@ -674,7 +696,7 @@ The following diagram shows the common development flow used with the are incorporated into the build the next time you build the software just as are other changes you might have made to the source. -2. *Resolve any Conflicts created by the Upgrade*: Conflicts could happen +#. *Resolve any Conflicts created by the Upgrade*: Conflicts could happen after upgrading the software to a new version. Conflicts occur if your recipe specifies some patch files in :term:`SRC_URI` that conflict with changes made in the new version of the software. For @@ -685,7 +707,7 @@ The following diagram shows the common development flow used with the conflicts created through use of a newer or different version of the software. -3. *Build the Recipe or Rebuild the Image*: The next step you take +#. *Build the Recipe or Rebuild the Image*: The next step you take depends on what you are going to do with the new code. If you need to eventually move the build output to the target @@ -700,7 +722,7 @@ The following diagram shows the common development flow used with the $ devtool build-image image -4. *Deploy the Build Output*: When you use the ``devtool build`` command +#. *Deploy the Build Output*: When you use the ``devtool build`` command or ``bitbake`` to build your recipe, you probably want to see if the resulting build output works as expected on target hardware. @@ -714,15 +736,18 @@ The following diagram shows the common development flow used with the development machine. You can deploy your build output to that target hardware by using the - ``devtool deploy-target`` command: $ devtool deploy-target recipe - target The target is a live target machine running as an SSH server. + ``devtool deploy-target`` command:: + + $ devtool deploy-target recipe target + + The target is a live target machine running as an SSH server. You can, of course, also deploy the image you build using the ``devtool build-image`` command to actual hardware. However, ``devtool`` does not provide a specific command that allows you to do this. -5. *Finish Your Work With the Recipe*: The ``devtool finish`` command +#. *Finish Your Work With the Recipe*: The ``devtool finish`` command creates any patches corresponding to commits in the local Git repository, moves the new recipe to a more permanent layer, and then resets the recipe so that the recipe is built normally rather than @@ -734,8 +759,7 @@ The following diagram shows the common development flow used with the If you specify a destination layer that is the same as the original source, then the old version of the recipe and associated files are - removed prior to adding the new version. - :: + removed prior to adding the new version:: $ devtool finish recipe layer @@ -750,11 +774,9 @@ The following diagram shows the common development flow used with the .. note:: - You can use the - devtool reset - command to put things back should you decide you do not want to - proceed with your work. If you do use this command, realize that - the source tree is preserved. + You can use the ``devtool reset`` command to put things back should you + decide you do not want to proceed with your work. If you do use this + command, realize that the source tree is preserved. A Closer Look at ``devtool add`` ================================ @@ -822,10 +844,9 @@ run ``devtool add`` again and provide the name or the version. Dependency Detection and Mapping -------------------------------- -The ``devtool add`` command attempts to detect build-time dependencies -and map them to other recipes in the system. During this mapping, the -command fills in the names of those recipes as part of the -:term:`DEPENDS` variable within the +The ``devtool add`` command attempts to detect build-time dependencies and map +them to other recipes in the system. During this mapping, the command fills in +the names of those recipes as part of the :term:`DEPENDS` variable within the recipe. If a dependency cannot be mapped, ``devtool`` places a comment in the recipe indicating such. The inability to map a dependency can result from naming not being recognized or because the dependency simply @@ -842,10 +863,8 @@ following to your recipe:: .. note:: - The - devtool add - command often cannot distinguish between mandatory and optional - dependencies. Consequently, some of the detected dependencies might + The ``devtool add`` command often cannot distinguish between mandatory and + optional dependencies. Consequently, some of the detected dependencies might in fact be optional. When in doubt, consult the documentation or the configure script for the software the recipe is building for further details. In some cases, you might find you can substitute the @@ -855,16 +874,14 @@ following to your recipe:: License Detection ----------------- -The ``devtool add`` command attempts to determine if the software you -are adding is able to be distributed under a common, open-source -license. If so, the command sets the -:term:`LICENSE` value accordingly. +The ``devtool add`` command attempts to determine if the software you are +adding is able to be distributed under a common, open-source license. If +so, the command sets the :term:`LICENSE` value accordingly. You should double-check the value added by the command against the documentation or source files for the software you are building and, if necessary, update that :term:`LICENSE` value. -The ``devtool add`` command also sets the -:term:`LIC_FILES_CHKSUM` +The ``devtool add`` command also sets the :term:`LIC_FILES_CHKSUM` value to point to all files that appear to be license-related. Realize that license statements often appear in comments at the top of source files or within the documentation. In such cases, the command does not @@ -944,10 +961,9 @@ mind: Adding Native Tools ------------------- -Often, you need to build additional tools that run on the :term:`Build -Host` as opposed to -the target. You should indicate this requirement by using one of the -following methods when you run ``devtool add``: +Often, you need to build additional tools that run on the :term:`Build Host` +as opposed to the target. You should indicate this requirement by using one of +the following methods when you run ``devtool add``: - Specify the name of the recipe such that it ends with "-native". Specifying the name like this produces a recipe that only builds for @@ -971,8 +987,7 @@ Adding Node.js Modules ---------------------- You can use the ``devtool add`` command two different ways to add -Node.js modules: 1) Through ``npm`` and, 2) from a repository or local -source. +Node.js modules: through ``npm`` or from a repository or local source. Use the following form to add Node.js modules through ``npm``:: @@ -987,7 +1002,7 @@ these behaviors ensure the reproducibility and integrity of the build. .. note:: - - You must use quotes around the URL. The ``devtool add`` does not + - You must use quotes around the URL. ``devtool add`` does not require the quotes, but the shell considers ";" as a splitter between multiple commands. Thus, without the quotes, ``devtool add`` does not receive the other parts, which results in @@ -1002,9 +1017,8 @@ repository or local source tree. To add modules this way, use $ devtool add https://github.com/diversario/node-ssdp -In this example, ``devtool`` -fetches the specified Git repository, detects the code as Node.js code, -fetches dependencies using ``npm``, and sets +In this example, ``devtool`` fetches the specified Git repository, detects the +code as Node.js code, fetches dependencies using ``npm``, and sets :term:`SRC_URI` accordingly. Working With Recipes @@ -1013,17 +1027,17 @@ Working With Recipes When building a recipe using the ``devtool build`` command, the typical build progresses as follows: -1. Fetch the source +#. Fetch the source -2. Unpack the source +#. Unpack the source -3. Configure the source +#. Configure the source -4. Compile the source +#. Compile the source -5. Install the build output +#. Install the build output -6. Package the installed output +#. Package the installed output For recipes in the workspace, fetching and unpacking is disabled as the source tree has already been prepared and is persistent. Each of these @@ -1038,9 +1052,8 @@ does not include complete instructions for building the software. Instead, common functionality is encapsulated in classes inherited with the ``inherit`` directive. This technique leaves the recipe to describe just the things that are specific to the software being built. There is -a :ref:`base ` class that -is implicitly inherited by all recipes and provides the functionality -that most recipes typically need. +a :ref:`ref-classes-base` class that is implicitly inherited by all recipes +and provides the functionality that most recipes typically need. The remainder of this section presents information useful when working with recipes. @@ -1066,7 +1079,7 @@ links created within the source tree: ``${``\ :term:`D`\ ``}``. - ``sysroot-destdir/``: Contains a subset of files installed within - ``do_install`` that have been put into the shared sysroot. For + :ref:`ref-tasks-install` that have been put into the shared sysroot. For more information, see the ":ref:`dev-manual/new-recipe:sharing files between recipes`" section. @@ -1082,18 +1095,13 @@ Setting Configure Arguments If the software your recipe is building uses GNU autoconf, then a fixed set of arguments is passed to it to enable cross-compilation plus any -extras specified by -:term:`EXTRA_OECONF` or -:term:`PACKAGECONFIG_CONFARGS` +extras specified by :term:`EXTRA_OECONF` or :term:`PACKAGECONFIG_CONFARGS` set within the recipe. If you wish to pass additional options, add them to :term:`EXTRA_OECONF` or :term:`PACKAGECONFIG_CONFARGS`. Other supported build -tools have similar variables (e.g. -:term:`EXTRA_OECMAKE` for -CMake, :term:`EXTRA_OESCONS` -for Scons, and so forth). If you need to pass anything on the ``make`` -command line, you can use :term:`EXTRA_OEMAKE` or the -:term:`PACKAGECONFIG_CONFARGS` -variables to do so. +tools have similar variables (e.g. :term:`EXTRA_OECMAKE` for CMake, +:term:`EXTRA_OESCONS` for Scons, and so forth). If you need to pass anything on +the ``make`` command line, you can use :term:`EXTRA_OEMAKE` or the +:term:`PACKAGECONFIG_CONFARGS` variables to do so. You can use the ``devtool configure-help`` command to help you set the arguments listed in the previous paragraph. The command determines the @@ -1117,8 +1125,7 @@ the build host. Recipes should never write files directly into the sysroot. Instead, files should be installed into standard locations during the -:ref:`ref-tasks-install` task within -the ``${``\ :term:`D`\ ``}`` directory. A +:ref:`ref-tasks-install` task within the ``${``\ :term:`D`\ ``}`` directory. A subset of these files automatically goes into the sysroot. The reason for this limitation is that almost all files that go into the sysroot are cataloged in manifests in order to ensure they can be removed later @@ -1134,14 +1141,12 @@ the target device, it is important to understand packaging because the contents of the image are expressed in terms of packages and not recipes. -During the :ref:`ref-tasks-package` -task, files installed during the -:ref:`ref-tasks-install` task are -split into one main package, which is almost always named the same as -the recipe, and into several other packages. This separation exists -because not all of those installed files are useful in every image. For -example, you probably do not need any of the documentation installed in -a production image. Consequently, for each recipe the documentation +During the :ref:`ref-tasks-package` task, files installed during the +:ref:`ref-tasks-install` task are split into one main package, which is almost +always named the same as the recipe, and into several other packages. This +separation exists because not all of those installed files are useful in every +image. For example, you probably do not need any of the documentation installed +in a production image. Consequently, for each recipe the documentation files are separated into a ``-doc`` package. Recipes that package software containing optional modules or plugins might undergo additional package splitting as well. @@ -1149,8 +1154,7 @@ package splitting as well. After building a recipe, you can see where files have gone by looking in the ``oe-workdir/packages-split`` directory, which contains a subdirectory for each package. Apart from some advanced cases, the -:term:`PACKAGES` and -:term:`FILES` variables controls +:term:`PACKAGES` and :term:`FILES` variables controls splitting. The :term:`PACKAGES` variable lists all of the packages to be produced, while the :term:`FILES` variable specifies which files to include in each package by using an override to specify the package. For @@ -1192,16 +1196,11 @@ target machine. .. note:: - The - devtool deploy-target - and - devtool undeploy-target - commands do not currently interact with any package management system - on the target device (e.g. RPM or OPKG). Consequently, you should not - intermingle - devtool deploy-target - and package manager operations on the target device. Doing so could - result in a conflicting set of files. + The ``devtool deploy-target`` and ``devtool undeploy-target`` commands do + not currently interact with any package management system on the target + device (e.g. RPM or OPKG). Consequently, you should not intermingle + ``devtool deploy-target`` and package manager operations on the target + device. Doing so could result in a conflicting set of files. Installing Additional Items Into the Extensible SDK =================================================== @@ -1215,9 +1214,25 @@ need to link to libGL but you are not sure which recipe provides libGL. You can use the following command to find out:: $ devtool search libGL mesa + A free implementation of the OpenGL API + +Once you know the recipe +(i.e. ``mesa`` in this example), you can install it. -A free implementation of the OpenGL API Once you know the recipe -(i.e. ``mesa`` in this example), you can install it:: +When using the extensible SDK directly in a Yocto build +------------------------------------------------------- + +In this scenario, the Yocto build tooling, e.g. ``bitbake`` +is directly accessible to build additional items, and it +can simply be executed directly:: + + $ bitbake mesa + $ bitbake build-sysroots + +When using a standalone installer for the Extensible SDK +-------------------------------------------------------- + +:: $ devtool sdk-install mesa @@ -1244,13 +1259,13 @@ To update your installed SDK, use ``devtool`` as follows:: $ devtool sdk-update -The previous command assumes your SDK provider has set the -default update URL for you through the :term:`SDK_UPDATE_URL` -variable as described in the +The previous command assumes your SDK provider has set the default update URL +for you through the :term:`SDK_UPDATE_URL` variable as described in the ":ref:`sdk-manual/appendix-customizing:Providing Updates to the Extensible SDK After Installation`" section. If the SDK provider has not set that default URL, you need to -specify it yourself in the command as follows: $ devtool sdk-update -path_to_update_directory +specify it yourself in the command as follows:: + + $ devtool sdk-update path_to_update_directory .. note:: @@ -1267,15 +1282,15 @@ those customers need an SDK that has custom libraries. In such a case, you can produce a derivative SDK based on the currently installed SDK fairly easily by following these steps: -1. If necessary, install an extensible SDK that you want to use as a +#. If necessary, install an extensible SDK that you want to use as a base for your derivative SDK. -2. Source the environment script for the SDK. +#. Source the environment script for the SDK. -3. Add the extra libraries or other components you want by using the +#. Add the extra libraries or other components you want by using the ``devtool add`` command. -4. Run the ``devtool build-sdk`` command. +#. Run the ``devtool build-sdk`` command. The previous steps take the recipes added to the workspace and construct a new SDK installer that contains those recipes and the resulting binary From patchwork Wed Sep 20 08:15:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30774 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 35197CE79AE for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by mx.groups.io with SMTP id smtpd.web11.32323.1695197764625460031 for ; Wed, 20 Sep 2023 01:16:04 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=NuWCX8a4; spf=pass (domain: bootlin.com, ip: 217.70.183.198, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0EB7DC0002; Wed, 20 Sep 2023 08:16:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197763; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YwfBSVKqhfUP35ddYcrLoVTCSoba+I1eceXDKbPaLmk=; b=NuWCX8a4Ss15LMofLi97sjWhozB94sHEfXcTgQ6S9sCVeLQf4tD3cjRZLjHifXE10CHWea 7OrY0pRLDP52LVBNwRJsmzwsB285e95UOTKo8JYDUtR6JWpGWGvTAEOleOdzUZNTKoC8ye O0Lax8adxZcJlFUzDvJHT/75/up9w1PzCLenU1wlJgYW2YPMbWD1Lu32Pc7UpJ29C60Qy4 KQ2fyIyz94f4gHFcfdBTQsWVm+0ihydDc/kqoellQCKUYbJltSxHWGiQYfvnWeBfTFbf3W q0JreVN0s8UtoEoq7fGcXXaTK6PS4sWsFTraa0+vcEmyZPUehr8acwDqMr/CxQ== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Richard Purdie , Quentin Schulz Subject: [kirkstone][PATCH 02/10] dev-manual: disk-space: improve wording for obsolete sstate cache files Date: Wed, 20 Sep 2023 10:15:36 +0200 Message-Id: <20230920081544.1226760-3-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4248 From: Michael Opdenacker Replace "duplicate" by "obsolete", more appropriate. "duplicate" probably comes from the "--remove-duplicated" option of the sstate-cache-management.sh script. Improve other sentences too. Signed-off-by: Michael Opdenacker Reported-by: Richard Purdie CC: Quentin Schulz --- documentation/dev-manual/disk-space.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/documentation/dev-manual/disk-space.rst b/documentation/dev-manual/disk-space.rst index a84bef4511..6d1638a302 100644 --- a/documentation/dev-manual/disk-space.rst +++ b/documentation/dev-manual/disk-space.rst @@ -23,12 +23,12 @@ final disk usage of 22 Gbytes instead of &MIN_DISK_SPACE; Gbytes. However, &MIN_DISK_SPACE_RM_WORK; Gbytes of initial free disk space are still needed to create temporary files before they can be deleted. -Purging Duplicate Shared State Cache Files -========================================== +Purging Obsolete Shared State Cache Files +========================================= After multiple build iterations, the Shared State (sstate) cache can contain -duplicate cache files for a given package, consuming a substantial amount of -disk space. However, only the most recent cache files are likeky to be reusable. +multiple cache files for a given package, consuming a substantial amount of +disk space. However, only the most recent ones are likely to be reused. The following command is a quick way to purge all the cache files which haven't been used for a least a specified number of days:: From patchwork Wed Sep 20 08:15:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30777 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 4E197CE79B1 for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by mx.groups.io with SMTP id smtpd.web11.32324.1695197765929764981 for ; Wed, 20 Sep 2023 01:16:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=hAITAgrH; spf=pass (domain: bootlin.com, ip: 217.70.183.201, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id F055C1BF206; Wed, 20 Sep 2023 08:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9OcZTZ6teY1FrCtqYmhMBPk17aSkQdMfjIgzG2k1wgE=; b=hAITAgrHfTztKRWooJ9QVLMetghhs4cgObKkQXee+1w4Dqp3k83HmbVKELhreAiuwf+F9a l3QzIQrTGWbXP+qo6FCoi/c7ktsXsSyRJkX541O+yf76it+BW4b4ysBRxMfqaNv6hCJQ4t bXwUDuRXQi0Tz58Kz5+YYwVv6j3qguJtEmzVx+yhX6AXjDaFKVZUpF1DOv3QJHzzIheAkB a4LFTMkd2YnWOkOQ5laKshC9Og6BHpimyWlogy3BQzi1WH25w/Ol2zUCAQ79dCilDnVh/C TT01njW8RJ9Wkm7JwwJjtyrAuA/CRLQG+Sj5+sIbo01rIOGuFWse6U82RuCEMw== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirkstone][PATCH 03/10] documentation/README: align with master Date: Wed, 20 Sep 2023 10:15:37 +0200 Message-Id: <20230920081544.1226760-4-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4250 From: Michael Opdenacker Signed-off-by: Michael Opdenacker --- documentation/README | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/documentation/README b/documentation/README index 6f6a8ec842..4d31036e69 100644 --- a/documentation/README +++ b/documentation/README @@ -34,16 +34,18 @@ Manual Organization Here the folders corresponding to individual manuals: +* brief-yoctoprojectqs - Yocto Project Quick Start * overview-manual - Yocto Project Overview and Concepts Manual -* sdk-manual - Yocto Project Software Development Kit (SDK) Developer's Guide. +* contributor-guide - Yocto Project and OpenEmbedded Contributor Guide +* ref-manual - Yocto Project Reference Manual * bsp-guide - Yocto Project Board Support Package (BSP) Developer's Guide * dev-manual - Yocto Project Development Tasks Manual * kernel-dev - Yocto Project Linux Kernel Development Manual -* ref-manual - Yocto Project Reference Manual -* brief-yoctoprojectqs - Yocto Project Quick Start * profile-manual - Yocto Project Profiling and Tracing Manual +* sdk-manual - Yocto Project Software Development Kit (SDK) Developer's Guide. * toaster-manual - Toaster User Manual * test-manual - Yocto Project Test Environment Manual +* migration-guides - Yocto Project Release and Migration Notes Each folder is self-contained regarding content and figures. @@ -129,6 +131,10 @@ Also install the "inkscape" package from your distribution. Inkscape is need to convert SVG graphics to PNG (for EPUB export) and to PDF (for PDF export). +Additionally install "fncychap.sty" TeX font if you want to build PDFs. Debian +and Ubuntu have it in "texlive-latex-extra" package while RedHat distributions +and OpenSUSE have it in "texlive-fncychap" package for example. + To build the documentation locally, run: $ cd documentation @@ -271,6 +277,19 @@ websites. More information can be found here: https://sublime-and-sphinx-guide.readthedocs.io/en/latest/references.html. +For external links, we use this syntax: +`link text `__ + +instead of: +`link text `_ + +Both syntaxes work, but the latter also creates a "link text" reference +target which could conflict with other references with the same name. +So, only use this variant when you wish to make multiple references +to this link, reusing only the target name. + +See https://stackoverflow.com/questions/27420317/restructured-text-rst-http-links-underscore-vs-use + Anchor (<#link>) links are forbidden as they are not checked by Sphinx during the build and may be broken without knowing about it. @@ -340,13 +359,16 @@ The sphinx.ext.intersphinx extension is enabled by default so that we can cross reference content from other Sphinx based documentation projects, such as the BitBake manual. -References to the BitBake manual can be done: +References to the BitBake manual can directly be done: - With a specific description instead of the section name: - :ref:`Azure Storage fetcher (az://) ` + :ref:`Azure Storage fetcher (az://) ` - With the section name: - :ref:`bitbake:bitbake-user-manual/bitbake-user-manual-intro:usage and syntax` option - - Linking to the entire BitBake manual: - :doc:`BitBake User Manual ` + :ref:`bitbake-user-manual/bitbake-user-manual-intro:usage and syntax` option + +If you want to refer to an entire document (or chapter) in the BitBake manual, +you have to use the ":doc:" macro with the "bitbake:" prefix: + - :doc:`BitBake User Manual ` + - :doc:`bitbake:bitbake-user-manual/bitbake-user-manual-metadata`" chapter Note that a reference to a variable (:term:`VARIABLE`) automatically points to the BitBake manual if the variable is not described in the Reference Manual's Variable Glossary. @@ -355,6 +377,11 @@ BitBake manual as follows: :term:`bitbake:BB_NUMBER_PARSE_THREADS` +This would be the same if we had identical document filenames in +both the Yocto Project and BitBake manuals: + + :ref:`bitbake:directory/file:section title` + Submitting documentation changes ================================ From patchwork Wed Sep 20 08:15:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30773 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 4DD6CCE79AF for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by mx.groups.io with SMTP id smtpd.web10.32192.1695197766086350768 for ; Wed, 20 Sep 2023 01:16:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=iflYvpLr; spf=pass (domain: bootlin.com, ip: 217.70.183.201, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 669251BF20C; Wed, 20 Sep 2023 08:16:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dy6vj9cx4Dzq5RMk2phPQyqsCSq+mrcchiYplXaRzWI=; b=iflYvpLrV+YV8hxa1WRv/D416wVgz6ByrDMeJFVyGNk0QVLJcL+65MOFvwRYqb1rE8D8pN ABC7V5vc0EafBslqYOOiuk/Sd+ZonoaLi4MOOPxti8SdglapsxU3BmUZ+ayfLBjsJMImKd H37eThrT/CVLL/fZSpQpwWQ32QAkxRNRwbXrzvLCw/lLy0lo5db68E1Sr5JLjtrjf+JVjB rYwmVI0QVJ80MfkfaW9HeI2ZhpO2lv35PRNDv+NVIlSa0OoiXGkyPHn3QJLypuLuVs9GcH 5newAK5ulzhorDASwwOz9vFFbjGQsuQkcuPLmHjbFwiVhAskBqQ7fyvjANRkVw== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirkstone][PATCH 04/10] dev-manual: new-recipe.rst fix inconsistency with contributor guide Date: Wed, 20 Sep 2023 10:15:38 +0200 Message-Id: <20230920081544.1226760-5-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4251 From: Michael Opdenacker This document was suggesting a way to version pre-releases which doesn't match the latest recommendations from the contributor guide. Signed-off-by: Michael Opdenacker --- documentation/dev-manual/new-recipe.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst index 2c1101ec2b..8c471699a7 100644 --- a/documentation/dev-manual/new-recipe.rst +++ b/documentation/dev-manual/new-recipe.rst @@ -1036,13 +1036,14 @@ build system and package managers, so the resulting packages will not correctly trigger an upgrade. In order to ensure the versions compare properly, the recommended -convention is to set :term:`PV` within the -recipe to "previous_version+current_version". You can use an additional -variable so that you can use the current version elsewhere. Here is an -example:: +convention is to use a tilde (``~``) character as follows:: - REALPV = "0.8.16-rc1" - PV = "0.8.15+${REALPV}" + PV = 0.8.16~rc1 + +This way ``0.8.16~rc1`` sorts before ``0.8.16``. See the +":ref:`contributor-guide/recipe-style-guide:version policy`" section in the +Yocto Project and OpenEmbedded Contributor Guide for more details about +versioning code corresponding to a pre-release or to a specific Git commit. Post-Installation Scripts ========================= From patchwork Wed Sep 20 08:15:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30776 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 5A9E9CE79B2 for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by mx.groups.io with SMTP id smtpd.web11.32325.1695197766494761289 for ; Wed, 20 Sep 2023 01:16:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=MasGMsDe; spf=pass (domain: bootlin.com, ip: 217.70.183.196, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id F019CE0010; Wed, 20 Sep 2023 08:16:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tP5wxlfI2tUCirctecwEnN+DZzkUEXfraBFuUeJGuGg=; b=MasGMsDew8AFVJ1zLEijLJfviy789kPiGpDQQL1Nwf12Ak/MG3q/ZF3I+3j8OAGnh8X+bJ 7YZgVNFh8hZM1dPgcG8E/hStsAZCbglZaik12SV0DkUmv9lAkLjGvr6H46Sx4jfPGnOmpV DIzeNFMgF0QTxxP48rlQwgByiF2v5QePK2ELloteCo/JSq+YqxMfn24o6xRYtBIvjKjVjG HpOvnddoKhdxEw8QiEs3HAqEoLbB5EITJy8mV6rrz7Ok42PMvHKowOjkXVYbnzUQA/nwZ7 7ACA9NuwUhhIeekoa/2WdCEcRhPwWXiOoW7ptJwS3z6mQnti+jFr5nbVD6cmuA== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirkstone][PATCH 05/10] contributor-guide: recipe-style-guide: add Upstream-Status Date: Wed, 20 Sep 2023 10:15:39 +0200 Message-Id: <20230920081544.1226760-6-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4252 From: Michael Opdenacker Signed-off-by: Michael Opdenacker --- .../contributor-guide/recipe-style-guide.rst | 81 +++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/documentation/contributor-guide/recipe-style-guide.rst b/documentation/contributor-guide/recipe-style-guide.rst index a0d513e8e9..99105179a6 100644 --- a/documentation/contributor-guide/recipe-style-guide.rst +++ b/documentation/contributor-guide/recipe-style-guide.rst @@ -255,3 +255,84 @@ Tips and Guidelines for Writing Recipes - Use :term:`BBCLASSEXTEND` instead of creating separate recipes such as ``-native`` and ``-nativesdk`` ones, whenever possible. This avoids having to maintain multiple recipe files at the same time. + +Patch Upstream Status +===================== + +In order to keep track of patches applied by recipes and ultimately reduce the +number of patches that need maintaining, the OpenEmbedded build system +requires information about the upstream status of each patch. + +In its description, each patch should provide detailed information about the +bug that it addresses, such as the URL in a bug tracking system and links +to relevant mailing list archives. + +Then, you should also add an ``Upstream-Status:`` tag containing one of the +following status strings: + +``Pending`` + No determination has been made yet or not yet submitted to upstream. + +``Submitted [where]`` + Submitted to upstream, waiting for approval. Optionally include where + it was submitted, such as the author, mailing list, etc. + +``Accepted`` + Accepted in upstream, expect it to be removed at next update, include + expected version info. + +``Backport`` + Backported from new upstream version, because we are at a fixed version, + include upstream version info. + +``Denied`` + Not accepted by upstream, include reason in patch. + +``Inactive-Upstream [lastcommit: when (and/or) lastrelease: when]`` + The upstream is no longer available. This typically means a defunct project + where no activity has happened for a long time --- measured in years. To make + that judgement, it is recommended to look at not only when the last release + happened, but also when the last commit happened, and whether newly made bug + reports and merge requests since that time receive no reaction. It is also + recommended to add to the patch description any relevant links where the + inactivity can be clearly seen. + +``Inappropriate [reason]`` + The patch is not appropriate for upstream, include a brief reason on the + same line enclosed with ``[]``. The reason can be: + + - ``not author`` (you are not the author and do not intend to upstream this, + the source must be listed in the comments) + - ``native`` + - ``licensing`` + - ``configuration`` + - ``enable feature`` + - ``disable feature`` + - ``bugfix`` (add bug URL here) + - ``embedded specific`` + - ``other`` (give details in comments) + +The various ``Inappropriate [reason]`` status items are meant to indicate that +the person responsible for adding this patch to the system does not intend to +upstream the patch for a specific reason. + +Of course, if another person later takes care of submitting this patch upstream, +the status should be changed to ``Submitted [where]``, and an additional +``Signed-off-by:`` line should be added to the patch by the person claiming +responsibility for upstreaming. + +For example, if the patch has been submitted upstream:: + + rpm: Adjusted the foo setting in bar + + [RPM Ticket #65] -- http://rpm5.org/cvs/tktview?tn=65,5 + + The foo setting in bar was decreased from X to X-50% in order to + ensure we don't exhaust all system memory with foobar threads. + + Upstream-Status: Submitted [rpm5-devel@rpm5.org] + + Signed-off-by: Joe Developer + +A future update can change the value to ``Accepted`` or ``Denied`` as +appropriate. From patchwork Wed Sep 20 08:15:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30775 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 5DB53CE79B3 for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by mx.groups.io with SMTP id smtpd.web11.32326.1695197766849834094 for ; Wed, 20 Sep 2023 01:16:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=N9JOLvBW; spf=pass (domain: bootlin.com, ip: 217.70.183.198, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6194CC000D; Wed, 20 Sep 2023 08:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ijEGndecr/WjTQJTnZweIU1EP/VfYAKJFfVvLEs/QKE=; b=N9JOLvBWGf1tCW4DA2A5Ryi+GPZHatg+kvTZ+FyrlSxIOLXT6p3PGorZBW8M+YhrNVllHx Xs1eVfHZklkGcF9rDjn7NpXfSmIfQJFmR7YNRN4SYojqTXGVD7sJiLwMtj4glXA6qKk8xx 5ylXs+2OcU53wodGJlwSS2QY+d7c+DuP+CtxmqSTHbSUjAAKhcAj0Z4DSD2g8/rHCz9/uF JJr0EhkS3PhrezcgQyqvJ9FcugwsyRnLqN6DaY/yPJ3suck/5subwV0cFfOfSdn6oVpA7p F/D8CpQAwMekSTRYysPESSK8Sfo0WkjS9/vA4opCXG4j6SlEqn4a3T/VdLrcHQ== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Joshua Watt Subject: [kirkstone][PATCH 06/10] dev-manual: licenses: mention SPDX for license compliance Date: Wed, 20 Sep 2023 10:15:40 +0200 Message-Id: <20230920081544.1226760-7-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4253 From: Michael Opdenacker Signed-off-by: Michael Opdenacker CC: Joshua Watt --- documentation/dev-manual/licenses.rst | 30 ++++++++++++++++++++------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/documentation/dev-manual/licenses.rst b/documentation/dev-manual/licenses.rst index b485f77708..15e5c7396a 100644 --- a/documentation/dev-manual/licenses.rst +++ b/documentation/dev-manual/licenses.rst @@ -300,14 +300,28 @@ There are other requirements beyond the scope of these three and the methods described in this section (e.g. the mechanism through which source code is distributed). -As different organizations have different methods of complying with open -source licensing, this section is not meant to imply that there is only -one single way to meet your compliance obligations, but rather to -describe one method of achieving compliance. The remainder of this -section describes methods supported to meet the previously mentioned -three requirements. Once you take steps to meet these requirements, and -prior to releasing images, sources, and the build system, you should -audit all artifacts to ensure completeness. +As different organizations have different ways of releasing software, +there can be multiple ways of meeting license obligations. At +least, we describe here two methods for achieving compliance: + +- The first method is to use OpenEmbedded's ability to provide + the source code, provide a list of licenses, as well as + compilation scripts and source code modifications. + + The remainder of this section describes supported methods to meet + the previously mentioned three requirements. + +- The second method is to generate a *Software Bill of Materials* + (:term:`SBoM`), as described in the ":doc:`/dev-manual/sbom`" section. + Not only do you generate :term:`SPDX` output which can be used meet + license compliance requirements (except for sharing the build system + and layers sources for the time being), but this output also includes + component version and patch information which can be used + for vulnerability assessment. + +Whatever method you choose, prior to releasing images, sources, +and the build system, you should audit all artifacts to ensure +completeness. .. note:: From patchwork Wed Sep 20 08:15:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30779 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 67751CE79B0 for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by mx.groups.io with SMTP id smtpd.web11.32327.1695197767377895129 for ; Wed, 20 Sep 2023 01:16:07 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=aDhVwgbj; spf=pass (domain: bootlin.com, ip: 217.70.183.197, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id DE0171C000E; Wed, 20 Sep 2023 08:16:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GwE8mlT5jSMESeNK3tN7LKOp8jV4pHC8vKw3RMAsjdk=; b=aDhVwgbjd+j15A3S8/0+5Fy2dUNXimnJ97MQYasyAmVOMEpNSS5B5EWdvNKMG7v0zBcmxW +sAHL0GC9xNexHdXi7vmUxZyPox2e68+FSIR2XXeuFh2klpYxvT5weKLaL0doF9UVTkP/H h5GV3UXD69+nFthkoVpECPk4CDqZIx5K2y4vB7M9GpyTrI4gRpPbOD91VFHPJ+215wiEoe ps1mMvktSLQE5kt8MVb+WAxsXOUW0L8pixQRXSAw9TSBxxFmXzT/Ri5IzTxbX0PYhPCNl5 st55T+JNDNwaiqwlIjeDTxaMmW115xTlatXOwKUPVF2SlGL/9tWzdrRpxM5HrQ== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker , Roland Hieber Subject: [kirkstone][PATCH 07/10] template: fix typo in section header Date: Wed, 20 Sep 2023 10:15:41 +0200 Message-Id: <20230920081544.1226760-8-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4254 From: Michael Opdenacker From: Roland Hieber Signed-off-by: Roland Hieber Reviewed-by: Michael Opdenacker --- documentation/template/template.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/template/template.svg b/documentation/template/template.svg index 43043e3afb..50715c08b0 100644 --- a/documentation/template/template.svg +++ b/documentation/template/template.svg @@ -1019,7 +1019,7 @@ id="tspan1183-1-8" x="-52.348656" y="518.42615" - style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke:none">Objets + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:37.3333px;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;stroke:none">Objects X-Patchwork-Id: 30781 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 69B13CE79B4 for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by mx.groups.io with SMTP id smtpd.web10.32194.1695197767890643127 for ; Wed, 20 Sep 2023 01:16:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=pAQyPcQ3; spf=pass (domain: bootlin.com, ip: 217.70.183.199, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 69F83FF803; Wed, 20 Sep 2023 08:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197766; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZerD4VCbE9ROEK1R6CsUwvJMzZwzxYskpQOwkY2wUHA=; b=pAQyPcQ3GHNt//cS+Ni2Di5+vAAZfMGbVpMHG2B4MJk5d7VAT9RVRQdz0adgxJC4m7wz0+ /g2Ua/alMkHjKyccCEIExtQ5YH1E8CS4isbU1hi5IS2RQ5JCc+BO7iO8beXRQX0aUjmM3u hNHowtk9tA/gobUxcgZV3DGeXI05cpbdf7OBJrikxxWecG8kF9IF5Q+qVTGvsjkzU/St3O T8e9siNBhu8KD/lUwv8007tmqXWWr/vxZ+ADb+ois7BEFiSeCbyNfRN5RdXYevmOuc4/gA gK9WKvsADjWI1pUer91TiZxt3jS95YsoyL2ofutTOsnWKhAzjasSW3JoSAAMTg== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirkstone][PATCH 08/10] ref-manual: qa-checks: align with master Date: Wed, 20 Sep 2023 10:15:42 +0200 Message-Id: <20230920081544.1226760-9-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4255 From: Michael Opdenacker Signed-off-by: Michael Opdenacker --- documentation/ref-manual/qa-checks.rst | 87 +++++++++++++++++++------- 1 file changed, 64 insertions(+), 23 deletions(-) diff --git a/documentation/ref-manual/qa-checks.rst b/documentation/ref-manual/qa-checks.rst index 8c475d0f72..4a02e7206a 100644 --- a/documentation/ref-manual/qa-checks.rst +++ b/documentation/ref-manual/qa-checks.rst @@ -162,7 +162,7 @@ Errors and Warnings normally expected to be empty (such as ``/tmp``). These files may be more appropriately installed to a different location, or perhaps alternatively not installed at all, usually by updating the - ``do_install`` task/function. + :ref:`ref-tasks-install` task/function. .. _qa-check-arch: @@ -536,7 +536,7 @@ Errors and Warnings in (e.g. ``FILES:${``\ :term:`PN`\ ``}`` for the main package). - - Delete the files at the end of the ``do_install`` task if the + - Delete the files at the end of the :ref:`ref-tasks-install` task if the files are not needed in any package.   @@ -579,10 +579,10 @@ Errors and Warnings - ``package contains mime types but does not inherit mime: path '' [mime]`` The specified package contains mime type files (``.xml`` files in - ``${datadir}/mime/packages``) and yet does not inherit the mime - class which will ensure that these get properly installed. Either - add ``inherit mime`` to the recipe or remove the files at the - ``do_install`` step if they are not needed. + ``${datadir}/mime/packages``) and yet does not inherit the + :ref:`ref-classes-mime` class which will ensure that these get + properly installed. Either add ``inherit mime`` to the recipe or remove the + files at the :ref:`ref-tasks-install` step if they are not needed. .. _qa-check-mime-xdg: @@ -590,10 +590,10 @@ Errors and Warnings - ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: path '' [mime-xdg]`` The specified package contains a .desktop file with a 'MimeType' key - present, but does not inherit the mime-xdg class that is required in - order for that to be activated. Either add ``inherit mime`` to the - recipe or remove the files at the ``do_install`` step if they are not - needed. + present, but does not inherit the :ref:`ref-classes-mime-xdg` + class that is required in order for that to be activated. Either add + ``inherit mime`` to the recipe or remove the files at the + :ref:`ref-tasks-install` step if they are not needed. .. _qa-check-src-uri-bad: @@ -602,7 +602,7 @@ Errors and Warnings GitHub provides "archive" tarballs, however these can be re-generated on the fly and thus the file's signature will not necessarily match that - in the SRC_URI checksums in future leading to build failures. It is + in the :term:`SRC_URI` checksums in future leading to build failures. It is recommended that you use an official release tarball or switch to pulling the corresponding revision in the actual git repository instead. @@ -613,18 +613,20 @@ Errors and Warnings so using ${:term:`BPN`} rather than ${:term:`PN`} as the latter will change for different variants of the same recipe e.g. when :term:`BBCLASSEXTEND` or multilib are being used. This check will fail if a reference to ``${PN}`` - is found within the :term:`SRC_URI` value - change it to ``${BPN}`` instead. + is found within the :term:`SRC_URI` value --- change it to ``${BPN}`` instead. .. _qa-check-unhandled-features-check: - ``: recipe doesn't inherit features_check [unhandled-features-check]`` - This check ensures that if one of the variables that the :ref:`features_check ` - class supports (e.g. :term:`REQUIRED_DISTRO_FEATURES`) is used, then the recipe - inherits ``features_check`` in order for the requirement to actually work. If - you are seeing this message, either add ``inherit features_check`` to your recipe - or remove the reference to the variable if it is not needed. + This check ensures that if one of the variables that the + :ref:`ref-classes-features_check` class supports (e.g. + :term:`REQUIRED_DISTRO_FEATURES`) is used, then the recipe + inherits :ref:`ref-classes-features_check` in order for + the requirement to actually work. If you are seeing this message, either + add ``inherit features_check`` to your recipe or remove the reference to + the variable if it is not needed. .. _qa-check-missing-update-alternatives: @@ -632,7 +634,7 @@ Errors and Warnings - ``: recipe defines ALTERNATIVE: but doesn't inherit update-alternatives. This might fail during do_rootfs later! [missing-update-alternatives]`` This check ensures that if a recipe sets the :term:`ALTERNATIVE` variable that the - recipe also inherits :ref:`update-alternatives ` such + recipe also inherits :ref:`ref-classes-update-alternatives` such that the alternative will be correctly set up. If you are seeing this message, either add ``inherit update-alternatives`` to your recipe or remove the reference to the variable if it is not needed. @@ -653,7 +655,7 @@ Errors and Warnings - `` contains perllocal.pod (), should not be installed [perllocalpod]`` ``perllocal.pod`` is an index file of locally installed modules and so shouldn't be - installed by any distribution packages. The :ref:`cpan ` class + installed by any distribution packages. The :ref:`ref-classes-cpan` class already sets ``NO_PERLLOCAL`` to stop this file being generated by most Perl recipes, but if a recipe is using ``MakeMaker`` directly then they might not be doing this correctly. This check ensures that perllocal.pod is not in any package in order to @@ -667,8 +669,8 @@ Errors and Warnings If ``usrmerge`` is in :term:`DISTRO_FEATURES`, this check will ensure that no package installs files to root (``/bin``, ``/sbin``, ``/lib``, ``/lib64``) directories. If you are seeing this - message, it indicates that the ``do_install`` step (or perhaps the build process that - ``do_install`` is calling into, e.g. ``make install`` is using hardcoded paths instead + message, it indicates that the :ref:`ref-tasks-install` step (or perhaps the build process that + :ref:`ref-tasks-install` is calling into, e.g. ``make install`` is using hardcoded paths instead of the variables set up for this (``bindir``, ``sbindir``, etc.), and should be changed so that it does. @@ -677,7 +679,7 @@ Errors and Warnings - ``Fuzz detected: [patch-fuzz]`` - This check looks for evidence of "fuzz" when applying patches within the ``do_patch`` + This check looks for evidence of "fuzz" when applying patches within the :ref:`ref-tasks-patch` task. Patch fuzz is a situation when the ``patch`` tool ignores some of the context lines in order to apply the patch. Consider this example: @@ -727,7 +729,7 @@ Errors and Warnings devtool modify This will apply all of the patches, and create new commits out of them in - the workspace - with the patch context updated. + the workspace --- with the patch context updated. Then, replace the patches in the recipe layer:: @@ -748,6 +750,45 @@ Errors and Warnings other things in the patches, those can be discarded. +.. _qa-check-patch-status: + +- ``Missing Upstream-Status in patch Please add according to [patch-status-core/patch-status-noncore]`` + + The ``Upstream-Status`` value is missing in the specified patch file's header. + This value is intended to track whether or not the patch has been sent + upstream, whether or not it has been merged, etc. + + There are two options for this same check - ``patch-status-core`` (for + recipes in OE-Core) and ``patch-status-noncore`` (for recipes in any other + layer). + + For more information, see the + ":ref:`contributor-guide/recipe-style-guide:patch upstream status`" + section in the Yocto Project and OpenEmbedded Contributor Guide. + +- ``Malformed Upstream-Status in patch Please correct according to [patch-status-core/patch-status-noncore]`` + + The ``Upstream-Status`` value in the specified patch file's header is invalid - + it must be a specific format. See the "Missing Upstream-Status" entry above + for more information. + + +.. _qa-check-buildpaths: + +- ``File in package contains reference to TMPDIR [buildpaths]`` + + This check ensures that build system paths (including :term:`TMPDIR`) do not + appear in output files, which not only leaks build system configuration into + the target, but also hinders binary reproducibility as the output will change + if the build system configuration changes. + + Typically these paths will enter the output through some mechanism in the + configuration or compilation of the software being built by the recipe. To + resolve this issue you will need to determine how the detected path is + entering the output. Sometimes it may require adjusting scripts or code to + use a relative path rather than an absolute one, or to pick up the path from + runtime configuration or environment variables. + Configuring and Disabling QA Checks =================================== From patchwork Wed Sep 20 08:15:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30772 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 32C2DCE79AC for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by mx.groups.io with SMTP id smtpd.web11.32328.1695197768402483669 for ; Wed, 20 Sep 2023 01:16:08 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=K0R4Jn98; spf=pass (domain: bootlin.com, ip: 217.70.183.194, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id EEEE54000A; Wed, 20 Sep 2023 08:16:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o3G/B0qPtXN2x1tGNs4aULAsLiflVMBTXSSOlQMiQSg=; b=K0R4Jn98Df2sJXKDlP4UsZo8WJUZqBtmp2C7j7RnT9xEfetdCBqCNXMjbYuXXVK+iHDxEg 4yKVo6UjLCdjsB+G2EoRyaVGTc+ePNUWiqZDHC7A4XD4yro4sIqB1H+PKiKeSRgCcCIbbW ZwyBTdTqVGZUm3bxOWFZP0z9P7szhuJVQhCachvAn200IuaH0nZjAO7b1zfMC6OiwQclPb t5En8b1NKNSqo7j3qPelZrAZRvExiaZdXf+tN9oRtAPbQhnFGYeThyfJylXlzdVaVqm4lh JYrSgUzUzhrKgBzkcr0LTsxPvP1NETz1Qx3U4RhyKBabveQ1+Sai1YMT19h9xQ== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirkstone][PATCH 09/10] manuals: document "mime-xdg" class and MIME_XDG_PACKAGES Date: Wed, 20 Sep 2023 10:15:43 +0200 Message-Id: <20230920081544.1226760-10-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4256 From: Michael Opdenacker Signed-off-by: Michael Opdenacker --- .../migration-guides/migration-3.1.rst | 2 +- documentation/ref-manual/classes.rst | 21 +++++++++++++++++++ documentation/ref-manual/qa-checks.rst | 2 +- documentation/ref-manual/variables.rst | 7 +++++++ 4 files changed, 30 insertions(+), 2 deletions(-) diff --git a/documentation/migration-guides/migration-3.1.rst b/documentation/migration-guides/migration-3.1.rst index e3fdbbe425..53f6f1e03a 100644 --- a/documentation/migration-guides/migration-3.1.rst +++ b/documentation/migration-guides/migration-3.1.rst @@ -238,7 +238,7 @@ Warnings will now be shown at ``do_package_qa`` time in the following circumstances: - A recipe installs ``.desktop`` files containing ``MimeType`` keys but - does not inherit the new ``mime-xdg`` class + does not inherit the new :ref:`mime-xdg ` class - A recipe installs ``.xml`` files into ``${datadir}/mime/packages`` but does not inherit the :ref:`mime ` class diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index d27deb8c08..139f854172 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst @@ -1577,6 +1577,27 @@ The ``mime`` class generates the proper post-install and post-remove These scriptlets call ``update-mime-database`` to add the MIME types to the shared database. +.. _ref-classes-mime-xdg: + +``mime-xdg.bbclass`` +==================== + +The :ref:`mime-xdg ` class generates the proper +post-install and post-remove (postinst/postrm) scriptlets for packages +that install ``.desktop`` files containing ``MimeType`` entries. +These scriptlets call ``update-desktop-database`` to add the MIME types +to the database of MIME types handled by desktop files. + +Thanks to this class, when users open a file through a file browser +on recently created images, they don't have to choose the application +to open the file from the pool of all known applications, even the ones +that cannot open the selected file. + +If you have recipes installing their ``.desktop`` files as absolute +symbolic links, the detection of such files cannot be done by the current +implementation of this class. In this case, you have to add the corresponding +package names to the :term:`MIME_XDG_PACKAGES` variable. + .. _ref-classes-mirrors: ``mirrors.bbclass`` diff --git a/documentation/ref-manual/qa-checks.rst b/documentation/ref-manual/qa-checks.rst index 4a02e7206a..1e5fe21b02 100644 --- a/documentation/ref-manual/qa-checks.rst +++ b/documentation/ref-manual/qa-checks.rst @@ -590,7 +590,7 @@ Errors and Warnings - ``package contains desktop file with key 'MimeType' but does not inhert mime-xdg: path '' [mime-xdg]`` The specified package contains a .desktop file with a 'MimeType' key - present, but does not inherit the :ref:`ref-classes-mime-xdg` + present, but does not inherit the :ref:`mime-xdg ` class that is required in order for that to be activated. Either add ``inherit mime`` to the recipe or remove the files at the :ref:`ref-tasks-install` step if they are not needed. diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index a043d20494..6fa400a574 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst @@ -4852,6 +4852,13 @@ system and gives an overview of their function and contents. The revision currently checked out for the OpenEmbedded-Core layer (path determined by :term:`COREBASE`). + :term:`MIME_XDG_PACKAGES` + The current implementation of the :ref:`mime-xdg ` + class cannot detect ``.desktop`` files installed through absolute + symbolic links. Use this setting to make the class create post-install + and post-remove scripts for these packages anyway, to invoke the + ``update-destop-database`` command. + :term:`MIRRORS` Specifies additional paths from which the OpenEmbedded build system gets source code. When the build system searches for source code, it From patchwork Wed Sep 20 08:15:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Opdenacker X-Patchwork-Id: 30780 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 7553DCE79B6 for ; Wed, 20 Sep 2023 08:16:13 +0000 (UTC) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by mx.groups.io with SMTP id smtpd.web10.32195.1695197768882771850 for ; Wed, 20 Sep 2023 01:16:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=VDHKfy5r; spf=pass (domain: bootlin.com, ip: 217.70.183.193, mailfrom: michael.opdenacker@bootlin.com) Received: by mail.gandi.net (Postfix) with ESMTPSA id 71D4424000A; Wed, 20 Sep 2023 08:16:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1695197767; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qnB0saRDlfFvl8xJ2t/3SKHBvlGOigfF1UUsNQYKBao=; b=VDHKfy5rXjUPBQDmvvs+CmPZA9ghhGba18gkCtf6S15mSG38tOyDCFFYoDlnXVvsajKuy8 k2Ulehk+rYghFIN5SReTc3cILaHJN2jqYyn9I2d3zc8Po9ZuPltIDq2UqmR4hfHT3/5Dx0 DgrK8HqomM8IDx5DW8O2ObAGKe9zU4vthT9p4HA/17zST5g3Oa0dSzEhM+yBCCFHtKkZo5 xZjJZ/M80Zw5BmfekdgUxEry9J0+4/nfS3DNPi0vLHuqDryMNTZaVRMtg4cKjVi7k1tA83 XFRkwdH2bTvteQ8A5VXa9rXeUl4esB01S6CydTP2WPRl7Dyefbkysu7/ybDA7A== From: michael.opdenacker@bootlin.com To: docs@lists.yoctoproject.org Cc: Michael Opdenacker Subject: [kirkstone][PATCH 10/10] dev-manual: licenses: update license manifest location Date: Wed, 20 Sep 2023 10:15:44 +0200 Message-Id: <20230920081544.1226760-11-michael.opdenacker@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> References: <20230920081544.1226760-1-michael.opdenacker@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: michael.opdenacker@bootlin.com 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, 20 Sep 2023 08:16:13 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/docs/message/4257 From: Michael Opdenacker - Fix broken markup (wasn't displaying properly) - Update the path to the directory containing license information (this change applies to the kirkstone branch) - Fix typo later in the document Signed-off-by: Michael Opdenacker --- documentation/dev-manual/licenses.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/documentation/dev-manual/licenses.rst b/documentation/dev-manual/licenses.rst index 15e5c7396a..419af7c326 100644 --- a/documentation/dev-manual/licenses.rst +++ b/documentation/dev-manual/licenses.rst @@ -326,7 +326,8 @@ completeness. .. note:: The Yocto Project generates a license manifest during image creation - that is located in ``${DEPLOY_DIR}/licenses/``\ `image_name`\ ``-``\ `datestamp` + that is located in + ``${DEPLOY_DIR}/licenses/-.rootfs-/`` to assist with any audits. Providing the Source Code @@ -444,7 +445,7 @@ with source as defined by the GPL and other open source licenses. Providing Compilation Scripts and Source Code Modifications ----------------------------------------------------------- -At this point, we have addressed all we need to prior to generating the +At this point, we have addressed all we need prior to generating the image. The next two requirements are addressed during the final packaging of the release.