Print this page
6924 make libc copyright file contents deterministic

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc/extract-copyright.pl
          +++ new/usr/src/lib/libc/extract-copyright.pl
↓ open down ↓ 4 lines elided ↑ open up ↑
   5    5  # You may only use this file in accordance with the terms version
   6    6  # 1.0 of the CDDL.
   7    7  #
   8    8  # A full copy of the text of the CDDL should have accompanied this
   9    9  # source.  A copy is of the CDDL is also available via the Internet
  10   10  # at http://www.illumos.org/license/CDDL.
  11   11  #
  12   12  
  13   13  #
  14   14  # Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
       15 +# Copyright 2016 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
  15   16  #
  16   17  
  17   18  #
  18   19  # This extracts all the BSD copyrights (excluding the CDDL licenses)
  19   20  # for use in a THIRDPARTYLICENSE file.  It tries hard to avoid duplicates.
  20   21  #
  21   22  
  22   23  use strict;
  23   24  use warnings;
  24   25  use File::Find;
↓ open down ↓ 73 lines elided ↑ open up ↑
  98   99          }
  99  100          
 100  101  }
 101  102  foreach $a (@ARGV) {
 102  103          if (-d $a) {
 103  104                  find(\&wanted, $a);
 104  105          } elsif (-f $a) {
 105  106                  push(@FILES, $a);
 106  107          }
 107  108  }
      109 +
      110 +# sort files to get a stable ordering to aid wsdiff(1onbld)
      111 +@FILES = sort @FILES;
 108  112  
 109  113  foreach $a (@FILES) {
 110  114          dofile($a);
 111  115  }
 112  116  
 113  117  foreach my $lic (keys %LICENSE) {
 114  118          my @files = @{$LICENSE{$lic}};
 115  119          print "\nThe following files from the C library:\n";
 116  120          foreach my $f (@files) {
 117  121                  print("    $f\n");
 118  122          }
 119  123          print "are provided under the following terms:\n\n";
 120  124          print "$lic\n";
 121  125  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX