17e0e3c0cSAndrew GeisslerMigration notes for 3.4 (honister)
27e0e3c0cSAndrew Geissler----------------------------------
37e0e3c0cSAndrew Geissler
4213cb269SPatrick WilliamsThis section provides migration information for moving to the Yocto
5213cb269SPatrick WilliamsProject 3.4 Release (codename "honister") from the prior release.
6213cb269SPatrick Williams
7213cb269SPatrick WilliamsOverride syntax changes
87e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~
9213cb269SPatrick Williams
10eff27476SAndrew GeisslerIn this release, the ``:`` character replaces the use of ``_`` to
11eff27476SAndrew Geisslerrefer to an override, most commonly when making a conditional assignment
12eff27476SAndrew Geisslerof a variable. This means that an entry like::
13213cb269SPatrick Williams
14213cb269SPatrick Williams   SRC_URI_qemux86 = "file://somefile"
15213cb269SPatrick Williams
16eff27476SAndrew Geisslernow becomes::
17213cb269SPatrick Williams
18213cb269SPatrick Williams   SRC_URI:qemux86 = "file://somefile"
19213cb269SPatrick Williams
20eff27476SAndrew Geisslersince ``qemux86`` is an override. This applies to any use of override
21eff27476SAndrew Geisslersyntax, so the following::
22213cb269SPatrick Williams
23213cb269SPatrick Williams   SRC_URI_append = " file://somefile"
24213cb269SPatrick Williams   SRC_URI_append_qemux86 = " file://somefile2"
25213cb269SPatrick Williams   SRC_URI_remove_qemux86-64 = " file://somefile3"
26213cb269SPatrick Williams   SRC_URI_prepend_qemuarm = "file://somefile4 "
27213cb269SPatrick Williams   FILES_${PN}-ptest = "${bindir}/xyz"
28213cb269SPatrick Williams   IMAGE_CMD_tar = "tar"
29213cb269SPatrick Williams   BASE_LIB_tune-cortexa76 = "lib"
30213cb269SPatrick Williams   SRCREV_pn-bash = "abc"
31213cb269SPatrick Williams   BB_TASK_NICE_LEVEL_task-testimage = '0'
32213cb269SPatrick Williams
33eff27476SAndrew Geisslerwould now become::
34213cb269SPatrick Williams
35213cb269SPatrick Williams   SRC_URI:append = " file://somefile"
36213cb269SPatrick Williams   SRC_URI:append:qemux86 = " file://somefile2"
37213cb269SPatrick Williams   SRC_URI:remove:qemux86-64 = " file://somefile3"
38213cb269SPatrick Williams   SRC_URI:prepend:qemuarm = "file://somefile4 "
39213cb269SPatrick Williams   FILES:${PN}-ptest = "${bindir}/xyz"
40213cb269SPatrick Williams   IMAGE_CMD:tar = "tar"
41213cb269SPatrick Williams   BASE_LIB:tune-cortexa76 = "lib"
42213cb269SPatrick Williams   SRCREV:pn-bash = "abc"
43213cb269SPatrick Williams   BB_TASK_NICE_LEVEL:task-testimage = '0'
44213cb269SPatrick Williams
45213cb269SPatrick WilliamsThis also applies to
46213cb269SPatrick Williams:ref:`variable queries to the datastore <bitbake:bitbake-user-manual/bitbake-user-manual-metadata:functions for accessing datastore variables>`,
47213cb269SPatrick Williamsfor example using ``getVar`` and similar so ``d.getVar("RDEPENDS_${PN}")``
48213cb269SPatrick Williamsbecomes ``d.getVar("RDEPENDS:${PN}")``.
49213cb269SPatrick Williams
50213cb269SPatrick WilliamsWhilst some of these are fairly obvious such as :term:`MACHINE` and :term:`DISTRO`
51213cb269SPatrick Williamsoverrides, some are less obvious, for example the packaging variables such as
52213cb269SPatrick Williams:term:`RDEPENDS`, :term:`FILES` and so on taking package names (e.g. ``${PN}``,
53213cb269SPatrick Williams``${PN}-ptest``) as overrides. These overrides are not always in
54213cb269SPatrick Williams:term:`OVERRIDES` but applied conditionally in specific contexts
55213cb269SPatrick Williamssuch as packaging. ``task-<taskname>`` is another context specific override, the
56213cb269SPatrick Williamscontext being specific tasks in that case. Tune overrides are another special
57213cb269SPatrick Williamscase where some code does use them as overrides but some does not. We plan to try
58213cb269SPatrick Williamsand make the tune code use overrides more consistently in the future.
59213cb269SPatrick Williams
600ca19ccfSPatrick WilliamsThere are some variables which do not use override syntax which include the
610ca19ccfSPatrick Williamssuffix to variables in ``layer.conf`` files such as :term:`BBFILE_PATTERN`,
620ca19ccfSPatrick Williams:term:`SRCREV`\ ``_xxx`` where ``xxx`` is a name from :term:`SRC_URI` and
630ca19ccfSPatrick Williams:term:`PREFERRED_VERSION`\ ``_xxx``. In particular, ``layer.conf`` suffixes
640ca19ccfSPatrick Williamsmay be the same as a :term:`DISTRO` override causing some confusion. We do
650ca19ccfSPatrick Williamsplan to try and improve consistency as these issues are identified.
660ca19ccfSPatrick Williams
67eff27476SAndrew GeisslerTo help with migration of layers, a script has been provided in OE-Core.
68eff27476SAndrew GeisslerOnce configured with the overrides used by a layer, this can be run as::
69213cb269SPatrick Williams
70213cb269SPatrick Williams   <oe-core>/scripts/contrib/convert-overrides.py <layerdir>
71213cb269SPatrick Williams
72213cb269SPatrick Williams.. note::
73213cb269SPatrick Williams
74213cb269SPatrick Williams   Please read the notes in the script as it isn't entirely automatic and it isn't
75213cb269SPatrick Williams   expected to handle every case. In particular, it needs to be told which overrides
76213cb269SPatrick Williams   the layer uses (usually machine and distro names/overrides) and the result should
77213cb269SPatrick Williams   be carefully checked since it can be a little enthusiastic and will convert
78eff27476SAndrew Geissler   references to ``_append``, ``_remove`` and ``_prepend`` in function and variable
79eff27476SAndrew Geissler   names.
80213cb269SPatrick Williams
81eff27476SAndrew GeisslerFor reference, this conversion is important as it allows BitBake to more reliably
82eff27476SAndrew Geisslerdetermine what is an override and what is not, as underscores are also used in
83eff27476SAndrew Geisslervariable names without intending to be overrides. This should allow us to proceed
84eff27476SAndrew Geisslerwith other syntax improvements and simplifications for usability. It also means
85eff27476SAndrew GeisslerBitBake no longer has to guess and maintain large lookup lists just in case
86eff27476SAndrew Geisslere.g. ``functionname`` in ``my_functionname`` is an override, and thus should improve
87eff27476SAndrew Geisslerefficiency.
88eff27476SAndrew Geissler
89eff27476SAndrew GeisslerNew host dependencies
907e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~
91eff27476SAndrew Geissler
92eff27476SAndrew GeisslerThe ``lz4c``, ``pzstd`` and ``zstd`` commands are now required to be
93eff27476SAndrew Geisslerinstalled on the build host to support LZ4 and Zstandard compression
94eff27476SAndrew Geisslerfunctionality. These are typically provided by ``lz4`` and ``zstd``
95eff27476SAndrew Geisslerpackages in most Linux distributions. Alternatively they are available
96eff27476SAndrew Geissleras part of ``buildtools-tarball`` if your distribution does not provide
97eff27476SAndrew Geisslerthem. For more information see
98eff27476SAndrew Geissler:ref:`ref-manual/system-requirements:required packages for the build host`.
99eff27476SAndrew Geissler
100eff27476SAndrew GeisslerRemoved recipes
1017e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~
102eff27476SAndrew Geissler
103eff27476SAndrew GeisslerThe following recipes have been removed in this release:
104eff27476SAndrew Geissler
105eff27476SAndrew Geissler- ``assimp``: problematic from a licensing perspective and no longer
106eff27476SAndrew Geissler  needed by anything else
107eff27476SAndrew Geissler- ``clutter-1.0``: legacy component moved to meta-gnome
108eff27476SAndrew Geissler- ``clutter-gst-3.0``: legacy component moved to meta-gnome
109eff27476SAndrew Geissler- ``clutter-gtk-1.0``: legacy component moved to meta-gnome
110eff27476SAndrew Geissler- ``cogl-1.0``: legacy component moved to meta-gnome
111eff27476SAndrew Geissler- ``core-image-clutter``: removed along with clutter
112eff27476SAndrew Geissler- ``linux-yocto``: removed version 5.4 recipes (5.14 and 5.10 still
113eff27476SAndrew Geissler  provided)
114eff27476SAndrew Geissler- ``mklibs-native``: not actively tested and upstream mklibs still
115eff27476SAndrew Geissler  requires Python 2
116eff27476SAndrew Geissler- ``mx-1.0``: obsolete (last release 2012) and isn't used by anything in
117eff27476SAndrew Geissler  any known layer
118eff27476SAndrew Geissler- ``packagegroup-core-clutter``: removed along with clutter
119eff27476SAndrew Geissler
120eff27476SAndrew GeisslerRemoved classes
1217e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~
122eff27476SAndrew Geissler
123eff27476SAndrew Geissler- ``clutter``: moved to meta-gnome along with clutter itself
124eff27476SAndrew Geissler- ``image-mklibs``: not actively tested and upstream mklibs still
125eff27476SAndrew Geissler  requires Python 2
126eff27476SAndrew Geissler- ``meta``: no longer useful. Recipes that need to skip installing
127eff27476SAndrew Geissler  packages should inherit ``nopackages`` instead.
128eff27476SAndrew Geissler
129eff27476SAndrew GeisslerPrelinking disabled by default
1307e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
131eff27476SAndrew Geissler
132eff27476SAndrew GeisslerRecent tests have shown that prelinking works only when PIE is not
133eff27476SAndrew Geisslerenabled (see `here <https://rlbl.me/prelink-1>`__ and `here <https://rlbl.me/prelink-2>`__),
134eff27476SAndrew Geisslerand as PIE is both a desirable security feature, and the only
135eff27476SAndrew Geisslerconfiguration provided and tested by the Yocto Project, there is
136eff27476SAndrew Geisslersimply no sense in continuing to enable prelink.
137eff27476SAndrew Geissler
138eff27476SAndrew GeisslerThere's also a concern that no one is maintaining the code, and there
1397e0e3c0cSAndrew Geisslerare open bugs (including :yocto_bugs:`this serious one </show_bug.cgi?id=14429>`).
140eff27476SAndrew GeisslerGiven that prelink does intricate address arithmetic and rewriting
141eff27476SAndrew Geisslerof binaries the best option is to disable the feature. It is recommended
142eff27476SAndrew Geisslerthat you consider disabling this feature in your own configuration if
143eff27476SAndrew Geisslerit is currently enabled.
144eff27476SAndrew Geissler
145eff27476SAndrew GeisslerVirtual runtime provides
1467e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~
147eff27476SAndrew Geissler
148eff27476SAndrew GeisslerRecipes shouldn't use the ``virtual/`` string in :term:`RPROVIDES` and
149*615f2f11SAndrew Geissler:term:`RDEPENDS` --- it is confusing because ``virtual/`` has no special
150eff27476SAndrew Geisslermeaning in :term:`RPROVIDES` and :term:`RDEPENDS` (unlike in the
151eff27476SAndrew Geisslercorresponding build-time :term:`PROVIDES` and :term:`DEPENDS`).
152eff27476SAndrew Geissler
153eff27476SAndrew GeisslerTune files moved to architecture-specific directories
1547e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
155eff27476SAndrew Geissler
156eff27476SAndrew GeisslerThe tune files found in ``conf/machine/include`` have now been moved
157eff27476SAndrew Geisslerinto their respective architecture name directories under that same
158eff27476SAndrew Geisslerlocation; e.g. x86 tune files have moved into an ``x86`` subdirectory,
159eff27476SAndrew GeisslerMIPS tune files have moved into a ``mips`` subdirectory, etc.
160eff27476SAndrew GeisslerThe ARM tunes have an extra level (``armv8a``, ``armv8m``, etc.) and
161eff27476SAndrew Geisslersome have been renamed to make them uniform with the rest of the tunes.
1627e0e3c0cSAndrew GeisslerSee :yocto_git:`this commit </poky/commit/?id=1d381f21f5f13aa0c4e1a45683ed656ebeedd37d>`
163eff27476SAndrew Geisslerfor reference.
164eff27476SAndrew Geissler
165eff27476SAndrew GeisslerIf you have any references to tune files (e.g. in custom machine
166eff27476SAndrew Geisslerconfiguration files) they will need to be updated.
167eff27476SAndrew Geissler
168eff27476SAndrew GeisslerExtensible SDK host extension
1697e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170eff27476SAndrew Geissler
171eff27476SAndrew GeisslerFor a normal SDK, some layers append to :term:`TOOLCHAIN_HOST_TASK`
172eff27476SAndrew Geisslerunconditionally which is fine, until the eSDK tries to override the
173eff27476SAndrew Geisslervariable to its own values. Instead of installing packages specified
174*615f2f11SAndrew Geisslerin this variable it uses native recipes instead --- a very different
175eff27476SAndrew Geisslerapproach. This has led to confusing errors when binaries are added
176eff27476SAndrew Geisslerto the SDK but not relocated.
177eff27476SAndrew Geissler
178eff27476SAndrew GeisslerTo avoid these issues, a new :term:`TOOLCHAIN_HOST_TASK_ESDK` variable has
179eff27476SAndrew Geisslerbeen created. If you wish to extend what is installed in the host
180eff27476SAndrew Geisslerportion of the eSDK then you will now need to set this variable.
181eff27476SAndrew Geissler
182eff27476SAndrew GeisslerPackage/recipe splitting
1837e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~
184eff27476SAndrew Geissler
185eff27476SAndrew Geissler- ``perl-cross`` has been split out from the main ``perl`` recipe to
186eff27476SAndrew Geissler  its own ``perlcross`` recipe for maintenance reasons. If you have
187eff27476SAndrew Geissler  bbappends for the perl recipe then these may need extending.
188eff27476SAndrew Geissler
189eff27476SAndrew Geissler- The ``wayland`` recipe now packages its binaries in a
190eff27476SAndrew Geissler  ``wayland-tools`` package rather than putting them into
191eff27476SAndrew Geissler  ``wayland-dev``.
192eff27476SAndrew Geissler
193eff27476SAndrew Geissler- Xwayland has been split out of the xserver-xorg tree and thus is now
194eff27476SAndrew Geissler  in its own ``xwayland`` recipe. If you need Xwayland in your image
195eff27476SAndrew Geissler  then you may now need to add it explicitly.
196eff27476SAndrew Geissler
197eff27476SAndrew Geissler- The ``rpm`` package no longer has ``rpm-build`` in its :term:`RRECOMMENDS`;
198eff27476SAndrew Geissler  if by chance  you still need rpm package building functionality in
199eff27476SAndrew Geissler  your image and you have not already done so then you should add
200eff27476SAndrew Geissler  ``rpm-build`` to your image explicitly.
201eff27476SAndrew Geissler
202eff27476SAndrew Geissler- The Python ``statistics`` standard module is now packaged in its own
203eff27476SAndrew Geissler  ``python3-statistics`` package instead of ``python3-misc`` as
204eff27476SAndrew Geissler  previously.
205eff27476SAndrew Geissler
206eff27476SAndrew GeisslerImage / SDK generation changes
2077e0e3c0cSAndrew Geissler~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
208eff27476SAndrew Geissler
209eff27476SAndrew Geissler- Recursive dependencies on the ``do_build`` task are now disabled when
210eff27476SAndrew Geissler  building SDKs. These are generally not needed; in the unlikely event
211eff27476SAndrew Geissler  that you do encounter problems then it will probably be as a result of
212eff27476SAndrew Geissler  missing explicit dependencies that need to be added.
213eff27476SAndrew Geissler
214eff27476SAndrew Geissler- Errors during "complementary" package installation (e.g. for ``*-dbg``
215eff27476SAndrew Geissler  and ``*-dev`` packages) during image construction are no longer
216eff27476SAndrew Geissler  ignored. Historically some of these packages had installation problems,
217eff27476SAndrew Geissler  that is no longer the case. In the unlikely event that you see errors
218eff27476SAndrew Geissler  as a result, you will need to fix the installation/packaging issues.
219eff27476SAndrew Geissler
220eff27476SAndrew Geissler- When building an image, only packages that will be used in building
221eff27476SAndrew Geissler  the image (i.e. the first entry in :term:`PACKAGE_CLASSES`) will be
222eff27476SAndrew Geissler  produced if multiple package types are enabled (which is not a typical
223eff27476SAndrew Geissler  configuration). If in your CI system you need to have the original
224eff27476SAndrew Geissler  behaviour, use ``bitbake --runall build <target>``.
225eff27476SAndrew Geissler
226eff27476SAndrew Geissler- The ``-lic`` package is no longer automatically added to
227eff27476SAndrew Geissler  :term:`RRECOMMENDS` for every other package when
228eff27476SAndrew Geissler  :term:`LICENSE_CREATE_PACKAGE` is set to "1". If you wish all license
229eff27476SAndrew Geissler  packages to be installed corresponding to packages in your image, then
230eff27476SAndrew Geissler  you should instead add the new ``lic-pkgs`` feature to
231eff27476SAndrew Geissler  :term:`IMAGE_FEATURES`.
232eff27476SAndrew Geissler
233eff27476SAndrew GeisslerMiscellaneous
2347e0e3c0cSAndrew Geissler~~~~~~~~~~~~~
235eff27476SAndrew Geissler
236d583833aSAndrew Geissler- Certificates are now properly checked when BitBake fetches sources
237eff27476SAndrew Geissler  over HTTPS. If you receive errors as a result for your custom recipes,
238eff27476SAndrew Geissler  you will need to use a mirror or address the issue with the operators
239eff27476SAndrew Geissler  of the server in question.
240eff27476SAndrew Geissler
241eff27476SAndrew Geissler- ``avahi`` has had its GTK+ support disabled by default. If you wish to
242eff27476SAndrew Geissler  re-enable it, set ``AVAHI_GTK = "gtk3"`` in a bbappend for the
243eff27476SAndrew Geissler  ``avahi`` recipe or in your custom distro configuration file.
244eff27476SAndrew Geissler
245eff27476SAndrew Geissler- Setting the ``BUILD_REPRODUCIBLE_BINARIES`` variable to "0" no longer
246eff27476SAndrew Geissler  uses a strangely old fallback date of April 2011, it instead disables
247eff27476SAndrew Geissler  building reproducible binaries as you would logically expect.
248eff27476SAndrew Geissler
249eff27476SAndrew Geissler- Setting noexec/nostamp/fakeroot varflags to any value besides "1" will
250eff27476SAndrew Geissler  now trigger a warning. These should be either set to "1" to enable, or
251eff27476SAndrew Geissler  not set at all to disable.
252eff27476SAndrew Geissler
253eff27476SAndrew Geissler- The previously deprecated ``COMPRESS_CMD`` and
254eff27476SAndrew Geissler  ``CVE_CHECK_CVE_WHITELIST`` variables have been removed. Use
255*615f2f11SAndrew Geissler  :term:`CONVERSION_CMD` and ``CVE_CHECK_WHITELIST`` (replaced by
2569aee5003SAndrew Geissler  :term:`CVE_CHECK_IGNORE` in version 3.5) respectively
257eff27476SAndrew Geissler  instead.
258eff27476SAndrew Geissler
259eff27476SAndrew Geissler- The obsolete ``oe_machinstall`` function previously provided in the
260eff27476SAndrew Geissler  :ref:`utils <ref-classes-utils>` class has been removed. For
261eff27476SAndrew Geissler  machine-specific installation it is recommended that you use the
262eff27476SAndrew Geissler  built-in override support in the fetcher or overrides in general
263eff27476SAndrew Geissler  instead.
2647e0e3c0cSAndrew Geissler
26503907ee1SPatrick Williams- The ``-P`` (``--clear-password``) option can no longer be used with
26603907ee1SPatrick Williams  ``useradd`` and ``usermod`` entries in :term:`EXTRA_USERS_PARAMS`.
26703907ee1SPatrick Williams  It was being implemented using a custom patch to the ``shadow`` recipe
26803907ee1SPatrick Williams  which clashed with a ``-P`` option that was added upstream in
26903907ee1SPatrick Williams  ``shadow`` version 4.9, and in any case is fundamentally insecure.
27003907ee1SPatrick Williams  Hardcoded passwords are still supported but they need to be hashed, see
27103907ee1SPatrick Williams  examples in :term:`EXTRA_USERS_PARAMS`.
27203907ee1SPatrick Williams
27303907ee1SPatrick Williams
274