Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VMS installation #16842

Closed
wants to merge 8 commits into from
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ breaking changes, and mappings for the large list of deprecated functions.

### Changes between 3.0.0 and 3.0.1 [xx XXX xxxx]

*
* Corrected a few file name and file reference bugs in the build,
installation and setup scripts, which lead to installation verification
failures. Slightly enhanced the installation verification script.

*Richard Levitte*

### Changes between 1.1.1 and 3.0.0 [7 sep 2021]

Expand Down
25 changes: 15 additions & 10 deletions Configurations/descrip.mms.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
(our $osslprefix_q = platform->osslprefix()) =~ s/\$/\\\$/;

our $sover_dirname = platform->shlib_version_as_filename();
our $osslver = sprintf "%02d%02d", split(/\./, $config{version});
our $osslver = sprintf "%02d", split(/\./, $config{version});

our $sourcedir = $config{sourcedir};
our $builddir = $config{builddir};
Expand Down Expand Up @@ -356,7 +356,7 @@ OPENSSLDIR_C={- platform->osslprefix() -}DATAROOT:[000000]
# Where installed ENGINE modules reside, for C
ENGINESDIR_C={- platform->osslprefix() -}ENGINES{- $sover_dirname.$target{pointer_size} -}:
# Where modules reside, for C
MODULESDIR_C={- platform->osslprefix() -}MODULES{- $sover_dirname.$target{pointer_size} -}:
MODULESDIR_C={- platform->osslprefix() -}MODULES{- $target{pointer_size} -}:

##### User defined commands and flags ################################

Expand Down Expand Up @@ -429,7 +429,9 @@ NODEBUG=@
$(NODEBUG) ! them, so we create it instead. This is an unfortunate
$(NODEBUG) ! necessity.
$(NODEBUG) !
$(NODEBUG) DEFINE openssl "{- sourcedir('include/openssl') -}
$(NODEBUG) openssl_inc1 = F$PARSE("[.include.openssl]","A.;",,,"syntax_only") - "A.;"
$(NODEBUG) openssl_inc2 = F$PARSE("sourcetop:[include.openssl]","A.;",,,"SYNTAX_ONLY") - "A.;"
$(NODEBUG) DEFINE openssl 'openssl_inc1','openssl_inc2'
$(NODEBUG) !
$(NODEBUG) ! Figure out the architecture
$(NODEBUG) !
Expand All @@ -442,9 +444,10 @@ NODEBUG=@

.LAST :
$(NODEBUG) {- join("\n\t\$(NODEBUG) ", map { "DEASSIGN ".uc($_) } @shlibs) || "!" -}
$(NODEBUG) DEASSIGN openssl
$(NODEBUG) DEASSIGN ossl_dataroot
$(NODEBUG) DEASSIGN ossl_installroot
$(NODEBUG) DEASSIGN openssl
$(NODEBUG) DEASSIGN ossl_sourceroot
.DEFAULT :
@ ! MMS cannot handle no actions...

Expand Down Expand Up @@ -570,18 +573,18 @@ uninstall_docs : uninstall_html_docs
{- output_off() if $disabled{fips}; "" -}
install_fips : build_sw $(INSTALL_FIPSMODULECONF)
@ WRITE SYS$OUTPUT "*** Installing FIPS module"
- CREATE/DIR ossl_installroot:[MODULES{- $sover_dirname.$target{pointer_size} -}.'arch']
- CREATE/DIR ossl_installroot:[MODULES{- $target{pointer_size} -}.'arch']
- CREATE/DIR/PROT=(S:RWED,O:RWE,G:RE,W:RE) OSSL_DATAROOT:[000000]
COPY/PROT=W:RE $(INSTALL_FIPSMODULES) -
ossl_installroot:[MODULES{- $sover_dirname.$target{pointer_size} -}.'arch']$(FIPSMODULENAME)
ossl_installroot:[MODULES{- $target{pointer_size} -}.'arch']$(FIPSMODULENAME)
@ WRITE SYS$OUTPUT "*** Installing FIPS module configuration"
COPY/PROT=W:RE $(INSTALL_FIPSMODULECONF) OSSL_DATAROOT:[000000]

