From bb1c92aaed232b36323ef701479d9dcdd1290526 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Fri, 13 Sep 2024 10:37:34 +0200 Subject: [PATCH 1/4] pass ssl_verify as env var --- constructor/fcp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/constructor/fcp.py b/constructor/fcp.py index 96b191b36..a0411b1fc 100644 --- a/constructor/fcp.py +++ b/constructor/fcp.py @@ -451,16 +451,16 @@ def main(info, verbose=True, dry_run=False, conda_exe="conda.exe"): # We need to preserve the configuration for proxy servers and ssl, otherwise if constructor is # running in a host that sits behind proxy (usually in a company / corporate environment) it # will have this settings reset with the call to conda_replace_context_default + # We can pass ssl_verify via env var, but proxy_servers is a mapping so we need to do it by hand # See: https://github.com/conda/constructor/issues/304 proxy_servers = conda_context.proxy_servers - ssl_verify = conda_context.ssl_verify with env_vars({ "CONDA_PKGS_DIRS": download_dir, + "CONDA_SSL_VERIFY": str(conda_context.ssl_verify), }, conda_replace_context_default): - # Restoring the state for both "proxy_servers" and "ssl_verify" to what was before + # Restoring the state for "proxy_servers" to what it was before conda_context.proxy_servers = proxy_servers - conda_context.ssl_verify = ssl_verify ( pkg_records, From 8a652e5e050961790beb5c342d6144f4bc477ab9 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Thu, 19 Sep 2024 10:08:41 +0200 Subject: [PATCH 2/4] add news --- news/860-ssl-verify | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 news/860-ssl-verify diff --git a/news/860-ssl-verify b/news/860-ssl-verify new file mode 100644 index 000000000..2bb2e4000 --- /dev/null +++ b/news/860-ssl-verify @@ -0,0 +1,19 @@ +### Enhancements + +* + +### Bug fixes + +* Respect `ssl_verify` setting if defined in any `condarc` file. (#851 via #860) + +### Deprecations + +* + +### Docs + +* + +### Other + +* From 135bab552f9398d5611895ab27d9f27b58927956 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sat, 28 Sep 2024 11:52:08 +0200 Subject: [PATCH 3/4] assert context items were kept --- constructor/fcp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/constructor/fcp.py b/constructor/fcp.py index a0411b1fc..2f8d5c922 100644 --- a/constructor/fcp.py +++ b/constructor/fcp.py @@ -454,13 +454,15 @@ def main(info, verbose=True, dry_run=False, conda_exe="conda.exe"): # We can pass ssl_verify via env var, but proxy_servers is a mapping so we need to do it by hand # See: https://github.com/conda/constructor/issues/304 proxy_servers = conda_context.proxy_servers - + _ssl_verify = conda_context.ssl_verify with env_vars({ "CONDA_PKGS_DIRS": download_dir, "CONDA_SSL_VERIFY": str(conda_context.ssl_verify), }, conda_replace_context_default): # Restoring the state for "proxy_servers" to what it was before conda_context.proxy_servers = proxy_servers + assert conda_context.ssl_verify == _ssl_verify + assert conda_context.pkgs_dirs == download_dir ( pkg_records, From 1bb9a0e94aa1f052637c9a6d25811a90f228c4cf Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sat, 28 Sep 2024 12:29:39 +0200 Subject: [PATCH 4/4] first item --- constructor/fcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constructor/fcp.py b/constructor/fcp.py index 2f8d5c922..e6f66dfa1 100644 --- a/constructor/fcp.py +++ b/constructor/fcp.py @@ -462,7 +462,7 @@ def main(info, verbose=True, dry_run=False, conda_exe="conda.exe"): # Restoring the state for "proxy_servers" to what it was before conda_context.proxy_servers = proxy_servers assert conda_context.ssl_verify == _ssl_verify - assert conda_context.pkgs_dirs == download_dir + assert conda_context.pkgs_dirs and conda_context.pkgs_dirs[0] == download_dir ( pkg_records,