]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Update scripts in util/ to drop the year information from the individual source files.
authorEvan Hunt <each@isc.org>
Thu, 15 Mar 2018 04:07:58 +0000 (21:07 -0700)
committerEvan Hunt <each@isc.org>
Thu, 15 Mar 2018 04:07:58 +0000 (21:07 -0700)
util/COPYRIGHT
util/COPYRIGHT.BRIEF
util/COPYRIGHT.BSDI
util/COPYRIGHT.NAI
util/COPYRIGHT.NOM
util/COPYRIGHT.PORTION
util/file_year.sh [deleted file]
util/merge_copyrights
util/recent_changes.sh [deleted file]
util/update_copyrights

index 938988a834ddb615b3377b36f6fae7d475e33ba0..c867f8570c3a30926759724e4d608a06328befcb 100644 (file)
@@ -1,5 +1,4 @@
-Copyright (C) @SYSYEARS@  Internet Systems Consortium, Inc. ("ISC")
-Copyright (C) @SFTYEARS@  Internet Software Consortium.
+Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 
 Permission to use, copy, modify, and/or distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
index 331ab81f646b2bc885d3064ada5e55978e35b160..d8a4983dee876b5a2cea4542bfd03e534941789a 100644 (file)
@@ -1,3 +1,3 @@
-Copyright (C) @SYSYEARS@  Internet Systems Consortium, Inc. ("ISC")
-Copyright (C) @SFTYEARS@  Internet Software Consortium.
+Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+
 See COPYRIGHT in the source root or http://isc.org/copyright.html for terms.
index 600838b5f52e6ba6654ca8d702009134bb3454f0..73b7966705d0b308fcd98f5821326fa2167394fb 100644 (file)
@@ -1,5 +1,7 @@
-Copyright (C) @SYSYEARS@  Internet Systems Consortium, Inc. ("ISC")
-Copyright (C) @SFTYEARS@  Internet Software Consortium.
+Copyright (C) Internet Systems Consortium, Inc. ("ISC")
+
+See the COPYRIGHT file distributed with this work for additional
+information regarding copyright ownership.
 
 This code is derived from software contributed to ISC by
 Berkeley Software Design, Inc.
index 8a13c7d7bb4b9acce58a221dc6629ffae07a1dc6..46b875cb9eb1874b3f45ba890e093581cd630ba9 100644 (file)
@@ -1,5 +1,4 @@
-Portions Copyright (C) @SYSYEARS@  Internet Systems Consortium, Inc. ("ISC")
-Portions Copyright (C) @SFTYEARS@  Internet Software Consortium.
+Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 
 Permission to use, copy, modify, and/or distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
@@ -13,7 +12,10 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
 IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-Portions Copyright (C) 1995-2000 by Network Associates, Inc.
+See the COPYRIGHT file distributed with this work for additional
+information regarding copyright ownership.
+
+Portions Copyright (C) Network Associates, Inc.
 
 Permission to use, copy, modify, and distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
index bb28fa3d449088fe78d5d8eb8e08c63640750ad3..97120b64dcbcf05391de32fffd97685a46f3e14e 100644 (file)
@@ -1,5 +1,4 @@
-Portions Copyright (C) @SYSYEARS@  Internet Systems Consortium, Inc. ("ISC")
-Portions Copyright (C) @SFTYEARS@  Internet Software Consortium.
+Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 
 Permission to use, copy, modify, and/or distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
@@ -13,7 +12,10 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
-Portions Copyright (C) @NOMYEARS@  Nominum, Inc.
+See the COPYRIGHT file distributed with this work for additional
+information regarding copyright ownership.
+
+Portions Copyright (C) Nominum, Inc.
 
 Permission to use, copy, modify, and distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
index a16f034f11cf44983216ad28f945283f281b8fa6..be5efebd9e822a108199a30644ab92388ee1519e 100644 (file)
@@ -1,5 +1,4 @@
-Portions Copyright (C) @SYSYEARS@  Internet Systems Consortium, Inc. ("ISC")
-Portions Copyright (C) @SFTYEARS@  Internet Software Consortium.
+Portions Copyright (C) Internet Systems Consortium, Inc. ("ISC")
 
 Permission to use, copy, modify, and/or distribute this software for any
 purpose with or without fee is hereby granted, provided that the above
