From: Kern Sibbald Date: Sat, 31 Jul 2010 16:30:20 +0000 (+0200) Subject: Backport Branch-4.0 release to Branch-5.0 X-Git-Tag: Release-5.0.3~43 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=03768e4f4724d70710bb9ccfdf7e596fd48d885f;p=bacula%2Fbacula Backport Branch-4.0 release to Branch-5.0 --- diff --git a/bacula/release/README b/bacula/release/README index 4b77fe6eb2..9dea930f13 100644 --- a/bacula/release/README +++ b/bacula/release/README @@ -13,12 +13,24 @@ In general, you do the following: bacula docs - rescu + rescue + + Also ensure that you have set repo to the name of your repository. + Normally, it is origin, but some developers (Kern) use bee. 3. Ensure that the environment variable "version" is set correctly - (yes, this could be automatically pulled from $bacula). + in each repo. Specifically, in: + + bacula/src/version.h + rescue/version.h + winbmr/rescue/version.h + gui/bweb/ReleaseNotes (for makebwebrel) + +4. Run the makeall script. + + ./makeall Branch-4.0 # specify branch to release -4. Run the makeall script. There should be no errors. If +5. There should be no errors. If there are, fix them, and re-run the script or re-run the scripts that makeall calls: @@ -28,12 +40,12 @@ In general, you do the following: makerescuerel ... makewinrel ... -5. All the output files should be put in this directory. +6. All the output files should be put in this directory. -6. Before releasing, detar the main Bacula source into some +7. Before releasing, detar the main Bacula source into some directory and run all the regression tests using the files in the bacula-xx.xx.xx.tar.gz file. This ensures that there are no missing files. -7. Also before releasing, run at least one backup using the +8. Also before releasing, run at least one backup using the Win32 and/or Win64 file daemon. diff --git a/bacula/release/makeall b/bacula/release/makeall index 37ef4b5438..f4126ca997 100755 --- a/bacula/release/makeall +++ b/bacula/release/makeall @@ -2,21 +2,37 @@ # # Make full release # -branch=5.0.0 -# # Bacula git repos -bacula=/home/kern/bacula/k -docs=/home/kern/bacula/docs -rescue=/home/kern/bacula/rescue +bacula=${bacula:-${HOME}/bacula/k/bacula} +docs=${docs:-${HOME}/bacula/k/docs} +rescue=${rescue:-${HOME}/bacula/k/rescue} +# +# Set the following to your remote name. By default it is origin. +remote=bs + export push=yes -export updatepo=yes +# +# Note, you will probably want to set updatepo=no if you +# run this script multiple times for a given release. +export updatepo=no + +if [ $# != 1 ] ; then + echo "Need $0 " + echo "e.g. $0 Branch-5.0" + exit 1 +fi + +branch=$1 -./makeclean -./makebacularel $bacula $branch -./makedocsrel $bacula $docs $branch -./makerescuerel $rescue $branch -./makewinrel $bacula $branch | tee win$$.log +# ./makeclean +./makebacularel $bacula $remote $branch +./makedocsrel $bacula $docs $remote $branch +./makerescuerel $rescue $remote $branch +./makewinrel $bacula $remote $branch | tee win$$.log +# 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 " " diff --git a/bacula/release/makebacularel b/bacula/release/makebacularel index 39c4334bbf..2ca51a1676 100755 --- a/bacula/release/makebacularel +++ b/bacula/release/makebacularel @@ -15,10 +15,11 @@ cwd=`pwd` reltype=release tagbase=Release- +base_dir=bacula base_pkg=bacula -if [ $# != 2 ] ; then - echo "Need $0 " - echo "e.g. $0 release-source 3.0.3" +if [ $# != 3 ] ; then + echo "Need $0 " + echo "e.g. $0 release-source bee 4.0.0" exit 1 fi cd $1 @@ -27,14 +28,16 @@ if [ $? -ne 0 ]; then exit 1 fi src=`pwd` -cd $base_pkg +current=`git branch | awk '/*/ { print $2 }'` +cd $base_dir if [ $? -ne 0 ]; then echo "Directory: $1 does not exist" exit 1 fi -branch=$2 +remote=$2 +branch=$3 git checkout ${branch} -git pull origin ${branch} +git pull ${remote} ${branch} if [ $? -ne 0 ]; then echo "Checkout of branch ${branch} failed." exit 1 @@ -83,7 +86,6 @@ if [ $? != 0 ] ; then 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/ @@ -93,6 +95,7 @@ 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 +rm -rf $base_pkg-$ver cd .. ./sign $base_pkg-$ver.tar.gz ./sign $base_pkg-gui-$ver.tar.gz @@ -100,6 +103,10 @@ cd .. if [ a$push != ano ]; then cd ${src} - git push origin $branch - git push origin tag $fulltag + git push ${remote} ${branch} + git push ${remote} tag ${fulltag} + echo "Pushed ${remote} and push tag ${fulltag}" fi + +cd ${src} +git checkout ${current} diff --git a/bacula/release/makeclean b/bacula/release/makeclean index 9ed063381d..af1fd60b21 100755 --- a/bacula/release/makeclean +++ b/bacula/release/makeclean @@ -1,2 +1,2 @@ #!/bin/sh -rm -rf bacula-* win32bacula* win64bacula* +rm -rf bacula-* win32bacula* win64bacula* win*.log diff --git a/bacula/release/makedocsrel b/bacula/release/makedocsrel index 1073c1f6ef..38b9dd613f 100755 --- a/bacula/release/makedocsrel +++ b/bacula/release/makedocsrel @@ -14,10 +14,11 @@ 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" +remote=$3 +branch=$4 +if [ $# != 4 ] ; then + echo "Need $0 " + echo "e.g. $0 bacula-source docs-source bee master" exit 1 fi cd $1 @@ -30,12 +31,13 @@ if [ $? -ne 0 ]; then echo "Directory: $1 does not exist" exit 1 fi +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 -git pull origin ${branch} +git pull ${remote} ${branch} bsrc=`pwd` cd ${cwd} cd $2 @@ -48,13 +50,14 @@ if [ $? -ne 0 ]; then echo "Directory: $2 does not exist" exit 1 fi +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 -git pull origin ${branch} +git pull ${remote} ${branch} ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${bsrc}/src/version.h` fulltag=$tagbase$ver echo " " @@ -85,7 +88,6 @@ if [ $? != 0 ] ; then 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/ @@ -93,8 +95,6 @@ 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 @@ -106,6 +106,13 @@ ls -l $base_pkg-$ver.tar.* if [ a$push != ano ]; then cd ${src} - git push origin $branch - git push origin tag $fulltag + git push ${remote} ${branch} + git push ${remote} tag ${fulltag} + echo "Pushed ${remote} and push tag ${fulltag}" fi + +cd ${src} +git checkout ${current} + +cd ${bsrc} +git checkout ${bcurrent} diff --git a/bacula/release/makerescuerel b/bacula/release/makerescuerel index 2f8add903b..69bb5e13ce 100755 --- a/bacula/release/makerescuerel +++ b/bacula/release/makerescuerel @@ -14,11 +14,12 @@ reltype=release tagbase=Release- base_pkg=bacula-rescue base_dir=rescue -branch=$2 +remote=$2 +branch=$3 -if [ $# != 2 ] ; then - echo "Need $0 " - echo "e.g. $0 rescue-source master" +if [ $# != 3 ] ; then + echo "Need $0 " + echo "e.g. $0 rescue-source bee Branch-4.0" exit 1 fi cd $1 @@ -32,13 +33,14 @@ if [ $? -ne 0 ]; then exit 1 fi +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 -git pull origin ${branch} +git pull ${remote} ${branch} ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' version.h` fulltag=$tagbase$ver echo " " @@ -69,13 +71,15 @@ if [ $? != 0 ] ; then 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.* - if [ a$push != ano ]; then cd ${src} - git push origin $branch - git push origin tag $fulltag + git push ${remote} ${branch} + git push ${remote} tag ${fulltag} + echo "Pushed ${remote} and push tag ${fulltag}" fi +cd ${src} +git checkout ${current} + +cd ${cwd} +./sign $base_pkg-$ver.tar.gz +ls -l $base_pkg-$ver.tar.* diff --git a/bacula/release/makewinrel b/bacula/release/makewinrel index ad29d78d66..814183afba 100755 --- a/bacula/release/makewinrel +++ b/bacula/release/makewinrel @@ -12,12 +12,13 @@ cwd=`pwd` reltype=release tagbase=Release- -base_pkg=windows -branch=$2 +base_pkg=bacula +remote=$2 +branch=$3 -if [ $# != 2 ] ; then - echo "Need $0 " - echo "e.g. $0 rescue-source master" +if [ $# != 3 ] ; then + echo "Need $0 " + echo "e.g. $0 rescue-source bee Branch-4.0" exit 1 fi cd $1 @@ -30,32 +31,38 @@ if [ $? -ne 0 ]; then echo "Directory: $1 does not exist" exit 1 fi +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 -git pull origin ${branch} +git pull ${remote} ${branch} ver=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' src/version.h` fulltag=$tagbase$ver echo " " -echo "Making $reltype for $base_pkg-$ver ..." +echo "Making $reltype for Windows $base_pkg-$ver ..." echo " " echo "OK? ctl-c to stop" read a cd src/win32 -rm -f release32/win32bacula-$ver.exe -rm -f release64/win64bacula-$ver.exe +rm -f release32/${base_pkg}-win32-$ver.exe +rm -f release64/${base_pkg}-win64-$ver.exe make clean +cd ../.. +./configure +cd src/win32 ./makeall -cp release32/win32bacula-$ver.exe ${cwd} -cp release64/win64bacula-$ver.exe ${cwd} -git checkout master +cp release32/${base_pkg}-win32-$ver.exe ${cwd} +cp release64/${base_pkg}-win64-$ver.exe ${cwd} cd ${cwd} rm -f *.exe.sig -./sign win32bacula-$ver.exe -./sign win64bacula-$ver.exe -ls -l win*.exe* +./sign ${base_pkg}-win32-$ver.exe +./sign ${base_pkg}-win64-$ver.exe +ls -l ${base_pkg}-win*.exe* +cd ${src} +# get back to original branch +git checkout ${current}