migration-4.1.rst 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. Release 4.1 (langdale)
  3. ======================
  4. Migration notes for 4.1 (langdale)
  5. -----------------------------------
  6. This section provides migration information for moving to the Yocto
  7. Project 4.1 Release (codename "langdale") from the prior release.
  8. .. _migration-4.1-make-4.0:
  9. make 4.0 is now the minimum required make version
  10. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  11. glibc now requires ``make`` 4.0 to build, thus it is now the version required to
  12. be installed on the build host. A new ``buildtools-make-tarball`` has been
  13. introduced to provide just make 4.0 for host distros without a current/working
  14. make 4.x version; if you also need other tools you can use the updated
  15. ``buildtools-tarball``. For more information see
  16. :ref:`ref-manual/system-requirements:required packages for the build host`.
  17. .. _migration-4.1-complementary-deps:
  18. Complementary package installation ignores recommends
  19. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  20. When installing complementary packages (e.g. ``-dev`` and ``-dbg`` packages when
  21. building an SDK, or if you have added ``dev-deps`` to :term:`IMAGE_FEATURES`),
  22. recommends (as defined by :term:`RRECOMMENDS`) are no longer installed.
  23. If you wish to double-check the contents of your images after this change, see
  24. :ref:`Checking Image / SDK Changes <migration-general-buildhistory>`. If needed
  25. you can explicitly install items by adding them to :term:`IMAGE_INSTALL` in
  26. image recipes or :term:`TOOLCHAIN_TARGET_TASK` for the SDK.
  27. .. _migration-4.1-dev-recommends:
  28. dev dependencies are now recommends
  29. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  30. The default for ``${PN}-dev`` package is now to use :term:`RRECOMMENDS` instead
  31. of :term:`RDEPENDS` to pull in the main package. This takes advantage of a
  32. change to complimentary package installation to not follow :term:`RRECOMMENDS`
  33. (as mentioned above) and for example means an SDK for an image with both openssh
  34. and dropbear components will now build successfully.
  35. .. _migration-4.1-dropbear-sftp:
  36. dropbear now recommends openssh-sftp-server
  37. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38. openssh has switched the scp client to use the sftp protocol instead of scp to
  39. move files. This means scp from Fedora 36 and other current distributions will
  40. no longer be able to move files to/from a system running dropbear with no sftp
  41. server installed.
  42. The sftp server from openssh is small (200kb uncompressed) and standalone, so
  43. adding it to the packagegroup seems to be the best way to preserve the
  44. functionality for user sanity. However, if you wish to avoid this dependency,
  45. you can either:
  46. A. Use ``dropbear`` in :term:`IMAGE_INSTALL` instead of
  47. ``packagegroup-core-ssh-dropbear`` (or ``ssh-server-dropbear`` in
  48. :term:`IMAGE_FEATURES`), or
  49. B. Add ``openssh-sftp-server`` to :term:`BAD_RECOMMENDATIONS`.
  50. .. _migration-4.1-classes-split:
  51. Classes now split by usage context
  52. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  53. A split directory structure has now been set up for ``.bbclass`` files - classes
  54. that are intended to be inherited only by recipes (e.g. ``inherit`` in a recipe
  55. file, :term:`IMAGE_CLASSES` or :term:`KERNEL_CLASSES`) should be in a
  56. ``classes-recipe`` subdirectory and classes that are intended to be inherited
  57. globally (e.g. via ``INHERIT +=``, :term:`PACKAGE_CLASSES`, :term:`USER_CLASSES`
  58. or :term:`INHERIT_DISTRO`) should be in ``classes-global``. Classes in the
  59. existing ``classes`` subdirectory will continue to work in any context as before.
  60. Other than knowing where to look when manually browsing the class files, this is
  61. not likely to require any changes to your configuration. However, if in your
  62. configuration you were using some classes in the incorrect context, you will now
  63. receive an error during parsing. For example, the following in ``local.conf`` will
  64. now cause an error::
  65. INHERIT += "testimage"
  66. Since :ref:`testimage <ref-classes-testimage>` is a class intended solely to
  67. affect image recipes, this would be correctly specified as::
  68. IMAGE_CLASSES += "testimage"
  69. .. _migration-4.1-local-file-error:
  70. Missing local files in SRC_URI now triggers an error
  71. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  72. If a file referenced in :term:`SRC_URI` does not exist, in 4.1 this will trigger
  73. an error at parse time where previously this only triggered a warning. In the past
  74. you could ignore these warnings for example if you have multiple build
  75. configurations (e.g. for several different target machines) and there were recipes
  76. that you were not building in one of the configurations. If you have this scenario
  77. you will now need to conditionally add entries to :term:`SRC_URI` where they are
  78. valid, or use :term:`COMPATIBLE_MACHINE` / :term:`COMPATIBLE_HOST` to prevent the
  79. recipe from being available (and therefore avoid it being parsed) in configurations
  80. where the files aren't available.
  81. .. _migration-4.1-qa-checks:
  82. QA check changes
  83. ~~~~~~~~~~~~~~~~
  84. - The :ref:`buildpaths <qa-check-buildpaths>` QA check is now enabled by default
  85. in :term:`WARN_QA`, and thus any build system paths found in output files will
  86. trigger a warning. If you see these warnings for your own recipes, for full
  87. binary reproducibility you should make the necessary changes to the recipe build
  88. to remove these paths. If you wish to disable the warning for a particular
  89. recipe you can use :term:`INSANE_SKIP`, or for the entire build you can adjust
  90. :term:`WARN_QA`. For more information, see the :ref:`buildpaths QA check
  91. <qa-check-buildpaths>` section.
  92. - ``do_qa_staging`` now checks shebang length in all directories specified by
  93. :term:`SYSROOT_DIRS`, since there is a maximum length defined in the kernel. For
  94. native recipes which write scripts to the sysroot, if the shebang line in one of
  95. these scripts is too long you will get an error. This can be skipped using
  96. :term:`INSANE_SKIP` if necessary, but the best course of action is of course to
  97. fix the script. There is now also a ``create_cmdline_shebang_wrapper`` function
  98. that you can call e.g. from ``do_install`` (or ``do_install:append``) within a
  99. recipe to create a wrapper to fix such scripts - see the ``libcheck`` recipe
  100. for an example usage.
  101. Miscellaneous changes
  102. ~~~~~~~~~~~~~~~~~~~~~
  103. - ``mount.blacklist`` has been renamed to ``mount.ignorelist`` in
  104. ``udev-extraconf``. If you are customising this file via ``udev-extraconf`` then
  105. you will need to update your ``udev-extraconf`` ``.bbappend`` as appropriate.
  106. - ``help2man-native`` has been removed from implicit sysroot dependencies. If a
  107. recipe needs ``help2man-native`` it should now be explicitly added to
  108. :term:`DEPENDS` within the recipe.
  109. - For images using systemd, the reboot watchdog timeout has been set to 60
  110. seconds (from the upstream default of 10 minutes). If you wish to override this
  111. you can set :term:`WATCHDOG_TIMEOUT` to the desired timeout in seconds. Note
  112. that the same :term:`WATCHDOG_TIMEOUT` variable also specifies the timeout used
  113. for the ``watchdog`` tool (if that is being built).
  114. - The :ref:`image-buildinfo <ref-classes-image-buildinfo>` class now writes to
  115. ``${sysconfdir}/buildinfo`` instead of ``${sysconfdir}/build`` by default (i.e.
  116. the default value of :term:`IMAGE_BUILDINFO_FILE` has been changed). If you have
  117. code that reads this from images at build or runtime you will need to update it
  118. or specify your own value for :term:`IMAGE_BUILDINFO_FILE`.
  119. - In the :ref:`archiver <ref-classes-archiver>` class, the default
  120. ``ARCHIVER_OUTDIR`` value no longer includes the :term:`MACHINE` value in order
  121. to avoid the archive task running multiple times in a multiconfig setup. If you
  122. have custom code that does something with the files archived by the
  123. :ref:`archiver <ref-classes-archiver>` class then you may need to adjust it to
  124. the new structure.
  125. - If you are not using `systemd` then udev is now configured to use labels
  126. (``LABEL`` or ``PARTLABEL``) to set the mount point for the device. For example::
  127. /run/media/rootfs-sda2
  128. instead of::
  129. /run/media/sda2
  130. - ``icu`` no longer provides the ``icu-config`` configuration tool - upstream
  131. have indicated ``icu-config`` is deprecated and should no longer be used. Code
  132. with references to it will need to be updated, for example to use ``pkg-config``
  133. instead.
  134. - The ``rng-tools`` systemd service name has changed from ``rngd`` to ``rng-tools``
  135. - The ``largefile`` :term:`DISTRO_FEATURES` item has been removed, large file
  136. support is now always enabled where it was previously optional.
  137. - The Python ``zoneinfo`` module is now split out to its own ``python3-zoneinfo``
  138. package.
  139. - The :term:`PACKAGECONFIG` option to enable wpa_supplicant in the ``connman``
  140. recipe has been renamed to "wpa-supplicant". If you have set :term:`PACKAGECONFIG` for
  141. the ``connman`` recipe to include this option you will need to update
  142. your configuration. Related to this, the :term:`WIRELESS_DAEMON` variable
  143. now expects the new ``wpa-supplicant`` naming and affects ``packagegroup-base``
  144. as well as ``connman``.
  145. - The ``wpa-supplicant`` recipe no longer uses a static (and stale) ``defconfig``
  146. file, instead it uses the upstream version with appropriate edits for the
  147. :term:`PACKAGECONFIG`. If you are customising this file you will need to
  148. update your customisations.
  149. - With the introduction of picobuild in
  150. :ref:`python_pep517 <ref-classes-python_pep517>`, The ``PEP517_BUILD_API``
  151. variable is no longer supported. If you have any references to this variable
  152. you should remove them.
  153. .. _migration-4.1-removed-recipes:
  154. Removed recipes
  155. ~~~~~~~~~~~~~~~
  156. The following recipes have been removed in this release:
  157. - ``alsa-utils-scripts``: merged into alsa-utils
  158. - ``cargo-cross-canadian``: optimised out
  159. - ``lzop``: obsolete, unmaintained upstream
  160. - ``linux-yocto (5.10)``: 5.15 and 5.19 are currently provided
  161. - ``rust-cross``: optimised out
  162. - ``rust-crosssdk``: optimised out
  163. - ``rust-tools-cross-canadian``: optimised out
  164. - ``xf86-input-keyboard``: obsolete (replaced by libinput/evdev)