migration-3.1.rst 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Release 3.1 (dunfell)
  3. =====================
  4. This section provides migration information for moving to the Yocto
  5. Project 3.1 Release (codename "dunfell") from the prior release.
  6. .. _migration-3.1-minimum-system-requirements:
  7. Minimum system requirements
  8. ---------------------------
  9. The following versions / requirements of build host components have been
  10. updated:
  11. - gcc 5.0
  12. - python 3.5
  13. - tar 1.28
  14. - ``rpcgen`` is now required on the host (part of the ``libc-dev-bin``
  15. package on Ubuntu, Debian and related distributions, and the
  16. ``glibc`` package on RPM-based distributions).
  17. Additionally, the ``makeinfo`` and ``pod2man`` tools are *no longer*
  18. required on the host.
  19. .. _migration-3.1-mpc8315e-rdb-removed:
  20. mpc8315e-rdb machine removed
  21. ----------------------------
  22. The MPC8315E-RDB machine is old/obsolete and unobtainable, thus given
  23. the maintenance burden the ``mpc8315e-rdb`` machine configuration that
  24. supported it has been removed in this release. The removal does leave a
  25. gap in official PowerPC reference hardware support; this may change in
  26. future if a suitable machine with accompanying support resources is
  27. found.
  28. .. _migration-3.1-python-2-removed:
  29. Python 2 removed
  30. ----------------
  31. Due to the expiration of upstream support in January 2020, support for
  32. Python 2 has now been removed; it is recommended that you use Python 3
  33. instead. If absolutely needed there is a meta-python2 community layer
  34. containing Python 2, related classes and various Python 2-based modules,
  35. however it should not be considered as supported.
  36. .. _migration-3.1-reproducible-builds:
  37. Reproducible builds now enabled by default
  38. ------------------------------------------
  39. In order to avoid unnecessary differences in output files (aiding binary
  40. reproducibility), the Poky distribution configuration
  41. (``DISTRO = "poky"``) now inherits the ``reproducible_build`` class by
  42. default.
  43. .. _migration-3.1-ptest-feature-impact:
  44. Impact of ptest feature is now more significant
  45. -----------------------------------------------
  46. The Poky distribution configuration (``DISTRO = "poky"``) enables ptests
  47. by default to enable runtime testing of various components. In this
  48. release, a dependency needed to be added that has resulted in a
  49. significant increase in the number of components that will be built just
  50. when building a simple image such as core-image-minimal. If you do not
  51. need runtime tests enabled for core components, then it is recommended
  52. that you remove "ptest" from
  53. :term:`DISTRO_FEATURES` to save a significant
  54. amount of build time e.g. by adding the following in your configuration::
  55. DISTRO_FEATURES_remove = "ptest"
  56. .. _migration-3.1-removed-recipes:
  57. Removed recipes
  58. ---------------
  59. The following recipes have been removed:
  60. - ``chkconfig``: obsolete
  61. - ``console-tools``: obsolete
  62. - ``enchant``: replaced by ``enchant2``
  63. - ``foomatic-filters``: obsolete
  64. - ``libidn``: no longer needed, moved to meta-oe
  65. - ``libmodulemd``: replaced by ``libmodulemd-v1``
  66. - ``linux-yocto``: drop 4.19, 5.2 version recipes (5.4 now provided)
  67. - ``nspr``: no longer needed, moved to meta-oe
  68. - ``nss``: no longer needed, moved to meta-oe
  69. - ``python``: Python 2 removed (Python 3 preferred)
  70. - ``python-setuptools``: Python 2 version removed (python3-setuptools
  71. preferred)
  72. - ``sysprof``: no longer needed, moved to meta-oe
  73. - ``texi2html``: obsolete
  74. - ``u-boot-fw-utils``: functionally replaced by ``libubootenv``
  75. .. _migration-3.1-features-check:
  76. features_check class replaces distro_features_check
  77. ---------------------------------------------------
  78. The ``distro_features_check`` class has had its functionality expanded,
  79. now supporting ``ANY_OF_MACHINE_FEATURES``,
  80. ``REQUIRED_MACHINE_FEATURES``, ``CONFLICT_MACHINE_FEATURES``,
  81. ``ANY_OF_COMBINED_FEATURES``, ``REQUIRED_COMBINED_FEATURES``,
  82. ``CONFLICT_COMBINED_FEATURES``. As a result the class has now been
  83. renamed to ``features_check``; the ``distro_features_check`` class still
  84. exists but generates a warning and redirects to the new class. In
  85. preparation for a future removal of the old class it is recommended that
  86. you update recipes currently inheriting ``distro_features_check`` to
  87. inherit :ref:`ref-classes-features_check` instead.
  88. .. _migration-3.1-removed-classes:
  89. Removed classes
  90. ---------------
  91. The following classes have been removed:
  92. - ``distutils-base``: moved to meta-python2
  93. - ``distutils``: moved to meta-python2
  94. - ``libc-common``: merged into the glibc recipe as nothing else used
  95. it.
  96. - ``python-dir``: moved to meta-python2
  97. - ``pythonnative``: moved to meta-python2
  98. - ``setuptools``: moved to meta-python2
  99. - ``tinderclient``: dropped as it was obsolete.
  100. .. _migration-3.1-src-uri-checksums:
  101. SRC_URI checksum behaviour
  102. --------------------------
  103. Previously, recipes by tradition included both SHA256 and MD5 checksums
  104. for remotely fetched files in :term:`SRC_URI`, even
  105. though only one is actually mandated. However, the MD5 checksum does not
  106. add much given its inherent weakness; thus when a checksum fails only
  107. the SHA256 sum will now be printed. The md5sum will still be verified if
  108. it is specified.
  109. .. _migration-3.1-npm:
  110. npm fetcher changes
  111. -------------------
  112. The npm fetcher has been completely reworked in this release. The npm
  113. fetcher now only fetches the package source itself and no longer the
  114. dependencies; there is now also an npmsw fetcher which explicitly
  115. fetches the shrinkwrap file and the dependencies. This removes the
  116. slightly awkward ``NPM_LOCKDOWN`` and ``NPM_SHRINKWRAP`` variables which
  117. pointed to local files; the lockdown file is no longer needed at all.
  118. Additionally, the package name in ``npm://`` entries in
  119. :term:`SRC_URI` is now specified using a ``package``
  120. parameter instead of the earlier ``name`` which overlapped with the
  121. generic ``name`` parameter. All recipes using the npm fetcher will need
  122. to be changed as a result.
  123. An example of the new scheme::
  124. SRC_URI = "npm://registry.npmjs.org;package=array-flatten;version=1.1.1 \
  125. npmsw://${THISDIR}/npm-shrinkwrap.json"
  126. Another example where the sources are fetched from git rather than an npm repository::
  127. SRC_URI = "git://github.com/foo/bar.git;protocol=https \
  128. npmsw://${THISDIR}/npm-shrinkwrap.json"
  129. devtool and recipetool have also been updated to match with the npm
  130. fetcher changes. Other than producing working and more complete recipes
  131. for npm sources, there is also a minor change to the command line for
  132. devtool: the ``--fetch-dev`` option has been renamed to ``--npm-dev`` as
  133. it is npm-specific.
  134. .. _migration-3.1-packaging-changes:
  135. Packaging changes
  136. -----------------
  137. - ``intltool`` has been removed from ``packagegroup-core-sdk`` as it is
  138. rarely needed to build modern software --- gettext can do most of the
  139. things it used to be needed for. ``intltool`` has also been removed
  140. from ``packagegroup-core-self-hosted`` as it is not needed to for
  141. standard builds.
  142. - git: ``git-am``, ``git-difftool``, ``git-submodule``, and
  143. ``git-request-pull`` are no longer perl-based, so are now installed
  144. with the main ``git`` package instead of within ``git-perltools``.
  145. - The ``ldconfig`` binary built as part of glibc has now been moved to
  146. its own ``ldconfig`` package (note no ``glibc-`` prefix). This
  147. package is in the :term:`RRECOMMENDS` of the main
  148. ``glibc`` package if ``ldconfig`` is present in
  149. :term:`DISTRO_FEATURES`.
  150. - ``libevent`` now splits each shared library into its own package (as
  151. Debian does). Since these are shared libraries and will be pulled in
  152. through the normal shared library dependency handling, there should
  153. be no impact to existing configurations other than less unnecessary
  154. libraries being installed in some cases.
  155. - linux-firmware now has a new package for ``bcm4366c`` and includes
  156. available NVRAM config files into the ``bcm43340``, ``bcm43362``,
  157. ``bcm43430`` and ``bcm4356-pcie`` packages.
  158. - ``harfbuzz`` now splits the new ``libharfbuzz-subset.so`` library
  159. into its own package to reduce the main package size in cases where
  160. ``libharfbuzz-subset.so`` is not needed.
  161. .. _migration-3.1-package-qa-warnings:
  162. Additional warnings
  163. -------------------
  164. Warnings will now be shown at :ref:`ref-tasks-package_qa` time in the following
  165. circumstances:
  166. - A recipe installs ``.desktop`` files containing ``MimeType`` keys but
  167. does not inherit the new :ref:`ref-classes-mime-xdg` class
  168. - A recipe installs ``.xml`` files into ``${datadir}/mime/packages``
  169. but does not inherit the :ref:`ref-classes-mime` class
  170. .. _migration-3.1-x86-live-wic:
  171. ``wic`` image type now used instead of ``live`` by default for x86
  172. ------------------------------------------------------------------
  173. ``conf/machine/include/x86-base.inc`` (inherited by most x86 machine
  174. configurations) now specifies ``wic`` instead of ``live`` by default in
  175. :term:`IMAGE_FSTYPES`. The ``live`` image type will
  176. likely be removed in a future release so it is recommended that you use
  177. ``wic`` instead.
  178. .. _migration-3.1-misc:
  179. Miscellaneous changes
  180. ---------------------
  181. - The undocumented ``SRC_DISTRIBUTE_LICENSES`` variable has now been
  182. removed in favour of a new ``AVAILABLE_LICENSES`` variable which is
  183. dynamically set based upon license files found in
  184. ``${COMMON_LICENSE_DIR}`` and ``${LICENSE_PATH}``.
  185. - The tune definition for big-endian microblaze machines is now
  186. ``microblaze`` instead of ``microblazeeb``.
  187. - ``newlib`` no longer has built-in syscalls. ``libgloss`` should then
  188. provide the syscalls, ``crt0.o`` and other functions that are no
  189. longer part of ``newlib`` itself. If you are using
  190. ``TCLIBC = "newlib"`` this now means that you must link applications
  191. with both ``newlib`` and ``libgloss``, whereas before ``newlib``
  192. would run in many configurations by itself.