Git Product home page Git Product logo

Comments (10)

memsharded avatar memsharded commented on July 21, 2024

Hi @andrey-zherikov

The idea is that it shouldn't be necessary to hot-modify the global.conf, but the recommendation would be to identify the logic that need those changes and represent them explicitly in the global.conf using the jinja2 templates. You can use there any input condition, like environment variables, or os or platform checks. You can do things like core.net.http:proxies = {{os.getenv("myproxies")}} or something like that.

from conan.

andrey-zherikov avatar andrey-zherikov commented on July 21, 2024

What I'm doing is I'm trying to automate (to the certain degree) bringing new versions of third-party packages (like cmake) to our artifactory. The idea is to take the recipe from conan-center (which re-package pre-built binaries) and run it on our side. This recipe creates a package in local cache, then this package is gonna be uploaded to our artifactory.

The main issue with this workflow is that connection to internet requires proxy with our own CA cert but connection to artifactory requires no proxy. I can specify proxy through https_proxy environment variable to specific conan command which requires it but I'm not able to provide CA cert (or I didn't find the way) - conans' -c option doesn't allow changing core.* settings (I tried -c core.net.http:cacert_path=...).

So I see the only way is to modify global.conf locally (our shared global.conf has no proxies on purpose to avoid any random recipe to go to internet and I prefer not to change it globally).

from conan.

memsharded avatar memsharded commented on July 21, 2024

I see, probably what you are looking for is:

 -cc CORE_CONF, --core-conf CORE_CONF
                        Global configuration for Conan

This is different from the -c which is the profile configuration. The -cc allows changing the global.conf from the command line.

from conan.

andrey-zherikov avatar andrey-zherikov commented on July 21, 2024

What is CORE_CONF? How to use it? I did a quick search on conan docs and didn't find any explanation

from conan.

memsharded avatar memsharded commented on July 21, 2024

From https://docs.conan.io/2/reference/config_files/global_conf.html

  • core.*: aimed to configure values of Conan core behavior (download retries, package ID modes, etc.). Only definable in global.conf file.

  • tools.*: aimed to configure values of Conan tools (toolchains, build helpers, etc.) used in your recipes. Definable in both global.conf and profiles.

from conan.

andrey-zherikov avatar andrey-zherikov commented on July 21, 2024

That is clear. My question was about -cc CORE_CONF - how to use it? Does it accept the same strings as -c? Does it accept path to custom global.conf? How does it work with original global.conf from CONAN_HOME?

Compare, for example, these help screens - the second one is very clear:

-cc CORE_CONF, --core-conf CORE_CONF
                        Global configuration for Conan
-c CONF, --conf CONF  Apply the specified conf. By default, or if specifying
                        -c:h (--conf:host), it applies to the host context.
                        Use -c:b (--conf:build) to specify the build context,
                        or -c:a (--conf:all) to specify both contexts at once.
                        Example: -c tools.cmake.cmaketoolchain:generator=Xcode

from conan.

memsharded avatar memsharded commented on July 21, 2024

It would be used the same way as "profile" tools.* conf, so something like the
Example: -c tools.cmake.cmaketoolchain:generator=Xcode, but for core.* configuration:

conan ... -cc core.download:parallel=8

I understand now better your question, probably we want to extend the cli help to include an example.

from conan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.