kit.sh revision 8a86c12ec245eb3838f48ffbc5a01fb9b7666a60
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# Copyright (C) 2004, 2007-2009 Internet Systems Consortium, Inc. ("ISC")
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# Copyright (C) 2000-2003 Internet Software Consortium.
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# Permission to use, copy, modify, and/or distribute this software for any
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# purpose with or without fee is hereby granted, provided that the above
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# copyright notice and this permission notice appear in all copies.
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
c46bcd7c6908745e19b0b1fe18a23bbaaee553edBob Halley# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
51917258dbb23cfe6069ae1cf2b7fc5aefc1e0c2Bob Halley# PERFORMANCE OF THIS SOFTWARE.
64e41159a919b0711321fe688ca5da4f4d1b7d80Bob Halley# $Id: kit.sh,v 1.37 2009/09/08 03:39:30 each Exp $
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# Make a release kit
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# Usage: sh kit.sh tag tmpdir
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# (e.g., sh kit.sh v9_0_0b5 /tmp/bindkit
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael Graff# To build a snapshot release, use the pseudo-tag "snapshot".
ccdac53c027e8964753b36c4d8c7b0e98af501c2Michael Graff# (e.g., sh kit.sh snapshot /tmp/bindkit
75a4dd0d377dca2f85cea44e28bf110314c1fe8cDavid Lawrence *) echo "usage: sh kit.sh [snapshot] cvstag tmpdir" >&2
657ce0b9d84fbd66514df53d61a087e8f1161187Michael Graff snapshot) tag=HEAD; snapshot=true ; releasetag="" ;;
657ce0b9d84fbd66514df53d61a087e8f1161187Michael Graff *) echo "usage: sh kit.sh [snapshot] cvstag tmpdir" >&2
657ce0b9d84fbd66514df53d61a087e8f1161187Michael Graff echo "$0: could not create directory $tmpdir" >&2
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafssoncvs checkout -p -r $tag bind9/version >version.tmp
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson set `date -u +'%Y%m%d%H%M%S %Y/%m/%d %H:%M:%S UTC'`
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafssonversion=${MAJORVER}.${MINORVER}.${PATCHVER}${RELEASETYPE}${RELEASEVER}
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafssonecho "building release kit for BIND version $version, hold on..."
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson echo "$0: directory `pwd`/$topdir already exists" >&2
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafssoncvs -Q export $arg "$tag" -d $topdir bind9
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas GustafssonMAJORVER=$MAJORVER
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas GustafssonMINORVER=$MINORVER
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas GustafssonPATCHVER=$PATCHVER
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas GustafssonRELEASETYPE=$RELEASETYPE
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas GustafssonRELEASEVER=$RELEASEVER
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson# Omit some files and directories from the kit.
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson# Some of these directories (doc/html, doc/man...) no longer
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson# contain any files and should therefore be absent in the
2c7e99b941c3f1ffa29f9034c710f358c09f13c9Michael Graff# checked-out tree, but they did exist at some point and
2c7e99b941c3f1ffa29f9034c710f358c09f13c9Michael Graff# we still delete them from releases just in case something
2c7e99b941c3f1ffa29f9034c710f358c09f13c9Michael Graff# gets accidentally resurrected.
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafssonrm -rf TODO EXCLUDED conftools doc/design doc/dev doc/expired \
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson doc/html doc/todo doc/private bin/lwresd doc/man \
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson# Remove everything but mksymtbl.pl from util
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafssonfind ./util -name mksymtbl.pl -prune -o -type f -print | xargs rm -rf
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson# Remove all .cvsignore files
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson# The following files should be executable.
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafssonchmod +x configure install-sh mkinstalldirs bin/tests/system/ifconfig.sh
ea31416b4fcdf23732355a8002f93f29e3b3d2dbAndreas Gustafsson# Fix up releases with libbind.
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley chmod +x lib/bind/configure lib/bind/mkinstalldirs
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# Fix files which should be using DOS style newlines
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halleywinnames="-name *.mak -or -name *.dsp -or -name *.dsw -or -name *.txt -or -name *.bat"
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halleyfor f in `find $windirs -type f \( $winnames \) -print`
a2171e092382f8f8a72b1f73436ddf93918c7719Bob Halley awk '{sub("\r$", "", $0); printf("%s\r\n", $0);}' < $f > tmp
13494a4d4bead37f22eb6c4779c73310109f7e4aJames Brister# check that documentation has been updated properly; issue a warning
13494a4d4bead37f22eb6c4779c73310109f7e4aJames Brister# if it hasn't
facb97777a972f6c8035ca3e762a6a9248c12897Bob Halley echo "WARNING: ARM source is newer than the html version."
facb97777a972f6c8035ca3e762a6a9248c12897Bob Halleyif test doc/arm/Bv9ARM-book.xml -nt doc/arm/Bv9ARM.pdf
facb97777a972f6c8035ca3e762a6a9248c12897Bob Halley echo "WARNING: ARM source is newer than the PDF version."
d8dcd6ad4617cc8d7df979bd62101fa9c4bac1bcBob Halley echo "WARNING: $docbookfile is newer than the html version."
facb97777a972f6c8035ca3e762a6a9248c12897Bob Halley# build the tarball
a829555ed724caa56b1ff7716d7eda2266491eafBob Halleycd .. || exit 1