2012-10-13 04:16:14 +00:00
|
|
|
# This is the config file for the catalyst-auto script. It should be pretty
|
|
|
|
# self-explanatory.
|
|
|
|
|
|
|
|
ARCH="x86"
|
|
|
|
TYPE="experimental"
|
|
|
|
host=$(hostname)
|
|
|
|
|
|
|
|
source /etc/catalyst/release/build.env
|
|
|
|
|
2020-04-29 01:16:29 +00:00
|
|
|
SPECS_DIR=${REPO_DIR}/releases/specs/${ARCH}
|
2012-10-13 04:16:14 +00:00
|
|
|
|
2016-04-26 22:35:19 +00:00
|
|
|
SETS="
|
|
|
|
i486
|
|
|
|
i686
|
|
|
|
hardened
|
|
|
|
"
|
2012-10-13 04:16:14 +00:00
|
|
|
|
|
|
|
SET_i486_SPECS="stage1.spec stage2.spec stage3.spec"
|
|
|
|
SET_i486_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec"
|
2016-04-26 22:35:19 +00:00
|
|
|
|
2012-10-13 04:16:14 +00:00
|
|
|
SET_i686_SPECS="i686/stage1.spec i686/stage2.spec i686/stage3.spec"
|
|
|
|
|
|
|
|
SET_hardened_SPECS="hardened/stage1.spec hardened/stage2.spec hardened/stage3.spec"
|
|
|
|
SET_hardened_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage2.spec"
|
|
|
|
|
2020-04-29 01:16:29 +00:00
|
|
|
KCONFIG_DIR=${REPO_DIR}/releases/kconfig/${ARCH}
|
2012-10-13 04:16:14 +00:00
|
|
|
|
2016-04-26 22:35:19 +00:00
|
|
|
EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]"
|
|
|
|
|
2018-01-16 01:44:31 +00:00
|
|
|
update_symlinks() {
|
2012-10-13 04:16:14 +00:00
|
|
|
# Symlink the latest stages3 to build from
|
|
|
|
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
|
2020-05-15 13:02:33 +00:00
|
|
|
pushd "${d}" >/dev/null || exit
|
2016-04-26 22:35:19 +00:00
|
|
|
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
|
2020-05-15 13:02:33 +00:00
|
|
|
# 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"
|
2012-10-13 04:16:14 +00:00
|
|
|
done
|
2020-05-15 13:02:33 +00:00
|
|
|
popd >/dev/null || exit
|
2012-10-13 04:16:14 +00:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2020-05-15 17:34:12 +00:00
|
|
|
upload() {
|
2020-05-17 15:31:07 +00:00
|
|
|
echo " ** Uploading $@"
|
2020-05-15 17:34:12 +00:00
|
|
|
rsync \
|
|
|
|
-e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no' \
|
|
|
|
-a \
|
|
|
|
--omit-dir-times \
|
|
|
|
--delay-updates \
|
|
|
|
"$@" \
|
|
|
|
"${UPLOAD_DEST}"
|
|
|
|
}
|
|
|
|
|
2012-10-13 04:16:14 +00:00
|
|
|
post_build() {
|
2020-05-15 13:02:33 +00:00
|
|
|
local set=$1 spec=$2
|
|
|
|
|
2017-12-27 02:54:39 +00:00
|
|
|
case $HOSTNAME in
|
2020-05-12 05:14:17 +00:00
|
|
|
# If you ever need to ensure it's copied somewhere local, drop a hostname in here!
|
|
|
|
LOCAL)
|
2017-12-27 02:54:39 +00:00
|
|
|
DEST_DEFAULT=${BUILD_DESTDIR_BASE}
|
|
|
|
DEST_HARDENED=${BUILD_DESTDIR_BASE}/hardened
|
|
|
|
;;
|
|
|
|
*)
|
2020-04-26 04:52:40 +00:00
|
|
|
DEST_DEFAULT=${ARCH}@releng-incoming.gentoo.org:${BUILD_DESTDIR_BASE}
|
|
|
|
DEST_HARDENED=${ARCH}@releng-incoming.gentoo.org:${BUILD_DESTDIR_BASE}/hardened
|
2017-12-27 02:54:39 +00:00
|
|
|
;;
|
|
|
|
esac
|
2012-10-13 04:16:14 +00:00
|
|
|
|
2020-05-15 13:02:33 +00:00
|
|
|
pushd "${BUILD_SRCDIR_BASE}"/default >/dev/null || exit
|
2020-05-15 17:34:12 +00:00
|
|
|
UPLOAD_DEST=${DEST_DEFAULT}
|
2020-05-15 13:02:33 +00:00
|
|
|
case ${spec} in
|
|
|
|
stage3.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-i486-${TIMESTAMP}.tar.xz*
|
2020-05-15 13:02:33 +00:00
|
|
|
;;
|
|
|
|
installcd-stage2-minimal.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload install-x86-minimal-${TIMESTAMP}.iso*
|
2020-05-15 13:02:33 +00:00
|
|
|
;;
|
|
|
|
i686/stage3.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-i686-${TIMESTAMP}.tar.xz*
|
2020-05-15 13:02:33 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
popd >/dev/null || exit
|
|
|
|
|
|
|
|
pushd "${BUILD_SRCDIR_BASE}"/hardened >/dev/null || exit
|
2020-05-15 17:34:12 +00:00
|
|
|
UPLOAD_DEST=${DEST_HARDENED}
|
2020-05-15 13:02:33 +00:00
|
|
|
case ${spec} in
|
|
|
|
hardened/stage3.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-i686-hardened-${TIMESTAMP}.tar.xz*
|
2020-05-15 13:02:33 +00:00
|
|
|
;;
|
|
|
|
hardened/admincd-stage2.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload admincd-x86-${TIMESTAMP}.iso*
|
2020-05-15 13:02:33 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
popd >/dev/null || exit
|
2012-10-13 04:16:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:ft=sh:
|