Skip to content

Commit

Permalink
modified qemu install
Browse files Browse the repository at this point in the history
  • Loading branch information
qakapil committed Jun 13, 2015
1 parent 3d5ee3e commit a068867
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 10 deletions.
85 changes: 76 additions & 9 deletions bootstrap
Original file line number Diff line number Diff line change
@@ -1,19 +1,86 @@
#!/bin/sh
set -e

for package in python-dev python-pip python-virtualenv libevent-dev python-libvirt libmysqlclient-dev; do
if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then
# add a space after old values
missing="${missing:+$missing }$package"
case "$(uname -s)" in
Linux)
case "$(lsb_release --id --short)" in
Ubuntu|Debian)
# Note that we install the system version of python-libvirt here
# instead of relying on PyPI for that particular module. THe reason for
# this is that Ubuntu Precise ships libvirt 0.9.8, and PyPI's
# python-libvirt packages require libvirt >= 1.0.2.
# Some options for resolving this situation would be choosing some or
# all of the following:
# A) Removing support for Precise,
# B) Removing support for downburst,
# C) Adding "Precise" conditionals somewhere, eg. conditionalizing
# this bootstrap script to only use the python-libvirt package on
# Ubuntu Precise.
for package in python-dev python-pip python-virtualenv libevent-dev python-libvirt libmysqlclient-dev; do
if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then
# add a space after old values
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo "sudo apt-get install $missing"
exit 1
fi
;;
Fedora)
for package in python-pip python-virtualenv libevent-devel libvirt-python community-mysql-devel; do
if [ "$(rpm -q $package)" == "package $package is not installed" ]; then
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo "sudo yum install $missing"
exit 1
fi
;;
"openSUSE project"|"SUSE LINUX")
for package in python-pip python-virtualenv libevent-devel libvirt-python libmysqlclient-devel; do
if [ "$(rpm -q $package)" == "package $package is not installed" ]; then
missing="${missing:+$missing }$package"
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo "sudo zypper install $missing"
exit 1
fi
;;
*)
echo "This script does not support your Linux distribution yet. Patches encouraged!"
exit 1
;;
esac
;;
Darwin)
if ! which brew > /dev/null; then
echo "You need Homebrew: http://brew.sh/"
exit 1
fi
done
if [ -n "$missing" ]; then
echo "$0: missing required packages, please install them:" 1>&2
echo "sudo apt-get install $missing"
for keg in python libvirt libevent mysql; do
if brew list $keg >/dev/null 2>&1; then
echo "Found $keg"
else
brew install $keg
fi
done
;;
*)
echo "This script does not support your OS yet. Patches encouraged!"
exit 1
fi
;;
esac

if [ -z "$NO_CLOBBER" ] || [ ! -e ./virtualenv ]; then
if ! which virtualenv > /dev/null; then
pip install virtualenv
fi
# site packages needed because libvirt python bindings are not nicely
# packaged
virtualenv --system-site-packages --setuptools virtualenv
Expand Down
2 changes: 1 addition & 1 deletion teuthology/task/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# to hardcode this stuff, I don't want to do it in more than once place.
rpm_packages = {'ceph': [
'ceph',
#'ceph-debuginfo',
'ceph-debuginfo',
'ceph-radosgw',
'ceph-test',
#'ceph-devel',
Expand Down

0 comments on commit a068867

Please sign in to comment.