diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2022-03-09 15:10:26 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-16 14:25:01 +0000 |
commit | bafbbd53c4591b420bc9f15aa1fe1bd4e1df88bb (patch) | |
tree | 9c9c805b7725159947dc2ccbc60ca8edbf1ed1cd /documentation | |
parent | 16831cd62b393fde5b52f52371c46af38c0e6520 (diff) | |
download | poky-bafbbd53c4591b420bc9f15aa1fe1bd4e1df88bb.tar.gz |
docs: update examples to add branch info to git URIs
Branch information is now mandatory for git:// and gitsm:// URIs
(From yocto-docs rev: b862655d812e358dd15b06c0548a276a90666423)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Reviewed-by: Quentin Schulz <foss+yocto@0leil.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/dev-manual/common-tasks.rst | 65 | ||||
-rw-r--r-- | documentation/ref-manual/classes.rst | 5 | ||||
-rw-r--r-- | documentation/ref-manual/variables.rst | 2 |
3 files changed, 32 insertions, 40 deletions
diff --git a/documentation/dev-manual/common-tasks.rst b/documentation/dev-manual/common-tasks.rst index 1caf953901..9a6416bf8e 100644 --- a/documentation/dev-manual/common-tasks.rst +++ b/documentation/dev-manual/common-tasks.rst | |||
@@ -1396,19 +1396,14 @@ another example that specifies these types of files, see the | |||
1396 | ":ref:`dev-manual/common-tasks:autotooled package`" section. | 1396 | ":ref:`dev-manual/common-tasks:autotooled package`" section. |
1397 | 1397 | ||
1398 | Another way of specifying source is from an SCM. For Git repositories, | 1398 | Another way of specifying source is from an SCM. For Git repositories, |
1399 | you must specify :term:`SRCREV` and | 1399 | you must specify :term:`SRCREV` and you should specify :term:`PV` to include |
1400 | you should specify :term:`PV` to include | 1400 | the revision with :term:`SRCPV`. Here is an example from the recipe |
1401 | the revision with :term:`SRCPV`. Here | 1401 | ``meta/recipes-core/musl/gcompat_git.bb``:: |
1402 | is an example from the recipe | ||
1403 | ``meta/recipes-kernel/blktrace/blktrace_git.bb``:: | ||
1404 | 1402 | ||
1405 | SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385" | 1403 | SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current" |
1406 | 1404 | ||
1407 | PR = "r6" | 1405 | PV = "1.0.0+1.1+git${SRCPV}" |
1408 | PV = "1.0.5+git${SRCPV}" | 1406 | SRCREV = "af5a49e489fdc04b9cf02547650d7aeaccd43793" |
1409 | |||
1410 | SRC_URI = "git://git.kernel.dk/blktrace.git \ | ||
1411 | file://ldflags.patch" | ||
1412 | 1407 | ||
1413 | If your :term:`SRC_URI` statement includes URLs pointing to individual files | 1408 | If your :term:`SRC_URI` statement includes URLs pointing to individual files |
1414 | fetched from a remote server other than a version control system, | 1409 | fetched from a remote server other than a version control system, |
@@ -2372,41 +2367,39 @@ following example shows this:: | |||
2372 | 2367 | ||
2373 | CFLAGS:prepend = "-I ${S}/include " | 2368 | CFLAGS:prepend = "-I ${S}/include " |
2374 | 2369 | ||
2375 | In the following example, ``mtd-utils`` is a makefile-based package:: | 2370 | In the following example, ``lz4`` is a makefile-based package:: |
2376 | 2371 | ||
2377 | SUMMARY = "Tools for managing memory technology devices" | 2372 | SUMMARY = "Extremely Fast Compression algorithm" |
2378 | SECTION = "base" | 2373 | DESCRIPTION = "LZ4 is a very fast lossless compression algorithm, providing compression speed at 400 MB/s per core, scalable with multi-cores CPU. It also features an extremely fast decoder, with speed in multiple GB/s per core, typically reaching RAM speed limits on multi-core systems." |
2379 | DEPENDS = "zlib lzo e2fsprogs util-linux" | 2374 | HOMEPAGE = "https://github.com/lz4/lz4" |
2380 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" | ||
2381 | LICENSE = "GPL-2.0-or-later" | ||
2382 | LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \ | ||
2383 | file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c" | ||
2384 | 2375 | ||
2385 | # Use the latest version at 26 Oct, 2013 | 2376 | LICENSE = "BSD-2-Clause | GPL-2.0-only" |
2386 | SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b" | 2377 | LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=ebc2ea4814a64de7708f1571904b32cc \ |
2387 | SRC_URI = "git://git.infradead.org/mtd-utils.git \ | 2378 | file://programs/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
2388 | file://add-exclusion-to-mkfs-jffs2-git-2.patch \ | 2379 | file://LICENSE;md5=d57c0d21cb917fb4e0af2454aa48b956 \ |
2389 | " | 2380 | " |
2390 | 2381 | ||
2391 | PV = "1.5.1+git${SRCPV}" | 2382 | PE = "1" |
2392 | 2383 | ||
2393 | S = "${WORKDIR}/git" | 2384 | SRCREV = "d44371841a2f1728a3f36839fd4b7e872d0927d3" |
2394 | 2385 | ||
2395 | EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'" | 2386 | SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \ |
2387 | file://CVE-2021-3520.patch \ | ||
2388 | " | ||
2389 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" | ||
2396 | 2390 | ||
2397 | do_install () { | 2391 | S = "${WORKDIR}/git" |
2398 | oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} | ||
2399 | } | ||
2400 | 2392 | ||
2401 | PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc" | 2393 | # Fixed in r118, which is larger than the current version. |
2394 | CVE_CHECK_IGNORE += "CVE-2014-4715" | ||
2402 | 2395 | ||
2403 | FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool" | 2396 | EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no" |
2404 | FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*" | ||
2405 | FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image" | ||
2406 | 2397 | ||
2407 | PARALLEL_MAKE = "" | 2398 | do_install() { |
2399 | oe_runmake install | ||
2400 | } | ||
2408 | 2401 | ||
2409 | BBCLASSEXTEND = "native" | 2402 | BBCLASSEXTEND = "native nativesdk" |
2410 | 2403 | ||
2411 | Splitting an Application into Multiple Packages | 2404 | Splitting an Application into Multiple Packages |
2412 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 2405 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst index d7d86ebc46..e1e61c9c9f 100644 --- a/documentation/ref-manual/classes.rst +++ b/documentation/ref-manual/classes.rst | |||
@@ -170,8 +170,7 @@ example use for this class. | |||
170 | are extracted into the subdirectory expected by the default value of | 170 | are extracted into the subdirectory expected by the default value of |
171 | :term:`S`:: | 171 | :term:`S`:: |
172 | 172 | ||
173 | SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}" | 173 | SRC_URI = "git://example.com/downloads/somepackage.rpm;branch=main;subpath=${BP}" |
174 | |||
175 | 174 | ||
176 | See the ":ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers`" section in the BitBake User Manual for | 175 | See the ":ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers`" section in the BitBake User Manual for |
177 | more information on supported BitBake Fetchers. | 176 | more information on supported BitBake Fetchers. |
@@ -460,7 +459,7 @@ recipe that fetches from an alternative URI (e.g. Git) instead of a | |||
460 | tarball. Following is an example:: | 459 | tarball. Following is an example:: |
461 | 460 | ||
462 | BBCLASSEXTEND = "devupstream:target" | 461 | BBCLASSEXTEND = "devupstream:target" |
463 | SRC_URI:class-devupstream = "git://git.example.com/example" | 462 | SRC_URI:class-devupstream = "git://git.example.com/example;branch=main" |
464 | SRCREV:class-devupstream = "abcd1234" | 463 | SRCREV:class-devupstream = "abcd1234" |
465 | 464 | ||
466 | Adding the above statements to your recipe creates a variant that has | 465 | Adding the above statements to your recipe creates a variant that has |
diff --git a/documentation/ref-manual/variables.rst b/documentation/ref-manual/variables.rst index cd9eae7af2..ee77ee27af 100644 --- a/documentation/ref-manual/variables.rst +++ b/documentation/ref-manual/variables.rst | |||
@@ -6443,7 +6443,7 @@ system and gives an overview of their function and contents. | |||
6443 | from the default value of :term:`S`, you must set it specifically so the | 6443 | from the default value of :term:`S`, you must set it specifically so the |
6444 | source can be located:: | 6444 | source can be located:: |
6445 | 6445 | ||
6446 | SRC_URI = "git://path/to/repo.git" | 6446 | SRC_URI = "git://path/to/repo.git;branch=main" |
6447 | S = "${WORKDIR}/git" | 6447 | S = "${WORKDIR}/git" |
6448 | 6448 | ||
6449 | :term:`SANITY_REQUIRED_UTILITIES` | 6449 | :term:`SANITY_REQUIRED_UTILITIES` |