From: Kern Sibbald Date: Thu, 5 Aug 2010 14:07:16 +0000 (+0200) Subject: Final po changes for Release-5.0.3 X-Git-Tag: Release-5.0.3~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1fbb9d5f05f5b2b3cccb9bbc51498fe670b58c55;p=bacula%2Fbacula Final po changes for Release-5.0.3 --- diff --git a/bacula/release/functions b/bacula/release/functions new file mode 100644 index 0000000000..4f01f64b32 --- /dev/null +++ b/bacula/release/functions @@ -0,0 +1,12 @@ +# +# Functions for the release scripts +# +check_return_code() +{ + if [ $? != 0 ]; then + echo " " + echo "$1" + echo " " + exit 1 + fi +} diff --git a/bacula/release/makeall b/bacula/release/makeall index d2a8bd57a8..12035f4e80 100755 --- a/bacula/release/makeall +++ b/bacula/release/makeall @@ -2,19 +2,22 @@ # # Make full release # +. ./functions + # Bacula git repos -bacula=${bacula:-${HOME}/bacula/k/bacula} -docs=${docs:-${HOME}/bacula/k/docs} -rescue=${rescue:-${HOME}/bacula/k/rescue} +bacula=${bacula:-${HOME}/bacula/k} +docs=${docs:-${HOME}/bacula/docs} +rescue=${rescue:-${HOME}/bacula/rescue} # # Set the following to your remote name. By default it is origin. +# NOTE!!! There is a different remote set on rescue below remote=bs # # Note, you will probably want to set updatepo=no if you # run this script multiple times for a given release. -export updatepo=no -export push=yes +export updatepo=yes +export push=no if [ $# != 1 ] ; then @@ -28,43 +31,40 @@ branch=$1 cwd=`pwd` # We pull the version $ver from the main bacula source directory -cd $bacula +cd $bacula/bacula +check_return_code "makeall: Directory $bacula/bacula does not exist" + current=`git branch | awk '/*/ { print $2 }'` -cd bacula -if [ $? -ne 0 ]; then - echo "Directory: $1 does not exist" - exit 1 -fi git checkout ${branch} +check_return_code "makeall: Checkout of branch ${branch} failed." + git pull ${remote} ${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` git checkout ${current} cd $cwd - # ./makeclean ./makebacularel $bacula $remote $branch $ver +check_return_code "$0: makebacularel bad return code" + ./makedocsrel $bacula $docs $remote $branch $ver -./makerescuerel $rescue $remote $branch $ver +check_return_code "$0: makedocsrel bad return code" + + ./makewinrel $bacula $remote $branch $ver | tee win$$.log +check_return_code "$0: makewinrel bad return code" # strip ./configure strerror from Win log file sed -i -e 's%strerror%%' win$$.log # check for warning and error messages grep -i warning win$$.log >/dev/null -if [ $? -eq 0 ] ; then - echo " " - echo "Warnings in win$$.log" - exit 1 -fi +check_return_code "makeall: Warnings in win$$.log" grep -i error win$$.log >/dev/null -if [ $? -eq 0 ] ; then - echo " " - echo "Errors in win$$.log" - exit 1 -fi +check_return_code "makeall: Errors in win$$.log" rm -f win$$.log + +remote=sf +./makerescuerel $rescue $remote $branch $ver +check_return_code "$0: makerescuerel bad return code" + +exit 0 diff --git a/bacula/release/makebacularel b/bacula/release/makebacularel index 713fc27492..467162e0b2 100755 --- a/bacula/release/makebacularel +++ b/bacula/release/makebacularel @@ -12,6 +12,8 @@ # Commit all changes, update the language files, # export the release, make a release tar. # +. ./functions + cwd=`pwd` reltype=release tagbase=Release- @@ -24,28 +26,19 @@ if [ $# != 4 ] ; then exit 1 fi cd $1 -if [ $? -ne 0 ]; then - echo "Directory: $1 does not exist" - exit 1 -fi +check_return_code "$0: Directory $1 does not exist" +cd bacula +check_return_code "$0: Directory $1/bacula does not exist" src=`pwd` current=`git branch | awk '/*/ { print $2 }'` -cd $base_dir -if [ $? -ne 0 ]; then - echo "Directory: $1 does not exist" - exit 1 -fi remote=$2 branch=$3 git checkout ${branch} +check_return_code "$0: Checkout of branch ${branch} failed." git pull ${remote} ${branch} -if [ $? -ne 0 ]; then - echo "Checkout of branch ${branch} failed." - exit 1 -fi fulltag=$tagbase$ver echo " " -echo "Making $reltype for $base_pkg-$ver ..." +echo "$0: Making $reltype for $base_pkg-$ver ..." echo " " echo "OK? ctl-c to stop" read a @@ -64,12 +57,12 @@ if [ a$updatepo != ano ]; then cd ${src} git commit -am "Final po changes for ${fulltag}" fi -git tag -d ${fulltag} +git tag -d ${fulltag} 2>/dev/null 1>/dev/null echo "Creating new tag -- $fulltag" git tag $fulltag if [ $? != 0 ] ; then echo " " - echo "Non-zero return status from Git" + echo "makebacularel: Non-zero return status from Git" echo " " exit 1 fi @@ -81,7 +74,7 @@ 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 "makebacularel: Non-zero return status from Git" echo " " exit 1 fi @@ -110,3 +103,4 @@ fi cd ${src} git checkout ${current} +exit 0 diff --git a/bacula/release/makedocsrel b/bacula/release/makedocsrel index db14612fdc..67595b9c17 100755 --- a/bacula/release/makedocsrel +++ b/bacula/release/makedocsrel @@ -9,6 +9,8 @@ # # Commit all changes, export the release, make a release tar. # +. ./functions + cwd=`pwd` reltype=release tagbase=Release- @@ -23,71 +25,46 @@ if [ $# != 5 ] ; then echo "e.g. $0 bacula-source docs-source bee master 4.0.1" 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 + +# Get Bacula branch setup +cd $1/bacula +check_return_code "$0: Directory $1/bacula does not exist" + bcurrent=`git branch | awk '/*/ { print $2 }'` git checkout ${branch} -if [ $? -ne 0 ]; then - echo "Checkout of branch ${branch} in $1/bacula failed." - exit 1 -fi +check_return_code "$0: Checkout of branch ${branch} in $1/bacula failed." git pull ${remote} ${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 + +# Go to docs +cd $2/$base_dir +check_return_code "$0: Directory $2/$base_dir does not exist" + current=`git branch | awk '/*/ { print $2 }'` src=`pwd` git checkout ${branch} -if [ $? -ne 0 ]; then - echo "Checkout of branch ${branch} in ${src} failed." - exit 1 -fi +check_return_code "$0: Checkout of branch ${branch} in ${src} failed." + git pull ${remote} ${branch} fulltag=$tagbase$ver echo " " -echo "Making $reltype for $base_pkg-$ver ..." +echo "$0: Making $reltype for $base_pkg-$ver ..." echo " " echo "OK? ctl-c to stop" read a -git tag -d ${fulltag} +git tag -d ${fulltag} 2>/dev/null 1>/dev/null echo "Creating new tag -- $fulltag" git tag $fulltag -if [ $? != 0 ] ; then - echo " " - echo "Non-zero return status from Git" - echo " " - exit 1 -fi +check_return_code "$0: Non-zero return status from Git" 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 +check_return_code "$0: Non-zero return status from Git" echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz" cd ${cwd} tar xfz $base_pkg-$ver.tar.gz @@ -117,3 +94,4 @@ git checkout ${current} cd ${bsrc} git checkout ${bcurrent} +exit 0 diff --git a/bacula/release/makerescuerel b/bacula/release/makerescuerel index 3406f00ad6..11c33f9075 100755 --- a/bacula/release/makerescuerel +++ b/bacula/release/makerescuerel @@ -9,6 +9,8 @@ # # Commit all changes, export the release, make a release tar. # +. ./functions + cwd=`pwd` reltype=release tagbase=Release- @@ -23,53 +25,33 @@ if [ $# != 4 ] ; then echo "e.g. $0 rescue-source bee Branch-4.0 4.0.1" 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 +cd $1/rescue +check_return_code "$0: Directory $1/rescue does not exist" current=`git branch | awk '/*/ { print $2 }'` src=`pwd` git checkout ${branch} -if [ $? -ne 0 ]; then - echo "Checkout of branch ${branch} in ${src} failed." - exit 1 -fi +check_return_code "$0: Checkout of branch ${branch} in ${src} failed." + git pull ${remote} ${branch} fulltag=$tagbase$ver echo " " -echo "Making $reltype for $base_pkg-$ver ..." +echo "$0: Making $reltype for $base_pkg-$ver ..." echo " " echo "OK? ctl-c to stop" read a -git tag -d ${fulltag} +git tag -d ${fulltag} 2>/dev/null 1>/dev/null echo "Creating new tag -- $fulltag" git tag $fulltag -if [ $? != 0 ] ; then - echo " " - echo "Non-zero return status from Git" - echo " " - exit 1 -fi +check_return_code "$0: Non-zero return status from git tag" 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 +check_return_code "$0: Non-zero return status from Git" echo "Exported release into ${cwd}/$base_pkg-$ver.tar.gz" if [ a$push != ano ]; then cd ${src} @@ -83,3 +65,4 @@ git checkout ${current} cd ${cwd} ./sign $base_pkg-$ver.tar.gz ls -l $base_pkg-$ver.tar.* +exit 0 diff --git a/bacula/release/makewinrel b/bacula/release/makewinrel index ef1f1a63a6..b3278080ce 100755 --- a/bacula/release/makewinrel +++ b/bacula/release/makewinrel @@ -9,6 +9,8 @@ # # Commit all changes, export the release, make a release tar. # +. ./functions + cwd=`pwd` reltype=release tagbase=Release- @@ -22,27 +24,19 @@ if [ $# != 4 ] ; then echo "e.g. $0 rescue-source bee Branch-4.0 4.0.1" 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 +cd $1/bacula +check_return_code "$0: Directory $1/bacula does not exist" +src=$1/bacula + current=`git branch | awk '/*/ { print $2 }'` src=`pwd` git checkout ${branch} -if [ $? -ne 0 ]; then - echo "Checkout of branch ${branch} in ${src} failed." - exit 1 -fi +check_return_code "$0: Checkout of branch ${branch} in ${src} failed." + git pull ${remote} ${branch} fulltag=$tagbase$ver echo " " -echo "Making $reltype for Windows $base_pkg-$ver ..." +echo "$0: Making $reltype for Windows $base_pkg-$ver ..." echo " " echo "OK? ctl-c to stop" read a @@ -66,3 +60,4 @@ ls -l ${base_pkg}-win*.exe* cd ${src} # get back to original branch git checkout ${current} +exit 0 diff --git a/bacula/src/version.h b/bacula/src/version.h index dcd07dba66..c1f0c9d236 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -52,7 +52,7 @@ #define TRACE_FILE 1 /* If this is set stdout will not be closed on startup */ -#define DEVELOPER 1 +/* #define DEVELOPER 1 */ /* * SMCHECK does orphaned buffer checking (memory leaks)