[openssl] master update

Richard Levitte levitte at openssl.org
Tue Jan 12 10:27:10 UTC 2021


The branch master has been updated
       via  0d11846e4b2850773d1ee0df206608549a7d45d0 (commit)
       via  2497e2e7dbe54420cd98dc2ff013ed5886cd4d8e (commit)
       via  5e16ac142e812864e01c6c534888d4efaca6d9bf (commit)
       via  507f83800fe9c85c6249e9baad4602075df2b5b7 (commit)
      from  b209835364de35541d835185f3dc3a984e2c1545 (commit)


- Log -----------------------------------------------------------------
commit 0d11846e4b2850773d1ee0df206608549a7d45d0
Author: Richard Levitte <levitte at openssl.org>
Date:   Sun Jan 10 09:28:58 2021 +0100

    Remove duplicate GENERATE declarations for .pod files
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/13824)

commit 2497e2e7dbe54420cd98dc2ff013ed5886cd4d8e
Author: Richard Levitte <levitte at openssl.org>
Date:   Sun Jan 10 09:26:22 2021 +0100

    Configure: warn about duplicate GENERATE declarations in build.info files
    
    This sort of duplication is permitted, as the end result will be a single
    item anyway, but we might as well warn to avoid future confusion.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/13824)

commit 5e16ac142e812864e01c6c534888d4efaca6d9bf
Author: Richard Levitte <levitte at openssl.org>
Date:   Sun Jan 10 09:13:14 2021 +0100

    Configure: clean away perl syntax faults
    
    The faults aren't fatal (i.e. perl just shrugs), but are curious.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/13824)

commit 507f83800fe9c85c6249e9baad4602075df2b5b7
Author: Richard Levitte <levitte at openssl.org>
Date:   Sun Jan 10 09:08:46 2021 +0100

    Configure: Check all SOURCE declarations, to ensure consistency
    
    If the given sources are GENERATEd, we check those generators as well.
    
    This ensures that the declarations in the diverse build.info files are
    consistent with existing files.
    
    Reviewed-by: Tomas Mraz <tmraz at fedoraproject.org>
    (Merged from https://github.com/openssl/openssl/pull/13824)

-----------------------------------------------------------------------

Summary of changes:
 Configure           | 81 ++++++++++++++++++++++++++++++++++++++++++++++++-----
 build.info          |  1 -
 doc/man1/build.info | 55 ++----------------------------------
 3 files changed, 76 insertions(+), 61 deletions(-)

diff --git a/Configure b/Configure
index f0ad787bc4..ccdb037de2 100755
--- a/Configure
+++ b/Configure
@@ -1891,6 +1891,17 @@ if ($builder eq "unified") {
 
     $config{build_infos} = [ ];
 
+    # We want to detect configdata.pm in the source tree, so we
+    # don't use it if the build tree is different.
+    my $src_configdata = cleanfile($srcdir, "configdata.pm", $blddir);
+
+    # Any source file that we recognise is placed in this hash table, with
+    # the list of its intended destinations as value.  When everything has
+    # been collected, there's a routine that checks that these source files
+    # exist, or if they are generated, that the generator exists.
+    my %check_exist = ();
+    my %check_generate = ();
+
     my %ordinals = ();
     while (@build_dirs) {
         my @curd = @{shift @build_dirs};
@@ -2038,11 +2049,6 @@ if ($builder eq "unified") {
             }
         };
 
-        # We want to detect configdata.pm in the source tree, so we
-        # don't use it if the build tree is different.
-        my $src_configdata = cleanfile($srcdir, "configdata.pm", $blddir);
-
-
         if ($buildinfo_debug) {
             print STDERR "DEBUG: Reading ",catfile($sourced, $f),"\n";
         }
@@ -2242,6 +2248,7 @@ EOF
                 }
                 # We recognise C++, C and asm files
                 if ($s =~ /\.(cc|cpp|c|s|S)$/) {
+                    push @{$check_exist{$s}}, $ddest;
                     my $o = $_;
                     $o =~ s/\.[csS]$/.o/; # C and assembler
                     $o =~ s/\.(cc|cpp)$/_cc.o/; # C++
@@ -2250,12 +2257,14 @@ EOF
                     $unified_info{sources}->{$o}->{$s} = -1;
                 } elsif ($s =~ /\.rc$/) {
                     # We also recognise resource files
+                    push @{$check_exist{$s}}, $ddest;
                     my $o = $_;
                     $o =~ s/\.rc$/.res/; # Resource configuration
-                    my $o = cleanfile($buildd, $o, $blddir);
+                    $o = cleanfile($buildd, $o, $blddir);
                     $unified_info{sources}->{$ddest}->{$o} = -1;
                     $unified_info{sources}->{$o}->{$s} = -1;
                 } else {
+                    push @{$check_exist{$s}}, $ddest;
                     $unified_info{sources}->{$ddest}->{$s} = 1;
                 }
             }
