# Yocto Build Server Stetup Script # Elizabeth Flanagan # # Copyright (C) 2011-2012 Intel Corp. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ######################################### # buildbot update wants to parse the config # So, we export bogus values just to get the # config to parse ######################################### export SLAVEBASEDIR=`pwd`/yocto-slave export PUBLISH_BUILDS=False export PUBLISH_SOURCE_MIRROR=False export PUBLISH_SSTATE=False export SSTATE_PUBLISH_DIR="/tmp/yocto-autobuilder/sstate_mirror" export SOURCE_PUBLISH_DIR="/tmp/yocto-autobuilder/source" export BUILD_PUBLISH_DIR="/tmp/yocto-autobuilder/builds" export BUILD_HISTORY_COLLECT=False export SOURCE_DL_DIR="/tmp/yocto-autobuilder/downloads" export SOURCE_SSTATE_DIR="/tmp/yocto-autobuilder/sstate" export LSB_SSTATE_DIR="/tmp/yocto-autobuilder/lsb-sstate" export CLEAN_SOURCE_DIR=False export BUILD_HISTORY_DIR="/tmp/yocto-autobuilder/buildhistory" export BUILD_HISTORY_REPO="file:////tmp/yocto-autobuilder/buildhistory-repo" export EMGD_DRIVER_DIR="/tmp/yocto-autobuilder/emgd-driver" export PERSISTDB_DIR="/tmp/yocto-autobuilder/persistdb" export MAINTAIN_PERSISTDB=False export ADTREPO_POPULATE=False export ADTREPO_GENERATE_INSTALLER=False export ADTREPO_DEV_POPULATE=False export ADTREPO_GENERATE_DEV_INSTALLER=True export ADTREPO_URL="http://adtrepo.yoctoproject.org/" export ADTREPO_PATH="/srv/www/vhosts/adtrepo.yoctoproject.org/" export ADTREPO_DEV_URL="http://adtrepo-dev.yoctoproject.org/" export ADTREPO_DEV_PATH="/srv/www/vhosts/adtrepo-dev/" export PYTHONPATH=`pwd`/lib/python2.7/site-packages/autobuilder/:`pwd`/lib/python2.7/site-packages/:`pwd`/lib/python2.7/site-packages/autobuilder/buildsteps:$PYTHONPATH export PATH=`pwd`/bin:`pwd`/yocto-autobuilder/scripts:$PATH export YOCTO_AB_CONFIG=`pwd`/config/yoctoAB.conf config_check=`cat ${PWD}/yocto-master/master.cfg|grep "'', ''"` ######################################### # # I dislike people touching my .bashrc # so, let's warn here that they should add # this to their env # ######################################### echo "#########################################################################" echo " Setting envvars. " echo " In the future though please add the following to your shell environment: " echo " PYTHONPATH=${PWD}/lib/python2.7/site-packages/:${PWD}/lib/python2.7/site-packages/autobuilder/:${PWD}/lib/python2.7/site-packages/autobuilder/buildsteps:"'$PYTHONPATH' echo " PATH=${PWD}/bin:${PWD}/yocto-autobuilder/scripts:"'$PATH' echo " YOCTO_AB_CONFIG=${PWD}/config/yoctoAB.conf" echo "" echo " If you don't, you should source this script everytime you want start the " echo " autobuilder." ########################## # # Check to see if we've got a username/password set # ########################## if [ -n "${config_check:+x}" ]; then echo "" echo " You've not setup the autobuilder before. Generating a username/password" echo " combo for you." echo "" username=`cat /dev/urandom|tr -dc "a-zA-Z0-9"|fold -w 9|head -n1` echo " Username = $username " password=`cat /dev/urandom|tr -dc "a-zA-Z0-9"|fold -w 9|head -n1` echo " Password = $password " echo "" echo " Modifying the following files with this username/password:" echo "" echo " ${PWD}/yocto-master/master.cfg " sed -i "s//$username/g" ${PWD}/yocto-master/master.cfg sed -i "s//$password/g" ${PWD}/yocto-master/master.cfg echo " ${PWD}/yocto-master/buildbot.tac " sed -i "s//$username/g" ${PWD}/yocto-master/buildbot.tac sed -i "s//$password/g" ${PWD}/yocto-master/buildbot.tac echo " ${PWD}/yocto-slave/buildbot.tac " sed -i "s//$username/g" ${PWD}/yocto-slave/buildbot.tac sed -i "s//$password/g" ${PWD}/yocto-slave/buildbot.tac echo "" echo " If you wish to use your own generated username and password please " echo " modify the above files as needed. Please see the README for more " echo " information. " echo "" echo "#########################################################################" echo "" echo " Please modify ${PWD}/conf/autobuilder.conf if you wish to specify " echo " a different location in which to publish build artifacts, etc." echo "" echo "#########################################################################" echo "" echo " Ready to start the yocto autobuilder." echo "" echo " The yocto-autobuilder runs buildbot 0.8.7p1 with some modifications to " echo " layout.py and buildbot/status/master.py. " echo "" echo "#########################################################################" buildbot upgrade-master ${PWD}/yocto-master ################ # # We touch this because we know they've at least run this once # ################ touch ${PWD}/.setupdone fi echo " To start the autobuilder:" echo " ./yocto-start-autobuilder " echo "" echo " To stop the autobuilder:" echo " ./yocto-stop-autobuilder " echo ""