blob: c538df04d274a92c51a16615cf2c712f13c542a4 [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
Andrew Geissler09036742021-06-25 14:25:14 -05003Release 3.2 (gatesgarth)
4========================
Andrew Geissler6ce62a22020-11-30 19:58:47 -06005
6This section provides migration information for moving to the Yocto
Andrew Geissler3b8a17c2021-04-15 15:55:55 -05007Project 3.2 Release (codename "gatesgarth") from the prior release.
Andrew Geissler6ce62a22020-11-30 19:58:47 -06008
9.. _migration-3.2-minimum-system-requirements:
10
11Minimum system requirements
12---------------------------
13
14``gcc`` version 6.0 is now required at minimum on the build host. For older
15host distributions where this is not available, you can use the
Andrew Geissler517393d2023-01-13 08:55:19 -060016:term:`buildtools-extended` tarball (easily installable using
Andrew Geissler6ce62a22020-11-30 19:58:47 -060017``scripts/install-buildtools``).
18
19
20.. _migration-3.2-removed-recipes:
21
22Removed recipes
23---------------
24
25The following recipes have been removed:
26
27- ``bjam-native``: replaced by ``boost-build-native``
Andrew Geissler615f2f12022-07-15 14:00:58 -050028- ``avahi-ui``: folded into the main ``avahi`` recipe --- the GTK UI can be disabled using :term:`PACKAGECONFIG` for ``avahi``.
Andrew Geissler6ce62a22020-11-30 19:58:47 -060029- ``build-compare``: no longer needed with the removal of the ``packagefeed-stability`` class
30- ``dhcp``: obsolete, functionally replaced by ``dhcpcd`` and ``kea``
31- ``libmodulemd-v1``: replaced by ``libmodulemd``
32- ``packagegroup-core-device-devel``: obsolete
33
34
35.. _migration-3.2-removed-classes:
36
37Removed classes
38---------------
39
40The following classes (.bbclass files) have been removed:
41
Andrew Geissler615f2f12022-07-15 14:00:58 -050042- ``spdx``: obsolete --- the Yocto Project is a strong supporter of SPDX, but this class was old code using a dated approach and had the potential to be misleading. The ``meta-sdpxscanner`` layer is a much more modern and active approach to handling this and is recommended as a replacement.
Andrew Geissler6ce62a22020-11-30 19:58:47 -060043
44- ``packagefeed-stability``: this class had become obsolete with the advent of hash equivalence and reproducible builds.
45
46
47pseudo path filtering and mismatch behaviour
48--------------------------------------------
49
50pseudo now operates on a filtered subset of files. This is a significant change
Andrew Geissler615f2f12022-07-15 14:00:58 -050051to the way pseudo operates within OpenEmbedded --- by default, pseudo monitors and
Andrew Geissler6ce62a22020-11-30 19:58:47 -060052logs (adds to its database) any file created or modified whilst in a ``fakeroot``
53environment. However, there are large numbers of files that we simply don't care
54about the permissions of whilst in that ``fakeroot`` context, for example ${:term:`S`}, ${:term:`B`}, ${:term:`T`},
55${:term:`SSTATE_DIR`}, the central sstate control directories, and others.
56
57As of this release, new functionality in pseudo is enabled to ignore these
58directory trees (controlled using a new :term:`PSEUDO_IGNORE_PATHS` variable)
59resulting in a cleaner database with less chance of "stray" mismatches if files
60are modified outside pseudo context. It also should reduce some overhead from
61pseudo as the interprocess round trip to the server is avoided.
62
63There is a possible complication where some existing recipe may break, for
64example, a recipe was found to be writing to ``${B}/install`` for
Patrick Williams2194f502022-10-16 14:26:09 -050065``make install`` in :ref:`ref-tasks-install` and since ``${B}`` is listed as not to be tracked,
Andrew Geissler6ce62a22020-11-30 19:58:47 -060066there were errors trying to ``chown root`` for files in this location. Another
Andrew Geissler09036742021-06-25 14:25:14 -050067example was the ``tcl`` recipe where the source directory :term:`S` is set to a
Andrew Geissler6ce62a22020-11-30 19:58:47 -060068subdirectory of the source tree but files were written out to the directory
69structure above that subdirectory. For these types of cases in your own recipes,
Andrew Geissler09036742021-06-25 14:25:14 -050070extend :term:`PSEUDO_IGNORE_PATHS` to cover additional paths that pseudo should not
Andrew Geissler6ce62a22020-11-30 19:58:47 -060071be monitoring.
72
Andrew Geissler615f2f12022-07-15 14:00:58 -050073In addition, pseudo's behaviour on mismatches has now been changed --- rather
Andrew Geissler6ce62a22020-11-30 19:58:47 -060074than doing what turns out to be a rather dangerous "fixup" if it sees a file
75with a different path but the same inode as another file it has previously seen,
Andrew Geissler09209ee2020-12-13 08:44:15 -060076pseudo will throw an ``abort()`` and direct you to a :yocto_wiki:`wiki page </Pseudo_Abort>`
Andrew Geissler6ce62a22020-11-30 19:58:47 -060077that explains how to deal with this.
78
79
80.. _migration-3.2-multilib-mlprefix:
81
82``MLPREFIX`` now required for multilib when runtime dependencies conditionally added
83------------------------------------------------------------------------------------
84
85In order to solve some previously intractable problems with runtime
86dependencies and multilib, a change was made that now requires the :term:`MLPREFIX`
87value to be explicitly prepended to package names being added as
88dependencies (e.g. in :term:`RDEPENDS` and :term:`RRECOMMENDS` values)
89where the dependency is conditionally added.
90
Andrew Geisslerd5838332022-05-27 11:33:10 -050091If you have anonymous Python or in-line Python conditionally adding
Andrew Geissler6ce62a22020-11-30 19:58:47 -060092dependencies in your custom recipes, and you intend for those recipes to
93work with multilib, then you will need to ensure that ``${MLPREFIX}``
94is prefixed on the package names in the dependencies, for example
Andrew Geisslerc926e172021-05-07 16:11:35 -050095(from the ``glibc`` recipe)::
Andrew Geissler6ce62a22020-11-30 19:58:47 -060096
97 RRECOMMENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', '${MLPREFIX}ldconfig', '', d)}"
98
99This also applies when conditionally adding packages to :term:`PACKAGES` where
Andrew Geisslerc926e172021-05-07 16:11:35 -0500100those packages have dependencies, for example (from the ``alsa-plugins`` recipe)::
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600101
102 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pulseaudio', 'alsa-plugins-pulseaudio-conf', '', d)}"
103 ...
104 RDEPENDS_${PN}-pulseaudio-conf += "\
105 ${MLPREFIX}libasound-module-conf-pulse \
106 ${MLPREFIX}libasound-module-ctl-pulse \
107 ${MLPREFIX}libasound-module-pcm-pulse \
108 "
109
110
111.. _migration-3.2-packagegroup-core-device-devel:
112
113packagegroup-core-device-devel no longer included in images built for qemu* machines
114------------------------------------------------------------------------------------
115
116``packagegroup-core-device-devel`` was previously added automatically to
117images built for ``qemu*`` machines, however the purpose of the group and what
118it should contain is no longer clear, and in general, adding userspace
119development items to images is best done at the image/class level; thus this
120packagegroup was removed.
121
122This packagegroup previously pulled in the following:
123
124- ``distcc-config``
125- ``nfs-export-root``
126- ``bash``
127- ``binutils-symlinks``
128
129If you still need any of these in your image built for a ``qemu*`` machine
130then you will add them explicitly to :term:`IMAGE_INSTALL` or another
131appropriate place in the dependency chain for your image (if you have not
132already done so).
133
134
135.. _migration-3.2-dhcp:
136
137DHCP server/client replaced
138---------------------------
139
140The ``dhcp`` software package has become unmaintained and thus has been
141functionally replaced by ``dhcpcd`` (client) and ``kea`` (server). You will
Andrew Geissler615f2f12022-07-15 14:00:58 -0500142need to replace references to the recipe/package names as appropriate --- most
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600143commonly, at the package level ``dhcp-client`` should be replaced by
144``dhcpcd`` and ``dhcp-server`` should be replaced by ``kea``. If you have any
Andrew Geissler615f2f12022-07-15 14:00:58 -0500145custom configuration files for these they will need to be adapted --- refer to
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600146the upstream documentation for ``dhcpcd`` and ``kea`` for further details.
147
148
149.. _migration-3.2-packaging-changes:
150
151Packaging changes
152-----------------
153
Andrew Geisslerd5838332022-05-27 11:33:10 -0500154- ``python3``: the ``urllib`` Python package has now moved into the core package, as it is used more commonly than just netclient (e.g. email, xml, mimetypes, pydoc). In addition, the ``pathlib`` module is now also part of the core package.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600155
156- ``iptables``: ``iptables-apply`` and ``ip6tables-apply`` have been split out to their own package to avoid a bash dependency in the main ``iptables`` package
157
158
159.. _migration-3.2-package-qa-checks:
160
161Package QA check changes
162------------------------
163
164Previously, the following package QA checks triggered warnings, however they can
165be indicators of genuine underlying problems and are therefore now treated as
166errors:
167
168- :ref:`already-stripped <qa-check-already-stripped>`
169- :ref:`compile-host-path <qa-check-compile-host-path>`
170- :ref:`installed-vs-shipped <qa-check-installed-vs-shipped>`
171- :ref:`ldflags <qa-check-ldflags>`
172- :ref:`pn-overrides <qa-check-pn-overrides>`
173- :ref:`rpaths <qa-check-rpaths>`
174- :ref:`staticdev <qa-check-staticdev>`
175- :ref:`unknown-configure-option <qa-check-unknown-configure-option>`
176- :ref:`useless-rpaths <qa-check-useless-rpaths>`
177
178In addition, the following new checks were added and default to triggering an error:
179
Andrew Geissler517393d2023-01-13 08:55:19 -0600180- :ref:`shebang-size <qa-check-shebang-size>`: Check for shebang (#!) lines
181 longer than 128 characters, which can give an error at runtime depending on
182 the operating system.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600183
Andrew Geissler517393d2023-01-13 08:55:19 -0600184- :ref:`unhandled-features-check <qa-check-unhandled-features-check>`: Check
185 if any of the variables supported by the :ref:`ref-classes-features_check`
186 class is set while not inheriting the class itself.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600187
Andrew Geissler517393d2023-01-13 08:55:19 -0600188- :ref:`missing-update-alternatives <qa-check-missing-update-alternatives>`:
189 Check if the recipe sets the :term:`ALTERNATIVE` variable for any of its
190 packages, and does not inherit the :ref:`ref-classes-update-alternatives`
191 class.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600192
Andrew Geissler517393d2023-01-13 08:55:19 -0600193- A trailing slash or duplicated slashes in the value of :term:`S` or :term:`B`
194 will now trigger a warning so that they can be removed and path comparisons
195 can be more reliable --- remove any instances of these in your recipes if the
196 warning is displayed.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600197
198
199.. _migration-3.2-src-uri-file-globbing:
200
201Globbing no longer supported in ``file://`` entries in ``SRC_URI``
202------------------------------------------------------------------
203
204Globbing (``*`` and ``?`` wildcards) in ``file://`` URLs within :term:`SRC_URI`
205did not properly support file checksums, thus changes to the source files
Patrick Williams2194f502022-10-16 14:26:09 -0500206would not always change the :ref:`ref-tasks-fetch` task checksum, and consequently would
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600207not ensure that the changed files would be incorporated in subsequent builds.
208
209Unfortunately it is not practical to make globbing work generically here, so
210the decision was taken to remove support for globs in ``file://`` URLs.
211If you have any usage of these in your recipes, then you will now need to
212either add each of the files that you expect to match explicitly, or
213alternatively if you still need files to be pulled in dynamically, put the
214files into a subdirectory and reference that instead.
215
216
217.. _migration-3.2-deploydir-clean:
218
219deploy class now cleans ``DEPLOYDIR`` before ``do_deploy``
220----------------------------------------------------------
221
Andrew Geissler517393d2023-01-13 08:55:19 -0600222:ref:`ref-tasks-deploy` as implemented in the :ref:`ref-classes-deploy` class
223now cleans up ${:term:`DEPLOYDIR`} before running, just as
224:ref:`ref-tasks-install` cleans up ${:term:`D`} before running. This reduces
225the risk of :term:`DEPLOYDIR` being accidentally contaminated by files from
226previous runs, possibly even with different config, in case of incremental
227builds.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600228
Andrew Geissler517393d2023-01-13 08:55:19 -0600229Most recipes and classes that inherit the :ref:`ref-classes-deploy` class or
230interact with :ref:`ref-tasks-deploy` are unlikely to be affected by this
231unless they add ``prefuncs`` to :ref:`ref-tasks-deploy` *which also* put files
232into ``${DEPLOYDIR}`` --- these should be refactored to use
233``do_deploy_prepend`` instead.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600234
235
236.. _migration-3.2-nativesdk-sdk-provides-dummy:
237
238Custom SDK / SDK-style recipes need to include ``nativesdk-sdk-provides-dummy``
239-------------------------------------------------------------------------------
240
Andrew Geissler517393d2023-01-13 08:55:19 -0600241All :ref:`ref-classes-nativesdk` packages require ``/bin/sh`` due
242to their postinstall scriptlets, thus this package has to be dummy-provided
243within the SDK and ``nativesdk-sdk-provides-dummy`` now does this. If you have
244a custom SDK recipe (or your own SDK-style recipe similar to e.g.
245``buildtools-tarball``), you will need to ensure
246``nativesdk-sdk-provides-dummy`` or an equivalent is included in
247:term:`TOOLCHAIN_HOST_TASK`.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600248
249
250``ld.so.conf`` now moved back to main ``glibc`` package
251-------------------------------------------------------
252
253There are cases where one doesn't want ``ldconfig`` on target (e.g. for
254read-only root filesystems, it's rather pointless), yet one still
255needs ``/etc/ld.so.conf`` to be present at image build time:
256
257When some recipe installs libraries to a non-standard location, and
258therefore installs in a file in ``/etc/ld.so.conf.d/foo.conf``, we
Andrew Geisslerc926e172021-05-07 16:11:35 -0500259need ``/etc/ld.so.conf`` containing::
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600260
261 include /etc/ld.so.conf.d/*.conf
262
263in order to get those other locations picked up.
264
265Thus ``/etc/ld.so.conf`` is now in the main ``glibc`` package so that
266there's always an ``ld.so.conf`` present when the build-time ``ldconfig``
267runs towards the end of image construction.
268
269The ``ld.so.conf`` and ``ld.so.conf.d/*.conf`` files do not take up
270significant space (at least not compared to the ~700kB ``ldconfig`` binary), and they
271might be needed in case ``ldconfig`` is installable, so they are left
272in place after the image is built. Technically it would be possible to
273remove them if desired, though it would not be trivial if you still
274wanted the build-time ldconfig to function (:term:`ROOTFS_POSTPROCESS_COMMAND`
275will not work as ``ldconfig`` is run after the functions referred to
276by that variable).
277
278
279.. _migration-3.2-virgl:
280
281Host DRI drivers now used for GL support within ``runqemu``
282-----------------------------------------------------------
283
284``runqemu`` now uses the mesa-native libraries everywhere virgl is used
285(i.e. when ``gl``, ``gl-es`` or ``egl-headless`` options are specified),
286but instructs them to load DRI drivers from the host. Unfortunately this
287may not work well with proprietary graphics drivers such as those from
288Nvidia; if you are using such drivers then you may need to switch to an
289alternative (such as Nouveau in the case of Nvidia hardware) or avoid
290using the GL options.
291
292
293.. _migration-3.2-initramfs-suffix:
294
Patrick Williams2194f502022-10-16 14:26:09 -0500295Initramfs images now use a blank suffix
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600296---------------------------------------
297
Patrick Williams2194f502022-10-16 14:26:09 -0500298The reference :term:`Initramfs` images (``core-image-minimal-initramfs``,
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600299``core-image-tiny-initramfs`` and ``core-image-testmaster-initramfs``) now
300set an empty string for :term:`IMAGE_NAME_SUFFIX`, which otherwise defaults
301to ``".rootfs"``. These images aren't root filesystems and thus the rootfs
302label didn't make sense. If you are looking for the output files generated
303by these image recipes directly then you will need to adapt to the new
304naming without the ``.rootfs`` part.
305
306
307.. _migration-3.2-image-artifact-names:
308
309Image artifact name variables now centralised in image-artifact-names class
310---------------------------------------------------------------------------
311
312The defaults for the following image artifact name variables have been moved
Andrew Geisslerd5838332022-05-27 11:33:10 -0500313from ``bitbake.conf`` to a new ``image-artifact-names`` class:
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600314
315- :term:`IMAGE_BASENAME`
316- :term:`IMAGE_LINK_NAME`
317- :term:`IMAGE_NAME`
318- :term:`IMAGE_NAME_SUFFIX`
319- :term:`IMAGE_VERSION_SUFFIX`
320
321Image-related classes now inherit this class, and typically these variables
322are only referenced within image recipes so those will be unaffected by this
323change. However if you have references to these variables in either a recipe
324that is not an image or a class that is enabled globally, then those will
325now need to be changed to ``inherit image-artifact-names``.
326
327
328.. _migration-3.2-misc:
329
330Miscellaneous changes
331---------------------
332
Andrew Geissler615f2f12022-07-15 14:00:58 -0500333- Support for the long-deprecated ``PACKAGE_GROUP`` variable has now been removed --- replace any remaining instances with :term:`FEATURE_PACKAGES`.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600334- The ``FILESPATHPKG`` variable, having been previously deprecated, has now been removed. Replace any remaining references with appropriate use of :term:`FILESEXTRAPATHS`.
335- Erroneous use of ``inherit +=`` (instead of ``INHERIT +=``) in a configuration file now triggers an error instead of silently being ignored.
336- ptest support has been removed from the ``kbd`` recipe, as upstream has moved to autotest which is difficult to work with in a cross-compilation environment.
337- ``oe.utils.is_machine_specific()`` and ``oe.utils.machine_paths()`` have been removed as their utility was questionable. In the unlikely event that you have references to these in your own code, then the code will need to be reworked.
Andrew Geissler3b8a17c2021-04-15 15:55:55 -0500338- The ``i2ctransfer`` module is now disabled by default when building ``busybox`` in order to be consistent with disabling the other i2c tools there. If you do wish the i2ctransfer module to be built in BusyBox then add ``CONFIG_I2CTRANSFER=y`` to your custom BusyBox configuration.
Andrew Geissler6ce62a22020-11-30 19:58:47 -0600339- In the ``Upstream-Status`` header convention for patches, ``Accepted`` has been replaced with ``Backport`` as these almost always mean the same thing i.e. the patch is already upstream and may need to be removed in a future recipe upgrade. If you are adding these headers to your own patches then use ``Backport`` to indicate that the patch has been sent upstream.
340- The ``tune-supersparc.inc`` tune file has been removed as it does not appear to be widely used and no longer works.