[Ovirt-devel] [PATCH appliance] removed old / broken appliance implementation

Joey Boggs jboggs at redhat.com
Wed Sep 16 16:33:18 UTC 2009


Mohammed Morsi wrote:
> ---
>  Makefile.am               |  208 ------------------------------------------
>  autobuild.sh              |  117 ------------------------
>  autogen.sh                |   66 --------------
>  configure.ac              |    5 -
>  create-ovirt-appliance    |   87 ------------------
>  create-ovirt-network      |  161 ---------------------------------
>  create-ovirt-nodes        |   51 -----------
>  get-ovirt-appliance       |  115 ------------------------
>  gettree.sh                |   77 ----------------
>  ovirt-appliance-functions |  219 ---------------------------------------------
>  ovirt-appliance.ks        |  119 ------------------------
>  ovirt-appliance.spec.in   |   69 --------------
>  12 files changed, 0 insertions(+), 1294 deletions(-)
>  delete mode 100644 Makefile.am
>  delete mode 100755 autobuild.sh
>  delete mode 100755 autogen.sh
>  delete mode 100644 configure.ac
>  delete mode 100755 create-ovirt-appliance
>  delete mode 100755 create-ovirt-network
>  delete mode 100755 create-ovirt-nodes
>  delete mode 100755 get-ovirt-appliance
>  delete mode 100755 gettree.sh
>  delete mode 100644 ovirt-appliance-functions
>  delete mode 100644 ovirt-appliance.ks
>  delete mode 100644 ovirt-appliance.spec.in
>
> diff --git a/Makefile.am b/Makefile.am
> deleted file mode 100644
> index bd40ef8..0000000
> --- a/Makefile.am
> +++ /dev/null
> @@ -1,208 +0,0 @@
> -# Copyright (C) 2008 Red Hat, Inc.
> -#
> -# 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; version 2 of the License.
> -#
> -# 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., 51 Franklin Street, Fifth Floor, Boston,
> -# MA  02110-1301, USA.  A copy of the GNU General Public License is
> -# also available at http://www.gnu.org/copyleft/gpl.html.
> -
> -OVIRT_CACHE_DIR	?= $(HOME)/ovirt-cache
> -OVIRT_LOCAL_REPO	?= file://$(OVIRT_CACHE_DIR)/ovirt
> -OVIRT_URL		?= http://ovirt.org/repos/ovirt
> -PKG_FMT			?= tar
> -SRC_FMT         ?= tar
> -DISK_FMT		?= qcow2
> -SUM				?= sha1sum
> -APP_RAM			?= 1024
> -AUTH_KEYS       ?= ~/.ssh/authorized_keys
> -
> -FEDORA_MIRROR	= http://mirrors.fedoraproject.org/mirrorlist
> -FEDORA_URL_DEF	= http://download.fedoraproject.org/pub/fedora/linux
> -CUR_RAWHIDE		= 11
> -
> -FEDORA			= $(shell rpm --eval '%{fedora}')
> -ARCH			= $(shell rpm --eval '%{_arch}')
> -
> -NVR				= $(PACKAGE)-$(VERSION)-$(ARCH)
> -
> -EXTRA_DIST =				\
> -  .gitignore				\
> -  create-$(PACKAGE)			\
> -  create-ovirt-network		\
> -  create-ovirt-nodes		\
> -  get-$(PACKAGE)			\
> -  $(PACKAGE)-functions		\
> -  gettree.sh				\
> -  $(PACKAGE).ks				\
> -  $(PACKAGE).spec			\
> -  $(PACKAGE).spec.in
> -
> -DISTCLEANFILES = $(PACKAGE)-$(VERSION).tar.gz \
> -  $(NVR).* \
> -  $(NVR).*.$(SUM) \
> -  repos.ks ovirt-authorized_keys
> -
> -# For Release: 0..., set _ovirt_dev=1 so that we get extra_release.GIT-
> -# annotated rpm version strings.
> -_ovirt_dev = \
> - $(shell grep -q '^[[:space:]]*Release:[[:space:]]*0' \
> -   $(srcdir)/*.spec.in && echo 1 || :)
> -
> -git_head    = $$(git log -1 --pretty=format:%h)
> -GIT_RELEASE = $$(date --utc +%Y%m%d%H%M%S)git$(git_head)
> -RPMDIR      = $$(rpm --eval '%{_rpmdir}')
> -RPM_FLAGS   = --define "ovirt_cache_dir $(OVIRT_CACHE_DIR)"
> -RPM_FLAGS  += $(if $(_ovirt_dev),--define "extra_release .$(GIT_RELEASE)")
> -APP_TMP     = $(OVIRT_CACHE_DIR)/$(PACKAGE)-$(ARCH)-tmp
> -SRC_KS      = $(APP_TMP)/src.ks
> -
> -repos.ks:
> -	( \
> -	    if [ 0$(FEDORA) == 0$(CUR_RAWHIDE) ]; then \
> -	        FEDORA_REPO=rawhide ;\
> -	        FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/development/$(ARCH)/os,--mirrorlist=$(FEDORA_MIRROR)?repo=rawhide&arch=$(ARCH))" ;\
> -	        OVIRT_DISTRO=development ;\
> -	    else \
> -	        FEDORA_REPO=f$(FEDORA) ;\
> -	        FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/releases/$(FEDORA)/Everything/$(ARCH)/os,--mirrorlist=$(FEDORA_MIRROR)?repo=fedora-$(FEDORA)&arch=$(ARCH))" ;\
> -	        OVIRT_DISTRO=$(FEDORA) ;\
> -		UPDATE_REPO_LINE="repo --name=$${FEDORA_REPO}-updates $(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/updates/$(FEDORA)/$(ARCH),--mirrorlist=$(FEDORA_MIRROR)?repo=updates-released-f$(FEDORA)&arch=$(ARCH))" ;\
> -	    fi ;\
> -	    echo "repo --name=$${FEDORA_REPO} $${FEDORA_REPO_LOC}" > $@ ;\
> -	    echo "repo --name=ovirt-org --baseurl=$(OVIRT_URL)/$${OVIRT_DISTRO}/$(ARCH)" >> $@ ;\
> -	    echo "$${UPDATE_REPO_LINE}" >> $@ ;\
> -	    echo "repo --name=ovirt-local --baseurl=$(OVIRT_LOCAL_REPO)" >> $@ \
> -	)
> -
> -src.ks: repos.ks
> -	mkdir -p $(APP_TMP)
> -	( \
> -	    cat repos.ks ;\
> -	    if [ 0$(FEDORA) == 0$(CUR_RAWHIDE) ]; then \
> -	        FEDORA_REPO=rawhide ;\
> -	        FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/development/source/SRPMS,--mirrorlist=$(FEDORA_MIRROR)?repo=rawhide-source&arch=source)" ;\
> -	        OVIRT_DISTRO=development ;\
> -	    else \
> -	        FEDORA_REPO=f$(FEDORA) ;\
> -	        FEDORA_REPO_LOC="$(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/releases/$(FEDORA)/Everything/source/SRPMS,--mirrorlist=$(FEDORA_MIRROR)?repo=fedora-source-$(FEDORA)&arch=source)" ;\
> -	        OVIRT_DISTRO=$(FEDORA) ;\
> -	        UPDATE_REPO_LINE="repo --name=$${FEDORA_REPO}-updates-source $(if $(FEDORA_URL),--baseurl=$(FEDORA_URL)/updates/$(FEDORA)/SRPMS,--mirrorlist=$(FEDORA_MIRROR)?repo=updates-released-source-f$(FEDORA)&arch=source)" ;\
> -	    fi ;\
> -	    echo "repo --name=$${FEDORA_REPO}-source $${FEDORA_REPO_LOC}" ;\
> -	    echo "repo --name=ovirt-org-source --baseurl=$(OVIRT_URL)/$${OVIRT_DISTRO}/src" ;\
> -	    echo "$${UPDATE_REPO_LINE}" ;\
> -	    echo "%packages --nobase" ;\
> -	    grep -v '^-' /usr/share/appliance-os/includes/base-pkgs.ks ;\
> -	    echo "ovirt-recipe" ;\
> -	    echo "lokkit" ;\
> -	    echo "%end" ;\
> -	) > $(SRC_KS)
> -
> -keys:
> -	if [ "$(_ovirt_dev)" = 1 -a -f $(AUTH_KEYS) ]; then \
> -	    cp -va $(AUTH_KEYS) ovirt-authorized_keys ;\
> -	fi
> -
> -SELINUX_ENFORCING=$(shell /usr/sbin/getenforce)
> -$(NVR).$(PKG_FMT): repos.ks keys
> -	mkdir -p $(APP_TMP)/tree
> -	mkdir -p $(OVIRT_CACHE_DIR)/yum-$(ARCH)
> -	( \
> -	    case $(SELINUX_ENFORCING) in \
> -	        Enforcing) sudo /usr/sbin/setenforce Permissive ;; \
> -	        Permissive) ;; \
> -	        *) if ksflatten $(PACKAGE).ks 2>/dev/null \
> -	               | grep -q '^selinux --disabled'; then \
> -	               echo WARNING: SELinux disabled in kickstart ;\
> -	           else \
> -	               echo ERROR: SELinux enabled in kickstart, \
> -	                   but disabled on the build machine ;\
> -	               exit 1 ;\
> -	           fi ;; \
> -	    esac ;\
> -	    if [ 0$(FEDORA) == 0$(CUR_RAWHIDE) ]; then \
> -	        FEDORA_TREE_URL="$(if $(FEDORA_URL),$(FEDORA_URL)/development/$(ARCH)/os,$(FEDORA_URL_DEF)/development/$(ARCH)/os)" ;\
> -	    else \
> -	        FEDORA_TREE_URL="$(if $(FEDORA_URL),$(FEDORA_URL)/releases/$(FEDORA)/Fedora/$(ARCH)/os,$(FEDORA_URL_DEF)/releases/$(FEDORA)/Fedora/$(ARCH)/os)" ;\
> -	    fi ;\
> -	    ./gettree.sh $${FEDORA_TREE_URL} $(APP_TMP)/tree ;\
> -	)
> -
> -	mkdir -p scripts
> -	cp -a create-$(PACKAGE) create-ovirt-network create-ovirt-nodes \
> -	    get-$(PACKAGE) $(PACKAGE)-functions scripts
> -
> -	ln -snf $(APP_TMP) tmp
> -	sudo su -c "export PATH=$(PATH):/sbin:/usr/sbin && \
> -	    appliance-creator --config $(PACKAGE).ks \
> -	    --name $(PACKAGE) -f $(DISK_FMT) -p $(PKG_FMT) -d -v \
> -	    --tmpdir='$(APP_TMP)' \
> -	    --cache='$(OVIRT_CACHE_DIR)/yum-$(ARCH)' \
> -	    --vmem=$(APP_RAM) \
> -	    -i scripts"
> -	sudo chown $${USER} $(PACKAGE).$(PKG_FMT)
> -	( \
> -	    if [ $(SELINUX_ENFORCING) = Enforcing ]; then \
> -	        sudo /usr/sbin/setenforce Enforcing || exit 1 ;\
> -	    fi \
> -	)
> -
> -	mv $(PACKAGE).$(PKG_FMT) $(NVR).$(PKG_FMT)
> -	rm -Rf scripts
> -
> -$(NVR).$(PKG_FMT).$(SUM): $(NVR).$(PKG_FMT)
> -	$(SUM) $(NVR).$(PKG_FMT) > $(NVR).$(PKG_FMT).$(SUM)
> -
> -appliance: $(NVR).$(PKG_FMT).$(SUM)
> -
> -PUNGI = $(APP_TMP)/tree/pungi
> -source: src.ks
> -	@sudo rm -Rf $(PUNGI)
> -	@mkdir -p $(PUNGI)
> -
> -	cd $(PUNGI) && \
> -	    sudo pungi -G --ver=$(PACKAGE) -c $(SRC_KS) \
> -	    --cachedir=$(OVIRT_CACHE_DIR)/yum-$(ARCH)
> -	if [ "$(SRC_FMT)" == "iso" ]; then \
> -	    cd $(PUNGI) && \
> -	        sudo pungi --sourceiso --ver=$(PACKAGE) -c $(SRC_KS) \
> -	        --cachedir=$(OVIRT_CACHE_DIR)/yum-$(ARCH) ;\
> -	    sudo mv $(PUNGI)/$(PACKAGE)/source/iso/Fedora-$(PACKAGE)-source.iso \
> -	        $(PWD)/$(PACKAGE)-source-$(VERSION).iso ;\
> -	elif [ "$(SRC_FMT)" == "tar" ]; then \
> -	    cd $(PUNGI)/$(PACKAGE)/source && \
> -	        sudo tar cf ovirt-source.tar SRPMS ;\
> -	    sudo mv $(PUNGI)/$(PACKAGE)/source/ovirt-source.tar \
> -	        $(PWD)/$(PACKAGE)-source-$(VERSION).tar ;\
> -	else \
> -	    echo "Invalid src format: $(SRC_FMT)" ;\
> -	    exit 1 ;\
> -	fi
> -	sudo sudo chown -R $(USER) $(PWD)/$(PACKAGE)-source-$(VERSION).$(SRC_FMT)
> -	sudo sudo chown -R $(USER) $(PUNGI)
> -	$(SUM) $(PWD)/$(PACKAGE)-source-$(VERSION).$(SRC_FMT) \
> -	    > $(PACKAGE)-source-$(VERSION).$(SRC_FMT).$(SUM)
> -
> -rpms: dist appliance
> -	rpmbuild $(RPM_FLAGS) -ta $(distdir).tar.gz
> -
> -srpms: dist
> -	rpmbuild $(RPM_FLAGS) -ts $(distdir).tar.gz
> -
> -publish: rpms
> -	mkdir -p $(OVIRT_CACHE_DIR)
> -	rsync -aq $(shell rpm --eval '%{_rpmdir}')/ $(OVIRT_CACHE_DIR)/ovirt/
> -	rsync -aq $(shell rpm --eval '%{_srcrpmdir}')/ $(OVIRT_CACHE_DIR)/ovirt/src/
> -	createrepo $(OVIRT_CACHE_DIR)/ovirt
> -
> -.PHONY: rpms publish srpms $(NVR).$(PKG_FMT).$(SUM) $(NVR).$(PKG_FMT) keys \
> -  repos.ks src.ks source
> diff --git a/autobuild.sh b/autobuild.sh
> deleted file mode 100755
> index cdb8d62..0000000
> --- a/autobuild.sh
> +++ /dev/null
> @@ -1,117 +0,0 @@
> -#!/bin/sh
> -#oVirt node image autobuild script
> -#
> -# Copyright (C) 2008 Red Hat, Inc.
> -#
> -# 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; version 2 of the License.
> -#
> -# 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., 51 Franklin Street, Fifth Floor, Boston,
> -# MA  02110-1301, USA.  A copy of the GNU General Public License is
> -# also available at http://www.gnu.org/copyleft/gpl.html.
> -
> -echo "Running oVirt Appliance Autobuild"
> -
> -set -e
> -set -v
> -
> -test -f Makefile && make -k distclean || :
> -
> -# setup parameters to ssh to appliance
> -SSHKEY=~/.ssh/id_autobuild
> -remote_target="root at 192.168.50.2"
> -ssh_cmd="ssh -i $SSHKEY -o StrictHostKeyChecking=no \
> -             -o UserKnownHostsFile=/dev/null $remote_target"
> -scp_cmd="scp -i $SSHKEY -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
> -
> -# generate new ssh key if not found
> -if [ ! -r $SSHKEY ]; then
> -  mkdir -p $(dirname "$SSHKEY")
> -  ssh-keygen -q -t rsa -N "" -f $SSHKEY
> -fi
> -
> -# implant ssh key in appliance
> -cat >> ovirt-appliance.ks << KS
> -%post
> -mkdir -p /root/.ssh
> -chmod 700 /root/.ssh
> -cat > /root/.ssh/authorized_keys << \EOF
> -$(ssh-keygen -y -f $SSHKEY)
> -EOF
> -chmod 600 /root/.ssh/authorized_keys
> -%end
> -KS
> -
> -# move sshd to start last (after ovirt*first-run scripts)
> -cat >> ovirt-appliance.ks << \KS
> -%post
> -rm -f /etc/rc3.d/S55sshd
> -ln -s /etc/init.d/sshd /etc/rc3.d/S99sshd
> -%end
> -KS
> -
> -export OVIRT_LOCAL_REPO=file://$AUTOBUILD_PACKAGE_ROOT/rpm/RPMS
> -
> -./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT
> -make dist
> -make appliance
> -
> -if [ -f /usr/bin/rpmbuild ]; then
> -  if [ -n "$AUTOBUILD_COUNTER" ]; then
> -    EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
> -  else
> -    NOW=`date +"%s"`
> -    EXTRA_RELEASE=".$USER$NOW"
> -  fi
> -
> -  rm -f $AUTOBUILD_PACKAGE_ROOT/rpm/RPMS/noarch/ovirt-appliance*
> -
> -  rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" \
> -           --define "ovirt_local_repo $OVIRT_LOCAL_REPO" \
> -           -ta --clean *.tar.gz
> -fi
> -
> -# if ovirt-appliance rpm is already installed, remove it
> -(rpm -q ovirt-appliance && sudo rpm -e ovirt-appliance) || :
> -
> -# install ovirt-appliance, create appliance
> -sudo rpm -ivh $AUTOBUILD_PACKAGE_ROOT/rpm/RPMS/noarch/ovirt-appliance*rpm
> -sudo /usr/sbin/get-ovirt-appliance -l `pwd` -p tar
> -sudo /usr/sbin/create-ovirt-network -f
> -sudo /usr/sbin/create-ovirt-nodes
> -sudo /usr/sbin/create-ovirt-appliance
> -sudo virsh start ovirt-appliance
> -sudo virsh start node3
> -
> -# wait till ovirt-appliance is started
> -for i in $(seq 1 60); do
> -  $ssh_cmd exit && break
> -  sleep 10
> -done
> -
> -# implant selenium test module (apache licensed)
> -#  into running appliance
> -SELENIUM_RB=/var/selenium/selenium.rb
> -if [ -f $SELENIUM_RB ]; then
> -  $scp_cmd $SELENIUM_RB $remote_target:/usr/share/ovirt-server/test/
> -else
> -  echo "$SELENIUM_RB not found, will not run interface tests"
> -fi
> -
> -# run server tests
> -echo "Running the server tests"
> -for i in $(seq 1 10); do
> -  $ssh_cmd "curl -i http://management.priv.ovirt.org/ovirt/ | \
> -             grep 'HTTP/1.1 200 OK'" && break
> -  sleep 10
> -done
> -
> -$ssh_cmd "cd /usr/share/ovirt-server && rake test"
> diff --git a/autogen.sh b/autogen.sh
> deleted file mode 100755
> index 6b0970f..0000000
> --- a/autogen.sh
> +++ /dev/null
> @@ -1,66 +0,0 @@
> -#!/bin/sh
> -# Run this to generate configure and Makefile
> -
> -srcdir=`dirname $0`
> -test -z "$srcdir" && srcdir=.
> -
> -THEDIR=`pwd`
> -(
> -  cd $srcdir
> -  die=0
> -
> -  (autoconf --version) < /dev/null > /dev/null 2>&1 || {
> -	  echo
> -	  echo "You must have autoconf installed."
> -	  echo "Download the appropriate package for your distribution,"
> -	  echo "or see http://www.gnu.org/software/autoconf"
> -	  die=1
> -  }
> -
> -  # Require libtool only if one of of LT_INIT,
> -  # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac.
> -  grep -E '^[[:blank:]]*(LT_INIT|A[CM]_PROG_LIBTOOL)' configure.ac >/dev/null \
> -      && {
> -    (libtool --version) < /dev/null > /dev/null 2>&1 || {
> -	  echo
> -	  echo "You must have libtool installed."
> -	  echo "Download the appropriate package for your distribution,"
> -	  echo "or see http://www.gnu.org/software/libtool"
> -	  die=1
> -    }
> -  }
> -
> -  (automake --version) < /dev/null > /dev/null 2>&1 || {
> -	  echo
> -	  die=1
> -	  echo "You must have automake installed."
> -	  echo "Download the appropriate package for your distribution,"
> -	  echo "or see http://www.gnu.org/software/automake"
> -  }
> -
> -  test $die = 1 && exit 1
> -
> -  test -f ovirt-appliance.spec.in || {
> -	  echo "You must run this script in the top-level directory"
> -	  exit 1
> -  }
> -
> -  if test -z "$*"; then
> -	  echo "I am going to run ./configure with no arguments - if you wish "
> -	  echo "to pass any to it, please specify them on the $0 command line."
> -  fi
> -
> -  aclocal
> -
> -  # Run autoheader only if needed
> -  grep '^[[:blank:]]*AC_CONFIG_HEADERS' configure.ac >/dev/null && autoheader
> -
> -  automake --add-missing
> -  autoconf
> -  ./configure "$@"
> -)
> -
> -if test "x$OBJ_DIR" != x; then
> -    mkdir -p "$OBJ_DIR"
> -    cd "$OBJ_DIR"
> -fi
> diff --git a/configure.ac b/configure.ac
> deleted file mode 100644
> index 001ece9..0000000
> --- a/configure.ac
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -AC_INIT([ovirt-appliance], [0.99], [ovirt-devel at redhat.com])
> -AM_INIT_AUTOMAKE([-Wall -Werror foreign tar-pax])
> -
> -AC_CONFIG_FILES([Makefile ovirt-appliance.spec])
> -AC_OUTPUT
> diff --git a/create-ovirt-appliance b/create-ovirt-appliance
> deleted file mode 100755
> index 1a1529f..0000000
> --- a/create-ovirt-appliance
> +++ /dev/null
> @@ -1,87 +0,0 @@
> -#!/bin/bash
> -#
> -# Create oVirt Appliance
> -# Copyright 2008 Red Hat, Inc.
> -# Written by Perry Myers <pmyers at redhat.com>
> -#
> -# 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; version 2 of the License.
> -#
> -# 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 Library 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.
> -
> -. $(dirname $0)/ovirt-appliance-functions
> -
> -usage() {
> -    case $# in 1) warn "$1"; try_h; exit 1;; esac
> -    cat <<EOF
> -Usage: $ME [-d image_dir] [-n name] [-c] [-f raw|qcow2]
> -  -d: directory to place virtual disk (default: $IMGDIR_DEFAULT)
> -  -n: appliance name (default: $NAME_DEFAULT)
> -  -c: open console when appliance is started
> -  -f: disk image format for appliance (default: $DISK_FMT_DEFAULT)
> -  -h: display this help and exit
> -EOF
> -}
> -
> -err=0 help=0
> -console=0
> -while getopts :d:n:cf:h c; do
> -    case $c in
> -        d) imgdir=$OPTARG;;
> -        n) name=$OPTARG;;
> -        c) console=1;;
> -        f) DISK_FMT=$OPTARG;;
> -        h) help=1;;
> -        '?') err=1; warn "invalid option: \`-$OPTARG'";;
> -        :) err=1; warn "missing argument to \`-$OPTARG' option";;
> -        *) err=1; warn "internal error: \`-$OPTARG' not handled";;
> -    esac
> -done
> -test $err = 1 && { try_h; exit 1; }
> -test $help = 1 && { usage; exit 0; }
> -
> -do_checks
> -
> -if virsh dumpxml $name > /dev/null 2>&1 ; then
> -    # If the appliance is already defined, abort since rewriting the appliance
> -    # will change network settings that break the appliance.
> -    echo "$name is already a defined virtual machine."
> -    die
> -fi
> -
> -mkdir -p $imgdir
> -
> -appdisk=$name/$name-sda.$DISK_FMT
> -datadisk=$name/$name-sdb.$DISK_FMT
> -
> -test ! -r $imgdir/$appdisk && die "Disk image not found at $imgdir/$appdisk"
> -test ! -r $imgdir/$datadisk && die "Disk image not found at $imgdir/$datadisk"
> -virsh destroy $name > /dev/null 2>&1
> -virsh undefine $name > /dev/null 2>&1
> -
> -virt-image -b $BRIDGENAME $imgdir/$name/$name.xml
> -# FIXME: virt-image doesn't do virtio so we have to kill the appliance, edit
> -# the libvirt xml and restart
> -virsh destroy $name > /dev/null 2>&1
> -TMPXML=$(mktemp) || exit 1
> -BR_XML="<source bridge='$BRIDGENAME'/>"
> -VNIC_XML="<model type='virtio'/>"
> -# FIXME: virtio disks won't boot presently, need to look into this
> -#    -e "s/bus='ide'/bus='virtio'/" \
> -#    -e "s/dev='hd\(.\)'/dev='vd\1'/" \
> -virsh dumpxml $name | sed -e "s^\($BR_XML\)^\1\n$VNIC_XML^" \
> -    > $TMPXML && \
> -    virsh define $TMPXML && \
> -    rm -f $TMPXML
> -
> -if [ $console = 1 ]; then
> -    virsh start $name && virsh console $name
> -fi
> diff --git a/create-ovirt-network b/create-ovirt-network
> deleted file mode 100755
> index 8fd3b88..0000000
> --- a/create-ovirt-network
> +++ /dev/null
> @@ -1,161 +0,0 @@
> -#!/bin/bash
> -
> -. $(dirname $0)/ovirt-appliance-functions
> -
> -usage() {
> -    case $# in 1) warn "$1"; try_h; exit 1;; esac
> -    cat <<EOF
> -Usage: $ME [-e eth] [-f]
> -  -e: ethernet device to use as bridge (i.e. eth1)
> -  -f: force install of networking
> -  -h: display this help and exit
> -EOF
> -}
> -
> -err=0 help=0
> -bridge=
> -while getopts :e:fh c; do
> -    case $c in
> -        e) bridge=$OPTARG;;
> -        f) force=1;;
> -        h) help=1;;
> -        '?') err=1; warn "invalid option: \`-$OPTARG'";;
> -        :) err=1; warn "missing argument to \`-$OPTARG' option";;
> -        *) err=1; warn "internal error: \`-$OPTARG' not handled";;
> -    esac
> -done
> -test $err = 1 && { try_h; exit 1; }
> -test $help = 1 && { usage; exit 0; }
> -
> -do_checks
> -check_net
> -
> -cleanup_old_nets
> -
> -net_debug
> -
> -# If we're bridging to a physical network, run some checks to make sure the
> -# choice of physical eth device is sane
> -if [ -n "$bridge" ]; then
> -    # Check to see if the physical device is present
> -    ifconfig $bridge > /dev/null 2>&1 ; bridge_dev_present=$?
> -    test $bridge_dev_present != 0 \
> -        && die "$bridge device not present, aborting!"
> -
> -    # Check to see if the eth device is already tied to a non oVirt bridge
> -    attached_bridge=$(brctl show \
> -        | awk -v BRIDGE=$bridge '$4~BRIDGE {print $1}')
> -    test -n "$attached_bridge" -a "$attached_bridge" != "$BRIDGENAME" \
> -        && die "$bridge already attached to other bridge $attached_bridge"
> -
> -    # Check to make sure that the system is not already using the interface
> -    if [[ $force != 1 && -f $NET_SCRIPTS/ifcfg-$bridge ]]; then
> -        echo "$NET_SCRIPTS/ifcfg-$bridge is present, are you sure you wish to"
> -        echo "overwrite this file? [y/N]? "
> -        read yesno
> -
> -        if [ "$yesno" != "y" -a "$yesno" != "Y" ]; then
> -            exit 2
> -        fi
> -    fi
> -fi
> -
> -# Remove old bridge device if it exists
> -sed -i "/# $BRIDGENAME/d" /etc/rc.d/rc.local
> -old_bridge=$(brctl show \
> -    | awk -v BRIDGENAME=$BRIDGENAME '$1==BRIDGENAME {print $4}')
> -if [ -n "$old_bridge" ]; then
> -    echo "Removing old bridge $old_bridge"
> -    ifconfig $old_bridge down
> -    brctl delif $BRIDGENAME $old_bridge
> -    rm -f $NET_SCRIPTS/ifcfg-$old_bridge
> -fi
> -
> -{
> -echo "Removing $BRIDGENAME"
> -virsh net-destroy $BRIDGENAME
> -virsh net-undefine $BRIDGENAME
> -ifconfig $BRIDGENAME down
> -brctl delbr $BRIDGENAME
> -rm -fv $NET_SCRIPTS/ifcfg-$BRIDGENAME
> -rm -fv /etc/sysconfig/iptables-$BRIDGENAME-filter
> -rm -fv /etc/sysconfig/iptables-$BRIDGENAME-nat
> -sed -i "/iptables-$BRIDGENAME/d" /etc/sysconfig/system-config-firewall
> -lokkit --update
> -echo "Done Removing $BRIDGENAME"
> -} 2> /dev/null
> -
> -lokkit -s dns
> -
> -if [ -n "$bridge" ]; then
> -    # real external bridge, use distro networking scripts
> -    ifconfig $bridge down 2> /dev/null
> -    TMPAUG=$(mktemp) || exit 1
> -    cat > $TMPAUG <<EOF
> -rm /files$NET_SCRIPTS/ifcfg-$bridge
> -set /files$NET_SCRIPTS/ifcfg-$bridge/DEVICE $bridge
> -set /files$NET_SCRIPTS/ifcfg-$bridge/ONBOOT yes
> -set /files$NET_SCRIPTS/ifcfg-$bridge/BRIDGE $BRIDGENAME
> -rm /files$NET_SCRIPTS/ifcfg-$BRIDGENAME
> -set /files$NET_SCRIPTS/ifcfg-$BRIDGENAME/DEVICE $BRIDGENAME
> -set /files$NET_SCRIPTS/ifcfg-$BRIDGENAME/BOOTPROTO static
> -set /files$NET_SCRIPTS/ifcfg-$BRIDGENAME/ONBOOT y
> -set /files$NET_SCRIPTS/ifcfg-$BRIDGENAME/TYPE Bridge
> -set /files$NET_SCRIPTS/ifcfg-$BRIDGENAME/PEERNTP yes
> -set /files$NET_SCRIPTS/ifcfg-$BRIDGENAME/IPADDR ${NETWORK%.*}.1
> -set /files$NET_SCRIPTS/ifcfg-$BRIDGENAME/NETMASK $NETMASK
> -set /files$NET_SCRIPTS/ifcfg-$BRIDGENAME/DELAY 0
> -save
> -EOF
> -    augtool < $TMPAUG
> -    ifup $BRIDGENAME
> -    ifup $bridge
> -
> -    cat > /etc/sysconfig/iptables-$BRIDGENAME-filter <<EOF
> --A FORWARD -m physdev --physdev-is-bridged -j ACCEPT
> --A FORWARD -d $NETWORK/$NETMASK -o $BRIDGENAME -m state --state RELATED,ESTABLISHED -j ACCEPT
> --A FORWARD -s $NETWORK/$NETMASK -i $BRIDGENAME -j ACCEPT
> --A FORWARD -i $BRIDGENAME -o $BRIDGENAME -j ACCEPT
> -EOF
> -
> -    cat > /etc/sysconfig/iptables-$BRIDGENAME-nat <<EOF
> --A POSTROUTING -s $NETWORK/$NETMASK -d ! $NETWORK/$NETMASK -j MASQUERADE
> -EOF
> -
> -    lokkit --custom-rules=ipv4:filter:/etc/sysconfig/iptables-$BRIDGENAME-filter
> -    lokkit --custom-rules=ipv4:nat:/etc/sysconfig/iptables-$BRIDGENAME-nat
> -else
> -    # internal bridge only, use libvirt networking
> -    TMPXML=$(mktemp) || exit 1
> -    gen_bridge > $TMPXML
> -    virsh net-define $TMPXML
> -    rm $TMPXML
> -    virsh net-start $BRIDGENAME
> -    virsh net-autostart $BRIDGENAME
> -fi
> -
> -# Set up ip-forwarding
> -sysctl -w net.ipv4.ip_forward=1
> -TMPAUG=$(mktemp) || exit 1
> -cat > $TMPAUG <<EOF
> -set /files/etc/sysctl.conf/net.ipv4.ip_forward 1
> -save
> -EOF
> -augtool < $TMPAUG
> -
> -# Set up dnsmasq on $BRIDGENAME just for DNS forwarding
> -cat <<EOF > /etc/dnsmasq.d/$BRIDGENAME.conf
> -bind-interfaces
> -interface=$BRIDGENAME
> -except-interface=lo
> -EOF
> -if ! grep "^conf-dir=/etc/dnsmasq.d" /etc/dnsmasq.conf > /dev/null 2>&1 ; then
> -    echo "conf-dir=/etc/dnsmasq.d" >> /etc/dnsmasq.conf
> -fi
> -chkconfig dnsmasq on
> -service dnsmasq restart
> -
> -service libvirtd restart
> -wait_for_service 'virsh connect' 10 2 || exit 1
> -
> -net_debug
> diff --git a/create-ovirt-nodes b/create-ovirt-nodes
> deleted file mode 100755
> index 0ac5fd0..0000000
> --- a/create-ovirt-nodes
> +++ /dev/null
> @@ -1,51 +0,0 @@
> -#!/bin/bash
> -#
> -# Create fake oVirt Nodes that PXE boot to the Appliance Server
> -# Copyright 2008 Red Hat, Inc.
> -# Written by Perry Myers <pmyers at redhat.com>
> -#
> -# 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; version 2 of the License.
> -#
> -# 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 Library 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.
> -
> -. $(dirname $0)/ovirt-appliance-functions
> -
> -usage() {
> -    case $# in 1) warn "$1"; try_h; exit 1;; esac
> -    cat <<EOF
> -Usage: $ME [-d image_dir]
> -  -d: directory to place virtual disk (default: $IMGDIR_DEFAULT)
> -  -h: display this help and exit
> -EOF
> -}
> -
> -err=0 help=0
> -while getopts :dh c; do
> -    case $c in
> -        d) imgdir=$OPTARG;;
> -        h) help=1;;
> -        '?') err=1; warn "invalid option: \`-$OPTARG'";;
> -        :) err=1; warn "missing argument to \`-$OPTARG' option";;
> -        *) err=1; warn "internal error: \`-$OPTARG' not handled";;
> -    esac
> -done
> -test $err = 1 && { try_h; exit 1; }
> -test $help = 1 && { usage; exit 0; }
> -
> -do_checks
> -
> -mkdir -p $imgdir
> -
> -# define the fake managed nodes we will use.
> -for i in `seq 3 5` ; do
> -    gen_fake_managed_node $i
> -done
> diff --git a/get-ovirt-appliance b/get-ovirt-appliance
> deleted file mode 100755
> index cafae24..0000000
> --- a/get-ovirt-appliance
> +++ /dev/null
> @@ -1,115 +0,0 @@
> -#!/bin/bash
> -#
> -# Install oVirt Appliance disk images from local directory or from
> -# remote URL
> -# Copyright 2008 Red Hat, Inc.
> -# Written by Perry Myers <pmyers at redhat.com>
> -#
> -# 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; version 2 of the License.
> -#
> -# 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 Library 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.
> -
> -. $(dirname $0)/ovirt-appliance-functions
> -
> -usage() {
> -    case $# in 1) warn "$1"; try_h; exit 1;; esac
> -    cat <<EOF
> -Usage: $ME [-d image_dir] [-n name] [-l appliance location] [-p tar|tar.gz|tar.bz2] [-f raw|qcow2]
> -  -d: directory to place virtual disk (default: $IMGDIR_DEFAULT)
> -  -n: appliance name (default: $NAME_DEFAULT)
> -  -l: directory or url to get appliance archive and checksum files (default: $OVIRT_URL)
> -      this can either be http:// url or relative/absolute path
> -  -p: package format for appliance (default: $PKG_FMT_DEFAULT)
> -  -f: disk image format for appliance (default: $DISK_FMT_DEFAULT)
> -  -h: display this help and exit
> -EOF
> -}
> -
> -err=0 help=0
> -app_loc=$OVIRT_URL
> -while getopts :d:n:l:p:f:h c; do
> -    case $c in
> -        d) imgdir=$OPTARG;;
> -        n) name=$OPTARG;;
> -        l) app_loc=$OPTARG;;
> -        p) PKG_FMT=$OPTARG;;
> -        f) DISK_FMT=$OPTARG;;
> -        h) help=1;;
> -        '?') err=1; warn "invalid option: \`-$OPTARG'";;
> -        :) err=1; warn "missing argument to \`-$OPTARG' option";;
> -        *) err=1; warn "internal error: \`-$OPTARG' not handled";;
> -    esac
> -done
> -test $err = 1 && { try_h; exit 1; }
> -test $help = 1 && { usage; exit 0; }
> -
> -do_checks
> -
> -pkgfile=$name-$version-$(uname -i).$PKG_FMT
> -sumfile=$pkgfile.$SUM
> -
> -if echo $app_loc | grep "^http://" > /dev/null 2>&1 ; then
> -    echo "Using http at $app_loc to retrieve appliance"
> -
> -    if verify_sum $pkgfile $sumfile ; then
> -        app_loc=$(pwd)
> -    else
> -        wget -c $app_loc/$sumfile || die "error downloading $app_loc/$sumfile"
> -        wget -c $app_loc/$pkgfile || die "error downloading $app_loc/$pkgfile"
> -        if verify_sum $pkgfile $sumfile ; then
> -            app_loc=$(pwd)
> -        else
> -            die "appliance files not available, aborting"
> -        fi
> -   fi
> -else
> -    echo "Using local files in $app_loc for appliance"
> -
> -    if [ -d $app_loc ]; then
> -        if ! verify_sum $app_loc/$pkgfile $app_loc/$sumfile ; then
> -            die "appliance files not available, aborting"
> -        fi
> -    elif [ -f $app_loc -a -f $app_loc.$SUM ]; then
> -        if ! verify_sum $app_loc $app_loc.$SUM ; then
> -            die "appliance files not available, aborting"
> -        fi
> -    fi
> -fi
> -
> -mkdir -p $imgdir
> -
> -appdisk=$name/$name-sda.$DISK_FMT
> -datadisk=$name/$name-sdb.$DISK_FMT
> -
> -case $PKG_FMT in
> -    tar.bz2)
> -        tar -jSxvf $app_loc/$pkgfile -C $imgdir
> -        ;;
> -    tar.gz)
> -        tar -zSxvf $app_loc/$pkgfile -C $imgdir
> -        ;;
> -    tar)
> -        tar -xSvf $app_loc/$pkgfile -C $imgdir
> -        ;;
> -    *)
> -        die "$PKG_FMT is unsupported"
> -        ;;
> -esac
> -
> -test ! -r $imgdir/$appdisk && die "Disk image not found at $imgdir/$appdisk"
> -test ! -r $imgdir/$datadisk && die "Disk image not found at $imgdir/$datadisk"
> -
> -virsh destroy $name > /dev/null 2>&1
> -virsh undefine $name > /dev/null 2>&1
> -
> -echo "Appliance Disks installed to $imgdir"
> -echo "Run create-ovirt-appliance to define and start the appliance"
> diff --git a/gettree.sh b/gettree.sh
> deleted file mode 100755
> index 477b4bf..0000000
> --- a/gettree.sh
> +++ /dev/null
> @@ -1,77 +0,0 @@
> -#!/bin/bash
> -
> -# gettree.sh <Fedora release URL>
> -#   Fedora release URL - Fedora base URL
> -#     e.g. http://download.fedoraproject.org/pub/fedora/linux/releases/9/Fedora/x86_64/os
> -#   download minimal Fedora tree: .treeinfo stage2 initrd and kernel
> -
> -# Requires: wget
> -# Requires: python-iniparse
> -# Requires: createrepo
> -
> -# download $destination $URL [$alternative1 ...]
> -# attempt to download from a list of URLs until it succeeds
> -download() {
> -    local destination=$1
> -    shift
> -    local files="$@"
> -    set +e
> -    rc=0
> -    for f in $files; do
> -        case $f in
> -            file://*) cp "${f#file://}" "$destination" ;;
> -            *) wget --directory-prefix="$destination" \
> -                     --progress=dot:mega --continue "$f" ;;
> -        esac
> -        rc=$?
> -        if [ $rc == 0 ]; then
> -            printf "."
> -            break
> -        fi
> -    done
> -    set -e
> -    return $rc
> -}
> -
> -if [[ $# < 2 ]]; then
> -    cat >&2 << EOF
> -Usage: $(basename "$0") <Fedora release URL> <dest_dir>
> -EOF
> -    exit 1
> -fi
> -
> -url=$1
> -dest=$2
> -
> -printf "Downloading minimal Fedora install tree from $url"
> -set -e
> -download "$dest" $url/.treeinfo
> -python -c 'from iniparse import INIConfig
> -ini = INIConfig(open("'"$dest/"'.treeinfo"))
> -family = ini.general.family
> -version = ini.general.version
> -arch = ini.general.arch
> -kernel = ini["images-"+arch].kernel
> -initrd = ini["images-"+arch].initrd
> -stage2 = ini.stage2.mainimage
> -print "%s %s %s %s %s %s" % (family, version, arch, kernel, initrd, stage2)' | \
> -(
> -read os ver arch kernel initrd stage2
> -echo $os $ver $arch > "$dest/.treeinfo.ova"
> -mkdir -p "$dest/Packages"
> -download "$dest/Packages" "$url/Packages/basesystem-8.1-1.noarch.rpm" \
> -                          "$url/Packages/basesystem-10.0-1.noarch.rpm"
> -download "$dest/Packages" "$url/Packages/kernel-headers-2.6.27.5-117.fc10.$arch.rpm" \
> -                          "$url/Packages/kernel-headers-2.6.28-3.fc11.$arch.rpm"
> -createrepo "$dest"
> -dir="$dest/$(dirname $stage2)"
> -mkdir -p "$dir"
> -download "$dir" "$url/$stage2"
> -dir="$dest/$(dirname $kernel)"
> -mkdir -p "$dir"
> -download "$dir" "$url/$kernel"
> -dir="$dest/$(dirname $initrd)"
> -mkdir -p "$dir"
> -download "$dir" "$url/$initrd"
> -)
> -echo "done"
> diff --git a/ovirt-appliance-functions b/ovirt-appliance-functions
> deleted file mode 100644
> index c1d9a15..0000000
> --- a/ovirt-appliance-functions
> +++ /dev/null
> @@ -1,219 +0,0 @@
> -# -*-Shell-script-*-
> -#
> -# Common functions for the oVirt Appliance scripts
> -# Copyright 2008 Red Hat, Inc.
> -# Written by Perry Myers <pmyers at redhat.com>
> -#
> -# 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; version 2 of the License.
> -#
> -# 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 Library 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.
> -
> -PATH=$PATH:/sbin:/usr/sbin
> -
> -ME=$(basename "$0")
> -warn() { printf '%s: %s\n' "$ME" "$*" >&2; }
> -try_h() { printf "Try \`$ME -h' for more information.\n" >&2; }
> -die() { warn "$@"; try_h; exit 1; }
> -
> -IMGDIR_DEFAULT=/var/lib/libvirt/images
> -NAME_DEFAULT=ovirt-appliance
> -NET_SCRIPTS=/etc/sysconfig/network-scripts
> -
> -BRIDGENAME=ovirtbr0
> -NETWORK=192.168.50.0
> -NETMASK=255.255.255.0
> -
> -PKG_FMT_DEFAULT=tar.bz2
> -PKG_FMT=$PKG_FMT_DEFAULT
> -SUM=sha1sum
> -
> -DISK_FMT_DEFAULT=qcow2
> -DISK_FMT=$DISK_FMT_DEFAULT
> -OVIRT_URL=http://ovirt.org/download
> -
> -NODE_DISK_FMT=qcow2
> -NODE_DISK_SIZE=6144M
> -
> -imgdir=$IMGDIR_DEFAULT
> -name=$NAME_DEFAULT
> -
> -force=0
> -
> -do_checks() {
> -    # first, check to see we are root
> -    if [ $( id -u ) -ne 0 ]; then
> -        die "Must run as root"
> -    fi
> -
> -    test "$PKG_FMT" = "tar" -o "$PKG_FMT" = "tar.gz" \
> -        -o "$PKG_FMT" = "tar.bz2" \
> -        || die "$PKG_FMT is not a supported package format"
> -
> -    test "$DISK_FMT" = "qcow2" -o "$DISK_FMT" = "raw" \
> -        || die "$DISK_FMT is not a supported disk format"
> -
> -    # now make sure the packages we need are installed
> -    if [ -e /etc/redhat-release ]; then
> -        # We rely on RPM deps for this in Red Hat/Fedora systems
> -        CHECK=0
> -        KVM_BINARY=/usr/bin/qemu-kvm
> -        version=$(rpm -q --qf '%{version}' ovirt-appliance)
> -    elif [ -e /etc/debian_version ]; then
> -        # Works in Ubuntu 8.04. Still needs testing in Debian
> -        PACKAGES="libvirt0 libvirt-bin kvm qemu"
> -        CHECK=$(dpkg -l $PACKAGES &> /dev/null; echo $?)
> -        KVM_BINARY=/usr/bin/kvm
> -        version=LATEST
> -    else
> -        die "Not a supported system"
> -    fi
> -
> -    if [ $CHECK -ne 0 ]; then
> -        # one of the previous packages wasn't installed; bail out
> -        die "Must have the $PACKAGES packages installed"
> -    fi
> -
> -    service iptables status > /dev/null 2>&1 \
> -        || service iptables start > /dev/null 2>&1
> -    chkconfig iptables on
> -
> -    service libvirtd status > /dev/null 2>&1 \
> -        || service libvirtd start > /dev/null 2>&1
> -    chkconfig libvirtd on
> -}
> -
> -check_net() {
> -    service NetworkManager status > /dev/null 2>&1 ; netman_status=$?
> -    if [ $netman_status -eq 0 ]; then
> -        if [ $force -ne 1 ]; then
> -            die "NetworkManager is running, disable and use standard network scripts before proceeding"
> -        elif [ -n "$bridge" ]; then
> -            echo "WARNING!  NetworkManager running and bridge ($bridge) specified"
> -            echo "WARNING!  This combination will most likely not work."
> -        fi
> -    fi
> -}
> -
> -gen_bridge() {
> -    cat << EOF
> -<network>
> -  <name>$BRIDGENAME</name>
> -  <bridge name="$BRIDGENAME" stp="off" forwardDelay="0" />
> -  <forward/>
> -  <ip address="${NETWORK%.*}.1" netmask="$NETMASK"/>
> -</network>
> -EOF
> -}
> -
> -gen_fake_managed_node() {
> -    local num=$1
> -    local last_mac=$(( 54 + $num ))
> -
> -    echo "Creating fake node$num..."
> -    virsh destroy node$num > /dev/null 2>&1
> -    virsh undefine node$num > /dev/null 2>&1
> -    rm -f $imgdir/node${i}-sda.$NODE_DISK_FMT
> -    qemu-img create -f $NODE_DISK_FMT $imgdir/node${i}-sda.$NODE_DISK_FMT \
> -        $NODE_DISK_SIZE
> -    # FIXME: virt-install should be changed to have a --nostart parameter
> -    # that just defines the VM w/o starting it.
> -    virt-install --name=node$num --ram=512 --vcpus=1 \
> -        --disk path=$imgdir/node${i}-sda.$NODE_DISK_FMT \
> -        --network=bridge:$BRIDGENAME --mac=00:16:3e:12:34:$last_mac \
> -        --vnc --accelerate --hvm --noautoconsole \
> -        --os-type=linux --os-variant=fedora10 \
> -        --force --noreboot --pxe
> -    virsh destroy node$num > /dev/null 2>&1
> -    # FIXME: virt-install should be changed to allow network boot
> -    # to be a permanent selection
> -    TMPXML=$(mktemp) || exit 1
> -    virsh dumpxml node$num | sed "s/boot dev='.*'/boot dev='network'/" > $TMPXML
> -    virsh define $TMPXML
> -    rm -f $TMPXML
> -    echo "node$num created"
> -}
> -
> -net_debug() {
> -    # Some output for debugging problems
> -    echo "Currently active bridges:"
> -    echo "-------------------------"
> -    brctl show
> -    echo
> -    echo "Currently defined libvirt networks:"
> -    echo "-----------------------------------"
> -    virsh net-list --all
> -    echo
> -}
> -
> -cleanup_old_apps() {
> -    # Cleanup to handle older version of script that used these domain names
> -    virsh destroy developer
> -    virsh undefine developer
> -    virsh destroy bundled
> -    virsh undefine bundled
> -} > /dev/null 2>&1
> -
> -cleanup_old_nets() {
> -    # Cleanup to handle older version of script that used these bridge names
> -    virsh net-destroy dummybridge
> -    virsh net-undefine dummybridge
> -    brctl delif eth1bridge eth1
> -    virsh net-destroy eth1bridge
> -    virsh net-undefine eth1bridge
> -    old_bridge=$(brctl show \
> -        | awk -v BRIDGENAME=ovirtbr '$1==BRIDGENAME {print $4}')
> -    if [ -n "$old_bridge" ]; then
> -        ifconfig $old_bridge down
> -    fi
> -    brctl delif ovirtbr $old_bridge
> -    virsh net-destroy ovirtbr
> -    virsh net-undefine ovirtbr
> -    sed -i "/# ovirtbr$/d" /etc/rc.d/rc.local
> -} > /dev/null 2>&1
> -
> -verify_sum() {
> -    local pkgfile=$1
> -    local sumfile=$2
> -
> -    test ! -f $sumfile && { echo "$sumfile not found" ; return 1 ; }
> -    test ! -f $pkgfile && { echo "$pkgfile not found" ; return 1 ; }
> -
> -    echo "performing checksum of $pkgfile"
> -    local actual_sum=$($SUM $pkgfile | awk '{print $1}')
> -    local expect_sum=$(awk '{print $1}' $sumfile)
> -
> -    if [ "$actual_sum" = "$expect_sum" ]; then
> -        echo "checksum verified"
> -        return 0
> -    else
> -        echo "checksum failed"
> -        return 1
> -    fi
> -}
> -
> -# wait_for_service 'test command' max_retries seconds_to_sleep_between_retries
> -wait_for_service() {
> -  local testcmd=$1; shift
> -  local n_retries=$1; shift
> -  local sleep_seconds=$1; shift
> -  local total=$((n_retries*sleep_seconds))
> -
> -  while [ $n_retries -gt 0 ]
> -  do
> -    eval "$testcmd" > /dev/null 2>&1 && return 0
> -    echo service not ready yet, retrying...
> -    n_retries=$((n_retries-1))
> -    sleep $sleep_seconds
> -  done
> -  printf 'service not ready after %d seconds, giving up\n' $total 1>&2
> -  return 1
> -}
> diff --git a/ovirt-appliance.ks b/ovirt-appliance.ks
> deleted file mode 100644
> index 202babc..0000000
> --- a/ovirt-appliance.ks
> +++ /dev/null
> @@ -1,119 +0,0 @@
> -install
> -
> -lang en_US.UTF-8
> -keyboard us
> -network --device=eth0 --bootproto=static --ip=192.168.50.2 --netmask=255.255.255.0 --onboot=on --nameserver=192.168.50.1 --gateway=192.168.50.1
> -# Root password is 'ovirt'
> -rootpw --iscrypted Xa8QeYfWrtscM
> -firewall --disabled
> -authconfig --enableshadow --enablemd5
> -selinux --disabled
> -# NOTE: ntp/ntpdate need to stay in this list to ensure that time on the
> -# appliance is correct prior to the ovirt-server-installer being run.  Otherwise you
> -# get Kerberos errors
> -services --disabled=libvirtd,postgresql --enabled=network,tgtd,nfs,iptables,ntpdate,ntpd,ace,acpid
> -timezone --utc UTC
> -text
> -
> -bootloader --location=mbr --driveorder=sda,sdb --append="console=tty0 console=ttyS0,115200"
> -zerombr
> -clearpart --all --drives=sda,sdb
> -part /boot  --ondisk=sda --fstype=ext3 --size=100
> -part /      --ondisk=sda --fstype=ext3 --size=5000
> -part swap   --ondisk=sda --fstype=swap --size=512
> -part /mnt/data --ondisk=sdb --fstype=ext3 --size=20000
> -reboot
> -
> -%include repos.ks
> -
> -%packages --excludedocs --nobase
> -%include /usr/share/appliance-os/includes/base-pkgs.ks
> -openssh-clients
> -openssh-server
> -nfs-utils
> -collectd
> -collectd-rrdtool
> -ipa-server
> -ipa-admintools
> -scsi-target-utils
> -iscsi-initiator-utils
> -augeas
> -syslinux
> -curl
> -bind-utils
> -libvirt-python
> -rhpl
> -cobbler
> -# Stupid yum dep solver pulls in older 'qemu' to resolve
> -# /usr/bin/qemu-img dep. This forces it to pick the new
> -# qemu-img RPM.
> -qemu-img
> -ovirt-release
> -ovirt-node-image
> -ovirt-server
> -ovirt-server-installer
> -lokkit
> -
> -%post
> -  # cleanup rpmdb to allow non-matching host and chroot RPM versions
> -  rm -f /var/lib/rpm/__db*
> -
> -  # set up serial console
> -  sed -i 's/hiddenmenu/hiddenmenu\nserial --unit=0 --speed=115200\nterminal --timeout=5 serial console/' /boot/grub/grub.conf
> -
> -  # The ace stuff.
> -  mkdir /etc/sysconfig/ace
> -  echo ovirt-appliance >> /etc/sysconfig/ace/appliancename
> -%end
> -
> -%post
> -  # Create initial manifests
> -  manifests=/tmp/manifests
> -  mkdir -p $manifests
> -  rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
> -      > $manifests/rpm-manifest.txt
> -  rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest.txt
> -  du -akx --exclude=/var/cache/yum / > $manifests/file-manifest.txt
> -  du -x --exclude=/var/cache/yum / > $manifests/dir-manifest.txt
> -%end
> -
> -%post --nochroot
> -  if [ -f "ovirt-authorized_keys" ]; then
> -    echo "Adding authorized_keys to Image"
> -    mkdir -p $INSTALL_ROOT/root/.ssh
> -    cp -v ovirt-authorized_keys $INSTALL_ROOT/root/.ssh/authorized_keys
> -    chown -R root:root $INSTALL_ROOT/root/.ssh
> -    chmod 755 $INSTALL_ROOT/root/.ssh
> -    chmod 644 $INSTALL_ROOT/root/.ssh/authorized_keys
> -  fi
> -
> -  set -e
> -  cat tmp/tree/.treeinfo.ova | ( read os ver arch
> -      dest=$INSTALL_ROOT/var/www/cobbler/ks_mirror/$os-$ver-$arch
> -      printf "Importing $os-$ver-$arch ..."
> -      cp -a tmp/tree "$dest"
> -  )
> -%end
> -
> -%post
> -  # Create post-image processing manifests
> -  manifests=/tmp/manifests
> -  mkdir -p $manifests
> -  rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}\n' | sort \
> -      > $manifests/rpm-manifest-post.txt
> -  rpm -qa --qf '%{sourcerpm}\n' | sort -u > $manifests/srpm-manifest-post.txt
> -  du -akx --exclude=/var/cache/yum / > $manifests/file-manifest-post.txt
> -  du -x --exclude=/var/cache/yum / > $manifests/dir-manifest-post.txt
> -
> -  ver=$(rpm -q --qf '%{version}' ovirt-server-installer)
> -  rel=$(rpm -q --qf '%{release}' ovirt-server-installer)
> -  arch=$(rpm -q --qf '%{arch}' ovirt-server-installer)
> -  echo "oVirt Appliance release $ver-$rel-$arch" > $manifests/ovirt-release
> -  tar -cvf ovirt-appliance-manifests-$ver-$rel.$arch.tar -C /tmp manifests
> -  rm -Rf $manifests
> -%end
> -
> -%post --nochroot
> -  # Move manifest tar to build directory
> -  mv $INSTALL_ROOT/ovirt-appliance-manifests-*.tar .
> -%end
> diff --git a/ovirt-appliance.spec.in b/ovirt-appliance.spec.in
> deleted file mode 100644
> index 8bb32f2..0000000
> --- a/ovirt-appliance.spec.in
> +++ /dev/null
> @@ -1,69 +0,0 @@
> -Summary: oVirt Appliance
> -Name: ovirt-appliance
> -Version: @VERSION@
> -Release: 0%{?dist}%{?extra_release}
> -Source0: %{name}-%{version}.tar.gz
> -License: GPLv2+
> -Group: Applications/System
> -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
> -BuildArch: noarch
> -URL: http://ovirt.org/
> -# FIXME: libvirt and kvm require ovirt specific patches presently due to
> -# the fact that migration has not been fixed upstream.  Once upstream migration
> -# is fixed, these Requires should be fixed.
> -Requires: libvirt >= 0.4.6-2
> -Requires: kvm >= 78-4
> -Requires: qemu-img
> -Requires: augeas
> -Requires: virt-viewer-plugin
> -Requires: python-virtinst >= 0.400
> -Requires: wget
> -
> -%define app_root %{_datadir}/%{name}
> -
> -#  disable debuginfo, makes no sense for appliance and it is created empty anyway
> -%define debug_package %{nil}
> -
> -%description
> -The oVirt Appliance scripts to install on a Fedora Host
> -
> -%prep
> -%setup -q
> -
> -%build
> -
> -%install
> -%{__rm} -rf %{buildroot}
> -mkdir %{buildroot}
> -
> -%{__install} -d -m0755 %{buildroot}%{app_root}
> -%{__install} -p -m0644 COPYING %{buildroot}%{app_root}
> -%{__install} -d -m0755 %{buildroot}%{_sbindir}
> -%{__install} -p -m0755 create-%{name} %{buildroot}%{_sbindir}
> -%{__install} -p -m0755 create-ovirt-network %{buildroot}%{_sbindir}
> -%{__install} -p -m0755 create-ovirt-nodes %{buildroot}%{_sbindir}
> -%{__install} -p -m0755 get-%{name} %{buildroot}%{_sbindir}
> -%{__install} -p -m0644 %{name}-functions %{buildroot}%{_sbindir}
> -
> -%clean
> -%{__rm} -rf %{buildroot}
> -
> -%files
> -%defattr(-,root,root,0644)
> -%{app_root}/COPYING
> -%defattr(-,root,root,0755)
> -%{_sbindir}/create-%{name}
> -%{_sbindir}/create-ovirt-network
> -%{_sbindir}/create-ovirt-nodes
> -%{_sbindir}/get-%{name}
> -%defattr(-,root,root,0644)
> -%{_sbindir}/%{name}-functions
> -
> -%changelog
> -* Wed Nov 05 2008 Perry Myers <pmyers at redhat.com> 0.96
> -- Removed appliance building from rpm.  RPM now just contains tools to
> -  download image and install it
> -* Sun Sep 14 2008 Perry Myers <pmyers at redhat.com> 0.92-1
> -- Added Requires on libvirt/kvm
> -* Fri Sep 05 2008 Perry Myers <pmyers at redhat.com> 0.92-1
> -- Initial build.
>   
ack, works for me




More information about the ovirt-devel mailing list