Magellan Linux

Diff of /trunk/mage-buildserver/buildserver-prepare.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2749 by niro, Wed Aug 13 14:28:18 2014 UTC revision 2793 by niro, Thu Aug 28 09:42:57 2014 UTC
# Line 7  source ${BUILDSERVER_CONFIG_DIR}/buildse Line 7  source ${BUILDSERVER_CONFIG_DIR}/buildse
7    
8  source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh  source ${BUILDSERVER_LIB_DIR}/buildserver-functions.sh
9    
10  # override  ALL_ARCH_PACKAGES=( subversion openssh )
11  #BUILDROOT="/mnt/test-buildroot"  NON_SRC_ARCH_PACKAGES=( "${BOOTSTRAP_DEVUTILS}" ccache python scanelf )
12  #BUILD_ARCH=( x86_64 i686 )  
13  #BUILDROOT_PROFILE="R11"  # fallback
14  #SMAGE_SVN_REPO="svn://cvs.magellan-linux.de/smage/trunk"  if [[ -z ${MAGE_PROFILE} ]]
15  #MAGE_SVN_REPO="svn://cvs.magellan-linux.de/mage/trunk"  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
# Line 21  fi Line 24  fi
24    
25  # create buildroot layout  # create buildroot layout
26  install -d ${BUILDROOT}/.stamps  install -d ${BUILDROOT}/.stamps
 install -d ${BUILDROOT}/tmp/mage-tree  
27  install -d ${BUILDROOT}/ssh  install -d ${BUILDROOT}/ssh
28  for arch in ${BUILD_ARCH[*]} src  for arch in ${BUILD_ARCH[*]} src
29  do  do
30   install -d ${BUILDROOT}/${arch}   install -d ${BUILDROOT}/${arch}
31     install -d ${BUILDROOT}/mage-tree/${arch}
32   install -d ${BUILDROOT}/packages/${arch}   install -d ${BUILDROOT}/packages/${arch}
33   install -d ${BUILDROOT}/meta/${arch}   install -d ${BUILDROOT}/meta/${arch}
34   install -d ${BUILDROOT}/build-info/${arch}   install -d ${BUILDROOT}/build-info/${arch}
# Line 41  do Line 44  do
44   mage-bootstrap \   mage-bootstrap \
45   --root ${BUILDROOT}/${arch} \   --root ${BUILDROOT}/${arch} \
46   --magerc ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc \   --magerc ${BUILDSERVER_CONFIG_DIR}/profiles/${BUILDROOT_PROFILE}/${arch}/mage.rc \
47   --profile "${BUILDROOT_PROFILE}" \   --profile "${MAGE_PROFILE}" \
48   --basesystem "${BOOTSTRAP_BASESYSTEM}" \   --basesystem "${BOOTSTRAP_BASESYSTEM}" \
49   || die "'${arch}' bootstrap"   || die "'${arch}' bootstrap"
50   touch ${BUILDROOT}/.stamps/${arch}_bootstrap-ok   touch ${BUILDROOT}/.stamps/${arch}_bootstrap-ok
# Line 71  do Line 74  do
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

Legend:
Removed from v.2749  
changed lines
  Added in v.2793