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
|
|
|
|
2012-02-13 01:10:01 +00:00
|
|
|
SPECS_DIR=${REPO_DIR}/releases/weekly/specs/${ARCH}
|
2008-11-29 02:15:02 +00:00
|
|
|
|
2013-04-20 15:18:55 +00:00
|
|
|
#SETS="multilib nomultilib x32 hardened_multilib hardened_nomultilib hardened_multilib_selinux hardened_nomultilib_selinux"
|
2012-10-11 06:13:20 +00:00
|
|
|
SETS="multilib nomultilib x32 hardened_multilib hardened_nomultilib"
|
2009-06-27 19:09:30 +00:00
|
|
|
|
|
|
|
SET_multilib_SPECS="stage1.spec stage2.spec stage3.spec"
|
|
|
|
SET_multilib_OPTIONAL_SPECS="installcd-stage1.spec installcd-stage2-minimal.spec"
|
2012-02-22 04:16:53 +00:00
|
|
|
SET_nomultilib_SPECS="stage1-nomultilib.spec stage2-nomultilib.spec stage3-nomultilib.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
|
|
|
|
|
|
|
SET_hardened_multilib_SPECS="hardened/stage1.spec hardened/stage2.spec hardened/stage3.spec"
|
2012-10-13 04:06:36 +00:00
|
|
|
SET_hardened_multilib_OPTIONAL_SPECS="hardened/admincd-stage1.spec hardened/admincd-stage2.spec"
|
2009-06-27 19:09:30 +00:00
|
|
|
SET_hardened_nomultilib_SPECS="hardened/stage1-nomultilib.spec hardened/stage2-nomultilib.spec hardened/stage3-nomultilib.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"
|
|
|
|
SET_hardened_multilib_selinux_OPTIONAL_SPECS="hardened/admincd-stage1-selinux.spec hardened/admincd-stage2-selinux.spec"
|
|
|
|
SET_hardened_nomultilib_selinux_SPECS="hardened/stage1-selinux-nomultilib.spec hardened/stage2-selinux-nomultilib.spec hardened/stage3-selinux-nomultilib.spec"
|
|
|
|
|
2012-02-13 01:10:01 +00:00
|
|
|
KCONFIG_DIR=${REPO_DIR}/releases/weekly/kconfig/${ARCH}
|
2008-09-04 12:44:33 +00:00
|
|
|
|
2011-01-14 05:53:24 +00:00
|
|
|
give_latest_from_dates() {
|
2012-06-27 23:58:05 +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 '~' '-'
|
2011-01-14 05:53:24 +00:00
|
|
|
}
|
|
|
|
|
2008-09-28 04:43:08 +00:00
|
|
|
pre_build() {
|
2012-06-27 23:58:05 +00:00
|
|
|
pushd ${REPO_DIR}
|
|
|
|
git pull
|
|
|
|
popd
|
2012-10-13 04:06:36 +00:00
|
|
|
|
2012-06-27 23:58:05 +00:00
|
|
|
# Symlink the latest stages3 to build from
|
|
|
|
for d in ${BUILD_SRCDIR_BASE}/{default,hardened} ; do
|
2012-06-28 00:20:00 +00:00
|
|
|
pushd $d
|
2012-06-27 23:58:05 +00:00
|
|
|
for f in $(ls 'stage3*bz2' | give_latest_from_dates ) ; do
|
|
|
|
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
|
2012-06-28 00:20:00 +00:00
|
|
|
popd
|
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
|
|
|
|
|
|
|
post_build() {
|
2012-06-28 00:20:00 +00:00
|
|
|
pushd ${BUILD_SRCDIR_BASE}/default
|
|
|
|
if [ -f stage3-amd64-${DATESTAMP}.tar.bz2 -o -f stage3-amd64-nomultilib-${DATESTAMP}.tar.bz2 ]; then
|
2013-04-28 22:36:56 +00:00
|
|
|
mkdir -p ${BUILD_DESTDIR_BASE}
|
|
|
|
cp stage3-*${DATESTAMP}*.bz2* ${BUILD_DESTDIR_BASE}
|
2012-06-28 00:20:00 +00:00
|
|
|
if [ -f *${DATESTAMP}*.iso ]; then
|
2013-04-28 22:36:56 +00:00
|
|
|
cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}
|
2012-06-28 00:20:00 +00:00
|
|
|
fi
|
2012-06-27 23:58:05 +00:00
|
|
|
fi
|
2012-06-28 00:20:00 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd ${BUILD_SRCDIR_BASE}/hardened
|
|
|
|
if [ -f stage3-amd64-hardened-${DATESTAMP}.tar.bz2 -o -f stage3-amd64-hardened+nomultilib-${DATESTAMP}.tar.bz2 ]; then
|
2013-04-28 22:36:56 +00:00
|
|
|
mkdir -p ${BUILD_DESTDIR_BASE}/hardened
|
|
|
|
cp stage3-*${DATESTAMP}*.bz2* ${BUILD_DESTDIR_BASE}/hardened
|
2012-06-28 00:20:00 +00:00
|
|
|
if [ -f *${DATESTAMP}*.iso ]; then
|
2013-04-28 22:36:56 +00:00
|
|
|
cp *${DATESTAMP}*.iso* ${BUILD_DESTDIR_BASE}/hardened
|
2012-06-28 00:20:00 +00:00
|
|
|
fi
|
2012-06-27 23:58:05 +00:00
|
|
|
fi
|
2008-12-02 22:46:21 +00:00
|
|
|
}
|
|
|
|
|
2011-01-14 05:53:24 +00:00
|
|
|
# vim:ft=sh:
|