xref: /OK3568_Linux_fs/yocto/poky/documentation/migration-guides/migration-3.0.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunRelease 3.0 (zeus)
2*4882a593Smuzhiyun==================
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThis section provides migration information for moving to the Yocto
5*4882a593SmuzhiyunProject 3.0 Release (codename "zeus") from the prior release.
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun.. _migration-3.0-init-system-selection:
8*4882a593Smuzhiyun
9*4882a593SmuzhiyunInit System Selection
10*4882a593Smuzhiyun---------------------
11*4882a593Smuzhiyun
12*4882a593SmuzhiyunChanging the init system manager previously required setting a number of
13*4882a593Smuzhiyundifferent variables. You can now change the manager by setting the
14*4882a593Smuzhiyun``INIT_MANAGER`` variable and the corresponding include files (i.e.
15*4882a593Smuzhiyun``conf/distro/include/init-manager-*.conf``). Include files are provided
16*4882a593Smuzhiyunfor four values: "none", "sysvinit", "systemd", and "mdev-busybox". The
17*4882a593Smuzhiyundefault value, "none", for ``INIT_MANAGER`` should allow your current
18*4882a593Smuzhiyunsettings to continue working. However, it is advisable to explicitly set
19*4882a593Smuzhiyun``INIT_MANAGER``.
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun.. _migration-3.0-lsb-support-removed:
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunLSB Support Removed
24*4882a593Smuzhiyun-------------------
25*4882a593Smuzhiyun
26*4882a593SmuzhiyunLinux Standard Base (LSB) as a standard is not current, and is not well
27*4882a593Smuzhiyunsuited for embedded applications. Support can be continued in a separate
28*4882a593Smuzhiyunlayer if needed. However, presently LSB support has been removed from
29*4882a593Smuzhiyunthe core.
30*4882a593Smuzhiyun
31*4882a593SmuzhiyunAs a result of this change, the ``poky-lsb`` derivative distribution
32*4882a593Smuzhiyunconfiguration that was also used for testing alternative configurations
33*4882a593Smuzhiyunhas been replaced with a ``poky-altcfg`` distribution that has LSB parts
34*4882a593Smuzhiyunremoved.
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun.. _migration-3.0-removed-recipes:
37*4882a593Smuzhiyun
38*4882a593SmuzhiyunRemoved Recipes
39*4882a593Smuzhiyun---------------
40*4882a593Smuzhiyun
41*4882a593SmuzhiyunThe following recipes have been removed.
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun-  ``core-image-lsb-dev``: Part of removed LSB support.
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun-  ``core-image-lsb``: Part of removed LSB support.
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun-  ``core-image-lsb-sdk``: Part of removed LSB support.
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun-  ``cve-check-tool``: Functionally replaced by the ``cve-update-db``
50*4882a593Smuzhiyun   recipe and :ref:`cve-check <ref-classes-cve-check>` class.
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun-  ``eglinfo``: No longer maintained. ``eglinfo`` from ``mesa-demos`` is
53*4882a593Smuzhiyun   an adequate and maintained alternative.
54*4882a593Smuzhiyun
55*4882a593Smuzhiyun-  ``gcc-8.3``: Version 8.3 removed. Replaced by 9.2.
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun-  ``gnome-themes-standard``: Only needed by gtk+ 2.x, which has been
58*4882a593Smuzhiyun   removed.
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun-  ``gtk+``: GTK+ 2 is obsolete and has been replaced by gtk+3.
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun-  ``irda-utils``: Has become obsolete. IrDA support has been removed
63*4882a593Smuzhiyun   from the Linux kernel in version 4.17 and later.
64*4882a593Smuzhiyun
65*4882a593Smuzhiyun-  ``libnewt-python``: ``libnewt`` Python support merged into main
66*4882a593Smuzhiyun   ``libnewt`` recipe.
67*4882a593Smuzhiyun
68*4882a593Smuzhiyun-  ``libsdl``: Replaced by newer ``libsdl2``.
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun-  ``libx11-diet``: Became obsolete.
71*4882a593Smuzhiyun
72*4882a593Smuzhiyun-  ``libxx86dga``: Removed obsolete client library.
73*4882a593Smuzhiyun
74*4882a593Smuzhiyun-  ``libxx86misc``: Removed. Library is redundant.
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun-  ``linux-yocto``: Version 5.0 removed, which is now redundant (5.2 /
77*4882a593Smuzhiyun   4.19 present).
78*4882a593Smuzhiyun
79*4882a593Smuzhiyun-  ``lsbinitscripts``: Part of removed LSB support.
80*4882a593Smuzhiyun
81*4882a593Smuzhiyun-  ``lsb``: Part of removed LSB support.
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun-  ``lsbtest``: Part of removed LSB support.
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun-  ``openssl10``: Replaced by newer ``openssl`` version 1.1.
86*4882a593Smuzhiyun
87*4882a593Smuzhiyun-  ``packagegroup-core-lsb``: Part of removed LSB support.
88*4882a593Smuzhiyun
89*4882a593Smuzhiyun-  ``python-nose``: Removed the Python 2.x version of the recipe.
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun-  ``python-numpy``: Removed the Python 2.x version of the recipe.
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun-  ``python-scons``: Removed the Python 2.x version of the recipe.
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun-  ``source-highlight``: No longer needed.
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun-  ``stress``: Replaced by ``stress-ng``.
98*4882a593Smuzhiyun
99*4882a593Smuzhiyun-  ``vulkan``: Split into ``vulkan-loader``, ``vulkan-headers``, and
100*4882a593Smuzhiyun   ``vulkan-tools``.
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun-  ``weston-conf``: Functionality moved to ``weston-init``.
103*4882a593Smuzhiyun
104*4882a593Smuzhiyun.. _migration-3.0-packaging-changes:
105*4882a593Smuzhiyun
106*4882a593SmuzhiyunPackaging Changes
107*4882a593Smuzhiyun-----------------
108*4882a593Smuzhiyun
109*4882a593SmuzhiyunThe following packaging changes have occurred.
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun-  The `Epiphany <https://en.wikipedia.org/wiki/GNOME_Web>`__ browser
112*4882a593Smuzhiyun   has been dropped from ``packagegroup-self-hosted`` as it has not been
113*4882a593Smuzhiyun   needed inside ``build-appliance-image`` for quite some time and was
114*4882a593Smuzhiyun   causing resource problems.
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun-  ``libcap-ng`` Python support has been moved to a separate
117*4882a593Smuzhiyun   ``libcap-ng-python`` recipe to streamline the build process when the
118*4882a593Smuzhiyun   Python bindings are not needed.
119*4882a593Smuzhiyun
120*4882a593Smuzhiyun-  ``libdrm`` now packages the file ``amdgpu.ids`` into a separate
121*4882a593Smuzhiyun   ``libdrm-amdgpu`` package.
122*4882a593Smuzhiyun
123*4882a593Smuzhiyun-  ``python3``: The ``runpy`` module is now in the ``python3-core``
124*4882a593Smuzhiyun   package as it is required to support the common "python3 -m" command
125*4882a593Smuzhiyun   usage.
126*4882a593Smuzhiyun
127*4882a593Smuzhiyun-  ``distcc`` now provides separate ``distcc-client`` and
128*4882a593Smuzhiyun   ``distcc-server`` packages as typically one or the other are needed,
129*4882a593Smuzhiyun   rather than both.
130*4882a593Smuzhiyun
131*4882a593Smuzhiyun-  ``python*-setuptools`` recipes now separately package the
132*4882a593Smuzhiyun   ``pkg_resources`` module in a ``python-pkg-resources`` /
133*4882a593Smuzhiyun   ``python3-pkg-resources`` package as the module is useful independent
134*4882a593Smuzhiyun   of the rest of the setuptools package. The main ``python-setuptools``
135*4882a593Smuzhiyun   / ``python3-setuptools`` package depends on this new package so you
136*4882a593Smuzhiyun   should only need to update dependencies unless you want to take
137*4882a593Smuzhiyun   advantage of the increased granularity.
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun.. _migration-3.0-cve-checking:
140*4882a593Smuzhiyun
141*4882a593SmuzhiyunCVE Checking
142*4882a593Smuzhiyun------------
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun``cve-check-tool`` has been functionally replaced by a new
145*4882a593Smuzhiyun``cve-update-db`` recipe and functionality built into the :ref:`cve-check <ref-classes-cve-check>`
146*4882a593Smuzhiyunclass. The result uses NVD JSON data feeds rather than the deprecated
147*4882a593SmuzhiyunXML feeds that ``cve-check-tool`` was using, supports CVSSv3 scoring,
148*4882a593Smuzhiyunand makes other improvements.
149*4882a593Smuzhiyun
150*4882a593SmuzhiyunAdditionally, the ``CVE_CHECK_CVE_WHITELIST`` variable has been replaced
151*4882a593Smuzhiyunby ``CVE_CHECK_WHITELIST`` (replaced by :term:`CVE_CHECK_IGNORE` in version 3.5).
152*4882a593Smuzhiyun
153*4882a593Smuzhiyun.. _migration-3.0-bitbake-changes:
154*4882a593Smuzhiyun
155*4882a593SmuzhiyunBitbake Changes
156*4882a593Smuzhiyun---------------
157*4882a593Smuzhiyun
158*4882a593SmuzhiyunThe following BitBake changes have occurred.
159*4882a593Smuzhiyun
160*4882a593Smuzhiyun-  ``addtask`` statements now properly validate dependent tasks.
161*4882a593Smuzhiyun   Previously, an invalid task was silently ignored. With this change,
162*4882a593Smuzhiyun   the invalid task generates a warning.
163*4882a593Smuzhiyun
164*4882a593Smuzhiyun-  Other invalid ``addtask`` and ``deltask`` usages now trigger these
165*4882a593Smuzhiyun   warnings: "multiple target tasks arguments with addtask / deltask",
166*4882a593Smuzhiyun   and "multiple before/after clauses".
167*4882a593Smuzhiyun
168*4882a593Smuzhiyun-  The "multiconfig" prefix is now shortened to "mc". "multiconfig" will
169*4882a593Smuzhiyun   continue to work, however it may be removed in a future release.
170*4882a593Smuzhiyun
171*4882a593Smuzhiyun-  The ``bitbake -g`` command no longer generates a
172*4882a593Smuzhiyun   ``recipe-depends.dot`` file as the contents (i.e. a reprocessed
173*4882a593Smuzhiyun   version of ``task-depends.dot``) were confusing.
174*4882a593Smuzhiyun
175*4882a593Smuzhiyun-  The ``bb.build.FuncFailed`` exception, previously raised by
176*4882a593Smuzhiyun   ``bb.build.exec_func()`` when certain other exceptions have occurred,
177*4882a593Smuzhiyun   has been removed. The real underlying exceptions will be raised
178*4882a593Smuzhiyun   instead. If you have calls to ``bb.build.exec_func()`` in custom
179*4882a593Smuzhiyun   classes or ``tinfoil-using`` scripts, any references to
180*4882a593Smuzhiyun   ``bb.build.FuncFailed`` should be cleaned up.
181*4882a593Smuzhiyun
182*4882a593Smuzhiyun-  Additionally, the ``bb.build.exec_func()`` no longer accepts the
183*4882a593Smuzhiyun   "pythonexception" parameter. The function now always raises
184*4882a593Smuzhiyun   exceptions. Remove this argument in any calls to
185*4882a593Smuzhiyun   ``bb.build.exec_func()`` in custom classes or scripts.
186*4882a593Smuzhiyun
187*4882a593Smuzhiyun-  The ``BB_SETSCENE_VERIFY_FUNCTION2`` variable is no longer used. In
188*4882a593Smuzhiyun   the unlikely event that you have any references to it, they should be
189*4882a593Smuzhiyun   removed.
190*4882a593Smuzhiyun
191*4882a593Smuzhiyun-  The ``RunQueueExecuteScenequeue`` and ``RunQueueExecuteTasks`` events
192*4882a593Smuzhiyun   have been removed since setscene tasks are now executed as part of
193*4882a593Smuzhiyun   the normal runqueue. Any event handling code in custom classes or
194*4882a593Smuzhiyun   scripts that handles these two events need to be updated.
195*4882a593Smuzhiyun
196*4882a593Smuzhiyun-  The arguments passed to functions used with
197*4882a593Smuzhiyun   :term:`BB_HASHCHECK_FUNCTION`
198*4882a593Smuzhiyun   have changed. If you are using your own custom hash check function,
199*4882a593Smuzhiyun   see :yocto_git:`/poky/commit/?id=40a5e193c4ba45c928fccd899415ea56b5417725`
200*4882a593Smuzhiyun   for details.
201*4882a593Smuzhiyun
202*4882a593Smuzhiyun-  Task specifications in ``BB_TASKDEPDATA`` and class implementations
203*4882a593Smuzhiyun   used in signature generator classes now use "<fn>:<task>" everywhere
204*4882a593Smuzhiyun   rather than the "." delimiter that was being used in some places.
205*4882a593Smuzhiyun   This change makes it consistent with all areas in the code. Custom
206*4882a593Smuzhiyun   signature generator classes and code that reads ``BB_TASKDEPDATA``
207*4882a593Smuzhiyun   need to be updated to use ':' as a separator rather than '.'.
208*4882a593Smuzhiyun
209*4882a593Smuzhiyun.. _migration-3.0-sanity-checks:
210*4882a593Smuzhiyun
211*4882a593SmuzhiyunSanity Checks
212*4882a593Smuzhiyun-------------
213*4882a593Smuzhiyun
214*4882a593SmuzhiyunThe following sanity check changes occurred.
215*4882a593Smuzhiyun
216*4882a593Smuzhiyun-  :term:`SRC_URI` is now checked for usage of two
217*4882a593Smuzhiyun   problematic items:
218*4882a593Smuzhiyun
219*4882a593Smuzhiyun   -  "${PN}" prefix/suffix use - Warnings always appear if ${PN} is
220*4882a593Smuzhiyun      used. You must fix the issue regardless of whether multiconfig or
221*4882a593Smuzhiyun      anything else that would cause prefixing/suffixing to happen.
222*4882a593Smuzhiyun
223*4882a593Smuzhiyun   -  Github archive tarballs - these are not guaranteed to be stable.
224*4882a593Smuzhiyun      Consequently, it is likely that the tarballs will be refreshed and
225*4882a593Smuzhiyun      thus the SRC_URI checksums will fail to apply. It is recommended
226*4882a593Smuzhiyun      that you fetch either an official release tarball or a specific
227*4882a593Smuzhiyun      revision from the actual Git repository instead.
228*4882a593Smuzhiyun
229*4882a593Smuzhiyun   Either one of these items now trigger a warning by default. If you
230*4882a593Smuzhiyun   wish to disable this check, remove ``src-uri-bad`` from
231*4882a593Smuzhiyun   :term:`WARN_QA`.
232*4882a593Smuzhiyun
233*4882a593Smuzhiyun-  The ``file-rdeps`` runtime dependency check no longer expands
234*4882a593Smuzhiyun   :term:`RDEPENDS` recursively as there is no mechanism
235*4882a593Smuzhiyun   to ensure they can be fully computed, and thus races sometimes result
236*4882a593Smuzhiyun   in errors either showing up or not. Thus, you might now see errors
237*4882a593Smuzhiyun   for missing runtime dependencies that were previously satisfied
238*4882a593Smuzhiyun   recursively. Here is an example: package A contains a shell script
239*4882a593Smuzhiyun   starting with ``#!/bin/bash`` but has no dependency on bash. However,
240*4882a593Smuzhiyun   package A depends on package B, which does depend on bash. You need
241*4882a593Smuzhiyun   to add the missing dependency or dependencies to resolve the warning.
242*4882a593Smuzhiyun
243*4882a593Smuzhiyun-  Setting ``DEPENDS_${PN}`` anywhere (i.e. typically in a recipe) now
244*4882a593Smuzhiyun   triggers an error. The error is triggered because
245*4882a593Smuzhiyun   :term:`DEPENDS` is not a package-specific variable
246*4882a593Smuzhiyun   unlike RDEPENDS. You should set :term:`DEPENDS` instead.
247*4882a593Smuzhiyun
248*4882a593Smuzhiyun-  systemd currently does not work well with the musl C library because
249*4882a593Smuzhiyun   only upstream officially supports linking the library with glibc.
250*4882a593Smuzhiyun   Thus, a warning is shown when building systemd in conjunction with
251*4882a593Smuzhiyun   musl.
252*4882a593Smuzhiyun
253*4882a593Smuzhiyun.. _migration-3.0-miscellaneous-changes:
254*4882a593Smuzhiyun
255*4882a593SmuzhiyunMiscellaneous Changes
256*4882a593Smuzhiyun---------------------
257*4882a593Smuzhiyun
258*4882a593SmuzhiyunThe following miscellaneous changes have occurred.
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun-  The ``gnome`` class has been removed because it now does very little.
261*4882a593Smuzhiyun   You should update recipes that previously inherited this class to do
262*4882a593Smuzhiyun   the following: inherit gnomebase gtk-icon-cache gconf mime
263*4882a593Smuzhiyun
264*4882a593Smuzhiyun-  The ``meta/recipes-kernel/linux/linux-dtb.inc`` file has been
265*4882a593Smuzhiyun   removed. This file was previously deprecated in favor of setting
266*4882a593Smuzhiyun   :term:`KERNEL_DEVICETREE` in any kernel
267*4882a593Smuzhiyun   recipe and only produced a warning. Remove any ``include`` or
268*4882a593Smuzhiyun   ``require`` statements pointing to this file.
269*4882a593Smuzhiyun
270*4882a593Smuzhiyun-  :term:`TARGET_CFLAGS`,
271*4882a593Smuzhiyun   :term:`TARGET_CPPFLAGS`,
272*4882a593Smuzhiyun   :term:`TARGET_CXXFLAGS`, and
273*4882a593Smuzhiyun   :term:`TARGET_LDFLAGS` are no longer exported
274*4882a593Smuzhiyun   to the external environment. This change did not require any changes
275*4882a593Smuzhiyun   to core recipes, which is a good indicator that no changes will be
276*4882a593Smuzhiyun   required. However, if for some reason the software being built by one
277*4882a593Smuzhiyun   of your recipes is expecting these variables to be set, then building
278*4882a593Smuzhiyun   the recipe will fail. In such cases, you must either export the
279*4882a593Smuzhiyun   variable or variables in the recipe or change the scripts so that
280*4882a593Smuzhiyun   exporting is not necessary.
281*4882a593Smuzhiyun
282*4882a593Smuzhiyun-  You must change the host distro identifier used in
283*4882a593Smuzhiyun   :term:`NATIVELSBSTRING` to use all lowercase
284*4882a593Smuzhiyun   characters even if it does not contain a version number. This change
285*4882a593Smuzhiyun   is necessary only if you are not using ``uninative`` and
286*4882a593Smuzhiyun   :term:`SANITY_TESTED_DISTROS`.
287*4882a593Smuzhiyun
288*4882a593Smuzhiyun-  In the ``base-files`` recipe, writing the hostname into
289*4882a593Smuzhiyun   ``/etc/hosts`` and ``/etc/hostname`` is now done within the main
290*4882a593Smuzhiyun   :ref:`ref-tasks-install` function rather than in the
291*4882a593Smuzhiyun   ``do_install_basefilesissue`` function. The reason for the change is
292*4882a593Smuzhiyun   because ``do_install_basefilesissue`` is more easily overridden
293*4882a593Smuzhiyun   without having to duplicate the hostname functionality. If you have
294*4882a593Smuzhiyun   done the latter (e.g. in a ``base-files`` bbappend), then you should
295*4882a593Smuzhiyun   remove it from your customized ``do_install_basefilesissue``
296*4882a593Smuzhiyun   function.
297*4882a593Smuzhiyun
298*4882a593Smuzhiyun-  The ``wic --expand`` command now uses commas to separate "key:value"
299*4882a593Smuzhiyun   pairs rather than hyphens.
300*4882a593Smuzhiyun
301*4882a593Smuzhiyun   .. note::
302*4882a593Smuzhiyun
303*4882a593Smuzhiyun      The wic command-line help is not updated.
304*4882a593Smuzhiyun
305*4882a593Smuzhiyun   You must update any scripts or commands where you use
306*4882a593Smuzhiyun   ``wic --expand`` with multiple "key:value" pairs.
307*4882a593Smuzhiyun
308*4882a593Smuzhiyun-  UEFI image variable settings have been moved from various places to a
309*4882a593Smuzhiyun   central ``conf/image-uefi.conf``. This change should not influence
310*4882a593Smuzhiyun   any existing configuration as the ``meta/conf/image-uefi.conf`` in
311*4882a593Smuzhiyun   the core metadata sets defaults that can be overridden in the same
312*4882a593Smuzhiyun   manner as before.
313*4882a593Smuzhiyun
314*4882a593Smuzhiyun-  ``conf/distro/include/world-broken.inc`` has been removed. For cases
315*4882a593Smuzhiyun   where certain recipes need to be disabled when using the musl C
316*4882a593Smuzhiyun   library, these recipes now have ``COMPATIBLE_HOST_libc-musl`` set
317*4882a593Smuzhiyun   with a comment that explains why.
318*4882a593Smuzhiyun
319*4882a593Smuzhiyun
320