Skip to content

Instantly share code, notes, and snippets.

@cwolferh
Last active December 14, 2015 16:48
Show Gist options
  • Select an option

  • Save cwolferh/5117410 to your computer and use it in GitHub Desktop.

Select an option

Save cwolferh/5117410 to your computer and use it in GitHub Desktop.
# Test builidng fedora 18 ISO for crowbar v1.5.1
# Make sure you have the packages installed:
# ruby-devel genisoimage rubygem-kwalify ruby rubygems patch
# With all the needed dependencies installed, this script should just work
# the build scripts look for the iso in in $ISO_LIBRARY
export ISO_LIBRARY=$HOME/iso
# If I don't set this, the scripts somehow assume / as the CACHE_DIR
# which obviously doesn't work
export CACHE_DIR=$HOME/cache-crowbar-$$
mkdir -p $CACHE_DIR
# get old crud out of the way if necessary
mv ~/.build-crowbar.conf ~/.build-crowbar.conf.sav
if [ ! -f $ISO_LIBRARY/Fedora-18-x86_64-DVD.iso ]; then
echo "$HOME/iso/Fedora-18-x86_64-DVD.iso does not exist, exiting"
exit 1
fi
# move the old crowbar out of the way if there is one
mv $HOME/crowbar $HOME/crowbar.$(date +'%s').sav
# typical crowbar iso build commands
cd $HOME
git clone https://github.com/crowbar/crowbar
cd crowbar
./dev setup --no-github
./dev fetch
./dev switch v1.5.1-openstack
# add Fedora 18-specific changes
#cd barclamps; for bc in *; do (cd "$bc"; git checkout -f release/fred/master) done; cd ..
cd $HOME
git clone https://github.com/cwolferh/crowbar-fedora-iso-build
cd crowbar-fedora-iso-build
git checkout updates
git pull
cp -r $HOME/crowbar-fedora-iso-build/fedora-18-extra $HOME/crowbar/
# so the dev script does not blow away fedora-18-extra/
cd $HOME/crowbar
git add fedora-18-extra
cp -p $HOME/crowbar-fedora-iso-build/build_lib.sh $HOME/crowbar/
sed -i 's#/home/rwsu#$HOME#g' $HOME/crowbar/build_lib.sh
sed -i 's#/home/rwsu#$HOME#g' $HOME/crowbar/fedora-18-extra/*sh
# Useful if you are debugging and want to save 20 minutes
if [[ "x$SKIP_SLEDGE" != "x" ]]; then
sed -i 's#"$CROWBAR_DIR/build_sledgehammer.sh" || \\#echo skipping $CROWBAR_DIR/build_sledgehammer.sh || \\#' $HOME/crowbar/build_crowbar.sh
fi
# tons of bash debugging info
export DEBUG=true
cd $HOME/crowbar/fedora-18-extra
./build-fedora.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment