Make sure the 'tsget' script is called 'tsget.pl' everywhere
authorRichard Levitte <levitte@openssl.org>
Mon, 23 Jul 2018 11:25:45 +0000 (13:25 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 23 Jul 2018 16:33:48 +0000 (18:33 +0200)
The result is that we don't have to produce different names on
different platforms, and we won't have confusion on Windows depending
on if the script was built with mingw or with MSVC.

Partial fix for #3254

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6764)

CHANGES
Configurations/unix-Makefile.tmpl
apps/build.info

diff --git a/CHANGES b/CHANGES
index ae59f92259884d1dc71f4019bbaf1c553dbad636..3cf312a98f4f4811c578d4e7b74fca332e8ecfba 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -9,6 +9,12 @@
 
  Changes between 1.1.0h and 1.1.1 [xx XXX xxxx]
 
+  *) The 'tsget' script is renamed to 'tsget.pl', to avoid confusion when
+     moving between systems, and to avoid confusion when a Windows build is
+     done with mingw vs with MSVC.  For POSIX installs, there's still a
+     symlink or copy named 'tsget' to avoid that confusion as well.
+     [Richard Levitte]
+
   *) Revert blinding in ECDSA sign and instead make problematic addition
      length-invariant. Switch even to fixed-length Montgomery multiplication.
      [Andy Polyakov]
index 2423ad28347a600bd1de943fa1fa6a6883e3db77..c4927409a58a373cb69b1949f5fe22dd5efb2c09 100644 (file)
@@ -121,7 +121,7 @@ INSTALL_ENGINES={- join(" ", map { dso($_) } @{$unified_info{install}->{engines}
 INSTALL_PROGRAMS={- join(" ", map { $_.$exeext } @{$unified_info{install}->{programs}}) -}
 {- output_off() if $disabled{apps}; "" -}
 BIN_SCRIPTS=$(BLDDIR)/tools/c_rehash
-MISC_SCRIPTS=$(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget
+MISC_SCRIPTS=$(BLDDIR)/apps/CA.pl $(BLDDIR)/apps/tsget.pl:tsget
 {- output_on() if $disabled{apps}; "" -}
 
 APPS_OPENSSL={- use File::Spec::Functions;
@@ -452,12 +452,25 @@ install_ssldirs:
        @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(OPENSSLDIR)/misc
        @set -e; for x in dummy $(MISC_SCRIPTS); do \
                if [ "$$x" = "dummy" ]; then continue; fi; \
-               fn=`basename $$x`; \
-               $(ECHO) "install $$x -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
-               cp $$x $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
+               x1=`echo "$$x" | cut -f1 -d:`; \
+               x2=`echo "$$x" | cut -f2 -d:`; \
+               fn=`basename $$x1`; \
+               $(ECHO) "install $$x1 -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
+               cp $$x1 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
                chmod 755 $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new; \
                mv -f $(DESTDIR)$(OPENSSLDIR)/misc/$$fn.new \
                      $(DESTDIR)$(OPENSSLDIR)/misc/$$fn; \
+               if [ "$$x1" != "$$x2" ]; then \
+                       ln=`basename "$$x2"`; \
+                       : {- output_off() unless windowsdll(); "" -}; \
+                       $(ECHO) "copy $(DESTDIR)$(OPENSSLDIR)/misc/$$ln -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
+                       cp $(DESTDIR)$(OPENSSLDIR)/misc/$$fn $(DESTDIR)$(OPENSSLDIR)/misc/$$ln; \
+                       : {- output_on() unless windowsdll();
+                            output_off() if windowsdll(); "" -}; \
+                       $(ECHO) "link $(DESTDIR)$(OPENSSLDIR)/misc/$$ln -> $(DESTDIR)$(OPENSSLDIR)/misc/$$fn"; \
+                       ln -sf $$fn $(DESTDIR)$(OPENSSLDIR)/misc/$$ln; \
+                       : {- output_on() if windowsdll(); "" -}; \
+               fi; \
        done
        @$(ECHO) "install $(SRCDIR)/apps/openssl.cnf -> $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.dist"
        @cp $(SRCDIR)/apps/openssl.cnf $(DESTDIR)$(OPENSSLDIR)/openssl.cnf.new
index 4a11a18fbebc55d967d417804eaf85506c338c27..751d8da82818152995991e4ce50a649927294e37 100644 (file)
@@ -1,5 +1,4 @@
-{- our $tsget_name = $config{target} =~ /^(VC|vms)-/ ? "tsget.pl" : "tsget";
-   our @apps_openssl_src =
+{- our @apps_openssl_src =
        qw(openssl.c
           asn1pars.c ca.c ciphers.c cms.c crl.c crl2p7.c dgst.c dhparam.c
           dsa.c dsaparam.c ec.c ecparam.c enc.c engine.c errstr.c gendsa.c
@@ -33,7 +32,7 @@ ENDIF
   GENERATE[progs.h]=progs.pl $(APPS_OPENSSL)
   DEPEND[progs.h]=../configdata.pm
 
-  SCRIPTS=CA.pl {- $tsget_name -}
+  SCRIPTS=CA.pl tsget.pl
   SOURCE[CA.pl]=CA.pl.in
-  SOURCE[{- $tsget_name -}]=tsget.in
+  SOURCE[tsget.pl]=tsget.in
 ENDIF