[OE-core] [PATCH 0/1] Add new mirror archiver mode

Paul Barker paul at betafive.co.uk
Tue Sep 24 09:06:08 UTC 2019


This patch allows the creation of a full source mirror using the archiver
bbclass. Using the archiver allows us to make use of copyleft license
filtering, recipe type filtering and other features that are not available if
we just copy the contents of the downloads directory itself to create a
mirror. We also get the advantage of sstate caching and we don't have to
throw away the entire downloads directory before building to keep sources for
other builds out of our mirror.

The resulting mirror may be published and used as an entry in PREMIRRORS or
MIRRORS for a subsequent build. The functionality is explained in more detail
in the patch commit message and the additions to the documentation comments.

We've been using this patch in our Oryx Linux distro for a few months now to
confirm that it works as expected. All feedback is welcome, especially from
people who have worked on the archiver bbclass before.

Mirror creation was tested with the following additions to local.conf:

    INHERIT += "archiver"
    BB_GENERATE_MIRROR_TARBALLS = "1"
    ARCHIVER_MODE[src] = "mirror"
    ARCHIVER_MODE[mirror] = "combined"
    ARCHIVER_MIRROR_EXCLUDE = "file://"
    COPYLEFT_LICENSE_INCLUDE = "*"

The resulting mirror directory was moved out of the tmpdir and a rebuild was
tested with the following additions to local.conf:

    BB_NO_NETWORK = "1"
    INHERIT += "own-mirrors"
    SOURCE_MIRROR_URL = "file://${TOPDIR}/mirror"

Paul Barker (1):
  archiver.bbclass: Add new mirror archiver mode

 meta/classes/archiver.bbclass | 136 +++++++++++++++++++++++++++++-----
 1 file changed, 117 insertions(+), 19 deletions(-)

-- 
2.23.0



More information about the Openembedded-core mailing list