diff --git a/doc/dev/autoconf b/doc/dev/autoconf deleted file mode 100644 index 08284cb36c..0000000000 --- a/doc/dev/autoconf +++ /dev/null @@ -1,16 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or https://isc.org/copyright.html for terms. - -Here are some hints on how to use autoconf correctly when doing -BIND 9 development. - -Never edit the configure script directly. Edit configure.in, commit -the changes, run "autoconf", and commit the new configure. Doing two -separate commits ensures that the version numbers embedded in the -configure script are correct. - -Don't edit config.h.in directly. Instead, run "autoheader". If it -complains about missing definitions, add them to acconfig.h, rerun -autoheader, commit acconfig.h if edited, and commit the generated -config.h.in. diff --git a/doc/dev/cvs-usage b/doc/dev/cvs-usage deleted file mode 100644 index 974d8fc562..0000000000 --- a/doc/dev/cvs-usage +++ /dev/null @@ -1,97 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or https://isc.org/copyright.html for terms. - -Notes on CVS Usage - -Accessing the repository - - -The recommended way of accessing the BIND 9 CVS repository is by ssh -to rc.isc.org, using the following environment settings: - - CVSROOT=:ext:rc.isc.org:/proj/cvs/isc - CVS_RSH=ssh - - -Creating a release branch - - -Here's how the 9.0 release branch was created: - - cvs rtag v9_0_base bind9 - cvs rtag -b -r v9_0_base v9_0 bind9 - - - -Renaming files by repository copy - - -When you need to rename or move a file that is under CVS control, use -the "repository copy" method as described in the following text -borrowed from an ancient CVS FAQ: - - 2C.4 How do I rename a file? - - CVS does not offer a way to rename a file in a way that CVS can - track later. See Section 4B for more information. - - Here is the best way to get the effect of renaming, while - preserving the change log: - - 1. Copy the RCS (",v") file directly in the Repository. - - cp $CVSROOT//,v $CVSROOT//,v - - 2. Remove the old file using CVS. - - By duplicating the file, you will preserve the change - history and the ability to retrieve earlier revisions of the - old file via the "-r " or "-D " options to - "checkout" and "update". - - cd / - rm - cvs remove - cvs commit - - 3. Retrieve and remove all the Tags from it. - - By stripping off all the old Tags, the "checkout -r" and - "update -r" commands won't retrieve revisions Tagged before - the renaming. - - cd / - cvs update - cvs log # Save the list of Tags - cvs tag -d - cvs tag -d - . . . - - - This technique can be used to rename files within one directory or - across different directories. You can apply this idea to - directories too, as long as you apply the above to each file and - don't delete the old directory. - - Of course, you have to change the build system (e.g. Makefile) in - your to know about the name change. - - -Pulling up a newly added file to a release branch: - -In a mainline working tree, do something like this: - - cvs tag v9_0_base file - cvs tag -b -r v9_0_base v9_0 file - - -Importing contrib source from vendor release - -As an example, here's how queryperf was imported: - - cd /tmp - cvs -d shell.nominum.com:/proj/cvs/nominum export -rHEAD queryperf - cd queryperf - cvs -d rc.isc.org:/proj/cvs/isc import bind9/contrib/queryperf \ - NOMINUM NOMINUM_20010710 diff --git a/doc/dev/release b/doc/dev/release deleted file mode 100644 index dec88d5584..0000000000 --- a/doc/dev/release +++ /dev/null @@ -1,238 +0,0 @@ -Copyright (C) Internet Systems Consortium, Inc. ("ISC") - -See COPYRIGHT in the source root or https://isc.org/copyright.html for terms. - -Preparing a bind9 release - -Here's a rough outline of the steps to follow in preparing a new bind9 -release. - - - Update the README file - - - Send the new README file to webteam@nominum.com at least 48 - hours prior to the planned release and ask them to prepare - the web pages for the new version. If there have been only - minor changes, send context diffs relative to the previous - release instead. - - - Do a "cvs update" to check that all changes have been committed. - - - Verify that the file "version" contains the correct version - number (it should have been incremented after the - previous release) - - - If building from a release branch, check that any important - bug fixes made on the mainline since the last release have - been pulled up. You can do this by comparing the CHANGES - files using the util/check-pullups.pl script. For example, - running the script from a mainline tree: - - perl util/check-pullups.pl CHANGES ../9.2/CHANGES ../9.2/EXCLUDED - - This will list all bug fixes on the mainline that are not - on the 9.2 release branch. - - - Before creating a new release branch, update the lib/*/api files - as needed. See the libtool info file for information about what - the various numbers mean. - - cvs rdiff -r -r bind9/lib > diff - - e.g. - - cvs rdiff -r v9_4_0rc2 -r v9_4 bind9/lib > diff - - - Check that https://internal.isc.org/bind-build/ - shows a clean build and test status for all supported - systems and that the tests are actually being run on the - version being released (the version can be found in the - page behind the "Source tar build" link). - - - Check that running "make all_tests" in bin/tests does not - produce compile errors. - - - Regenerate the documentation by running "make man" (mainline/9.2) - or by running genhtml.sh in doc/arm (9.1 release branch) - and commit it. Note that not all machines have the - necessary XML tools, but at least trebuchet, cuba, - and Scanner's machine do. Commit any files that were - regenerated. - - Most of this has now been automated, only doc/arm/ARM.pdf will - not be committed: - ssh tbox@docs.lab.isc.org - run this command from crontab. -1 1 * * * /usr/bin/lockf -s -t 0 /udir/tbox/bind9-documents/regenerate.lock /udir/tbox/bind9-documents/regenerate - - Check to see if the ARM has changed since the last release - and if it has commit doc/arm/ARM.pdf. - e.g. - cvs rdiff -r v9_6_1 -r v9_6 bind9/doc/arm - cd bind9-documents/bind9.v9_6 - cvs commit doc/arm/ARM.pdf - - - Verify that the documents in doc/misc are up-to-date. - - - Update the copyrights. - - ssh tbox@cvs.isc.org - run these two command from the crontab -# -# Merge and Update copyrights -# -30 23 * * * /usr/bin/lockf -s -t 3600 /udir/tbox/tarballs/build-tarballs.lock /bin/sh /udir/tbox/tarballs/mergecopyrights -45 23 * * * /usr/bin/lockf -s -t 3600 /udir/tbox/updatecopyrights/updatecopyrights.lock /bin/sh /udir/tbox/updatecopyrights/updatecopyrights - - When tbox@cvs.isc.org is not available: - - Go to the root of the source tree. - The scripts need to be run from there; they reference the util - subdirectory internally. - - $ make distclean - ... [I prefer to check out a fresh source tree --gson] - $ perl util/merge_copyrights - $ diff util/copyrights util/newcopyrights - ... examine output, particularly any files with the "?" type, and - ... then edit util/newcopyrights if necessary - $ mv util/newcopyrights util/copyrights - $ cvs ci -m'merge_copyrights' util/copyrights - $ perl util/update_copyrights < util/copyrights - $ cvs diff - ... examine output, edit as necessary. mail me about anything that - ... the script should have been able to do itself. :-) - $ cvs ci -m'update_copyrights' - - - Announce a CVS freeze if doing an alpha or beta release from - the mainline, or stop doing pullups if building from a release branch. - - - Run util/altbuild.sh. This is to make sure that - builds using libtool, separate source/object directories, and other - obscure build options work. This script may need some hacking if run - on anything other than NetBSD. Save the output (it's big) and look - for error and warning messages. - - cd $top_of_mainline_tree - sh util/altbuild.sh v9_0 - - or - - cd $top_of_9_1_tree - sh util/altbuild.sh v9_1 - - Alteratively, you can do this after building the kit, by giving - the kit .tar.gz file as an argument to altbuild.sh instead of - the CVS tag. - - - If you can (= your system is similar enough to the one Tale is using), - check the header files for cruft by running the command - [ This step is quite imperfect and should probably be skipped - for now -- Tale ] - - find lib -name '*.h' -print | xargs perl util/check-includes.pl - - - Add a marker line like " --- 9.0.0rc10 released ---" - to the CHANGES file. - - - Tag the CVS source tree with the final tag, as in - "cvs rtag v9_0_0rc1 bind9" (mainline) or - "cvs rtag -r v9_2 v9_2_0rc10 bind9" (release branch). - - - Build the release kit. This procedure differs - between the 9.0 release branch and later versions. - On the 9.0 release branch, - - cd - cvs export -r v9_0_0rc10 bind9 - cd bind9 - sh configure - make kit - - On the 9.[1-2] release branch or mainline, use the - "util/kit.sh" script. - - - Build bind9 from the kit on ns-ext (phred) - and ns-int (rc), install it, and let it run for - a day keeping an eye on it for any problems. - - ssh phred.isc.org - ver=9.2.0 - scp rc.isc.org:bind-$ver.tar.gz . - gunzip /proj/build-reports/bind9/tarsrc.txt 2>&1 - - # - # run the bind 9 build status report generator - # - 30 3-22 * * * perl $HOME/b9t/bin/b9status.pl \ - > /proj/build-reports/bind9/bind9.html 2> /dev/null - - -Each host has a separate crontab entry for building the server and -running tests. Here are examples from bb and sol: - - # - # build the BSD-3.1 version of bind 9 - # - 0 3-22 * * * $HOME/b9t/bin/b9t.cron BSD-3.1 - - # - # bind 9 build for Solaris 5.6 - # - 0 3-22 * * * $HOME/b9t/bin/b9t.cron SunOS-5.6 - -Do not confuse the shell script ~wpk/b9t/bin/b9t.cron with the crontab -template (?) ~wpk/b9t/b9t.cron. Although they have the same name, -they are not related. - -The shell script b9t.cron then calls make, using the makefile b9t.mk -in the same location. This makefile moves the old status files out of -the way and runs through the tests. - -The current test schedule is as follows: - - :35 CVS tree extracted, tarball built and distributed - :00 Most tests begin - :45 Status report generator runs (was :30) - - bb: Build starts at top of hour, 0300 to 2200 - durango: Build starts at top of hour, 0300 to 2200 - trantor: Build starts at top of hour, 0300 to 2100, odd-numbered hours - only - hp: Build starts at top of hour, 0300 to 2200 - irix: Build starts at top of hour, 0300 to 2200 - netbsd: Build starts at top of hour, 0300 to 2200 (was :45) - aa: Build starts at top of hour, 0300 to 2200 - rc: Build starts at top of hour, 0300 to 2200 - mirepoix: Build starts at top of hour, 0300 to 2200 - sol: Build starts at top of hour, 0300 to 2200 - truffle: Build starts at top of hour, 0300 to 2200 - anthrax: Build starts at top of hour, 0300 to 2200 - -The actual builds take place in a directory whose location differs -among systems. On most of them, it's on a local disk, under /build. -On some, it's on NFS; in this case the location is defined in -~wpk/b9t/hosts/$PLATFORM/env. - -The output from the make process is in -~wpk/b9t/hosts/$PLATFORM/b9t-status, and the output from -The output from the later stages of the process is under -/proj/build-reports/bind9/hosts/$PLATFORM. To make the files -harder to find (?), they have names starting with a period: - - .populate - .config - .build - .test - - -* Common problems - -Sometime named processes fail to die when the tests are done, -interfering with the next test. Just kill them. - -On hp.rc.vix.com, the tests often fail because of NFS I/O errors. -When this happens, the machine needs to be rebooted. It will not -come up again without manually entering commands on the console. - -On bb, the tests sometimes fail because .nfs* files stuck in the build -tree keep it from being completely deleted when the next test runs. -The .nfs* files cannot be deleted, but they can be moved, so one way -of fixing this is to move them to ~wpk. - -On aix, the tests routinely fail with an assertion failure related -to omapi socket handling - see RT #507. - - -* Failure locking - -When a test fails, further testing on that host is disabled in order -to preserve evidence. Also, tests don't start if they are already -running. Both of these rules are enforce through "lockout files" -craeted in /proj/build-reports/bind9/hosts/*/. - -To remove the lockout and allow more tests to be run, log in to bb, -su, su wpk, and remove any "failed" and "running" files: - - rm /proj/build-reports/bind9/hosts/*/failed - rm /proj/build-reports/bind9/hosts/*/running - -The "failed" file contains the time of failure, which is not -particularly useful. The more useful information is in the various -log files under the build report. diff --git a/util/branchsync.sh b/util/branchsync.sh deleted file mode 100644 index 0a3855384d..0000000000 --- a/util/branchsync.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/sh -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# branchsync: -# pull in changes from a main BIND 9 release branch to a subscription -# branch (e.g., from v9_9 to v9_9_sub). This excludes commits from the -# 'tinderbox' user (copyright updates and doc regeneration) because those -# will be taken care of in the subscription branch itself. -# -# Most of the time, changes in the main branch will cherry-pick cleanly -# into the subscription branch. When one fails, we reset to the last -# commit that went cleanly, and send mail -- or, if running in interactive -# mode, we stop and allow the user to resolve conflicts. -# -# NOTE: This does not push changes to the repository; currently that's up -# to the caller. -# -# Usage: -# branchsync.sh [ -i ] [ -c ] -# -i: interactive mode (don't reset and send mail) -# -c: continue (conflicts are resolved; edit message and commit) - -restore_files () { - # restore the copyrights and api files - git checkout HEAD -- util/copyrights lib/*/api - # restore the generated documentation - git checkout HEAD -- doc/arm/*.html doc/arm/Bv9ARM.pdf - git checkout HEAD -- bin/*/*.html bin/*/*.[0-9] - # don't update the EXCLUDED file - if [ -f EXCLUDED ]; then - git checkout HEAD -- EXCLUDED - fi -} - -savehash () { - cat < $1.new -SOURCEBRANCH=$2 -LASTHASH=$3 -EOF - mv -f $1.new $1 - git add branchsync.dat -} - -thisbranch () { - git branch | grep '^\*' | cut -b3- -} - -docommit () { - # skip the commit if we're only updating branchsync.dat - status=`git status -suno | grep branchsync.dat` - if [ -z "$status" ]; then - return - fi - - # pull in the log message from the cherry-picked commit - git log -1 --pretty=format:%s%n%b $2 > orig_commit_msg.tmp - author=`git log -1 --pretty=format:"%aN <%aE>" $2` - firstline=`head -1 orig_commit_msg.tmp | sed 's/^\[[a-z0-9_]*\] //'` - tail -n +2 orig_commit_msg.tmp > remainder.tmp - firstline="[$BRANCH] $firstline" - echo $firstline > commit_msg.tmp - cat remainder.tmp >> commit_msg.tmp - echo "pulled from $1 by script." >> commit_msg.tmp - echo "hash: $2" >> commit_msg.tmp - msg=`cat commit_msg.tmp` - rm -f orig_commit_msg.tmp commit_msg.tmp remainder.tmp - - # commit - git commit --no-verify --no-edit --author="$author" -m "$msg" || exit 1 -} - -BRANCH=`thisbranch` - -if [ ! -f branchsync.dat ]; then - echo "$0: branchsync data file not found" - exit 0 -fi - -. branchsync.dat - -# check arguments -interactive= -continuing= -case $1 in - '-i') interactive=yes - ;; - '-c') docommit $SOURCEBRANCH $LASTHASH - interactive=yes - continuing=yes - ;; - *) if [ $# -ne 0 ]; then - echo "Usage: $0 [ -i ] [ -c ]" 1>&2 - exit 1 - fi - ;; -esac - -if [ -z "$continuing" ]; then - status=`git status -suno` - if [ -n "$status" ]; then - echo "Work tree is not clean. Clean up, or run with -c:" - echo "$status" - exit 1 - fi - - # make sure both branches are synced to the source repository - git pull origin $BRANCH > /dev/null 2>&1 - git checkout -f $SOURCEBRANCH > /dev/null 2>&1 - git pull origin $SOURCEBRANCH > /dev/null 2>&1 - git checkout -f $BRANCH > /dev/null 2>&1 -fi - -# loop through commits looking for ones that should be cherry-picked -git log $SOURCEBRANCH --first-parent --reverse --format='%H %aN' $LASTHASH..$SOURCEBRANCH | \ - awk '$0 !~ /Tinderbox/ {print $1}' | { - while read hash; do - mainline= - if [ `git cat-file -p ${hash} | grep '^parent [0-9a-f][0-9a-f]*$' | wc -l` -gt 1 ]; then - mainline="-m 1 " - fi - if git cherry-pick ${mainline} -xn ${hash}; then - # cherry-pick was clean - # restore the files that we don't want updated automatically - restore_files - - # note which hash we're merging - savehash branchsync.dat $SOURCEBRANCH $hash - - # fix the commit message, and commit - docommit $SOURCEBRANCH $hash - - # move on to the next commit - continue - elif [ -n "$interactive" ]; then - # interactive mode -- wait for user to fix things - # first restore the files that we don't want updated automatically - restore_files - - # note which hash we're merging - savehash branchsync.dat $SOURCEBRANCH $hash - else - # noninteractive mode - # reset everything - git reset --hard - - # build mail message - subject="Branch sync to $BRANCH failed" - cat << EOF > /tmp/branchmsg.$$ -Attempt to cherry pick ${hash} -to $BRANCH failed. - -Commit message of change was: -`git log -1 --pretty=format:%s%n%b ${hash}` -EOF - - # send mail - cat /tmp/branchmsg.$$ | mail -s "$subject" bind-changes@isc.org - rm /tmp/branchmsg.$$ - fi - - break - done -} diff --git a/util/check-sources.pl b/util/check-sources.pl deleted file mode 100644 index 596a58a0cb..0000000000 --- a/util/check-sources.pl +++ /dev/null @@ -1,255 +0,0 @@ -#! /usr/bin/perl -ws -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# Rudimentary, primarily for use by the developers. -# This just evolved with no serious attempt at making it -# bulletproof or foolproof. Or pretty even. Probably would -# have done it differently if it were actually designed as opposed -# to just growing as a multi-tentacled thing as various messages -# were either added or selectively silenced. - -use strict; -use vars qw($help $debug); - -sub -sortdir() { - if (-d $::a) { - if (-d $::b) { - return ($::a cmp $::b); - } else { - return (-1); - } - } elsif (-d $::b) { - return (1); - } else { - return ($::a cmp $::b); - } -} - -sub -do_dir($$) { - my($predir, $dir) = @_; - - my $newdir = $predir ne "" ? "$predir/$dir" : $dir; - - print "================> $newdir\n"; - - unless (chdir("$dir")) { - print "cd $newdir: $1\n"; - return; - } - - unless (opendir(DIR, ".")) { - print "opendir $predir/$dir: $!\n"; - return; - } - - foreach my $entry (sort sortdir readdir(DIR)) { - next if $entry =~ /^\.\.?$/; - - if (-d $entry) { - do_dir($newdir, $entry); - next; - } - - next if $entry !~ /\.o$/; - - do_file($entry); - } - - closedir(DIR); - - chdir("..") or - die "major malfunction: can't chdir to parent dir: $!\n"; - - print "================> $predir\n"; -} - -sub -do_file($) { - my $objfile = $_[0]; - my ($file, $savesource, $saveobj); - my ($config_h, $cpp_if, $prefix, $elided, $comment, $prefix_extend, $body); - - unless ($objfile =~ /\.o$/) { - print "$0: skipping non-object file $objfile\n"; - return; - } - - ($file = $objfile) =~ s%\.o$%.c%; - ($savesource = $file) =~ s%$%.save%; - ($saveobj = $objfile) =~ s%$%.save%; - - if (-f $savesource) { - print "$savesource exists, skipping\n"; - return; - } - - unless (-f $file) { - print "$file does not exist, skipping\n"; - return; - } - - rename($file, $savesource); - rename($objfile, $saveobj); - - open(SOURCE, "< $savesource"); - $_ = join('', ); - close(SOURCE); - - $prefix = ''; - - print "$file begin\n" if $debug; - - while (1) { - eval { - # Note that only '#include <...>' is checked, not '#include "..."'. - # 1 23 4 5 6 78 - if (m%(\A\Q$prefix\E((.*\n)*?))(\#include\s+(<.*?>)(.*)\n)((.*\n)*)%) { - $elided = $5; - $prefix_extend = $2 . $4; - $comment = $6; - $body = $1 . $7; - } else { - print "$file end\n" if $debug; - $elided = ""; # stop processing this file. - } - }; - - if ($@ ne "") { - print "$file processing failed: $@\n"; - last; - } - - last if $elided eq ""; - - print STDERR "$file checking $elided\n" if $debug; - - if (! $config_h) { - $config_h = 1; - if ($elided ne "") { - print "$file should include before any other\n"; - } - } - - # Always required. - next if $elided eq ""; - - # Can mark in the header file when a #include should stay even - # though it might not appear that way otherwise. - next if $comment =~ /require|provide|extend|define|contract|explicit/i; - - if ($elided eq "") { - next if m%snprintf%m; - } - - open(SOURCE, "> $file"); - print SOURCE "$body"; - close(SOURCE); - - print "$file elided $elided, compiling\n" if $debug; - - if (compile($objfile) == 0) { - if (! defined($cpp_if)) { - $cpp_if = /^#if/m; - print "$file has CPP #if(def), doublecheck elision recommendations.\n" - if $cpp_if; - } - print "$file does not need $elided\n"; - } elsif ($elided eq "") { - print "$file prefer to \n"; - } - - } continue { - $prefix .= $prefix_extend; - } - - rename($savesource, $file); - rename($saveobj, $objfile); -} - -sub -compile($) { - my $obj = $_[0]; - - unless ($obj =~ /\.o$/) { - warn "$obj: not a .o object file\n"; - return; - } - - my $output = $debug ? "/dev/tty" : "/dev/null"; - - open(COMPILE, "make -e $obj 2>&1 >$output |"); - my $stderr_lines = join('', ); - print $stderr_lines if $debug; - close(COMPILE); - - unlink($obj); - - return ($stderr_lines ne ""); -} - -sub -main() { - $| = 1; - - $0 =~ s%.*/%%; - - die "Usage: $0 [-debug]\n" if $help; - - unless (-f 'configure' && -f 'Makefile') { - die "$0: run from top of bind9 source tree, after configure has run\n"; - } - - print "========================\n"; - print "building initial objects\n"; - print "========================\n"; - - # XXX bleah - unless (system("make") == 0) { - die "make all failed, couldn't be sure all objects were generated.\n"; - } - - unless (system("cd bin/tests && make -k all_tests") == 0) { - warn "make all_tests failed, but pressing on anyway\n"; - } - - print <&2 - exit 1 - ;; - esac - snapshot=true; - releasetag=$2 - tag=$2 - tmpdir=$3 - ;; - 2) - tag=$1 - tmpdir=$2 - case $tag in - snapshot) tag=master; snapshot=true ; releasetag="" ;; - *) snapshot=false ;; - esac - ;; - *) echo "usage: sh kit.sh [snapshot] gittag tmpdir" >&2 - exit 1 - ;; -esac - -# create tmpdir -test -d $tmpdir || -mkdir $tmpdir || { - echo "$0: could not create directory $tmpdir" >&2 - exit 1 -} - -cd $tmpdir || { - echo "$0: cd $tmpdir failed" - exit 1 -} - -hash=`git ls-remote $repo refs/heads/$tag | awk '{print $1}'` -if [ -z "$hash" ]; then - hash=`git ls-remote $repo refs/tags/$tag | awk '{print $1}'` -fi -if [ -z "$hash" ]; then - echo "Unable to determine hash for $tag, aborting." - exit 1 -fi -shorthash=`echo $hash | cut -c1-7` - -verdir=bind9-kit.$$ -mkdir $verdir || { - echo "$0: could not create directory $tmpdir/$verdir" >&2 - exit 1 -} -git archive --format=tar $remote $tag version | ( cd $verdir ;tar xf - ) -test -f $verdir/version || { - echo "$0: could not get 'version' file" >&2 - exit 1 -} -. $verdir/version - -rm $verdir/version -rmdir $verdir - -if $snapshot -then - RELEASETYPE=s - RELEASEVER=${shorthash} -fi - -version=${MAJORVER}.${MINORVER}${PATCHVER:+.}${PATCHVER}${RELEASETYPE}${RELEASEVER}${EXTENSIONS} - -echo "building release kit for BIND version $version, hold on..." - -topdir=bind-$version - -test ! -d $topdir || { - echo "$0: directory $tmpdir/$topdir already exists" >&2 - exit 1 -} - -mkdir $topdir || exit 1 - -git archive --format=tar $remote $tag | ( cd $topdir; tar xf -) - -cd $topdir || exit 1 - -if $snapshot -then - cat <version -MAJORVER=$MAJORVER -MINORVER=$MINORVER -PATCHVER=$PATCHVER -RELEASETYPE=$RELEASETYPE -RELEASEVER=$RELEASEVER -EXTENSIONS=$EXTENSIONS -EOF -fi - -# Omit some files and directories from the kit. -# -# Some of these directories (doc/html, doc/man...) no longer -# contain any files and should therefore be absent in the -# checked-out tree, but they did exist at some point and -# we still delete them from releases just in case something -# gets accidentally resurrected. - -rm -rf TODO EXCLUDED conftools doc/design doc/dev doc/draft doc/expired \ - doc/html doc/rfc doc/todo doc/private doc/man doc/markdown \ - contrib/zkt/doc/rfc5011.txt \ - bin/tests/system/relay lib/cfg - -# Remove everything but mksymtbl.pl and bindkeys.pl from util -find util -name bindkeys.pl -o -name mksymtbl.pl -prune -o -type f -print | xargs rm -f -find util -depth -type d -print | xargs rmdir 2>/dev/null - -# Remove all .gitignore files -find . -name .gitignore -print | xargs rm - -# Remove branchsync.dat, if present -rm -f branchsync.dat - -# populate srcid file -echo "SRCID=$shorthash" > srcid - -# The following files should be executable. -chmod +x configure install-sh mkinstalldirs bin/tests/system/ifconfig.sh -# Fix up releases with libbind. -if test -f lib/bind/configure -then - chmod +x lib/bind/configure lib/bind/mkinstalldirs -fi - -# check that documentation has been updated properly; issue a warning -# if it hasn't -ok= -for f in doc/arm/*.html -do - if test "$f" -nt doc/arm/Bv9ARM-book.xml - then - ok=ok - fi -done - -if test "$ok" != ok -then - echo "WARNING: ARM source is newer than the html version." -fi - -if test doc/arm/Bv9ARM-book.xml -nt doc/arm/Bv9ARM.pdf -then - echo "WARNING: ARM source is newer than the PDF version." -fi - -for f in `find . -name "*.docbook" -print` -do - docbookfile=$f - htmlfile=${f%.docbook}.html - if test $docbookfile -nt $htmlfile - then - echo "WARNING: $docbookfile is newer than the html version." - fi -done - -# build the tarball -cd .. || exit 1 - -kit=$topdir.tar.gz -tar -c -f - $topdir | gzip > $kit -echo "done, kit is in `pwd`/$kit" diff --git a/util/mandoc2docbook.pl b/util/mandoc2docbook.pl deleted file mode 100644 index 901ea88b1b..0000000000 --- a/util/mandoc2docbook.pl +++ /dev/null @@ -1,230 +0,0 @@ -#!/usr/bin/perl -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# -# Do a quick-and-dirty conversion of .mandoc man pages to -# DocBook SGML. -# -# Minor hand editing of the output is usually required. -# This has only been tested with library function man pages -# (section 3); it probably does not work well for program -# man pages. -# - -print <<\END; - - - - - -END - -my $cursection = undef; - -my $in_para = 0; - -sub begin_para() { - if (! $in_para) { - print "\n"; - $in_para = 1; - } -} -sub end_para() { - if ($in_para) { - print "\n"; - $in_para = 0; - } -} - - -sub end_section { - if ($cursection) { - print "\n" - } -} - -sub section { - my ($tag) = @_; - end_para(); - end_section(); - print "<$tag>\n"; - $cursection = $tag; -} - -my %tagmap = ( - Er => errorcode, - Dv => type, - Pa => filename, - Li => constant, # XXX guess - Ar => parameter, - Va => parameter, -); - -while (<>) { - next if m/^\.\\\"/; - if (/^\.Dd (.*)$/) { - print "$1<\/date>\n<\/refentryinfo>\n"; - next; - } - elsif (/^\.Dt ([^ ]+) ([^ ]+)$/) { - my $title = lc $1; - my $volume = $2; - chomp $volume; - print < -$title -$volume -BIND9 - -END - next; - } - elsif (/^\.Os (.*)$/) { - next; - } - elsif (/^\.ds (.*)$/) { - next; - } - elsif (/^\.Nm (.*)$/) { - if ($cursection eq "refnamediv") { - my $t = $1; - $t =~ s/ ,$//; - print "$t<\/refname>\n"; - } else { - print "$1<\/command>\n"; - } - next; - } - elsif (/^\.Nd (.*)$/) { - print "$1\n"; - next; - } - elsif (/^\.Sh NAME/) { section("refnamediv"); next; } - elsif (/^\.Sh SYNOPSIS/) { section("refsynopsisdiv"); next; } - elsif (/^\.Sh (.*)$/) { - section("refsect1"); - print "$1\n"; next; - } - # special: spaces can occur in arg - elsif (/^\.Fd (.*)$/) { - $_ = $1; - s//>/g; - print "$_<\/funcsynopsisinfo>\n"; - next; - } - elsif (/^\.Fn (.*?)( ([^"]+))?$/) { - # special: add parenthesis - print "$1()<\/function>$3\n"; - } - elsif (/^\.Op Fl (.*?)( ([^"]+))?$/) { - # special: add dash - print "\n"; diff --git a/util/mdnbuildtest.sh b/util/mdnbuildtest.sh deleted file mode 100644 index 75de9fd69d..0000000000 --- a/util/mdnbuildtest.sh +++ /dev/null @@ -1,65 +0,0 @@ -#! /bin/sh -ex -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# XXXDCL This is currently much too specific to the environment in which -# it was written (NetBSD 1.5_alpha2 with libiconv in /usr/local/lib). It -# is essentially just a copy of the commands I used to test building of -# the mdnkit contributed source, and needs to be better generalized. - -# Directory was prepared with: -# cvs export -r {tag} bind9 -# cd bind9 - -sh -ex util/sanitize_all.sh - -mdn=`pwd`/contrib/idn/mdnkit - -set +e -patch -p0 < $mdn/patch/bind9/patch.most > patch.out 2>&1 -set -e - -cmd="egrep '^Hunk' patch.out | egrep -v '^Hunk #[0-9]+ succeeded at [0-9]+\.$'" -if eval $cmd | egrep -q .; then - echo Patch was not entirely clean: >&2 - $cmd >&2 - echo Patch output is in patch.out. >&2 - exit 1 -fi - -cd $mdn - -CFLAGS=-I/usr/local/include ./configure --with-iconv='-L/usr/local/lib -liconv' -make - -cd ../../.. - -cp configure configure.orig -autoconf -set +e -diff -u2 ./configure.orig ./configure > $mdn/patch/bind9/patch.configure -set -e - -make - -make distclean > /dev/null 2>&1 - -mdntmp=tmp/mdn - -rm -rf $mdntmp -mkdir -p $mdntmp/lib $mdntmp/include -cp $mdn/lib/.libs/libmdn.so $mdntmp/lib -cp -r $mdn/include/mdn $mdntmp/include - -./configure --with-mdn=$mdntmp --with-iconv="-L/usr/local/lib -liconv" - -LD_LIBRARY_PATH=/usr/local/lib:$mdntmp/lib:/usr/lib make - -exit 0 diff --git a/util/spacewhack.pl b/util/spacewhack.pl deleted file mode 100644 index a9e70e4a37..0000000000 --- a/util/spacewhack.pl +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/local/bin/perl -w -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -$0 =~ s%.*/%%; - -if (@ARGV != 0) { - warn "Usage: $0 < list-of-files\n"; - warn "The util/copyrights file is normally used for list-of-files.\n"; - exit(1); -} - -$total = 0; - -printf "Lines Trimmed:\n"; - -while (defined($line = )) { - ($file) = split(/\s+/, $line, 2); - - # These are binary and must be ignored. - next if $file =~ m%/random.data|\.gif$%; - next if -B $file; - - print "$file\n"; - - unless (open(FILEIN, "< $file")) { - warn "$0: open < $file: $!, skipping\n"; - next; - } - - undef $/; # Slurp whole file. - $_ = ; - $/ = "\n"; # Back to line-at-a-time for . - - close(FILEIN); - - $count = s/[ \t]+$//mg; - - next unless $count > 0; - - unless (open(FILEOUT, "> $file")) { - warn "$0: open > $file: $!, skipping\n"; - next; - } - - print FILEOUT or die "$0: printing to $file: $!, exiting\n"; - close FILEOUT or die "$0: closing $file: $!, exiting\n"; - - printf("%6d lines trimmed in $file\n", $count) if $count > 0; - - $total += $count; -} - -printf "%6d TOTAL\n", $total; - -exit(0); - diff --git a/util/update-drafts.pl b/util/update-drafts.pl deleted file mode 100644 index 5fd22e0e28..0000000000 --- a/util/update-drafts.pl +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/local/bin/perl -w -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# -# Replace internet drafts with updated versions, if any. -# -# Usage: -# -# cd doc/draft -# perl ../../util/update-drafts.pl *.txt -# (ignore "404 Not Found" errors from FTP) -# cvs commit -m"updated drafts" -# - -foreach (@ARGV) { - $ofile = $_; - if (/^(.*-)([0-9][0-9])(\.txt)/) { - $nfile = "$1" . sprintf("%02d", $2 + 1) . "$3"; - print $nfile, "\n"; - system "ftp http://www.ietf.org/internet-drafts/$nfile"; - if ($? == 0) { - unlink($ofile); - system "cvs remove $ofile"; - system "cvs add $nfile"; - } - } -} diff --git a/util/update_branches b/util/update_branches deleted file mode 100644 index 5a3c5e0b8b..0000000000 --- a/util/update_branches +++ /dev/null @@ -1,218 +0,0 @@ -#!/usr/local/bin/perl -w -# -# Copyright (C) Internet Systems Consortium, Inc. ("ISC") -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, you can obtain one at https://mozilla.org/MPL/2.0/. -# -# See the COPYRIGHT file distributed with this work for additional -# information regarding copyright ownership. - -# -# Track which branches are still open or not in the bind9 cvs repository. -# This is done so that work that is "in progress" (active) doesn't get -# so easily forgotten about. -# -# This script updates doc/private/branches by adding new branches and moving -# closed branches to the end of the file. New branches are found by walking -# the cvs repository and extracting the new branches from the header fields -# of the files there. -# -# doc/private/branches has one line per branch in the following field order: -# name, status, to whom the branch belongs and comments. Comments are -# in '(',')'. The first three field are single words. -# -# Note: this is intended to be run on the machine hosting the CVS repository. -# - -%branches = (); -%whom = (); -%comments = (); -%history = (); -%dates = (); -$repository = "/proj/cvs/prod"; -$module = "bind9"; - -# -# Make sure we have a up to date copy. If the previous ran failed for -# any reason remove it (-C). -# -!system("cvs", "-d", $repository, "update", "-C", "doc/private/branches") || die "cannot update doc/private/branches: $!"; - -# -# load existing content -# -open(BRANCHES, ") { - my $branch; - my $status; - my $who; - chomp; - next if (/^-/); - next if (/^Branch/); - next if (/^\s/); - $c = ""; - if (m://.*:) { - $c = $_; - $c =~ s:.*?//\s*(.*)$:$1:; - s:(.*?)//.*:$1:; - } else { - # - # look for old style comment - # - if (m/\(.*\)/) { - $c = $_; - $c =~ s/.*\((.*)\).*$/$1/; - s/\(.*\)//; - } - } - s/\s*$//; - next if (/^\s*$/); - ($branch, $status, $who) = split; - $status = "new" if (!defined($status)); - $branches{$branch} = $status; - $who = "" if (!defined($who)); - $whom{$branch} = $who; - $comments{$branch} = $c; -} -close (BRANCHES); - -# T 1999-03-15 21:15 +0000 vixie bind [ietf44:A] -open(HISTORY, "cvs history -T -a 2> /dev/null |") || die("can't get history"); -while () { - my $tag; - my $date; - my $time; - my $tz; - my $who; - my $mod; - my $branch; - chomp; - s/[][]//g; - s/:[^ \t]+$//; - s/\s+/ /g; - ($tag, $date, $time, $tz, $who, $mod, $branch) = split; - next if ($mod ne $module ); - next if ($tag ne "T" ); - next if (exists($history{$branch})); - $history{$branch} = $who; - $dates{$branch} = "$date $time $tz"; - # print "$_\n"; -} -close (HISTORY); - -# -# Search repository for new branches. -# -# New branches have the following format "name:.0.#" -# where # is the number of potential branches from this the revision. -# -open(FILES, "find $repository/$module -type f -name *,v -print |") || die "can't start find: $!"; -while () { - chomp; - # print "file: $_\n"; # debug - # $file = $_; # save for branch debug below. - s:^$repository/::; - s:/Attic/([^/]*)$:/$1:; - s:,v$::; - # - # use cvs so that the file is locked. - # - #print "cvs -d $repository rlog -h $_\n"; - open(FILE, "cvs -d $repository rlog -h $_|") || die "can't start cvs rlog -h $_: $!"; - while () { - chomp; - next unless m/^symbolic names:$/; # skip until we find the tags - while () { - chomp; - last if (m/^locks;/); # we are past the tags - last if (m/^keyword/); # we are past the tags - next unless m/\.0\.\d+$/; # skip if not a branch - s/\s(.*):.*/$1/; # extract label - if (!$branches{$_}) { - $branches{$_} = "new"; - if (exists($history{$_})) { - $whom{$_} = $history{$_}; - $comments{$_} = $dates{$_}; - } else { - $whom{$_} = ""; - $comments{$_} = ""; - } - # print "branch: $_ $file\n"; # debug - } - } - chomp while (); # let cvs rlog exit normally. - } - close(FILE); -} -close(FILES); - -# -# Write out updated version. -# -open(BRANCHES, ">doc/private/newbranches") || die "can't open doc/private/branches: $!"; -print BRANCHES "\nBranch\t\t\t\tStatus\tWhom\t// Comments\n"; -print BRANCHES "-----------------------------------------------------------\n\n"; -print BRANCHES "\t\t\t\tnew\t\tnot yet classified\n"; -print BRANCHES "\t\t\t\topen\t\tdevelopement branch\n"; -print BRANCHES "\t\t\t\tactive\t\tnot a development branch\n"; -print BRANCHES "\t\t\t\treview\t\tready for review\n"; -print BRANCHES "\t\t\t\tprivate\t\tprivate branch\n"; -print BRANCHES "\t\t\t\tclosed\t\tfinished with\n"; -print BRANCHES "\n"; -foreach $key (sort keys %branches) { - next if ($branches{$key} eq "closed"); - print BRANCHES "$key"; - $len = length($key); - if ($len >= 32) { - $tabs = 1; - } else { - $needed = int (32 - $len); - $tabs = int ($needed / 8); - if ($needed % 8 != 0) { - $tabs++; - } - } - for ($i = 0; $i < $tabs; $i++) { - printf BRANCHES "\t"; - } - print BRANCHES "$branches{$key}\t"; - print BRANCHES "$whom{$key}"; - print BRANCHES "\t// $comments{$key}" if ($comments{$key} ne ""); - print BRANCHES "\n"; -} - -print BRANCHES "\n\n"; - -foreach $key (sort keys %branches) { - next if ($branches{$key} ne "closed"); - print BRANCHES "$key"; - $len = length($key); - if ($len >= 32) { - $tabs = 1; - } else { - $needed = int (32 - $len); - $tabs = int ($needed / 8); - if ($needed % 8 != 0) { - $tabs++; - } - } - for ($i = 0; $i < $tabs; $i++) { - printf BRANCHES "\t"; - } - print BRANCHES "$branches{$key}"; - print BRANCHES "\t\t// $comments{$key}" if ($comments{$key} ne ""); - print BRANCHES "\n"; -} -close(BRANCHES); - -# -# Update if changed. -# -if (system("cmp", "-s", "doc/private/newbranches", "doc/private/branches")) { - rename("doc/private/newbranches", "doc/private/branches") || die "Cannot rename: doc/private/newbranches -> doc/private/branches: $!"; - !system("cvs", "-d", $repository, "commit", "-m", "auto update", "doc/private/branches") || die "cvs commit failed: $!"; -} else { - unlink("doc/private/newbranches"); -}