migration-3.0.rst 12 KB

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