--- autobuild.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ autogen.sh | 1 + 2 files changed, 44 insertions(+), 0 deletions(-) create mode 100755 autobuild.sh diff --git a/autobuild.sh b/autobuild.sh new file mode 100755 index 0000000..a1a1fd0 --- /dev/null +++ b/autobuild.sh @@ -0,0 +1,43 @@ +#!/bin/sh +#oVirt node 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 Node Autobuild" + +set -e +set -v + +test -f Makefile && make -k distclean || : + +./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT +make +make install + +rm -f *.tar.gz +make dist + +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 + rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean *.tar.gz +fi diff --git a/autogen.sh b/autogen.sh index 85352f0..b8828fe 100755 --- a/autogen.sh +++ b/autogen.sh @@ -49,6 +49,7 @@ THEDIR=`pwd` autoheader automake --add-missing autoconf + ./configure "$@" ) if test "x$OBJ_DIR" != x; then -- 1.5.4.1
--- autobuild.sh | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) create mode 100755 autobuild.sh diff --git a/autobuild.sh b/autobuild.sh new file mode 100755 index 0000000..b8290a0 --- /dev/null +++ b/autobuild.sh @@ -0,0 +1,42 @@ +#!/bin/sh +#oVirt release 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 Release Autobuild" + +set -e +set -v + +test -f Makefile && make -k distclean || : + +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 + # manually copy files over until we have an autotools + # generated tarball to base rpmbuild on + cp version $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/ + cp ovirt.repo $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/ + cp ovirt.mk $AUTOBUILD_PACKAGE_ROOT/rpm/SOURCES/ + + rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ba --clean ovirt-release.spec +fi -- 1.5.4.1
Mohammed Morsi wrote:> diff --git a/autogen.sh b/autogen.sh > index 85352f0..b8828fe 100755 > --- a/autogen.sh > +++ b/autogen.sh > @@ -49,6 +49,7 @@ THEDIR=`pwd` > autoheader > automake --add-missing > autoconf > + ./configure "$@" > )Dunno anything about autobuild.sh, so I'll skip that for now. For autogen.sh, we might want to follow the pattern of libvirt; the reason (I believe) is so that you can build into a different subdirectory. The pattern is basically: srcdir=`dirname $0` test -z "$srcdir" && srcdir=. THEDIR=`pwd` cd $srcdir ... automake autoconf cd $THEDIR $srcdir/configure "$@" && { echo echo "Now type 'make' to compile libvirt." I'll ACK a patch that does essentially that. -- Chris Lalancette
Mohammed Morsi <mmorsi at redhat.com> wrote:> --- > autobuild.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ > autogen.sh | 1 + > 2 files changed, 44 insertions(+), 0 deletions(-) > create mode 100755 autobuild.sh > > diff --git a/autobuild.sh b/autobuild.sh > new file mode 100755 > index 0000000..a1a1fd0 > --- /dev/null > +++ b/autobuild.sh > @@ -0,0 +1,43 @@ > +#!/bin/sh > +#oVirt node 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 Node Autobuild" > + > +set -e > +set -v > + > +test -f Makefile && make -k distclean || : > + > +./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT > +make > +make install > + > +rm -f *.tar.gz > +make dist > + > +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 > + rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean *.tar.gz > +fi > diff --git a/autogen.sh b/autogen.sh > index 85352f0..b8828fe 100755 > --- a/autogen.sh > +++ b/autogen.sh > @@ -49,6 +49,7 @@ THEDIR=`pwd` > autoheader > automake --add-missing > autoconf > + ./configure "$@" > ) > > if test "x$OBJ_DIR" != x; thenACK In fact, all three of these new autobuild.sh files look fine. The only thing is that they're so alike. Eventually (once a few more packages have been autoconfiscated), I expect we'll want them to be identical, no? Thanks for adding the ./configure.
On Wed, Sep 10, 2008 at 02:30:47PM -0400, Mohammed Morsi wrote:> --- > autobuild.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ > autogen.sh | 1 + > 2 files changed, 44 insertions(+), 0 deletions(-) > create mode 100755 autobuild.sh> > diff --git a/autobuild.sh b/autobuild.sh > new file mode 100755 > index 0000000..a1a1fd0 > --- /dev/null > +++ b/autobuild.sh > @@ -0,0 +1,43 @@ > +#!/bin/sh > +#oVirt node 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 Node Autobuild" > + > +set -e > +set -v > + > +test -f Makefile && make -k distclean || : > + > +./autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT > +make > +make install > + > +rm -f *.tar.gz > +make dist > + > +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 > + rpmbuild --nodeps --define "extra_release $EXTRA_RELEASE" -ta --clean *.tar.gzYou're missing the corresponding change in the specfile to actually do something with the extra_release, eg change Release: %(echo `awk '{ print $2 }' %{SOURCE1}`)%{?dist} to Release: %(echo `awk '{ print $2 }' %{SOURCE1}`)%{?dist}%{?extra_release} ACK to all these autobuild.sh files though. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|