diff options
-rw-r--r-- | util/bind.sh | 46 |
1 files changed, 38 insertions, 8 deletions
diff --git a/util/bind.sh b/util/bind.sh index f37c91b8..c873de7c 100644 --- a/util/bind.sh +++ b/util/bind.sh @@ -14,16 +14,41 @@ # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR # PERFORMANCE OF THIS SOFTWARE. -# $Id: bind.sh,v 1.32 2012/05/24 17:50:00 sar Exp $ - -# Get the bind distribution for the libraries +# +# Get the bind sources from BIND9 repository. # This script is used to build the DHCP distribution and shouldn't be shipped # -# Usage: sh bind.sh [--remote=<path>] <DHCP version> +# Usage (from main DHCP directory): +# +# sh util/bind.sh [--remote=<path>] <DHCP version> # -# Normally remote will only be used by Robie +# The script recreates whole bind/ directory. Before running it, make sure +# there are no files that that'd you'd be unhappy to lose. # +# Earlier versions of this script used BIND's kit.sh script that produced +# tarballs for export libraries. Sadly, it was not maintained well and +# didn't work for later versions. Thus the import has changed. It now uses +# git clone/git checkout <tag> to get the bind sources. # +# This approach imports all files from BIND9 repo (including those we don't +# care about, such as win32 files). As a result of this, the dhcp tarball +# will get a bit bigger. On the flip side, the import is super generic +# and can import any versions, you have the ability to review changes +# before commiting them and it's also very easy to tell what exactly +# has changed between BIND releases. + +# BIND9 update procedure +# +# 1. Get a clean DHCP repo. Cloning fresh works best, but you could also +# do: git reset --hard; git checkout master; git clean -fxd +# 2. edit the list with corresponding versions below (around line 100) +# 3. do: sh util/bind.sh 4.4.3 +# 4. commit all new and changed files in bind/bind9. NOTE: there is a +# bind/bind9/.gitignore that comes from bind repo that hides some +# of the files. Make sure you commit only those that are really +# needed, not some generated during compilation. +# 5. test that it compiles, dist, distcheck works etc. +# 6. push your changes topdir=`pwd` binddir=$topdir/bind @@ -153,6 +178,11 @@ fi cd .. +# This is a bit drastic, but we don't want this 300MB+ dir to ever be commited +# into dhcp repo. Also, when it's present, it confuses git to think that the +# bind/bind9 is a sub-project. +rm -rf bind9/.git + # Now generate version # I'm too lazy to get rid of v from v9 in the bindtag. But that's ok. # We'll never have any other number here than 9. @@ -183,8 +213,8 @@ echo "BIND9 ${BINDTAG} import complete." echo "BIND9 sources available in bind/bind9." echo "If you want to commit them to dhcp repository, do the following:" echo "" -echo "1. rm -rf bind/bind9/.git" -echo "2. git add <all new and changes files files in bind/bind9>" -echo "3. git commit" +echo "1. git add <all new and changes files in bind/bind9>" +echo "2. git commit" echo "" echo "Before commiting, please make sure the code compiles and works." +echo "Before compiling, make sure to run ./configure." |