migration-4.2.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Release 4.2 (mickledore)
  3. ========================
  4. Migration notes for 4.2 (mickledore)
  5. ------------------------------------
  6. This section provides migration information for moving to the Yocto
  7. Project 4.2 Release (codename "mickledore") from the prior release.
  8. .. _migration-4.2-supported-distributions:
  9. Supported distributions
  10. ~~~~~~~~~~~~~~~~~~~~~~~
  11. This release supports running BitBake on new GNU/Linux distributions:
  12. - Fedora 36 and 37
  13. - AlmaLinux 8.7 and 9.1
  14. - OpenSuse 15.4
  15. On the other hand, some earlier distributions are no longer supported:
  16. - Debian 10.x
  17. - Fedora 34 and 35
  18. - AlmaLinux 8.5
  19. See :ref:`all supported distributions <system-requirements-supported-distros>`.
  20. .. _migration-4.2-python-3.8:
  21. Python 3.8 is now the minimum required Python version version
  22. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  23. BitBake and OpenEmbedded-Core now require Python 3.8 or newer,
  24. making it a requirement to use a distribution providing at least this
  25. version, or to install a :term:`buildtools` tarball.
  26. .. _migration-4.2-gcc-8.0:
  27. gcc 8.0 is now the minimum required GNU C compiler version
  28. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. This version, released in 2018, is a minimum requirement
  30. to build the ``mesa-native`` recipe and as the latter is in the
  31. default dependency chain when building QEMU this has now been
  32. made a requirement for all builds.
  33. In the event that your host distribution does not provide this
  34. or a newer version of gcc, you can install a
  35. :term:`buildtools-extended` tarball.
  36. .. _migration-4.2-new-nvd-api:
  37. Fetching the NVD vulnerability database through the 2.0 API
  38. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  39. This new version adds a new fetcher for the NVD database using the 2.0 API,
  40. as the 1.0 API will be retired in 2023.
  41. The implementation changes as little as possible, keeping the current
  42. database format (but using a different database file for the transition
  43. period), with a notable exception of not using the META table.
  44. Here are minor changes that you may notice:
  45. - The database starts in 1999 instead of 2002
  46. - The complete fetch is longer (30 minutes typically)
  47. .. _migration-4.2-rust-crate-checksums:
  48. Rust: mandatory checksums for crates
  49. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  50. This release now supports checksums for Rust crates and makes
  51. them mandatory for each crate in a recipe. See :yocto_git:`python3_bcrypt recipe changes
  52. </poky/commit/?h=mickledore&id=0dcb5ab3462fdaaf1646b05a00c7150eea711a9a>`
  53. for example.
  54. The ``cargo-update-recipe-crates`` utility
  55. :yocto_git:`has been extended </poky/commit/?h=mickledore&id=eef7fbea2c5bf59369390be4d5efa915591b7b22>`
  56. to include such checksums. So, in case you need to add the list of checksums
  57. to a recipe just inheriting the :ref:`ref-classes-cargo` class so far, you can
  58. follow these steps:
  59. #. Make the recipe inherit :ref:`ref-classes-cargo-update-recipe-crates`
  60. #. Remove all ``crate://`` lines from the recipe
  61. #. Create an empty ``${BPN}-crates.inc`` file and make your recipe require it
  62. #. Execute ``bitbake -c update_crates your_recipe``
  63. #. Copy and paste the output of BitBake about the missing checksums into the
  64. ``${BPN}-crates.inc`` file.
  65. .. _migration-4.2-addpylib:
  66. Python library code extensions
  67. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  68. BitBake in this release now supports a new ``addpylib`` directive to enable
  69. Python libraries within layers.
  70. This directive should be added to your layer configuration
  71. as in the below example from ``meta/conf/layer.conf``::
  72. addpylib ${LAYERDIR}/lib oe
  73. Layers currently adding a lib directory to extend Python library code should now
  74. use this directive as :term:`BBPATH` is not going to be added automatically by
  75. OE-Core in future. Note that the directives are immediate operations, so it does
  76. make modules available for use sooner than the current BBPATH-based approach.
  77. For more information, see :ref:`bitbake-user-manual/bitbake-user-manual-metadata:extending python library code`.
  78. .. _migration-4.2-removed-variables:
  79. Removed variables
  80. ~~~~~~~~~~~~~~~~~
  81. The following variables have been removed:
  82. - ``SERIAL_CONSOLE``, deprecated since version 2.6, replaced by :term:`SERIAL_CONSOLES`.
  83. - ``PACKAGEBUILDPKGD``, a mostly internal variable in the :ref:`ref-classes-package`
  84. class was rarely used to customise packaging. If you were using this in your custom
  85. recipes or bbappends, you will need to switch to using :term:`PACKAGE_PREPROCESS_FUNCS`
  86. or :term:`PACKAGESPLITFUNCS` instead.
  87. .. _migration-4.2-removed-recipes:
  88. Removed recipes
  89. ~~~~~~~~~~~~~~~
  90. The following recipes have been removed in this release:
  91. - ``python3-picobuild``: after switching to ``python3-build``
  92. - ``python3-strict-rfc3339``: unmaintained and not needed by anything in
  93. :oe_git:`openembedded-core </openembedded-core>`
  94. or :oe_git:`meta-openembedded </meta-openembedded>`.
  95. - ``linux-yocto``: removed version 5.19 recipes (6.1 and 5.15 still provided)
  96. .. _migration-4.2-removed-classes:
  97. Removed classes
  98. ~~~~~~~~~~~~~~~
  99. The following classes have been removed in this release:
  100. - ``rust-bin``: no longer used
  101. - ``package_tar``: could not be used for actual packaging, and thus not particularly useful.
  102. LAYERSERIES_COMPAT for custom layers and devtool workspace
  103. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  104. Some layer maintainers have been setting :term:`LAYERSERIES_COMPAT` in their
  105. layer's ``conf/layer.conf`` to the value of ``LAYERSERIES_CORENAMES`` to
  106. effectively bypass the compatibility check - this is no longer permitted.
  107. Layer maintainers should set :term:`LAYERSERIES_COMPAT` appropriately to
  108. help users understand the compatibility status of the layer.
  109. Additionally, the :term:`LAYERSERIES_COMPAT` value for the devtool workspace
  110. layer is now set at the time of creation, thus if you upgrade with the
  111. workspace layer enabled and you wish to retain it, you will need to manually
  112. update the :term:`LAYERSERIES_COMPAT` value in ``workspace/conf/layer.conf``
  113. (or remove the path from :term:`BBLAYERS` in ``conf/bblayers.conf`` and
  114. delete/move the ``workspace`` directory out of the way if you no longer
  115. need it).
  116. .. _migration-4.2-runqemu-slirp:
  117. runqemu now limits slirp host port forwarding to localhost
  118. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  119. With default slirp port forwarding configuration in runqemu, qemu
  120. previously listened on TCP ports 2222 and 2323 on all IP addresses
  121. available on the build host. Most use cases with runqemu only need
  122. it for localhost and it is not safe to run qemu images with root
  123. login without password enabled and listening on all available,
  124. possibly Internet reachable network interfaces. Thus, in this
  125. release we limit qemu port forwarding to localhost (127.0.0.1).
  126. However, if you need the qemu machine to be reachable from the
  127. network, then it can be enabled via ``conf/local.conf`` or machine
  128. config variable ``QB_SLIRP_OPT``::
  129. QB_SLIRP_OPT = "-netdev user,id=net0,hostfwd=tcp::2222-:22"
  130. .. _migration-4.2-patch-qa:
  131. Patch QA checks
  132. ~~~~~~~~~~~~~~~
  133. The QA checks for patch fuzz and Upstream-Status have been reworked
  134. slightly in this release. The Upstream-Status checking is now configurable
  135. from :term:`WARN_QA` / :term:`ERROR_QA` (``patch-status-core`` for the
  136. core layer, and ``patch-status-noncore`` for other layers).
  137. The ``patch-fuzz`` and ``patch-status-core`` checks are now in the default
  138. value of :term:`ERROR_QA` so that they will cause the build to fail
  139. if triggered. If you prefer to avoid this you will need to adjust the value
  140. of :term:`ERROR_QA` in your configuration as desired.
  141. .. _migration-4.2-mesa:
  142. Native/nativesdk mesa usage and graphics drivers
  143. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  144. This release includes mesa 23.0, and with that mesa release it is not longer
  145. possible to use drivers from the host system, as mesa upstream has added strict
  146. checks for matching builds between drivers and libraries that load them.
  147. This is particularly relevant when running QEMU built within the build
  148. system. A check has been added to runqemu so that there is a helpful error
  149. when there is no native/nativesdk opengl/virgl support available.
  150. To support this, a number of drivers have been enabled when building ``mesa-native``.
  151. The one major dependency pulled in by this change is ``llvm-native`` which will
  152. add a few minutes to the build on a modern machine. If this is undesirable, you
  153. can set the value of :term:`DISTRO_FEATURES_NATIVE` in your configuration such
  154. that ``opengl`` is excluded.
  155. .. _migration-4.2-misc-changes:
  156. Miscellaneous changes
  157. ~~~~~~~~~~~~~~~~~~~~~
  158. - The :term:`IMAGE_NAME` variable is now set based on :term:`IMAGE_LINK_NAME`. This
  159. means that if you are setting :term:`IMAGE_LINK_NAME` to "" to disable unversioned
  160. image symlink creation, you also now need to set :term:`IMAGE_NAME` to still have
  161. a reasonable value e.g.::
  162. IMAGE_LINK_NAME = ""
  163. IMAGE_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
  164. - In ``/etc/os-release``, the ``VERSION_CODENAME`` field is now used instead of
  165. ``DISTRO_CODENAME`` (though its value is still set from the :term:`DISTRO_CODENAME`
  166. variable) for better conformance to standard os-release usage. If you have runtime
  167. code reading this from ``/etc/os-release`` it may need to be updated.
  168. - The kmod recipe now enables OpenSSL support by default in order to support module
  169. signing. If you do not need this and wish to reclaim some space/avoid the dependency
  170. you should set :term:`PACKAGECONFIG` in a kmod bbappend (or ``PACKAGECONFIG:pn-kmod``
  171. at the configuration level) to exclude ``openssl``.
  172. - The ``OEBasic`` signature handler (see :term:`BB_SIGNATURE_HANDLER`) has been
  173. removed. It is unlikely that you would have selected to use this, but if you have
  174. you will need to remove this setting.
  175. - The :ref:`ref-classes-package` class now checks if package names conflict via
  176. ``PKG:${PN}`` override during ``do_package``. If you receive the associated error
  177. you will need to address the :term:`PKG` usage so that the conflict is resolved.
  178. - openssh no longer uses :term:`RRECOMMENDS` to pull in ``rng-tools``, since rngd
  179. is no longer needed as of Linux kernel 5.6. If you still need ``rng-tools``
  180. installed for other reasons, you should add ``rng-tools`` explicitly to your
  181. image. If you additionally need rngd to be started as a service you will also
  182. need to add the ``rng-tools-service`` package as that has been split out.
  183. - The cups recipe no longer builds with the web interface enabled, saving ~1.8M of
  184. space in the final image. If you wish to enable it, you should set
  185. :term:`PACKAGECONFIG` in a cups bbappend (or ``PACKAGECONFIG:pn-cups`` at the
  186. configuration level) to include ``webif``.
  187. - The :ref:`ref-classes-scons` class now passes a ``MAXLINELENGTH`` argument to
  188. scons in order to fix an issue with scons and command line lengths when ccache is
  189. enabled. However, some recipes may be using older scons versions which don't support
  190. this argument. If that is the case you can set the following in the recipe in order
  191. to disable this::
  192. SCONS_MAXLINELENGTH = ""