summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>2023-12-06 19:40:41 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-18 13:18:55 +0000
commitc24e3b9f676ea68c100154f1aa865430ed2c99f1 (patch)
tree41f53b3d9f8728ff0cc5b9b577f6e9ba8cb2a10f /documentation
parent33112178d164ddd9ef0b1115c254ad4341ec3ad1 (diff)
downloadpoky-c24e3b9f676ea68c100154f1aa865430ed2c99f1.tar.gz
dev-manual: Discourage the use of SRC_URI[md5sum]
SRC_URI[md5sum] has been deprecated for a long time. Discourage its use by removing it from examples and note that it should be replaced by SRC_URI[sha256sum] when updating recipes. Also mention that bitbake supports other checksums, though they are not commonly used. (From yocto-docs rev: 806c6cb0b457248ac7401487ba2cdd17a1eba320) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Reviewed-by: Michael Opdenacker <michael.opdenacker@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/debugging.rst2
-rw-r--r--documentation/dev-manual/new-recipe.rst27
2 files changed, 17 insertions, 12 deletions
diff --git a/documentation/dev-manual/debugging.rst b/documentation/dev-manual/debugging.rst
index fea2cb30a1..bd1e716b0b 100644
--- a/documentation/dev-manual/debugging.rst
+++ b/documentation/dev-manual/debugging.rst
@@ -327,7 +327,7 @@ BitBake has determined by doing the following:
327 the task. This list also includes indirect dependencies from 327 the task. This list also includes indirect dependencies from
328 variables depending on other variables, recursively:: 328 variables depending on other variables, recursively::
329 329
330 Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[md5sum]', 'SRC_URI[sha256sum]', 'base_do_fetch'] 330 Task dependencies: ['PV', 'SRCREV', 'SRC_URI', 'SRC_URI[sha256sum]', 'base_do_fetch']
331 331
332 .. note:: 332 .. note::
333 333
diff --git a/documentation/dev-manual/new-recipe.rst b/documentation/dev-manual/new-recipe.rst
index e741cef0e8..2c1033eb35 100644
--- a/documentation/dev-manual/new-recipe.rst
+++ b/documentation/dev-manual/new-recipe.rst
@@ -303,28 +303,33 @@ If your :term:`SRC_URI` statement includes URLs pointing to individual files
303fetched from a remote server other than a version control system, 303fetched from a remote server other than a version control system,
304BitBake attempts to verify the files against checksums defined in your 304BitBake attempts to verify the files against checksums defined in your
305recipe to ensure they have not been tampered with or otherwise modified 305recipe to ensure they have not been tampered with or otherwise modified
306since the recipe was written. Two checksums are used: 306since the recipe was written. Multiple checksums are supported:
307``SRC_URI[md5sum]`` and ``SRC_URI[sha256sum]``. 307``SRC_URI[md5sum]``, ``SRC_URI[sha1sum]``, ``SRC_URI[sha256sum]``.
308``SRC_URI[sha384sum]`` and ``SRC_URI[sha512sum]``, but only
309``SRC_URI[sha256sum]`` is commonly used.
310
311.. note::
312
313 ``SRC_URI[md5sum]`` used to also be commonly used, but it is deprecated
314 and should be replaced by ``SRC_URI[sha256sum]`` when updating existing
315 recipes.
308 316
309If your :term:`SRC_URI` variable points to more than a single URL (excluding 317If your :term:`SRC_URI` variable points to more than a single URL (excluding
310SCM URLs), you need to provide the ``md5`` and ``sha256`` checksums for 318SCM URLs), you need to provide the ``sha256`` checksum for each URL. For these
311each URL. For these cases, you provide a name for each URL as part of 319cases, you provide a name for each URL as part of the :term:`SRC_URI` and then
312the :term:`SRC_URI` and then reference that name in the subsequent checksum 320reference that name in the subsequent checksum statements. Here is an example
313statements. Here is an example combining lines from the files 321combining lines from the files ``git.inc`` and ``git_2.24.1.bb``::
314``git.inc`` and ``git_2.24.1.bb``::
315 322
316 SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \ 323 SRC_URI = "${KERNELORG_MIRROR}/software/scm/git/git-${PV}.tar.gz;name=tarball \
317 ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages" 324 ${KERNELORG_MIRROR}/software/scm/git/git-manpages-${PV}.tar.gz;name=manpages"
318 325
319 SRC_URI[tarball.md5sum] = "166bde96adbbc11c8843d4f8f4f9811b"
320 SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02" 326 SRC_URI[tarball.sha256sum] = "ad5334956301c86841eb1e5b1bb20884a6bad89a10a6762c958220c7cf64da02"
321 SRC_URI[manpages.md5sum] = "31c2272a8979022497ba3d4202df145d"
322 SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230" 327 SRC_URI[manpages.sha256sum] = "9a7ae3a093bea39770eb96ca3e5b40bff7af0b9f6123f089d7821d0e5b8e1230"
323 328
324Proper values for ``md5`` and ``sha256`` checksums might be available 329The proper value for the ``sha256`` checksum might be available together
325with other signatures on the download page for the upstream source (e.g. 330with other signatures on the download page for the upstream source (e.g.
326``md5``, ``sha1``, ``sha256``, ``GPG``, and so forth). Because the 331``md5``, ``sha1``, ``sha256``, ``GPG``, and so forth). Because the
327OpenEmbedded build system only deals with ``sha256sum`` and ``md5sum``, 332OpenEmbedded build system typically only deals with ``sha256sum``,
328you should verify all the signatures you find by hand. 333you should verify all the signatures you find by hand.
329 334
330If no :term:`SRC_URI` checksums are specified when you attempt to build the 335If no :term:`SRC_URI` checksums are specified when you attempt to build the