blob: 1db6fbca42e1db2f46c566a0766fd67d8af13bde [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001.. SPDX-License-Identifier: CC-BY-SA-2.0-UK
2
3Release 4.2 (mickledore)
4========================
5
6Migration notes for 4.2 (mickledore)
7------------------------------------
8
9This section provides migration information for moving to the Yocto
10Project 4.2 Release (codename "mickledore") from the prior release.
11
Patrick Williams8e7b46e2023-05-01 14:19:06 -050012.. _migration-4.2-supported-distributions:
13
14Supported distributions
15~~~~~~~~~~~~~~~~~~~~~~~
16
17This release supports running BitBake on new GNU/Linux distributions:
18
19- Fedora 36 and 37
20- AlmaLinux 8.7 and 9.1
21- OpenSuse 15.4
22
23On the other hand, some earlier distributions are no longer supported:
24
25- Debian 10.x
26- Fedora 34 and 35
27- AlmaLinux 8.5
28
29See :ref:`all supported distributions <system-requirements-supported-distros>`.
30
Andrew Geissler517393d2023-01-13 08:55:19 -060031.. _migration-4.2-python-3.8:
32
33Python 3.8 is now the minimum required Python version version
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060034~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Andrew Geissler517393d2023-01-13 08:55:19 -060035
Patrick Williams8e7b46e2023-05-01 14:19:06 -050036BitBake and OpenEmbedded-Core now require Python 3.8 or newer,
Andrew Geissler517393d2023-01-13 08:55:19 -060037making it a requirement to use a distribution providing at least this
Patrick Williams8e7b46e2023-05-01 14:19:06 -050038version, or to install a :term:`buildtools` tarball.
Andrew Geissler517393d2023-01-13 08:55:19 -060039
Patrick Williams8e7b46e2023-05-01 14:19:06 -050040.. _migration-4.2-gcc-8.0:
Andrew Geissler517393d2023-01-13 08:55:19 -060041
Patrick Williams8e7b46e2023-05-01 14:19:06 -050042gcc 8.0 is now the minimum required GNU C compiler version
43~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Andrew Geissler517393d2023-01-13 08:55:19 -060044
Patrick Williams8e7b46e2023-05-01 14:19:06 -050045This version, released in 2018, is a minimum requirement
46to build the ``mesa-native`` recipe and as the latter is in the
47default dependency chain when building QEMU this has now been
48made a requirement for all builds.
Andrew Geissler517393d2023-01-13 08:55:19 -060049
Patrick Williams8e7b46e2023-05-01 14:19:06 -050050In the event that your host distribution does not provide this
51or a newer version of gcc, you can install a
52:term:`buildtools-extended` tarball.
Andrew Geissler517393d2023-01-13 08:55:19 -060053
Patrick Williams8e7b46e2023-05-01 14:19:06 -050054.. _migration-4.2-new-nvd-api:
55
56Fetching the NVD vulnerability database through the 2.0 API
57~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
58
59This new version adds a new fetcher for the NVD database using the 2.0 API,
60as the 1.0 API will be retired in 2023.
61
62The implementation changes as little as possible, keeping the current
63database format (but using a different database file for the transition
64period), with a notable exception of not using the META table.
65
66Here are minor changes that you may notice:
67
68- The database starts in 1999 instead of 2002
69- The complete fetch is longer (30 minutes typically)
70
71.. _migration-4.2-rust-crate-checksums:
72
73Rust: mandatory checksums for crates
74~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
75
76This release now supports checksums for Rust crates and makes
77them mandatory for each crate in a recipe. See :yocto_git:`python3_bcrypt recipe changes
78</poky/commit/?h=mickledore&id=0dcb5ab3462fdaaf1646b05a00c7150eea711a9a>`
79for example.
80
81The ``cargo-update-recipe-crates`` utility
82:yocto_git:`has been extended </poky/commit/?h=mickledore&id=eef7fbea2c5bf59369390be4d5efa915591b7b22>`
83to include such checksums. So, in case you need to add the list of checksums
84to a recipe just inheriting the :ref:`ref-classes-cargo` class so far, you can
85follow these steps:
86
87#. Make the recipe inherit :ref:`ref-classes-cargo-update-recipe-crates`
88#. Remove all ``crate://`` lines from the recipe
89#. Create an empty ``${BPN}-crates.inc`` file and make your recipe require it
90#. Execute ``bitbake -c update_crates your_recipe``
91#. Copy and paste the output of BitBake about the missing checksums into the
92 ``${BPN}-crates.inc`` file.
93
94
95.. _migration-4.2-addpylib:
96
97Python library code extensions
98~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
99
100BitBake in this release now supports a new ``addpylib`` directive to enable
101Python libraries within layers.
102
103This directive should be added to your layer configuration
104as in the below example from ``meta/conf/layer.conf``::
105
106 addpylib ${LAYERDIR}/lib oe
107
108Layers currently adding a lib directory to extend Python library code should now
109use this directive as :term:`BBPATH` is not going to be added automatically by
110OE-Core in future. Note that the directives are immediate operations, so it does
111make modules available for use sooner than the current BBPATH-based approach.
112
113For more information, see :ref:`bitbake-user-manual/bitbake-user-manual-metadata:extending python library code`.
114
Andrew Geissler517393d2023-01-13 08:55:19 -0600115
116.. _migration-4.2-removed-variables:
117
118Removed variables
119~~~~~~~~~~~~~~~~~
120
121The following variables have been removed:
Andrew Geissler6aa7eec2023-03-03 12:41:14 -0600122
Patrick Williams8e7b46e2023-05-01 14:19:06 -0500123- ``SERIAL_CONSOLE``, deprecated since version 2.6, replaced by :term:`SERIAL_CONSOLES`.
124- ``PACKAGEBUILDPKGD``, a mostly internal variable in the ref:`ref-classes-package`
125 class was rarely used to customise packaging. If you were using this in your custom
126 recipes or bbappends, you will need to switch to using :term:`PACKAGE_PREPROCESS_FUNCS`
127 or :term:`PACKAGESPLITFUNCS` instead.
Andrew Geissler517393d2023-01-13 08:55:19 -0600128
129.. _migration-4.2-removed-recipes:
130
131Removed recipes
132~~~~~~~~~~~~~~~
133
134The following recipes have been removed in this release:
135
Patrick Williams8e7b46e2023-05-01 14:19:06 -0500136- ``python3-picobuild``: after switching to ``python3-build``
137- ``python3-strict-rfc3339``: unmaintained and not needed by anything in
138 :oe_git:`openembedded-core </openembedded-core>`
139 or :oe_git:`meta-openembedded </meta-openembedded>`.
140- ``linux-yocto``: removed version 5.19 recipes (6.1 and 5.15 still provided)
141
142
143.. _migration-4.2-removed-classes:
144
145Removed classes
146~~~~~~~~~~~~~~~
147
148The following classes have been removed in this release:
149
150- ``rust-bin``: no longer used
151- ``package_tar``: could not be used for actual packaging, and thus not particularly useful.
152
153
154LAYERSERIES_COMPAT for custom layers and devtool workspace
155~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
156
157Some layer maintainers have been setting :term:`LAYERSERIES_COMPAT` in their
158layer's ``conf/layer.conf`` to the value of ``LAYERSERIES_CORENAMES`` to
159effectively bypass the compatibility check - this is no longer permitted.
160Layer maintainers should set :term:`LAYERSERIES_COMPAT` appropriately to
161help users understand the compatibility status of the layer.
162
163Additionally, the :term:`LAYERSERIES_COMPAT` value for the devtool workspace
164layer is now set at the time of creation, thus if you upgrade with the
165workspace layer enabled and you wish to retain it, you will need to manually
166update the :term:`LAYERSERIES_COMPAT` value in ``workspace/conf/layer.conf``
167(or remove the path from :term:`BBLAYERS` in ``conf/bblayers.conf`` and
168delete/move the ``workspace`` directory out of the way if you no longer
169need it).
170
171
172.. _migration-4.2-runqemu-slirp:
173
174runqemu now limits slirp host port forwarding to localhost
175~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
176
177With default slirp port forwarding configuration in runqemu, qemu
178previously listened on TCP ports 2222 and 2323 on all IP addresses
179available on the build host. Most use cases with runqemu only need
180it for localhost and it is not safe to run qemu images with root
181login without password enabled and listening on all available,
182possibly Internet reachable network interfaces. Thus, in this
183release we limit qemu port forwarding to localhost (127.0.0.1).
184
185However, if you need the qemu machine to be reachable from the
186network, then it can be enabled via ``conf/local.conf`` or machine
187config variable ``QB_SLIRP_OPT``::
188
189 QB_SLIRP_OPT = "-netdev user,id=net0,hostfwd=tcp::2222-:22"
190
191
192.. _migration-4.2-patch-qa:
193
194Patch QA checks
195~~~~~~~~~~~~~~~
196
197The QA checks for patch fuzz and Upstream-Status have been reworked
198slightly in this release. The Upstream-Status checking is now configurable
199from :term:`WARN_QA` / :term:`ERROR_QA` (``patch-status-core`` for the
200core layer, and ``patch-status-noncore`` for other layers).
201
202The ``patch-fuzz`` and ``patch-status-core`` checks are now in the default
203value of :term:`ERROR_QA` so that they will cause the build to fail
204if triggered. If you prefer to avoid this you will need to adjust the value
205of :term:`ERROR_QA` in your configuration as desired.
206
207
208.. _migration-4.2-mesa:
209
210Native/nativesdk mesa usage and graphics drivers
211~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
212
213This release includes mesa 23.0, and with that mesa release it is not longer
214possible to use drivers from the host system, as mesa upstream has added strict
215checks for matching builds between drivers and libraries that load them.
216
217This is particularly relevant when running QEMU built within the build
218system. A check has been added to runqemu so that there is a helpful error
219when there is no native/nativesdk opengl/virgl support available.
220
221To support this, a number of drivers have been enabled when building ``mesa-native``.
222The one major dependency pulled in by this change is ``llvm-native`` which will
223add a few minutes to the build on a modern machine. If this is undesirable, you
224can set the value of :term:`DISTRO_FEATURES_NATIVE` in your configuration such
225that ``opengl`` is excluded.
226
227
228.. _migration-4.2-misc-changes:
229
230Miscellaneous changes
231~~~~~~~~~~~~~~~~~~~~~
232
233- The :term:`IMAGE_NAME` variable is now set based on :term:`IMAGE_LINK_NAME`. This
234 means that if you are setting :term:`IMAGE_LINK_NAME` to "" to disable unversioned
235 image symlink creation, you also now need to set :term:`IMAGE_NAME` to still have
236 a reasonable value e.g.::
237
238 IMAGE_LINK_NAME = ""
239 IMAGE_NAME = "${IMAGE_BASENAME}${IMAGE_MACHINE_SUFFIX}${IMAGE_VERSION_SUFFIX}"
240
241- In ``/etc/os-release``, the ``VERSION_CODENAME`` field is now used instead of
242 ``DISTRO_CODENAME`` (though its value is still set from the :term:`DISTRO_CODENAME`
243 variable) for better conformance to standard os-release usage. If you have runtime
244 code reading this from ``/etc/os-release`` it may need to be updated.
245
246- The kmod recipe now enables OpenSSL support by default in order to support module
247 signing. If you do not need this and wish to reclaim some space/avoid the dependency
248 you should set :term:`PACKAGECONFIG` in a kmod bbappend (or ``PACKAGECONFIG:pn-kmod``
249 at the configuration level) to exclude ``openssl``.
250
251- The ``OEBasic`` signature handler (see :term:`BB_SIGNATURE_HANDLER`) has been
252 removed. It is unlikely that you would have selected to use this, but if you have
253 you will need to remove this setting.
254
255- The :ref:`ref-classes-package` class now checks if package names conflict via
256 ``PKG:${PN}`` override during ``do_package``. If you receive the associated error
257 you will need to address the :term:`PKG` usage so that the conflict is resolved.
258
259- openssh no longer uses :term:`RRECOMMENDS` to pull in ``rng-tools``, since rngd
260 is no longer needed as of Linux kernel 5.6. If you still need ``rng-tools``
261 installed for other reasons, you should add ``rng-tools`` explicitly to your
262 image. If you additionally need rngd to be started as a service you will also
263 need to add the ``rng-tools-service`` package as that has been split out.
264
265- The cups recipe no longer builds with the web interface enabled, saving ~1.8M of
266 space in the final image. If you wish to enable it, you should set
267 :term:`PACKAGECONFIG` in a cups bbappend (or ``PACKAGECONFIG:pn-cups`` at the
268 configuration level) to include ``webif``.
269
270- The :ref:`ref-classes-scons` class now passes a ``MAXLINELENGTH`` argument to
271 scons in order to fix an issue with scons and command line lengths when ccache is
272 enabled. However, some recipes may be using older scons versions which don't support
273 this argument. If that is the case you can set the following in the recipe in order
274 to disable this::
275
276 SCONS_MAXLINELENGTH = ""