mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
16831cd62b
commit
bafbbd53c4
@@ -1396,19 +1396,14 @@ another example that specifies these types of files, see the
|
|||||||
":ref:`dev-manual/common-tasks:autotooled package`" section.
|
":ref:`dev-manual/common-tasks:autotooled package`" section.
|
||||||
|
|
||||||
Another way of specifying source is from an SCM. For Git repositories,
|
Another way of specifying source is from an SCM. For Git repositories,
|
||||||
you must specify :term:`SRCREV` and
|
you must specify :term:`SRCREV` and you should specify :term:`PV` to include
|
||||||
you should specify :term:`PV` to include
|
the revision with :term:`SRCPV`. Here is an example from the recipe
|
||||||
the revision with :term:`SRCPV`. Here
|
``meta/recipes-core/musl/gcompat_git.bb``::
|
||||||
is an example from the recipe
|
|
||||||
``meta/recipes-kernel/blktrace/blktrace_git.bb``::
|
|
||||||
|
|
||||||
SRCREV = "d6918c8832793b4205ed3bfede78c2f915c23385"
|
SRC_URI = "git://git.adelielinux.org/adelie/gcompat.git;protocol=https;branch=current"
|
||||||
|
|
||||||
PR = "r6"
|
PV = "1.0.0+1.1+git${SRCPV}"
|
||||||
PV = "1.0.5+git${SRCPV}"
|
SRCREV = "af5a49e489fdc04b9cf02547650d7aeaccd43793"
|
||||||
|
|
||||||
SRC_URI = "git://git.kernel.dk/blktrace.git \
|
|
||||||
file://ldflags.patch"
|
|
||||||
|
|
||||||
If your :term:`SRC_URI` statement includes URLs pointing to individual files
|
If your :term:`SRC_URI` statement includes URLs pointing to individual files
|
||||||
fetched from a remote server other than a version control system,
|
fetched from a remote server other than a version control system,
|
||||||
@@ -2372,41 +2367,39 @@ following example shows this::
|
|||||||
|
|
||||||
CFLAGS:prepend = "-I ${S}/include "
|
CFLAGS:prepend = "-I ${S}/include "
|
||||||
|
|
||||||
In the following example, ``mtd-utils`` is a makefile-based package::
|
In the following example, ``lz4`` is a makefile-based package::
|
||||||
|
|
||||||
SUMMARY = "Tools for managing memory technology devices"
|
SUMMARY = "Extremely Fast Compression algorithm"
|
||||||
SECTION = "base"
|
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."
|
||||||
DEPENDS = "zlib lzo e2fsprogs util-linux"
|
HOMEPAGE = "https://github.com/lz4/lz4"
|
||||||
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
|
|
||||||
LICENSE = "GPL-2.0-or-later"
|
|
||||||
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
|
|
||||||
file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
|
|
||||||
|
|
||||||
# Use the latest version at 26 Oct, 2013
|
LICENSE = "BSD-2-Clause | GPL-2.0-only"
|
||||||
SRCREV = "9f107132a6a073cce37434ca9cda6917dd8d866b"
|
LIC_FILES_CHKSUM = "file://lib/LICENSE;md5=ebc2ea4814a64de7708f1571904b32cc \
|
||||||
SRC_URI = "git://git.infradead.org/mtd-utils.git \
|
file://programs/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
||||||
file://add-exclusion-to-mkfs-jffs2-git-2.patch \
|
file://LICENSE;md5=d57c0d21cb917fb4e0af2454aa48b956 \
|
||||||
"
|
"
|
||||||
|
|
||||||
PV = "1.5.1+git${SRCPV}"
|
PE = "1"
|
||||||
|
|
||||||
|
SRCREV = "d44371841a2f1728a3f36839fd4b7e872d0927d3"
|
||||||
|
|
||||||
|
SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \
|
||||||
|
file://CVE-2021-3520.patch \
|
||||||
|
"
|
||||||
|
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
|
# Fixed in r118, which is larger than the current version.
|
||||||
|
CVE_CHECK_IGNORE += "CVE-2014-4715"
|
||||||
|
|
||||||
do_install () {
|
EXTRA_OEMAKE = "PREFIX=${prefix} CC='${CC}' CFLAGS='${CFLAGS}' DESTDIR=${D} LIBDIR=${libdir} INCLUDEDIR=${includedir} BUILD_STATIC=no"
|
||||||
oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
|
|
||||||
|
do_install() {
|
||||||
|
oe_runmake install
|
||||||
}
|
}
|
||||||
|
|
||||||
PACKAGES =+ "mtd-utils-jffs2 mtd-utils-ubifs mtd-utils-misc"
|
BBCLASSEXTEND = "native nativesdk"
|
||||||
|
|
||||||
FILES:mtd-utils-jffs2 = "${sbindir}/mkfs.jffs2 ${sbindir}/jffs2dump ${sbindir}/jffs2reader ${sbindir}/sumtool"
|
|
||||||
FILES:mtd-utils-ubifs = "${sbindir}/mkfs.ubifs ${sbindir}/ubi*"
|
|
||||||
FILES:mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* ${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
|
|
||||||
|
|
||||||
PARALLEL_MAKE = ""
|
|
||||||
|
|
||||||
BBCLASSEXTEND = "native"
|
|
||||||
|
|
||||||
Splitting an Application into Multiple Packages
|
Splitting an Application into Multiple Packages
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -170,8 +170,7 @@ example use for this class.
|
|||||||
are extracted into the subdirectory expected by the default value of
|
are extracted into the subdirectory expected by the default value of
|
||||||
:term:`S`::
|
:term:`S`::
|
||||||
|
|
||||||
SRC_URI = "git://example.com/downloads/somepackage.rpm;subpath=${BP}"
|
SRC_URI = "git://example.com/downloads/somepackage.rpm;branch=main;subpath=${BP}"
|
||||||
|
|
||||||
|
|
||||||
See the ":ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers`" section in the BitBake User Manual for
|
See the ":ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers`" section in the BitBake User Manual for
|
||||||
more information on supported BitBake Fetchers.
|
more information on supported BitBake Fetchers.
|
||||||
@@ -460,7 +459,7 @@ recipe that fetches from an alternative URI (e.g. Git) instead of a
|
|||||||
tarball. Following is an example::
|
tarball. Following is an example::
|
||||||
|
|
||||||
BBCLASSEXTEND = "devupstream:target"
|
BBCLASSEXTEND = "devupstream:target"
|
||||||
SRC_URI:class-devupstream = "git://git.example.com/example"
|
SRC_URI:class-devupstream = "git://git.example.com/example;branch=main"
|
||||||
SRCREV:class-devupstream = "abcd1234"
|
SRCREV:class-devupstream = "abcd1234"
|
||||||
|
|
||||||
Adding the above statements to your recipe creates a variant that has
|
Adding the above statements to your recipe creates a variant that has
|
||||||
|
|||||||
@@ -6443,7 +6443,7 @@ system and gives an overview of their function and contents.
|
|||||||
from the default value of :term:`S`, you must set it specifically so the
|
from the default value of :term:`S`, you must set it specifically so the
|
||||||
source can be located::
|
source can be located::
|
||||||
|
|
||||||
SRC_URI = "git://path/to/repo.git"
|
SRC_URI = "git://path/to/repo.git;branch=main"
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|
||||||
:term:`SANITY_REQUIRED_UTILITIES`
|
:term:`SANITY_REQUIRED_UTILITIES`
|
||||||
|
|||||||
Reference in New Issue
Block a user