summaryrefslogtreecommitdiffstats
path: root/documentation/migration-guides/migration-5.2.rst
diff options
context:
space:
mode:
Diffstat (limited to 'documentation/migration-guides/migration-5.2.rst')
-rw-r--r--documentation/migration-guides/migration-5.2.rst297
1 files changed, 297 insertions, 0 deletions
diff --git a/documentation/migration-guides/migration-5.2.rst b/documentation/migration-guides/migration-5.2.rst
new file mode 100644
index 0000000000..77a11fe270
--- /dev/null
+++ b/documentation/migration-guides/migration-5.2.rst
@@ -0,0 +1,297 @@
1.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3.. |yocto-codename| replace:: walnascar
4.. |yocto-ver| replace:: 5.2
5.. Note: anchors id below cannot contain substitutions so replace them with the
6 value of |yocto-ver| above.
7
8Release |yocto-ver| (|yocto-codename|)
9======================================
10
11Migration notes for |yocto-ver| (|yocto-codename|)
12--------------------------------------------------
13
14This section provides migration information for moving to the Yocto
15Project |yocto-ver| Release (codename "|yocto-codename|") from the prior release.
16
17``debug-tweaks`` removed from :term:`IMAGE_FEATURES`
18~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
19
20The ``debug-tweaks`` image feature is now removed because it was too vague about
21what it achieved: an image on which the ``root`` user can login without a
22password.
23
24To achieve the same result, the features previously added by ``debug-tweaks``
25should be manually added to the :term:`IMAGE_FEATURES` variable. These are:
26
27- ``allow-empty-password``
28- ``allow-root-login``
29- ``empty-root-password``
30- ``post-install-logging``
31
32Such a statement would be::
33
34 IMAGE_FEATURES += "allow-empty-password allow-root-login empty-root-password post-install-logging"
35
36See the list of available image features in the :ref:`ref-features-image`
37section of the Yocto Project Reference Manual.
38
39Supported kernel versions
40~~~~~~~~~~~~~~~~~~~~~~~~~
41
42The :term:`OLDEST_KERNEL` setting is 5.15 in this release, meaning that
43out the box, older kernels are not supported. See :ref:`4.3 migration notes
44<migration-4.3-supported-kernel-versions>` for details.
45
46Supported distributions
47~~~~~~~~~~~~~~~~~~~~~~~
48
49Compared to the previous releases, running BitBake is supported on new
50GNU/Linux distributions:
51
52- Fedora 41
53- CentOS Stream 9
54
55On the other hand, some earlier distributions are no longer supported:
56
57- CentOS Stream 8
58- Fedora 38
59- OpenSUSE Leap 15.4
60- Ubuntu 20.04
61
62See :ref:`all supported distributions <system-requirements-supported-distros>`.
63
64Rust language changes
65~~~~~~~~~~~~~~~~~~~~~
66
67- Recipes inheriting the :ref:`ref-classes-cargo` do not install libraries by
68 default anymore. This behavior can be controlled by the
69 :term:`CARGO_INSTALL_LIBRARIES` variable.
70
71systemd changes
72~~~~~~~~~~~~~~~
73
74- Support for ``split-usr`` and ``unmerged-usr`` are now removed after Systemd
75 was updated to version 255. This option allowed installing Systemd in a
76 system where directories such as ``/lib``, ``/sbin`` or ``/bin`` are *not*
77 merged into ``/usr``.
78
79 As a consequence, the ``systemd`` recipe no longer contains the ``usrmerge``
80 :term:`PACKAGECONFIG` option as it is now implied by default.
81
82- ``systemd.bbclass``: If a ``systemd`` service file had referred to other service
83 files by starting them via
84 `Also <https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#Also=>`__,
85 the other service files were automatically added to the :term:`FILES` variable of
86 the same package. Example:
87
88 a.service contains::
89
90 [Install]
91 Also=b.service
92
93 If ``a.service`` is packaged in package ``A``, ``b.service`` was
94 automatically packaged into package ``A`` as well. This happened even if
95 ``b.service`` was explicitly added to package ``B`` using :term:`FILES` and
96 :term:`SYSTEMD_SERVICE` variables.
97 This prevented such services from being packaged into different packages.
98 Therefore, this automatic behavior has been removed for service files (but
99 not for socket files).
100 Now all service files must be explicitly added to :term:`FILES`.
101
102- Add ``create-log-dirs`` back to the configuration options. To enable
103 persistent logging a user can now set the "Storage" option of
104 ``journald.conf`` to "persistent". The ``/var/log/journal`` directory is now
105 used for logging instead of ``/run/log``.
106
107- If ``pni-names`` is not in the :term:`DISTRO_FEATURES`, the `Predictable
108 Network Interface names <https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/>`__
109 systemd feature will now be disabled. Previously the feature was still
110 enabled even if ``pni-names`` was not part of :term:`DISTRO_FEATURES`. Make
111 sure to add the feature to :term:`DISTRO_FEATURES` if you want to keep this
112 systemd behavior.
113
114Multiconfig changes
115~~~~~~~~~~~~~~~~~~~
116
117The value of :term:`BB_CURRENT_MC` was changed from ``default`` to an empty string
118for the default multiconfig configuration to avoid needing to map the values
119within BitBake. This was already not happening in some cases so this fixes
120some obscure bugs.
121
122Any logic based on :term:`BB_CURRENT_MC` equalling to ``default`` by default should
123be changed to be equal to an empty string.
124
125Virtual toolchain provider changes
126~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127
128Support was added for virtual providers on a per-recipe basis for specific
129key toolchain providers listed in ``BB_VIRTUAL_RECIPE_PROVIDERS``. As part of
130that support, the ``cross`` providers were simplified to remove the triplet
131prefix (:term:`TARGET_PREFIX`, :term:`SDK_PREFIX` and :term:`HOST_PREFIX`) and
132generalise the naming. Here are examples of how references to these variables
133can be changed to use the new ``cross`` syntax::
134
135 virtual/${HOST_PREFIX}binutils -> virtual/cross-binutils
136 virtual/${TARGET_PREFIX}binutils -> virtual/cross-binutils
137
138 virtual/${HOST_PREFIX}gcc -> virtual/cross-cc
139 virtual/${TARGET_PREFIX}gcc -> virtual/cross-cc
140 virtual/${SDK_PREFIX}gcc -> virtual/nativesdk-cross-cc
141
142 virtual/${HOST_PREFIX}compilerlibs -> virtual/compilerlibs
143 virtual/${TARGET_PREFIX}compilerlibs -> virtual/compilerlibs
144 virtual/nativesdk-${SDK_PREFIX}compilerlibs -> virtual/nativesdk-compilerlibs
145
146 virtual/${TARGET_PREFIX}g++ -> virtual/cross-c++
147
148A :term:`PREFERRED_PROVIDER` assignment can be transformed as follows::
149
150 PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}binutils -> PREFERRED_PROVIDER_virtual/cross-binutils
151 PREFERRED_PROVIDER_virtual/${SDK_PREFIX}binutils -> PREFERRED_PROVIDER_virtual/cross-binutils:class-nativesdk
152 PREFERRED_PROVIDER_virtual/${SDK_PREFIX}g++ -> PREFERRED_PROVIDER_virtual/nativesdk-cross-c++
153
154The above examples should cover most cases, but there might be situations where
155replacing is not as straightforward. For more examples, see the commit
156:oe_git:`"classes/recipes: Switch virtual/XXX-gcc to virtual/cross-cc (and
157c++/binutils)" </openembedded-core/commit/?id=4ccc3bc8266c>` in
158:term:`OpenEmbedded-Core (OE-Core)`.
159
160:ref:`ref-classes-autotools` changes
161~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
162
163- Changes to how ``aclocal`` is invoked means that ``ACLOCALDIR`` and
164 ``ACLOCALEXTRAPATH`` are no longer used.
165
166- Directories containing m4 files are no longer found automatically and
167 passed to ``autoreconf``. If a recipe fails to configure because it cannot
168 find m4 macros, then usually the solution is to set ``EXTRA_AUTORECONF += "-I
169 path/to/m4"`` in the recipe.
170
171- The :ref:`ref-classes-autotools` class now requires any recipe that inherits
172 the class to have a ``configure`` script. The configuration script location
173 is stored in the :term:`CONFIGURE_SCRIPT` variable. The
174 :ref:`ref-tasks-configure` task will fail if the script is missing.
175
176:term:`UBOOT_ENTRYPOINT` changes
177~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
178
179The :term:`UBOOT_ENTRYPOINT` variable should now be defined with a leading
180``0x`` to its value. For example, consider the following assignment::
181
182 UBOOT_ENTRYPOINT ?= "20008000"
183
184This should now be replaced by::
185
186 UBOOT_ENTRYPOINT ?= "0x20008000"
187
188
189Git fetcher: support for multiple revisions per URL removed
190~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
191
192The support for having multiple Git revisions per URL in :term:`SRC_URI` was
193removed from BitBake, which means the following syntax is not supported
194anymore::
195
196 SRC_URI = "git://some.host/somepath;bareclone=1;branch=branchX,branchY;name=nameX,nameY"
197 SRCREV_nameX = "xxxxxxxxxxxxxxxxxxxx"
198 SRCREV_nameY = "yyyyyyyyyyyyyyyyyyyy"
199
200This was rarely used in the core repositories because it would only ever make
201sense for bare clones (the ``bareclone=1`` :term:`SRC_URI` option) where recipes
202take care of the Git checkout. This removal simplifies the code logic in several
203places.
204
205If one of your recipes is using this mechanism, you can split the code source
206fetching into two separate entries::
207
208 SRC_URI = "git://some.host/somepath;bareclone=1;branch=branchX;name=nameX \
209 git://some.host/somepath;bareclone=1;branch=branchY;name=nameY"
210 SRCREV_nameX = "xxxxxxxxxxxxxxxxxxxx"
211 SRCREV_nameY = "yyyyyyyyyyyyyyyyyyyy"
212
213Git fetcher: Branch parameter now required in :term:`SRC_URI`
214~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
215
216The ``branch`` parameter is now required when specifying a Git repository in
217:term:`SRC_URI`, for example::
218
219 SRC_URI = "git://some.host/somepath;branch=branchX"
220
221A missing ``branch`` parameter used to produce a warning, and will now produce
222an error.
223
224Recipe changes
225~~~~~~~~~~~~~~
226
227- The ``libnss-mdns`` recipe is now renamed to ``avahi-libnss-mdns`` to avoid a
228 conflict with meta-networking.
229
230- :ref:`ref-classes-ptest` support for the ``valgrind`` recipe was removed, due
231 to regressions occurring after updating Glibc to 2.41.
232
233Removed variables
234~~~~~~~~~~~~~~~~~
235
236The following variables have been removed:
237
238- ``PACKAGE_SNAP_LIB_SYMLINKS``: related to an unmaintained and obsolete
239 "micro" :term:`distro <DISTRO>`.
240
241- ``SETUPTOOLS_INSTALL_ARGS``: obsolete and unused variable.
242
243- ``BB_DANGLINGAPPENDS_WARNONLY``: support for only warning the user when a
244 ``.bbappend`` file doesn't apply to the original recipe has been dropped. See
245 the :ref:`dev-manual/layers:Appending Other Layers Metadata With Your Layer`
246 section of the Yocto Project Development Tasks Manual for alternatives to
247 this variable.
248
249Removed recipes
250~~~~~~~~~~~~~~~
251
252The following recipes have been removed in this release:
253
254- ``liburi-perl``: moved to :oe_git:`meta-perl </meta-openembedded/tree/meta-perl>`.
255
256- ``python3-isodate``: moved to :oe_git:`meta-python </meta-openembedded/tree/meta-python>`.
257
258- ``python3-iniparse``: removed as there are no consumers of this recipe in
259 :oe_git:`openembedded-core </openembedded-core>` or :oe_git:`meta-openembedded </meta-openembedded>`.
260
261- ``blktool``: It was created in 2004 as an alternative to hdparm and never
262 updated since (while :wikipedia:`hdparm <Hdparm>` remains active).
263
264- ``cargo-c-native``: converted to a target recipe and renamed to ``cargo-c``.
265
266- ``libnss-mdns``: renamed to ``avahi-libnss-mdns``
267
268Removed classes
269~~~~~~~~~~~~~~~
270
271The following classes have been removed in this release:
272
273- ``migrate_localcount.bbclass``: obsolete class for which code was already
274 removed in 2012.
275
276Removed features
277~~~~~~~~~~~~~~~~
278
279- The ``ld-is-gold`` distro feature was removed from the
280 :term:`DISTRO_FEATURES`.
281
282Miscellaneous changes
283~~~~~~~~~~~~~~~~~~~~~
284
285- :term:`ZSTD_COMPRESSION_LEVEL` is now a plain integer number instead of a dash-prefixed
286 command-line option (e.g. it should be set to ``3`` rather than ``-3``).
287
288- Until now, the variable :term:`UBOOT_ENV` was processed both by the U-Boot
289 recipe and by the ``kernel-fitimage.bbclass``. However, adding a U-Boot
290 script to the kernel FIT image is a different and independent thing, which
291 also requires an independent variable.
292 Therefore, the :term:`UBOOT_ENV` is no longer handled by the
293 ``kernel-fitimage.bbclass``. There is a new variable :term:`FIT_UBOOT_ENV`
294 which should be used for adding a U-Boot script to a FIT image.
295
296- The ``devtool ide-sdk`` utility has been removed from the :doc:`eSDK
297 </sdk-manual/extensible>` (but remains available in the BitBake environment).