From: Kern Sibbald Date: Wed, 14 Oct 2009 19:42:35 +0000 (+0200) Subject: Add release scripts X-Git-Tag: Release-5.0.0~285^2~2^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6d019f653005899194d61596d877f808d00b54a0;p=bacula%2Fbacula Add release scripts --- diff --git a/bacula/release/makebacularel b/bacula/release/makebacularel new file mode 100755 index 0000000000..0f9c93e2b3 --- /dev/null +++ b/bacula/release/makebacularel @@ -0,0 +1,106 @@ +#!/bin/sh +# +# +# This script is used to make a Bacula release +# bacula +# regress +# gui +# It writes in the current directory, so we recommend that you +# do not run it in the Bacula source or Git directory, but +# in a special release directory. +# +# Commit all changes, update the language files, +# export the release, make a release tar. +# +cwd=`pwd` +reltype=release +tagbase=Release- +base_pkg=bacula +if [ $# != 2 ] ; then + echo "Need $0 " + echo "e.g. $0 release-source 3.0.3" + exit 1 +fi +cd $1 +if [ $? -ne 0 ]; then + echo "Directory: $1 does not exist" + exit 1 +fi +src=`pwd` +cd $base_pkg +if [ $? -ne 0 ]; then + echo "Directory: $1 does not exist" + exit 1 +fi +branch=$2 +git checkout ${branch} +git pull origin ${branch} +if [ $? -ne 0 ]; then + echo "Checkout of branch ${branch} failed." + exit 1 +fi +ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h` +fulltag=$tagbase$ver +echo " " +echo "Making $reltype for $base_pkg-$ver ..." +echo " " +echo "OK? ctl-c to stop" +read a +rm -rf Release-$ver +if [ $reltype != "beta" ] ; then + cd src + cp -fp version.h 1 + sed 's%^#define DEVELOPER 1%/* #define DEVELOPER 1 */%g' 1 >version.h + rm -f 1 + cd .. +fi +./configure --enable-client-only +cd po +make update-po +cd ${src} +git commit -am "Final po changes for ${fulltag}" +git tag -d ${fulltag} +echo "Creating new tag -- $fulltag" +git tag $fulltag -m "Create tag $fulltag" +if [ $? != 0 ] ; then + echo " " + echo "Non-zero return status from Git" + echo " " + exit 1 +fi +echo "Create Tag $fulltag done" +cd ${cwd} +rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig +rm -rf $fulltag +cd ${src} +git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz +if [ $? != 0 ] ; then + echo " " + echo "Non-zero return status from Git" + echo " " + exit 1 +fi +echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz" +git checkout master +cd ${cwd} +tar xfz $base_pkg-$ver.tar.gz +cd $base_pkg-$ver/ +mv bacula $base_pkg-$ver +mv gui $base_pkg-gui-$ver +mv regress $base_pkg-regress-$ver +tar cvfz ../$base_pkg-$ver.tar.gz $base_pkg-$ver +tar cvfz ../$base_pkg-gui-$ver.tar.gz $base_pkg-gui-$ver +tar cvfz ../$base_pkg-regress-$ver.tar.gz $base_pkg-regress-$ver +cd .. +./sign $base_pkg-$ver.tar.gz +./sign $base_pkg-gui-$ver.tar.gz +./sign $base_pkg-regress-$ver.tar.gz + +echo " " +echo "If everything is OK, don't forget to push $src tags to the repo" +echo " " + +# Need to do docs and rescue +#mv docs $base_pkg-docs-$ver +#./makereldocs $ver +#mv rescue $base_pkg-rescue-$ver diff --git a/bacula/release/makeclean b/bacula/release/makeclean new file mode 100755 index 0000000000..ec44b8b002 --- /dev/null +++ b/bacula/release/makeclean @@ -0,0 +1,2 @@ +#!/bin/sh +rm -rf bacula-* winbacula* win64bacula* diff --git a/bacula/release/makedocsrel b/bacula/release/makedocsrel new file mode 100755 index 0000000000..247eeb4343 --- /dev/null +++ b/bacula/release/makedocsrel @@ -0,0 +1,109 @@ +#!/bin/sh +# +# +# This script is used to make a Bacula docs release +# docs +# It writes in the current directory, so we recommend that you +# do not run it in the Bacula source or Git directory, but +# in a special release directory. +# +# Commit all changes, export the release, make a release tar. +# +cwd=`pwd` +reltype=release +tagbase=Release- +base_dir=docs +base_pkg=bacula-$base_dir +branch=$3 +if [ $# != 3 ] ; then + echo "Need $0 " + echo "e.g. $0 bacula-source docs-source master" + exit 1 +fi +cd $1 +if [ $? -ne 0 ]; then + echo "Directory: $1 does not exist" + exit 1 +fi +cd bacula +if [ $? -ne 0 ]; then + echo "Directory: $1 does not exist" + exit 1 +fi +git checkout ${branch} +if [ $? -ne 0 ]; then + echo "Checkout of branch ${branch} in $1/bacula failed." + exit 1 +fi +git pull origin ${branch} +bsrc=`pwd` +cd ${cwd} +cd $2 +if [ $? -ne 0 ]; then + echo "Directory: $2 does not exist" + exit 1 +fi +cd $base_dir +if [ $? -ne 0 ]; then + echo "Directory: $2 does not exist" + exit 1 +fi +src=`pwd` +git checkout ${branch} +if [ $? -ne 0 ]; then + echo "Checkout of branch ${branch} in ${src} failed." + exit 1 +fi +git pull origin ${branch} +ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bsrc}/src/version.h` +fulltag=$tagbase$ver +echo " " +echo "Making $reltype for $base_pkg-$ver ..." +echo " " +echo "OK? ctl-c to stop" +read a + +git tag -d ${fulltag} +echo "Creating new tag -- $fulltag" +git tag $fulltag -m "Create tag $fulltag" +if [ $? != 0 ] ; then + echo " " + echo "Non-zero return status from Git" + echo " " + exit 1 +fi +echo "Create Tag $fulltag done" +cd ${cwd} +rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig +rm -rf $fulltag +cd ${src} +git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz +if [ $? != 0 ] ; then + echo " " + echo "Non-zero return status from Git" + echo " " + exit 1 +fi +echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz" +git checkout master +cd ${cwd} +tar xfz $base_pkg-$ver.tar.gz +cd $base_pkg-$ver/ +mv docs $base_pkg-$ver +cd $base_pkg-$ver +./configure --with-bacula=$bsrc +make en +cd ${bsrc} +git checkout master +cd ${cwd} +echo "Tarring docs ..." +tar cf $base_pkg-$ver.tar $base_pkg-$ver +rm -rf $base_pkg-$ver $base_pkg-$ver.tar.* +echo "bzip2 docs ..." +bzip2 $base_pkg-$ver.tar +./sign $base_pkg-$ver.tar.bz2 +ls -l $base_pkg-$ver.tar.* + +echo " " +echo "If everything is OK, don't forget to push $src tags to the repo" +echo " " diff --git a/bacula/release/makerescuerel b/bacula/release/makerescuerel new file mode 100755 index 0000000000..c48b530440 --- /dev/null +++ b/bacula/release/makerescuerel @@ -0,0 +1,77 @@ +#!/bin/sh +# +# +# This script is used to make a Bacula rescue release +# rescue +# It writes in the current directory, so we recommend that you +# do not run it in the Bacula source or Git directory, but +# in a special release directory. +# +# Commit all changes, export the release, make a release tar. +# +cwd=`pwd` +reltype=release +tagbase=Release- +base_pkg=bacula-rescue +base_dir=rescue +branch=$2 +ver=$2 +if [ $# != 2 ] ; then + echo "Need $0 " + echo "e.g. $0 rescue-source master" + exit 1 +fi +cd $1 +if [ $? -ne 0 ]; then + echo "Directory: $1 does not exist" + exit 1 +fi +cd $base_dir +if [ $? -ne 0 ]; then + echo "Directory: $1 does not exist" + exit 1 +fi +src=`pwd` +git checkout ${branch} +if [ $? -ne 0 ]; then + echo "Checkout of branch ${branch} in ${src} failed." + exit 1 +fi +git pull origin ${branch} +fulltag=$tagbase$ver +echo " " +echo "Making $reltype for $base_pkg-$ver ..." +echo " " +echo "OK? ctl-c to stop" +read a + +git tag -d ${fulltag} +echo "Creating new tag -- $fulltag" +git tag $fulltag -m "Create tag $fulltag" +if [ $? != 0 ] ; then + echo " " + echo "Non-zero return status from Git" + echo " " + exit 1 +fi +echo "Create Tag $fulltag done" +cd ${cwd} +rm -rf $base_pkg-$ver $base_pkg-$ver.tar.gz $base_pkg-$ver.tar.gz.sig +rm -rf $fulltag +cd ${src} +git archive --format=tar --prefix=$base_pkg-$ver/ $fulltag | gzip >${cwd}/$base_pkg-$ver.tar.gz +if [ $? != 0 ] ; then + echo " " + echo "Non-zero return status from Git" + echo " " + exit 1 +fi +echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz" +git checkout master +cd ${cwd} +./sign $base_pkg-$ver.tar.gz +ls -l $base_pkg-$ver.tar.* + +echo " " +echo "If everything is OK, don't forget to push $src tags to the repo" +echo " " diff --git a/bacula/release/makewinrel b/bacula/release/makewinrel new file mode 100755 index 0000000000..4d60d3b557 --- /dev/null +++ b/bacula/release/makewinrel @@ -0,0 +1,63 @@ +#!/bin/sh +# +# +# This script is used to make a Bacula win32 and win64 releases +# +# It writes in the current directory, so we recommend that you +# do not run it in the Bacula source or Git directory, but +# in a special release directory. +# +# Commit all changes, export the release, make a release tar. +# +cwd=`pwd` +reltype=release +tagbase=Release- +base_pkg=windows +branch=$2 +ver=$2 +if [ $# != 2 ] ; then + echo "Need $0 " + echo "e.g. $0 rescue-source master" + exit 1 +fi +cd $1 +if [ $? -ne 0 ]; then + echo "Directory: $1 does not exist" + exit 1 +fi +cd bacula +if [ $? -ne 0 ]; then + echo "Directory: $1 does not exist" + exit 1 +fi +src=`pwd` +git checkout ${branch} +if [ $? -ne 0 ]; then + echo "Checkout of branch ${branch} in ${src} failed." + exit 1 +fi +git pull origin ${branch} +fulltag=$tagbase$ver +echo " " +echo "Making $reltype for $base_pkg-$ver ..." +echo " " +echo "OK? ctl-c to stop" +read a + +cd src/win32 +rm -f release32/winbacula-$ver.exe +rm -f release64/win64bacula-$ver.exe +make clean +./makeall +cp release32/winbacula-$ver.exe ${cwd} +cp release64/win64bacula-$ver.exe ${cwd} +git checkout master +cd ${cwd} +rm -f *.exe.sig +./sign winbacula-$ver.exe +./sign win64bacula-$ver.exe +ls -l win*.exe* + +echo " " +echo "If everything is OK, don't forget to push $src tags to the repo" +echo " " diff --git a/bacula/release/sign b/bacula/release/sign new file mode 100755 index 0000000000..964780d2f1 --- /dev/null +++ b/bacula/release/sign @@ -0,0 +1,3 @@ +#!/bin/sh +gpg --detach-sign --armor --default-key bacula -o $1.sig $1 +gpg --verify $1.sig