migration-5.1.rst 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Release 5.1 (styhead)
  3. =====================
  4. Migration notes for 5.1 (styhead)
  5. ---------------------------------
  6. This section provides migration information for moving to the Yocto
  7. Project 5.1 Release (codename "styhead") from the prior release.
  8. .. _migration-5.1-workdir-changes:
  9. :term:`WORKDIR` changes
  10. ~~~~~~~~~~~~~~~~~~~~~~~
  11. S = ${WORKDIR} no longer supported
  12. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  13. If a recipe has :term:`S` set to be :term:`WORKDIR`, this is no longer
  14. supported, and an error will be issued. The recipe should be changed to::
  15. S = "${WORKDIR}/sources"
  16. UNPACKDIR = "${S}"
  17. Any :term:`WORKDIR` references where files from :term:`SRC_URI` are referenced
  18. should be changed to :term:`S`. These are commonly in :ref:`ref-tasks-compile`,
  19. :ref:`ref-tasks-compile`, :ref:`ref-tasks-install` and :term:`LIC_FILES_CHKSUM`.
  20. :term:`WORKDIR` references in recipes
  21. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  22. :term:`WORKDIR` references in other recipes need auditing. If they reference
  23. files from :term:`SRC_URI`, they likely need changing to :term:`UNPACKDIR`.
  24. These are commonly in :ref:`ref-tasks-compile` and :ref:`ref-tasks-install`
  25. for things like service or configuration files. One unusual case is
  26. ``${WORKDIR}/${BP}`` which should probably be set to ``${S}``.
  27. References to ``../`` in :term:`LIC_FILES_CHKSUM` or elsewhere may need changing
  28. to :term:`UNPACKDIR`. References to :term:`WORKDIR` in ``sed`` commands are
  29. usually left as they are.
  30. General notes
  31. ^^^^^^^^^^^^^
  32. Files from :ref:`ref-tasks-unpack` now unpack to ``WORKDIR/sources-unpack/``
  33. rather than ``WORKDIR/``.
  34. If :term:`S` is set to a subdirectory under :term:`WORKDIR` and that
  35. subdirectory exists in ``sources-unpack`` after :ref:`ref-tasks-unpack` runs,
  36. it is moved to :term:`WORKDIR`. This means that ``S = "${WORKDIR}/${BP}"``,
  37. ``S = "${WORKDIR}/git"`` and also deeper paths continue to work as expected
  38. without changes. We cannot use symlinks to do this as it breaks autotools
  39. based recipes. Keeping all sources under ``sources-unpack`` wasn't considered
  40. as it meant more invasive recipes changes. The key objective was separating the
  41. :ref:`ref-tasks-unpack` task output from :term:`WORKDIR`.
  42. Previously, :term:`S` was always created but after the recent changes it is no
  43. longer the case. This means the check in ``do_unpack_qa`` triggers where
  44. :term:`S` is not created by a recipe while it didn't happen before. This can
  45. require to add an :term:`S` definition to a recipe that only uses
  46. ``file://`` :term:`SRC_URI` entries. To be consistent, the following pattern is
  47. recommended::
  48. S = "${WORKDIR}/sources"
  49. UNPACKDIR = "${S}"
  50. Building C files from :term:`UNPACKDIR` without setting :term:`S` to point at
  51. it does not work as the debug prefix mapping doesn't handle that.
  52. ``devtool`` and ``recipetool`` have been updated to handle this and their
  53. support for ``S = WORKDIR`` and ``oe-local-files`` has been removed.
  54. .. _migration-5.1-supported-kernel-versions:
  55. Supported kernel versions
  56. ~~~~~~~~~~~~~~~~~~~~~~~~~
  57. The :term:`OLDEST_KERNEL` setting is still "5.15" in this release, meaning that
  58. out the box, older kernels are not supported. See :ref:`4.3 migration notes
  59. <migration-4.3-supported-kernel-versions>` for details.
  60. .. _migration-5.1-supported-distributions:
  61. Supported distributions
  62. ~~~~~~~~~~~~~~~~~~~~~~~
  63. Compared to the previous releases, running BitBake is supported on new
  64. GNU/Linux distributions:
  65. - Ubuntu 24.10
  66. - Fedora 40
  67. - OpenSUSE Leap 15.5
  68. - OpenSUSE Leap 15.6
  69. On the other hand, some earlier distributions are no longer supported:
  70. - Ubuntu 23.04
  71. See :ref:`all supported distributions <system-requirements-supported-distros>`.
  72. .. _migration-5.1-go-changes:
  73. Go language changes
  74. ~~~~~~~~~~~~~~~~~~~
  75. - After dropping the custom :ref:`ref-tasks-unpack` from the
  76. :ref:`ref-classes-go` class, go recipes should now add
  77. ``destsuffix=${GO_SRCURI_DESTSUFFIX}`` to their :term:`SRC_URI` to extract
  78. them in the appropriate path. An example would be::
  79. SRC_URI = "git://go.googlesource.com/example;branch=master;protocol=https;destsuffix=${GO_SRCURI_DESTSUFFIX}"
  80. - Go modules are no longer compiled with ``--linkmode=external``.
  81. .. _migration-5.1-systemd-changes:
  82. systemd changes
  83. ~~~~~~~~~~~~~~~
  84. - New :term:`PACKAGECONFIG` value ``bpf-framework`` used to pre-compile eBPFs
  85. that are required for the systemd.resource-control features
  86. ``RestrictFileSystems`` and ``RestrictNetworkInterfaces``.
  87. .. _migration-5.1-recipe-changes:
  88. Recipe changes
  89. ~~~~~~~~~~~~~~
  90. - ``gobject-introspection``: the ``giscanner`` utility is now shipped as a
  91. separate package in ``gobject-introspection-tools``.
  92. - ``perf`` no longer uses ``libnewt`` for compiling its TUI.
  93. - ``openssl``: do not build the test suite unless ptests are enabled.
  94. .. _migration-5.1-removed-variables:
  95. Removed variables
  96. ~~~~~~~~~~~~~~~~~
  97. The following variables have been removed:
  98. - ``TCLIBCAPPEND`` is now removed as sharing :term:`TMPDIR` for multiple libc
  99. providers has been supported for years.
  100. - ``VOLATILE_LOG_DIR``: :term:`FILESYSTEM_PERMS_TABLES` is now used instead.
  101. By default, :term:`FILESYSTEM_PERMS_TABLES` now contains the value
  102. ``files/fs-perms-volatile-log.txt``, which means that volatile log is
  103. enabled. Users can disable the volatile log by removing the value
  104. ``files/fs-perms-volatile-log.txt`` from :term:`FILESYSTEM_PERMS_TABLES`.
  105. - ``VOLATILE_TMP_DIR``: :term:`FILESYSTEM_PERMS_TABLES` is now used instead.
  106. By default, :term:`FILESYSTEM_PERMS_TABLES` now contains the value
  107. ``files/fs-perms-volatile-tmp.txt``, which means that volatile tmp is
  108. enabled. Users can disable the volatile tmp by removing the value
  109. ``files/fs-perms-volatile-tmp.txt`` from :term:`FILESYSTEM_PERMS_TABLES`.
  110. .. _migration-5.1-removed-recipes:
  111. Removed recipes
  112. ~~~~~~~~~~~~~~~
  113. The following recipes have been removed in this release:
  114. - ``liba52``: superseded by ``ffmpeg``
  115. - ``libomxil``: recipe removed as its only consumer, the gstreamer omx plugin,
  116. was removed and has not been developed for several years
  117. - ``libnewt``: moved to meta-oe
  118. - ``mpeg2dec``: inactive for 10 years and superseded by ``ffmpeg``
  119. - ``pytest-runner``: moved to meta-python
  120. - ``python3-importlib-metadata``: moved to meta-python
  121. - ``python3-pathlib2``: moved to meta-python
  122. - ``python3-py``: moved to meta-python
  123. - ``python3-rfc3986-validator``: moved to meta-python
  124. - ``python3-toml``: moved to meta-python
  125. - ``python3-tomli``: moved to meta-python
  126. - ``usbinit``: recipe was poorly named as it is a gadget Ethernet driver.
  127. Gadget Ethernet is of questionable use now and usbinit isn't referenced/used
  128. anywhere within OE-Core.
  129. .. _migration-5.1-removed-classes:
  130. Removed classes
  131. ~~~~~~~~~~~~~~~
  132. The following classes have been removed in this release:
  133. - ``siteconfig``: removed as it was only used by ``ncurses`` and ``zlib`` and
  134. adding minimal added-value for a considerable amount of added runtime.
  135. .. _migration-5.1-misc-changes:
  136. Miscellaneous changes
  137. ~~~~~~~~~~~~~~~~~~~~~
  138. - `oe-selftest` now only rewrites environment variable paths that absolutely
  139. point to builddir (i.e ``X=$BUILDDIR/conf/`` is still rewritten to point to
  140. the `oe-selftest` ``conf/`` directory but not ``Y=$BUILDDIR/../bitbake/`` which
  141. still point to the ``bitbake/`` directory)
  142. For example (taken from :yocto_ab:`autobuilder <>` environment):
  143. :term:`BB_LOGCONFIG` is set as:
  144. ``BB_LOGCONFIG="${BUILDDIR}/../bitbake/contrib/autobuilderlog.json"``.
  145. Note the relative path starting from the build directory to outside of it.
  146. This path is not changed by `oe-selftest` anymore.
  147. Environment variables containing relative paths from tested build directory
  148. to outside of the original build directory may need to be updated as they
  149. won't be changed by `oe-selftest`.
  150. - Several sanity checks from the :ref:`ref-classes-insane` class, such as
  151. ``buildpaths``, have been promoted to errors instead of warnings.
  152. - The ``license-incompatible`` :term:`ERROR_QA` sanity check was renamed to
  153. ``license-exception``.