2008-10-26 16:26:16 +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="x86"
|
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
|
|
|
|
2016-03-24 03:30:32 +00:00
|
|
|
SETS="
|
|
|
|
i486
|
|
|
|
i686
|
|
|
|
hardened
|
|
|
|
"
|
2008-10-26 16:26:16 +00:00
|
|
|
|
2009-06-27 19:09:30 +00:00
|
|
|
SET_i486_SPECS="stage1.spec stage2.spec stage3.spec"
|
|
|
|
SET_i486_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec"
|
2016-03-24 03:30:32 +00:00
|
|
|
|
2009-06-27 19:09:30 +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"
|
2012-10-13 04:06:36 +00:00
|
|
|
SET_hardened_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage2.spec"
|
2008-11-29 02:15:02 +00:00
|
|
|
|
2020-04-29 01:16:29 +00:00
|
|
|
KCONFIG_DIR=${REPO_DIR}/releases/kconfig/${ARCH}
|
2008-10-26 16:26:16 +00:00
|
|
|
|
2015-12-27 02:37:12 +00:00
|
|
|
EXTENSIONS="[.tar.xz,.tar.bz2,.tar.gz,.tar,.sfs]"
|
|
|
|
|
2018-01-16 01:44:31 +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
|
2016-06-15 01:29:20 +00:00
|
|
|
pushd $d >/dev/null
|
2015-12-27 02:37:12 +00:00
|
|
|
for f in $(ls stage3*${EXTENSIONS} | grep -v latest | give_latest_from_dates ) ; do
|
2020-02-03 12:02:36 +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-06-27 23:58:05 +00:00
|
|
|
done
|
2016-06-15 01:29:20 +00:00
|
|
|
popd >/dev/null
|
2012-06-27 23:58:05 +00:00
|
|
|
done
|
2008-10-26 16:26:16 +00:00
|
|
|
}
|
2008-12-02 22:46:21 +00:00
|
|
|
|
|
|
|
post_build() {
|
2017-12-15 05:48:20 +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-15 05:48:20 +00:00
|
|
|
-a
|
|
|
|
--omit-dir-times
|
|
|
|
--delay-updates
|
|
|
|
)
|
|
|
|
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
|
|
|
|
;;
|
|
|
|
*)
|
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
|
2016-06-15 01:29:20 +00:00
|
|
|
pushd ${BUILD_SRCDIR_BASE}/default >/dev/null
|
2017-12-15 05:48:20 +00:00
|
|
|
mkdir -p ${TMPDIR}/empty
|
2017-12-22 11:02:44 +00:00
|
|
|
"${cmd[@]}" ${TMPDIR}/empty ${DEST_DEFAULT}
|
2020-02-03 12:02:36 +00:00
|
|
|
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} stage{3,4}*${TIMESTAMP}*${EXTENSIONS} ); do
|
2015-12-27 02:37:12 +00:00
|
|
|
if [ -f $file ]; then
|
2017-12-22 11:02:44 +00:00
|
|
|
"${cmd[@]}" ${file}* ${DEST_DEFAULT}
|
2012-06-28 00:20:00 +00:00
|
|
|
fi
|
2015-12-27 02:37:12 +00:00
|
|
|
done
|
|
|
|
if [ -f *${DATESTAMP}*.iso ]; then
|
2017-12-22 11:02:44 +00:00
|
|
|
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_DEFAULT}
|
2017-12-15 05:48:20 +00:00
|
|
|
elif [ -f *${TIMESTAMP}*.iso ]; then
|
2017-12-22 11:02:44 +00:00
|
|
|
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_DEFAULT}
|
2012-06-27 23:58:05 +00:00
|
|
|
fi
|
2016-06-15 01:29:20 +00:00
|
|
|
popd >/dev/null
|
2012-06-28 00:20:00 +00:00
|
|
|
|
2016-06-15 01:29:20 +00:00
|
|
|
pushd ${BUILD_SRCDIR_BASE}/hardened >/dev/null
|
2017-12-22 11:02:44 +00:00
|
|
|
"${cmd[@]}" ${TMPDIR}/empty ${DEST_HARDENED}
|
2020-02-03 12:02:36 +00:00
|
|
|
for file in $(ls stage{3,4}*${DATESTAMP}*${EXTENSIONS} stage{3,4}*${TIMESTAMP}*${EXTENSIONS} ); do
|
2015-12-27 02:37:12 +00:00
|
|
|
if [ -f $file ]; then
|
2017-12-22 11:02:44 +00:00
|
|
|
"${cmd[@]}" $file* ${DEST_HARDENED}
|
2012-07-18 03:59:43 +00:00
|
|
|
fi
|
2015-12-27 02:37:12 +00:00
|
|
|
done
|
|
|
|
if [ -f *${DATESTAMP}*.iso ]; then
|
2017-12-28 19:01:26 +00:00
|
|
|
"${cmd[@]}" *${DATESTAMP}*.iso* ${DEST_HARDENED}
|
2017-12-15 05:48:20 +00:00
|
|
|
elif [ -f *${TIMESTAMP}*.iso ]; then
|
2017-12-22 11:02:44 +00:00
|
|
|
"${cmd[@]}" *${TIMESTAMP}*.iso* ${DEST_HARDENED}
|
2012-06-27 23:58:05 +00:00
|
|
|
fi
|
2017-12-27 02:54:39 +00:00
|
|
|
popd >/dev/null
|
2008-12-02 22:46:21 +00:00
|
|
|
}
|
2011-09-15 23:17:45 +00:00
|
|
|
|
2011-01-14 05:53:24 +00:00
|
|
|
# vim:ft=sh:
|