commit: 2779b4af6a0ea7d5dd730a0bbabd1df1744d181e Author: Matt Turner <mattst88 <AT> gentoo <DOT> org> AuthorDate: Thu Aug 29 17:38:11 2019 +0000 Commit: Matt Turner <mattst88 <AT> gentoo <DOT> org> CommitDate: Thu Aug 29 17:39:10 2019 +0000 URL: https://gitweb.gentoo.org/proj/releng.git/commit/?id=2779b4af
catalyst-auto: Update sparc64 conf based on ppc Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org> tools/catalyst-auto-sparc64.conf | 91 ++++++++++++++++++---------------------- 1 file changed, 41 insertions(+), 50 deletions(-) diff --git a/tools/catalyst-auto-sparc64.conf b/tools/catalyst-auto-sparc64.conf index e153871b..1b28d283 100644 --- a/tools/catalyst-auto-sparc64.conf +++ b/tools/catalyst-auto-sparc64.conf @@ -1,80 +1,71 @@ # This is the config file for the catalyst-auto script. It should be pretty # self-explanatory. -ARCH="sparc" -TYPE="auto" -host="$(hostname)" +SPECS_DIR=${REPO_DIR}/releases/weekly/specs/sparc -EMAIL_TO="bkoh...@gentoo.org" +SPECS="sparc/stage1.spec sparc/stage3.spec sparc64/stage1.spec sparc64/stage3.spec" +OPTIONAL_SPECS="sparc64/installcd-stage1.spec sparc64/installcd-stage2-minimal.spec" -source /etc/catalyst/release/build.env +KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/powerpc -SPECS_DIR=${REPO_DIR}/releases/weekly/specs/sparc/sparc64 - -SETS="default" - -SET_default_SPECS="stage1.spec stage2.spec stage3.spec" -SET_default_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec" - -#SET_multilib_SPECS="multilib/stage1.spec multilib/stage2.spec multilib/stage3.spec" - -KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/sparc - -EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]" +EMAIL_SUBJECT_PREPEND="[sparc-auto]" give_latest_from_dates() { - sed 's,-20,~20,g' | \ - sort -k +1 -n -t '~' | \ - awk -F\~ \ - 'BEGIN{i=$1; o=$0}; - { if($1 != i && i != "") { print o; }; i=$1; o=$0; } - END { print o; };' | \ - tr '~' '-' + sed 's,-20,~20,g' | \ + sort -k +1 -n -t '~' |\ + awk -F\~ \ + 'BEGIN{i=$1; o=$0}; + { if($1 != i && i != "") { print o; }; i=$1; o=$0; } + END { print o; };' | \ + tr '~' '-' +} + +# Replace the date/time stamp in the filename to "latest". +# Forms we handle: +# stage3-xxx-2018.0.tar.xz +# stage3-xxx-20180116.tar.xz +# stage3-xxx-20180116T015819Z.tar.xz +convert_filename() { + sed -E 's:-20[0-9]+(\.[0-9]+|T[0-9]+Z)?:-latest:g' } update_symlinks() { # Symlink the latest stages3 to build from - for d in ${BUILD_SRCDIR_BASE}/default; do - pushd $d >/dev/null - for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do - # 20yymmddThhmmssZ - # 20yymmddhhmmss - # 20yymmdd - # 20yy.n - of=$(perl -p \ - -e 's/20\d{6}T\d{6}Z/latest/g;' \ - -e 's/20\d{6}\d{6}/latest/g;' \ - -e 's/20\d{6}/latest/g;' \ - -e 's/20\d{2}\.\d{2}/latest/g;' \ - <<<"$f") - ln -svf "$f" "$of" + local d f + for d in "${BUILD_SRCDIR_BASE}/builds/default" ; do + pushd "${d}" >/dev/null + for f in $(ls stage3-sparc-*xz | grep -v latest | give_latest_from_dates) ; do + local of=$(echo "${f}" | convert_filename) + ln -sf "${f}" "${of}" + done + for f in $(ls stage3-sparc64-*xz | grep -v latest | give_latest_from_dates) ; do + local of=$(echo "${f}" | convert_filename) + ln -sf "${f}" "${of}" done popd >/dev/null done } upload() { - rsync -e 'ssh -i /root/.ssh/id_rsa' \ - -a \ - --omit-dir-times \ - --delay-updates \ - "$@" \ - sp...@nightheron.gentoo.org: + rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" sp...@nightheron.gentoo.org: } post_build() { local set=$1 spec=$2 - pushd "${BUILD_SRCDIR_BASE}/default/" > /dev/null + pushd "${BUILD_SRCDIR_BASE}/builds/default" >/dev/null case ${spec} in - stage3.spec) - upload stage3-*${DATESTAMP}*${EXTENSIONS}* + sparc64/installcd-stage2-minimal.spec) + upload *${TIMESTAMP}*.iso* + ;; + sparc/stage3.spec) + upload stage3-sparc-*${TIMESTAMP}*.xz* ;; - installcd-stage2-minimal.spec) - upload *${DATESTAMP}*.iso* + sparc64/stage3.spec) + upload stage3-sparc64-*${TIMESTAMP}*.xz* ;; esac - popd > /dev/null + popd >/dev/null }