diff --git a/.github/workflows/static_build.yml b/.github/workflows/static_build.yml index ac798d4a8e..e3c8a989bd 100644 --- a/.github/workflows/static_build.yml +++ b/.github/workflows/static_build.yml @@ -38,6 +38,23 @@ jobs: with: repository: conda-forge/micromamba-feedstock path: micromamba-feedstock + - name: Disable output validation + if: ${{ matrix.platform == 'osx' }} + run: | + cd micromamba-feedstock/ + sed -i '' '/conda_forge_output_validation/d' conda-forge.yml + - name: Pin libcurl + if: ${{ matrix.platform == 'osx' }} + run: | + cd micromamba-feedstock/ + sed -i '' 's/libcurl >=8.4.0/libcurl >=8.4.0,<8.10/g' recipe/meta.yaml + sed -i '' 's/libcurl-static >=8.4.0/libcurl-static >=8.4.0,<8.10/g' recipe/meta.yaml + - name: Pin libcurl + if: ${{ matrix.platform == 'linux' }} + run: | + cd micromamba-feedstock/ + sed -i 's/libcurl >=8.4.0/libcurl >=8.4.0,<8.10/g' recipe/meta.yaml + sed -i 's/libcurl-static >=8.4.0/libcurl-static >=8.4.0,<8.10/g' recipe/meta.yaml - name: Checkout mamba branch uses: actions/checkout@v4 with: diff --git a/dev/environment-dev.yml b/dev/environment-dev.yml index f4827b683e..ae90134024 100644 --- a/dev/environment-dev.yml +++ b/dev/environment-dev.yml @@ -11,7 +11,7 @@ dependencies: - cpp-expected - fmt - libarchive - - libcurl >=7.86 + - libcurl >=7.86,<8.10 - libsodium - libsolv >=0.7.18 - nlohmann_json diff --git a/dev/environment-micromamba-static.yml b/dev/environment-micromamba-static.yml index c404dd6186..4cc7196e24 100644 --- a/dev/environment-micromamba-static.yml +++ b/dev/environment-micromamba-static.yml @@ -17,8 +17,8 @@ dependencies: - yaml-cpp-static >=0.8.0 - reproc-static >=14.2.4.post0 - reproc-cpp-static >=14.2.4.post0 - - libcurl >=8.4.0 - - libcurl-static >=8.4.0 + - libcurl >=8.4.0,<8.10 + - libcurl-static >=8.4.0,<8.10 - xz-static - libssh2-static - libarchive-minimal-static diff --git a/libmamba/include/mamba/core/context.hpp b/libmamba/include/mamba/core/context.hpp index 378882eda2..dc04cad23c 100644 --- a/libmamba/include/mamba/core/context.hpp +++ b/libmamba/include/mamba/core/context.hpp @@ -173,6 +173,8 @@ namespace mamba bool always_softlink = false; bool register_envs = true; + bool show_anaconda_channel_warnings = true; + // solver options solver::Request::Flags solver_flags = {}; diff --git a/libmamba/src/api/channel_loader.cpp b/libmamba/src/api/channel_loader.cpp index 299780a509..b80c89450b 100644 --- a/libmamba/src/api/channel_loader.cpp +++ b/libmamba/src/api/channel_loader.cpp @@ -63,6 +63,16 @@ namespace mamba { for (const auto& platform : channel.platforms()) { + auto show_warning = ctx.show_anaconda_channel_warnings; + auto channel_name = channel.platform_url(platform).host(); + if (channel_name == "repo.anaconda.com" && show_warning) + { + LOG_WARNING << "'" << channel_name + << "', a commercial channel hosted by Anaconda.com, is used.\n"; + LOG_WARNING << "Please make sure you understand Anaconda Terms of Services.\n"; + LOG_WARNING << "See: https://legal.anaconda.com/policies/en/"; + } + auto sdires = SubdirData::create( ctx, channel_context, diff --git a/libmamba/src/api/configuration.cpp b/libmamba/src/api/configuration.cpp index 6cf68a3e0a..9f21dd7afd 100644 --- a/libmamba/src/api/configuration.cpp +++ b/libmamba/src/api/configuration.cpp @@ -1660,6 +1660,12 @@ namespace mamba !WARNING: Using this option can result in corruption of long-lived environments due to broken links (deleted cache).)"))); + insert(Configurable("show_anaconda_channel_warnings", &m_context.show_anaconda_channel_warnings) + .group("Extract, Link & Install") + .set_rc_configurable() + .set_env_var_names({ "MAMBA_SHOW_ANACONDA_CHANNEL_WARNINGS" }) + .description("Show the warning when the Anaconda official channels are used")); + insert(Configurable("shortcuts", &m_context.shortcuts) .group("Extract, Link & Install") .set_rc_configurable() diff --git a/libmambapy/src/libmambapy/bindings/legacy.cpp b/libmambapy/src/libmambapy/bindings/legacy.cpp index 861de46ec0..17c48894e3 100644 --- a/libmambapy/src/libmambapy/bindings/legacy.cpp +++ b/libmambapy/src/libmambapy/bindings/legacy.cpp @@ -694,6 +694,7 @@ bind_submodule_impl(pybind11::module_ m) .def_readwrite("local_repodata_ttl", &Context::local_repodata_ttl) .def_readwrite("use_index_cache", &Context::use_index_cache) .def_readwrite("always_yes", &Context::always_yes) + .def_readwrite("show_anaconda_channel_warnings", &Context::show_anaconda_channel_warnings) .def_readwrite("dry_run", &Context::dry_run) .def_readwrite("download_only", &Context::download_only) .def_readwrite("add_pip_as_python_dependency", &Context::add_pip_as_python_dependency)