From 65dfcdc392b93f9d67684adce8b33a1d8168e67c Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Mon, 7 May 2001 23:04:11 +0000 Subject: [PATCH] script and procedure for checking for missing pullups --- doc/dev/release | 13 +++++++++++- util/check-pullups.pl | 49 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 util/check-pullups.pl diff --git a/doc/dev/release b/doc/dev/release index 66af0957ad..ad52d5582f 100644 --- a/doc/dev/release +++ b/doc/dev/release @@ -1,7 +1,7 @@ Copyright (C) 2000, 2001 Internet Software Consortium. See COPYRIGHT in the source root or http://isc.org/copyright.html for terms. -$Id: release,v 1.31 2001/05/07 22:01:12 gson Exp $ +$Id: release,v 1.32 2001/05/07 23:04:10 gson Exp $ Preparing a bind9 release @@ -23,6 +23,17 @@ release. - Update the lib/*/api files as needed. See the libtool info file for information about what the various numbers mean. + - If building from a relese 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.1/CHANGES + + This will list all bug fixes on the mainline that are not + on the 9.1 release branch. + - Check that http://status.isc.org/bind9/bind9.html shows a clean build and test status for all supported systems. diff --git a/util/check-pullups.pl b/util/check-pullups.pl new file mode 100644 index 0000000000..1fc1914646 --- /dev/null +++ b/util/check-pullups.pl @@ -0,0 +1,49 @@ +#!/usr/bin/perl +# +# Given two CHANGES files, list [bug] entries present in the +# first one but not in the second one. +# + +use FileHandle; + +$/ = ""; + +# Read the CHANGES file $fn and return a hash of change +# texts and categories indexed by change number. + +sub readfile { + my ($fn) = @_; + my $fh = new FileHandle($fn, "r") + or die "open: $fn: $!"; + + my $changes = { }; + + my ($changeid, $category); + + while (<$fh>) { + if (m/---.* released ---/) { + next; + } elsif (m/^# /) { + next; + } elsif (m/^\s*(\d+)\.\s+\[(\w+)\]/) { + $changeid = $1; + $category = $2; + # print "*** $1 $2\n"; + } + $changes->{$changeid}->{text} .= $_; + $changes->{$changeid}->{category} = $category; + } + + return $changes; +} + +@ARGV == 2 or die "usage: $0 changes-file-1 changes-file-2\n"; + +my $c1 = readfile($ARGV[0]); +my $c2 = readfile($ARGV[1]); + +foreach my $c (sort {$a <=> $b} keys %$c1) { + if ($c1->{$c}->{category} eq "bug" && !exists($c2->{$c})) { + print $c1->{$c}->{text}; + } +}