From 24f9419a5bbcb345d00a39bc66c25ecd304d8e86 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 21 Jun 2017 10:20:56 +0200 Subject: [PATCH 1/2] build: clean up config_fips.gypi Currently when configuring the project using --openssl-fips a gyp include file name config_fips.gypi will be created. If the project is later configured but without the --openssl-fips flag an error will occur. For example: $ ./configure --openssl-fips=bogus $ ./configure && make -j8 ... /node/deps/openssl/fips/fipsld: line 8: /bin/fipsld: No such file or directory Error 127 This commit suggests removing the generate config_fips.gypi when the --openssl-fips flag is not give on the command line. --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index d1167f961ac4c2..9236dab1547350 100755 --- a/configure +++ b/configure @@ -984,6 +984,7 @@ def configure_openssl(o): ] else: o['variables']['openssl_fips'] = '' + os.remove('config_fips.gypi') if options.without_ssl: From a5d7672b51c78b23d0b018da79e72e0235586761 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 21 Jun 2017 13:11:15 +0200 Subject: [PATCH 2/2] add try/except clause incase file does not exist --- configure | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 9236dab1547350..c2bc15e61a463e 100755 --- a/configure +++ b/configure @@ -984,8 +984,10 @@ def configure_openssl(o): ] else: o['variables']['openssl_fips'] = '' - os.remove('config_fips.gypi') - + try: + os.remove('config_fips.gypi') + except OSError: + pass if options.without_ssl: def without_ssl_error(option):