@@ -2275,6 +2284,7 @@ EOF
 
                 if ($s =~ /\.(cc|cpp|c|s|S)$/) {
                     # We recognise C++, C and asm files
+                    push @{$check_exist{$s}}, $ddest;
                     my $o = $_;
                     $o =~ s/\.[csS]$/.o/; # C and assembler
                     $o =~ s/\.(cc|cpp)$/_cc.o/; # C++
@@ -2283,14 +2293,16 @@ EOF
                     $unified_info{sources}->{$o}->{$s} = -1;
                 } elsif ($s =~ /\.rc$/) {
                     # We also recognise resource files
+                    push @{$check_exist{$s}}, $ddest;
                     my $o = $_;
                     $o =~ s/\.rc$/.res/; # Resource configuration
-                    my $o = cleanfile($buildd, $o, $blddir);
+                    $o = cleanfile($buildd, $o, $blddir);
                     $unified_info{shared_sources}->{$ddest}->{$o} = -1;
                     $unified_info{sources}->{$o}->{$s} = -1;
                 } elsif ($s =~ /\.ld$/) {
                     # We also recognise linker scripts (or corresponding)
                     # We know they are generated files
+                    push @{$check_exist{$s}}, $ddest;
                     my $ld = cleanfile($buildd, $_, $blddir);
                     $unified_info{shared_sources}->{$ddest}->{$ld} = 1;
                 } else {
@@ -2313,6 +2325,7 @@ EOF
             if ($generate{$gen}) {
                 $generator[0] = cleanfile($buildd, $gen, $blddir);
             }
+            $check_generate{$ddest}->{$generator[0]}++;
 
             $unified_info{generate}->{$ddest} = [ @generator ];
         }
@@ -2417,6 +2430,60 @@ They are ignored and should be replaced with a combination of GENERATE,
 DEPEND and SHARED_SOURCE.
 EOF
 
+    # Check that each generated file is only generated once
+    my $ambiguous_generation = 0;
+    foreach (sort keys %check_generate) {
+        my @generators = sort keys %{$check_generate{$_}};
+        my $generators_txt = join(', ', @generators);
+        if (scalar @generators > 1) {
+            warn "$_ is GENERATEd by more than one generator ($generators_txt)\n";
+            $ambiguous_generation++;
+        }
+        if ($check_generate{$_}->{$generators[0]} > 1) {
+            warn "INFO: $_ has more than one GENERATE declaration (same generator)\n"
+        }
+    }
+    die "There are ambiguous source file generations\n"
+        if $ambiguous_generation > 0;
+
+    # All given source files should exist, or if generated, their
+    # generator should exist.  This loop ensures this is true.
+    my $missing = 0;
+    foreach my $orig (sort keys %check_exist) {
+        foreach my $dest (@{$check_exist{$orig}}) {
+            if ($orig ne $src_configdata) {
+                if ($orig =~ /\.a$/) {
+                    # Static library names may be used as sources, so we
+                    # need to detect those and give them special treatment.
+                    unless (grep { $_ eq $orig }
+                            keys %{$unified_info{libraries}}) {
+                        warn "$orig is given as source for $dest, but no such library is built\n";
+                        $missing++;
+                    }
+                } else {
+                    # A source may be generated, and its generator may be
+                    # generated as well.  We therefore loop to dig out the
+                    # first generator.
+                    my $gen = $orig;
+
+                    while (my @next = keys %{$check_generate{$gen}}) {
+                        $gen = $next[0];
+                    }
+
+                    if (! -f $gen) {
+                        if ($gen ne $orig) {
+                            $missing++;
+                            warn "$orig is given as source for $dest, but its generator (leading to $gen) is missing\n";
+                        } else {
+                            $missing++;
+                            warn "$orig is given as source for $dest, but is missing\n";
+                        }
+                    }
+                }
+            }
+        }
+    }
+    die "There are files missing\n" if $missing > 0;
 
     # Go through the sources of all libraries and check that the same basename
     # doesn't appear more than once.  Some static library archivers depend on
diff --git a/build.info b/build.info
index 44ecee35cb..27818b7fce 100644
--- a/build.info
+++ b/build.info
@@ -68,7 +68,6 @@ GENERATE[include/openssl/x509v3.h]=include/openssl/x509v3.h.in
 GENERATE[include/openssl/x509_vfy.h]=include/openssl/x509_vfy.h.in
 GENERATE[include/crypto/bn_conf.h]=include/crypto/bn_conf.h.in
 GENERATE[include/crypto/dso_conf.h]=include/crypto/dso_conf.h.in
-GENERATE[doc/man7/openssl_user_macros.pod]=doc/man7/openssl_user_macros.pod.in
 
 IF[{- defined $target{shared_defflag} -}]
   SHARED_SOURCE[libcrypto]=libcrypto.ld
