diff options
author | Richard Levitte <levitte@openssl.org> | 2021-05-24 14:24:32 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-05-26 15:11:01 +0200 |
commit | f5657ce8e664cbb1e3314f54385b9a4d653e6bae (patch) | |
tree | 01368af9a1ae88a21ee681dbb92029816c6a0b04 /Configurations/unix-Makefile.tmpl | |
parent | 6dd07a9328950ff8bf3f95ad35caf3a4e1e33a15 (diff) |
Build file templates: rework FIPS module installation
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15436)
Diffstat (limited to 'Configurations/unix-Makefile.tmpl')
-rw-r--r-- | Configurations/unix-Makefile.tmpl | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl index 6895ed373b..78db83a377 100644 --- a/Configurations/unix-Makefile.tmpl +++ b/Configurations/unix-Makefile.tmpl @@ -173,23 +173,24 @@ INSTALL_ENGINES={- && $unified_info{attributes}->{modules}->{$_}->{engine} } @{$unified_info{modules}})) -} -INSTALL_FIPS={- +INSTALL_MODULES={- join(" \\\n" . ' ' x 16, fill_lines(" ", $COLUMNS - 16, map { platform->dso($_) } grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} - && $unified_info{attributes}->{modules}->{$_}->{fips} } + && !$unified_info{attributes}->{modules}->{$_}->{engine} + && !$unified_info{attributes}->{modules}->{$_}->{fips} } @{$unified_info{modules}})) -} -INSTALL_MODULES={- +INSTALL_FIPSMODULE={- join(" \\\n" . ' ' x 16, fill_lines(" ", $COLUMNS - 16, map { platform->dso($_) } grep { !$unified_info{attributes}->{modules}->{$_}->{noinst} - && !$unified_info{attributes}->{modules}->{$_}->{engine} - && !$unified_info{attributes}->{modules}->{$_}->{fips} } + && $unified_info{attributes}->{modules}->{$_}->{fips} } @{$unified_info{modules}})) -} +INSTALL_FIPSMODULECONF=providers/fipsmodule.cnf INSTALL_PROGRAMS={- join(" \\\n" . ' ' x 16, fill_lines(" ", $COLUMNS - 16, map { platform->bin($_) } @@ -621,18 +622,18 @@ uninstall_docs: uninstall_man_docs uninstall_html_docs $(RM) -r $(DESTDIR)$(DOCDIR) {- output_off() if $disabled{fips}; "" -} -install_fips: build_sw providers/fipsmodule.cnf +install_fips: build_sw $(INSTALL_FIPSMODULECONF) @[ -n "$(INSTALLTOP)" ] || (echo INSTALLTOP should not be empty; exit 1) @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(MODULESDIR) @$(ECHO) "*** Installing FIPS module" - @$(ECHO) "install $(INSTALL_FIPS) -> $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME)" - @cp "$(INSTALL_FIPS)" $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).new + @$(ECHO) "install $(INSTALL_FIPSMODULE) -> $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME)" + @cp "$(INSTALL_FIPSMODULE)" $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).new @chmod 755 $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).new @mv -f $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME).new \ $(DESTDIR)$(MODULESDIR)/$(FIPSMODULENAME) @$(ECHO) "*** Installing FIPS module configuration" - @$(ECHO) "install providers/fipsmodule.cnf -> $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf" - @cp providers/fipsmodule.cnf $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf + @$(ECHO) "install $(INSTALL_FIPSMODULECONF) -> $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf" + @cp $(INSTALL_FIPSMODULECONF) $(DESTDIR)$(OPENSSLDIR)/fipsmodule.cnf uninstall_fips: @$(ECHO) "*** Uninstalling FIPS module configuration" |