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
|
2016-06-15 01:29:20 +00:00
|
|
|
pushd $d >/dev/null
|
2016-04-26 22:35:19 +00:00
|
|
|
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
|
2012-10-13 04:16:14 +00:00
|
|
|
of=${f/20[0-9][0-9].[0-9]/latest} # for 20XX.Y stuff
|
|
|
|
of=${of/20[0-9][0-9][0-1][0-9][0-9][0-9]/latest} # for 20YYMMDD stuff
|
|
|
|
ln -sf $f $of
|
|
|
|
done
|
2016-06-15 01:29:20 +00:00
|
|
|
popd >/dev/null
|
2012-10-13 04:16:14 +00:00
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
post_build() {
|
2017-12-27 02:54:39 +00:00
|
|
|
cmd=(
|
|
|
|
rsync
|
2020-04-26 04:52:40 +00:00
|
|
|
-e 'ssh -i /root/.ssh/id_rsa -o UserKnownHostsFile=/dev/null -o VerifyHostKeyDNS=yes -o StrictHostKeyChecking=no'
|
2017-12-27 02:54:39 +00:00
|
|
|
-a
|
|
|
|
--omit-dir-times
|
|
|
|
--delay-updates
|
|
|
|
)
|
|
|
|
case $HOSTNAME in
|
|
|
|
nightheron)
|
|
|
|
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
|
2016-06-15 01:29:20 +00:00
|
|
|
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
|
2017-12-27 02:54:39 +00:00
|
|
|
mkdir -p ${TMPDIR}/empty
|
|
|
|
"${cmd[@]}" ${TMPDIR}/empty ${DEST_DEFAULT}
|
|
|
|
for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do
|
2016-04-27 01:58:51 +00:00
|
|
|
if [ -f $file ]; then
|
2017-12-27 02:54:39 +00:00
|
|
|
"${cmd[@]}" ${file}* ${DEST_DEFAULT}
|
2012-10-13 04:16:14 +00:00
|
|
|
fi
|
2016-04-27 01:58:51 +00:00
|
|
|
done
|
|
|
|
if [ -f *${DATESTAMP}*.iso ]; then
|
2017-12-27 02:54:39 +00:00
|
|
|
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_DEFAULT}
|
|
|
|
elif [ -f *${TIMESTAMP}*.iso ]; then
|
|
|
|
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_DEFAULT}
|
2012-10-13 04:16:14 +00:00
|
|
|
fi
|
2016-06-15 01:29:20 +00:00
|
|
|
popd >/dev/null
|
2012-10-13 04:16:14 +00:00
|
|
|
|
2016-06-15 01:29:20 +00:00
|
|
|
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
|
2017-12-27 02:54:39 +00:00
|
|
|
"${cmd[@]}" ${TMPDIR}/empty ${DEST_HARDENED}
|
|
|
|
for file in $(ls stage{3,4}*{${DATESTAMP},${TIMESTAMP}}*${EXTENSIONS} ); do
|
2016-04-27 01:58:51 +00:00
|
|
|
if [ -f $file ]; then
|
2017-12-27 02:54:39 +00:00
|
|
|
"${cmd[@]}" $file* ${DEST_HARDENED}
|
2012-10-13 04:16:14 +00:00
|
|
|
fi
|
2016-04-27 01:58:51 +00:00
|
|
|
done
|
|
|
|
if [ -f *${DATESTAMP}*.iso ]; then
|
2017-12-28 19:01:26 +00:00
|
|
|
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_HARDENED}
|
2017-12-27 02:54:39 +00:00
|
|
|
elif [ -f *${TIMESTAMP}*.iso ]; then
|
|
|
|
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_HARDENED}
|
2012-10-13 04:16:14 +00:00
|
|
|
fi
|
2017-12-27 02:54:39 +00:00
|
|
|
popd >/dev/null
|
2012-10-13 04:16:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# vim:ft=sh:
|