scripts/utils: Use a consistent 'cluster-downloads-cache' location for cache files
PATCH 1/4 scripts/utils: Use a consistent 'cluster-downloads-cache' location for cache files
Cache files were getting spread all over. Use a more consistent directory name to make it clear they are cache files.
Signed-off-by Richard Purdie <[email protected]>
--- scripts/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/utils.py +1 -1
@@ -465,7 +465,7 @@ def setup_tools_tarball(ourconfig, btdir, bttarball, name="buildtools"): bttarball, sha256 = bttarball.split(";") btdir = os.path.abspath(btdir) if not os.path.exists(btdir): - btdlpath = getconfig("BASE_SHAREDDIR", ourconfig) + "/" + name + "/" + os.path.basename(bttarball) + btdlpath = getconfig("BASE_SHAREDDIR", ourconfig) + "/cluster-downloads-cache/" + os.path.basename(bttarball) print("Extracting %s %s" % (name, bttarball)) btlock = btdlpath + ".lock" if not os.path.exists(os.path.dirname(btdlpath)):
PATCH 2/4 scripts/run-docs-build: Use the 'cluster-downloads-cache' location for cache files
The docs build uses some cached tarballs, use the standarised location for these.
Signed-off-by Richard Purdie <[email protected]>
--- scripts/run-docs-build | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-)
scripts/run-docs-build +18 -5
@@ -7,7 +7,7 @@ # $3 as the path to bitbake # # Environment variables: -# - docs_buildtools as the path to buildtools script for the docs. +# - buildtools_url as the path to buildtools script for the docs. # Can be found here: https://autobuilder.yocto.io/pub/buildtools/ # - docbookarchive as the path to old (pre 3.1.5 and Sphinx migration) docs tarball # Can be found here: https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz
@@ -21,20 +21,33 @@ set -x builddir=$(realpath "$1") ypdocs=$(realpath "$2/documentation/") bbdocs=$(realpath "$3/doc/") -docs_buildtools=${docs_buildtools:-/srv/autobuilder/autobuilder.yocto.io/pub/buildtools/x86_64-buildtools-docs-nativesdk-standalone-4.1.2.sh} outputdir=$builddir/output scriptdir="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" PUBLISH=${PUBLISH:-1} +sharedir=`jq '.["BASE_SHAREDDIR"]' < $HOME/config-local.json` +buildtools_url=${buildtools_url:-https://downloads.yoctoproject.org/releases/yocto/yocto-4.1.2/buildtools/x86_64-buildtools-docs-nativesdk-standalone-4.1.2.sh} +docbookarchive_url=${docbookarchive:-https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz} +buildtools_name=`basename $buildtools_url` +buildtools_localpath=${sharedir}/cluster-downloads-cache/${buildtools_name} + +if [ ! -e ${buildtools_localpath} ]; then + mkdir -p `dirname ${buildtools_localpath}` + wget ${buildtools_url} -O ${buildtools_localpath} +fi cd $builddir mkdir buildtools -$docs_buildtools -y -d $builddir/buildtools +${buildtools_localpath} -y -d $builddir/buildtools . $builddir/buildtools/environment-setup* # Getting the old docbook built docs from an archive. Not rebuilding them. -#wget https://downloads.yoctoproject.org/mirror/docbook-mirror/docbook-archives-20201105.tar.xz -docbookarchive=${docbookarchive:-/srv/autobuilder/autobuilder.yocto.io/pub/docbook-mirror/docbook-archives-20201105.tar.xz} +docbookarchive_localpath=${sharedir}/cluster-downloads-cache/`basename ${docbookarchive}` +if [ ! -e ${docbookarchive_localpath} ]; then + mkdir -p `dirname ${docbookarchive_localpath}` + wget ${buildtools_url} -O ${docbookarchive_localpath} +fi + mkdir $outputdir cd $outputdir echo Extracing old content from archive
PATCH 3/4 config.json: Use 5.0.4 release tarballs or download urls for all artefacts
In reply to Richard PurdieWe should be pointing at released artefacts where at all possible.
Signed-off-by Richard Purdie <[email protected]>
--- config.json | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-)
config.json +4 -10
@@ -7,16 +7,10 @@ "BUILD_HISTORY_REPO" : "ssh://[email protected]/poky-buildhistory", "BUILD_HISTORY_FORKPUSH" : {"poky-contrib:ross/mut" : "poky:master", "poky-contrib:abelloni/master-next": "poky:master", "poky:master-next" : "poky:master"}, - "BUILDTOOLS_URL_TEMPLOCAL" : "/srv/autobuilder/autobuilder.yocto.io/pub/non-release/20240413-14/buildtools/x86_64-buildtools-extended-nativesdk-standalone-4.3+snapshot-9717d17e4359e876078d98adcb85d9c395106d64.sh", - "BUILDTOOLS_URL_TEMPLOCAL2" : "https://downloads.yoctoproject.org/releases/yocto/milestones/yocto-3.1_M3/buildtools/x86_64-buildtools-extended-nativesdk-standalone-3.0+snapshot-20200315.sh", - - "BUILDTOOLS_URL_TEMPLOCAL3" : "https://downloads.yoctoproject.org/releases/yocto/yocto-4.1/buildtools/x86_64-buildtools-extended-nativesdk-standalone-4.1.sh", - "BUILDTOOLS_ARM_URL_TEMPLOCAL" : "https://downloads.yoctoproject.org/releases/yocto/yocto-4.1/buildtools/aarch64-buildtools-extended-nativesdk-standalone-4.1.sh", - "BUILDTOOLS_URL" : "/srv/autobuilder/autobuilder.yocto.io/pub/non-release/20240418-18/buildtools/x86_64-buildtools-extended-nativesdk-standalone-5.0.sh", - "BUILDTOOLS_ARM_URL" : "/srv/autobuilder/autobuilder.yocto.io/pub/non-release/20240418-18/buildtools/aarch64-buildtools-extended-nativesdk-standalone-5.0.sh", - "BUILDTOOLS_MAKE_URL" : "https://downloads.yoctoproject.org/releases/yocto/yocto-4.3/buildtools/x86_64-buildtools-make-nativesdk-standalone-4.3.sh", - - "EXTRATOOLS_URL" : "/srv/autobuilder/autobuilder.yocto.io/pub/extratools/x86_64-buildtools-imagemagick-nativesdk-standalone-4.3+snapshot-5f2ba20f203114db9a3b11264467f8c23a05041d.sh", + "BUILDTOOLS_URL" : "https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.4/buildtools/x86_64-buildtools-extended-nativesdk-standalone-5.0.4.sh", + "BUILDTOOLS_ARM_URL" : "https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.4/buildtools/aarch64-buildtools-extended-nativesdk-standalone-5.0.4.sh", + "BUILDTOOLS_MAKE_URL" : "https://downloads.yoctoproject.org/releases/yocto/yocto-5.0.4/buildtools/x86_64-buildtools-make-nativesdk-standalone-5.0.4.sh", + "EXTRATOOLS_URL" : "https://downloads.yoctoproject.org/tools/buildtools/x86_64-buildtools-imagemagick-nativesdk-standalone-4.3+snapshot-5f2ba20f203114db9a3b11264467f8c23a05041d.sh", "REPO_STASH_DIR" : "${BASE_HOMEDIR}/git/mirror", "TRASH_DIR" : "${BASE_HOMEDIR}/git/trash",
PATCH 4/4 config.json: Use BASE_SHAREDIR in index job command
In reply to Richard PurdieSigned-off-by Richard Purdie <[email protected]>
--- config.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
config.json +2 -2
@@ -1340,11 +1340,11 @@ "indexing" : { "step1" : { "shortname" : "Generate non-release index", - "EXTRACMDS" : ["${SCRIPTSDIR}/generate-testresult-index.py /srv/autobuilder/autobuilder.yocto.io/pub/non-release/"] + "EXTRACMDS" : ["${SCRIPTSDIR}/generate-testresult-index.py ${BASE_SHAREDDIR}/pub/non-release/"] }, "step2" : { "shortname" : "Extract ptest logs", - "EXTRACMDS" : ["${SCRIPTSDIR}/generate-ptest-logs.py /srv/autobuilder/autobuilder.yocto.io/pub/non-release/"] + "EXTRACMDS" : ["${SCRIPTSDIR}/generate-ptest-logs.py ${BASE_SHAREDDIR}/pub/non-release/"] } }, "meta-mingw" : {