From: michael.opdenacker@bootlin.com
To: docs@lists.yoctoproject.org
Cc: Michael Opdenacker <michael.opdenacker@bootlin.com>,
Tim Orling <ticotimo@gmail.com>
Subject: [nanbield][PATCH 7/7] manuals: document VIRTUAL-RUNTIME variables
Date: Thu, 14 Mar 2024 10:15:08 +0100 [thread overview]
Message-ID: <20240314091508.84166-8-michael.opdenacker@bootlin.com> (raw)
In-Reply-To: <20240314091508.84166-1-michael.opdenacker@bootlin.com>
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
Document the convention to use variables prefixed by VIRTUAL_RUNTIME.
Add references to the new term where possible.
Another reason is that such variables are recommended
in a warning issued by meta/classes-global/insane.bbclass
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reported-by: Tim Orling <ticotimo@gmail.com>
---
documentation/dev-manual/device-manager.rst | 8 ++---
documentation/ref-manual/variables.rst | 37 ++++++++++++++++++---
2 files changed, 36 insertions(+), 9 deletions(-)
diff --git a/documentation/dev-manual/device-manager.rst b/documentation/dev-manual/device-manager.rst
index 0343d19b9c..49fc785fec 100644
--- a/documentation/dev-manual/device-manager.rst
+++ b/documentation/dev-manual/device-manager.rst
@@ -60,10 +60,10 @@ kernel.
All devices created by ``devtmpfs`` will be owned by ``root`` and have
permissions ``0600``.
-To have more control over the device nodes, you can use a device manager
-like ``udev`` or ``busybox-mdev``. You choose the device manager by
-defining the ``VIRTUAL-RUNTIME_dev_manager`` variable in your machine or
-distro configuration file. Alternatively, you can set this variable in
+To have more control over the device nodes, you can use a device manager like
+``udev`` or ``busybox-mdev``. You choose the device manager by defining the
+:term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` variable in your machine
+or distro configuration file. Alternatively, you can set this variable in
your ``local.conf`` configuration file::
VIRTUAL-RUNTIME_dev_manager = "udev"
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst
index ec879f9f86..52fd7d9002 100644
--- a/documentation/ref-manual/variables.rst
+++ b/documentation/ref-manual/variables.rst
@@ -6750,11 +6750,11 @@ system and gives an overview of their function and contents.
.. note::
- A corresponding mechanism for virtual runtime dependencies
- (packages) exists. However, the mechanism does not depend on any
- special functionality beyond ordinary variable assignments. For
- example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of
- the component that manages the ``/dev`` directory.
+ A corresponding mechanism for virtual runtime dependencies (packages)
+ exists. However, the mechanism does not depend on any special
+ functionality beyond ordinary variable assignments. For example,
+ :term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` refers to the
+ package of the component that manages the ``/dev`` directory.
Setting the "preferred provider" for runtime dependencies is as
simple as using the following assignment in a configuration file::
@@ -9880,6 +9880,33 @@ system and gives an overview of their function and contents.
Additionally, you should also set the
:term:`USERADD_ERROR_DYNAMIC` variable.
+ :term:`VIRTUAL-RUNTIME`
+ :term:`VIRTUAL-RUNTIME` is a commonly used prefix for defining virtual
+ packages for runtime usage, typically for use in :term:`RDEPENDS`
+ or in image definitions.
+
+ An example is ``VIRTUAL-RUNTIME_base-utils`` that makes it possible
+ to either use BusyBox based utilities::
+
+ VIRTUAL-RUNTIME_base-utils = "busybox"
+
+ or their full featured implementations from GNU Coreutils
+ and other projects::
+
+ VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils"
+
+ Here are two examples using this virtual runtime package. The
+ first one is in :yocto_git:`initramfs-framework_1.0.bb
+ </poky/tree/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb?h=scarthgap>`::
+
+ RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}"
+
+ The second example is in the :yocto_git:`core-image-initramfs-boot
+ </poky/tree/meta/recipes-core/images/core-image-initramfs-boot.bb?h=scarthgap>`
+ image definition::
+
+ PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd"
+
:term:`VOLATILE_LOG_DIR`
Specifies the persistence of the target's ``/var/log`` directory,
which is used to house postinstall target log files.
--
2.34.1
prev parent reply other threads:[~2024-03-14 9:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-14 9:15 [nanbield][PATCH 0/7] documentation backports michael.opdenacker
2024-03-14 9:15 ` [nanbield][PATCH 1/7] ref-manual: tasks: do_cleanall: recommend using '-f' instead michael.opdenacker
2024-03-14 9:15 ` [nanbield][PATCH 2/7] ref-manual: tasks: do_cleansstate: recommend using '-f' instead for a shared sstate michael.opdenacker
2024-03-14 9:15 ` [nanbield][PATCH 3/7] ref-manual: variables: correct sdk installation default path michael.opdenacker
2024-03-14 9:15 ` [nanbield][PATCH 4/7] ref-manual: variables: adding multiple groups in GROUPADD_PARAM michael.opdenacker
2024-03-14 9:15 ` [nanbield][PATCH 5/7] dev-manual: packages: fix capitalization michael.opdenacker
2024-03-14 9:15 ` [nanbield][PATCH 6/7] contributor-guide: add notes for tests michael.opdenacker
2024-03-14 9:15 ` michael.opdenacker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240314091508.84166-8-michael.opdenacker@bootlin.com \
--to=michael.opdenacker@bootlin.com \
--cc=docs@lists.yoctoproject.org \
--cc=ticotimo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox