anchor.diff:      zlib \
       zlib-devel
   
  -if [ ! -d runit-rpm ]; then git clone https://github.com/imeyer/runit-rpm.git; fi
  -cd runit-rpm
  -./build.sh
  -yum install --assumeyes /root/rpmbuild/RPMS/x86_64/runit-*.rpm || true # TODO: Remove this shim
  -cd -
  +# Grr, prevent 'prelink' from mangling our binaries
  +# http://www.tsheffler.com/blog/?p=491
  +grep ruby /etc/prelink.conf || echo '-b /usr/bin/ruby*' >>/etc/prelink.conf
  +
  +print_header "Installing ruby version ${RUBY_VERSION}"
  +yum install --assumeyes ruby-1.9.3.p545
   
   yum clean all
   
   if [ ! -f /usr/bin/chef-client ]; then
   
  -  # Grr, prevent 'prelink' from mangling our binaries
  -  # http://www.tsheffler.com/blog/?p=491
  -  grep ruby /etc/prelink.conf || echo '-b /usr/bin/ruby*' >>/etc/prelink.conf
  -
  -  echo -e "`date` \n\n**** \n**** Installing ruby version ${RUBY_VERSION}:\n****\n"
  -
  -  wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-${RUBY_VERSION}.tar.gz
  -  tar xf ruby-${RUBY_VERSION}.tar.gz
  -  cd ruby-${RUBY_VERSION}
  -  ./configure --prefix=/usr --enable-shared --disable-install-doc --with-opt-dir=/usr/lib64 --with-openssl-dir=/usr/include/openssl
  -  make
  -  make install
  -
  -  echo -e "`date` \n\n**** \n**** Updating rubygems:\n****\n"
  +  print_header "Updating gems"
     gem update --system
   
  -  echo -e "`date` \n\n**** \n**** Installing chef:\n****\n"
  +  print_header "Installing chef"
     gem install ohai --no-rdoc --no-ri
     gem install chef --no-rdoc --no-ri --version "$CHEF_VERSION"
     # gems needed for the client.rb or so generically useful you want them at hand
     gem install      --no-rdoc --no-ri extlib bundler json right_aws pry fog
   
   else # no chef-client
  -  echo -e "`date` \n\n**** \n**** Chef is present -- skipping apt/ruby/chef installation\n****\n"
  +  print_header "Chef is present -- skipping apt/ruby/chef installation"
   fi # end ruby+chef install
   
  -echo -e "`date` \n\n**** \n**** Knifing in the chef client config files:\n****\n"
  +print_header "Writing chef client config files"
   mkdir -p /etc/chef
   
   <%- if @config[:client_key] %>
  
positive.code: mkdir -p /etc/chef/ohai/hints/
  touch /etc/chef/ohai/hints/ec2.json
  
  echo -e "`date` \n\n**** \n**** Adding chef client runit scripts:\n****\n"
  ( service chef-client stop >/dev/null 2>&1 ; sleep 1 ; killall chef-client 2>/dev/null ) || true
  mkdir -p /var/log/chef /var/chef /etc/service /etc/sv
  
  <%- if (@config[:bootstrap_runs_chef_client].to_s == 'true') || (@chef_config.knife[:bootstrap_runs_chef_client].to_s == 'true') %>
  echo -e "`date` \n\n**** \n**** First run of chef:\n****\n"
  set -e
  <%= start_chef %>
  set +e
  <%- end %>
  
  echo -e "`date` \n\n**** \n**** Cleanup:\n****\n"
  # make locate work good
  updatedb
  
  echo -e "`date` \n\n**** \n**** Adding chef client nonce script:\n****\n"
  
  cat > /etc/init.d/chef-client-nonce <<'EOP'
  #! /bin/sh
  
negative.code: 
  date > /etc/box_build_time
  
  function print_header() {
  	 local message
  	 message="$1"
  	 echo -e "`date` \n\n**** \n**** ${message}\n****\n"
  }
  
  print_header "Creating infochimps yum repository"
  cat >/etc/yum.repos.d/srp-rhel.repo <<EOP
  [dev]
  name=Infochimps Platform - dev
  baseurl=https://s3.amazonaws.com/srp-rhel.chimpy.us/dev/
  gpgcheck=0
  EOP
  
  print_header "yum upgrade"
  yum upgrade --assumeyes
  
  print_header "Installing base packages"
  yum install --assumeyes \
      autoconf \
      automake \
  