Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1752322385, "reponame":"openssl", "desc":"OpenSSL", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl", "f":3, "items": [ {"schema":"libjg2-1", "cid":"0498af9efd33a3f10fa40ca5b3ff68e3", "commit": {"type":"commit", "time": 1512689781, "time_ofs": 60, "oid_tree": { "oid": "ec3fa0488234e02321307888ecff4359238e7bc2", "alias": []}, "oid":{ "oid": "7ecdf18d80cba14ad1afa6c0d18574d2ad2929c3", "alias": []}, "msg": "Save away the environment variables we rely on", "sig_commit": { "git_time": { "time": 1512689781, "offset": 60 }, "name": "Richard Levitte", "email": "levitte@openssl.org", "md5": "b737120f0642a6a5c30c6291e6170c77" }, "sig_author": { "git_time": { "time": 1511957341, "offset": 60 }, "name": "Richard Levitte", "email": "levitte@openssl.org", "md5": "b737120f0642a6a5c30c6291e6170c77" }}, "body": "Save away the environment variables we rely on\n\nThere are cases when we overwrite %ENV values, and while this is\nperfectly fine on some platforms, it isn't on others, because the\nConfigure script isn't necessarely run in a separate process, and\nthus, changing %ENV may very well change the environment of the\ncalling shell. VMS is such a platform.\n\nFurthermore, saving away values that we use also allow us to save them\nin configdata.pm in an effective way, and recall those values just as\neffectively when reconfiguring. Also, this makes sure that we do use\nthe saved away values when reconfiguring, when the actual environment\nvariables might otherwise affect us.\n\nReviewed-by: Andy Polyakov \u003cappro@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/4818)\n" , "diff": "diff --git a/Configure b/Configure\nindex 0bdc110..6f2aee3 100755\n--- a/Configure\n+++ b/Configure\n@@ -223,25 +223,12 @@ if (grep /^reconf(igure)?$/, @argvcopy) {\n \t @{$configdata::config{perlargv}} : ();\n \tdie \u0022Incorrect data to reconfigure, please do a normal configuration\u005cn\u0022\n \t if (grep(/^reconf/,@argvcopy));\n-\t$ENV{CROSS_COMPILE} \u003d $configdata::config{cross_compile_prefix}\n-\t if defined($configdata::config{cross_compile_prefix});\n-\t$ENV{CC} \u003d $configdata::config{cc}\n-\t if defined($configdata::config{cc});\n-\t$ENV{CXX} \u003d $configdata::config{cxx}\n-\t if defined($configdata::config{cxx});\n-\t$ENV{BUILDFILE} \u003d $configdata::config{build_file}\n-\t if defined($configdata::config{build_file});\n-\t$ENV{$local_config_envname} \u003d $configdata::config{local_config_dir}\n-\t if defined($configdata::config{local_config_dir});\n+\t$config{perlenv} \u003d $configdata::config{perlenv} // {};\n \n \tprint \u0022Reconfiguring with: \u0022, join(\u0022 \u0022,@argvcopy), \u0022\u005cn\u0022;\n-\tprint \u0022 CROSS_COMPILE \u003d \u0022,$ENV{CROSS_COMPILE},\u0022\u005cn\u0022\n-\t if $ENV{CROSS_COMPILE};\n-\tprint \u0022 CC \u003d \u0022,$ENV{CC},\u0022\u005cn\u0022 if $ENV{CC};\n-\tprint \u0022 CXX \u003d \u0022,$ENV{CXX},\u0022\u005cn\u0022 if $ENV{CXX};\n-\tprint \u0022 BUILDFILE \u003d \u0022,$ENV{BUILDFILE},\u0022\u005cn\u0022 if $ENV{BUILDFILE};\n-\tprint \u0022 $local_config_envname \u003d \u0022,$ENV{$local_config_envname},\u0022\u005cn\u0022\n-\t if $ENV{$local_config_envname};\n+\tforeach (sort keys %{$config{perlenv}}) {\n+\t print \u0022 $_ \u003d $config{perlenv}-\u003e{$_}\u005cn\u0022;\n+\t}\n } else {\n \tdie \u0022Insufficient data to reconfigure, please do a normal configuration\u005cn\u0022;\n }\n@@ -280,13 +267,13 @@ foreach (sort glob($pattern)) {\n \u0026read_config($_);\n }\n \n-if (defined $ENV{$local_config_envname}) {\n+if (defined env($local_config_envname)) {\n if ($^O eq 'VMS') {\n # VMS environment variables are logical names,\n # which can be used as is\n $pattern \u003d $local_config_envname . ':' . '*.conf';\n } else {\n- $pattern \u003d catfile($ENV{$local_config_envname}, '*.conf');\n+ $pattern \u003d catfile(env($local_config_envname), '*.conf');\n }\n \n foreach (sort glob($pattern)) {\n@@ -982,7 +969,7 @@ $target{dso_extension}\u003d$target{shared_extension_simple};\n if ($config{target} \u003d~ /^(?:Cygwin|mingw)/);\n \n \n-$config{cross_compile_prefix} \u003d $ENV{'CROSS_COMPILE'}\n+$config{cross_compile_prefix} \u003d env('CROSS_COMPILE')\n if $config{cross_compile_prefix} eq \u0022\u0022;\n \n # Allow overriding the names of some tools. USE WITH CARE\n@@ -990,19 +977,19 @@ $config{cross_compile_prefix} \u003d $ENV{'CROSS_COMPILE'}\n # the default string.\n $config{perl} \u003d ($^O ne \u0022VMS\u0022 ? $^X : \u0022perl\u0022);\n $config{hashbangperl} \u003d\n- $ENV{'HASHBANGPERL'} || $ENV{'PERL'} || \u0022/usr/bin/env perl\u0022;\n-$target{cc} \u003d $ENV{'CC'} || $target{cc} || \u0022cc\u0022;\n-$target{cxx} \u003d $ENV{'CXX'} || $target{cxx} || \u0022c++\u0022;\n-$target{ranlib} \u003d $ENV{'RANLIB'} || $target{ranlib} ||\n+ env('HASHBANGPERL') || env('PERL') || \u0022/usr/bin/env perl\u0022;\n+$target{cc} \u003d env('CC') || $target{cc} || \u0022cc\u0022;\n+$target{cxx} \u003d env('CXX') || $target{cxx} || \u0022c++\u0022;\n+$target{ranlib} \u003d env('RANLIB') || $target{ranlib} ||\n (which(\u0022$config{cross_compile_prefix}ranlib\u0022) ?\n \u0022\u005c$(CROSS_COMPILE)ranlib\u0022 : \u0022true\u0022);\n-$target{ar} \u003d $ENV{'AR'} || $target{ar} || \u0022ar\u0022;\n-$target{nm} \u003d $ENV{'NM'} || $target{nm} || \u0022nm\u0022;\n+$target{ar} \u003d env('AR') || $target{ar} || \u0022ar\u0022;\n+$target{nm} \u003d env('NM') || $target{nm} || \u0022nm\u0022;\n $target{rc} \u003d\n- $ENV{'RC'} || $ENV{'WINDRES'} || $target{rc} || \u0022windres\u0022;\n+ env('RC') || env('WINDRES') || $target{rc} || \u0022windres\u0022;\n \n # Allow overriding the build file name\n-$target{build_file} \u003d $ENV{BUILDFILE} || $target{build_file} || \u0022Makefile\u0022;\n+$target{build_file} \u003d env('BUILDFILE') || $target{build_file} || \u0022Makefile\u0022;\n \n # Cache information necessary for reconfiguration\n $config{cc} \u003d $target{cc};\n@@ -1418,7 +1405,7 @@ if ($builder eq \u0022unified\u0022) {\n my @build_file_templates \u003d ();\n \n # First, look in the user provided directory, if given\n- if (defined $ENV{$local_config_envname}) {\n+ if (defined env($local_config_envname)) {\n \t@build_file_templates \u003d\n \t map {\n \t\tif ($^O eq 'VMS') {\n@@ -1426,7 +1413,7 @@ if ($builder eq \u0022unified\u0022) {\n \t\t # which can be used as is\n \t\t $local_config_envname . ':' . $_;\n \t\t} else {\n-\t\t catfile($ENV{$local_config_envname}, $_);\n+\t\t catfile(env($local_config_envname), $_);\n \t\t}\n \t }\n \t @build_file_template_names;\n@@ -2009,6 +1996,22 @@ foreach (sort keys %config) {\n \tprint OUT \u0022 \u0022, $_, \u0022 \u003d\u003e [ \u0022, join(\u0022, \u0022,\n \t\t\t\t\t map { quotify(\u0022perl\u0022, $_) }\n \t\t\t\t\t @{$config{$_}}), \u0022 ],\u005cn\u0022;\n+ } elsif (ref($config{$_}) eq \u0022HASH\u0022) {\n+\tprint OUT \u0022 \u0022, $_, \u0022 \u003d\u003e {\u0022;\n+ if (scalar keys %{$config{$_}} \u003e 0) {\n+ print OUT \u0022\u005cn\u0022;\n+ foreach my $key (sort keys %{$config{$_}}) {\n+ print OUT \u0022 \u0022,\n+ join(\u0022 \u003d\u003e \u0022,\n+ quotify(\u0022perl\u0022, $key),\n+ defined $config{$_}-\u003e{$key}\n+ ? quotify(\u0022perl\u0022, $config{$_}-\u003e{$key})\n+ : \u0022undef\u0022);\n+ print OUT \u0022,\u005cn\u0022;\n+ }\n+ print OUT \u0022 \u0022;\n+ }\n+ print OUT \u0022},\u005cn\u0022;\n } else {\n \tprint OUT \u0022 \u0022, $_, \u0022 \u003d\u003e \u0022, quotify(\u0022perl\u0022, $config{$_}), \u0022,\u005cn\u0022\n }\n@@ -2522,6 +2525,15 @@ sub which\n }\n }\n \n+sub env\n+{\n+ my $name \u003d shift;\n+\n+ return $config{perlenv}-\u003e{$name} if exists $config{perlenv}-\u003e{$name};\n+ $config{perlenv}-\u003e{$name} \u003d $ENV{$name};\n+ return $config{perlenv}-\u003e{$name};\n+}\n+\n # Configuration printer ##############################################\n \n sub print_table_entry\n","s":{"c":1752322385,"u": 36896}} ],"g": 38419,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}