Go to file
Christopher Larson 27d56982c7 bitbake: fetch/git: add support for shallow mirror tarballs
This adds support to the git fetcher for fetching, using, and generating
mirror tarballs of shallow git repositories. The external git-make-shallow
script is used for shallow mirror tarball creation.

This implements support for shallow mirror tarballs, not shallow clones.
Supporting shallow clones directly is not really doable for us, as we'd need
to hardcode the depth between branch HEAD and the SRCREV, and that depth would
change as the branch is updated.

When BB_GIT_SHALLOW is enabled, we will always attempt to fetch a shallow
mirror tarball. If the shallow mirror tarball cannot be fetched, it will try
to fetch the full mirror tarball and use that. If a shallow tarball is to be
used, it will be unpacked directly at `do_unpack` time, rather than extracting
it to DL_DIR at `do_fetch` time and cloning from there, to keep things simple.
There's no value in keeping a shallow repository in DL_DIR, and dealing with
the state for when to convert the clonedir to/from shallow is not worthwhile.

To clarify when shallow is used vs a real repository, a current clone is
preferred to either tarball, a shallow tarball is preferred to an out of date
clone, and a missing clone will use either tarball (attempting the shallow one
first).

All referenced branches are truncated to SRCREV (that is, commits *after*
SRCREV but before HEAD are removed) to further shrink the repository. By
default, the shallow construction process removes all unused refs
(branches/tags) from the repository, other than those referenced by the URL.

Example usage:

    BB_GIT_SHALLOW ?= "1"

    # Keep only the top commit
    BB_GIT_SHALLOW_DEPTH ?= "1"

    # This defaults to enabled if both BB_GIT_SHALLOW and
    # BB_GENERATE_MIRROR_TARBALLS are enabled
    BB_GENERATE_SHALLOW_TARBALLS ?= "1"

(Bitbake rev: 5ed7d85fda7c671be10ec24d7981b87a7d0d3366)

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-02 13:36:57 +01:00
bitbake bitbake: fetch/git: add support for shallow mirror tarballs 2017-06-02 13:36:57 +01:00
documentation ref-manual: Updated image-live.bbclass description 2017-05-18 13:18:56 +01:00
meta oeqa/core/context: Include a _pre_run method 2017-06-02 13:36:14 +01:00
meta-poky poky.conf: Bump version for 2.3 pyro release 2017-04-20 08:15:06 +01:00
meta-selftest wic-image-minimal: stop using core-image-minimal 2017-04-12 15:09:58 +01:00
meta-skeleton useradd-example: exclude from world 2017-01-09 13:39:11 +00:00
meta-yocto/conf meta-yocto: Rename to meta-poky to better match its purpose 2016-02-28 11:31:17 +00:00
meta-yocto-bsp linux-yocto: Update genericx86* SRCREVs for linux-yocto 4.10 2017-05-23 17:46:14 +01:00
scripts oeqa/core/context: Include a _pre_run method 2017-06-02 13:36:14 +01:00
.gitignore add !meta-poky to .gitignore file 2016-03-26 08:06:58 +00:00
.templateconf meta-yocto: Rename to meta-poky to better match its purpose 2016-02-28 11:31:17 +00:00
LICENSE Fix license notices for OE-Core 2014-01-02 12:58:54 +00:00
oe-init-build-env oe-init-build-env*: Make them actually return failures 2016-03-20 23:12:30 +00:00
oe-init-build-env-memres oe-init-build-env*: Make them actually return failures 2016-03-20 23:12:30 +00:00
README meta-yocto: Rename to meta-poky to better match its purpose 2016-02-28 11:31:17 +00:00
README.hardware README.hardware: update MPC8315E-RDB section 2017-01-16 18:08:20 +00:00

Poky

Poky is an integration of various components to form a complete prepackaged build system and development environment. It features support for building customised embedded device style images. There are reference demo images featuring a X11/Matchbox/GTK themed UI called Sato. The system supports cross-architecture application development using QEMU emulation and a standalone toolchain and SDK with IDE integration.

Additional information on the specifics of hardware that Poky supports is available in README.hardware. Further hardware support can easily be added in the form of layers which extend the systems capabilities in a modular way.

As an integration layer Poky consists of several upstream projects such as BitBake, OpenEmbedded-Core, Yocto documentation and various sources of information e.g. for the hardware support. Poky is in turn a component of the Yocto Project.

The Yocto Project has extensive documentation about the system including a reference manual which can be found at: http://yoctoproject.org/documentation

OpenEmbedded-Core is a layer containing the core metadata for current versions of OpenEmbedded. It is distro-less (can build a functional image with DISTRO = "nodistro") and contains only emulated machine support.

For information about OpenEmbedded, see the OpenEmbedded website: http://www.openembedded.org/

Where to Send Patches

As Poky is an integration repository (built using a tool called combo-layer), patches against the various components should be sent to their respective upstreams:

bitbake: Git repository: http://git.openembedded.org/bitbake/ Mailing list: bitbake-devel@lists.openembedded.org

documentation: Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/yocto-docs/ Mailing list: yocto@yoctoproject.org

meta-poky, meta-yocto-bsp: Git repository: http://git.yoctoproject.org/cgit/cgit.cgi/meta-yocto(-bsp) Mailing list: poky@yoctoproject.org

Everything else should be sent to the OpenEmbedded Core mailing list. If in doubt, check the oe-core git repository for the content you intend to modify. Before sending, be sure the patches apply cleanly to the current oe-core git repository.

Git repository: http://git.openembedded.org/openembedded-core/
Mailing list: openembedded-core@lists.openembedded.org

Note: The scripts directory should be treated with extra care as it is a mix of oe-core and poky-specific files.