Magellan Linux

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

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

revision 2792 by niro, Thu Aug 28 09:38:38 2014 UTC revision 2796 by niro, Thu Aug 28 09:45:42 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    ALL_ARCH_PACKAGES=( subversion openssh )
11    NON_SRC_ARCH_PACKAGES=( "${BOOTSTRAP_DEVUTILS}" ccache python scanelf )
12    
13  # fallback  # fallback
14  if [[ -z ${MAGE_PROFILE} ]]  if [[ -z ${MAGE_PROFILE} ]]
15  then  then
# Line 22  fi Line 25  fi
25  # create buildroot layout  # create buildroot layout
26  install -d ${BUILDROOT}/.stamps  install -d ${BUILDROOT}/.stamps
27  install -d ${BUILDROOT}/ssh  install -d ${BUILDROOT}/ssh
28  for arch in ${BUILD_ARCH[*]} src  for arch in $(enum-all-arch-types)
29  do  do
30   install -d ${BUILDROOT}/${arch}   install -d ${BUILDROOT}/${arch}
31   install -d ${BUILDROOT}/mage-tree/${arch}   install -d ${BUILDROOT}/mage-tree/${arch}
# Line 34  done Line 37  done
37  #  #
38  # arch specific  # arch specific
39  #  #
40  for arch in src ${BUILD_ARCH[*]}  for arch in $(enum-all-arch-types)
41  do  do
42   if [ ! -f ${BUILDROOT}/.stamps/${arch}_bootstrap-ok ]   if [ ! -f ${BUILDROOT}/.stamps/${arch}_bootstrap-ok ]
43   then   then
# Line 53  done Line 56  done
56  # create initial mage-tree for all arches  # create initial mage-tree for all arches
57  ${BUILDSERVER_LIB_DIR}/buildserver-setup-mage-tree.sh  ${BUILDSERVER_LIB_DIR}/buildserver-setup-mage-tree.sh
58    
59  for arch in src ${BUILD_ARCH[*]}  for arch in $(enum-all-arch-types)
60  do  do
   
  echo "DEBUG: arch='${arch}' BUILD_ARCH[*]='${BUILD_ARCH[*]}'"  
   
61   # honor any proxy settings   # honor any proxy settings
62   :> ${BUILDROOT}/${arch}/etc/env.d/01proxy   :> ${BUILDROOT}/${arch}/etc/env.d/01proxy
63   [[ -n ${http_proxy} ]] && echo "http_proxy=\"${http_proxy}\"" >> ${BUILDROOT}/${arch}/etc/env.d/01proxy   [[ -n ${http_proxy} ]] && echo "http_proxy=\"${http_proxy}\"" >> ${BUILDROOT}/${arch}/etc/env.d/01proxy
# Line 71  do Line 71  do
71   :> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver   :> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver
72   echo "MAGE_BOOTSTRAP=\"true\"" >> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver   echo "MAGE_BOOTSTRAP=\"true\"" >> ${BUILDROOT}/${arch}/etc/env.d/00mage-buildserver
73    
74   # install subversion   for pkg in ${ALL_ARCH_PACKAGES[*]}
75   if [ ! -f ${BUILDROOT}/.stamps/${arch}_subversion-ok ]   do
76   then   runarch-pkg-install "${arch}" "${pkg}"
77   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  
78    
79     # exclude these pkg from src chroot
80   if [[ ${arch} != src ]]   if [[ ${arch} != src ]]
81   then   then
82   if [ ! -f ${BUILDROOT}/.stamps/${arch}_common-devutils-ok ]   for pkg in ${NON_SRC_ARCH_PACKAGES[*]}
83   then   do
84   runarch "${arch}" mage install "${BOOTSTRAP_DEVUTILS}" || die "${arch} install '${BOOTSTRAP_DEVUTILS}'"   runarch-pkg-install "${arch}" "${pkg}"
85   touch ${BUILDROOT}/.stamps/${arch}_common-devutils-ok   done
  else  
  echo "Warning: '${BOOTSTRAP_DEVUTILS}' already installed for arch '${arch}'"  
  fi  
86    
  # 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  
87   # setup ccache   # setup ccache
88   if [ ! -f ${BUILDROOT}/.stamps/${arch}_setup-ccache-ok ]   if [ ! -f ${BUILDROOT}/.stamps/${arch}_setup-ccache-ok ]
89   then   then

Legend:
Removed from v.2792  
changed lines
  Added in v.2796