2008-09-04 01:18:17 +00:00
|
|
|
# This is the config file for the catalyst-auto script. It should be pretty
|
|
|
|
# self-explanatory.
|
|
|
|
|
2011-09-15 23:17:45 +00:00
|
|
|
ARCH="amd64"
|
2012-10-13 04:06:36 +00:00
|
|
|
TYPE="auto"
|
|
|
|
host=$(hostname)
|
|
|
|
|
|
|
|
source /etc/catalyst/release/build.env
|
2011-09-15 23:17:45 +00:00
|
|
|
|
2020-04-29 01:16:29 +00:00
|
|
|
SPECS_DIR=${REPO_DIR}/releases/specs/${ARCH}
|
2008-11-29 02:15:02 +00:00
|
|
|
|
2015-12-27 02:37:12 +00:00
|
|
|
SETS="
|
2017-12-03 21:20:03 +00:00
|
|
|
multilib minimal_multilib
|
|
|
|
nomultilib minimal_nomultilib
|
2015-12-27 02:37:12 +00:00
|
|
|
x32
|
2017-12-03 21:20:03 +00:00
|
|
|
hardened_multilib minimal_hardened_multilib
|
|
|
|
hardened_nomultilib minimal_hardened_nomultilib
|
2015-12-27 02:37:12 +00:00
|
|
|
"
|
2020-05-20 13:49:33 +00:00
|
|
|
# hardened_multilib_selinux hardened_nomultilib_selinux
|
|
|
|
#"
|
2009-06-27 19:09:30 +00:00
|
|
|
|
2015-12-18 01:53:56 +00:00
|
|
|
SET_multilib_SPECS="stage1.spec stage2.spec stage3.spec"
|
2015-12-27 02:37:12 +00:00
|
|
|
SET_multilib_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec"
|
2018-02-05 00:21:25 +00:00
|
|
|
SET_minimal_multilib_OPTIONAL_SPECS="stage4-minimal.spec"
|
2015-12-18 02:53:31 +00:00
|
|
|
SET_nomultilib_SPECS="stage1-nomultilib.spec stage2-nomultilib.spec stage3-nomultilib.spec"
|
2018-02-05 00:21:25 +00:00
|
|
|
SET_minimal_nomultilib_OPTIONAL_SPECS="stage4-nomultilib-minimal.spec"
|
2012-10-13 04:06:36 +00:00
|
|
|
|
2012-06-13 04:52:28 +00:00
|
|
|
SET_x32_SPECS="stage1-x32.spec stage2-x32.spec stage3-x32.spec"
|
2009-06-27 19:09:30 +00:00
|
|
|
|
2015-12-18 01:53:56 +00:00
|
|
|
SET_hardened_multilib_SPECS="hardened/stage1.spec hardened/stage2.spec hardened/stage3.spec"
|
2015-12-27 02:37:12 +00:00
|
|
|
SET_hardened_multilib_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage2.spec"
|
2018-02-05 00:21:25 +00:00
|
|
|
SET_minimal_hardened_multilib_OPTIONAL_SPECS="hardened/stage4-minimal.spec"
|
2015-12-18 01:53:56 +00:00
|
|
|
SET_hardened_nomultilib_SPECS="hardened/stage1-nomultilib.spec hardened/stage2-nomultilib.spec hardened/stage3-nomultilib.spec"
|
2018-02-05 00:21:25 +00:00
|
|
|
SET_minimal_hardened_nomultilib_OPTIONAL_SPECS="hardened/stage4-nomultilib-minimal.spec"
|
2008-11-29 02:15:02 +00:00
|
|
|
|
2013-04-20 15:18:55 +00:00
|
|
|
SET_hardened_multilib_selinux_SPECS="hardened/stage1-selinux.spec hardened/stage2-selinux.spec hardened/stage3-selinux.spec"
|
2019-06-07 00:36:48 +00:00
|
|
|
#SET_hardened_multilib_selinux_OPTIONAL_SPECS="hardened/admincd-stage1-selinux.spec hardened/admincd-stage2-selinux.spec"
|
2013-04-20 15:18:55 +00:00
|
|
|
SET_hardened_nomultilib_selinux_SPECS="hardened/stage1-selinux-nomultilib.spec hardened/stage2-selinux-nomultilib.spec hardened/stage3-selinux-nomultilib.spec"
|
|
|
|
|
2020-04-29 01:16:29 +00:00
|
|
|
KCONFIG_DIR=${REPO_DIR}/releases/kconfig/${ARCH}
|
2008-09-04 12:44:33 +00:00
|
|
|
|
2015-12-27 02:37:12 +00:00
|
|
|
EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]"
|
|
|
|
|
2016-05-05 10:07:20 +00:00
|
|
|
update_symlinks() {
|
2012-06-27 23:58:05 +00:00
|
|
|
# Symlink the latest stages3 to build from
|
|
|
|
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
|
2020-05-15 12:40:02 +00:00
|
|
|
pushd "${d}" >/dev/null || exit
|
2015-12-27 02:37:12 +00:00
|
|
|
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
|
2017-12-08 07:40:09 +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;' \
|
2017-12-08 08:04:40 +00:00
|
|
|
-e 's/20\d{6}/latest/g;' \
|
2017-12-08 07:40:09 +00:00
|
|
|
-e 's/20\d{2}\.\d{2}/latest/g;' \
|
|
|
|
<<<"$f")
|
2017-12-15 03:39:33 +00:00
|
|
|
ln -svf "$f" "$of"
|
2012-06-27 23:58:05 +00:00
|
|
|
done
|
2020-05-15 12:40:02 +00:00
|
|
|
popd >/dev/null || exit
|
2012-06-27 23:58:05 +00:00
|
|
|
done
|
2008-09-28 04:43:08 +00:00
|
|
|
}
|
2008-12-02 22:46:21 +00:00
|
|
|
|
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}"
|
|
|
|
}
|
|
|
|
|
2008-12-02 22:46:21 +00:00
|
|
|
post_build() {
|
2020-05-15 12:40:02 +00:00
|
|
|
local set=$1 spec=$2
|
|
|
|
|
2017-12-15 05:48:20 +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-22 11:02:44 +00:00
|
|
|
DEST_DEFAULT=${BUILD_DESTDIR_BASE}
|
|
|
|
DEST_HARDENED=${BUILD_DESTDIR_BASE}/hardened
|
|
|
|
;;
|
2017-12-22 11:29:30 +00:00
|
|
|
*)
|
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-22 11:02:44 +00:00
|
|
|
;;
|
2017-12-15 05:48:20 +00:00
|
|
|
esac
|
2020-05-15 12:40:02 +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 12:40:02 +00:00
|
|
|
case ${spec} in
|
|
|
|
stage3.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-amd64-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
installcd-stage2-minimal.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload install-amd64-minimal-${TIMESTAMP}.iso*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
stage4-minimal.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage4-amd64-minimal-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
stage3-nomultilib.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-amd64-nomultilib-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
stage4-nomultilib-minimal.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage4-amd64-minimal-nomultilib-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
stage3-x32.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-x32-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +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 12:40:02 +00:00
|
|
|
case ${spec} in
|
|
|
|
hardened/stage3.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-amd64-hardened-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
hardened/admincd-stage2.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload admincd-amd64-${TIMESTAMP}.iso*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
hardened/stage4-minimal.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage4-amd64-hardened+minimal-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
hardened/stage3-nomultilib.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-amd64-hardened+nomultilib-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
hardened/stage4-nomultilib-minimal.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage4-amd64-hardened+minimal-nomultilib-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
hardened/stage3-selinux.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-amd64-hardened-selinux-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
hardened/admincd-stage2-selinux.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload admincd-amd64-${TIMESTAMP}.iso*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
hardened/stage3-selinux-nomultilib.spec)
|
2020-05-15 17:34:12 +00:00
|
|
|
upload stage3-amd64-hardened-selinux+nomultilib-${TIMESTAMP}.tar.xz*
|
2020-05-15 12:40:02 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
popd >/dev/null || exit
|
2008-12-02 22:46:21 +00:00
|
|
|
}
|
|
|
|
|
2011-01-14 05:53:24 +00:00
|
|
|
# vim:ft=sh:
|