3 # Copyright (C) 2004, 2007-2010 Internet Systems Consortium, Inc. ("ISC")
4 # Copyright (C) 2000-2003 Internet Software Consortium.
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
10 # THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11 # REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12 # AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13 # INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14 # LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16 # PERFORMANCE OF THIS SOFTWARE.
18 # $Id: kit.sh,v 1.44 2010/11/03 01:04:36 marka Exp $
22 # Usage: sh kit.sh tag tmpdir
24 # (e.g., sh kit.sh v9_0_0b5 /tmp/bindkit
26 # To build a snapshot release, use the pseudo-tag "snapshot".
28 # (e.g., sh kit.sh snapshot /tmp/bindkit
36 *) echo "usage: sh kit.sh [snapshot] cvstag tmpdir" >&2
49 snapshot) tag=HEAD; snapshot=true ; releasetag="" ;;
53 *) echo "usage: sh kit.sh [snapshot] cvstag tmpdir" >&2
62 echo "$0: could not create directory $tmpdir" >&2
68 cvs checkout -p -r $tag bind9/version >version.tmp
74 set `date -u +'%Y%m%d%H%M%S %Y/%m/%d %H:%M:%S UTC'`
77 RELEASEVER=${dstamp}${releasetag}
91 version=${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}
93 echo "building release kit for BIND version $version, hold on..."
97 test ! -d $topdir || {
98 echo "$0: directory `pwd`/$topdir already exists" >&2
102 cvs -Q export $arg "$tag" -d $topdir bind9
112 RELEASETYPE=$RELEASETYPE
113 RELEASEVER=$RELEASEVER
117 # Omit some files and directories from the kit.
119 # Some of these directories (doc/html, doc/man...) no longer
120 # contain any files and should therefore be absent in the
121 # checked-out tree, but they did exist at some point and
122 # we still delete them from releases just in case something
123 # gets accidentally resurrected.
125 rm -rf TODO EXCLUDED conftools doc/design doc/dev doc/expired \
126 doc/html doc/todo doc/private bin/lwresd doc/man \
127 lib/lwres/man/resolver.5 \
128 bin/tests/system/relay lib/cfg
130 # Remove everything but mksymtbl.pl from util
131 find util -name mksymtbl.pl -prune -o -type f -print | xargs rm -f
132 find util -depth -type d -print | xargs rmdir 2>/dev/null
134 # Remove all .cvsignore files
135 find . -name .cvsignore -print | xargs rm
137 # The following files should be executable.
138 chmod +x configure install-sh mkinstalldirs bin/tests/system/ifconfig.sh
139 # Fix up releases with libbind.
140 if test -f lib/bind/configure
142 chmod +x lib/bind/configure lib/bind/mkinstalldirs
145 # Fix files which should be using DOS style newlines
146 windirs=`find lib bin -type d -name win32`
147 windirs="$windirs win32utils"
148 winnames="-name *.mak -or -name *.dsp -or -name *.dsw -or -name *.txt -or -name *.bat"
149 for f in `find $windirs -type f \( $winnames \) -print`
151 awk '{sub("\r$", "", $0); printf("%s\r\n", $0);}' < $f > tmp
156 # check that documentation has been updated properly; issue a warning
159 for f in doc/arm/*.html
161 if test "$f" -nt doc/arm/Bv9ARM-book.xml
169 echo "WARNING: ARM source is newer than the html version."
172 if test doc/arm/Bv9ARM-book.xml -nt doc/arm/Bv9ARM.pdf
174 echo "WARNING: ARM source is newer than the PDF version."
177 for f in `find . -name "*.docbook" -print`
180 htmlfile=${f%.docbook}.html
181 if test $docbookfile -nt $htmlfile
183 echo "WARNING: $docbookfile is newer than the html version."
192 tar -c -f - $topdir | gzip > $kit
194 echo "done, kit is in `pwd`/$kit"