7 |
|
|
8 |
source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh |
source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh |
9 |
|
|
10 |
|
ALL_ARCH_PACKAGES=( subversion openssh ) |
11 |
|
NON_SRC_ARCH_PACKAGES=( "${BOOTSTRAP_DEVUTILS}" ccache python scanelf ) |
12 |
|
|
13 |
|
# fallback |
14 |
|
if [[ -z ${MAGE_PROFILE} ]] |
15 |
|
then |
16 |
|
echo "Warning: using '${BUILDROOT_PROFILE}' as MAGE_PROFILE. You should define MAGE_PROFILE in the profile.conf." |
17 |
|
MAGE_PROFILE="${BUILDROOT_PROFILE}" |
18 |
|
fi |
19 |
|
|
20 |
if [ ! -f ${BUILDROOT}/.stamps/mage_svn-checkout-ok ] |
if [ ! -f ${BUILDROOT}/.stamps/mage_svn-checkout-ok ] |
21 |
then |
then |
22 |
die "svn checkout of mage required. run buildserver-svn first." |
die "svn checkout of mage required. run buildserver-svn first." |
74 |
:> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver |
:> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver |
75 |
echo "MAGE_BOOTSTRAP=\"true\"" >> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver |
echo "MAGE_BOOTSTRAP=\"true\"" >> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver |
76 |
|
|
77 |
# install subversion |
for pkg in ${ALL_ARCH_PACKAGES[*]} |
78 |
if [ ! -f ${BUILDROOT}/.stamps/${arch}_subversion-ok ] |
do |
79 |
then |
runarch-pkg-install "${arch}" "${pkg}" |
80 |
runarch "${arch}" mage install subversion || die "${arch} install subversion" |
done |
|
touch ${BUILDROOT}/.stamps/${arch}_subversion-ok |
|
|
else |
|
|
echo "Warning: subversion already installed for arch '${arch}'" |
|
|
fi |
|
|
|
|
|
# install openssh |
|
|
if [ ! -f ${BUILDROOT}/.stamps/${arch}_openssh-ok ] |
|
|
then |
|
|
runarch "${arch}" mage install openssh || die "${arch} install openssh" |
|
|
touch ${BUILDROOT}/.stamps/${arch}_openssh-ok |
|
|
else |
|
|
echo "Warning: openssh already installed for arch '${arch}'" |
|
|
fi |
|
81 |
|
|
82 |
|
# exclude these pkg from src chroot |
83 |
if [[ ${arch} != src ]] |
if [[ ${arch} != src ]] |
84 |
then |
then |
85 |
if [ ! -f ${BUILDROOT}/.stamps/${arch}_common-devutils-ok ] |
for pkg in ${NON_SRC_ARCH_PACKAGES[*]} |
86 |
then |
do |
87 |
runarch "${arch}" mage install "${BOOTSTRAP_DEVUTILS}" || die "${arch} install '${BOOTSTRAP_DEVUTILS}'" |
runarch-pkg-install "${arch}" "${pkg}" |
88 |
touch ${BUILDROOT}/.stamps/${arch}_common-devutils-ok |
done |
|
else |
|
|
echo "Warning: '${BOOTSTRAP_DEVUTILS}' already installed for arch '${arch}'" |
|
|
fi |
|
89 |
|
|
|
# install ccache |
|
|
if [ ! -f ${BUILDROOT}/.stamps/${arch}_ccache-ok ] |
|
|
then |
|
|
runarch "${arch}" mage install ccache || die "${arch} install ccache" |
|
|
touch ${BUILDROOT}/.stamps/${arch}_ccache-ok |
|
|
else |
|
|
echo "Warning: ccache already installed for arch '${arch}'" |
|
|
fi |
|
90 |
# setup ccache |
# setup ccache |
91 |
if [ ! -f ${BUILDROOT}/.stamps/${arch}_setup-ccache-ok ] |
if [ ! -f ${BUILDROOT}/.stamps/${arch}_setup-ccache-ok ] |
92 |
then |
then |