diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2024-03-05 19:36:46 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2024-03-16 08:33:21 -1000 |
commit | cae6c782545aabcd30d0bc54f56711bea796bd3e (patch) | |
tree | 62d753e93ba4655f4bba5c56f26294568ba4939a | |
parent | db0eb3116e377f1db12e79e158deebc2bc33ac13 (diff) | |
download | poky-cae6c782545aabcd30d0bc54f56711bea796bd3e.tar.gz |
manuals: document VIRTUAL-RUNTIME variables
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
(From yocto-docs rev: 692ee19c99d015adf79da540b03d12245f7024f4)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reported-by: Tim Orling <ticotimo@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | documentation/dev-manual/device-manager.rst | 8 | ||||
-rw-r--r-- | 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. | |||
60 | All devices created by ``devtmpfs`` will be owned by ``root`` and have | 60 | All devices created by ``devtmpfs`` will be owned by ``root`` and have |
61 | permissions ``0600``. | 61 | permissions ``0600``. |
62 | 62 | ||
63 | To have more control over the device nodes, you can use a device manager | 63 | To have more control over the device nodes, you can use a device manager like |
64 | like ``udev`` or ``busybox-mdev``. You choose the device manager by | 64 | ``udev`` or ``busybox-mdev``. You choose the device manager by defining the |
65 | defining the ``VIRTUAL-RUNTIME_dev_manager`` variable in your machine or | 65 | :term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` variable in your machine |
66 | distro configuration file. Alternatively, you can set this variable in | 66 | or distro configuration file. Alternatively, you can set this variable in |
67 | your ``local.conf`` configuration file:: | 67 | your ``local.conf`` configuration file:: |
68 | 68 | ||
69 | VIRTUAL-RUNTIME_dev_manager = "udev" | 69 | 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. | |||
6750 | 6750 | ||
6751 | .. note:: | 6751 | .. note:: |
6752 | 6752 | ||
6753 | A corresponding mechanism for virtual runtime dependencies | 6753 | A corresponding mechanism for virtual runtime dependencies (packages) |
6754 | (packages) exists. However, the mechanism does not depend on any | 6754 | exists. However, the mechanism does not depend on any special |
6755 | special functionality beyond ordinary variable assignments. For | 6755 | functionality beyond ordinary variable assignments. For example, |
6756 | example, ``VIRTUAL-RUNTIME_dev_manager`` refers to the package of | 6756 | :term:`VIRTUAL-RUNTIME_dev_manager <VIRTUAL-RUNTIME>` refers to the |
6757 | the component that manages the ``/dev`` directory. | 6757 | package of the component that manages the ``/dev`` directory. |
6758 | 6758 | ||
6759 | Setting the "preferred provider" for runtime dependencies is as | 6759 | Setting the "preferred provider" for runtime dependencies is as |
6760 | simple as using the following assignment in a configuration file:: | 6760 | simple as using the following assignment in a configuration file:: |
@@ -9880,6 +9880,33 @@ system and gives an overview of their function and contents. | |||
9880 | Additionally, you should also set the | 9880 | Additionally, you should also set the |
9881 | :term:`USERADD_ERROR_DYNAMIC` variable. | 9881 | :term:`USERADD_ERROR_DYNAMIC` variable. |
9882 | 9882 | ||
9883 | :term:`VIRTUAL-RUNTIME` | ||
9884 | :term:`VIRTUAL-RUNTIME` is a commonly used prefix for defining virtual | ||
9885 | packages for runtime usage, typically for use in :term:`RDEPENDS` | ||
9886 | or in image definitions. | ||
9887 | |||
9888 | An example is ``VIRTUAL-RUNTIME_base-utils`` that makes it possible | ||
9889 | to either use BusyBox based utilities:: | ||
9890 | |||
9891 | VIRTUAL-RUNTIME_base-utils = "busybox" | ||
9892 | |||
9893 | or their full featured implementations from GNU Coreutils | ||
9894 | and other projects:: | ||
9895 | |||
9896 | VIRTUAL-RUNTIME_base-utils = "packagegroup-core-base-utils" | ||
9897 | |||
9898 | Here are two examples using this virtual runtime package. The | ||
9899 | first one is in :yocto_git:`initramfs-framework_1.0.bb | ||
9900 | </poky/tree/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb?h=scarthgap>`:: | ||
9901 | |||
9902 | RDEPENDS:${PN} += "${VIRTUAL-RUNTIME_base-utils}" | ||
9903 | |||
9904 | The second example is in the :yocto_git:`core-image-initramfs-boot | ||
9905 | </poky/tree/meta/recipes-core/images/core-image-initramfs-boot.bb?h=scarthgap>` | ||
9906 | image definition:: | ||
9907 | |||
9908 | PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS} ${VIRTUAL-RUNTIME_base-utils} base-passwd" | ||
9909 | |||
9883 | :term:`VOLATILE_LOG_DIR` | 9910 | :term:`VOLATILE_LOG_DIR` |
9884 | Specifies the persistence of the target's ``/var/log`` directory, | 9911 | Specifies the persistence of the target's ``/var/log`` directory, |
9885 | which is used to house postinstall target log files. | 9912 | which is used to house postinstall target log files. |