2008-11-30 15:49:24 +00:00
|
|
|
# This is the config file for the catalyst-auto script. It should be pretty
|
|
|
|
# self-explanatory.
|
|
|
|
|
2019-01-04 16:43:58 +00:00
|
|
|
ARCH="sparc"
|
2019-01-04 16:33:17 +00:00
|
|
|
TYPE="auto"
|
|
|
|
host="$(hostname)"
|
|
|
|
|
2019-01-04 22:50:59 +00:00
|
|
|
EMAIL_TO="bkohler@gentoo.org"
|
|
|
|
|
2019-01-04 16:33:17 +00:00
|
|
|
source /etc/catalyst/release/build.env
|
|
|
|
|
2016-05-20 02:17:41 +00:00
|
|
|
SPECS_DIR=${REPO_DIR}/releases/weekly/specs/sparc/sparc64
|
2008-11-30 15:49:24 +00:00
|
|
|
|
2018-12-31 22:42:11 +00:00
|
|
|
SETS="default"
|
2012-02-09 16:00:44 +00:00
|
|
|
|
|
|
|
SET_default_SPECS="stage1.spec stage2.spec stage3.spec"
|
|
|
|
SET_default_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec"
|
|
|
|
|
2018-12-31 22:42:11 +00:00
|
|
|
#SET_multilib_SPECS="multilib/stage1.spec multilib/stage2.spec multilib/stage3.spec"
|
2012-02-09 16:00:44 +00:00
|
|
|
|
2016-05-20 02:17:41 +00:00
|
|
|
KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/sparc
|
2008-11-30 15:49:24 +00:00
|
|
|
|
2018-12-31 22:42:11 +00:00
|
|
|
EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]"
|
|
|
|
|
2013-08-14 17:40:22 +00:00
|
|
|
give_latest_from_dates() {
|
2019-01-09 17:18:48 +00:00
|
|
|
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 '~' '-'
|
2013-08-14 17:40:22 +00:00
|
|
|
}
|
|
|
|
|
2018-01-16 01:44:31 +00:00
|
|
|
update_symlinks() {
|
2019-01-09 17:18:48 +00:00
|
|
|
# Symlink the latest stages3 to build from
|
2019-01-11 14:10:59 +00:00
|
|
|
for d in ${BUILD_SRCDIR_BASE}/default; do
|
2019-01-09 17:18:48 +00:00
|
|
|
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"
|
|
|
|
done
|
|
|
|
popd >/dev/null
|
|
|
|
done
|
2008-11-30 15:49:24 +00:00
|
|
|
}
|
|
|
|
|
2019-01-08 17:02:26 +00:00
|
|
|
upload() {
|
2019-01-09 02:44:56 +00:00
|
|
|
rsync -e 'ssh -i /root/.ssh/id_rsa' \
|
|
|
|
-a \
|
|
|
|
--omit-dir-times \
|
|
|
|
--delay-updates \
|
|
|
|
"$@" \
|
2019-01-08 17:02:26 +00:00
|
|
|
sparc@nightheron.gentoo.org:
|
|
|
|
}
|
2013-08-14 17:40:22 +00:00
|
|
|
|
2008-11-30 15:49:24 +00:00
|
|
|
post_build() {
|
2019-01-08 17:02:26 +00:00
|
|
|
local set=$1 spec=$2
|
|
|
|
|
|
|
|
pushd "${BUILD_SRCDIR_BASE}/default/" > /dev/null
|
|
|
|
|
|
|
|
case ${spec} in
|
2019-01-08 17:34:13 +00:00
|
|
|
stage3.spec)
|
2019-01-08 17:02:26 +00:00
|
|
|
upload stage3-*${DATESTAMP}*${EXTENSIONS}*
|
|
|
|
;;
|
2019-01-08 17:34:13 +00:00
|
|
|
installcd-stage2-minimal.spec)
|
2019-01-08 17:02:26 +00:00
|
|
|
upload *${DATESTAMP}*.iso*
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
popd > /dev/null
|
2008-11-30 15:49:24 +00:00
|
|
|
}
|