uninstall_fips :
@ WRITE SYS$OUTPUT "*** Uninstalling FIPS module configuration"
DELETE OSSL_DATAROOT:[000000]fipsmodule.cnf;*
@ WRITE SYS$OUTPUT "*** Uninstalling FIPS module"
DELETE ossl_installroot:[MODULES{- $sover_dirname.$target{pointer_size} -}.'arch']$(FIPSMODULENAME);*
DELETE ossl_installroot:[MODULES{- $target{pointer_size} -}.'arch']$(FIPSMODULENAME);*
{- output_on() if $disabled{fips}; "" -}

install_ssldirs : check_INSTALLTOP
Expand Down Expand Up @@ -610,7 +613,9 @@ install_dev : check_INSTALLTOP install_runtime_libs
@ WRITE SYS$OUTPUT "*** Installing development files"
@ ! Install header files
- CREATE/DIR ossl_installroot:[include.openssl]
COPY/PROT=W:R openssl:*.h ossl_installroot:[include.openssl]
COPY/PROT=W:R ossl_sourceroot:[include.openssl]*.h -
ossl_installroot:[include.openssl]
COPY/PROT=W:R [.include.openssl]*.h ossl_installroot:[include.openssl]
@ ! Install static (development) libraries
- CREATE/DIR ossl_installroot:[LIB.'arch']
{- join("\n ",
Expand All @@ -629,9 +634,9 @@ install_engines : check_INSTALLTOP install_runtime_libs build_modules
install_modules : check_INSTALLTOP install_runtime_libs build_modules
@ {- output_off() unless scalar @install_modules; "" -} !
@ WRITE SYS$OUTPUT "*** Installing modules"
- CREATE/DIR ossl_installroot:[MODULES{- $sover_dirname.$target{pointer_size} -}.'arch']
- CREATE/DIR ossl_installroot:[MODULES{- $target{pointer_size} -}.'arch']
{- join("\n ",
map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[MODULES$sover_dirname$target{pointer_size}.'arch']" }
map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[MODULES$target{pointer_size}.'arch']" }
@install_modules) -}
@ {- output_on() unless scalar @install_modules; "" -} !

Expand Down
10 changes: 8 additions & 2 deletions VMS/openssl_ivp.com.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ $ INSTALLTOP_ = F$PARSE("A.;",INSTALLTOP,,,"NO_CONCEAL") -
$ OPENSSLDIR_ = F$PARSE("A.;",OPENSSLDIR,,,"NO_CONCEAL") -
- ".][000000" - "[000000." - "][" - "]A.;" + "."
$
$ v := {- sprintf "%02d%02d", split(/\./, $config{version}) -}
$ pz := {- $config{pointer_size} -}
$ v := {- sprintf "%02d", split(/\./, $config{version}) -}
$ pz := {- $target{pointer_size} -}
$
$ @'INSTALLTOP_'SYS$STARTUP]openssl_startup'v'
$ @'INSTALLTOP_'SYS$STARTUP]openssl_utils'v'
Expand All @@ -41,6 +41,12 @@ $
$ ! FUTURE ENHANCEMENT: Verify that engines are where they should be.
$ ! openssl engine -c -t checker
$
$ ! Verify that the built in providers are reachable. If they aren't,
$ ! then we're likely to get an image activation error here
$ openssl list -provider base -providers
$ openssl list -provider default -providers
$ openssl list -provider legacy -providers
$
$ WRITE SYS$ERROR "OpenSSL IVP passed"
$ EXIT %x10000001
$
Expand Down
9 changes: 5 additions & 4 deletions VMS/openssl_shutdown.com.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ $ ENDIF
$
$ ! Abbrevs
$ DEAS := DEASSIGN /NOLOG 'P1'
$ sv := {- sprintf "%02d%02d", split m|\.|, $config{shlib_version} -}
$ pz := {- $config{pointer_size} -}
$ sv := {- platform->shlib_version_as_filename(); -}
$ pz := {- $target{pointer_size} -}
$
$ DEAS OSSL$DATAROOT
$ DEAS OSSL$INSTROOT
$ DEAS OSSL$INCLUDE
$ DEAS OSSL$LIB
$ DEAS OSSL$SHARE
$ DEAS OSSL$ENGINES'sv'
$ DEAS OSSL$ENGINES'sv''pz'
$ DEAS OSSL$MODULES'pz'
$ DEAS OSSL$EXE
$ DEAS OSSL$LIBCRYPTO'pz'
$ DEAS OSSL$LIBSSL'pz'
Expand All @@ -46,7 +47,7 @@ $ DEAS OPENSSL
$
$ IF P2 .NES. "NOALIASES"
$ THEN
$ DEAS OSSL$ENGINES
$ DEAS OSSL$ENGINES'pz'
${- output_off() if $config{no_shared}; "" -}
$ DEAS OSSL$LIBCRYPTO_SHR'pz'
$ DEAS OSSL$LIBSSL_SHR'pz'
Expand Down
8 changes: 5 additions & 3 deletions VMS/openssl_startup.com.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ $ ! are located
$ ! OSSL$SHARE Where the shareable image files
$ ! are located
$ ! OSSL$EXE Where the executables are located
$ ! OSSL$ENGINESnnn Where the shareable images are located
$ ! OSSL$ENGINESnnn Where the engines modules are located
$ ! OSSL$MODULES Where the non-engine modules are located
$ ! OSSL$LIBCRYPTO The static crypto library
$ ! OSSL$LIBSSL The static ssl library
$ ! OSSL$LIBCRYPTOnnn_SHR The shareable crypto image
Expand Down Expand Up @@ -88,15 +89,16 @@ $
$ ! Abbrevs
$ DEFT := DEFINE /TRANSLATION=CONCEALED /NOLOG 'P1'
$ DEF := DEFINE /NOLOG 'P1'
$ sv := {- sprintf "%02d%02d", split m|\.|, $config{shlib_version} -}
$ pz := {- $config{pointer_size} -}
$ sv := {- platform->shlib_version_as_filename(); -}
$ pz := {- $target{pointer_size} -}
$
$ DEFT OSSL$DATAROOT 'OPENSSLDIR_']
$ DEFT OSSL$INSTROOT 'INSTALLTOP_']
$ DEFT OSSL$INCLUDE 'INSTALLTOP_'INCLUDE.]
$ DEF OSSL$LIB OSSL$INSTROOT:[LIB.'arch']
$ DEF OSSL$SHARE OSSL$INSTROOT:[LIB.'arch']
$ DEF OSSL$ENGINES'sv''pz' OSSL$INSTROOT:[ENGINES'sv''pz'.'arch']
$ DEF OSSL$MODULES'pz' OSSL$INSTROOT:[MODULES'pz'.'arch']
$ DEF OSSL$EXE OSSL$INSTROOT:[EXE.'arch'],-
OSSL$INSTROOT:[EXE]
$ DEF OSSL$LIBCRYPTO'pz' OSSL$LIB:OSSL$LIBCRYPTO'pz'.OLB
Expand Down
2 changes: 1 addition & 1 deletion VMS/openssl_utils.com.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$ ! OpenSSL utilities
$ !
$
$ v := {- sprintf "%02d%02d", split(/\./, $config{version}) -}
$ v := {- sprintf "%02d", split(/\./, $config{version}) -}
$
$ OPENSSL'v' :== $OSSL$EXE:OPENSSL'v'
$ OPENSSL :== $OSSL$EXE:OPENSSL'v'
Expand Down