Make generated copyright year be "now"
Always use the current year in generating output files, rather than trying to base is on the modtime of the script or input, as that can vary depending on the ability of the local OS to keep those accurate. Fixes #10744 Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/10776)
This commit is contained in:
parent
018aaeb478
commit
339638b586
7 changed files with 14 additions and 27 deletions
|
@ -82,8 +82,8 @@ $arr[ord("?")] |= $PSTRING_CHAR;
|
||||||
|
|
||||||
# Now generate the C code
|
# Now generate the C code
|
||||||
|
|
||||||
# Output year depends on the year of the script.
|
# Year the file was generated.
|
||||||
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
my $YEAR = [localtime()]->[5] + 1900;
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
/*
|
/*
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
# in the file LICENSE in the source distribution or at
|
# in the file LICENSE in the source distribution or at
|
||||||
# https://www.openssl.org/source/license.html
|
# https://www.openssl.org/source/license.html
|
||||||
|
|
||||||
# Output year depends on the year of the script.
|
# The year the output file is generated.
|
||||||
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
my $YEAR = [localtime()]->[5] + 1900;
|
||||||
print <<"EOF";
|
print <<"EOF";
|
||||||
/*
|
/*
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
|
|
|
@ -57,9 +57,8 @@ foreach (0 .. 127) {
|
||||||
push(@V_w32, $v);
|
push(@V_w32, $v);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Output year depends on the year of the script.
|
# The year the output file is generated.
|
||||||
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
my $YEAR = [localtime()]->[5] + 1900;
|
||||||
|
|
||||||
print <<"EOF";
|
print <<"EOF";
|
||||||
/*
|
/*
|
||||||
* WARNING: do not edit!
|
* WARNING: do not edit!
|
||||||
|
|
|
@ -36,10 +36,8 @@ sub der_it
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Output year depends on the year of the script and the input file.
|
# The year the output file is generated.
|
||||||
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
my $YEAR = [localtime()]->[5] + 1900;
|
||||||
my $iYEAR = [localtime([stat($ARGV[0])]->[9])]->[5] + 1900;
|
|
||||||
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
|
||||||
|
|
||||||
# Read input, parse all #define's into OID name and value.
|
# Read input, parse all #define's into OID name and value.
|
||||||
# Populate %ln and %sn with long and short names (%dupln and %dupsn)
|
# Populate %ln and %sn with long and short names (%dupln and %dupsn)
|
||||||
|
|
|
@ -11,12 +11,8 @@ use Getopt::Std;
|
||||||
our($opt_n);
|
our($opt_n);
|
||||||
getopts('n');
|
getopts('n');
|
||||||
|
|
||||||
# Output year depends on the year of the script and the input file.
|
# The year the output file is generated.
|
||||||
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
my $YEAR = [localtime()]->[5] + 1900;
|
||||||
my $iYEAR = [localtime([stat($ARGV[0])]->[9])]->[5] + 1900;
|
|
||||||
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
|
||||||
$iYEAR = [localtime([stat($ARGV[1])]->[9])]->[5] + 1900;
|
|
||||||
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
|
||||||
|
|
||||||
open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
|
open (NUMIN,"$ARGV[1]") || die "Can't open number file $ARGV[1]";
|
||||||
$max_nid=0;
|
$max_nid=0;
|
||||||
|
|
|
@ -14,12 +14,8 @@ my %oid_tbl;
|
||||||
|
|
||||||
my ($mac_file, $xref_file) = @ARGV;
|
my ($mac_file, $xref_file) = @ARGV;
|
||||||
|
|
||||||
# Output year depends on the year of the script and the input file.
|
# The year the output file is generated.
|
||||||
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
my $YEAR = [localtime()]->[5] + 1900;
|
||||||
my $iYEAR = [localtime([stat($mac_file)]->[9])]->[5] + 1900;
|
|
||||||
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
|
||||||
$iYEAR = [localtime([stat($xref_file)]->[9])]->[5] + 1900;
|
|
||||||
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
|
||||||
|
|
||||||
open(IN, $mac_file) || die "Can't open $mac_file, $!\n";
|
open(IN, $mac_file) || die "Can't open $mac_file, $!\n";
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,8 @@
|
||||||
|
|
||||||
my $obj_dat_h = $ARGV[0];
|
my $obj_dat_h = $ARGV[0];
|
||||||
|
|
||||||
# Output year depends on the date on the input file and the script.
|
# The year the output file is generated.
|
||||||
my $YEAR = [localtime([stat($0)]->[9])]->[5] + 1900;
|
my $YEAR = [localtime()]->[5] + 1900;
|
||||||
my $iYEAR = [localtime([stat($obj_dat_h)]->[9])]->[5] + 1900;
|
|
||||||
$YEAR = $iYEAR if $iYEAR > $YEAR;
|
|
||||||
|
|
||||||
open IN, '<', $obj_dat_h
|
open IN, '<', $obj_dat_h
|
||||||
|| die "Couldn't open $obj_dat_h : $!\n";
|
|| die "Couldn't open $obj_dat_h : $!\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue