catalyst-auto: Update sparc64 conf based on ppc
Signed-off-by: Matt Turner <mattst88@gentoo.org>
This commit is contained in:
parent
1932302432
commit
2779b4af6a
1 changed files with 41 additions and 50 deletions
|
@ -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="bkohler@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 \
|
||||
"$@" \
|
||||
sparc@nightheron.gentoo.org:
|
||||
rsync -e 'ssh -i /root/.ssh/id_rsa' "$@" sparc@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*
|
||||
;;
|
||||
installcd-stage2-minimal.spec)
|
||||
upload *${DATESTAMP}*.iso*
|
||||
sparc/stage3.spec)
|
||||
upload stage3-sparc-*${TIMESTAMP}*.xz*
|
||||
;;
|
||||
sparc64/stage3.spec)
|
||||
upload stage3-sparc64-*${TIMESTAMP}*.xz*
|
||||
;;
|
||||
esac
|
||||
|
||||
popd > /dev/null
|
||||
popd >/dev/null
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue