virt-manager/autobuild.sh
Gene Czarcinski d5d146aad1 make autobuild.sh work
There a some problems with autobuild.sh and this patch addresses
them:

1. "python setup.py install" needs to use --root= instead
of --prefix=

2. For the rpmbuild, use dist/*.tar.gz instead of *.tar.gz

3. Add "export AUTOBUILD_OVERRIDE_VERSION=y" so that if
the version-id changes are applied, a simpler version-id
is used for autobuild.

4. Assume tests are fixed and enable running
"python setup.py test"
.
Signed-off-by: Gene Czarcinski <gene@czarc.net>
2013-04-10 17:49:18 -04:00

33 lines
702 B
Bash
Executable File

#!/bin/sh
set -v
set -e
if [ -z "$AUTOBUILD_INSTALL_ROOT" ] ; then
echo "This script is only meant to be used with an autobuild server."
echo "Please see INSTALL for build instructions."
exit 1
fi
rm -rf MANIFEST dist/*
# support version-id changes
export AUTOBUILD_OVERRIDE_VERSION=y
python setup.py sdist
python setup.py build
python setup.py test
python setup.py install --root=$AUTOBUILD_INSTALL_ROOT
which /usr/bin/rpmbuild > /dev/null 2>&1 || exit 0
if [ -n "$AUTOBUILD_COUNTER" ]; then
EXTRA_RELEASE=".auto$AUTOBUILD_COUNTER"
else
NOW=`date +"%s"`
EXTRA_RELEASE=".$USER$NOW"
fi
rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean dist/*.tar.gz