migration-3.0.rst 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Release 3.0 (zeus)
  3. ==================
  4. This section provides migration information for moving to the Yocto
  5. Project 3.0 Release (codename "zeus") from the prior release.
  6. .. _migration-3.0-init-system-selection:
  7. Init System Selection
  8. ---------------------
  9. Changing the init system manager previously required setting a number of
  10. different variables. You can now change the manager by setting the
  11. ``INIT_MANAGER`` variable and the corresponding include files (i.e.
  12. ``conf/distro/include/init-manager-*.conf``). Include files are provided
  13. for four values: "none", "sysvinit", "systemd", and "mdev-busybox". The
  14. default value, "none", for ``INIT_MANAGER`` should allow your current
  15. settings to continue working. However, it is advisable to explicitly set
  16. ``INIT_MANAGER``.
  17. .. _migration-3.0-lsb-support-removed:
  18. LSB Support Removed
  19. -------------------
  20. Linux Standard Base (LSB) as a standard is not current, and is not well
  21. suited for embedded applications. Support can be continued in a separate
  22. layer if needed. However, presently LSB support has been removed from
  23. the core.
  24. As a result of this change, the ``poky-lsb`` derivative distribution
  25. configuration that was also used for testing alternative configurations
  26. has been replaced with a ``poky-altcfg`` distribution that has LSB parts
  27. removed.
  28. .. _migration-3.0-removed-recipes:
  29. Removed Recipes
  30. ---------------
  31. The following recipes have been removed.
  32. - ``core-image-lsb-dev``: Part of removed LSB support.
  33. - ``core-image-lsb``: Part of removed LSB support.
  34. - ``core-image-lsb-sdk``: Part of removed LSB support.
  35. - ``cve-check-tool``: Functionally replaced by the ``cve-update-db``
  36. recipe and :ref:`ref-classes-cve-check` class.
  37. - ``eglinfo``: No longer maintained. ``eglinfo`` from ``mesa-demos`` is
  38. an adequate and maintained alternative.
  39. - ``gcc-8.3``: Version 8.3 removed. Replaced by 9.2.
  40. - ``gnome-themes-standard``: Only needed by gtk+ 2.x, which has been
  41. removed.
  42. - ``gtk+``: GTK+ 2 is obsolete and has been replaced by gtk+3.
  43. - ``irda-utils``: Has become obsolete. IrDA support has been removed
  44. from the Linux kernel in version 4.17 and later.
  45. - ``libnewt-python``: ``libnewt`` Python support merged into main
  46. ``libnewt`` recipe.
  47. - ``libsdl``: Replaced by newer ``libsdl2``.
  48. - ``libx11-diet``: Became obsolete.
  49. - ``libxx86dga``: Removed obsolete client library.
  50. - ``libxx86misc``: Removed. Library is redundant.
  51. - ``linux-yocto``: Version 5.0 removed, which is now redundant (5.2 /
  52. 4.19 present).
  53. - ``lsbinitscripts``: Part of removed LSB support.
  54. - ``lsb``: Part of removed LSB support.
  55. - ``lsbtest``: Part of removed LSB support.
  56. - ``openssl10``: Replaced by newer ``openssl`` version 1.1.
  57. - ``packagegroup-core-lsb``: Part of removed LSB support.
  58. - ``python-nose``: Removed the Python 2.x version of the recipe.
  59. - ``python-numpy``: Removed the Python 2.x version of the recipe.
  60. - ``python-scons``: Removed the Python 2.x version of the recipe.
  61. - ``source-highlight``: No longer needed.
  62. - ``stress``: Replaced by ``stress-ng``.
  63. - ``vulkan``: Split into ``vulkan-loader``, ``vulkan-headers``, and
  64. ``vulkan-tools``.
  65. - ``weston-conf``: Functionality moved to ``weston-init``.
  66. .. _migration-3.0-packaging-changes:
  67. Packaging Changes
  68. -----------------
  69. The following packaging changes have occurred.
  70. - The :wikipedia:`Epiphany <GNOME_Web>` browser
  71. has been dropped from ``packagegroup-self-hosted`` as it has not been
  72. needed inside ``build-appliance-image`` for quite some time and was
  73. causing resource problems.
  74. - ``libcap-ng`` Python support has been moved to a separate
  75. ``libcap-ng-python`` recipe to streamline the build process when the
  76. Python bindings are not needed.
  77. - ``libdrm`` now packages the file ``amdgpu.ids`` into a separate
  78. ``libdrm-amdgpu`` package.
  79. - ``python3``: The ``runpy`` module is now in the ``python3-core``
  80. package as it is required to support the common "python3 -m" command
  81. usage.
  82. - ``distcc`` now provides separate ``distcc-client`` and
  83. ``distcc-server`` packages as typically one or the other are needed,
  84. rather than both.
  85. - ``python*-setuptools`` recipes now separately package the
  86. ``pkg_resources`` module in a ``python-pkg-resources`` /
  87. ``python3-pkg-resources`` package as the module is useful independent
  88. of the rest of the setuptools package. The main ``python-setuptools``
  89. / ``python3-setuptools`` package depends on this new package so you
  90. should only need to update dependencies unless you want to take
  91. advantage of the increased granularity.
  92. .. _migration-3.0-cve-checking:
  93. CVE Checking
  94. ------------
  95. ``cve-check-tool`` has been functionally replaced by a new
  96. ``cve-update-db`` recipe and functionality built into the :ref:`ref-classes-cve-check`
  97. class. The result uses NVD JSON data feeds rather than the deprecated
  98. XML feeds that ``cve-check-tool`` was using, supports CVSSv3 scoring,
  99. and makes other improvements.
  100. Additionally, the ``CVE_CHECK_CVE_WHITELIST`` variable has been replaced
  101. by ``CVE_CHECK_WHITELIST`` (replaced by :term:`CVE_CHECK_IGNORE` in version 4.0).
  102. .. _migration-3.0-bitbake-changes:
  103. BitBake Changes
  104. ---------------
  105. The following BitBake changes have occurred.
  106. - ``addtask`` statements now properly validate dependent tasks.
  107. Previously, an invalid task was silently ignored. With this change,
  108. the invalid task generates a warning.
  109. - Other invalid ``addtask`` and ``deltask`` usages now trigger these
  110. warnings: "multiple target tasks arguments with addtask / deltask",
  111. and "multiple before/after clauses".
  112. - The "multiconfig" prefix is now shortened to "mc". "multiconfig" will
  113. continue to work, however it may be removed in a future release.
  114. - The ``bitbake -g`` command no longer generates a
  115. ``recipe-depends.dot`` file as the contents (i.e. a reprocessed
  116. version of ``task-depends.dot``) were confusing.
  117. - The ``bb.build.FuncFailed`` exception, previously raised by
  118. ``bb.build.exec_func()`` when certain other exceptions have occurred,
  119. has been removed. The real underlying exceptions will be raised
  120. instead. If you have calls to ``bb.build.exec_func()`` in custom
  121. classes or ``tinfoil-using`` scripts, any references to
  122. ``bb.build.FuncFailed`` should be cleaned up.
  123. - Additionally, the ``bb.build.exec_func()`` no longer accepts the
  124. "pythonexception" parameter. The function now always raises
  125. exceptions. Remove this argument in any calls to
  126. ``bb.build.exec_func()`` in custom classes or scripts.
  127. - The ``BB_SETSCENE_VERIFY_FUNCTION2`` variable is no longer used. In
  128. the unlikely event that you have any references to it, they should be
  129. removed.
  130. - The ``RunQueueExecuteScenequeue`` and ``RunQueueExecuteTasks`` events
  131. have been removed since setscene tasks are now executed as part of
  132. the normal runqueue. Any event handling code in custom classes or
  133. scripts that handles these two events need to be updated.
  134. - The arguments passed to functions used with
  135. :term:`BB_HASHCHECK_FUNCTION`
  136. have changed. If you are using your own custom hash check function,
  137. see :yocto_git:`/poky/commit/?id=40a5e193c4ba45c928fccd899415ea56b5417725`
  138. for details.
  139. - Task specifications in ``BB_TASKDEPDATA`` and class implementations
  140. used in signature generator classes now use "<fn>:<task>" everywhere
  141. rather than the "." delimiter that was being used in some places.
  142. This change makes it consistent with all areas in the code. Custom
  143. signature generator classes and code that reads ``BB_TASKDEPDATA``
  144. need to be updated to use ':' as a separator rather than '.'.
  145. .. _migration-3.0-sanity-checks:
  146. Sanity Checks
  147. -------------
  148. The following sanity check changes occurred.
  149. - :term:`SRC_URI` is now checked for usage of two
  150. problematic items:
  151. - "${PN}" prefix/suffix use --- warnings always appear if ${PN} is
  152. used. You must fix the issue regardless of whether multiconfig or
  153. anything else that would cause prefixing/suffixing to happen.
  154. - Github archive tarballs --- these are not guaranteed to be stable.
  155. Consequently, it is likely that the tarballs will be refreshed and
  156. thus the :term:`SRC_URI` checksums will fail to apply. It is recommended
  157. that you fetch either an official release tarball or a specific
  158. revision from the actual Git repository instead.
  159. Either one of these items now trigger a warning by default. If you
  160. wish to disable this check, remove ``src-uri-bad`` from
  161. :term:`WARN_QA`.
  162. - The ``file-rdeps`` runtime dependency check no longer expands
  163. :term:`RDEPENDS` recursively as there is no mechanism
  164. to ensure they can be fully computed, and thus races sometimes result
  165. in errors either showing up or not. Thus, you might now see errors
  166. for missing runtime dependencies that were previously satisfied
  167. recursively. Here is an example: package A contains a shell script
  168. starting with ``#!/bin/bash`` but has no dependency on bash. However,
  169. package A depends on package B, which does depend on bash. You need
  170. to add the missing dependency or dependencies to resolve the warning.
  171. - Setting ``DEPENDS_${PN}`` anywhere (i.e. typically in a recipe) now
  172. triggers an error. The error is triggered because
  173. :term:`DEPENDS` is not a package-specific variable
  174. unlike RDEPENDS. You should set :term:`DEPENDS` instead.
  175. - systemd currently does not work well with the musl C library because
  176. only upstream officially supports linking the library with glibc.
  177. Thus, a warning is shown when building systemd in conjunction with
  178. musl.
  179. .. _migration-3.0-miscellaneous-changes:
  180. Miscellaneous Changes
  181. ---------------------
  182. The following miscellaneous changes have occurred.
  183. - The ``gnome`` class has been removed because it now does very little.
  184. You should update recipes that previously inherited this class to do
  185. the following::
  186. inherit gnomebase gtk-icon-cache gconf mime
  187. - The ``meta/recipes-kernel/linux/linux-dtb.inc`` file has been
  188. removed. This file was previously deprecated in favor of setting
  189. :term:`KERNEL_DEVICETREE` in any kernel
  190. recipe and only produced a warning. Remove any ``include`` or
  191. ``require`` statements pointing to this file.
  192. - :term:`TARGET_CFLAGS`,
  193. :term:`TARGET_CPPFLAGS`,
  194. :term:`TARGET_CXXFLAGS`, and
  195. :term:`TARGET_LDFLAGS` are no longer exported
  196. to the external environment. This change did not require any changes
  197. to core recipes, which is a good indicator that no changes will be
  198. required. However, if for some reason the software being built by one
  199. of your recipes is expecting these variables to be set, then building
  200. the recipe will fail. In such cases, you must either export the
  201. variable or variables in the recipe or change the scripts so that
  202. exporting is not necessary.
  203. - You must change the host distro identifier used in
  204. :term:`NATIVELSBSTRING` to use all lowercase
  205. characters even if it does not contain a version number. This change
  206. is necessary only if you are not using
  207. :ref:`ref-classes-uninative` and :term:`SANITY_TESTED_DISTROS`.
  208. - In the ``base-files`` recipe, writing the hostname into
  209. ``/etc/hosts`` and ``/etc/hostname`` is now done within the main
  210. :ref:`ref-tasks-install` function rather than in the
  211. ``do_install_basefilesissue`` function. The reason for the change is
  212. because ``do_install_basefilesissue`` is more easily overridden
  213. without having to duplicate the hostname functionality. If you have
  214. done the latter (e.g. in a ``base-files`` bbappend), then you should
  215. remove it from your customized ``do_install_basefilesissue``
  216. function.
  217. - The ``wic --expand`` command now uses commas to separate "key:value"
  218. pairs rather than hyphens.
  219. .. note::
  220. The wic command-line help is not updated.
  221. You must update any scripts or commands where you use
  222. ``wic --expand`` with multiple "key:value" pairs.
  223. - UEFI image variable settings have been moved from various places to a
  224. central ``conf/image-uefi.conf``. This change should not influence
  225. any existing configuration as the ``meta/conf/image-uefi.conf`` in
  226. the core metadata sets defaults that can be overridden in the same
  227. manner as before.
  228. - ``conf/distro/include/world-broken.inc`` has been removed. For cases
  229. where certain recipes need to be disabled when using the musl C
  230. library, these recipes now have ``COMPATIBLE_HOST_libc-musl`` set
  231. with a comment that explains why.