migration-3.1.rst 9.6 KB

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