[openssl] master update

Dr. Paul Dale pauli at openssl.org
Sat May 22 05:35:32 UTC 2021


The branch master has been updated
       via  06621ba387f8d45e0c273f77f18573eb52cd66b8 (commit)
       via  d594d2e121d85aa0d57fa7d833a2cb6a8ae9a515 (commit)
       via  f90040f80512cb5905214f1a420e8aab31deb706 (commit)
       via  1d95931d5613163224cb2cb4202e32e16cd1c8db (commit)
       via  810d2354c1ea8f8037edb3816768d4f16120da90 (commit)
      from  862497a9183412d50615afe2d2bfde1ac6c7ffa8 (commit)


- Log -----------------------------------------------------------------
commit 06621ba387f8d45e0c273f77f18573eb52cd66b8
Author: Pauli <pauli at openssl.org>
Date:   Fri May 21 15:24:57 2021 +1000

    configurations: update template makefiles to install documentation images
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15399)

commit d594d2e121d85aa0d57fa7d833a2cb6a8ae9a515
Author: Pauli <pauli at openssl.org>
Date:   Fri May 21 15:16:39 2021 +1000

    configure: build list of image files
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15399)

commit f90040f80512cb5905214f1a420e8aab31deb706
Author: Pauli <pauli at openssl.org>
Date:   Fri May 21 15:16:18 2021 +1000

    doc: process images when installing
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15399)

commit 1d95931d5613163224cb2cb4202e32e16cd1c8db
Author: Pauli <pauli at openssl.org>
Date:   Fri May 21 15:16:03 2021 +1000

    doc: rereference img locations into subdirectory
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15399)

commit 810d2354c1ea8f8037edb3816768d4f16120da90
Author: Pauli <pauli at openssl.org>
Date:   Fri May 21 15:14:57 2021 +1000

    doc: move images into their own subdirectory
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/15399)

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

Summary of changes:
 Configurations/unix-Makefile.tmpl    |  80 ++++++++++++++++++++++++++++++++++-
 Configurations/windows-makefile.tmpl |  30 ++++++++++++-
 Configure                            |  19 ++++++++-
 doc/build.info                       |   6 +++
 doc/build.info.in                    |  12 ++++++
 doc/man7/{ => img}/kdf.png           | Bin
 doc/man7/{ => img}/mac.png           | Bin
 doc/man7/{ => img}/rand.png          | Bin
 doc/man7/life_cycle-kdf.pod          |   2 +-
 doc/man7/life_cycle-mac.pod          |   2 +-
 doc/man7/life_cycle-rand.pod         |   2 +-
 11 files changed, 144 insertions(+), 9 deletions(-)
 rename doc/man7/{ => img}/kdf.png (100%)
 rename doc/man7/{ => img}/mac.png (100%)
 rename doc/man7/{ => img}/rand.png (100%)

diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 59e404b5c7..6fdd761bce 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -207,6 +207,22 @@ MISC_SCRIPTS={-
                                && $unified_info{attributes}->{scripts}->{$_}->{misc} }
                         @{$unified_info{scripts}}))
 -}