diff --git a/util/file_year.sh b/util/file_year.sh
deleted file mode 100644 (file)
index a11bca5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-# $Id$
-
-# Given a file in the currently checked-out branch of the Git
-# repository, find out in what year it was most recently committed.
-# Used by merge_copyrights.
-
-rev=`git rev-list HEAD -- "$1" | head -n 1`
-git show --pretty=format:%ai $rev | head -n 1 | sed 's;-.*;;'
index 2f4a1786aebc3e3a631bb760e3a111167628411f..0e5b5239dc0fa900af51e43e67e90f71ec9532e7 100644 (file)
 # OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 # PERFORMANCE OF THIS SOFTWARE.
 
-# $Id$
-
 use strict;
 
 my %file_types = ();
 my %file_years = ();
-my %exists = ();
 
 open(COPYRIGHTS, "<util/copyrights") || die "can't open ./util/copyrights: $!";
 while (<COPYRIGHTS>) {
@@ -36,20 +33,10 @@ my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time());
 $sec = $min = $hour = $mday = $mon = $wday = $yday = $isdst = 0;
 $year += 1900;
 
-open(FILES, "git ls-files | sed 's;^;./;' |") || die "git ls-files: $!";
-while (<FILES>) {
-    chomp;
-    $exists{$_} = 1;
-}
-close(FILES);
-
-open(CHANGES, "sh util/recent_changes.sh |") || die "recent_changes.sh: $!";
+open(CHANGES, "git ls-files | sed 's;^;./;' | sort |") || die "git ls-files: $!";
 while (<CHANGES>) {
     chomp;
 
-    # this file isn't in the repository now
-    next unless ($exists{$_});
-
     next if (m%/\.\# |         # CVS old conflict file
               /CVS/ |          # CVS directory
               /.git/ |         # git directory
@@ -144,13 +131,9 @@ while (<CHANGES>) {
        } else {
            $file_types{$_} = "?";
        }
-       my $m_year = int(`sh util/file_year.sh $_`);
        if (($file_types{$_} eq "MAN" || $file_types{$_} eq "HTML") &&
            $base =~ /\.docbook$/ && -e $base) {
           $file_years{$_} = "DOCBOOK";
-       } elsif ($m_year != $year) {
-           print "$_: must set copyright year(s) manually\n";
-           $file_years{$_} = "????";
        } else {
            $file_years{$_} = "$year";
        }
diff --git a/util/recent_changes.sh b/util/recent_changes.sh
deleted file mode 100644 (file)
index 0002475..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#
-# Copyright (C) 2012, 2017  Internet Systems Consortium, Inc. ("ISC")
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-# PERFORMANCE OF THIS SOFTWARE.
-
-# Find the list of files that have been touched in the Git repository
-# during the current calendar year.  This is done by walking backwards
-# through the output of "git whatchanged" until a year other than the
-# current one is seen.  Used by merge_copyrights.
-
-thisyear=`date +%Y`
-when="`expr $thisyear - 1`-12-31"
-git whatchanged --since="$when" --pretty="" | awk '
-    BEGIN { change=0 }
-    NF == 0 { next; }
-    $(NF-1) ~ /[AM]/ { print "./" $NF; change=1 }
-    END { if (change) print "./COPYRIGHT" } ' | sort | uniq
index 88fd7058332b7976b1473c091557d997e72caf42..c0f499171412cbe84e22efd23c1f477b2fcad45b 100644 (file)
@@ -42,11 +42,11 @@ my %owner2text = ();
 my $keyword_pat = '\$(Id:.*|Revision:.*|Id|Revision)\$';
 
 foreach $owner (keys %owner2filename) {
-        my $f = $owner2filename{$owner};
-        open(COPYRIGHT, "<$f") || die "can't open $f: $!";
-        @copyright_text = <COPYRIGHT>;
-        close(COPYRIGHT);
-        $owner2text{$owner} = [ @copyright_text ];
+       my $f = $owner2filename{$owner};
+       open(COPYRIGHT, "<$f") || die "can't open $f: $!";
+       @copyright_text = <COPYRIGHT>;
+       close(COPYRIGHT);
+       $owner2text{$owner} = [ @copyright_text ];
 }
 
 my %file_types = ();
@@ -92,24 +92,21 @@ sub copyright {
 }
 
 sub copyrights {
-       my $a = copyright("Internet Systems Consortium, Inc. (\"ISC\")",
-                  grep({ $_ >= 2004} @_));
-       my $b = copyright("Internet Software Consortium.",
-                  grep({ $_ < 2004} @_));
-       return "$a$b";
+       my $a = copyright("Internet Systems Consortium, Inc. (\"ISC\")", @_);
+       return "$a";
 }
 
 foreach $file (keys %file_types) {
        $typeandowner = $file_types{$file};
        $years_list = $file_years{$file};
 
-        if ( ! -f $file ) {
-                print "$file: missing\n";
-                next;
-        }
+       if ( ! -f $file ) {
+               print "$file: missing\n";
+               next;
+       }
        # print "Doing: $file";
 
-        if ($years_list =~ /PARENT:/) {
+       if ($years_list =~ /PARENT:/) {
                getyears($years_list);
                if (!defined $years_list) {
                        print "$file: has bad parent $parent\n";
@@ -128,16 +125,16 @@ foreach $file (keys %file_types) {
                }
        }
 
-        @years = split(/,/, $years_list);
+       @years = split(/,/, $years_list);
 
-        my ($type, $owner) = split(/\./, $typeandowner);
-        $owner = "" if !defined $owner;
+       my ($type, $owner) = split(/\./, $typeandowner);
+       $owner = "" if !defined $owner;
 
-        $textp = $owner2text{$owner};
-        if (!defined $textp) {
-                print "$file: unknown copyright owner $owner\n";
-                next;
-        }
+       $textp = $owner2text{$owner};
+       if (!defined $textp) {
+               print "$file: unknown copyright owner $owner\n";
+               next;
+       }
 
        if ($file eq "./CHANGES" || $file eq "./EXCLUDED" ||
            $file eq "./CHANGES.SE")
@@ -171,159 +168,159 @@ foreach $file (keys %file_types) {
                }
        }
 
-        next if $type eq "X" or $type eq "BAT";
-
-        $before_copyright = "";
-        $c_comment = 0;
-        $shell_comment = 0;
-        $m4_comment = 0;
-        $sgml_comment = 0;
-        $mkd_comment = 0;
-        $zone_comment = 0;
-        $man_comment = 0;
-        $python_comment = 0;
-        $python_bin_comment = 0;
-        $start_comment = "";
-        $end_comment = "";
-        $first = "";
-        if ($type =~ /^(C|YACC|CONF-C)$/) {
-                $c_comment = 1;
-                $start_comment = "/*\n";
-                $prefix = " * ";
-                $end_comment = " */\n";
-        } elsif ($type =~ /^(SH|PERL|TCL|MAKE|CONF-SH|RNC)$/) {
-                $shell_comment = 1;
+       next if $type eq "X" or $type eq "BAT";
+
+       $before_copyright = "";
+       $c_comment = 0;
+       $shell_comment = 0;
+       $m4_comment = 0;
+       $sgml_comment = 0;
+       $mkd_comment = 0;
+       $zone_comment = 0;
+       $man_comment = 0;
+       $python_comment = 0;
+       $python_bin_comment = 0;
+       $start_comment = "";
+       $end_comment = "";
+       $first = "";
+       if ($type =~ /^(C|YACC|CONF-C)$/) {
+               $c_comment = 1;
+               $start_comment = "/*\n";
+               $prefix = " * ";
+               $end_comment = " */\n";
+       } elsif ($type =~ /^(SH|PERL|TCL|MAKE|CONF-SH|RNC)$/) {
+               $shell_comment = 1;
+               $prefix = "# ";
+       } elsif ($type =~ /^PYTHON-BIN$/) {
+               $python_bin_comment = 1;
+               $start_comment = "############################################################################\n";
                $prefix = "# ";
-        } elsif ($type =~ /^PYTHON-BIN$/) {
-                $python_bin_comment = 1;
-                $start_comment = "############################################################################\n";
-                $prefix = "# ";
                $end_comment = "############################################################################\n"
-        } elsif ($type =~ /^PYTHON$/) {
-                $python_comment = 1;
-                $start_comment = "############################################################################\n";
-                $prefix = "# ";
+       } elsif ($type =~ /^PYTHON$/) {
+               $python_comment = 1;
+               $start_comment = "############################################################################\n";
+               $prefix = "# ";
                $end_comment = "############################################################################\n"
-        } elsif ($type eq "ZONE" || $type eq "MC") {
-                $zone_comment = 1;
-                $prefix = "; ";
-        } elsif ($type eq "MAN") {
-                $man_comment = 1;
-                $prefix = ".\\\" ";
-        } elsif ($type eq "M4") {
-                $m4_comment = 1;
-                $prefix = "dnl ";
-        } elsif ($type eq "HTML" || $type eq "SGML") {
-                $sgml_comment = 1;
-                $start_comment = "<!--\n";
-                $prefix = " - ";
-                $end_comment = "-->\n";
-        } elsif ($type eq "MKD") {
-                $mkd_comment = 1;
-                $start_comment = "<!--\n";
-                $prefix = " - ";
-                $end_comment = "-->";
-        } elsif ($type eq "TXT") {
-                $prefix = "";
-        } else {
-                print "$file: type '$type' not supported yet; skipping\n";
-                next;
-        }
-
-        ($nonspaceprefix = $prefix) =~ s/\s+$//;
-
-        open(SOURCE, "<$file") || die "can't open $file: $!";
-        $_ = <SOURCE>;
-        if ($type eq "YACC") {
-                unless ($_ eq "%{\n") {
-                        print "$file: unexpected yacc file start ",
-                              "(expected \"%{\\n\")\n";
-                        close(SOURCE);
-                        next;
-                }
-                $before_copyright = "$_";
-                $_ = <SOURCE>;
-        }
-        if ($c_comment && /^\/\*/) {
-                $_ = <SOURCE>;
-                if ($_ !~ /[Cc]opyright/) {
-                        print "$file: non-copyright comment\n";
-                        close(SOURCE);
-                        next;
-                }
-                if ($_ !~ /\*\//) {
-                        while (<SOURCE>) {
-                                last if $_ =~ /\*\//;
-                        }
-                }
-        } elsif ($shell_comment) {
-                if (/^\#\!/) {
-                        $before_copyright = "$_#\n";
-                        $_ = <SOURCE>;
-                        $_ = <SOURCE> if $_ eq "#\n";
-                }
-                if (/^\#/) {
-                        if ($_ !~ /[Cc]opyright/) {
-                                print "$file: non-copyright comment\n";
-                                close(SOURCE);
-                                next;
-                        }
-                        while (<SOURCE>) {
-                                if ($_ !~ /^\#/) {
-                                        $first = $_;
-                                        last;
-                                }
-                        }
-                } else {
-                        $first = $_;
-                }
-        } elsif ($python_comment || $python_bin_comment) {
-                if ($python_bin_comment && /^\#\!/) {
-                        $before_copyright = "$_";
-                        $_ = <SOURCE>;
-                        $_ = <SOURCE> if $_ eq "#\n";
-                        $_ = <SOURCE> if $_ eq "############################################################################\n";
-                } elsif ($python_comment && /^\#/) {
-                        $_ = <SOURCE> if $_ eq "#\n";
-                        $_ = <SOURCE> if $_ eq "############################################################################\n";
-                }
-                if (/^\#/) {
-                        if ($_ !~ /[Cc]opyright/) {
-                                print "$file: non-copyright comment\n";
-                                close(SOURCE);
-                                next;
-                        }
-                        while (<SOURCE>) {
-                                if ($_ !~ /^\#/) {
-                                        $first = $_;
-                                        last;
-                                }
-                        }
-                } else {
-                        $first = $_;
-                }
-        } elsif (($m4_comment || $zone_comment || $man_comment) &&
-                 /^\Q$nonspaceprefix\E/) {
-
-                while (/^\Q$nonspaceprefix\E\s*$/) {
-                        $_ = <SOURCE>;
-                }
-
-                if ($_ !~ /[Cc]opyright/) {
-                        print "$file: non-copyright comment\n";
-                        close(SOURCE);
-                        next;
-                }
-                while (<SOURCE>) {
-                        if ($_ !~ /^\Q$nonspaceprefix\E/ ||
-                            $_ =~ /$keyword_pat/) {
-                                $first = $_;
-                                last;
-                        }
-                }
-        } elsif ($sgml_comment) {
+       } elsif ($type eq "ZONE" || $type eq "MC") {
+               $zone_comment = 1;
+               $prefix = "; ";
+       } elsif ($type eq "MAN") {
+               $man_comment = 1;
+               $prefix = ".\\\" ";
+       } elsif ($type eq "M4") {
+               $m4_comment = 1;
+               $prefix = "dnl ";
+       } elsif ($type eq "HTML" || $type eq "SGML") {
+               $sgml_comment = 1;
+               $start_comment = "<!--\n";
+               $prefix = " - ";
+               $end_comment = "-->\n";
+       } elsif ($type eq "MKD") {
+               $mkd_comment = 1;
+               $start_comment = "<!--\n";
+               $prefix = " - ";
+               $end_comment = "-->";
+       } elsif ($type eq "TXT") {
+               $prefix = "";
+       } else {
+               print "$file: type '$type' not supported yet; skipping\n";
+               next;
+       }
+
+       ($nonspaceprefix = $prefix) =~ s/\s+$//;
+
+       open(SOURCE, "<$file") || die "can't open $file: $!";
+       $_ = <SOURCE>;
+       if ($type eq "YACC") {
+               unless ($_ eq "%{\n") {
+                       print "$file: unexpected yacc file start ",
+                             "(expected \"%{\\n\")\n";
+                       close(SOURCE);
+                       next;
+               }
+               $before_copyright = "$_";
+               $_ = <SOURCE>;
+       }
+       if ($c_comment && /^\/\*/) {
+               $_ = <SOURCE>;
+               if ($_ !~ /[Cc]opyright/) {
+                       print "$file: non-copyright comment\n";
+                       close(SOURCE);
+                       next;
+               }
+               if ($_ !~ /\*\//) {
+                       while (<SOURCE>) {
+                               last if $_ =~ /\*\//;
+                       }
+               }
+       } elsif ($shell_comment) {
+               if (/^\#\!/) {
+                       $before_copyright = "$_#\n";
+                       $_ = <SOURCE>;
+                       $_ = <SOURCE> if $_ eq "#\n";
+               }
+               if (/^\#/) {
+                       if ($_ !~ /[Cc]opyright/) {
+                               print "$file: non-copyright comment\n";
+                               close(SOURCE);
+                               next;
+                       }
+                       while (<SOURCE>) {
+                               if ($_ !~ /^\#/) {
+                                       $first = $_;
+                                       last;
+                               }
+                       }
+               } else {
+                       $first = $_;
+               }
+       } elsif ($python_comment || $python_bin_comment) {
+               if ($python_bin_comment && /^\#\!/) {
+                       $before_copyright = "$_";
+                       $_ = <SOURCE>;
+                       $_ = <SOURCE> if $_ eq "#\n";
+                       $_ = <SOURCE> if $_ eq "############################################################################\n";
+               } elsif ($python_comment && /^\#/) {
+                       $_ = <SOURCE> if $_ eq "#\n";
+                       $_ = <SOURCE> if $_ eq "############################################################################\n";
+               }
+               if (/^\#/) {
+                       if ($_ !~ /[Cc]opyright/) {
+                               print "$file: non-copyright comment\n";
+                               close(SOURCE);
+                               next;
+                       }
+                       while (<SOURCE>) {
+                               if ($_ !~ /^\#/) {
+                                       $first = $_;
+                                       last;
+                               }
+                       }
+               } else {
+                       $first = $_;
+               }
+       } elsif (($m4_comment || $zone_comment || $man_comment) &&
+                /^\Q$nonspaceprefix\E/) {
+
+               while (/^\Q$nonspaceprefix\E\s*$/) {
+                       $_ = <SOURCE>;
+               }
+
+               if ($_ !~ /[Cc]opyright/) {
+                       print "$file: non-copyright comment\n";
+                       close(SOURCE);
+                       next;
+               }
+               while (<SOURCE>) {
+                       if ($_ !~ /^\Q$nonspaceprefix\E/ ||
+                           $_ =~ /$keyword_pat/) {
+                               $first = $_;
+                               last;
+                       }
+               }
+       } elsif ($sgml_comment) {
                $before_copyright = "";
-                while (/^<!DOCTYPE/ || /^<!ENTITY/ || /^<\?xml-stylesheet/ || /^<\?xml /) {
+               while (/^<!DOCTYPE/ || /^<!ENTITY/ || /^<\?xml-stylesheet/ || /^<\?xml /) {
                        # print "SGML: $_";
                        $before_copyright = "$before_copyright$_";
                        if (/\]>$/ ) {
@@ -359,198 +356,165 @@ foreach $file (keys %file_types) {
                                close(SOURCE);
                                next;
                        }
-                }
-                if (/^<!--/) {
-                        $_ = <SOURCE> if $_ eq "<!--\n";
-                        if ($_ !~ /[Cc]opyright/) {
-                                print "$file: non-copyright comment\n";
-                                close(SOURCE);
-                                next;
-                        }
-                        while (defined($_)) {
-                                last if s/.*-->//;
-                                $_ = <SOURCE>;
-                        }
-                        print "$file: unterminated comment\n"
-                          unless defined($_);
-                        if ($_ ne "\n") {
-                                $first = $_;
-                        } else {
-                                $first = <SOURCE>;
-                        }
-                } else {
-                        $first = $_;
-                }
-        } elsif ($mkd_comment) {
+               }
+               if (/^<!--/) {
+                       $_ = <SOURCE> if $_ eq "<!--\n";
+                       if ($_ !~ /[Cc]opyright/) {
+                               print "$file: non-copyright comment\n";
+                               close(SOURCE);
+                               next;
+                       }
+                       while (defined($_)) {
+                               last if s/.*-->//;
+                               $_ = <SOURCE>;
+                       }
+                       print "$file: unterminated comment\n"
+                         unless defined($_);
+                       if ($_ ne "\n") {
+                               $first = $_;
+                       } else {
+                               $first = <SOURCE>;
+                       }
+               } else {
+                       $first = $_;
+               }
+       } elsif ($mkd_comment) {
                $before_copyright = "";
-                if (/^<!/) {
-                        $_ = <SOURCE> if $_ eq "<!--\n";
-                        if ($_ !~ /[Cc]opyright/) {
-                                print "$file: non-copyright comment\n";
-                                close(SOURCE);
-                                next;
-                        }
-                        while (defined($_)) {
-                                last if s/.*-->//;
-                                $_ = <SOURCE>;
-                        }
-                        print "$file: unterminated comment\n"
-                          unless defined($_);
-                        if ($_ ne "\n") {
-                                $first = $_;
-                        } else {
-                                $first = <SOURCE>;
-                        }
-                } else {
-                        $first = $_;
-                }
-        } elsif ($type eq "TXT") {
-                if ($_ =~ /[Cc]opyright/) {
-                        $/ = "";            # paragraph at a time
-                        while (<SOURCE>) {
-                                # Not very maintainable, but ok enough for now.
+               if (/^<!/) {
+                       $_ = <SOURCE> if $_ eq "<!--\n";
+                       if ($_ !~ /[Cc]opyright/) {
+                               print "$file: non-copyright comment\n";
+                               close(SOURCE);
+                               next;
+                       }
+                       while (defined($_)) {
+                               last if s/.*-->//;
+                               $_ = <SOURCE>;
+                       }
+                       print "$file: unterminated comment\n"
+                         unless defined($_);
+                       if ($_ ne "\n") {
+                               $first = $_;
+                       } else {
+                               $first = <SOURCE>;
+                       }
+               } else {
+                       $first = $_;
+               }
+       } elsif ($type eq "TXT") {
+               if ($_ =~ /[Cc]opyright/) {
+                       $/ = "";            # paragraph at a time
+                       while (<SOURCE>) {
+                               # Not very maintainable, but ok enough for now.
                                last if /Portions of this code/;
-                                last unless
-                                  /[Cc]opyright/ ||
-                                  /See COPYRIGHT in the source root/ ||
-                                  /Permission to use, copy, modify, and / ||
-                                  /THE SOFTWARE IS PROVIDED "AS IS" AND /;
-                        }
-                        $/ = "\n";
-                }
-                $first = $_;
-        } else {
-                $first = $_;
-        }
-
-        $first = "" if ! defined($first);
-
-        open(TARGET, ">$file.new") || die "can't open $file.new: $!";
-        print TARGET $before_copyright if $before_copyright;
-        print TARGET $start_comment if $start_comment;
-
-        $sysyears = "";
-        $sftyears = "";
-        $nomyears = "";
+                               last unless
+                                 /[Cc]opyright/ ||
+                                  /This Source Code Form is subject to the terms of the Mozilla Public/ ||
+                                  /If a copy of the MPL was not distributed with this/ ||
+                                  /You can obtain one at http:\/\/mozilla.org\/MPL\/2.0\// ||
+                                 /See COPYRIGHT in the source root/ ||
+                                 /Permission to use, copy, modify, and / ||
+                                 /THE SOFTWARE IS PROVIDED "AS IS" AND /;
+                       }
+                       $/ = "\n";
+               }
+               $first = $_;
+       } else {
+               $first = $_;
+       }
 
-       #
-       # Internet Software Consortium: up to 2003
-       #
-        $last_year = 0;
-        $anchor_year = 0;
-       $years = "";
-        foreach $year (@years) {
-               if ($year >= 2004) { next; }
-                if ($last_year != 0 && $year == $last_year + 1) {
-                        if ($year > $anchor_year + 1) {
-                                substr($years, $anchor_end) = "-$year";
-                        } else {
-                                $years .= ", $year";
-                        }
-                } else {
-                        $years .= $last_year == 0 ? "$year" : ", $year";
-                        #if ($anchor_year != 0) {
-                        #        print "$file: noncontiguous year: ",
-                        #              "$year != $last_year + 1\n";
-                        #}
-                        $anchor_year = $year;
-                        $anchor_end = length($years);
-                }
-
-                $last_year = $year;
-        }
-       $sftyears = $years;
+       $first = "" if ! defined($first);
+
+       open(TARGET, ">$file.new") || die "can't open $file.new: $!";
+       print TARGET $before_copyright if $before_copyright;
+       print TARGET $start_comment if $start_comment;
+
+       $sysyears = "";
+       $nomyears = "";
 
        #
        # Nominum: up to 2001.
        #
-        $last_year = 0;
-        $anchor_year = 0;
+       $last_year = 0;
+       $anchor_year = 0;
        $years = "";
-        foreach $year (@years) {
+       foreach $year (@years) {
                if ($year >= 2002) { next; }
-                if ($last_year != 0 && $year == $last_year + 1) {
-                        if ($year > $anchor_year + 1) {
-                                substr($years, $anchor_end) = "-$year";
-                        } else {
-                                $years .= ", $year";
-                        }
-                } else {
-                        $years .= $last_year == 0 ? "$year" : ", $year";
-                        #if ($anchor_year != 0) {
-                        #        print "$file: noncontiguous year: ",
-                        #              "$year != $last_year + 1\n";
-                        #}
-                        $anchor_year = $year;
-                        $anchor_end = length($years);
-                }
-
-                $last_year = $year;
-        }
+               if ($last_year != 0 && $year == $last_year + 1) {
+                       if ($year > $anchor_year + 1) {
+                               substr($years, $anchor_end) = "-$year";
+                       } else {
+                               $years .= ", $year";
+                       }
+               } else {
+                       $years .= $last_year == 0 ? "$year" : ", $year";
+                       #if ($anchor_year != 0) {
+                       #        print "$file: noncontiguous year: ",
+                       #              "$year != $last_year + 1\n";
+                       #}
+                       $anchor_year = $year;
+                       $anchor_end = length($years);
+               }
+
+               $last_year = $year;
+       }
        $nomyears = $years;
 
        #
        # Internet Systems Consortium: 2004 onwards.
        #
-        $last_year = 0;
-        $anchor_year = 0;
+       $last_year = 0;
+       $anchor_year = 0;
        $years = "";
        $anchor_end = length($years);
        my $andor = 0;
        my $noid = 0;
-        foreach $year (@years) {
-               if ($year < 2004) { next; }
+       foreach $year (@years) {
                $andor = 1 if ($year >= 2007);
                $noid = 1 if ($year > 2012 || ($year == 2012 && $this_month >= 5) );
-                if ($last_year != 0 && $year == $last_year + 1) {
-                        if ($year > $anchor_year + 1) {
-                                substr($years, $anchor_end) = "-$year";
-                        } else {
-                                $years .= ", $year";
-                        }
-                } else {
-                        $years .= $last_year == 0 ? "$year" : ", $year";
-                        #if ($anchor_year != 0) {
-                        #        print "$file: noncontiguous year: ",
-                        #              "$year != $last_year + 1\n";
-                        #}
-                        $anchor_year = $year;
-                        $anchor_end = length($years);
-                }
-
-                $last_year = $year;
-        }
-       $sysyears = $years;
-
-        ($firstline, $secondline, @otherlines) = @$textp;
-
-        $firstline =~ s/\@SYSYEARS\@/$sysyears/;
-        $secondline =~ s/\@SFTYEARS\@/$sftyears/;
+               if ($last_year != 0 && $year == $last_year + 1) {
+                       if ($year > $anchor_year + 1) {
+                               substr($years, $anchor_end) = "-$year";
+                       } else {
+                               $years .= ", $year";
+                       }
+               } else {
+                       $years .= $last_year == 0 ? "$year" : ", $year";
+                       #if ($anchor_year != 0) {
+                       #        print "$file: noncontiguous year: ",
+                       #              "$year != $last_year + 1\n";
+                       #}
+                       $anchor_year = $year;
+                       $anchor_end = length($years);
+               }
 
-        print TARGET "$prefix$firstline";
-       if ($sftyears ne "" ) {
-               print TARGET $secondline =~ /^$/ ? $nonspaceprefix : $prefix;
-               print TARGET "$secondline";
+               $last_year = $year;
        }
+       $sysyears = $years;
 
-        foreach $_ (@otherlines) {
+       # make a copy
+       @lines = @$textp;
+
+       foreach $_ (@lines) {
+               next if (/\@SYSYEARS\@/ && $sysyears eq "");
                s:modify, and distribute:modify, and/or distribute: if ($andor);
-                print TARGET (/^$/ ? $nonspaceprefix : $prefix);
+               print TARGET (/^$/ ? $nonspaceprefix : $prefix);
+               s/\@SYSYEARS\@/$sysyears/;
                s/\@NOMYEARS\@/$nomyears/;
-                print TARGET "$_";
-        }
-        print TARGET $end_comment if $end_comment;
+               print TARGET "$_";
+       }
+       print TARGET $end_comment if $end_comment;
 
-        if ($first eq "") {
-                $first = <SOURCE>;
-        }
+       if ($first eq "") {
+               $first = <SOURCE>;
+       }
 
-        if (defined($first)) {
-               if ($type eq 'MAN') {
-                       print TARGET "$nonspaceprefix\n";
+       if (defined($first)) {
+               if ($type eq 'MAN') {
+                       print TARGET "$nonspaceprefix\n";
                } else {
-                       print TARGET "\n";
-                }
+                       print TARGET "\n";
+               }
 
                if (($type eq "C" || $type eq "CONF-C") &&
                    $sysyears =~ /$this_year/) {
@@ -570,7 +534,7 @@ foreach $file (keys %file_types) {
                        $_ = $body;
                } elsif (($type eq "SGML" || $type eq "HTML" ||
                          $type eq "MAKE") &&
-                        $sysyears =~ /$this_year/) {
+                        $sysyears =~ /$this_year/) {
                        my $body = "";
                        while (<SOURCE>) {
                        # Remove trailing white space.
@@ -605,42 +569,42 @@ foreach $file (keys %file_types) {
                        s:<!-- insert copyright start -->.*?<!-- insert copyright end -->:<!-- insert copyright start -->\n$r    <!-- insert copyright end -->:s;
                }
 
-                my ($start, $end);
+               my ($start, $end);
                if ($type =~ /^PYTHON(|-BIN)$/) {
-                        ($start = $prefix) =~ s/\s*\n//;
+                       ($start = $prefix) =~ s/\s*\n//;
+                       $end = "\n";
+               } elsif ($start_comment ne "") {
+                       ($start = $start_comment) =~ s/\s*\n/ /;
+                       ($end = $end_comment) =~ s/^\s*(.*)\n/ $1\n/;
+               } elsif ($prefix ne "") {
+                       ($start = $prefix) =~ s/\s*\n//;
+                       $end = "\n";
+               } else {
+                       $start = "";
                        $end = "\n";
-                } elsif ($start_comment ne "") {
-                        ($start = $start_comment) =~ s/\s*\n/ /;
-                        ($end = $end_comment) =~ s/^\s*(.*)\n/ $1\n/;
-                } elsif ($prefix ne "") {
-                        ($start = $prefix) =~ s/\s*\n//;
-                        $end = "\n";
-                } else {
-                        $start = "";
-                        $end = "\n";
-                }
-
-                if (!$noid && $first !~ /$keyword_pat/ && 
+               }
+
+               if (!$noid && $first !~ /$keyword_pat/ &&
                    (!defined($_) || $_ !~ /$keyword_pat/)) {
                        $end = "\n$nonspaceprefix" if ($type eq "MAN");
-                        print TARGET "$start\$";
-                        print TARGET "Id";
-                        print TARGET "\$$end\n";
-                }
-
-                print TARGET $first if $first !~ /^\s*$/;
-                print TARGET $_ if (defined($_));
-        }
-        close(TARGET);
-        close(SOURCE);
-
-        $mode = (stat $file)[2]&511;
-        chmod $mode, "$file.new";
-
-        if (system("cmp -s $file.new $file") == 0) {
-                unlink("$file.new");
-        } else {
-                rename("$file.new", "$file")
-                  or die "rename($file.new, $file): $!";
-        }
+                       print TARGET "$start\$";
+                       print TARGET "Id";
+                       print TARGET "\$$end\n";
+               }
+
+               print TARGET $first if $first !~ /^\s*$/;
+               print TARGET $_ if (defined($_));
+       }
+       close(TARGET);
+       close(SOURCE);
+
+       $mode = (stat $file)[2]&511;
+       chmod $mode, "$file.new";
+
+       if (system("cmp -s $file.new $file") == 0) {
+               unlink("$file.new");
+       } else {
+               rename("$file.new", "$file")
+                 or die "rename($file.new, $file): $!";
+       }
 }