LibreELEC.tv icon indicating copy to clipboard operation
LibreELEC.tv copied to clipboard

Tools for a sources mirror

Open antonlacon opened this issue 4 months ago • 2 comments

This adds tools for building a sources mirror. Its broken into three parts:

genbuildplan.py: modified to add command line arguments for use by other scripts

genmirrorlist.py: new script to output a list of $PKG_NAME and $PKG_URL, one per line, of the requested images to be built. May be invoked by setting PROJECT/DEVICE/ARCH, invoking --all, or invoking --all with --builddirs. --all generates a list for all images (takes 20-30 minutes to put together the list - if the uboot based images don't vary in their package needs, this can be reduced significantly). --builddirs reduces --all to only those images with a build directory present. PROJECT/DEVICE/ARCH is for that specific image. Script outputs to stdout or to a file with the --export option.

build-mirror: standalone shell script that will download the output of genmirrorlist.py into the specified output directory with $PKG_NAME subdirectories. This is separated from genmirrorlist.py because genmirrorlist.py needs to run in the git source tree, and this doesn't. Add -v to show download progress.

Examples:

PROJECT=RPi DEVICE=RPi5 ARCH=aarch64 tools/genmirrorlist.py | tools/build-mirror -o mirror/

tools/genmirrorlist.py --all --export package-list-20241001.txt && tools/build-mirror -i package-list-20241001.txt -o mirror/

antonlacon avatar Oct 01 '24 16:10 antonlacon