+IMAGEDOCS1={-
+        join(" \\\n" . ' ' x 10,
+             fill_lines(" ", $COLUMNS - 10,
+                        @{$unified_info{imagedocs}->{man1}})) -}
+IMAGEDOCS3={-
+        join(" \\\n" . ' ' x 10,
+             fill_lines(" ", $COLUMNS - 10,
+                        @{$unified_info{imagedocs}->{man3}})) -}
+IMAGEDOCS5={-
+        join(" \\\n" . ' ' x 10,
+             fill_lines(" ", $COLUMNS - 10,
+                        @{$unified_info{imagedocs}->{man5}})) -}
+IMAGEDOCS7={-
+        join(" \\\n" . ' ' x 10,
+             fill_lines(" ", $COLUMNS - 10,
+                        @{$unified_info{imagedocs}->{man7}})) -}
 HTMLDOCS1={-
         join(" \\\n" . ' ' x 10,
              fill_lines(" ", $COLUMNS - 10,
@@ -998,7 +1014,7 @@ uninstall_man_docs: build_man_docs
 		$(PERL) $(SRCDIR)/util/write-man-symlinks uninstall $(SRCDIR)/doc/man7 $(BLDDIR)/doc/man7 $${fn}$(MANSUFFIX) $(DESTDIR)$(MANDIR)/man7; \
 	done
 
-install_html_docs: build_html_docs
+install_html_docs: install_image_docs build_html_docs
 	@[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1)
 	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(HTMLDIR)/man1
 	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(HTMLDIR)/man3
@@ -1034,7 +1050,7 @@ install_html_docs: build_html_docs
 		chmod 644 $(DESTDIR)$(HTMLDIR)/man7/$$fn; \
 	done
 
-uninstall_html_docs:
+uninstall_html_docs: uninstall_image_docs
 	@$(ECHO) "*** Uninstalling HTML manpages"
 	@set -e; for x in dummy $(HTMLDOCS1); do \
 		if [ "$$x" = "dummy" ]; then continue; fi; \
@@ -1061,6 +1077,66 @@ uninstall_html_docs:
 		$(RM) $(DESTDIR)$(HTMLDIR)/man7/$$fn; \
 	done
 
+install_image_docs:
+	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(HTMLDIR)/man1/img
+	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(HTMLDIR)/man3/img
+	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(HTMLDIR)/man5/img
+	@$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(HTMLDIR)/man7/img
+	@set -e; for x in dummy $(IMAGEDOCS1); do \
+		if [ "$$x" = "dummy" ]; then continue; fi; \
+		fn=`basename $$x`; \
+		$(ECHO) "install $$x -> $(DESTDIR)$(HTMLDIR)/man1/img/$$fn"; \
+		cp $(SRCDIR)/$$x $(DESTDIR)$(HTMLDIR)/man1/img/$$fn; \
+		chmod 644 $(DESTDIR)$(HTMLDIR)/man1/img/$$fn; \
+	done
+	@set -e; for x in dummy $(IMAGEDOCS3); do \
+		if [ "$$x" = "dummy" ]; then continue; fi; \
+		fn=`basename $$x`; \
+		$(ECHO) "install $$x -> $(DESTDIR)$(HTMLDIR)/man3/img/$$fn"; \
+		cp $(SRCDIR)/$$x $(DESTDIR)$(HTMLDIR)/man3/img/$$fn; \
+		chmod 644 $(DESTDIR)$(HTMLDIR)/man3/img/$$fn; \
+	done
+	@set -e; for x in dummy $(IMAGEDOCS5); do \
+		if [ "$$x" = "dummy" ]; then continue; fi; \
+		fn=`basename $$x`; \
+		$(ECHO) "install $$x -> $(DESTDIR)$(HTMLDIR)/man5/img/$$fn"; \
+		cp $(SRCDIR)/$$x $(DESTDIR)$(HTMLDIR)/man5/img/$$fn; \
+		chmod 644 $(DESTDIR)$(HTMLDIR)/man5/img/$$fn; \
+	done
+	@set -e; for x in dummy $(IMAGEDOCS7); do \
+		if [ "$$x" = "dummy" ]; then continue; fi; \
+		fn=`basename $$x`; \
+		$(ECHO) "install $$x -> $(DESTDIR)$(HTMLDIR)/man7/img/$$fn"; \
+		cp $(SRCDIR)/$$x $(DESTDIR)$(HTMLDIR)/man7/img/$$fn; \
+		chmod 644 $(DESTDIR)$(HTMLDIR)/man7/img/$$fn; \
+	done
+
+uninstall_image_docs:
+	@set -e; for x in dummy $(IMAGEDOCS1); do \
+		if [ "$$x" = "dummy" ]; then continue; fi; \
+		fn=`basename $$x`; \
+		$(ECHO) "$(RM) $(DESTDIR)$(HTMLDIR)/man1/img/$$fn"; \
+		$(RM) $(DESTDIR)$(HTMLDIR)/man1/img/$$fn; \
+	done
+	@set -e; for x in dummy $(IMAGEDOCS3); do \
+		if [ "$$x" = "dummy" ]; then continue; fi; \
+		fn=`basename $$x`; \
+		$(ECHO) "$(RM) $(DESTDIR)$(HTMLDIR)/man3/img/$$fn"; \
+		$(RM) $(DESTDIR)$(HTMLDIR)/man3/img/$$fn; \
+	done
+	@set -e; for x in dummy $(IMAGEDOCS5); do \
+		if [ "$$x" = "dummy" ]; then continue; fi; \
+		fn=`basename $$x`; \
+		$(ECHO) "$(RM) $(DESTDIR)$(HTMLDIR)/man5/img/$$fn"; \
+		$(RM) $(DESTDIR)$(HTMLDIR)/man5/img/$$fn; \
+	done
+	@set -e; for x in dummy $(IMAGEDOCS7); do \
+		if [ "$$x" = "dummy" ]; then continue; fi; \
+		fn=`basename $$x`; \
+		$(ECHO) "$(RM) $(DESTDIR)$(HTMLDIR)/man7/img/$$fn"; \
+		$(RM) $(DESTDIR)$(HTMLDIR)/man7/img/$$fn; \
+	done
+
 # Developer targets (note: these are only available on Unix) #########
 
 # It's important that generate_buildinfo comes after ordinals, as ordinals
diff --git a/Configurations/windows-makefile.tmpl b/Configurations/windows-makefile.tmpl
index a7123f6a5e..632e5ce4b5 100644
--- a/Configurations/windows-makefile.tmpl
+++ b/Configurations/windows-makefile.tmpl
@@ -145,6 +145,14 @@ MISC_SCRIPTS={-
                          && $unified_info{attributes}->{scripts}->{$_}->{misc} }
                   @{$unified_info{scripts}})
 -}
+IMAGEDOCS1={- our @IMAGEDOCS1 = @{$unified_info{imagedocs}->{man1}};
+             join(" ", @IMAGEDOCS1) -}
+IMAGEDOCS3={- our @IMAGEDOCS3 = @{$unified_info{imagedocs}->{man3}};
+             join(" ", @IMAGEDOCS3) -}
+IMAGEDOCS5={- our @IMAGEDOCS5 = @{$unified_info{imagedocs}->{man5}};
+             join(" ", @IMAGEDOCS5) -}
+IMAGEDOCS7={- our @IMAGEDOCS7 = @{$unified_info{imagedocs}->{man7}};
+             join(" ", @IMAGEDOCS7) -}
 HTMLDOCS1={- our @HTMLDOCS1 = @{$unified_info{htmldocs}->{man1}};
              join(" ", @HTMLDOCS1) -}
 HTMLDOCS3={- our @HTMLDOCS3 = @{$unified_info{htmldocs}->{man3}};
@@ -595,7 +603,7 @@ install_programs: install_runtime_libs build_programs
 
 uninstall_runtime:
 
-install_html_docs: build_html_docs
+install_html_docs: install_image_docs build_html_docs
 	@if "$(INSTALLTOP)"=="" ( echo INSTALLTOP should not be empty & exit 1 )
 	@echo *** Installing HTML docs
 	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man1"
@@ -611,7 +619,25 @@ install_html_docs: build_html_docs
 	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(BLDDIR)\doc\html\man7\*.html \
                                         "$(INSTALLTOP)\html\man7"
 
-uninstall_html_docs:
+uninstall_html_docs: uninstall_image_docs
+
+install_image_docs:
+	@if "$(INSTALLTOP)"=="" ( echo INSTALLTOP should not be empty & exit 1 )
+	@echo *** Installing HTML images
+	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man1\img"
+	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man3\img"
+	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man5\img"
+	@"$(PERL)" "$(SRCDIR)\util\mkdir-p.pl" "$(INSTALLTOP)\html\man7\img"
+	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(SRCDIR)\doc\man1\img\*.png \
+                                        "$(INSTALLTOP)\html\man1\img"
+	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(SRCDIR)\doc\man3\img\*.png \
+                                        "$(INSTALLTOP)\html\man3\img"
+	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(SRCDIR)\doc\man5\img\*.png \
+                                        "$(INSTALLTOP)\html\man5\img"
+	@"$(PERL)" "$(SRCDIR)\util\copy.pl" $(SRCDIR)\doc\man7\img\*.png \
+                                        "$(INSTALLTOP)\html\man7\img"
+
+uninstall_image_docs:
 
 # Helper targets #####################################################
 
diff --git a/Configure b/Configure
index e6ac9afd35..16f12565ab 100755
--- a/Configure
+++ b/Configure
@@ -1956,6 +1956,7 @@ if ($builder eq "unified") {
         my %defines = ();
         my %depends = ();
         my %generate = ();
+        my %imagedocs = ();
         my %htmldocs = ();
         my %mandocs = ();
 
@@ -2169,6 +2170,11 @@ if ($builder eq "unified") {
                                 \$attributes{scripts}, $+{ATTRIBS},
                                 tokenize($expand_variables->($+{VALUE})))
                          if !@skip || $skip[$#skip] > 0; },
+            qr/^\s* IMAGEDOCS ${index_re} = ${value_re} $/x
+            => sub { $push_to->(\%imagedocs, $expand_variables->($+{INDEX}),
+                                undef, undef,
+                                tokenize($expand_variables->($+{VALUE})))
+                         if !@skip || $skip[$#skip] > 0; },
             qr/^\s* HTMLDOCS ${index_re} = ${value_re} $/x
             => sub { $push_to->(\%htmldocs, $expand_variables->($+{INDEX}),
                                 undef, undef,
@@ -2463,6 +2469,13 @@ EOF
             }
         }
 
+        foreach my $section (keys %imagedocs) {
+            foreach (@{$imagedocs{$section}}) {
+                my $imagedocs = cleanfile($buildd, $_, $blddir);
+                $unified_info{imagedocs}->{$section}->{$imagedocs} = 1;
+            }
+        }
+
         foreach my $section (keys %htmldocs) {
             foreach (@{$htmldocs{$section}}) {
                 my $htmldocs = cleanfile($buildd, $_, $blddir);
@@ -2704,7 +2717,7 @@ EOF
     }
     # Two level structures
     foreach my $l1 (("sources", "shared_sources", "ldadd", "depends",
-                     "htmldocs", "mandocs")) {
+                     "imagedocs", "htmldocs", "mandocs")) {
         foreach my $l2 (sort keys %{$unified_info{$l1}}) {
             my @items =
                 sort
@@ -2751,7 +2764,9 @@ EOF
                      "dso" => [ @{$unified_info{modules}} ],
                      "bin" => [ @{$unified_info{programs}} ],
                      "script" => [ @{$unified_info{scripts}} ],
-                     "docs" => [ (map { @{$unified_info{htmldocs}->{$_} // []} }
+                     "docs" => [ (map { @{$unified_info{imagedocs}->{$_} // []} }
+                                  keys %{$unified_info{imagedocs} // {}}),
+                                 (map { @{$unified_info{htmldocs}->{$_} // []} }
                                   keys %{$unified_info{htmldocs} // {}}),
                                  (map { @{$unified_info{mandocs}->{$_} // []} }
                                   keys %{$unified_info{mandocs} // {}}) ] );
diff --git a/doc/build.info b/doc/build.info
index f64919a7c4..55e7fff306 100644
--- a/doc/build.info
+++ b/doc/build.info
@@ -346,6 +346,7 @@ DEPEND[html/man1/tsget.html]=man1/tsget.pod
 GENERATE[html/man1/tsget.html]=man1/tsget.pod
 DEPEND[man/man1/tsget.1]=man1/tsget.pod
 GENERATE[man/man1/tsget.1]=man1/tsget.pod
+IMAGEDOCS[man1]=
 HTMLDOCS[man1]=html/man1/CA.pl.html \
 html/man1/openssl-asn1parse.html \
 html/man1/openssl-ca.html \
@@ -2818,6 +2819,7 @@ DEPEND[html/man3/s2i_ASN1_IA5STRING.html]=man3/s2i_ASN1_IA5STRING.pod
 GENERATE[html/man3/s2i_ASN1_IA5STRING.html]=man3/s2i_ASN1_IA5STRING.pod
 DEPEND[man/man3/s2i_ASN1_IA5STRING.3]=man3/s2i_ASN1_IA5STRING.pod
 GENERATE[man/man3/s2i_ASN1_IA5STRING.3]=man3/s2i_ASN1_IA5STRING.pod
+IMAGEDOCS[man3]=
 HTMLDOCS[man3]=html/man3/ADMISSIONS.html \
 html/man3/ASN1_INTEGER_get_int64.html \
 html/man3/ASN1_INTEGER_new.html \
@@ -4006,6 +4008,7 @@ DEPEND[html/man5/x509v3_config.html]=man5/x509v3_config.pod
 GENERATE[html/man5/x509v3_config.html]=man5/x509v3_config.pod
 DEPEND[man/man5/x509v3_config.5]=man5/x509v3_config.pod
 GENERATE[man/man5/x509v3_config.5]=man5/x509v3_config.pod
+IMAGEDOCS[man5]=
 HTMLDOCS[man5]=html/man5/config.html \
 html/man5/fips_config.html \
 html/man5/x509v3_config.html
@@ -4434,6 +4437,9 @@ DEPEND[html/man7/x509.html]=man7/x509.pod
 GENERATE[html/man7/x509.html]=man7/x509.pod
 DEPEND[man/man7/x509.7]=man7/x509.pod
 GENERATE[man/man7/x509.7]=man7/x509.pod
+IMAGEDOCS[man7]=man7/img/kdf.png \
+man7/img/mac.png \
+man7/img/rand.png
 HTMLDOCS[man7]=html/man7/EVP_ASYM_CIPHER-SM2.html \
 html/man7/EVP_KDF-HKDF.html \
 html/man7/EVP_KDF-KB.html \
diff --git a/doc/build.info.in b/doc/build.info.in
index 408c168818..fa1962f382 100644
--- a/doc/build.info.in
+++ b/doc/build.info.in
@@ -7,8 +7,11 @@ SUBDIRS = man1
  my $sourcedir = catdir($config{sourcedir}, 'doc');
 
  foreach my $section ((1, 3, 5, 7)) {
+     my @imagefiles = ();
      my @htmlfiles = ();
      my @manfiles = ();
+     my %pngfiles =
+         map { $_ => 1 } glob catfile($sourcedir, "man$section", "img", "*.png");
      my %podfiles =
          map { $_ => 1 } glob catfile($sourcedir, "man$section", "*.pod");
      my %podinfiles = 
@@ -62,6 +65,15 @@ DEPEND[$podfile]{pod}=$podinfile
 GENERATE[$podfile]=$podinfile
 _____
      }
+
+     foreach my $p (sort keys %pngfiles) {
+         my $relpath = abs2rel($p, $sourcedir);
+         my $imagefile = abs2rel(catfile($buildtop, "doc", "$relpath"),
+                                 catdir($buildtop, "doc"));
+         push @imagefiles, $imagefile;
+     }
+
+     $OUT .= "IMAGEDOCS[man$section]=" . join(" \\\n", @imagefiles) . "\n";
      $OUT .= "HTMLDOCS[man$section]=" . join(" \\\n", @htmlfiles) . "\n";
      $OUT .= "MANDOCS[man$section]=" . join(" \\\n", @manfiles) . "\n";
  }
diff --git a/doc/man7/kdf.png b/doc/man7/img/kdf.png
similarity index 100%
rename from doc/man7/kdf.png
rename to doc/man7/img/kdf.png
diff --git a/doc/man7/mac.png b/doc/man7/img/mac.png
similarity index 100%
rename from doc/man7/mac.png
rename to doc/man7/img/mac.png
diff --git a/doc/man7/rand.png b/doc/man7/img/rand.png
similarity index 100%
rename from doc/man7/rand.png
rename to doc/man7/img/rand.png
diff --git a/doc/man7/life_cycle-kdf.pod b/doc/man7/life_cycle-kdf.pod
index 7237c4c13e..6a50cc9aa6 100644
--- a/doc/man7/life_cycle-kdf.pod
+++ b/doc/man7/life_cycle-kdf.pod
@@ -64,7 +64,7 @@ The usual life-cycle of a KDF/PRF is illustrated:
 
 =end man
 
-=for html <img src="kdf.png">
+=for html <img src="img/kdf.png">
 
 =head2 Formal State Transitions
 
diff --git a/doc/man7/life_cycle-mac.pod b/doc/man7/life_cycle-mac.pod
index 17be432ab0..7875e53cbe 100644
--- a/doc/man7/life_cycle-mac.pod
+++ b/doc/man7/life_cycle-mac.pod
@@ -83,7 +83,7 @@ The usual life-cycle of a MAC is illustrated:
 
 =end man
 
-=for html <img src="mac.png">
+=for html <img src="img/mac.png">
 
 =head2 Formal State Transitions
 
diff --git a/doc/man7/life_cycle-rand.pod b/doc/man7/life_cycle-rand.pod
index 5b3e81caa9..de2dfcb97e 100644
--- a/doc/man7/life_cycle-rand.pod
+++ b/doc/man7/life_cycle-rand.pod
@@ -76,7 +76,7 @@ The usual life-cycle of a RAND is illustrated:
 
 =end man
 
-=for html <img src="rand.png">
+=for html <img src="img/rand.png">
 
 =head2 Formal State Transitions
 


More information about the openssl-commits mailing list