From 622b4478a3d4cc9a5b6a6eaa7b9c6a8e5cb6cb94 Mon Sep 17 00:00:00 2001 From: cdfrey Date: Wed, 28 Feb 2007 21:32:33 +0000 Subject: [PATCH] - added initial release maintainer scripts --- ChangeLog | 1 + maintainer/README | 3 +++ maintainer/make-release-tar.sh | 38 ++++++++++++++++++++++++++++++++++++++ maintainer/release-root.sh | 16 ++++++++++++++++ maintainer/release.sh | 27 +++++++++++++++++++++++++++ maintainer/test-build-local.sh | 40 ++++++++++++++++++++++++++++++++++++++++ maintainer/test-build.sh | 27 +++++++++++++++++++++++++++ 7 files changed, 152 insertions(+) create mode 100644 maintainer/README create mode 100755 maintainer/make-release-tar.sh create mode 100755 maintainer/release-root.sh create mode 100755 maintainer/release.sh create mode 100755 maintainer/test-build-local.sh create mode 100755 maintainer/test-build.sh diff --git a/ChangeLog b/ChangeLog index 252cf21d..818a9dbb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ Release: version 0.6 - 2007/02/?? ------------------------------------------------------------------------------ 2007/02/28 - fixed size checks for device database records larger than 64K + - added initial release maintainer scripts 2007/02/23 - changed library behaviour so it only turns on libusb debug output if in data dump mode. In btool, -v controls this output. diff --git a/maintainer/README b/maintainer/README new file mode 100644 index 00000000..6160cbd0 --- /dev/null +++ b/maintainer/README @@ -0,0 +1,3 @@ +Most of the build or test build scripts in this directory assume a system +with a number of chroot installs, in the directory /var/chroot. + diff --git a/maintainer/make-release-tar.sh b/maintainer/make-release-tar.sh new file mode 100755 index 00000000..3a3b0f05 --- /dev/null +++ b/maintainer/make-release-tar.sh @@ -0,0 +1,38 @@ +#!/bin/sh + +if [ -z "$CVSROOT" ] ; then + CVSROOT=":ext:ndprojects@barry.cvs.sourceforge.net:/cvsroot/barry" +fi +if [ -z "$CVSREP" ] ; then + CVSREP="barry" +fi + +echo +echo "Pulling from: $CVSROOT" +echo "Using directory: $CVSREP" + +if [ -z "$1" -o -z "$2" ] ; then + echo + echo "Usage: ./make-release-tar.sh MAJOR MINOR" + echo + echo "Set the environment var CVSROOT to use a different repository." + echo "Set CVSREP to a different directory if needed." + echo + exit 1 +fi + +DIRNAME="barry-$1.$2" +TAGNAME="barry-$1_$2" + +mkdir build +cd build || exit 1 + +set -e + +cvs -z3 -d "$CVSROOT" \ + co -d $DIRNAME -r $TAGNAME "$CVSREP" +(cd $DIRNAME && ./buildgen.sh) +(cd $DIRNAME/gui && ./buildgen.sh) +rm -rf "$DIRNAME/autom4te.cache" "$DIRNAME/gui/autom4te.cache" +tar --exclude=CVS -cvf - $DIRNAME | gzip -9 > barry-$1.$2.tar.gz + diff --git a/maintainer/release-root.sh b/maintainer/release-root.sh new file mode 100755 index 00000000..df624719 --- /dev/null +++ b/maintainer/release-root.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ -z "$1" -o -z "$2" ] ; then + echo + echo "Do not call this script directly. Call release.sh instead." + echo + exit 1 +fi + +set -e + +# Make sure it compiles cleanly on all handy systems +#./test-build.sh build/barry-$1.$2.tar.gz fedora4 +./test-build.sh build/barry-$1.$2.tar.gz fedora5 +./test-build.sh build/barry-$1.$2.tar.gz fedora6 + diff --git a/maintainer/release.sh b/maintainer/release.sh new file mode 100755 index 00000000..0a1cf421 --- /dev/null +++ b/maintainer/release.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +if [ -z "$1" -o -z "$2" ] ; then + echo + echo "Usage: ./release.sh MAJOR MINOR" + echo + echo "Set the environment var CVSROOT to use a different repository." + echo "Set CVSREP to a different directory if needed." + echo + echo "Creates the release tarball from CVS sources, tests the compile" + echo "on local machine, fedora4, fedora5, fedora6." + echo + exit 1 +fi + +set -e + +# Create the tarball +./make-release-tar.sh $1 $2 + +# Make sure it compiles cleanly on all handy systems +# Local first... +./test-build-local.sh build/barry-$1.$2.tar.gz + +# Then as root, for the chroot systems... +su - -c "cd $(pwd) && ./release-root.sh $1 $2" + diff --git a/maintainer/test-build-local.sh b/maintainer/test-build-local.sh new file mode 100755 index 00000000..bec0bf18 --- /dev/null +++ b/maintainer/test-build-local.sh @@ -0,0 +1,40 @@ +#!/bin/sh + +CHROOT="/var/chroot" +BUILDUSER="cdfrey" + +if [ -z "$1" ] ; then + echo + echo "Usage: ./test-build-local.sh tarball" + echo + echo "Does a full build of given tarball." + echo + exit 1 +fi + +TARPATH="$1" +TARNAME=`basename "$TARPATH"` +TARFULLPATH="$(pwd)/$TARPATH" +TARGET="$2" + +set -e + +cd +rm -rf testbuild +mkdir testbuild +cd testbuild +tar xzvf $TARFULLPATH +cd * +./configure --prefix=/home/$BUILDUSER/testbuild/rootdir +make install +cd gui +export PKG_CONFIG_PATH=/home/$BUILDUSER/testbuild/rootdir/lib/pkgconfig +./configure --prefix=/home/$BUILDUSER/testbuild/rootdir +make install +cd ../../rootdir +find +echo "Press enter to continue..." +read +cd ../.. +rm -rf testbuild + diff --git a/maintainer/test-build.sh b/maintainer/test-build.sh new file mode 100755 index 00000000..aad4a1c7 --- /dev/null +++ b/maintainer/test-build.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +CHROOT="/var/chroot" +BUILDUSER="cdfrey" + +if [ -z "$1" -o -z "$2" ] ; then + echo + echo "Usage: ./test-build.sh tarball chroot_target" + echo + echo "Copies the tarball to the chroot target's tmp dir, then" + echo "enters the chroot system as the build user and builds everything." + echo + echo "Available chroot targets:" + find $CHROOT -type d -maxdepth 1 -print | sed "s/^.*\// /" + echo + exit 1 +fi + +TARPATH="$1" +TARNAME=`basename "$TARPATH"` +TARGET="$2" + +set -e + +cp "$TARPATH" "$CHROOT/$TARGET/tmp" +chroot "$CHROOT/$TARGET" su - "$BUILDUSER" -c /bin/sh -c "rm -rf testbuild && mkdir testbuild && cd testbuild && tar xzvf \"/tmp/$TARNAME\" && cd * && ./configure --prefix=/home/$BUILDUSER/testbuild/rootdir && make install && cd gui && export PKG_CONFIG_PATH=/home/$BUILDUSER/testbuild/rootdir/lib/pkgconfig && ./configure --prefix=/home/$BUILDUSER/testbuild/rootdir && make install && cd ../../rootdir && find && echo \"Press enter to continue...\" && read && cd ../.. && rm -rf testbuild" + -- 2.11.4.GIT