diff --git a/doc/man1/build.info b/doc/man1/build.info
index 40df5d360e..6d9d7b564c 100644
--- a/doc/man1/build.info
+++ b/doc/man1/build.info
@@ -108,56 +108,5 @@ DEPEND[openssl-verify.pod]=../perlvars.pm
 DEPEND[openssl-version.pod]=../perlvars.pm
 DEPEND[openssl-x509.pod]=../perlvars.pm
 
-GENERATE[openssl-asn1parse.pod]=openssl-asn1parse.pod.in
-GENERATE[openssl-ca.pod]=openssl-ca.pod.in
-GENERATE[openssl-ciphers.pod]=openssl-ciphers.pod.in
-GENERATE[openssl-cmds.pod]=openssl-cmds.pod.in
-GENERATE[openssl-cmp.pod]=openssl-cmp.pod.in
-GENERATE[openssl-cms.pod]=openssl-cms.pod.in
-GENERATE[openssl-crl2pkcs7.pod]=openssl-crl2pkcs7.pod.in
-GENERATE[openssl-crl.pod]=openssl-crl.pod.in
-GENERATE[openssl-dgst.pod]=openssl-dgst.pod.in
-GENERATE[openssl-dhparam.pod]=openssl-dhparam.pod.in
-GENERATE[openssl-dsaparam.pod]=openssl-dsaparam.pod.in
-GENERATE[openssl-dsa.pod]=openssl-dsa.pod.in
-GENERATE[openssl-ecparam.pod]=openssl-ecparam.pod.in
-GENERATE[openssl-ec.pod]=openssl-ec.pod.in
-GENERATE[openssl-enc.pod]=openssl-enc.pod.in
-GENERATE[openssl-engine.pod]=openssl-engine.pod.in
-GENERATE[openssl-errstr.pod]=openssl-errstr.pod.in
-GENERATE[openssl-fipsinstall.pod]=openssl-fipsinstall.pod.in
-GENERATE[openssl-gendsa.pod]=openssl-gendsa.pod.in
-GENERATE[openssl-genpkey.pod]=openssl-genpkey.pod.in
-GENERATE[openssl-genrsa.pod]=openssl-genrsa.pod.in
-GENERATE[openssl-info.pod]=openssl-info.pod.in
-GENERATE[openssl-kdf.pod]=openssl-kdf.pod.in
-GENERATE[openssl-list.pod]=openssl-list.pod.in
-GENERATE[openssl-mac.pod]=openssl-mac.pod.in
-GENERATE[openssl-nseq.pod]=openssl-nseq.pod.in
-GENERATE[openssl-ocsp.pod]=openssl-ocsp.pod.in
-GENERATE[openssl-passwd.pod]=openssl-passwd.pod.in
-GENERATE[openssl-pkcs12.pod]=openssl-pkcs12.pod.in
-GENERATE[openssl-pkcs7.pod]=openssl-pkcs7.pod.in
-GENERATE[openssl-pkcs8.pod]=openssl-pkcs8.pod.in
-GENERATE[openssl-pkeyparam.pod]=openssl-pkeyparam.pod.in
-GENERATE[openssl-pkey.pod]=openssl-pkey.pod.in
-GENERATE[openssl-pkeyutl.pod]=openssl-pkeyutl.pod.in
-GENERATE[openssl-prime.pod]=openssl-prime.pod.in
-GENERATE[openssl-rand.pod]=openssl-rand.pod.in
-GENERATE[openssl-rehash.pod]=openssl-rehash.pod.in
-GENERATE[openssl-req.pod]=openssl-req.pod.in
-GENERATE[openssl-rsa.pod]=openssl-rsa.pod.in
-GENERATE[openssl-rsautl.pod]=openssl-rsautl.pod.in
-GENERATE[openssl-s_client.pod]=openssl-s_client.pod.in
-GENERATE[openssl-sess_id.pod]=openssl-sess_id.pod.in
-GENERATE[openssl-smime.pod]=openssl-smime.pod.in
-GENERATE[openssl-speed.pod]=openssl-speed.pod.in
-GENERATE[openssl-spkac.pod]=openssl-spkac.pod.in
-GENERATE[openssl-srp.pod]=openssl-srp.pod.in
-GENERATE[openssl-s_server.pod]=openssl-s_server.pod.in
-GENERATE[openssl-s_time.pod]=openssl-s_time.pod.in
-GENERATE[openssl-storeutl.pod]=openssl-storeutl.pod.in
-GENERATE[openssl-ts.pod]=openssl-ts.pod.in
-GENERATE[openssl-verify.pod]=openssl-verify.pod.in
-GENERATE[openssl-version.pod]=openssl-version.pod.in
-GENERATE[openssl-x509.pod]=openssl-x509.pod.in
+# All .pod.in files are detected by build.info in the parent directory, and
+# turned into appropriate GENERATE lines.


More information about the openssl-commits mailing list