Giter Club home page Giter Club logo

Comments (16)

aminya avatar aminya commented on May 31, 2024

Couldn't you forward GitHub URLs on your side? Not having access to GitHub is unfortunate as many tools (not just project_options) rely on it.

PRs for adding options for the mirrors are welcome. It might be easier to maintain a fork with your special mirrors.

from project_options.

maximiliank avatar maximiliank commented on May 31, 2024

I also tried to forward it via /etc/hosts file, but I could not mange to forward https://github.com -> https://mycompany.corp/github-proxy/mirror/. As you mentioned, no access to GitHub complicate a lot of things. Do you have any suggestions how the forwarding would be possible on a linux machine?

I will think about a mirror option in case I cannot work out the forwarding.

from project_options.

ClausKlein avatar ClausKlein commented on May 31, 2024

you may try this: https://github.com/cpm-cmake/CPM.cmake#private-repositories-and-ci

from project_options.

maximiliank avatar maximiliank commented on May 31, 2024

Thanks for the link. But this works only for git right?
And I think
FetchContent_Declare(_ycm URL https://github.com/robotology/ycm/archive/refs/tags/v0.13.0.zip)
does not use git.

from project_options.

aminya avatar aminya commented on May 31, 2024

Take a look at this discussion. It shows how you can forward URLs in Linux
https://stackoverflow.com/questions/35370967/redirect-local-url-to-another-url

from project_options.

ClausKlein avatar ClausKlein commented on May 31, 2024

Sorry, our company rules are: no internet access on CI build.

this does not work on windows for us: https://github.com/aminya/project_options/blob/main/src/VCEnvironment.cmake#L70

Is this really necessary to use FetchContents?
Would it be possible to use CMP.cmake?

We have a local git mirror with selected git repos while build our SW projects on our CI.

from project_options.

ClausKlein avatar ClausKlein commented on May 31, 2024

I use project_options always like this:

# see https://github.com/TheLartians/CPM.cmake for more info

include(cmake/CPM.cmake)

# see https://github.com/aminya/project_options for more info
CPMAddPackage("gh:aminya/[email protected]")
list(APPEND CMAKE_MODULE_PATH ${ProjectOptions_SRC_DIR})
#XXX list(APPEND CMAKE_MODULE_PATH ${project_options_SOURCE_DIR}/src) # the CPM.cmake way

from project_options.

ClausKlein avatar ClausKlein commented on May 31, 2024

Take a look at this discussion. It shows how you can forward URLs in Linux
https://stackoverflow.com/questions/35370967/redirect-local-url-to-another-url

@aminya This is not an option because of our company rules!

from project_options.

aminya avatar aminya commented on May 31, 2024

This is not an option because of our company rules!

Your company rules are too strict. You would have a better chance by emulating the internet via spawning a local HTTP server that returns your local files.

from project_options.

aminya avatar aminya commented on May 31, 2024

I am closing this issue as it is not related to project_options or any other tool that uses the internet. You have to fix the issues with proxy, forwarding, or emulation of the internet using your local servers on your side.

from project_options.

ClausKlein avatar ClausKlein commented on May 31, 2024

I am closing this issue as it is not related to project_options or any other tool that uses the internet.

Sorry, it is related to your project!

This extremely limit the usability of this project.

I am searching for a solution:

  • you may not fetch zip archives but clone git repositories
  • you may use CPM.cmake to fetch git repos and we may fill the CPM_SOURCE_CACHE
  • you may document and supports for each external package you net to fetch the <dependency>_SOURCE_DIR cmake variable, which is the path to the source of the dependency already installed on CI

The CMP.cmake package-lock is in general a good idea to have control, which external dependency are used while build!

from project_options.

ClausKlein avatar ClausKlein commented on May 31, 2024

@aminya see ClausKlein#5 (the only change is to use git clone)

This would work at my company!

And much easier with CMP.cmake instead of FetchContents

from project_options.

aminya avatar aminya commented on May 31, 2024

Well, the way you emulate the internet is not sufficient. Local git repositories are just a very small part of the internet. You should also run a local DNS server that returns the zip files. This way you can emulate the internet correctly.

The whole point of modern package managers like vcpkg and Conan is to not rely on the Git repositories that are slow, untested, mutable, and error-prone.

As I said this is out of the scope of a CMake build system. You should contact your IT specialists to set up a local DNS and Web server for you.

See
https://www.lafuente.me/posts/local-dns-and-web-server/
https://www.howtogeek.com/devops/how-to-run-your-own-dns-server-on-your-local-network/

from project_options.

ClausKlein avatar ClausKlein commented on May 31, 2024

I am not a friend of having such restrictions!
Our IT is given and may not changed or extended.

But we must have control what is need to build our SW.
We have to document and archive everything. (source, tools, build scripts, licence, ..)
And we want to reproduce a build if needed.

And, I like to be able to compile with my local cache, too if my internet is down.

from project_options.

aminya avatar aminya commented on May 31, 2024

The original issue is about Conan, which uses the internet (not git). The only solution to emulate the internet locally is to run a DNS server as I explained in
#145 (comment)

Still, both problems are out of scope.

from project_options.

ClausKlein avatar ClausKlein commented on May 31, 2024

@lefticus @aminya The problem is common and perhaps solved bye CMake v3.24

dependency-providers

from project_options.

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.